Add photos
This commit is contained in:
parent
3dcbb7158d
commit
6208758573
15 changed files with 94 additions and 0 deletions
|
@ -21,3 +21,7 @@ Certaines recettes ont été plus testées que les autres et sont *bien rodées*
|
||||||
{{< partial1 "quality_badge" "true" >}}. Elles sont normalement très fiables en
|
{{< partial1 "quality_badge" "true" >}}. Elles sont normalement très fiables en
|
||||||
termes de proportions — pour certaines, ça veut même dire que j'ai déjà fait
|
termes de proportions — pour certaines, ça veut même dire que j'ai déjà fait
|
||||||
des batches pour de l'ordre de la centaine de personnes.
|
des batches pour de l'ordre de la centaine de personnes.
|
||||||
|
|
||||||
|
Enfin, certaines recettes ont subi mes maigres talents de photographe
|
||||||
|
{{< partial1 "photo_badge" "true" >}}, et sont indiquées comme telles. Ouais,
|
||||||
|
je sais, il y a encore du boulot côté artistique.
|
||||||
|
|
|
@ -3,6 +3,7 @@ title: Tartines d'algues
|
||||||
date: 2019-07-13T10:43:40+02:00
|
date: 2019-07-13T10:43:40+02:00
|
||||||
veganness: vegan
|
veganness: vegan
|
||||||
quality: true
|
quality: true
|
||||||
|
photo: tartines_algues
|
||||||
portions:
|
portions:
|
||||||
qt: 16
|
qt: 16
|
||||||
name: tartines
|
name: tartines
|
||||||
|
|
|
@ -3,6 +3,7 @@ title: Borsch
|
||||||
date: 2020-11-06T00:40:05+01:00
|
date: 2020-11-06T00:40:05+01:00
|
||||||
veganness: "veganisable"
|
veganness: "veganisable"
|
||||||
season: winter
|
season: winter
|
||||||
|
photo: borsch
|
||||||
portions:
|
portions:
|
||||||
qt: 10
|
qt: 10
|
||||||
name: personnes
|
name: personnes
|
||||||
|
|
|
@ -25,6 +25,11 @@
|
||||||
{{ block "main" . }}
|
{{ block "main" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="main_photo">
|
||||||
|
{{ block "photo" . }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
6
layouts/partials/photo_badge.html
Normal file
6
layouts/partials/photo_badge.html
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{{- if . -}}
|
||||||
|
<span class="badge badge-photo"
|
||||||
|
title="Recette avec photo">
|
||||||
|
<i class="fa fa-camera" aria-hidden="true"></i>
|
||||||
|
</span>
|
||||||
|
{{- end -}}
|
|
@ -11,6 +11,9 @@
|
||||||
{{ with .Params.quality }}
|
{{ with .Params.quality }}
|
||||||
{{- partial "quality_badge.html" . -}}
|
{{- partial "quality_badge.html" . -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ with .Params.photo }}
|
||||||
|
{{- partial "photo_badge.html" . -}}
|
||||||
|
{{ end }}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -35,3 +35,16 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
|
{{ define "photo" }}{{ with .Params.photo }}{{ if . }}
|
||||||
|
<a
|
||||||
|
href="/img/photo/{{ . }}.orig.jpg"
|
||||||
|
title="Photo en plus grand"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
alt="Photo de la recette"
|
||||||
|
src="/img/photo/{{ . }}.min.jpg"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
{{ end }}{{ end }}{{ end }}
|
||||||
|
|
|
@ -28,6 +28,9 @@ $season_summer_color: #ff3838;
|
||||||
// Quality recipe
|
// Quality recipe
|
||||||
$quality_recipe_color: #ffee00;
|
$quality_recipe_color: #ffee00;
|
||||||
|
|
||||||
|
// Photo badge
|
||||||
|
$photo_badge_color: #7faca8;
|
||||||
|
|
||||||
// Responsiveness
|
// Responsiveness
|
||||||
$width_xlarge: 1250px;
|
$width_xlarge: 1250px;
|
||||||
$width_large: 1000px;
|
$width_large: 1000px;
|
||||||
|
|
|
@ -177,6 +177,27 @@ body {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#main_photo {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
|
||||||
|
@media (min-width: $width_large) {
|
||||||
|
margin: 50px 0;
|
||||||
|
}
|
||||||
|
margin: 25px 0;
|
||||||
|
|
||||||
|
a {
|
||||||
|
display: block;
|
||||||
|
@media (min-width: $width_large) {
|
||||||
|
width: 75%;
|
||||||
|
}
|
||||||
|
width: 85%;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#foot {
|
#foot {
|
||||||
font-size: 0.7em;
|
font-size: 0.7em;
|
||||||
color: $footer_fg_color;
|
color: $footer_fg_color;
|
||||||
|
@ -311,6 +332,11 @@ ul {
|
||||||
border-color: $quality_recipe_color;
|
border-color: $quality_recipe_color;
|
||||||
color: $quality_recipe_color;
|
color: $quality_recipe_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&-photo {
|
||||||
|
border-color: $photo_badge_color;
|
||||||
|
color: $photo_badge_color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-inner {
|
.content-inner {
|
||||||
|
|
|
@ -126,6 +126,22 @@ body {
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
font-weight: bold; }
|
font-weight: bold; }
|
||||||
|
|
||||||
|
#main_photo {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
margin: 25px 0; }
|
||||||
|
@media (min-width: 1000px) {
|
||||||
|
#main_photo {
|
||||||
|
margin: 50px 0; } }
|
||||||
|
#main_photo a {
|
||||||
|
display: block;
|
||||||
|
width: 85%; }
|
||||||
|
@media (min-width: 1000px) {
|
||||||
|
#main_photo a {
|
||||||
|
width: 75%; } }
|
||||||
|
#main_photo img {
|
||||||
|
border-radius: 10px; }
|
||||||
|
|
||||||
#foot {
|
#foot {
|
||||||
font-size: 0.7em;
|
font-size: 0.7em;
|
||||||
color: #989898;
|
color: #989898;
|
||||||
|
@ -220,6 +236,9 @@ ul {
|
||||||
.badge-quality {
|
.badge-quality {
|
||||||
border-color: #ffee00;
|
border-color: #ffee00;
|
||||||
color: #ffee00; }
|
color: #ffee00; }
|
||||||
|
.badge-photo {
|
||||||
|
border-color: #7faca8;
|
||||||
|
color: #7faca8; }
|
||||||
|
|
||||||
.content-inner figure {
|
.content-inner figure {
|
||||||
margin: 40px 0; }
|
margin: 40px 0; }
|
||||||
|
|
13
static/img/photo/Makefile
Normal file
13
static/img/photo/Makefile
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
PHOTOS_ORIG = $(wildcard *.orig.jpg)
|
||||||
|
PHOTOS_MIN = $(patsubst %.orig.jpg,%.min.jpg,$(PHOTOS_ORIG))
|
||||||
|
|
||||||
|
MIN_WIDTH = 800
|
||||||
|
CONVERT_OPTIONS = -quality 75
|
||||||
|
|
||||||
|
all: $(PHOTOS_MIN)
|
||||||
|
|
||||||
|
%.min.jpg: %.orig.jpg
|
||||||
|
convert "$<" -size '$(MIN_WIDTH)x' $(CONVERT_OPTIONS) "$@"
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.min.jpg
|
BIN
static/img/photo/borsch.min.jpg
Normal file
BIN
static/img/photo/borsch.min.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 679 KiB |
BIN
static/img/photo/borsch.orig.jpg
Normal file
BIN
static/img/photo/borsch.orig.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 MiB |
BIN
static/img/photo/tartines_algues.min.jpg
Normal file
BIN
static/img/photo/tartines_algues.min.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 554 KiB |
BIN
static/img/photo/tartines_algues.orig.jpg
Normal file
BIN
static/img/photo/tartines_algues.orig.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 MiB |
Loading…
Reference in a new issue