added cactus theme files
This commit is contained in:
20
hugo-content/themes/cactus/layouts/_default/baseof.html
Normal file
20
hugo-content/themes/cactus/layouts/_default/baseof.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
{{ partial "head.html" . }}
|
||||
<body class="max-width mx-auto px3 ltr">
|
||||
<div class="content index py4">
|
||||
|
||||
{{ partial "header.html" . }}
|
||||
|
||||
{{ block "main" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "footer.html" . }}
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<link rel="stylesheet" href={{ "lib/font-awesome/css/all.min.css" | relURL }}>
|
||||
<script src={{ "lib/jquery/jquery.min.js" | relURL }}></script>
|
||||
<script src={{ "js/main.js" | relURL }}></script>
|
||||
</html>
|
||||
30
hugo-content/themes/cactus/layouts/_default/list.html
Normal file
30
hugo-content/themes/cactus/layouts/_default/list.html
Normal file
@@ -0,0 +1,30 @@
|
||||
{{ define "main"}}
|
||||
<div id="archive">
|
||||
<ul class="post-list">
|
||||
|
||||
{{ $pages := .Paginator.Pages }}
|
||||
{{ if .Site.Params.showAllPostsArchive }}
|
||||
{{ $pages = .Pages }}
|
||||
{{ end }}
|
||||
|
||||
{{ range (sort $pages "Date" "desc") }}
|
||||
{{ $pageYear := (.Date.Format "2006") }}
|
||||
{{ if (ne $pageYear ($.Scratch.Get "year")) }}
|
||||
{{ $.Scratch.Set "year" $pageYear }}
|
||||
<h2>{{ $pageYear }}</h2>
|
||||
{{ end }}
|
||||
<li class="post-item">
|
||||
<div class="meta">
|
||||
<time datetime="{{ time .Date }}" itemprop="datePublished">{{ .Date.Format (.Site.Params.dateFormat | default "2006-01-02") }}</time>
|
||||
</div>
|
||||
<span>
|
||||
<a class="" href="{{ .Permalink }}">{{ if .Title }} {{ .Title }} {{ else }} Untitled {{ end }}</a>
|
||||
</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ if eq .Site.Params.showAllPostsArchive false }}
|
||||
{{ partial "pagination.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
12
hugo-content/themes/cactus/layouts/_default/single.html
Normal file
12
hugo-content/themes/cactus/layouts/_default/single.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{{ define "main" }}
|
||||
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
|
||||
<!-- TODO: gallery -->
|
||||
<div class="content" itemprop="articleBody">
|
||||
{{ if (eq .Type "search") }}
|
||||
<!-- TODO: search https://gohugo.io/tools/search/ -->
|
||||
{{ else }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
41
hugo-content/themes/cactus/layouts/_default/terms.html
Normal file
41
hugo-content/themes/cactus/layouts/_default/terms.html
Normal file
@@ -0,0 +1,41 @@
|
||||
{{ define "main" }}
|
||||
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
|
||||
<div class="content" itemprop="articleBody">
|
||||
{{ if (eq .Type "tags")}}
|
||||
<div id="tag-cloud">
|
||||
{{ if (eq (len .Data.Terms) 0) }}
|
||||
<div class="tag-cloud-title">
|
||||
No tags
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="tag-cloud-tags">
|
||||
{{ $AllRegularPagesCount := len .Site.RegularPages }}
|
||||
{{ range $elem := .Data.Terms.Alphabetical }}
|
||||
<a style="font-size: {{ (add 0.8 (mul 15 (div (float $elem.Count) $AllRegularPagesCount))) }}rem;" href="{{ $elem.Page.Permalink }}">
|
||||
{{- .Page.Title -}}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ else if (eq .Type "categories")}}
|
||||
<div id="categories">
|
||||
{{ if (eq (len .Data.Terms) 0) }}
|
||||
<div class="category-list-title">
|
||||
No categories
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="category-list">
|
||||
<ul class="category-list">
|
||||
{{ range .Data.Terms.Alphabetical }}
|
||||
<li class="category-list-item">
|
||||
<a class="category-list-link" href="{{ .Page.Permalink }}">{{ .Page.Title }}</a>
|
||||
<span class="category-list-count">{{ .Count }}</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user