$
This commit is contained in:
parent
de2a768813
commit
e857bb23ea
32
src/app.riot
32
src/app.riot
@ -6,13 +6,12 @@
|
||||
<not-found />
|
||||
</div>
|
||||
</div>
|
||||
<div if={!state.showNotFound} class="">
|
||||
<div class="column column-60">
|
||||
|
||||
<div if={!state.showNotFound}>
|
||||
<route each={page in state.pages} path={page.path}>
|
||||
<main is={page.componentName} />
|
||||
</route>
|
||||
</div>
|
||||
</div>
|
||||
</router>
|
||||
</div>
|
||||
|
||||
@ -29,7 +28,6 @@
|
||||
Route,
|
||||
NotFound,
|
||||
Home: lazy(Loader, () => import(
|
||||
/* webpackPrefetch: true, webpackChunkName: 'pages/home' */
|
||||
'./pages/home.riot'
|
||||
)),
|
||||
},
|
||||
@ -39,12 +37,10 @@
|
||||
activePage: null
|
||||
},
|
||||
onBeforeMount({ isServer }) {
|
||||
// create a stream on all routes to catch the not-found page
|
||||
this.anyRouteStream = route('(.*)')
|
||||
this.anyRouteStream.on.value(this.onAnyRoute)
|
||||
},
|
||||
onAnyRoute(path) {
|
||||
// show the not found page if none of the page paths are matched
|
||||
onAnyRoute(path) {// show the not found page if none of the page paths are matched
|
||||
const activePage = pages.find(p => match(path.pathname, toRegexp(p.path)))
|
||||
|
||||
this.update({
|
||||
@ -60,25 +56,9 @@
|
||||
|
||||
<style>
|
||||
:host {
|
||||
padding: 2rem 0;
|
||||
}
|
||||
|
||||
.menu {
|
||||
margin: 1rem -1rem;
|
||||
}
|
||||
|
||||
.menu a {
|
||||
padding: 0 1rem;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.menu a.active.active {
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.menu a:hover, .menu a:focus, .menu a:active {
|
||||
text-decoration: underline;
|
||||
padding: 6%;
|
||||
background: #B8CBD0;
|
||||
min-height: 100vh;
|
||||
}
|
||||
</style>
|
||||
</app>
|
||||
|
3
src/components/global/etablanalytics/etablanalytics.riot
Normal file
3
src/components/global/etablanalytics/etablanalytics.riot
Normal file
@ -0,0 +1,3 @@
|
||||
<etablanalytics>
|
||||
<p>eta</p>
|
||||
</etablanalytics>
|
3
src/components/global/generalytics/generalytics.riot
Normal file
3
src/components/global/generalytics/generalytics.riot
Normal file
@ -0,0 +1,3 @@
|
||||
<generalytics>
|
||||
<p>gen</p>
|
||||
</generalytics>
|
@ -2,11 +2,22 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Parcoursup Analytic's</title>
|
||||
<meta charset="UTF-8"></meta>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/milligram/1.4.0/milligram.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<style>
|
||||
#root {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,3 +1,42 @@
|
||||
<home>
|
||||
<style>
|
||||
#main-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 10%;
|
||||
}
|
||||
|
||||
#main-container
|
||||
#left
|
||||
generalytics {
|
||||
margin-bottom: 5%;
|
||||
}
|
||||
|
||||
#main-container
|
||||
#left
|
||||
generalytics, etablanalytics {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 525px;
|
||||
height: 300px;
|
||||
padding: 20px;
|
||||
box-shadow: 0px 0px 9px 1px black;
|
||||
background: #7A90A4;
|
||||
border-radius: 10px;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="main-container">
|
||||
<div id="right">
|
||||
<selector />
|
||||
</div>
|
||||
|
||||
<div id="left">
|
||||
<generalytics />
|
||||
<etablanalytics />
|
||||
</div>
|
||||
</div>
|
||||
</home>
|
||||
|
Loading…
Reference in New Issue
Block a user