use {{ now }} instead of {{ .Site.Params.version }}; added errorpages

This commit is contained in:
Vrifox 2020-09-22 15:18:28 +02:00
parent fb24b7e480
commit 6cf10d85cd
12 changed files with 316 additions and 74 deletions

View file

@ -0,0 +1,12 @@
@import 'partials/main';
@import 'partials/nav';
header {
text-align: center;
margin: 150px 0;
h1 {
font-size: 2em;
}
}
@import 'partials/footer';

View file

@ -1,29 +0,0 @@
{{ define "stylesheet" }}{{ $sass := resources.Get "scss/index.scss" }}{{ $style := $sass | resources.ToCSS }}
<link rel="stylesheet" href="{{ $style.Permalink }}" type="text/css" media="screen" />
{{ end }}
{{ define "main" }}
<main class="container">
<section>
<header>
<h1>{{ .Params.heading }}</h1>
<span class="subtitle">{{.Params.subheading}}</span>
</header>
{{.Content}}
</section>
<section class="section-articles">
{{ range first 3 (where .Site.RegularPages "Type" "post") }}
<article>
<h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
<p class="date" title="{{ .Date.Format "2 Jan 2006, 15:04 MST" }}">{{ .Date.Format "2 January 2006" }}</p>
{{ with .Description }}
<p>{{ . }}</p>
{{ end }}
{{ with .Params.featured_image }}
<img src="{{ . | absURL }}">
{{ end }}
</article>
{{ end }}
</section>
</main>
{{ end }}

View file

@ -0,0 +1,18 @@
{{ define "stylesheet" }}{{ $sass := resources.Get "scss/errorpages.scss" }}{{ $style := $sass | resources.ToCSS }}
<link rel="stylesheet" href="{{ $style.Permalink }}" type="text/css" media="screen" />
{{ end }}
{{ define "main" }}
<main>
<div class="container">
<section>
<header>
<h1>{{ .Params.heading }}</h1>
<span class="subtitle">{{.Params.subheading}}</span>
</header>
{{.Content}}
</section>
</div>
</main>
{{ end }}

View file

@ -0,0 +1,17 @@
{{ define "stylesheet" }}{{ $sass := resources.Get "scss/errorpages.scss" }}{{ $style := $sass | resources.ToCSS }}
<link rel="stylesheet" href="{{ $style.Permalink }}" type="text/css" media="screen" />
{{ end }}
{{ define "main" }}
<main>
<div class="container">
<section>
<header>
<h1>{{ .Params.heading }}</h1>
<span class="subtitle">{{.Params.subheading}}</span>
</header>
{{.Content}}
</section>
</div>
</main>
{{ end }}

View file

