Giter VIP home page Giter VIP logo

community-theme-header's Introduction

frontend-component-header

Build Status Codecov npm_version npm_downloads license semantic-release

Overview

A generic header for Open edX micro-frontend applications.

Requirements

This component uses @edx/frontend-platform services such as i18n, analytics, configuration, and the AppContext React component, and expects that it has been loaded into a micro-frontend that has been properly initialized via @edx/frontend-platform's initialize function. Please visit the frontend template application to see an example.

Environment Variables

  • LMS_BASE_URL - The URL of the LMS of your Open edX instance.
  • LOGOUT_URL - The URL of the API endpoint which performs a user logout.
  • LOGIN_URL - The URL of the login page where a user can sign into their account.
  • SITE_NAME - The user-facing name of the site, used as alt text on the logo in the header. Defaults to "localhost" in development.
  • LOGO_URL - The URL of the site's logo. This logo is displayed in the header.
  • ORDER_HISTORY_URL - The URL of the order history page.
  • ACCOUNT_PROFILE_URL - The URL of the account profile page.
  • ACCOUNT_SETTINGS_URL - The URL of the account settings page.
  • AUTHN_MINIMAL_HEADER - A boolean flag which hides the main menu, user menu, and logged-out menu items when truthy. This is intended to be used in micro-frontends like frontend-app-authentication in which these menus are considered distractions from the user's task.

Installation

To install this header into your Open edX micro-frontend, run the following command in your MFE:

npm i --save @edx/frontend-component-header

This will make the component available to be imported into your application.

Usage

This library has the following exports:

  • (default): The header as a React component.
  • messages: Internationalization messages suitable for use with @edx/frontend-platform/i18n
  • dist/index.scss: A SASS file which contains style information for the component. It should be imported into the micro-frontend's own SCSS file.

Examples

Development

Install dependencies:

npm ci

Start the development server:

npm start

Build a production distribution:

npm run build

community-theme-header's People

Contributors

abdullahwaheed avatar adamstankiewicz avatar awais-ansari avatar ayesha-waris avatar bilalqamar95 avatar bseverino avatar connorhaugh avatar davidjoy avatar dependabot[bot] avatar dianakhuang avatar edx-requirements-bot avatar edx-semantic-release avatar feanil avatar fesuert avatar jawayria avatar julianajlk avatar kiram15 avatar mashal-m avatar nedbat avatar renovate-bot avatar renovate[bot] avatar sarina avatar snglth avatar stvstnfrd avatar sundasnoreen12 avatar timmc-edx avatar usamasadiq avatar uvgengen avatar uzairr avatar waheedahmed avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.