mirror of
https://github.com/foo-dogsquared/website.git
synced 2025-02-07 12:19:36 +00:00
Update the layouts
This commit is contained in:
parent
6623436f9d
commit
3572a3506b
7
layouts/404.html
Normal file
7
layouts/404.html
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{{ define "main"}}
|
||||||
|
<main id="main">
|
||||||
|
<div>
|
||||||
|
<h1 id="title"><a href="{{ "/" | relURL }}">Go Home</a></h1>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
{{ end }}
|
63
layouts/_default/list.html
Normal file
63
layouts/_default/list.html
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
{{ .Content }}
|
||||||
|
<div class="posts">
|
||||||
|
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
|
||||||
|
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
|
||||||
|
{{ $paginator := .Paginate (where .Data.Pages "Type" $contentTypeName) }}
|
||||||
|
|
||||||
|
{{ $blogIcons := "blog-icons.svg" | absURL }}
|
||||||
|
{{ range .Data.Pages }}
|
||||||
|
<div class="post on-list">
|
||||||
|
<div class="post-header-wrapper">
|
||||||
|
<h1 class="post-title">
|
||||||
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||||
|
</h1>
|
||||||
|
{{ with .File }}
|
||||||
|
<svg class="post-type">
|
||||||
|
{{ $isFolder := or (eq .BaseFileName "_index") (eq .BaseFileName "")}}
|
||||||
|
{{ $contentType := cond $isFolder "folder" "file" }}
|
||||||
|
<use xlink:href="{{ $blogIcons }}#{{ $contentType }}"></use>
|
||||||
|
</svg>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
<div class="post-meta">
|
||||||
|
<span class="post-date">
|
||||||
|
{{ .Date.Format "2006-01-02" }}
|
||||||
|
</span>
|
||||||
|
{{ with .Params.Author }}<span class="post-author">::
|
||||||
|
{{ . }}</span>{{ end }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ if .Params.tags }}
|
||||||
|
<span class="post-tags">
|
||||||
|
{{ range .Params.tags }}
|
||||||
|
#<a href="{{ (urlize (printf "tags/%s/" . )) | absLangURL }}">
|
||||||
|
{{- . -}}
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
</span>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ with .Params.Cover }}
|
||||||
|
<img src="{{ . | absURL }}" class="post-cover" />
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<div class="post-content">
|
||||||
|
{{ if .Description }}
|
||||||
|
{{ .Description | markdownify }}
|
||||||
|
{{ else }}
|
||||||
|
{{ .Summary | markdownify }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ if not .Params.showFullContent }}
|
||||||
|
<div>
|
||||||
|
<a class="read-more button"
|
||||||
|
href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
{{ partial "pagination.html" . }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
27
layouts/partials/footer.html
Normal file
27
layouts/partials/footer.html
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<footer>
|
||||||
|
{{ with $.Site.Params.blog }}
|
||||||
|
{{ $social_icons := "social-icons.svg" | absURL }}
|
||||||
|
<div class="social-icons">
|
||||||
|
{{ range .contact }}
|
||||||
|
<a href="{{ .link }}" target="_blank">
|
||||||
|
<svg>
|
||||||
|
<use xlink:href="{{ $social_icons }}#{{ .name | urlize }}"></use>
|
||||||
|
</svg></a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
{{ if $.Site.Copyright }}
|
||||||
|
<div class="copyright copyright--user">{{ $.Site.Copyright | safeHTML }}</div>
|
||||||
|
{{else}}
|
||||||
|
<div class="copyright">
|
||||||
|
<span>© {{ now.Year }} Powered by <a href="http://gohugo.io">Hugo</a></span>
|
||||||
|
<span>:: Theme made by <a href="https://twitter.com/panr">panr</a></span>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script src="{{ "assets/main.js" | absURL }}"></script>
|
||||||
|
<script src="{{ "assets/prism.js" | absURL }}"></script>
|
||||||
|
|
||||||
|
<!-- Extended footer section-->
|
||||||
|
{{ partial "extended_footer.html" . }}
|
Loading…
Reference in New Issue
Block a user