added optional jumbotron on home page

This commit is contained in:
Gabriele Musco 2021-05-04 15:21:14 +02:00
parent 0be6633185
commit 083901e517
No known key found for this signature in database
GPG key ID: 8539FD3454380B83
4 changed files with 91 additions and 1 deletions

View file

@ -528,3 +528,61 @@ header {
}
}
{{ end }}
{{ if (and (.Site.Params.enableJumbotron | default false) .Site.Data.jumbotron) }}
header {
.jumbotron { display: none; }
margin-top: -15px;
margin-left: -15px;
margin-right: -15px;
padding-top: 15px;
padding-left: 15px;
padding-right: 15px;
}
header.jumbotronContainer {
.jumbotron { display: flex; }
{{ if .Site.Data.jumbotron.background }}
background:
linear-gradient(
transparentize($bg_color, 0.2),
transparentize($bg_color, 0.2)
),
url({{ .Site.Data.jumbotron.background }});
background-size: cover;
background-position: center;
background-repeat: no-repeat;
{{ else }}
background-color: rgba(0, 0, 0, .3);
{{ end }}
}
.jumbotron {
top: 0;
left: 0;
width: 100%;
min-height: 40vh;
flex-direction: column;
text-align: center;
justify-content: center;
align-items: center;
h1 {
font-weight: 300;
}
ul {
list-style: none;
padding: 0;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
li {
margin: 3px;
a {
{{ if eq .Site.Params.navType "circles" }}
@include buttonLikeLink;
background-color: transparentize($highlight_bg_color, .3);
{{ end }}
}
}
}
}
{{ end }}