From 1d13524bf623469daeb5c4f26bbb8269213ad710 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sun, 21 Aug 2016 18:47:04 +0200 Subject: add shortcodes: map, rating --- layouts/shortcodes/rate.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 layouts/shortcodes/rate.html (limited to 'layouts/shortcodes/rate.html') diff --git a/layouts/shortcodes/rate.html b/layouts/shortcodes/rate.html new file mode 100644 index 0000000..bdce5b7 --- /dev/null +++ b/layouts/shortcodes/rate.html @@ -0,0 +1,13 @@ + +{{ range seq (.Get 0) }} +star +{{ end }} +{{ $len := 5 }} +{{ if and (.Get 1) (eq "halb" (.Get 1)) }}{{ $len := 4 }}{{ end }} +{{ if eq 4 $len }} +star_half +{{ end }} +{{ range seq (sub $len (int (.Get 0))) }} +star_border +{{ end }} + -- cgit v1.3.1