Skip to content
Snippets Groups Projects
Commit 24df8af3 authored by Timuçin Boldt's avatar Timuçin Boldt :bike:
Browse files

Merge branch 'master' into 'main'

Use .Pages instead of site.RegularPages in list.html

See merge request artevaeckt/anubis!2
parents ae35376a 5dab60e0
No related branches found
No related tags found
1 merge request!2Use .Pages instead of site.RegularPages in list.html
......@@ -321,11 +321,19 @@ article:not(:last-of-type) {
padding-bottom: 2em;
}
article header {
margin-top: 1em;
line-height: 1.1em;
margin-bottom: 1em;
}
article header h1 {
font-size: 1.35em;
line-height: 1.1em;
margin-bottom: 0.5em;
font-weight: 600;
display: inline;
}
article header h1 a {
......@@ -428,6 +436,32 @@ article figcaption {
display: block;
}
.post-translations {
margin-left: 0.5em;
list-style: none;
padding: 0;
display: inline;
font-size: 14px;
}
.post-translations > li {
display: inline;
}
.post-translations > li:not(:last-child)::after {
content: "|";
display: inline-block;
}
.post-translations > li a {
color: var(--link-color);
}
.post-translations > li a:hover,
.post-translations > li a:focus {
color: var(--link-state-color);
}
/* Other pages */
.terms {
list-style-type: none;
......
powered:
other: "提供"
theme:
other: "主題"
readMore:
other: "继续阅读"
toNewPosts:
other: "新文章"
toOldPosts:
other: "旧文章"
tag:
other: "标签"
Tags:
other: "标签"
Posts:
other: "文章"
category:
other: "类别"
Categories:
other: "类别"
toAllTags:
other: "所有标签"
toAllCategories:
other: "所有类别"
skipToContent:
other: "跳至内容"
darkTheme:
other: "暗色主题"
lightTheme:
other: "亮色主题"
\ No newline at end of file
......@@ -5,13 +5,14 @@
<div class="articles h-feed">
<h1 class="post-title">{{ i18n .Title }}</h1>
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
{{ $pages := where .Pages "Type" "in" site.Params.mainSections }}
{{ range $pages }}
<div class="post-short-list h-entry">
<header class="post-header">
<h2 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}"><a class="u-url" href="{{ .RelPermalink }}">{{ trim .Title " " }}</a></h2>
{{ partial "post-language-switcher.html" . }}
</header>
{{ partial "postInfo.html" . }}
{{ partial "post-info.html" . }}
</div>
{{ end }}
</div>
......
......@@ -10,15 +10,17 @@
<article class="post h-entry">
<header class="post-header">
<h1 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}">{{ trim .Title " " }}</h1>
{{ partial "post-language-switcher.html" . }}
</header>
<div class="content e-content">
{{ .Content }}
</div>
{{ partial "postInfo.html" . }}
{{ partial "post-info.html" . }}
</article>
{{ if and (.Site.Params.paginationSinglePost) (ne .Type "page") }}
{{ partial "paginationPost.html" . }}
{{ partial "post-pagination.html" . }}
{{ end }}
{{ if .Site.DisqusShortname }}
......
......@@ -4,7 +4,7 @@
<a href="{{ (printf "%s/%s" .Site.LanguagePrefix .Data.Plural) | absLangURL }}">{{ i18n (printf "toAll%s" (.Data.Plural | humanize )) | humanize }}</a>
</div>
{{ range .Paginator.Pages }}
{{ partial "postSummary.html" . }}
{{ partial "post-summary.html" . }}
{{ end }}
{{ partial "pagination.html" . }}
......
......@@ -6,7 +6,7 @@
<div class="articles h-feed">
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
{{ range (.Paginate $pages).Pages }}
{{ partial "postSummary.html" . }}
{{ partial "post-summary.html" . }}
{{ end }}
{{ partial "pagination.html" . }}
</div>
......
<footer class="common-footer">
{{ $languagesCount := $.Site.Home.AllTranslations }}
{{ if gt $languagesCount 1 }}
{{ partial "languageSelect.html" . }}
{{ partial "language-switcher.html" . }}
{{ end }}
<div class="common-footer-bottom">
......@@ -20,7 +20,7 @@
</p>
</div>
{{ partial "themeSwitcher.html" . }}
{{ partial "theme-switcher.html" . }}
</div>
{{ partial "h-card.html" . }}
......
......@@ -9,7 +9,7 @@
{{ end }}
<a class="post-hidden-url u-url" href="{{ .Permalink }}">{{ .Permalink }}</a>
<a href={{ .Site.BaseURL }} class="p-name p-author post-hidden-author h-card" rel="me">{{ .Params.author | default .Site.Params.author }}</a>
<a href="{{ .Site.BaseURL }}" class="p-name p-author post-hidden-author h-card" rel="me">{{ .Params.author | default .Site.Params.author }}</a>
<div class="post-taxonomies">
......
{{ if .IsTranslated }}
{{ $pageLang := .Page.Lang}}
<ul class="post-translations">
{{ range .AllTranslations }}
{{ if eq .Lang $pageLang }}
<li>
{{ upper .Lang }}
</li>
{{ else }}
<li>
<a href="{{ .Permalink }}">{{ upper .Lang }}</a>
</li>
{{ end }}
{{ end }}
</ul>
{{ end }}
\ No newline at end of file
<article class="post-list h-feed">
<header class="post-header">
<h1 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}"><a class="u-url" href="{{ .RelPermalink }}">{{ trim .Title " " }}</a></h1>
{{ partial "post-language-switcher.html" . }}
</header>
{{ if not .Site.Params.disableSummary }}
......@@ -14,5 +15,5 @@
</div>
{{ end }}
{{ partial "postInfo.html" . }}
{{ partial "post-info.html" . }}
</article>
\ No newline at end of file
......@@ -3,15 +3,16 @@
{{ range $.Site.Params.Social }}
{{ if and (isset $.Site.Data.social.social_icons .id) (isset . "name") }}
{{ $url := index $.Site.Data.social.social_icons .id }}
{{ $ref := printf $url .name }}
<li>
<a href="{{ printf $url .name }}" title="{{ humanize .id }}" rel="me">
{{ partial "fontawesome.html" (dict "iconName" .id "custom" false) }}
<a {{ printf "href=%q" $ref | safeHTMLAttr }} title="{{ humanize .id }}" rel="me">
{{ partial "font-awesome.html" (dict "iconName" .id "custom" false) }}
</a>
</li>
{{ else if (isset . "url") }}
<li>
<a href="{{ printf .url }}" title="{{ humanize .id }}" rel="me">
{{ partial "fontawesome.html" (dict "iconName" .id "custom" true) }}
{{ partial "font-awesome.html" (dict "iconName" .id "custom" true) }}
</a>
</li>
{{ end }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment