first commit
This commit is contained in:
commit
f9eb307cca
38 changed files with 1394 additions and 0 deletions
7
layouts/404.html
Normal file
7
layouts/404.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{{ define "main" }}
|
||||
<article>
|
||||
<h1>
|
||||
This is not the page you were looking for
|
||||
</h1>
|
||||
</article>
|
||||
{{ end }}
|
||||
13
layouts/_default/baseof.html
Normal file
13
layouts/_default/baseof.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
<div id="content">
|
||||
{{- partial "header.html" . -}}
|
||||
<main>
|
||||
{{- block "main" . }}{{- end }}
|
||||
</main>
|
||||
{{- partial "footer.html" . -}}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
18
layouts/_default/list.html
Normal file
18
layouts/_default/list.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{{ define "main" }}
|
||||
<h2>
|
||||
<span>
|
||||
{{ $title := .Title }}
|
||||
{{ $section := .Section | humanize }}
|
||||
{{ if and (ne $section $title) (ne $section "Tags") }}
|
||||
{{ $section }}:
|
||||
{{ end }}
|
||||
{{ if and (eq $section "Tags") (ne $section $title) }}#{{ end }}{{ $title }}
|
||||
</span>
|
||||
</h2>
|
||||
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
<li><span class="date">{{ .Date.Format "2006-01-02" }}</span> <a href="{{ .Permalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
16
layouts/_default/single.html
Normal file
16
layouts/_default/single.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{{ define "main" }}
|
||||
<article>
|
||||
<h1>{{ .Title }}</h1>
|
||||
<p class="date">{{ .Date.Format "2006-01-02" }}</p>
|
||||
<div>{{ .Content }}</div>
|
||||
{{ if .Params.tags }}
|
||||
<hr />
|
||||
<p>
|
||||
<h4>Tags:</h4>
|
||||
{{ range .Params.tags }}
|
||||
<a href="/tags/{{ . }}">#{{ . }}</a>
|
||||
{{ end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
47
layouts/index.html
Normal file
47
layouts/index.html
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{{ define "main" }}
|
||||
|
||||
{{/* get all the pages that are regular posts and not pages */}}
|
||||
{{ $postsDir := .Site.Params.Posts | default (slice "posts") }}
|
||||
{{ $postsList := where .Site.RegularPages "Section" "in" $postsDir }}
|
||||
|
||||
{{/* pagination */}}
|
||||
{{ range (.Paginate $postsList).Pages }}
|
||||
<div class="card">
|
||||
<h3>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
</h3>
|
||||
<p class="date">
|
||||
{{ .Date.Format "2006-01-02" }}
|
||||
{{ if .Params.tags }}
|
||||
<br />
|
||||
<small>{{ range .Params.tags }}#{{ . }} {{ end }}</small>
|
||||
{{ end }}
|
||||
</p>
|
||||
<div class="articlePreview">
|
||||
{{ .Summary }}
|
||||
<a href="{{ .Permalink }}">Continue reading -></a>
|
||||
</div>
|
||||
<hr />
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if gt .Paginator.TotalPages 1 }}
|
||||
<div id="pageNavigation">
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<a href="{{ .Paginator.Prev.URL }}" title="Previous page"><<<</a>
|
||||
{{ end }}
|
||||
{{ $currentPage := .Paginator.PageNumber }}
|
||||
{{ range .Paginator.Pagers }}
|
||||
{{ if ne .PageNumber $currentPage }}
|
||||
<a href="{{ .URL }}">{{ .PageNumber }}</a>
|
||||
{{ else }}
|
||||
<span>[{{ .PageNumber }}]</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if .Paginator.HasNext }}
|
||||
<a href="{{ .Paginator.Next.URL }}" title="Next page">>>></a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
10
layouts/partials/footer.html
Normal file
10
layouts/partials/footer.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<footer>
|
||||
<hr />
|
||||
<p><small>
|
||||
{{ now.Format "2006" }} © {{ .Site.Copyright }}
|
||||
</small></p>
|
||||
<p><small>
|
||||
<a href="https://gitlab.com/gabmus/hugo-ficurinia">Ficurinia theme</a> for <a href="https://gohugo.io">Hugo</a> by <a href="https://gabmus.org">Gabriele Musco</a>.
|
||||
Licensed under <a href="https://www.gnu.org/licenses/agpl-3.0.html">GNU AGPLv3</a>.
|
||||
</small></p>
|
||||
</footer>
|
||||
23
layouts/partials/head.html
Normal file
23
layouts/partials/head.html
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=7">
|
||||
|
||||
{{ if .OutputFormats.Get "RSS" }}
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
<link href="{{ .Permalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
|
||||
<link href="{{ .Permalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<link rel="shortcut icon" href='{{ .Site.Params.favicon | default "/img/favicon.png" }}' type="image/x-icon" />
|
||||
|
||||
<title>
|
||||
{{ if ne .Title .Site.Title }}
|
||||
{{ .Title }} –
|
||||
{{ end }}
|
||||
{{ .Site.Title | default "Ficurinia" }}
|
||||
</title>
|
||||
<link href="/symbols-nerd-font/symbols-nerd-font.css" rel="stylesheet">
|
||||
<link href="/jetbrains-mono/jetbrains-mono.css" rel="stylesheet">
|
||||
{{ $style := resources.Get "/scss/style.scss" | resources.ExecuteAsTemplate "/scss/style.scss" . | resources.ToCSS (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" "true") | resources.Fingerprint "sha512" }}
|
||||
<link type=text/css rel=stylesheet href={{ $style.Permalink }} integrity="{{ $style.Data.Integrity }}" />
|
||||
27
layouts/partials/header.html
Normal file
27
layouts/partials/header.html
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<header>
|
||||
<div id="titleContainer">
|
||||
<img src='{{ .Site.Params.Logo | default "/img/icon.svg" }}' />
|
||||
<div>
|
||||
<h1>{{ .Site.Title | default "Ficurinia" }}</h1>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/posts">Posts</a></li>
|
||||
{{ $pagesDir := .Site.Params.Pages | default (slice "pages") }}
|
||||
{{ $pagesList := where .Site.RegularPages "Section" "in" $pagesDir }}
|
||||
{{ range $pagesList }}
|
||||
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
{{ if (.Site.Params.showTags | default true) }}
|
||||
<li><a href="/tags">Tags</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<div id="links">
|
||||
{{ range .Site.Params.links }}
|
||||
{{- partial "nerdlink" . -}}
|
||||
{{ end }}
|
||||
</div>
|
||||
</header>
|
||||
31
layouts/partials/nerdlink.html
Normal file
31
layouts/partials/nerdlink.html
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<a
|
||||
target="_blank"
|
||||
class="nerdlink"
|
||||
href="{{ index . 1 }}"
|
||||
title="{{ index . 0 }}">
|
||||
{{ if eq (lower (index . 0)) "gitlab" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "gnome" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "youtube" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "email" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "twitter" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "instagram" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "facebook" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "github" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "linkedin" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "telegram" }}
|
||||

|
||||
{{ else if eq (lower (index . 0)) "phone" }}
|
||||

|
||||
{{ else }}
|
||||
{{ index . 0 }}
|
||||
{{ end }}
|
||||
</a>
|
||||
Loading…
Add table
Add a link
Reference in a new issue