From fb24b7e4807d9edcf2f2d58ca3823ec4f914b70a Mon Sep 17 00:00:00 2001 From: Vrifox Date: Tue, 22 Sep 2020 14:10:53 +0200 Subject: [PATCH] next/previous article/project section rewritten --- assets/scss/_default/single.scss | 46 +++++------------- assets/scss/partials/_main.scss | 3 +- config.yaml | 2 +- layouts/_default/single.html | 36 ++++---------- layouts/index.html | 2 +- ...s_f300667da4f5b5f84e1a9e0702b2fdde.content | 47 +++++++------------ ...s_f300667da4f5b5f84e1a9e0702b2fdde.content | 7 +-- 7 files changed, 46 insertions(+), 97 deletions(-) diff --git a/assets/scss/_default/single.scss b/assets/scss/_default/single.scss index e809fb4..ff7fbc9 100644 --- a/assets/scss/_default/single.scss +++ b/assets/scss/_default/single.scss @@ -54,58 +54,38 @@ } .section-articles { - margin: 20px auto; + margin: 20px auto -50px auto; display: grid; grid-template-columns: repeat(2, 1fr); grid-gap: 1rem; max-width: 720px; - a { - color: rgb(255, 255, 255); - text-decoration: none; - } article { - background: rgb(60, 60, 90); color: rgb(255, 255, 255); - padding: 20px; + margin: 20px 0; border-radius: 5px; display: flex; flex-flow: column; height: max-content; transition: background .2s; - img { - order: -1; - max-width: calc(100% + 40px); - border-radius: 5px; - margin: -20px -20px 20px -20px; - background: rgb(80, 80, 120); - object-fit: cover; - max-height: 170px; - } - h1 { - margin-top: 0px; - } a { - color: rgb(255, 255, 255); + margin: 10px 0; } a:hover { text-decoration: underline; } - .meta { - margin: 0; - } - .author { - font-style: italic; - color: rgb(200, 200, 230); - } } - article:hover { - background: rgb(70, 70, 105); + .previous-article { + text-align: right; } } -@media (max-width: 600px) { - .section-articles { - grid-template-columns: repeat(1, 1fr); - } +.section-articles::after { + content: ''; + position: absolute; + width: 100vw; + background: rgb(50, 50, 75); + height: 230px; + left: 0; + z-index: -10; } @import '../partials/footer'; diff --git a/assets/scss/partials/_main.scss b/assets/scss/partials/_main.scss index cf0bed6..ffd52b7 100644 --- a/assets/scss/partials/_main.scss +++ b/assets/scss/partials/_main.scss @@ -8,6 +8,8 @@ html { scrollbar-width: thin; scrollbar-color: rgb(255, 130, 130) rgb(60, 60, 90); + overflow-x: hidden; + overflow-y: scroll; } body { background: rgb(40, 40, 60); @@ -15,7 +17,6 @@ body { margin: 0; font-family: PoppinsLatin, Monaco, Lucida Console, monospace; display: grid; - overflow-x: hidden; } a { color: rgb(255, 130, 130); diff --git a/config.yaml b/config.yaml index fae33b2..349e2c1 100644 --- a/config.yaml +++ b/config.yaml @@ -3,7 +3,7 @@ languageCode: en-us title: vrifox.cc enableRobotsTXT: true params: - version: 2020-09-21 + version: 2020-09-22 menu: main: - identifier: blog diff --git a/layouts/_default/single.html b/layouts/_default/single.html index c853928..99c5c6e 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -36,34 +36,14 @@
- {{ with .PrevInSection }} - -
-

{{ .Title }}

-

{{ .Date.Format "2 January 2006" }} {{ with .Params.author }}by{{ end}} {{ .Params.author }}

- {{ with .Description }} -

{{ . }}

- {{ end }} - {{ with .Params.featured_image }} - - {{ end }} -
-
- {{ end }} - {{ with .NextInSection }} - -
-

{{ .Title }}

-

{{ .Date.Format "2 January 2006" }} {{ with .Params.author }}by{{ end }} {{ .Params.author }}

- {{ with .Description }} -

{{ . }}

- {{ end }} - {{ with .Params.featured_image }} - - {{ end }} -
-
- {{ end }} +
+ {{ with .NextInSection }}{{ if eq .Params.type "project" }}next project{{ end }}{{ if ne .Params.type "project" }}next article{{ end }} + {{ .Title }}{{ end }} +
+
+ {{ with .PrevInSection }}{{ if eq .Params.type "project" }}previous project{{ end }}{{ if ne .Params.type "project" }}previous article{{ end }} + {{ .Title }}{{ end }} +
diff --git a/layouts/index.html b/layouts/index.html index 1fd0a1e..dce0d8c 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -13,7 +13,7 @@

latest posts

- {{ range first 3 (where .Site.RegularPages "Type" "post") }} + {{ range first 2 (where .Site.RegularPages "Type" "post") }}

{{ .Title }}

diff --git a/resources/_gen/assets/scss/scss/_default/single.scss_f300667da4f5b5f84e1a9e0702b2fdde.content b/resources/_gen/assets/scss/scss/_default/single.scss_f300667da4f5b5f84e1a9e0702b2fdde.content index c0c0f86..4529915 100644 --- a/resources/_gen/assets/scss/scss/_default/single.scss_f300667da4f5b5f84e1a9e0702b2fdde.content +++ b/resources/_gen/assets/scss/scss/_default/single.scss_f300667da4f5b5f84e1a9e0702b2fdde.content @@ -7,15 +7,16 @@ html { scrollbar-width: thin; - scrollbar-color: #ff8282 #3c3c5a; } + scrollbar-color: #ff8282 #3c3c5a; + overflow-x: hidden; + overflow-y: scroll; } body { background: #28283c; color: #f0f0ff; margin: 0; font-family: PoppinsLatin, Monaco, Lucida Console, monospace; - display: grid; - overflow-x: hidden; } + display: grid; } a { color: #ff8282; @@ -104,48 +105,34 @@ nav { background: #464669; } .section-articles { - margin: 20px auto; + margin: 20px auto -50px auto; display: grid; grid-template-columns: repeat(2, 1fr); grid-gap: 1rem; max-width: 720px; } - .section-articles a { - color: white; - text-decoration: none; } .section-articles article { - background: #3c3c5a; color: white; - padding: 20px; + margin: 20px 0; border-radius: 5px; display: flex; flex-flow: column; height: max-content; transition: background .2s; } - .section-articles article img { - order: -1; - max-width: calc(100% + 40px); - border-radius: 5px; - margin: -20px -20px 20px -20px; - background: #505078; - object-fit: cover; - max-height: 170px; } - .section-articles article h1 { - margin-top: 0px; } .section-articles article a { - color: white; } + margin: 10px 0; } .section-articles article a:hover { text-decoration: underline; } - .section-articles article .meta { - margin: 0; } - .section-articles article .author { - font-style: italic; - color: #c8c8e6; } - .section-articles article:hover { - background: #464669; } + .section-articles .previous-article { + text-align: right; } -@media (max-width: 600px) { - .section-articles { - grid-template-columns: repeat(1, 1fr); } } +.section-articles::after { + content: ''; + position: absolute; + width: 100vw; + background: #32324b; + height: 230px; + left: 0; + z-index: -10; } footer { background: #1e1e2d; diff --git a/resources/_gen/assets/scss/scss/index.scss_f300667da4f5b5f84e1a9e0702b2fdde.content b/resources/_gen/assets/scss/scss/index.scss_f300667da4f5b5f84e1a9e0702b2fdde.content index 61185fe..c4d4630 100644 --- a/resources/_gen/assets/scss/scss/index.scss_f300667da4f5b5f84e1a9e0702b2fdde.content +++ b/resources/_gen/assets/scss/scss/index.scss_f300667da4f5b5f84e1a9e0702b2fdde.content @@ -7,15 +7,16 @@ html { scrollbar-width: thin; - scrollbar-color: #ff8282 #3c3c5a; } + scrollbar-color: #ff8282 #3c3c5a; + overflow-x: hidden; + overflow-y: scroll; } body { background: #28283c; color: #f0f0ff; margin: 0; font-family: PoppinsLatin, Monaco, Lucida Console, monospace; - display: grid; - overflow-x: hidden; } + display: grid; } a { color: #ff8282;