@ -3,43 +3,45 @@
{{ end }} {{ end }}
{{ define "main" }} {{ define "main" }}
<main class="container"> <main>
<section> <div class="container">
<header> <section>
<h1>{{ .Params.heading }}</h1> <header>
<span class="subtitle">{{.Params.subheading}}</span> <h1>{{ .Params.heading }}</h1>
</header> <span class="subtitle">{{.Params.subheading}}</span>
{{.Content}} </header>
</section> {{.Content}}
<h1>latest <a href="{{ "/blog" | relURL }}">posts</a></h1> </section>
<section class="section-articles"> <h1>latest <a href="{{ "/blog" | relURL }}">posts</a></h1>
{{ range first 2 (where .Site.RegularPages "Type" "post") }} <section class="section-articles">
<a href="{{ .Permalink }}"> {{ range first 2 (where .Site.RegularPages "Type" "post") }}
<article> <a href="{{ .Permalink }}">
<h1>{{ .Title }}</h1> <article>
<p class="meta" title="{{ .Date.Format "2 Jan 2006, 15:04 MST" }}"><span class="date">{{ .Date.Format "2 January 2006" }}</span> <span class="author">by {{ .Params.author }}</span></p> <h1>{{ .Title }}</h1>
{{ with .Description }} <p class="meta" title="{{ .Date.Format "2 Jan 2006, 15:04 MST" }}"><span class="date">{{ .Date.Format "2 January 2006" }}</span> <span class="author">by {{ .Params.author }}</span></p>
<p>{{ . }}</p> {{ with .Description }}
{{ end }} <p>{{ . }}</p>
{{ with .Params.featured_image }} {{ end }}
<img src="{{ . | relURL }}"> {{ with .Params.featured_image }}
{{ end }} <img src="{{ . | relURL }}">
</article> {{ end }}
</a> </article>
{{ end }} </a>
</section> {{ end }}
<h1>latest <a href="{{ "/projects" | relURL }}">projects</a></h1> </section>
<section class="section-projects"> <h1>latest <a href="{{ "/projects" | relURL }}">projects</a></h1>
{{ range first 3 (where .Site.RegularPages "Type" "project") }} <section class="section-projects">
<a href="{{ .Permalink }}"> {{ range first 3 (where .Site.RegularPages "Type" "project") }}
<article> <a href="{{ .Permalink }}">
<h1>{{ .Title }}</h1> <article>
<p class="meta" title="last change: {{ .Date.Format "2 Jan 2006" }}">{{ with .Params.activetime }}<span class="date">{{ . }}</span>{{ end }} {{ with .Params.status }}<span class="status">{{ . }}</span>{{ end }}</p> <h1>{{ .Title }}</h1>
{{ with .Description }}<p>{{ . }}</p>{{ end }} <p class="meta" title="last change: {{ .Date.Format "2 Jan 2006" }}">{{ with .Params.activetime }}<span class="date">{{ . }}</span>{{ end }} {{ with .Params.status }}<span class="status">{{ . }}</span>{{ end }}</p>
<img {{ with .Params.featured_image }}src="{{ . | relURL }}"{{ end }}> {{ with .Description }}<p>{{ . }}</p>{{ end }}
</article> <img {{ with .Params.featured_image }}src="{{ . | relURL }}"{{ end }}>
</a> </article>
{{ end }} </a>
</section> {{ end }}
</section>
</div>
</main> </main>
{{ end }} {{ end }}

View file

@ -1,7 +1,7 @@
<footer> <footer>
<div class="container"> <div class="container">
<section class="website-version"> <section class="website-version">
<span>version {{ .Site.Params.version }}</span> <span title="{{ now.Format "2. January 2006, 15:04 MST" }}">version {{ now.Format "2006-01-02" }}</span>
</section> </section>
<section class="website-subnav"> <section class="website-subnav">
<ul> <ul>

View file

