summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorNantha Sorubakanthan <nantha@mielota.com>2025-10-29 18:08:07 +0100
committerNantha Sorubakanthan <nantha@mielota.com>2025-10-29 18:08:20 +0100
commitc69bbc7c0ee77c11dbc7cae346dbf282fffb956d (patch)
tree189dd84ec62e9a0372edfa6b4025be881e2d0139 /layouts
parent31d55a1d0688a6cbbb0f8a1bef5f325ccfe782b8 (diff)
change header and color for copied articles also update stuff
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/single.html11
-rw-r--r--layouts/guide/single.html7
-rw-r--r--layouts/shortcodes/article-list.html4
3 files changed, 14 insertions, 8 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 366e181..3ee3cf5 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,3 +1,14 @@
{{ define "main" }}
+{{ with .Params.copied }}
+<small><i>This article is copied from <a href="{{ index . 1 }}">{{ index .
+ 0}}</a></i></small>
+{{ end }}
+{{ with .Params.icon }}
+<img style="height: 10em;display: block;margin: auto;" src="{{ . }}">
+{{ end }}
+{{ if .Params.table }}
+<h2>Table of Contents</h2>
+{{.TableOfContents}}
+{{ end }}
{{- .Content }}
{{ end }}
diff --git a/layouts/guide/single.html b/layouts/guide/single.html
deleted file mode 100644
index 6efdfe0..0000000
--- a/layouts/guide/single.html
+++ /dev/null
@@ -1,7 +0,0 @@
-{{define "main"}}
-<article>
- <h2>Table of Contents</h2>
- {{.TableOfContents}}
- {{.Content}}
-</article>
-{{end}} \ No newline at end of file
diff --git a/layouts/shortcodes/article-list.html b/layouts/shortcodes/article-list.html
index 090d654..d3d826e 100644
--- a/layouts/shortcodes/article-list.html
+++ b/layouts/shortcodes/article-list.html
@@ -3,7 +3,9 @@
</h2>
<ul>
{{- range where .Site.RegularPages "Type" (.Get "category") | first (.Get "number") }}
- <li>{{ .Date.Format "02/01/06" }} - <a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
+ <li>{{ .Date.Format "02/01/06" }} - <a href="{{ .RelPermalink }}" {{ if .Params.copied }}style="color:#73daca;" {{ end
+ }}>{{
+ .Title }}</a></li>
{{- end }}
</ul>
<a href='{{ .Get "category" }}'>See more...</a>