aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-08-07 21:26:15 +0200
committerRomain Gonçalves <me@rgoncalves.se>2021-08-07 21:26:15 +0200
commitbc288cdc12e9bfdf9ed2fe0954b7b25ce2ede009 (patch)
tree1a72e1252a86a5f9f4835d9b1692b4b881192f83
parent6ca04ed7d406781bb47dc826bea12f970cd4ebb8 (diff)
downloadrgoncalves.se-bc288cdc12e9bfdf9ed2fe0954b7b25ce2ede009.tar.gz
Display options for date in index
-rw-r--r--bin/ssg-template12
-rw-r--r--src/index.md1
-rw-r--r--src/s/index.md1
-rw-r--r--src/style/style.css4
4 files changed, 7 insertions, 11 deletions
diff --git a/bin/ssg-template b/bin/ssg-template
index d246028..e0689cb 100644
--- a/bin/ssg-template
+++ b/bin/ssg-template
@@ -138,12 +138,12 @@ _render_index() {
title=$(_get_value "${file}" "title" "$(_get_title ${file})")
- cat <<-EOF
- <li>
- <a href="${path}">${title}</a>
- <span>$(_get_date_human "${file}")</span>
- </li>
- EOF
+ echo "<li>"
+ if [ $(_get_value "${file}" "index_show_date") ]; then
+ echo "<span>$(_get_date_human \"${file}\")</span>"
+ fi
+ echo "<a href=\"${path}\">${title}</a>"
+ echo "</li>"
done
echo "</ul>"
}
diff --git a/src/index.md b/src/index.md
index 265470a..d5e8563 100644
--- a/src/index.md
+++ b/src/index.md
@@ -1,2 +1,3 @@
toc: true
index: b
+index_show_date: true
diff --git a/src/s/index.md b/src/s/index.md
index 3284ddd..e24c59c 100644
--- a/src/s/index.md
+++ b/src/s/index.md
@@ -8,7 +8,6 @@ while this page is kept up-to date with general informations.
- operating system: openbsd, freebsd, alpine linux
- database: postgresql, sqlite, redis
-
## services
service | domain | available | public (1)
diff --git a/src/style/style.css b/src/style/style.css
index 8d60214..1aaf857 100644
--- a/src/style/style.css
+++ b/src/style/style.css
@@ -52,10 +52,6 @@ ul.index li {
background-color: #eeeeee;
}
ul.index li span {
- float: right;
-}
-
-span.date {
display: block;
}
remember that computers suck.