mirror of
https://github.com/matt-fidd/stratos.git
synced 2026-01-02 08:19:31 +00:00
Added adminNav and adminNavItem components
This commit is contained in:
53
src/stylesheets/components/_adminNav.scss
Normal file
53
src/stylesheets/components/_adminNav.scss
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
.adminNav {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 82vh;
|
||||||
|
background-color: $primary-colour;
|
||||||
|
padding: 3rem 0;
|
||||||
|
padding-top: 5rem;
|
||||||
|
|
||||||
|
display: none;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__profile {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
img {
|
||||||
|
border-radius: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.details {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 1rem;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logout {
|
||||||
|
align-self: flex-end;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__items {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@include respond-to('large') {
|
||||||
|
display: flex;
|
||||||
|
width: 20vw;
|
||||||
|
height: 87vh;
|
||||||
|
}
|
||||||
|
}
|
||||||
16
src/stylesheets/components/_adminNavItem.scss
Normal file
16
src/stylesheets/components/_adminNavItem.scss
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
.adminNav__item {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 1rem;
|
||||||
|
padding: 2rem 0;
|
||||||
|
border-bottom: 1px solid white;
|
||||||
|
width: 70%;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@include on-event() {
|
||||||
|
background-color: $primary-colour-dark;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,5 +15,7 @@
|
|||||||
@import 'components/mainPageHeader';
|
@import 'components/mainPageHeader';
|
||||||
@import 'components/mainForm';
|
@import 'components/mainForm';
|
||||||
@import 'components/adminHeader';
|
@import 'components/adminHeader';
|
||||||
|
@import 'components/adminNav';
|
||||||
|
@import 'components/adminNavItem';
|
||||||
|
|
||||||
@import 'pages/index';
|
@import 'pages/index';
|
||||||
|
|||||||
15
views/partials/adminNav.hbs
Normal file
15
views/partials/adminNav.hbs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<nav class='adminNav'>
|
||||||
|
<div class='adminNav__items'>
|
||||||
|
{{> adminNavItem content='Dashboard' icon='gauge' to='dashboard' }}
|
||||||
|
{{> adminNavItem content='Classes' icon='chalkboard-user' to='classes' }}
|
||||||
|
{{> adminNavItem content='Tests' icon='book-open' to='tests' }}
|
||||||
|
{{> adminNavItem content='Reports' icon='chart-column' to='reports' }}
|
||||||
|
</div>
|
||||||
|
<div class='adminNav__profile'>
|
||||||
|
<div class='details'>
|
||||||
|
<img src='https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fpwco.com.sg%2Fwp-content%2Fuploads%2F2020%2F05%2FGeneric-Profile-Placeholder-v3.png&f=1&nofb=1' style='width: 50px;'/>
|
||||||
|
<span>Matthew Fiddaman</span>
|
||||||
|
</div>
|
||||||
|
<a class='logout' href='/logout'><i class='fa-solid fa-arrow-right-from-bracket'></i>Logout</a>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
4
views/partials/adminNavItem.hbs
Normal file
4
views/partials/adminNavItem.hbs
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<a href='/admin/{{ to }}' class='adminNav__item'>
|
||||||
|
<i class='fa-solid fa-{{ icon}}'></i>
|
||||||
|
<span>{{content}}</span>
|
||||||
|
</a>
|
||||||
Reference in New Issue
Block a user