summaryrefslogtreecommitdiff
path: root/layouts/shortcodes/rate.html
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2016-08-21 18:47:04 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2016-08-21 18:47:04 +0200
commit1d13524bf623469daeb5c4f26bbb8269213ad710 (patch)
tree963495fd9e023d68a91cfed2ff7170fb0b52fca0 /layouts/shortcodes/rate.html
parent1f824e6ae5ac39d0cefe0244ea9223c1783494f3 (diff)
downloadpragblog-1d13524bf623469daeb5c4f26bbb8269213ad710.tar.gz
pragblog-1d13524bf623469daeb5c4f26bbb8269213ad710.zip
add shortcodes: map, rating
Diffstat (limited to 'layouts/shortcodes/rate.html')
-rw-r--r--layouts/shortcodes/rate.html13
1 files changed, 13 insertions, 0 deletions
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 @@
+<i class="material-icons">
+{{ 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 }}
+</i>