initial commit

This commit is contained in:
Vri 🌈 2020-09-14 16:24:02 +02:00
commit ab7f027048
86 changed files with 4742 additions and 0 deletions

29
layouts/404.html Normal file
View file

@ -0,0 +1,29 @@
{{ 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 @@
<!doctype html>
<html>
<head>
<title>{{ with .Title }} {{ . }} {{ end }}{{ .Site.Title }}</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{{ block "stylesheet" . }}{{ end }}
<link rel="icon" type="image/png" href="/favicon.png">
</head>
<body>
{{ partial "nav.html" . }}
{{ block "main" . }}{{ end }}
{{ partial "footer.html" . }}
</body>
</html>

View file

@ -0,0 +1,31 @@
{{ define "stylesheet" }}{{ $scss := resources.Get "scss/_default/list.scss" }}{{ $style := $scss | 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 .Pages }}
<a href="{{ .Permalink }}">
<article>
<h1>{{ .Title }}</h1>
<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>
{{ with .Description }}
<p>{{ . }}</p>
{{ end }}
{{ with .Params.featured_image }}
<img src="{{ . | relURL }}">
{{ end }}
</article>
</a>
{{ end }}
</section>
</main>
{{ end }}

View file

@ -0,0 +1,71 @@
{{ define "stylesheet" }}{{ $scss := resources.Get "scss/_default/single.scss" }}{{ $style := $scss | resources.ToCSS }}
<link rel="stylesheet" href="{{ $style.Permalink }}" type="text/css" media="screen" />
{{ end }}
{{ define "main" }}
<main>
<div class="container">
<section class="section-article">
<article>
<p class="meta">
<span title="{{ .Date.Format "2 Jan 2006, 15:04 MST" }}">{{ .Date.Format "2. January 2006" }}</span>
by
<span>{{ .Params.author }}</span>
</p>
<h1 class="title">{{ .Title }}</h1>
{{ with .Params.featured_image }}
<img src="{{ . | relURL }}">
{{ end }}
{{ .Content }}
<aside class="meta">
<div>
{{ with .Params.topics }}
<ul class="topics">
{{ range . }}
<li><a href="{{ "topics" | absURL}}{{ . | urlize }}">{{ . }}</a> </li>
{{ end }}
</ul>
{{ end }}
{{ with .Params.tags }}
<ul class="tags">
{{ range . }}
<li> <a href="{{ "tags" | absURL }}/{{ . | urlize }}">{{ . }}</a> </li>
{{ end }}
</ul>
{{ end }}
</div>
</aside>
</article>
</section>
<section class="section-articles">
{{ with .PrevInSection }}
<a href="{{ .Permalink }}">
<article>
<h1>{{ .Title }}</h1>
<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>
{{ with .Description }}
<p>{{ . }}</p>
{{ end }}
{{ with .Params.featured_image }}
<img src="{{ . | relURL }}">
{{ end }}
</article>
</a>
{{ end }}
{{ with .NextInSection }}
<a href="{{ .Permalink }}">
<article>
<h1>{{ .Title }}</h1>
<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>
{{ with .Description }}
<p>{{ . }}</p>
{{ end }}
{{ with .Params.featured_image }}
<img src="{{ . | relURL }}">
{{ end }}
</article>
{{ end }}
</section>
</div>
</main>
{{ end }}

45
layouts/index.html Normal file
View file

@ -0,0 +1,45 @@
{{ define "stylesheet" }}{{ $scss := resources.Get "scss/index.scss" }}{{ $style := $scss | 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>
<h1>latest <a href="{{ "/blog" | relURL }}">articles</a></h1>
<section class="section-articles">
{{ range first 3 (where .Site.RegularPages "Type" "post") }}
<a href="{{ .Permalink }}">
<article>
<h1>{{ .Title }}</h1>
<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>
{{ with .Description }}
<p>{{ . }}</p>
{{ end }}
{{ with .Params.featured_image }}
<img src="{{ . | relURL }}">
{{ end }}
</article>
</a>
{{ end }}
</section>
<h1>latest <a href="{{ "/projects" | relURL }}">projects</a></h1>
<section class="section-projects">
{{ range first 3 (where .Site.RegularPages "Type" "project") }}
<a href="{{ .Permalink }}">
<article>
<h1>{{ .Title }}</h1>
<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>
{{ with .Description }}<p>{{ . }}</p>{{ end }}
<img {{ with .Params.featured_image }}src="{{ . | relURL }}"{{ end }}>
</article>
</a>
{{ end }}
</section>
</main>
{{ end }}

View file

@ -0,0 +1,29 @@
<footer>
<div class="container">
<section class="website-version">
<span>version {{ .Date.Format "2006-01-02" }}</span>
</section>
<section class="website-subnav">
<ul>
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<li>
<a href="{{ .URL }}">
{{ .Pre }}
<span>{{ .Name }}</span>
</a>
</li>
{{ end }}
<li>|</li>
{{ range .Site.Menus.links }}
<li>
<a href="{{ .URL }}">
{{ .Pre }}
<span>{{ .Name }}</span>
</a>
</li>
{{ end }}
</ul>
</section>
</div>
</footer>

29
layouts/partials/nav.html Normal file
View file

@ -0,0 +1,29 @@
<nav>
<div class="container">
<section class="website-name">
<a href="{{ .Site.BaseURL }}">Vrifox</a>
</section>
<section class="website-nav">
<ul>
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<li>
<a href="{{ .URL }}">
{{ .Pre }}
<span>{{ .Name }}</span>
</a>
</li>
{{ end }}
<li>|</li>
{{ range .Site.Menus.links }}
<li>
<a href="{{ .URL }}">
{{ .Pre }}
<span>{{ .Name }}</span>
</a>
</li>
{{ end }}
</ul>
</section>
</div>
</nav>

View file

@ -0,0 +1,27 @@
{{ define "stylesheet" }}{{ $scss := resources.Get "scss/projects/list.scss" }}{{ $style := $scss | 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 .Pages }}
<a href="{{ .Permalink }}">
<article>
<h1>{{ .Title }}</h1>
<p class="" 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>
{{ with .Description }}<p>{{ . }}</p>{{ end }}
<img {{ with .Params.featured_image }}src="{{ . | relURL }}"{{ end }}>
</article>
</a>
{{ end }}
</section>
</main>
{{ end }}

5
layouts/robots.txt Normal file
View file

@ -0,0 +1,5 @@
User-agent: *
{{range .Pages}}
Disallow: {{.RelPermalink}}
{{end}}