108 lines
3.5 KiB
HTML
108 lines
3.5 KiB
HTML
{{ $url := .Site.BaseURL }}
|
|
|
|
<div class="sidebar col-xs-6 col-sm-4 col-md-3 sidebar-offcanvas">
|
|
<div class="sidebar-content sidebar-scrolling">
|
|
<h1 class="sidebar-heading"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>
|
|
{{ range .Site.Params.sidebarAbout }}
|
|
<p class="sidebar-p">{{ . | safeHTML }}</p>
|
|
{{ end }}
|
|
|
|
{{ if and (isset .Params "image") .Params.image }}
|
|
<div class="sidebar-game-info">
|
|
<div class="sidebar-header">
|
|
{{ with .Params.game_name }}
|
|
<span>Game: {{ . }}</span>
|
|
{{ else }}
|
|
<span>{{ .Title }}</span>
|
|
{{ end }}
|
|
</div>
|
|
|
|
<p style="position: relative;">
|
|
<img src="{{ $url }}{{ .Params.image }}" alt="" class="img-responsive img-inactive" style="border: 1px solid black"/>
|
|
{{ with .Params.imageActive }}
|
|
<img src="{{ $url }}{{ . }}" alt="" class="img-responsive img-active" style="border: 1px solid black"/>
|
|
{{ end }}
|
|
|
|
{{ with .Params.game_platform }}
|
|
<img src="{{ $url }}img/{{ . }}.png" alt="{{ . }}" class="sidebar-game-platform img-responsive"/>
|
|
{{ end }}
|
|
<br/>
|
|
|
|
{{ with .Params.game_genre }}
|
|
Genre: {{ . }}<br/>
|
|
{{ end }}
|
|
{{ with .Params.game_release_year }}
|
|
Release year: {{ . }}<br/>
|
|
{{ end }}
|
|
{{ with .Params.game_developer }}
|
|
Developer: <a href="https://en.wikipedia.org/wiki/{{ . }}" target="_blank" class="external">{{ . }}</a><br/>
|
|
{{ end }}
|
|
</p>
|
|
</div>
|
|
{{ end }}
|
|
|
|
<!-- ripped from BB's minimal theme -->
|
|
{{ $related := first 4 (where (where .Site.Pages.ByDate.Reverse ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
|
|
|
|
{{ if $related }}
|
|
|
|
<div class="sidebar-header">
|
|
<span>Related</span>
|
|
<img src="/img/gob_purse.gif"/>
|
|
</div>
|
|
|
|
<ul class="sidebar-menu">
|
|
{{ range $related }}
|
|
{{ .Date.Format (.Site.Params.dateFormat | default "01/2006") | $.Scratch.Set "subtitle" }}
|
|
{{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }}
|
|
<li>
|
|
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
|
<span class="sidebar-date"><i class='fa fa-calendar'></i> {{ $.Scratch.Get "subtitle" }}</span>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
<hr/>
|
|
|
|
{{ end }}
|
|
|
|
<div class="sidebar-header">
|
|
<span>Latest</span>
|
|
<img src="/img/gob_letter.gif"/>
|
|
</div>
|
|
{{ with .Site.GetPage "section" "articles" }}
|
|
<ul class="sidebar-menu">
|
|
{{ range first 10 .Data.Pages.ByDate.Reverse }}
|
|
{{ .Date.Format (.Site.Params.dateFormat | default "01/2006") | $.Scratch.Set "subtitle" }}
|
|
<li>
|
|
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
|
<span class="sidebar-date">
|
|
<i class='fa fa-calendar'></i>
|
|
{{ $.Scratch.Get "subtitle" }}
|
|
</span>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
{{ end }}
|
|
|
|
<div class="sidebar-header">
|
|
<span>Browsing</span>
|
|
<img src="/img/gob_waypoint.gif"/>
|
|
</div>
|
|
<ul class="sidebar-menu">
|
|
{{ range .Site.Params.navlinks }}
|
|
<li><a href="{{ $url }}{{ .url }}">{{ .name }}</a></li>
|
|
{{ end }}
|
|
</ul>
|
|
|
|
|
|
<div class="copyright">
|
|
<p class="credit">
|
|
{{ with .Site.Params.copyright }}
|
|
{{ . | safeHTML }}
|
|
{{ end }}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|