-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Blog] Prepare for 2024 + blog navigation enhancements (#3784)
- Loading branch information
Showing
4 changed files
with
95 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: 2024 | ||
weight: -2024 | ||
outputs: [HTML, RSS] | ||
--- | ||
|
||
New posts are coming soon. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!doctype html> | ||
<html itemscope itemtype="http://schema.org/WebPage" lang="{{ .Site.Language.Lang }}" class="no-js"> | ||
<head> | ||
{{ partial "head.html" . }} | ||
</head> | ||
<body class="td-{{ .Kind }} td-blog {{- with .Page.Params.body_class }} {{ . }}{{ end }}"> | ||
<header> | ||
{{ partial "navbar.html" . }} | ||
</header> | ||
<div class="container-fluid td-outer"> | ||
<div class="td-main"> | ||
<div class="row flex-xl-nowrap"> | ||
<aside class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none"> | ||
{{ partial "sidebar.html" . }} | ||
</aside> | ||
<aside class="d-none d-xl-block col-xl-2 td-sidebar-toc d-print-none"> | ||
{{ partial "page-meta-links.html" . }} | ||
{{ partial "toc.html" . }} | ||
{{ partial "taxonomy_terms_clouds.html" . }} | ||
</aside> | ||
<main class="col-12 col-md-9 col-xl-8 ps-md-5 pe-md-4" role="main"> | ||
{{ with .CurrentSection.OutputFormats.Get "rss" -}} | ||
<a class="td-rss-button" title="RSS" href="{{ .RelPermalink | safeURL }}" target="_blank" rel="noopener"> | ||
<i class="fa-solid fa-rss" aria-hidden="true"></i> | ||
</a> | ||
{{ end -}} | ||
{{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }} | ||
{{ block "main" . }}{{ end }} | ||
</main> | ||
</div> | ||
</div> | ||
{{ partial "footer.html" . }} | ||
</div> | ||
{{ partial "scripts.html" . }} | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{{/* Docsy file override */}} | ||
|
||
{{ define "main" -}} | ||
{{ if (and .Parent .Parent.IsHome) -}} | ||
{{ $.Scratch.Set "blog-pages" (where .Site.RegularPages "Section" .Section) -}} | ||
{{ else -}} | ||
{{$.Scratch.Set "blog-pages" .Pages -}} | ||
{{ end -}} | ||
|
||
<div class="td-content"> | ||
{{ $content := .Content -}} | ||
{{ if $content -}} | ||
<h1>{{ .Title }}</h1> | ||
{{ $content }} | ||
{{ end -}} | ||
|
||
{{ if .Pages -}} | ||
<div class="td-blog-posts"> | ||
{{ $pag := .Paginate (( $.Scratch.Get "blog-pages").GroupByDate "2006" ) -}} | ||
{{ $numPageGroups := len $pag.PageGroups -}} | ||
{{ range $pag.PageGroups -}} | ||
{{ if or (not $content) (gt $numPageGroups 1)}} | ||
<div class="h2">{{ T "post_posts_in" }} {{ .Key }}</div> | ||
{{ end -}} | ||
<ul class="td-blog-posts-list"> | ||
{{ range .Pages -}} | ||
<li class="td-blog-posts-list__item"> | ||
<div class="td-blog-posts-list__body"> | ||
<h5 class="mt-0 mb-1"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h5> | ||
<p class="mb-2 mb-md-3"><small class="text-muted">{{ .Date.Format ($.Param "time_format_blog") }} {{ T "ui_in"}} {{ .CurrentSection.LinkTitle }}</small></p> | ||
<header class="article-meta"> | ||
{{ partial "taxonomy_terms_article_wrapper.html" . -}} | ||
{{ if (and (not .Params.hide_readingtime) (.Site.Params.ui.readingtime.enable)) -}} | ||
{{ partial "reading-time.html" . -}} | ||
{{ end -}} | ||
</header> | ||
{{ partial "featured-image.html" (dict "p" . "w" 250 "h" 125 "class" "float-start me-3 pt-1 d-none d-md-block") -}} | ||
<p class="pt-0 mt-0">{{ .Plain | safeHTML | truncate 250 }}</p> | ||
<p class="pt-0"><a href="{{ .RelPermalink }}" aria-label="{{ T "ui_read_more"}} - {{ .LinkTitle }}">{{ T "ui_read_more"}}</a></p> | ||
</div> | ||
</li> | ||
{{ end -}} | ||
</ul> | ||
{{ end -}} | ||
</div> | ||
<div class="td-blog-posts__pagination"> | ||
{{ template "_internal/pagination.html" . -}} | ||
</div> | ||
{{ end }} | ||
</div> | ||
{{ end -}} |