From f92b7e0b5385acca4d518c0484bff12e3d6669d4 Mon Sep 17 00:00:00 2001 From: curben <2809763-curben@users.noreply.gitlab.com> Date: Thu, 17 Oct 2019 06:26:26 +0100 Subject: [PATCH] feat: add post and tag lists to homepage --- themes/chameleon/layout/index.ejs | 17 ++++++++++++++++- themes/chameleon/source/css/typing.css | 13 +++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) mode change 120000 => 100644 themes/chameleon/layout/index.ejs diff --git a/themes/chameleon/layout/index.ejs b/themes/chameleon/layout/index.ejs deleted file mode 120000 index ff16854..0000000 --- a/themes/chameleon/layout/index.ejs +++ /dev/null @@ -1 +0,0 @@ -archive.ejs \ No newline at end of file diff --git a/themes/chameleon/layout/index.ejs b/themes/chameleon/layout/index.ejs new file mode 100644 index 0000000..eef8935 --- /dev/null +++ b/themes/chameleon/layout/index.ejs @@ -0,0 +1,16 @@ +
+ <%- partial('_partial/header', {}, { cache: true }) %> +
+

Recent posts:

+ <%- list_posts({ + amount: 10, + class: 'index' + }) %> +
+

Tags:

+ <%- list_tags({ + amount: 0, + class: 'index', + transform: titlecase + }) %> +
diff --git a/themes/chameleon/source/css/typing.css b/themes/chameleon/source/css/typing.css index 2332803..0703f8b 100644 --- a/themes/chameleon/source/css/typing.css +++ b/themes/chameleon/source/css/typing.css @@ -138,6 +138,10 @@ ul { list-style: disc; } +ul.index-list { + margin-left: unset; +} + ol { list-style: decimal; margin-left: 1.9em; @@ -286,6 +290,15 @@ blockquote { margin-right: 1em; } +/* Wrap count in brackets */ +span.index-list-count:before { + content: ' ('; +} + +span.index-list-count:after { + content: ')'; +} + .home-body { display: flex; flex-direction: column;