summaryrefslogtreecommitdiff
path: root/themes/new_theme/layouts/_default
diff options
context:
space:
mode:
Diffstat (limited to 'themes/new_theme/layouts/_default')
-rw-r--r--themes/new_theme/layouts/_default/baseof.html58
-rw-r--r--themes/new_theme/layouts/_default/list.html85
-rw-r--r--themes/new_theme/layouts/_default/single.html66
-rw-r--r--themes/new_theme/layouts/_default/summary.html32
4 files changed, 135 insertions, 106 deletions
diff --git a/themes/new_theme/layouts/_default/baseof.html b/themes/new_theme/layouts/_default/baseof.html
new file mode 100644
index 0000000..7c826a0
--- /dev/null
+++ b/themes/new_theme/layouts/_default/baseof.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<html class="no-js" lang="{{ .Site.Language.Lang }}">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <title>{{ block "title" . }}{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ .Site.Title }}{{ end }}</title>
+ <script>(function(d,e){d[e]=d[e].replace("no-js","js");})(document.documentElement,"className");</script>
+ <meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Params.Description }}{{ end }}">
+ {{- if .Site.Params.opengraph }}
+ {{ template "_internal/opengraph.html" . }}
+ {{- end }}
+ {{- if .Site.Params.schema }}
+ {{ template "_internal/schema.html" . }}
+ {{- end }}
+ {{- if .Site.Params.twitter_cards }}
+ {{ template "_internal/twitter_cards.html" . }}
+ {{- end }}
+ <link rel="dns-prefetch" href="//fonts.bunny.net">
+ {{ with .OutputFormats.Get "rss" -}}
+ {{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
+ {{ end -}}
+ <script src="/js/jquery.js" type="text/javascript"></script>
+ <link rel="stylesheet" href="https://fonts.bunny.net/css?family=Open+Sans:400,400i,700">
+ {{ $style := resources.Get "css/style.css" | resources.ExecuteAsTemplate "css/style.css" . -}}
+ <link rel="stylesheet" href="{{ $style.RelPermalink }}">
+ {{ range .Site.Params.customCSS -}}
+ <link rel="stylesheet" href="{{ . | relURL }}">
+ {{- end }}
+ <link rel="shortcut icon" href="{{ "favicon.ico" | relURL }}">
+ {{- if not .Site.IsServer }}
+ {{ template "_internal/google_analytics.html" . }}
+ {{- end }}
+</head>
+<body class="body">
+ <div class="container container--outer">
+ {{ partial "header" . }}
+ <div class="wrapper flex">
+ <div class="primary">
+ {{ block "main" . }}
+ {{ with .Content }}
+ <div class="content main__content clearfix">
+ {{ . }}
+ </div>
+ {{ end }}
+ {{ end }}
+ </div>
+ {{ partial "sidebar.html" . }}
+ </div>
+ {{ partial "footer" . }}
+ </div>
+<script async defer src="{{ "js/menu.js" | relURL }}"></script>
+{{ range .Site.Params.customJS -}}
+<script src="{{ . | relURL }}"></script>
+{{- end }}
+{{- partial "mathjax.html" . -}}
+</body>
+</html>
diff --git a/themes/new_theme/layouts/_default/list.html b/themes/new_theme/layouts/_default/list.html
index 2bc036c..4816514 100644
--- a/themes/new_theme/layouts/_default/list.html
+++ b/themes/new_theme/layouts/_default/list.html
@@ -1,67 +1,22 @@
-{{ partial "header.html" . }}
-
-{{ $section := .Section }}
-
-{{ if and ( ne $section "blog" ) ( ne $section "" ) }}
-<div class="main-content content" role="main" itemprop="mainContentOfPage">
- <article class="post">
- <header class="post__header clearfix">
- <h1 class="post__title">{{ .Title }}</h1>
- </header>
- <div class="post__content clearfix">
- {{ if ( eq $section "search" ) }}
- {{ partial "ranklist.html" . }}
- {{ .Content }}
- {{ else }}
- {{ .Content }}
- {{ end }}
- </div>
- </article>
-</div>
-{{ else }}
- <div class="main-content loop content" role="main">
- {{- if not .IsHome }}
- <header class="page-header">
- <h1 class="page-header__title">{{ .Title }}</h1>
- </header>
- {{- end }}
- {{- range .Pages }}
- <article class="loop__item post clearfix">
- {{- if .Params.thumbnail }}
- <figure class="loop__thumbnail">
- <a href="{{ .Permalink }}">
- <img src="{{ .Params.thumbnail | absURL }}" alt="{{ .Title }}" />
- </a>
- </figure>
- {{- end }}
- <div class="loop__content clearfix">
- <header class="loop__header">
- <h3 class="loop__title post__title ">
- <a href="{{ .Permalink }}" rel="bookmark">{{ .Title }}</a>
- </h3>
- <div class="loop__meta meta">
- <svg class="icon icon-time" height="14" viewBox="0 0 16 16" width="14" xmlns="http://www.w3.org/2000/svg"><path d="m8-.0000003c-4.4 0-8 3.6-8 8 0 4.4000003 3.6 8.0000003 8 8.0000003 4.4 0 8-3.6 8-8.0000003 0-4.4-3.6-8-8-8zm0 14.4000003c-3.52 0-6.4-2.88-6.4-6.4000003 0-3.52 2.88-6.4 6.4-6.4 3.52 0 6.4 2.88 6.4 6.4 0 3.5200003-2.88 6.4000003-6.4 6.4000003zm.4-10.4000003h-1.2v4.8l4.16 2.5600003.64-1.04-3.6-2.1600003z"/></svg>
- <time class="loop__meta-date" datetime="{{ .Date }}">{{.Date.Format "January 02, 2006"}}</time>
- {{- if .Params.categories }}
- <span class="post__meta-categories meta-categories">
- <svg class="icon icon-category" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7 2l1 2h8v11h-16v-13z"/></svg>
- {{ range $index, $category := .Params.categories }}{{ if gt $index 0 }}, {{ end }}<a class="meta-categories__link" href="{{ "/categories/" | relLangURL }}{{ . | urlize | lower }}" rel="category">{{ . }}</a>{{ end }}</span>
- {{- end }}
- </div>
- </header>
- <div class="loop__excerpt post__content">
- {{ .Summary }}
- </div>
- <div class="post__content">
- <a href="{{ .URL }}">View full post</a>
- </div>
- </div>
- </article>
- {{- end }}
-
- {{ partial "pagination.html" . }}
+{{ define "main" }}
+<main class="main list" role="main">
+ {{- with .Title }}
+ <header class="main__header">
+ <h1 class="main__title">{{ . }}</h1>
+ </header>
+ {{- end }}
+ {{- with .Content }}
+ <div class="content main__content clearfix">
+ {{ . }}
+ {{ partial "ranklist_fts5.html" . }}
</div>
+ {{- end }}
+ {{ $section := .Section }}
+ {{- if or ( eq $section "blog" ) ( eq $section "" ) ( eq $section "categories" ) }}
+ {{- range .Paginator.Pages }}
+ {{- .Render "summary" }}
+ {{- end }}
+ {{- end }}
+</main>
+{{ partial "pagination.html" . }}
{{ end }}
-
-{{ partial "sidebar.html" . }}
-{{ partial "footer.html" . }}
diff --git a/themes/new_theme/layouts/_default/single.html b/themes/new_theme/layouts/_default/single.html
index 77fbd4a..9c84ca4 100644
--- a/themes/new_theme/layouts/_default/single.html
+++ b/themes/new_theme/layouts/_default/single.html
@@ -1,48 +1,32 @@
-{{ partial "header.html" . }}
-
-{{ $section := .Section }}
-
-{{ if ne $section "blog" }}
-<div class="main-content content" role="main" itemprop="mainContentOfPage">
+{{ define "main" }}
+<main class="main" role="main">
<article class="post">
- <header class="post__header clearfix">
+ <header class="post__header">
<h1 class="post__title">{{ .Title }}</h1>
- </header>
- <div class="post__content clearfix">
- {{ .Content }}
- </div>
- </article>
-</div>
-{{ else }}
-<div class="main-content content" role="main" itemprop="mainContentOfPage">
- <article class="post">
- <header class="post__header clearfix">
- <h1 class="post__title">{{ .Title }}</h1>
- <p class="post__meta meta">
- <svg class="icon icon-time" height="14" viewBox="0 0 16 16" width="14" xmlns="http://www.w3.org/2000/svg"><path d="m8-.0000003c-4.4 0-8 3.6-8 8 0 4.4000003 3.6 8.0000003 8 8.0000003 4.4 0 8-3.6 8-8.0000003 0-4.4-3.6-8-8-8zm0 14.4000003c-3.52 0-6.4-2.88-6.4-6.4000003 0-3.52 2.88-6.4 6.4-6.4 3.52 0 6.4 2.88 6.4 6.4 0 3.5200003-2.88 6.4000003-6.4 6.4000003zm.4-10.4000003h-1.2v4.8l4.16 2.5600003.64-1.04-3.6-2.1600003z"/></svg>
- <time class="post__meta-date" datetime="{{ .Date }}">{{.Date.Format "January 02, 2006"}}</time>
- {{- if .Params.categories }}
- <span class="post__meta-categories meta-categories">
- <svg class="icon icon-category" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7 2l1 2h8v11h-16v-13z"/></svg>
- {{ range $index, $category := .Params.categories }}{{ if gt $index 0 }}, {{ end }}<a class="meta-categories__link" href="{{ "/categories/" | relLangURL }}{{ . | urlize | lower }}" rel="category">{{ . }}</a>{{ end }}</span>
- {{- end }}
- </p>
- </header>
- <div class="post__content clearfix">
- {{- if .Params.thumbnail }}
- <figure class="post__thumbnail">
- <img src="{{ .Params.thumbnail | absURL }}" alt="{{ .Title }}">
- </figure>
+ {{- with .Params.lead }}
+ <p class="post__lead">{{ . }}</p>
{{- end }}
+ {{ with partial "post_meta.html" . -}}
+ <div class="post__meta meta">{{ . }}</div>
+ {{- end }}
+ </header>
+ {{- if .Params.thumbnail }}
+ <figure class="post__thumbnail">
+ <img src="{{ .Params.thumbnail | relURL }}" alt="{{ .Title }}">
+ </figure>
+ {{- end }}
+ {{- partial "post_toc.html" . -}}
+ <div class="content post__content clearfix">
{{ .Content }}
</div>
- {{ partial "post_tags.html" . }}
+ {{- if .Params.tags }}
+ <footer class="post__footer">
+ {{ partial "post_tags.html" . }}
+ </footer>
+ {{- end }}
</article>
- {{ partial "authorbox.html" . }}
- {{ partial "post_nav.html" . }}
- {{ partial "comments.html" . }}
-</div>
+</main>
+{{ partial "authorbox.html" . }}
+{{ partial "pager.html" . }}
+{{ partial "comments.html" . }}
{{ end }}
-
-{{ partial "sidebar.html" . }}
-{{ partial "footer.html" . }}
diff --git a/themes/new_theme/layouts/_default/summary.html b/themes/new_theme/layouts/_default/summary.html
new file mode 100644
index 0000000..df7428d
--- /dev/null
+++ b/themes/new_theme/layouts/_default/summary.html
@@ -0,0 +1,32 @@
+<article class="list__item post">
+ {{- if .Params.thumbnail }}
+ <figure class="list__thumbnail">
+ <a href="{{ .Permalink }}">
+ <img src="{{ .Params.thumbnail | relURL }}" alt="{{ .Title }}" />
+ </a>
+ </figure>
+ {{- end }}
+ <header class="list__header">
+ <h3 class="list__title post__title ">
+ <a href="{{ .RelPermalink }}" rel="bookmark">
+ {{ .Title }}
+ </a>
+ </h3>
+ {{- with .Params.lead }}
+ <p class="list__lead post__lead">{{ . }}</p>
+ {{- end }}
+ {{ with partial "post_meta.html" . -}}
+ <div class="list__meta meta">{{ . }}</div>
+ {{- end }}
+ </header>
+ <div class="content list__excerpt post__content clearfix">
+ {{ .Summary }}
+ </div>
+ {{- if .Site.Params.readmore }}
+ {{- if .Truncated }}
+ <div class="list__footer clearfix">
+ <a class="list__footer-readmore btn" href="{{ .RelPermalink }}">{{ T "read_more" }}</a>
+ </div>
+ {{- end }}
+ {{- end }}
+</article> \ No newline at end of file