2019-05-16 16:06:22 +00:00
|
|
|
<style>
|
|
|
|
div.gallery {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
}
|
|
|
|
div.gallery a {
|
|
|
|
flex-grow: 1;
|
|
|
|
object-fit: cover;
|
|
|
|
margin: 2px;
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
div.gallery a img {
|
|
|
|
height: 200px;
|
|
|
|
object-fit: cover;
|
|
|
|
flex-grow: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="gallery">
|
2020-01-29 09:39:46 +00:00
|
|
|
{{ $path := print "static/" (.Page.Dir) (.Get "src") }}
|
2019-05-16 16:06:22 +00:00
|
|
|
{{ $url := print .Site.BaseURL (.Get "src") }}
|
|
|
|
{{ range shuffle (.Page.Resources.ByType "image") }}
|
|
|
|
{{ if in .Name "." }}
|
|
|
|
{{ $thumb := .Fit "640x640" }}
|
|
|
|
<a href="{{ .RelPermalink }}" target="_blank">
|
|
|
|
<img src="{{ $thumb.RelPermalink }}"> <br/>
|
|
|
|
</a>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
|