diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2016-08-27 13:14:43 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2016-08-27 13:14:43 +0200 |
| commit | c70607840ef98b35091ca0b23185b8fa1c170ca5 (patch) | |
| tree | 8305d4ac88bc6ef9370187810b3c377109a4d3e8 /themes | |
| parent | 0f9a69bb83882c45d67b901bf9d897d7fd35eb2f (diff) | |
| download | pragblog-c70607840ef98b35091ca0b23185b8fa1c170ca5.tar.gz pragblog-c70607840ef98b35091ca0b23185b8fa1c170ca5.zip | |
integrate rating into meta params, show in listings
Diffstat (limited to 'themes')
| -rw-r--r-- | themes/flog/layouts/_default/single.html | 12 | ||||
| -rw-r--r-- | themes/flog/layouts/partials/listing.html | 14 |
2 files changed, 25 insertions, 1 deletions
diff --git a/themes/flog/layouts/_default/single.html b/themes/flog/layouts/_default/single.html index e6be8ee..44bdae9 100644 --- a/themes/flog/layouts/_default/single.html +++ b/themes/flog/layouts/_default/single.html @@ -8,6 +8,18 @@ {{ end }} <h1 itemprop="headline" class="header">{{ .Title }}</h1> <span><time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "02.01.2006" }}</time></span> + {{ if .Params.rating }} + <div class="center right"> + <i class="material-icons"> + {{ range seq .Params.rating }} + star + {{ end }} + {{ range seq (sub 5 (int .Params.rating)) }} + star_border + {{ end }} + </i> + </div> + {{ end }} <section itemprop="articleBody" class="flow-text"> {{ .Content }} </section> diff --git a/themes/flog/layouts/partials/listing.html b/themes/flog/layouts/partials/listing.html index 44849bd..58c7697 100644 --- a/themes/flog/layouts/partials/listing.html +++ b/themes/flog/layouts/partials/listing.html @@ -20,7 +20,19 @@ </div> </section> <div class="card-action"> - <a href="{{ .RelPermalink }}">Weiterlesen…</a> + <a href="{{ .RelPermalink }}"> + Weiterlesen… + {{ if .Params.rating }} + <i class="material-icons right"> + {{ range seq .Params.rating }} + star + {{ end }} + {{ range seq (sub 5 (int .Params.rating)) }} + star_border + {{ end }} + </i> + {{ end }} + </a> </div> </div> </article> |
