Add link to original background images
parent
c5069102b1
commit
8d79666138
|
@ -10,13 +10,13 @@
|
||||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{/* Default to home image */}}
|
{{/* Default to home image */}}
|
||||||
{{ $image := resources.Get "img/home.jpg" }}
|
{{ $originalImage := resources.Get "img/home.jpg" }}
|
||||||
{{/* If header image exists in current context, use it instead */}}
|
{{/* If header image exists in current context, use it instead */}}
|
||||||
{{ with .Resources.GetMatch "top.jpg" }}
|
{{ with .Resources.GetMatch "top.jpg" }}
|
||||||
{{ $image = . }}
|
{{ $originalImage = . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $image = $image.Resize "3000x" }}
|
{{ $image := $originalImage.Resize "3000x" }}
|
||||||
{{ $image := $image | images.Filter (images.GaussianBlur 7) }}
|
{{ $image = $image | images.Filter (images.GaussianBlur 7) }}
|
||||||
{{/* tbh I am too lazy to extend Bulma, so put dirty CSS directives here to be able to use Hugo templating system */}}
|
{{/* tbh I am too lazy to extend Bulma, so put dirty CSS directives here to be able to use Hugo templating system */}}
|
||||||
<style>
|
<style>
|
||||||
.has-bg-img {
|
.has-bg-img {
|
||||||
|
|
|
@ -6,13 +6,13 @@
|
||||||
{{ $home := eq "home" .Kind }}
|
{{ $home := eq "home" .Kind }}
|
||||||
<header>
|
<header>
|
||||||
<section
|
<section
|
||||||
class='hero has-text-centered {{ if $background }}is-info has-bg-img {{ if $page }}is-large{{ else if $home }}is-medium{{ end }}{{ end }}'>
|
class='hero has-text-centered {{ if $background }}is-info has-bg-img {{ if $page }}is-medium{{ else if $home }}is-medium{{ end }}{{ end }}'>
|
||||||
<div class="hero-head mx-5">
|
<div class="hero-head mx-5">
|
||||||
<div class="level mt-4">
|
<div class="level mt-4">
|
||||||
<div class="level-left">
|
<div class="level-left">
|
||||||
{{ with .Params.imgLicence }}
|
{{ with .Params.imgLicence }}
|
||||||
<p class="level-item subtitle is-size-5-desktop is-size-7-mobile">
|
<p class="level-item subtitle is-size-5-desktop is-size-7-mobile">
|
||||||
Image d'illustration {{ . | markdownify }}
|
<a href='{{ with $.Resources.GetMatch "top.jpg" }}{{ . }}{{ end }}'>Image d'illustration</a> : {{ . | markdownify }}
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-item has-dropdown is-hoverable">
|
<div class="navbar-item has-dropdown is-hoverable">
|
||||||
<a class="navbar-link">
|
<a class="navbar-link">
|
||||||
Dossiers
|
Dossiers thématiques
|
||||||
</a>
|
</a>
|
||||||
<div class="navbar-dropdown">
|
<div class="navbar-dropdown">
|
||||||
{{ range where .Site.Pages "Params.code" "!=" nil }}
|
{{ range where .Site.Pages "Params.code" "!=" nil }}
|
||||||
|
|
|
@ -80,4 +80,15 @@ body {
|
||||||
|
|
||||||
.content figure:not(:last-child) {
|
.content figure:not(:last-child) {
|
||||||
margin-bottom: 1em !important;
|
margin-bottom: 1em !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Let links have a color in hero contents
|
||||||
|
so visitors can see them */
|
||||||
|
.hero .subtitle a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: #dff5fb !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
Loading…
Reference in New Issue