-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
navigation: more streamlining and example inclusion
- Loading branch information
Dierk Koenig
committed
Dec 31, 2023
1 parent
afbf00a
commit 2ff9de2
Showing
50 changed files
with
443 additions
and
463 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
contrib/p6_schnidrig_altermatt/prototype/getting-started-tutorial/app-solution.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
contrib/p6_schnidrig_altermatt/research/usertesting/app-template.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import {PageController} from "../../kolibri/navigation/pageController.js"; | ||
import {StaticPageProjector} from "../../kolibri/navigation/projector/page/staticPageProjector.js"; | ||
import {NavigationController} from "../../kolibri/navigation/navigationController.js"; | ||
import {NavigationProjector} from "../../kolibri/navigation/projector/basicNavigationProjector.js"; | ||
import {DashboardRefinedProjector} from "../../kolibri/navigation/projector/dashboard/dashboardNavigationProjector.js"; | ||
|
||
// pages that will be displayed as content | ||
|
||
const homePageController = PageController("home", null); | ||
homePageController.setIconPath('../../../img/icons/house.svg'); | ||
StaticPageProjector( | ||
/** @type { !PageControllerType } */ homePageController, | ||
document.getElementById("content"), | ||
'./pages/static/home.html'); | ||
|
||
|
||
const aboutPageController = PageController("about", null); | ||
aboutPageController.setIconPath('../../../img/icons/cute-robot.svg'); | ||
StaticPageProjector( | ||
aboutPageController, | ||
document.getElementById("content"), | ||
'./pages/static/about.html'); | ||
|
||
// navigation | ||
|
||
const navigationController = NavigationController(); | ||
navigationController.setWebsiteLogo('../../../img/logo/logo.svg'); | ||
navigationController.setWebsiteName('Basic Navigation'); | ||
|
||
|
||
DashboardRefinedProjector(navigationController, document.getElementById("nav")); | ||
|
||
navigationController.addPageControllers( | ||
homePageController, | ||
aboutPageController | ||
); | ||
|
||
navigationController.setHomeLocation(homePageController); | ||
|
||
// for later: more visualizations of the navigation | ||
// const pinToBreadCrumbElement = document.getElementById('bread-crumbs'); | ||
// BreadCrumbProjector(navigationController, pinToBreadCrumbElement); | ||
|
||
|
||
/** | ||
* If you'd like you can add our debugger below to your application to observe and alter some of your pages attributes | ||
*/ | ||
|
||
// const pinToDebugElement = document.getElementById("debug"); | ||
// | ||
// const debugPageController = PageController("debug", null); | ||
// debugPageController.setIconPath('./pages/icons/bug.svg'); | ||
// debugPageController.setVisible(false); | ||
// DebugPageProjector(navigationController, debugPageController, pinToDebugElement); | ||
// navigationController.addPageControllers(debugPageController); | ||
// navigationController.setDebugMode(true); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<link id="favicon" rel="icon" type="image/x-icon" href='../../../img/logo/logo.svg'> | ||
|
||
<title>(no title)</title> | ||
|
||
<!-- Styles that should apply to all pages in the Kolibri app --> | ||
|
||
<link href="../../../css/kolibri-light-fonts.css" rel="stylesheet"> | ||
<link href="../../../css/kolibri-light-colors.css" rel="stylesheet"> | ||
<link href="../../../css/kolibri-base.css" rel="stylesheet"> | ||
<link rel="stylesheet" href="./pages/static/home.css"> | ||
<link rel="stylesheet" href="./pages/static/about.css"> | ||
|
||
<!-- <link rel="stylesheet" href="../../kolibri/navigation/projector/navigation.css">--> | ||
<link rel="stylesheet" href="../../kolibri/navigation/projector/dashboard/dashboardNavigationProjector.css"> | ||
|
||
<style> | ||
:root { | ||
--background: #FFFFFF; | ||
} | ||
|
||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
|
||
h1 { | ||
margin-top: 1em; | ||
text-align: center; | ||
} | ||
|
||
section { | ||
max-width: 40em; | ||
margin: 1em auto 4em auto; | ||
} | ||
|
||
</style> | ||
</head> | ||
<body> | ||
<!-- The main hooks that any content can be pinned to--> | ||
<div id="nav"></div> | ||
<div id="content"></div> | ||
</body> | ||
<script type="module" src="basic-nav-app.js"></script> | ||
</html> |
8 changes: 4 additions & 4 deletions
8
docs/src/examples/navigation/pages/person/instantUpdateProjector.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
docs/src/examples/navigation/pages/person/personPageProjector.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
docs/src/examples/navigation/pages/simpleform/simpleFormPageProjector.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#content .about h1 { | ||
margin-top: 35px; | ||
color: var(--kb-hsla-primary-accent); | ||
} | ||
|
||
#content .about .message-wrapper { | ||
text-align: center; | ||
padding: 16px; | ||
display: flex; | ||
justify-content: center; | ||
color: var(--kb-hsla-primary-accent); | ||
} | ||
|
||
#content .about button { | ||
padding: 5px; | ||
margin-top: 32px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<div id="content-wrapper"> | ||
<h1>About</h1> | ||
<div class="message-wrapper"> | ||
<section class="buttons"> | ||
<p>These "buttons" should not be styled.</p> | ||
<a class="btn primary glow" href="#home">Home</a> | ||
<a class="btn accent glow" href="#about">No Style</a> | ||
</section> | ||
</div> | ||
</div> |
File renamed without changes.
Oops, something went wrong.