Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

Commit

Permalink
refactor: use frontend-component-header, move away from old studio st…
Browse files Browse the repository at this point in the history
…yles
  • Loading branch information
brian-smith-tcril authored and Brian Smith committed Oct 20, 2022
1 parent f231c3d commit 2814965
Show file tree
Hide file tree
Showing 38 changed files with 1,485 additions and 3,536 deletions.
572 changes: 411 additions & 161 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"dependencies": {
"@edx/brand": "npm:@edx/brand-openedx@1.1.0",
"@edx/frontend-component-footer": "10.2.1",
"@edx/frontend-component-header": "^3.3.0",
"@edx/frontend-platform": "1.15.2",
"@edx/paragon": "19.25.3",
"@fortawesome/fontawesome-svg-core": "1.2.36",
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
</head>
<body>
<div id="root"></div>
<div id="root" class="library-authoring__root"></div>
</body>
</html>
47 changes: 25 additions & 22 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,43 +20,46 @@ import {
LibraryEditPage,
LibraryListPage,
LibraryCreatePage,
StudioHeader,
LibraryAccessPage,
LibraryAuthoringPage,
StudioHeaderWrapper,
} from './library-authoring';
import './index.scss';
import './assets/favicon.ico';

mergeConfig({
LIB_AUTHORING_BASE_URL: process.env.BASE_URL,
STUDIO_BASE_URL: process.env.STUDIO_BASE_URL,
LOGO_URL: process.env.LOGO_TRADEMARK_URL,
BLOCKSTORE_COLLECTION_UUID: process.env.BLOCKSTORE_COLLECTION_UUID,
SECURE_ORIGIN_XBLOCK_BOOTSTRAP_HTML_URL: process.env.SECURE_ORIGIN_XBLOCK_BOOTSTRAP_HTML_URL,
});

subscribe(APP_READY, () => {
ReactDOM.render(
<AppProvider store={store}>
<div className="wrapper">
<StudioHeader />
<main>
<Switch>
<Route exact path={ROUTES.List.HOME} component={LibraryListPage} />
<Route exact path={ROUTES.List.CREATE} component={LibraryCreatePage} />
<Route exact path={ROUTES.Detail.HOME} component={LibraryAuthoringPage} />
<Route exact path={ROUTES.Detail.EDIT} component={LibraryEditPage} />
<Route exact path={ROUTES.Detail.ACCESS} component={LibraryAccessPage} />
<Route exact path={ROUTES.Detail.IMPORT} component={CourseImportPage} />
<Route exact path={ROUTES.Block.HOME} component={LibraryBlockPage} />
<Route exact path={ROUTES.Block.EDIT} component={LibraryBlockPage} />
<Route exact path={ROUTES.Block.ASSETS} component={LibraryBlockPage} />
<Route exact path={ROUTES.Block.SOURCE} component={LibraryBlockPage} />
<Route exact path={ROUTES.Block.LEARN} component={LibraryBlockPage} />
<Route path="*" component={NotFoundPage} />
</Switch>
</main>
<AboutLibrariesHyperlink />
<Footer />
</div>
<Switch>
<Route path={ROUTES.Detail.HOME} component={StudioHeaderWrapper} />
<Route path="*" component={StudioHeaderWrapper} />
</Switch>
<main className="library-authoring__main-content">
<Switch>
<Route exact path={ROUTES.List.HOME} component={LibraryListPage} />
<Route exact path={ROUTES.List.CREATE} component={LibraryCreatePage} />
<Route exact path={ROUTES.Detail.HOME} component={LibraryAuthoringPage} />
<Route exact path={ROUTES.Detail.EDIT} component={LibraryEditPage} />
<Route exact path={ROUTES.Detail.ACCESS} component={LibraryAccessPage} />
<Route exact path={ROUTES.Detail.IMPORT} component={CourseImportPage} />
<Route exact path={ROUTES.Block.HOME} component={LibraryBlockPage} />
<Route exact path={ROUTES.Block.EDIT} component={LibraryBlockPage} />
<Route exact path={ROUTES.Block.ASSETS} component={LibraryBlockPage} />
<Route exact path={ROUTES.Block.SOURCE} component={LibraryBlockPage} />
<Route exact path={ROUTES.Block.LEARN} component={LibraryBlockPage} />
<Route path="*" component={NotFoundPage} />
</Switch>
</main>
<AboutLibrariesHyperlink />
<Footer />
</AppProvider>,
document.getElementById('root'),
);
Expand Down
1 change: 1 addition & 0 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@import '~@edx/paragon/dist/Icon/Icon';
@import '~@edx/brand/paragon/overrides';

@import '~@edx/frontend-component-header/dist/index';
@import '~@edx/frontend-component-footer/dist/footer';

@import 'vendor/normalize.css';
Expand Down
Loading

0 comments on commit 2814965

Please sign in to comment.