Replace title on first page by some thumbnails defined in config
This commit is contained in:
parent
eb3cf1d783
commit
db7bf2c885
@ -1,17 +1,18 @@
|
|||||||
{{- partial "load-photoswipe-theme.html" . }}
|
{{- partial "load-photoswipe-theme.html" . }}
|
||||||
|
|
||||||
{{ if .IsHome }}
|
{{ if .IsHome }}
|
||||||
{{ if .Site.Params.homeTitle }}{{ $.Scratch.Set "title" .Site.Params.homeTitle }}{{ else }}{{ $.Scratch.Set "title" .Site.Title }}{{ end }}
|
|
||||||
{{ if .Site.Params.subtitle }}{{ $.Scratch.Set "subtitle" .Site.Params.subtitle }}{{ end }}
|
|
||||||
{{ if .Site.Params.bigimg }}{{ $.Scratch.Set "bigimg" .Site.Params.bigimg }}{{ end }}
|
{{ if .Site.Params.bigimg }}{{ $.Scratch.Set "bigimg" .Site.Params.bigimg }}{{ end }}
|
||||||
|
{{ if .Site.Params.thumb }}{{ $.Scratch.Set "thumb" .Site.Params.thumb }}{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $.Scratch.Set "title" .Title }}
|
{{ $.Scratch.Set "title" .Title }}
|
||||||
{{ if .Params.subtitle }}{{ $.Scratch.Set "subtitle" .Params.subtitle }}{{ end }}
|
{{ if .Params.subtitle }}{{ $.Scratch.Set "subtitle" .Params.subtitle }}{{ end }}
|
||||||
{{ if .Params.bigimg }}{{ $.Scratch.Set "bigimg" .Params.bigimg }}{{ end }}
|
{{ if .Params.bigimg }}{{ $.Scratch.Set "bigimg" .Params.bigimg }}{{ end }}
|
||||||
|
{{ if .Params.thumb }}{{ $.Scratch.Set "thumb" .Params.thumb }}{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $bigimg := $.Scratch.Get "bigimg" }}
|
{{ $bigimg := $.Scratch.Get "bigimg" }}
|
||||||
{{ $title := $.Scratch.Get "title" }}
|
{{ $title := $.Scratch.Get "title" }}
|
||||||
{{ $subtitle := $.Scratch.Get "subtitle" }}
|
{{ $subtitle := $.Scratch.Get "subtitle" }}
|
||||||
|
{{ $thumbs := $.Scratch.Get "thumb" }}
|
||||||
|
|
||||||
{{ if or $bigimg $title }}
|
{{ if or $bigimg $title }}
|
||||||
{{ if $bigimg }}
|
{{ if $bigimg }}
|
||||||
@ -85,3 +86,16 @@
|
|||||||
{{ else }}
|
{{ else }}
|
||||||
<div class="intro-header"></div>
|
<div class="intro-header"></div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ if $thumbs }}
|
||||||
|
<div class="container">
|
||||||
|
{{range $i, $thumb := $thumbs}}
|
||||||
|
<a href="{{ $thumb.link | absURL }}" target="_blank">
|
||||||
|
<div class="thumbApp" style="background-image:url('{{ $thumb.src | absURL }}')">
|
||||||
|
{{ if $thumb.desc }}<p>{{ $thumb.desc }}</p>{{end}}
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
<span style="clear:both; display: block"></span>
|
||||||
|
<hr class="small">
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
@ -139,6 +139,43 @@ img {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.thumbApp {
|
||||||
|
background-position: 50% 50%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
border-radius: 15px 1px 15px 1px;
|
||||||
|
box-shadow: 0px 0px 10px #555;
|
||||||
|
font-family: "Linux Biolinum O", 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||||
|
height: 200px;
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
margin-right: 0.5%;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
width: 24.5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.thumbApp p {
|
||||||
|
background-color: rgba(0,0,0,0.7);
|
||||||
|
border-bottom: solid #333 1px;
|
||||||
|
color: white;
|
||||||
|
font-weight: bolder;
|
||||||
|
margin-top: 130px;
|
||||||
|
padding: 10px;
|
||||||
|
line-height: 1.0;
|
||||||
|
}
|
||||||
|
.thumbApp p a {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.thumbApp img {
|
||||||
|
border-radius: inherit;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.thumbApp .legend {
|
||||||
|
background: #ddd;
|
||||||
|
margin-top: -1em;
|
||||||
|
width: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
/* --- Navbar --- */
|
/* --- Navbar --- */
|
||||||
|
|
||||||
.navbar-custom {
|
.navbar-custom {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user