@ -0,0 +1,109 @@
* {
box-sizing: border-box; }
@font-face {
font-family: PoppinsLatin;
src: url(/fonts/PoppinsLatin-Regular.otf); }
html {
scrollbar-width: thin;
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; }
a {
color: #ff8282;
text-decoration: none; }
a:hover {
text-decoration: underline; }
.container {
width: calc(100% - 40px);
max-width: 1140px;
margin: 0 auto; }
main {
width: 100vw; }
nav {
background: #3c3c5a;
white-space: nowrap;
overflow-x: auto; }
nav .container {
display: flex;
align-items: center; }
nav .container .website-name a {
color: whitesmoke;
text-decoration: none;
background: #ff8282;
padding: 5px 10px;
border-radius: 20px;
text-shadow: #ff6464 2px 2px; }
nav .container .website-nav {
margin-left: auto; }
nav .container .website-nav ul {
display: flex;
padding: 0; }
nav .container .website-nav li {
list-style-type: none;
padding: 10px 0 10px 30px; }
nav .container .website-nav a {
color: whitesmoke;
text-decoration: none; }
@media (max-width: 600px) {
nav .container {
max-width: none; }
nav .container .website-nav {
padding: 0 20px; } }
header {
text-align: center;
margin: 150px 0; }
header h1 {
font-size: 2em; }
footer {
background: #1e1e2d;
color: #c8c8e6;
margin-top: 100px;
white-space: nowrap;
overflow-x: auto; }
footer .container {
display: flex;
align-items: center; }
footer .container .website-subnav {
margin-left: auto; }
footer .container .website-subnav ul {
display: flex;
padding: 0; }
footer .container .website-subnav li {
list-style-type: none;
padding: 10px 0 10px 30px; }
footer .container .website-subnav a {
color: #c8c8e6; }
footer::after {
content: '';
background: #1e1e2d;
position: fixed;
height: 10000px;
width: 100vw;
overflow: hidden; }
@media (max-width: 600px) {
footer .container {
max-width: none; }
footer .container .website-version {
order: 2;
padding: 10px 20px; }
footer .container .website-subnav li {
padding: 10px 30px 10px 0; } }

View file

@ -0,0 +1 @@
{"Target":"scss/404.css","MediaType":"text/css","Data":{}}

View file

@ -7,15 +7,16 @@
html { html {
scrollbar-width: thin; scrollbar-width: thin;
scrollbar-color: #ff8282 #3c3c5a; } scrollbar-color: #ff8282 #3c3c5a;
overflow-x: hidden;
overflow-y: scroll; }
body { body {
background: #28283c; background: #28283c;
color: #f0f0ff; color: #f0f0ff;
margin: 0; margin: 0;
font-family: PoppinsLatin, Monaco, Lucida Console, monospace; font-family: PoppinsLatin, Monaco, Lucida Console, monospace;
display: grid; display: grid; }
overflow-x: hidden; }
a { a {
color: #ff8282; color: #ff8282;

View file

@ -0,0 +1,109 @@
* {
box-sizing: border-box; }
@font-face {
font-family: PoppinsLatin;
src: url(/fonts/PoppinsLatin-Regular.otf); }
html {
scrollbar-width: thin;
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; }
a {
color: #ff8282;
text-decoration: none; }
a:hover {
text-decoration: underline; }
.container {
width: calc(100% - 40px);
max-width: 1140px;
margin: 0 auto; }
main {
width: 100vw; }
nav {
background: #3c3c5a;
white-space: nowrap;
overflow-x: auto; }
nav .container {
display: flex;
align-items: center; }
nav .container .website-name a {
color: whitesmoke;
text-decoration: none;
background: #ff8282;
padding: 5px 10px;
border-radius: 20px;
text-shadow: #ff6464 2px 2px; }
nav .container .website-nav {
margin-left: auto; }
nav .container .website-nav ul {
display: flex;
padding: 0; }
nav .container .website-nav li {
list-style-type: none;
padding: 10px 0 10px 30px; }
nav .container .website-nav a {
color: whitesmoke;
text-decoration: none; }
@media (max-width: 600px) {
nav .container {
max-width: none; }
nav .container .website-nav {
padding: 0 20px; } }
header {
text-align: center;
margin: 150px 0; }
header h1 {
font-size: 2em; }
footer {
background: #1e1e2d;
color: #c8c8e6;
margin-top: 100px;
white-space: nowrap;
overflow-x: auto; }
footer .container {
display: flex;
align-items: center; }
footer .container .website-subnav {
margin-left: auto; }
footer .container .website-subnav ul {
display: flex;
padding: 0; }
footer .container .website-subnav li {
list-style-type: none;
padding: 10px 0 10px 30px; }
footer .container .website-subnav a {
color: #c8c8e6; }
footer::after {
content: '';
background: #1e1e2d;
position: fixed;
height: 10000px;
width: 100vw;
overflow: hidden; }
@media (max-width: 600px) {
footer .container {
max-width: none; }
footer .container .website-version {
order: 2;
padding: 10px 20px; }
footer .container .website-subnav li {
padding: 10px 30px 10px 0; } }

View file

@ -0,0 +1 @@
{"Target":"scss/errorpages.css","MediaType":"text/css","Data":{}}

View file

@ -7,15 +7,16 @@
html { html {
scrollbar-width: thin; scrollbar-width: thin;
scrollbar-color: #ff8282 #3c3c5a; } scrollbar-color: #ff8282 #3c3c5a;
overflow-x: hidden;
overflow-y: scroll; }
body { body {
background: #28283c; background: #28283c;
color: #f0f0ff; color: #f0f0ff;
margin: 0; margin: 0;
font-family: PoppinsLatin, Monaco, Lucida Console, monospace; font-family: PoppinsLatin, Monaco, Lucida Console, monospace;
display: grid; display: grid; }
overflow-x: hidden; }
a { a {
color: #ff8282; color: #ff8282;