mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-10-05 00:46:02 +00:00
port to gitlab.
This commit is contained in:
47
themes/custom/layouts/_default/baseof.html
Normal file
47
themes/custom/layouts/_default/baseof.html
Normal file
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.Language }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>
|
||||
{{- block "title" . -}}
|
||||
{{ if .IsPage }}{{ .Title }} - {{ .Site.Title }}{{ else }}{{ .Site.Title }}{{ end }}
|
||||
{{- end -}}
|
||||
</title>
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
<body>
|
||||
{{ partial "slideout.html" . }}
|
||||
<header id="header" class="header">
|
||||
<div class="header-div">
|
||||
{{ partial "header.html" . }}
|
||||
</div>
|
||||
</header>
|
||||
{{/*
|
||||
{{ partial "search.html" . }}
|
||||
*/}}
|
||||
<div class="container" >
|
||||
<main id="main" class="main">
|
||||
<!-- sidebar -->
|
||||
{{ if or .IsHome .Params.sidebar }}
|
||||
{{ partial "sidebar.html" . }}
|
||||
{{ end }}
|
||||
<div class="content-wrapper" id="mobile-panel">
|
||||
<div id="content" class="content">
|
||||
{{ block "content" . }}{{ end }}
|
||||
</div>
|
||||
{{ partial "comments.html" . }}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer id="footer" class="footer">
|
||||
{{ partial "footer.html" . }}
|
||||
</footer>
|
||||
|
||||
<div class="back-to-top" id="back-to-top">
|
||||
<i class="iconfont icon-up"></i>
|
||||
</div>
|
||||
</div>
|
||||
{{ partial "scripts.html" . }}
|
||||
</body>
|
||||
</html>
|
25
themes/custom/layouts/_default/search.html
Normal file
25
themes/custom/layouts/_default/search.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{{ define "content" }}
|
||||
<section>
|
||||
<div class="query-div">
|
||||
<span class="query-icon" id="query-icon">
|
||||
<i class="fa fa-search"></i>
|
||||
</span>
|
||||
<div class="query-input">
|
||||
<input id="search-query" name="s" class="search-query" placeholder="请输入要搜索的文字..." />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="search-results">
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- this template is sucked in by search.js and appended to the search-results div above. So editing here will adjust style -->
|
||||
<script id="search-result-template" type="text/x-js-template">
|
||||
<li id="summary-${key}">
|
||||
<a href="${link}/" class="search-result-title">${title}</a>
|
||||
<a href="${link}">
|
||||
<p class="search-result">${snippet}</p>
|
||||
</a>
|
||||
</li>
|
||||
</script>
|
||||
{{ end }}
|
50
themes/custom/layouts/_default/section.html
Normal file
50
themes/custom/layouts/_default/section.html
Normal file
@@ -0,0 +1,50 @@
|
||||
{{ define "title" }}{{ T "archive" }} - {{ .Site.Title }}{{ end }}
|
||||
|
||||
{{ define "content"}}
|
||||
{{- $paginator := .Paginate (where .Data.Pages.ByDate.Reverse "Type" "post") .Site.Params.archivePaginate }}
|
||||
<section id="archive" class="archive">
|
||||
{{- if not $paginator.HasPrev }}
|
||||
<div class="archive-title">
|
||||
<span class="archive-post-counter">
|
||||
{{ T "archiveCounter" (len .Data.Pages) }}
|
||||
</span>
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
{{- range $index, $element := $paginator.Pages -}}
|
||||
{{- $thisYear := $element.Date.Format "2006" }}
|
||||
{{- $lastElement := $index | add -1 | index $paginator.Pages }}
|
||||
{{ if or (eq $index 0) ( ne ($lastElement.Date.Format "2006") $thisYear ) }}
|
||||
<div class="collection-title">
|
||||
<h2 class="archive-year">{{ $thisYear }}</h2>
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
<div class="archive-post">
|
||||
<span class="archive-post-time">
|
||||
{{ $element.Date.Format "01-02" }}
|
||||
</span>
|
||||
<span class="archive-post-title">
|
||||
<a href="{{ $element.URL }}" class="archive-post-link">
|
||||
{{ .Title }}
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
{{- end -}}
|
||||
</section>
|
||||
<!-- pagination -->
|
||||
<nav class="pagination">
|
||||
{{ with $paginator.Prev -}}
|
||||
<a class="prev" href="{{ .URL }}">
|
||||
<i class="iconfont icon-left"></i>
|
||||
<span class="prev-text">{{ T "prevPage" }}</span>
|
||||
</a>
|
||||
{{- end }}
|
||||
{{ with $paginator.Next -}}
|
||||
<a class="next" href="{{ .URL }}">
|
||||
<span class="next-text">{{ T "nextPage" }}</span>
|
||||
<i class="iconfont icon-right"></i>
|
||||
</a>
|
||||
{{- end }}
|
||||
</nav>
|
||||
{{ end }}
|
7
themes/custom/layouts/_default/single.html
Normal file
7
themes/custom/layouts/_default/single.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{{ define "content" -}}
|
||||
<article class="post">
|
||||
<div class="post-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
{{- end }}
|
1
themes/custom/layouts/_default/single.md
Normal file
1
themes/custom/layouts/_default/single.md
Normal file
@@ -0,0 +1 @@
|
||||
{{ .RawContent }}
|
46
themes/custom/layouts/_default/taxonomy.html
Normal file
46
themes/custom/layouts/_default/taxonomy.html
Normal file
@@ -0,0 +1,46 @@
|
||||
{{ define "title" }}{{ .Title }} · {{ .Site.Title }}{{ end }}
|
||||
|
||||
{{ define "content"}}
|
||||
{{ $paginator := .Paginate (where .Data.Pages.ByDate.Reverse "Type" "post") .Site.Params.archivePaginate }}
|
||||
<section id="archive" class="archive">
|
||||
{{ if not $paginator.HasPrev }}
|
||||
{{ if eq .Data.Plural "tags" }}
|
||||
<div class="archive-title tag">
|
||||
<h2 class="archive-name">{{ .Title }}</h2>
|
||||
</div>
|
||||
{{ else if eq .Data.Plural "categories" }}
|
||||
<div class="archive-title category">
|
||||
<h2 class="archive-name">{{ .Title }}</h2>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ range $paginator.Pages }}
|
||||
<div class="archive-post">
|
||||
<span class="archive-post-time">
|
||||
{{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }}
|
||||
</span>
|
||||
<span class="archive-post-title">
|
||||
<a href="{{ .URL }}" class="archive-post-link">
|
||||
{{ .Title }}
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
{{ end }}
|
||||
</section>
|
||||
<!-- pagination -->
|
||||
<nav class="pagination">
|
||||
{{ with $paginator.Prev }}
|
||||
<a class="prev" href="{{ .URL }}">
|
||||
<i class="iconfont icon-left"></i>
|
||||
<span class="prev-text">{{ T "prevPage" }}</span>
|
||||
</a>
|
||||
{{- end }}
|
||||
{{ with $paginator.Next }}
|
||||
<a class="next" href="{{ .URL }}">
|
||||
<span class="next-text">{{ T "nextPage" }}</span>
|
||||
<i class="iconfont icon-right"></i>
|
||||
</a>
|
||||
{{- end }}
|
||||
</nav>
|
||||
{{ end }}
|
44
themes/custom/layouts/_default/terms.html
Normal file
44
themes/custom/layouts/_default/terms.html
Normal file
@@ -0,0 +1,44 @@
|
||||
{{ define "title" }}{{ T .Data.Plural }} - {{ .Site.Title }}{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
{{ $name := .Data.Plural -}}
|
||||
{{ $terms := .Data.Terms.ByCount -}}
|
||||
{{ $length := len $terms -}}
|
||||
{{ if eq $name "categories" }}
|
||||
<div class="categories">
|
||||
<div class="categories-title">
|
||||
{{ if eq $length 0 }}
|
||||
{{ T "zeroCategoryCounter" }}
|
||||
{{ else }}
|
||||
{{ T "categoryCounter" $length }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="categories-tags">
|
||||
{{ range $key, $value := $terms }}
|
||||
<a class="category-link" href="{{ $name | relLangURL }}/{{ $value.Term | urlize }}/">
|
||||
{{ $value.Term }}
|
||||
<span class="category-count">{{ len $value.Pages }}</span>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ else if eq $name "tags" }}
|
||||
<div class="tag-cloud">
|
||||
<div class="tag-cloud-title">
|
||||
{{ if eq $length 0 }}
|
||||
{{ T "zeroTagCounter" }}
|
||||
{{ else }}
|
||||
{{ T "tagCounter" $length }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="tag-cloud-tags">
|
||||
{{ range $key, $value := $terms }}
|
||||
<a href="{{ $name | relLangURL }}/{{ $value.Term | urlize }}/">
|
||||
{{ $value.Term }}
|
||||
<span class="tag-count">{{ len $value.Pages }}</span>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
Reference in New Issue
Block a user