From 5fb86fae205953c9038d75e00b8c19ce2221fa12 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 1 Feb 2018 13:34:50 +0000 Subject: [PATCH] Move nav links out of config --- assets/less/components/nav.less | 49 ++++++++++++++++++++++++++++++ assets/less/main.less | 1 + source/_includes/nav.html.twig | 12 ++++---- source/_includes/scripts.html.twig | 2 +- 4 files changed, 57 insertions(+), 7 deletions(-) create mode 100644 assets/less/components/nav.less diff --git a/assets/less/components/nav.less b/assets/less/components/nav.less new file mode 100644 index 00000000..d70fc42a --- /dev/null +++ b/assets/less/components/nav.less @@ -0,0 +1,49 @@ +.nav { + @apply .w-full; +} + +.nav-item { + @apply .flex; + @apply .items-center; + @apply .-mx-4; + @apply .p-4; +} + +.nav-item:first-child { + @apply .border-t .border-grey-lighter; +} + +@screen sm { + .nav { + @apply .flex-wrap .justify-end; + } + + .nav-item { + @apply .border-b-3; + @apply .border-transparent; + @apply .ml-4; + @apply .mr-0; + @apply .p-0; + } + + .nav-item:first-child { + @apply .border-t-0 .border-transparent; + } + + .nav-item--active, + .nav-item--active.nav-item:first-child { + @apply .bg-transparent .border-blue; + } +} + +@screen md { + .nav { + @apply .w-2/3; + } +} + +@screen lg { + .nav { + @apply .w-3/4; + } +} diff --git a/assets/less/main.less b/assets/less/main.less index 53204099..54272ad5 100644 --- a/assets/less/main.less +++ b/assets/less/main.less @@ -63,6 +63,7 @@ svg { .table-collapse { border-collapse: collapse } @import 'components/listing'; +@import 'components/nav'; @import 'components/post'; @import 'components/post/about-author'; @import 'components/post/code'; diff --git a/source/_includes/nav.html.twig b/source/_includes/nav.html.twig index 90fd70f7..aca3dcba 100644 --- a/source/_includes/nav.html.twig +++ b/source/_includes/nav.html.twig @@ -15,12 +15,12 @@ -