Skip to content

Commit

Permalink
feat: retheme with @edx/brand and pull logo from config settings (#56)
Browse files Browse the repository at this point in the history
* feat: retheme with @edx/brand and pull logo from config settings

* style fixes

* update test snapshots
  • Loading branch information
adamstankiewicz authored Nov 30, 2020
1 parent a50f45e commit 23fc60e
Show file tree
Hide file tree
Showing 18 changed files with 9,119 additions and 5,688 deletions.
7 changes: 5 additions & 2 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
EXAMPLE_VAR=Example Value
ACCESS_TOKEN_COOKIE_NAME=edx-jwt-cookie-header-payload
BASE_URL=localhost:8080
CREDENTIALS_BASE_URL=http://localhost:18150
Expand All @@ -11,6 +10,10 @@ LOGOUT_URL=http://localhost:18000/login
MARKETING_SITE_BASE_URL=http://localhost:18000
ORDER_HISTORY_URL=localhost:1996/orders
REFRESH_ACCESS_TOKEN_ENDPOINT=http://localhost:18000/login_refresh
SEGMENT_KEY=test
SEGMENT_KEY=null
SITE_NAME=Open edX
USER_INFO_COOKIE_NAME=edx-user-info
LOGO_URL=https://edx-cdn.org/v3/prod/logo.svg
LOGO_TRADEMARK_URL=https://edx-cdn.org/v3/prod/logo-trademark.svg
LOGO_WHITE_URL=https://edx-cdn.org/v3/prod/logo-white.svg
FAVICON_URL=https://edx-cdn.org/v3/prod/favicon.ico
7 changes: 5 additions & 2 deletions .env.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
EXAMPLE_VAR=Example Value
ACCESS_TOKEN_COOKIE_NAME=edx-jwt-cookie-header-payload
BASE_URL=localhost:8080
CREDENTIALS_BASE_URL=http://localhost:18150
Expand All @@ -11,6 +10,10 @@ LOGOUT_URL=http://localhost:18000/login
MARKETING_SITE_BASE_URL=http://localhost:18000
ORDER_HISTORY_URL=localhost:1996/orders
REFRESH_ACCESS_TOKEN_ENDPOINT=http://localhost:18000/login_refresh
SEGMENT_KEY=test
SEGMENT_KEY=null
SITE_NAME=Open edX
USER_INFO_COOKIE_NAME=edx-user-info
LOGO_URL=https://edx-cdn.org/v3/prod/logo.svg
LOGO_TRADEMARK_URL=https://edx-cdn.org/v3/prod/logo-trademark.svg
LOGO_WHITE_URL=https://edx-cdn.org/v3/prod/logo-white.svg
FAVICON_URL=https://edx-cdn.org/v3/prod/favicon.ico
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
coverage
dist
example
node_modules
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ temp
src/i18n/transifex_input.json
temp/babel-plugin-react-intl
/.vscode
module.config.js
47 changes: 30 additions & 17 deletions example/index.jsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
import 'babel-polyfill';

import React from 'react';
import { render } from 'react-dom';
import { IntlProvider } from '@edx/frontend-platform/i18n';
import ReactDOM from 'react-dom';
import { initialize, getConfig, subscribe, APP_READY } from '@edx/frontend-platform';
import { AppContext, AppProvider } from '@edx/frontend-platform/react';
import Footer from '@edx/frontend-component-footer';

import './index.scss';
import Footer from '../src';

const App = () => (
<div>
<IntlProvider locale="en">
<Footer
onLanguageSelected={() => {}}
supportedLanguages={[
{ label: 'English', value: 'en' },
{ label: 'Español', value: 'es' },
]}
/>
</IntlProvider>
</div>
);
subscribe(APP_READY, () => {
ReactDOM.render(
<AppProvider>
<AppContext.Provider
value={{
authenticatedUser: null,
config: getConfig(),
}}
>
<Footer
onLanguageSelected={() => {}}
supportedLanguages={[
{ label: 'English', value: 'en' },
{ label: 'Español', value: 'es' },
]}
/>
</AppContext.Provider>
</AppProvider>,
document.getElementById('root'),
);
});

render(<App />, document.getElementById('root'));
initialize({
messages: []
});
9 changes: 6 additions & 3 deletions example/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@import "~@edx/paragon/scss/edx/theme.scss";
@import "~@edx/paragon/scss/edx/fonts.scss";
@import '../src/footer.scss';
@import "@edx/brand/paragon/fonts";
@import "@edx/brand/paragon/variables";
@import "@edx/paragon/scss/core/core";
@import "@edx/brand/paragon/overrides";

@import "@edx/frontend-component-footer/footer";
Loading

0 comments on commit 23fc60e

Please sign in to comment.