💄 Add bottom navbar
This commit is contained in:
@ -1,11 +1,13 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import TitleBar from "./components/titlebar-element.vue";
|
import TitleBar from "./components/titlebar-element.vue";
|
||||||
|
import BottomNavbar from "./components/bottom-navbar.vue";
|
||||||
import { RouterView } from "vue-router";
|
import { RouterView } from "vue-router";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<TitleBar />
|
<TitleBar />
|
||||||
<RouterView />
|
<RouterView />
|
||||||
|
<BottomNavbar />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
--text-color: #bdbdbd;
|
--text-color: #bdbdbd;
|
||||||
--font-family: Arial, Helvetica, sans-serif;
|
--font-family: Arial, Helvetica, sans-serif;
|
||||||
--titlebar-color: #212121;
|
--titlebar-color: #212121;
|
||||||
|
--bottomnav-color: #757575;
|
||||||
|
--bottomnav-icon-color: #dedede;
|
||||||
|
--bottomnav-icon-active-color: #456c47;
|
||||||
|
--bottomnav-active-color: #7ca74b;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
85
src/components/bottom-navbar.vue
Normal file
85
src/components/bottom-navbar.vue
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
<script setup>
|
||||||
|
import CalendarIcon from "./icons/calendar-icon.vue";
|
||||||
|
import BellIcon from "./icons/bell-icon.vue";
|
||||||
|
import ClockIcon from "./icons/clock-icon.vue";
|
||||||
|
import { RouterLink } from "vue-router";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bottomnav">
|
||||||
|
<div class="entry">
|
||||||
|
<RouterLink to="/timetable">
|
||||||
|
<CalendarIcon class="icon" />
|
||||||
|
<span class="title">Timetable</span>
|
||||||
|
</RouterLink>
|
||||||
|
</div>
|
||||||
|
<div class="entry">
|
||||||
|
<RouterLink to="/substitutions">
|
||||||
|
<BellIcon class="icon" />
|
||||||
|
<span class="title">Substitutions</span>
|
||||||
|
</RouterLink>
|
||||||
|
</div>
|
||||||
|
<div class="entry">
|
||||||
|
<RouterLink to="/history">
|
||||||
|
<ClockIcon class="icon" />
|
||||||
|
<span class="title">History</span>
|
||||||
|
</RouterLink>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.bottomnav {
|
||||||
|
width: calc(90% - 40px);
|
||||||
|
height: 70px;
|
||||||
|
background-color: var(--bottomnav-color);
|
||||||
|
border-radius: 10px;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 20px;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
display: grid;
|
||||||
|
grid-auto-columns: 1fr;
|
||||||
|
grid-auto-flow: column;
|
||||||
|
padding: 0px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry .title {
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 0px 10px;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 700px) {
|
||||||
|
.entry .title {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry * {
|
||||||
|
color: var(--icon-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry .router-link-active {
|
||||||
|
background-color: var(--bottomnav-active-color);
|
||||||
|
padding: 4px 25px;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry .router-link-active > * {
|
||||||
|
color: var(--bottomnav-icon-active-color);
|
||||||
|
}
|
||||||
|
</style>
|
19
src/components/icons/bell-icon.vue
Normal file
19
src/components/icons/bell-icon.vue
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<!-- From https://github.com/feathericons/feather -->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="39"
|
||||||
|
height="39"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
class="feather feather-bell"
|
||||||
|
>
|
||||||
|
<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path>
|
||||||
|
<path d="M13.73 21a2 2 0 0 1-3.46 0"></path>
|
||||||
|
</svg>
|
||||||
|
</template>
|
21
src/components/icons/calendar-icon.vue
Normal file
21
src/components/icons/calendar-icon.vue
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<!-- From https://github.com/feathericons/feather -->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="39"
|
||||||
|
height="39"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="1.8"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
class="feather feather-calendar"
|
||||||
|
>
|
||||||
|
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
|
||||||
|
<line x1="16" y1="2" x2="16" y2="6"></line>
|
||||||
|
<line x1="8" y1="2" x2="8" y2="6"></line>
|
||||||
|
<line x1="3" y1="10" x2="21" y2="10"></line>
|
||||||
|
</svg>
|
||||||
|
</template>
|
19
src/components/icons/clock-icon.vue
Normal file
19
src/components/icons/clock-icon.vue
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<!-- From https://github.com/feathericons/feather -->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="39"
|
||||||
|
height="39"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
class="feather feather-clock"
|
||||||
|
>
|
||||||
|
<circle cx="12" cy="12" r="10"></circle>
|
||||||
|
<polyline points="12 6 12 12 16 14"></polyline>
|
||||||
|
</svg>
|
||||||
|
</template>
|
Reference in New Issue
Block a user