From fb02b833cd69f572d2decfdce147242a5a4bddf4 Mon Sep 17 00:00:00 2001 From: Moritz Ruth Date: Sat, 30 Nov 2019 18:20:08 +0100 Subject: [PATCH] Add navigation --- assets/css/_mobile.scss | 11 ++ assets/css/_variables.scss | 9 ++ assets/css/elements/link.scss | 13 ++ assets/css/global.scss | 10 ++ components/NavigationBar.vue | 229 ++++++++++++++++++++++++++++++++++ layouts/none.vue | 13 ++ pages/index.vue | 23 ++-- 7 files changed, 298 insertions(+), 10 deletions(-) create mode 100644 assets/css/_mobile.scss create mode 100644 assets/css/_variables.scss create mode 100644 assets/css/elements/link.scss create mode 100644 components/NavigationBar.vue create mode 100644 layouts/none.vue diff --git a/assets/css/_mobile.scss b/assets/css/_mobile.scss new file mode 100644 index 0000000..440099a --- /dev/null +++ b/assets/css/_mobile.scss @@ -0,0 +1,11 @@ +@mixin mobile() { + @media (max-width: 800px) { + @content; + } +} + +@mixin notMobile() { + @media (min-width: 801px) { + @content; + } +} diff --git a/assets/css/_variables.scss b/assets/css/_variables.scss new file mode 100644 index 0000000..98e4f26 --- /dev/null +++ b/assets/css/_variables.scss @@ -0,0 +1,9 @@ +$content-width: 1000px; +$content-padding: 20px; +$gutter-size: 40px; + +$black-brighter: #0e0e0e; + +$blue: #39a8f3; +$on-blue: black; +$blue-darker: #3695d8; diff --git a/assets/css/elements/link.scss b/assets/css/elements/link.scss new file mode 100644 index 0000000..e71485d --- /dev/null +++ b/assets/css/elements/link.scss @@ -0,0 +1,13 @@ +@import "../variables"; + +.link { + color: $blue; + text-decoration: none; + + transition: 100ms linear opacity; + opacity: 1; + + &:hover { + opacity: 0.8; + } +} diff --git a/assets/css/global.scss b/assets/css/global.scss index c0cfa1a..8fb3b55 100644 --- a/assets/css/global.scss +++ b/assets/css/global.scss @@ -1,3 +1,13 @@ +@import "mobile"; + +:root { + --navbar-height: 100px; + + @include mobile { + --navbar-height: 80px; + } +} + *, ::before, ::after { box-sizing: border-box; margin: 0; diff --git a/components/NavigationBar.vue b/components/NavigationBar.vue new file mode 100644 index 0000000..a180d58 --- /dev/null +++ b/components/NavigationBar.vue @@ -0,0 +1,229 @@ + + + + + diff --git a/layouts/none.vue b/layouts/none.vue new file mode 100644 index 0000000..366bec2 --- /dev/null +++ b/layouts/none.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/pages/index.vue b/pages/index.vue index ff40879..8f1393f 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,21 +1,22 @@