add yesterdays and todays posts
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<svg id="btt-button" class="arrow-logo" xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 384 512" onclick="scrollToTop()" title="Go to top">
|
||||
<!-- Your arrow SVG path or elements go here -->
|
||||
<path d="M177 159.7l136 136c9.4 9.4 9.4 24.6 0 33.9l-22.6 22.6c-9.4 9.4-24.6 9.4-33.9 0L160 255.9l-96.4 96.4c-9.4 9.4-24.6 9.4-33.9 0L7 329.7c-9.4-9.4-9.4-24.6 0-33.9l136-136c9.4-9.5 24.6-9.5 34-.1z"/>
|
||||
</svg>
|
||||
<script>
|
||||
let backToTopButton = document.getElementById("btt-button");
|
||||
|
||||
window.onscroll = function() {
|
||||
scrollFunction()
|
||||
};
|
||||
|
||||
function scrollFunction() {
|
||||
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
|
||||
backToTopButton.style.display = "block";
|
||||
} else {
|
||||
backToTopButton.style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
function scrollToTop() {
|
||||
window.scrollTo(0, 0);
|
||||
}
|
||||
</script>
|
||||
|
After Width: | Height: | Size: 896 B |
@@ -0,0 +1,39 @@
|
||||
<footer class="footer">
|
||||
<!-- Option for user to inject custom html -->
|
||||
{{ if .Site.Params.CustomFooterHTML }}
|
||||
{{ .Site.Params.CustomFooterHTML | safeHTML }}
|
||||
{{ end }}
|
||||
|
||||
{{ .Scratch.Set "footerText" "" }}
|
||||
|
||||
{{ if (.Site.Params.Footer) }}
|
||||
|
||||
{{ if and (eq .Kind "page") (.Date) }}
|
||||
{{ .Scratch.Add "footerText" (.Date | time.Format "2006") }}
|
||||
{{ else }}
|
||||
{{ .Scratch.Add "footerText" (time.Now | time.Format "2006") }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (eq .Kind "page") (.Lastmod) (gt (time.Format "2006" .Lastmod) (time.Format "2006" .Date)) }}
|
||||
{{ .Scratch.Add "footerText" "-" }}
|
||||
{{ .Scratch.Add "footerText" (.Lastmod | time.Format "2006") }}
|
||||
{{ end }}
|
||||
|
||||
{{ .Scratch.Add "footerText" " " }}
|
||||
{{ .Scratch.Add "footerText" .Site.Params.Footer }}
|
||||
|
||||
{{ if and (eq .Kind "page") (.Site.Copyright) }}
|
||||
{{ .Scratch.Add "footerText" " " }}
|
||||
{{ .Scratch.Add "footerText" .Site.Copyright }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ if (gt (.Scratch.Get "footerText" | len) 0) }}
|
||||
<span>© {{ .Scratch.Get "footerText" | markdownify }}</span>
|
||||
{{ end }}
|
||||
|
||||
<span>
|
||||
Made with ❤️ using <a target="_blank" href="https://github.com/gokarna-theme/gokarna-hugo">Gokarna</a>
|
||||
</span>
|
||||
</footer>
|
||||
@@ -0,0 +1,60 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--accent-color: {{ .Site.Params.AccentColor | default "#FF4D4D" }};
|
||||
--font-size: {{ .Site.Params.FontSize | default "1.1rem" }};
|
||||
}
|
||||
</style>
|
||||
|
||||
{{ $title := .Title | markdownify | default .Site.Title }}
|
||||
{{ $description := ((.Description | default (.Summary | default .Content) | default .Site.Params.Description) | plainify | truncate 160) }}
|
||||
{{ $image := .Params.image | default (.Scratch.Get "avatarImgSrc") }}
|
||||
{{ $siteKeywords := .Site.Params.MetaKeywords | default (slice) }}
|
||||
{{ $postKeywords := .Params.tags | default (slice) }}
|
||||
{{ $keywords := union $siteKeywords $postKeywords }}
|
||||
|
||||
<!-- SEO titles & descriptions -->
|
||||
<title>{{ $title }}</title>
|
||||
<meta name="description" content="{{ $description }}">
|
||||
<meta name="keywords" content='{{ delimit $keywords ", "}}'>
|
||||
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:title" content="{{ $title }}">
|
||||
<meta property="og:description" content="{{ $description }}">
|
||||
<meta property="og:image" content="{{ absURL $image }}">
|
||||
<meta property="og:image:secure_url" content="{{ absURL $image }}">
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="{{ $title }}">
|
||||
<meta name="twitter:description" content="{{ $description }}">
|
||||
<meta property="twitter:domain" content="{{ .Permalink }}">
|
||||
<meta property="twitter:url" content="{{ .Permalink }}">
|
||||
<meta name="twitter:image" content="{{ absURL $image }}">
|
||||
|
||||
<!-- SEO canonicals: helps Google understand your site better when using marketing campaign tagging etc -->
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
|
||||
{{ $cssNormalize := resources.Get "css/normalize.min.css" }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ $cssNormalize.RelPermalink }}" media="print">
|
||||
|
||||
{{ $cssMain := resources.Get "css/main.css" | minify }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ $cssMain.RelPermalink }}">
|
||||
|
||||
{{ $cssSyntax := resources.Get "css/syntax.css" | minify }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ $cssSyntax.RelPermalink }}">
|
||||
|
||||
{{ $cssDark := resources.Get "css/dark.css" | minify }}
|
||||
<link id="dark-theme" rel="stylesheet" href="{{ $cssDark.RelPermalink }}">
|
||||
|
||||
{{ $jsBundle := resources.Match "js/**.js" | resources.Concat "js/bundle.js" | minify | resources.Fingerprint "sha256" }}
|
||||
<script src="{{ $jsBundle.RelPermalink }}" integrity="{{ $jsBundle.Data.Integrity }}"></script>
|
||||
|
||||
<!-- Option for user to inject custom html -->
|
||||
{{ if .Site.Params.CustomHeadHTML }}
|
||||
{{ .Site.Params.CustomHeadHTML | safeHTML }}
|
||||
{{ end }}
|
||||
</head>
|
||||
@@ -0,0 +1,59 @@
|
||||
<header class="header">
|
||||
<nav class="header-nav">
|
||||
|
||||
{{ if isset .Site.Params "avatarurl" }}
|
||||
<div class="avatar">
|
||||
<a href="{{ .Site.BaseURL }}">
|
||||
<img src='{{ .Scratch.Get "avatarImgSrc" }}' alt="{{ .Site.Params.AvatarAltText|default "avatar" }}">
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="nav-title">
|
||||
<a class="nav-brand" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
|
||||
</div>
|
||||
|
||||
<div class="nav-links">
|
||||
{{ range .Site.Menus.main }}
|
||||
<div class="nav-link">
|
||||
<a href="{{ .URL | absURL }}" aria-label="{{ .Identifier }}" {{ if .Params.NewPage -}}target="_blank" {{- end -}}>
|
||||
{{- .Pre | safeHTML }} {{ .Name }} {{ .Post | safeHTML -}}
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<span class="nav-icons-divider"></span>
|
||||
<div class="nav-link dark-theme-toggle">
|
||||
<span class="sr-only dark-theme-toggle-screen-reader-target">theme</span>
|
||||
<a aria-hidden="true" role="switch">
|
||||
<span class="theme-toggle-icon" data-feather="moon"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="nav-link" id="hamburger-menu-toggle">
|
||||
<span class="sr-only hamburger-menu-toggle-screen-reader-target">menu</span>
|
||||
<a aria-checked="false" aria-labelledby="hamburger-menu-toggle" id="hamburger-menu-toggle-target" role="switch">
|
||||
<span data-feather="menu"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- For mobile -->
|
||||
<ul class="nav-hamburger-list visibility-hidden">
|
||||
{{ range .Site.Menus.main }}
|
||||
<li class="nav-item">
|
||||
<a href="{{ .URL | absURL }}" {{ if .Params.NewPage -}} target="_blank"{{- end -}}>
|
||||
{{- .Pre | safeHTML }} {{ .Name }} {{ .Post | safeHTML -}}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
<li class="nav-item dark-theme-toggle">
|
||||
<span class="sr-only dark-theme-toggle-screen-reader-target">theme</span>
|
||||
<a role="switch">
|
||||
<span class="theme-toggle-icon" data-feather="moon"></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
@@ -0,0 +1,16 @@
|
||||
<div class="post-title">
|
||||
<a href="{{ .Permalink }}" class="post-link">{{ .Title | markdownify }}</a>
|
||||
{{/* Decide to display the date based on the tags */}}
|
||||
{{ $displayDate := true }}
|
||||
{{ $tagsHidePostDate := or .Site.Params.Hidden.TagsPostDate slice }}
|
||||
{{ $postTags := or .Params.Tags slice }}
|
||||
|
||||
{{ if gt ($tagsHidePostDate | intersect $postTags | len) 0 }}
|
||||
{{ $displayDate = false }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq $displayDate true }}
|
||||
<div class="flex-break"></div>
|
||||
<span class="post-date">{{ dateFormat (or .Site.Params.dateFormat "January 2, 2006") .Date}}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
@@ -0,0 +1,14 @@
|
||||
<div class="container list-posts">
|
||||
|
||||
<h1 class="list-title">{{ i18n .Name }}</h1>
|
||||
|
||||
{{ range (where .Pages "Params.type" "post" ).GroupByDate "2006" }}
|
||||
|
||||
<h2 class="posts-year">{{ .Key }}</h2>
|
||||
|
||||
{{- range .Pages -}}
|
||||
{{- partial "list-posts.html" . -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,15 @@
|
||||
<div class="post container">
|
||||
|
||||
<div class="post-header-section">
|
||||
<h1>{{ or (.Params.H1 | markdownify) (.Title | markdownify) }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="post-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
<!-- Back to top button -->
|
||||
{{ if .Site.Params.ShowBackToTopButton }}
|
||||
{{ partial "back-to-top.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
<div class="post container">
|
||||
<div class="post-header-section">
|
||||
<h1>{{ or (.Params.H1 | markdownify) (.Title | markdownify) }}</h1>
|
||||
|
||||
{{/* Determine whether to display the date & description based on tags */}}
|
||||
|
||||
{{ $displayDate := true }}
|
||||
{{ $displayDescription := true }}
|
||||
{{ $postTags := or .Params.Tags slice }}
|
||||
{{ $hiddenTags := or .Site.Params.Hidden.Tags slice }}
|
||||
{{ $tagsHidePostDate := or .Site.Params.Hidden.TagsPostDate slice }}
|
||||
{{ $tagsHidePostDescription := or .Site.Params.Hidden.TagsPostDescription slice }}
|
||||
|
||||
{{ if gt ($tagsHidePostDate | intersect $postTags | len) 0 }}
|
||||
{{ $displayDate = false }}
|
||||
{{ end }}
|
||||
|
||||
{{ if gt ($tagsHidePostDescription | intersect $postTags | len) 0 }}
|
||||
{{ $displayDescription = false }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $displayDescription }}
|
||||
<small role="doc-subtitle">{{ .Description }}</small>
|
||||
{{ end }}
|
||||
|
||||
{{ if $displayDate }}
|
||||
<p class="post-date">
|
||||
{{ if (eq .Site.Params.DisplayReadingTime true) }}
|
||||
{{ .ReadingTime }} min read |
|
||||
{{ end }}
|
||||
|
||||
{{ dateFormat (or .Site.Params.dateFormat "January 2, 2006") .Date }}
|
||||
|
||||
{{ if lt .Date .Lastmod }}
|
||||
| Updated {{ dateFormat (or .Site.Params.dateFormat "January 2, 2006") .Lastmod }}
|
||||
{{ end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
<ul class="post-tags">
|
||||
{{ range $tag := $postTags }}
|
||||
{{ if not (in $hiddenTags $tag) }}
|
||||
<li class="post-tag"><a href="{{ "tags/" | absLangURL }}{{ . | urlize }}">{{ . }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="post-content">
|
||||
{{ .Content }}
|
||||
{{ if .Site.Config.Services.Disqus.Shortname }}
|
||||
<div class="post-comments">
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="prev-next">
|
||||
{{ if (eq .Site.Params.TogglePreviousAndNextButtons true) }}
|
||||
{{ if or .PrevInSection .NextInSection }}
|
||||
{{ partial "prev-next.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<!-- Back to top button -->
|
||||
{{ if .Site.Params.ShowBackToTopButton }}
|
||||
{{ partial "back-to-top.html" . }}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.CustomCommentHTML }}
|
||||
<div id="comments">
|
||||
{{ .Site.Params.CustomCommentHTML | safeHTML }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
@@ -0,0 +1,31 @@
|
||||
<nav aria-label="Post navigation" class="post-navigation">
|
||||
{{ with .PrevInSection }}
|
||||
<div class="prev-post">
|
||||
<p>
|
||||
<a href="{{ .RelPermalink }}">
|
||||
←
|
||||
{{ i18n "previous" }}:
|
||||
{{ .Title | markdownify }}
|
||||
</a>
|
||||
</p>
|
||||
<p class="prev-post-date">
|
||||
{{ dateFormat (or .Site.Params.dateFormat "January 2, 2006") .Date}}
|
||||
</p>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ with .NextInSection }}
|
||||
<div class="next-post">
|
||||
<p>
|
||||
<a href="{{ .RelPermalink }}">
|
||||
{{ i18n "next" }}:
|
||||
{{ .Title | markdownify }}
|
||||
→
|
||||
</a>
|
||||
</p>
|
||||
<p class="next-post-date">
|
||||
{{ dateFormat (or .Site.Params.dateFormat "January 2, 2006") .Date}}
|
||||
</p>
|
||||
</div>
|
||||
{{ end }}
|
||||
</nav>
|
||||
@@ -0,0 +1,7 @@
|
||||
{{ if .Params.ShowTableOfContents }}
|
||||
<aside class="post-toc">
|
||||
<nav id="toc">
|
||||
{{ .TableOfContents }}
|
||||
</nav>
|
||||
</aside>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user