Initiate new theme

This commit is contained in:
Avijit 🚀
2021-05-24 14:00:06 +02:00
parent a4d7d1215b
commit 6d14eab549
45 changed files with 44 additions and 1559 deletions

View File

@@ -1,53 +0,0 @@
<!DOCTYPE html>
<html>
{{ partial "header.html" . }}
<body>
<div class="container wrapper list">
{{ partial "head.html" . }}
{{ if isset .Data "Term" }}
<h2>{{ .Data.Term }}</h2>
{{ else }}
<h2 class="page-title">{{ .Name }}</h2>
{{ end }}
{{ .Content }}
<ul class="posts flat">
{{- range .Data.Pages -}}
{{- if (in (.Site.Params.excludedTypes | default (slice "page")) .Type) -}}
{{- else -}}
<li class="post">
<div class="post-header">
<div class="meta">
<div class="date">
<span class="day">{{ dateFormat "02" .Date }}</span>
<span class="rest">{{ if $.Site.Data.month }}{{ index $.Site.Data.month (printf "%d" .Date.Month) }} {{ .Date.Year }}{{ else }}{{ dateFormat "Jan 2006" .Date }}{{ end }}</span>
</div>
</div>
<div class="matter">
<h4 class="title small">
<a href="{{ .RelPermalink }}">{{.Title}}{{ if .Draft }}<sup class="draft-label">DRAFT</sup>{{ end }}</a>
</h4>
<span class="description">
{{ if isset .Params "description" }}
{{ .Description }}
{{ else if gt (countrunes .RawContent) 120 }}
{{ slicestr .RawContent 0 120 }}...
{{ else }}
{{ .RawContent }}
{{ end }}
</span>
</div>
</div>
</li>
{{- end -}}
{{- end -}}
</ul>
</div>
{{ partial "footer.html" . }}
</body>
</html>

View File

@@ -1,60 +0,0 @@
<!DOCTYPE html>
<html>
{{ partial "header.html" . }}
<body>
<div class="container wrapper">
{{ partial "head.html" . }}
<div class="post">
<div class="post-header">
{{ if ne .Date.Year 1 }}
<div class="meta">
<div class="date">
<span class="day">{{ dateFormat "02" .Date }}</span>
<span class="rest">{{ if $.Site.Data.month }}{{ index $.Site.Data.month (printf "%d" .Date.Month) }} {{ .Date.Year }}{{ else }}{{ dateFormat "Jan 2006" .Date }}{{ end }}</span>
</div>
</div>
{{ end }}
<div class="matter">
<h1 class="title">{{ .Title }}</h1>
</div>
</div>
<div class="markdown">
{{ .Content }}
</div>
<div class="tags">
{{ if ne .Type "page" }}
{{ if gt .Params.tags 0 }}
<ul class="flat">
{{ range .Params.tags }}
<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ end }}
</div>
{{- if .Site.DisqusShortname -}}
{{- $.Scratch.Set "isDisqus" true -}}
{{- if and (isset .Params "type") (in .Site.Params.disableDisqusTypes .Params.type) -}}
{{- $.Scratch.Set "isDisqus" false -}}
{{- end -}}
{{- if and (isset .Params "disqus") (eq .Params.disqus false) -}}
{{- $.Scratch.Set "isDisqus" false -}}
{{- else if and (isset .Params "disqus") (eq .Params.disqus true) -}}
{{- $.Scratch.Set "isDisqus" true -}}
{{- end -}}
{{- if eq ($.Scratch.Get "isDisqus") true -}}
{{- partial "disqus.html" . -}}
{{- end -}}
{{- end -}}
</div>
</div>
{{ partial "footer.html" . }}
</body>
</html>

View File

@@ -1,23 +0,0 @@
<!DOCTYPE html>
<html>
{{ partial "header.html" . }}
<body>
<div class="container wrapper tags">
{{ partial "head.html" . }}
<h1 class="page-title">{{ .Title }}</h1>
{{ with (.Site.GetPage .Title) }}
<ul>
{{ range .Pages }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}
</div>
{{ partial "footer.html" . }}
</body>
</html>

View File

@@ -1,30 +0,0 @@
<!DOCTYPE html>
<html>
{{ partial "header.html" . }}
<body>
<div class="container wrapper tags">
{{ partial "head.html" . }}
<h1 class="page-title">{{ .Name }}</h1>
{{ $biggest := 1 }}
{{ $smallest := 1 }}
{{ $max := 3 }}
{{ $min := 1 }}
{{ $size := $min }}
{{ $data := .Data }}
<div class="tag-cloud">
{{ range $key, $value := .Data.Terms.ByCount }}
{{ $size := (add (mul (div $value.Count $biggest) (sub $max $min)) $min) }}
{{ $size := (cond (eq $biggest $smallest) $min $size) }}
<a style="font-size: {{ $size }}rem;" href="{{ $.Site.LanguagePrefix | absURL }}{{ $data.Plural }}/{{ $value.Name | urlize }}/">{{ $value.Name }}<sup>{{ $value.Count }}</sup></a>
{{ end }}
</div>
</div>
{{ partial "footer.html" . }}
</body>
</html>