diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/_layout.pug | 2 | ||||
-rw-r--r-- | src/_mixin/menu.pug | 8 | ||||
-rw-r--r-- | src/css/main.css | 15 |
3 files changed, 18 insertions, 7 deletions
diff --git a/src/_layout.pug b/src/_layout.pug index d52ace6..6dc80a1 100644 --- a/src/_layout.pug +++ b/src/_layout.pug @@ -22,7 +22,7 @@ block root img(src="/img/flower.svg", width="40") | img(src="/img/flower.svg", width="40") - +menu(root) + +menu(root, element) main block content diff --git a/src/_mixin/menu.pug b/src/_mixin/menu.pug index 462d06f..037b1aa 100644 --- a/src/_mixin/menu.pug +++ b/src/_mixin/menu.pug @@ -1,13 +1,13 @@ -mixin menu(o) +mixin menu(o, element) ul each val in o.children - if (val.type == 'folder' && val.tags.includes('document')) li - if (val.tags.includes('has_index')) - a(href=val.url)= val.nice_name + a(href=val.url, class=val.index.url == element.url ? 'selected' : null)= val.nice_name - else span= val.nice_name - +menu(val) + +menu(val, element) - else if (val.type == 'file' && val.tags.includes('document') && !val.tags.includes('is_index')) li - a(href=val.url)= val.nice_name + a(href=val.url, class=val.url == element.url ? 'selected' : null)= val.nice_name diff --git a/src/css/main.css b/src/css/main.css index 1db711b..47dcf8b 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -31,7 +31,7 @@ body { */ .mobile_block, .mobile_inline { display: none } -@media screen and (max-width: 640px) { +@media screen and (max-width: 800px) { body { flex-direction: column } .computer_block { display: none } .mobile_block { display: block } @@ -62,11 +62,21 @@ body > header a { text-decoration: none; } +body > header > nav ul { + list-style-type: none; + padding-left: 1em; +} +body > header > nav > ul { padding-left: 0px } +body > header > nav a:hover { text-decoration: underline } +body > header > nav .selected { font-weight: bold } +body > header > nav .selected::before { content: "» " } + body > main { padding: 1.5rem; max-width: 1200px; } + /* * TEXT CORE (think markdown) */ @@ -77,7 +87,8 @@ h3 { font-size: 1.75rem } h4 { font-size: 1.50rem } h5 { font-size: 1.25rem } h6 { font-size: 1.10rem } -section, p { margin-bottom: 1rem } +section, p, ul, ol { margin-bottom: 1rem } +ul, ol { padding-left: 1.5em } /* * UTILS |