Merge branch 'master' into template-search

This commit is contained in:
Jimmy Cai 2020-10-17 10:45:17 +02:00 committed by GitHub
commit c666c79800
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 81 additions and 72 deletions

View File

@ -1,15 +1,5 @@
.archives-group { .archives-group {
margin-bottom: var(--section-separation); margin-bottom: var(--section-separation);
.archives-date {
text-transform: uppercase;
margin-bottom: 10px;
font-size: 1.6rem;
font-weight: bold;
a {
color: var(--body-text-color);
}
}
} }
.template-archives { .template-archives {

View File

@ -1,11 +1,3 @@
.taxonomy-type {
text-transform: uppercase;
color: var(--body-text-color);
font-weight: bold;
margin-bottom: 5px;
font-size: 1.6rem;
}
.taxonomy-card { .taxonomy-card {
border-radius: var(--card-border-radius); border-radius: var(--card-border-radius);
background-color: var(--card-background); background-color: var(--card-background);

View File

@ -1,13 +1,4 @@
.widget { .widget {
.widget-title {
text-transform: uppercase;
color: var(--body-text-color);
font-weight: bold;
margin: 0;
margin-bottom: 10px;
font-size: 1.6rem;
}
.widget-icon { .widget-icon {
svg { svg {
width: 32px; width: 32px;
@ -45,27 +36,26 @@
/* Archives widget */ /* Archives widget */
.widget.archives { .widget.archives {
.archives-year { .widget-archive--list {
margin-bottom: 10px;
a {
background-color: var(--card-background);
padding: 15px 25px;
border-radius: var(--card-border-radius); border-radius: var(--card-border-radius);
box-shadow: var(--shadow-l1); box-shadow: var(--shadow-l1);
display: flex; background-color: var(--card-background);
transition: box-shadow 0.3s ease;
&:hover {
box-shadow: var(--shadow-l2);
} }
@media (max-width: $on-desktop-large) { .archives-year {
&:not(:last-of-type) {
border-bottom: 1.5px solid var(--card-separator-color);
}
a {
font-size: 1.4rem; font-size: 1.4rem;
} padding: 18px 25px;
display: flex;
span.year { span.year {
flex: 1; flex: 1;
color: var(--card-text-color-main); color: var(--card-text-color-main);
font-weight: bold;
} }
span.count { span.count {

View File

@ -42,3 +42,17 @@ a {
} }
} }
} }
.section-title {
text-transform: uppercase;
margin-top: 0;
margin-bottom: 10px;
display: block;
font-size: 1.6rem;
font-weight: bold;
color: var(--body-text-color);
a {
color: var(--body-text-color);
}
}

23
i18n/ja.toml Normal file
View File

@ -0,0 +1,23 @@
[toggleMenu]
other = "メニューを開く・閉じる"
[relatedContents]
other = "関連するコンテンツ"
[lastUpdatedOn]
other = "最終更新"
[widgetArchivesTitle]
other = "アーカイブ"
[widgetArchivesMore]
other = "さらに見る"
[widgetTagCloudTitle]
other = "タグ"
[notFoundTitle]
other = "404 Not Found"
[notFoundSubtitle]
other = "指定されたページは存在しません。"

View File

@ -2,8 +2,7 @@
{{ define "main" }} {{ define "main" }}
{{ $categories := ($.Site.GetPage "taxonomyTerm" "categories").Pages }} {{ $categories := ($.Site.GetPage "taxonomyTerm" "categories").Pages }}
{{ if $categories }} {{ if $categories }}
<div class="widget"> <h2 class="section-title">Categories</h2>
<h1 class="widget-title">Categories</h1>
<div class="category-list"> <div class="category-list">
<div class="article-list--tile"> <div class="article-list--tile">
{{ range $categories }} {{ range $categories }}
@ -11,7 +10,6 @@
{{ end }} {{ end }}
</div> </div>
</div> </div>
</div>
{{ end }} {{ end }}
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
@ -21,7 +19,7 @@
{{ range $filtered.GroupByDate "2006" }} {{ range $filtered.GroupByDate "2006" }}
{{ $id := lower (replace .Key " " "-") }} {{ $id := lower (replace .Key " " "-") }}
<div class="archives-group" id="{{ $id }}"> <div class="archives-group" id="{{ $id }}">
<h3 class="archives-date"><a href="{{ $.Permalink }}#{{ $id }}">{{ .Key }}</a></h3> <h2 class="archives-date section-title"><a href="{{ $.Permalink }}#{{ $id }}">{{ .Key }}</a></h2>
<div class="article-list--compact"> <div class="article-list--compact">
{{ range .Pages }} {{ range .Pages }}
{{ partial "article-list/compact" . }} {{ partial "article-list/compact" . }}

View File

@ -1,5 +1,5 @@
{{ define "main" }} {{ define "main" }}
<h3 class="taxonomy-type">{{ .Type | singularize | humanize }}</h3> <h3 class="taxonomy-type section-title">{{ .Type | singularize | humanize }}</h3>
<div class="taxonomy-card"> <div class="taxonomy-card">
<div class="taxonomy-details"> <div class="taxonomy-details">
<h3 class="taxonomy-count">{{ len .Pages }} post{{ if gt (len .Pages) 1 }}s{{ end }}</h3> <h3 class="taxonomy-count">{{ len .Pages }} post{{ if gt (len .Pages) 1 }}s{{ end }}</h3>

View File

@ -15,5 +15,5 @@
{{ end }} {{ end }}
{{ define "right-sidebar" }} {{ define "right-sidebar" }}
{{ partialCached "sidebar/right.html" . }} {{ partial "sidebar/right.html" . }}
{{ end }} {{ end }}

View File

@ -1,7 +1,7 @@
<aside class="widget related-contents--wrapper"> <aside class="related-contents--wrapper">
{{ $related := .Site.RegularPages.Related . | first 5 }} {{ $related := .Site.RegularPages.Related . | first 5 }}
{{ with $related }} {{ with $related }}
<h1 class="widget-title">{{ T "relatedContents" }}</h1> <h2 class="section-title">{{ T "relatedContents" }}</h2>
<div class="related-contents"> <div class="related-contents">
<div class="flex article-list--tile"> <div class="flex article-list--tile">
{{ range . }} {{ range . }}

View File

@ -2,13 +2,14 @@
<div class="widget-icon"> <div class="widget-icon">
{{ partial "helper/icon" "infinity" }} {{ partial "helper/icon" "infinity" }}
</div> </div>
<h1 class="widget-title">{{ T "widgetArchivesTitle" }}</h1> <h2 class="widget-title section-title">{{ T "widgetArchivesTitle" }}</h2>
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }} {{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
{{ $filtered := ($pages | intersect $notHidden) }} {{ $filtered := ($pages | intersect $notHidden) }}
{{ $archives := $filtered.GroupByDate "2006" }} {{ $archives := $filtered.GroupByDate "2006" }}
<div class="widget-archive--list">
{{ range $index, $item := first (add .Site.Params.widgets.archives.limit 1) ($archives) }} {{ range $index, $item := first (add .Site.Params.widgets.archives.limit 1) ($archives) }}
{{- $id := lower (replace $item.Key " " "-") -}} {{- $id := lower (replace $item.Key " " "-") -}}
<div class="archives-year"> <div class="archives-year">
@ -22,4 +23,5 @@
</a> </a>
</div> </div>
{{ end }} {{ end }}
</div>
</section> </section>

View File

@ -2,7 +2,7 @@
<div class="widget-icon"> <div class="widget-icon">
{{ partial "helper/icon" "tag" }} {{ partial "helper/icon" "tag" }}
</div> </div>
<h1 class="widget-title">{{ T "widgetTagCloudTitle" }}</h1> <h2 class="widget-title section-title">{{ T "widgetTagCloudTitle" }}</h2>
<div class="tagCloud-tags"> <div class="tagCloud-tags">
{{ range first .Site.Params.widgets.tagCloud.limit .Site.Taxonomies.tags.ByCount }} {{ range first .Site.Params.widgets.tagCloud.limit .Site.Taxonomies.tags.ByCount }}