Compare commits

...

4 Commits

7 changed files with 83 additions and 2 deletions

View File

@ -96,7 +96,6 @@ nav {
} }
.post-subscript { .post-subscript {
color: #8f8f8f;
text-align: center; text-align: center;
} }
@ -215,7 +214,12 @@ ul.post-list {
display: block; display: block;
} }
p.post-wordcount { p.post-status {
margin-bottom: 0.2rem;
margin-top: 0.2rem;
}
p.post-wordcount, p.post-status {
text-align: center; text-align: center;
margin-bottom: 0.6rem; margin-bottom: 0.6rem;
} }
@ -318,3 +322,26 @@ figure {
} }
} }
} }
.series-status {
display: inline-block;
padding: 0.5rem;
@include bordered-block;
border-color: rgba(black, 0.3);
&.suspended {
background-color: lighten(yellow, 40%);
color: darken(yellow, 40%);
}
&.complete {
background-color: lighten(green, 60%);
color: darken(green, 10%);
}
&.ongoing {
background-color: lighten(lightblue, 10%);
color: darken(lightblue, 60%);
}
}

View File

@ -56,3 +56,21 @@
[searchRequiresJS] [searchRequiresJS]
other = "Search (requires JavaScript)" other = "Search (requires JavaScript)"
[series]
other = "Series"
[postsFromTo]
other = "First post in {{ .from }}, last post in {{ .to }}"
[seriesStatus]
other = "Series status:"
[suspendedSeries]
other = "Suspended"
[completeSeries]
other = "Complete"
[ongoingSeries]
other = "Ongoing"

View File

@ -8,6 +8,7 @@
<a href="https://github.com/DanilaFe">GitHub</a> <a href="https://github.com/DanilaFe">GitHub</a>
<a href="{{ .Site.BaseURL }}/Resume-Danila-Fedorin.pdf">{{ i18n "resume" }}</a> <a href="{{ .Site.BaseURL }}/Resume-Danila-Fedorin.pdf">{{ i18n "resume" }}</a>
<a href="{{ .Site.BaseURL }}/tags">{{ i18n "tags" }}</a> <a href="{{ .Site.BaseURL }}/tags">{{ i18n "tags" }}</a>
<a href="{{ .Site.BaseURL }}/series">{{ i18n "series" }}</a>
<a href="{{ .Site.BaseURL }}/favorites">{{ i18n "favorites" }}</a> <a href="{{ .Site.BaseURL }}/favorites">{{ i18n "favorites" }}</a>
<a href="{{ .Site.BaseURL }}/search">{{ i18n "search" }}</a> <a href="{{ .Site.BaseURL }}/search">{{ i18n "search" }}</a>
<a href="{{ relref . "blog" }}">{{ i18n "allPosts" }}</a> <a href="{{ relref . "blog" }}">{{ i18n "allPosts" }}</a>

View File

@ -1,5 +1,12 @@
<li> <li>
<a href="{{ .Permalink }}" class="post-title">{{ if .Params.favorite }}{{ partial "icon.html" "star" }}{{ end }} {{ .Title }}</a> <a href="{{ .Permalink }}" class="post-title">{{ if .Params.favorite }}{{ partial "icon.html" "star" }}{{ end }} {{ .Title }}</a>
{{ if (not (eq .WordCount 0)) }}
<p class="post-wordcount">{{ i18n "nWords" .WordCount }}, {{ i18n "nMinutesToRead" .ReadingTime }}.</p> <p class="post-wordcount">{{ i18n "nWords" .WordCount }}, {{ i18n "nMinutesToRead" .ReadingTime }}.</p>
{{ end }}
{{ if .Params.status }}
<p class="post-status">
{{ partial "seriesstatus.html" .Params.status }}
</p>
{{ end }}
<p class="post-preview">{{ .Summary }} {{ if .Truncated }}. . .{{ end }}</p> <p class="post-preview">{{ .Summary }} {{ if .Truncated }}. . .{{ end }}</p>
</li> </li>

View File

@ -0,0 +1 @@
<span class="series-status {{ . }}">{{ i18n "seriesStatus" }} {{ i18n (printf "%sSeries" .) }}</span>

17
layouts/series/list.html Normal file
View File

@ -0,0 +1,17 @@
{{ define "main" }}
<h2>{{ .Title }}</h2>
{{ $pages := .Pages.ByDate }}
{{ $startYear := (index (last 1 .Pages) 0).Date.Format "2006" }}
{{ $endYear := (index (first 1 .Pages) 0).Date.Format "2006" }}
<div class="post-subscript">
<p>{{ partial "seriesstatus.html" .Params.status }}</p>
<p>{{ i18n "postsFromTo" (dict "from" $startYear "to" $endYear) }}</p>
</div>
<p>{{ .Summary }}</p>
<ul class="post-list">
{{ range $pages }}
{{ partial "post.html" . }}
{{ end }}
</ul>
{{ end }}

10
layouts/series/terms.html Normal file
View File

@ -0,0 +1,10 @@
{{ define "main" }}
<h2>{{ .Title }}</h2>
{{ .Content }}
<ul class="post-list">
{{ range sort .Pages "Title" }}
{{ partial "post.html" . }}
{{ end }}
</ul>
{{ end }}