From ede2593118cba520313ab03a5d61e4e2e9d92654 Mon Sep 17 00:00:00 2001 From: fatchan Date: Tue, 18 Jun 2019 17:05:30 +0000 Subject: [PATCH] move top/bottom to sticky nav include with fixed position --- gulp/res/css/style.css | 12 ++++++++++-- views/includes/stickynav.pug | 4 ++++ views/pages/board.pug | 5 +---- views/pages/catalog.pug | 5 +---- views/pages/thread.pug | 9 +++------ 5 files changed, 19 insertions(+), 16 deletions(-) create mode 100644 views/includes/stickynav.pug diff --git a/gulp/res/css/style.css b/gulp/res/css/style.css index 2bda2d6e..1de1de05 100644 --- a/gulp/res/css/style.css +++ b/gulp/res/css/style.css @@ -84,7 +84,7 @@ a, a:visited { color: #34345C; } -.pages a { +.pages a, .stickynav a { text-decoration: none; } @@ -232,7 +232,15 @@ td, th { align-items: center; } -.post-container, .pages, .toggle-summary, .catalog-tile { +.stickynav { + bottom: 5px; + right: 5px; + position: fixed; + z-index: 1; + padding: 5px; +} + +.post-container, .stickynav, .pages, .toggle-summary, .catalog-tile { background: #D6DAF0; border: 1px solid #B7C5D9; } diff --git a/views/includes/stickynav.pug b/views/includes/stickynav.pug new file mode 100644 index 00000000..0d2e4d95 --- /dev/null +++ b/views/includes/stickynav.pug @@ -0,0 +1,4 @@ +nav.stickynav + a(href='#bottom') ▼ + | + a(href='#top') ▲ diff --git a/views/pages/board.pug b/views/pages/board.pug index 68e63302..2ab7768e 100644 --- a/views/pages/board.pug +++ b/views/pages/board.pug @@ -9,10 +9,9 @@ block content br include ../includes/postform.pug br + include ../includes/stickynav.pug nav.pages#top include ../includes/pages.pug - a(href='#bottom') [Bottom] - | a(href=`/${board._id}/catalog.html`) [Catalog] | hr(size=1) @@ -28,8 +27,6 @@ block content hr(size=1) nav.pages#bottom include ../includes/pages.pug - a(href='#top') [Top] - | a(href=`/${board._id}/catalog.html`) [Catalog] br include ../includes/actionfooter.pug diff --git a/views/pages/catalog.pug b/views/pages/catalog.pug index 7d5c6f64..31d491fa 100644 --- a/views/pages/catalog.pug +++ b/views/pages/catalog.pug @@ -9,9 +9,8 @@ block content br include ../includes/postform.pug br + include ../includes/stickynav.pug nav.pages#top - a(href='#bottom') [Bottom] - | a(href=`/${board._id}/index.html`) [Return] hr(size=1) if threads.length === 0 @@ -21,6 +20,4 @@ block content +catalogtile(board, thread) hr(size=1) nav.pages#bottom - a(href='#top') [Top] - | a(href=`/${board._id}/index.html`) [Return] diff --git a/views/pages/thread.pug b/views/pages/thread.pug index 26bde25a..e3a0f55e 100644 --- a/views/pages/thread.pug +++ b/views/pages/thread.pug @@ -4,9 +4,9 @@ include ../mixins/post.pug block head title /#{board._id}/ - #{thread.subject||thread.postId} meta(property='og:site_name', value=openGraph.siteName) - meta(property='og:title', content=thread.subjct) + meta(property='og:title', content=thread.subject) meta(property='og:url', content=openGraph.url) - meta(property='og:description', content=thread.message.substring(0,200)) + meta(property='og:description', content=thread.message) if thread.files.length > 0 if thread.spoiler meta(property='og:image', content='/img/spoiler.png') @@ -20,9 +20,8 @@ block content br include ../includes/postform.pug br + include ../includes/stickynav.pug nav.pages#top - a(href='#bottom') [Bottom] - | a(href=`/${board._id}/index.html`) [Return] | a(href=`/${board._id}/catalog.html`) [Catalog] @@ -34,8 +33,6 @@ block content +post(post) hr(size=1) nav.pages#bottom - a(href='#top') [Top] - | a(href=`/${board._id}/index.html`) [Return] | a(href=`/${board._id}/catalog.html`) [Catalog]