1
Fork 0

Add image hack for better display

This commit is contained in:
Jake Howard 2017-11-09 21:31:18 +00:00
parent e49f30d87a
commit 3292d58007
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 8 additions and 7 deletions

View file

@ -1,17 +1,17 @@
{{ if .Params.image }}
<img class="mb-3" src="{{ .Params.image }}" style="width: 100%; max-height: 30vh"/>
<div class="mb-3 image" data-image="{{ .Params.image }}" style="width: 100%; height: 30vh"></div>
{{ end }}
<h1 class="display-5">{{ .Title }}</h1>
<h5 class="my-3">{{ .Params.subtitle }}</h5>
<p>
{{ if .Params.date }}
<span class="pr-4" title='{{ .Date.Format "January 2 2006" }}'>{{ .Date.Format "2006-01-02" }}</span>
<span class="pr-4" title='{{ .Date.Format "January 2 2006" }}'>{{ .Date.Format "2006-01-02" }}</span>
{{ end }}
{{ range .Params.tags }}
<a href="/tags/{{ urlize . }}" class="badge badge-dark mr-2" style="font-size: 1rem">
<i class="fa fa-tag"></i> {{ . }}
</a>
<a href="/tags/{{ urlize . }}" class="badge badge-dark mr-2" style="font-size: 1rem">
<i class="fa fa-tag"></i> {{ . }}
</a>
{{ end }}
</p>
<hr />

View file

@ -2,7 +2,7 @@
{{ if .Params.image }}
<div class="d-none d-md-block align-self-center img-wrapper mr-3">
<a href="{{ .Permalink }}">
<img src="{{ .Params.image }}" alt="{{ .Title }} image" />
<div class="image" data-image="{{ .Params.image }}"></div>
</a>
</div>
{{ end }}

View file

@ -145,8 +145,9 @@ footer {
width: 20%;
}
img {
.image {
width: 100%;
height: 10vh;
}
}