Add loremipsum shortcode

This commit is contained in:
Simon 2020-03-09 15:08:41 +01:00
parent 363612f304
commit 5d28c758c3
1 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,10 @@
{{- $count := .Get "count" | default (.Get 0) | default 1 -}}
{{- $loremipsum := slice "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur." "Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." -}}
{{- range seq $count}}
<p class="loremipsum">
{{- range $index := seq 0 (index (shuffle (seq 0 3) ) 0 ) -}}
{{ index $loremipsum $index }}&nbsp;
{{- end -}}
</p>
{{- $loremipsum = shuffle $loremipsum -}}
{{- end -}}