57 lines
2.3 KiB
HTML
57 lines
2.3 KiB
HTML
<div class="row box-masonry" style="margin-right: 10px">
|
|
<div class="col-md-4">
|
|
<a href="{{ .Permalink }}" title="" class="box-masonry-image with-hover-overlay with-hover-icon">
|
|
{{ $thumb := "/img/logo.png" | absURL }}
|
|
{{ if .Params.image }}
|
|
{{ $thumb = .Params.image | absURL }}
|
|
{{ else if .Params.howlongtobeat_id }}
|
|
{{ $thumb = printf "%s%d%s" "img/hltb/" .Params.howlongtobeat_id ".jpg" | absURL }}
|
|
{{ else }}
|
|
<!-- taken from head-meta.html in brainabking -->
|
|
{{ $perm := .Permalink }}
|
|
{{ $base := .Site.BaseURL }}
|
|
{{ $match := findRE `!\[(.*)\]\((.+).(jpg|png|gif)` .RawContent 1 }}
|
|
{{ range $match }}
|
|
{{ $relthumb := replaceRE `!\[(.*)\]\(` "" . }}
|
|
{{ if hasPrefix $relthumb "/" }}
|
|
{{ $thumb = printf "%s%s" $base $relthumb }}
|
|
{{ else }}
|
|
{{ $thumb = printf "%s%s" $perm $relthumb }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
<img loading="lazy" src="{{ $thumb }}" alt="thumbnail of {{ .Title }}" class="img-responsive img-inactive">
|
|
</a>
|
|
</div>
|
|
<div class="col-md-8">
|
|
<div class="box-masonry-text">
|
|
<h4 style="margin: 0; float: left;"><a href="{{ .Permalink }}">{{ .Title }}</a></h4>
|
|
{{ if .Date }}
|
|
{{ .Date.Format (.Site.Params.dateFormat | default "01/2006") | $.Scratch.Set "subtitle" }}
|
|
<span class="sidebar-date" style="float: right;">
|
|
<svg class='icon icon-inline'>
|
|
<use xlink:href='#cal1'></use>
|
|
</svg>
|
|
{{ $.Scratch.Get "subtitle" }}
|
|
</span>
|
|
{{ end }}
|
|
<div class="box-masonry-description" style="clear: both;">
|
|
<p>
|
|
{{ if .Description }}
|
|
{{ .Description }}
|
|
{{ else if .Summary }}
|
|
{{ .Summary }}
|
|
{{ else }}
|
|
<p>
|
|
A {{ .Params.game_genre }} game by {{ .Params.game_developer }} in {{ .Params.game_release_year }} that takes about {{ .Params.howlongtobeat_hrs }} hour(s) to beat.
|
|
</p>
|
|
<p>
|
|
{{ partial "score" . }}
|
|
</p>
|
|
{{ end }}
|
|
</p>
|
|
</div>
|
|
</div> <!-- box-masonry-text -->
|
|
</div>
|
|
</div><!-- row -->
|