Browse Source

Layout: ajout d'un champ "source"

Théophile Bastian 7 months ago
parent
commit
2a63d4e9de
4 changed files with 22 additions and 0 deletions
  1. 4 0
      layouts/partials/source.html
  2. 6 0
      layouts/recettes/single.html
  3. 7 0
      scss/style.scss
  4. 5 0
      static/css/style.css

+ 4 - 0
layouts/partials/source.html

@@ -0,0 +1,4 @@
+Source ou inspiration :
+{{ with .url -}}<a href="{{ . }}" >{{- end }}
+  {{- with .name -}}{{ . }}{{- else -}}{{ .url }}{{- end -}}
+{{- with .url -}}</a>{{- end }}

+ 6 - 0
layouts/recettes/single.html

@@ -30,6 +30,12 @@
       {{ end }}{{ end }}
     </div>
   </div>
+
+  {{ with .Params.source }}
+  <div class="source">
+    {{ partial "source" . }}
+  </div>
+  {{ end }}
 {{ end }}
 
 {{ define "main" }}

+ 7 - 0
scss/style.scss

@@ -180,6 +180,13 @@ body {
     font-size: 1.5em;
     font-weight: bold;
   }
+
+  .source {
+    margin-top: 15px;
+    text-align: right;
+    font-size: 0.9em;
+    font-style: italic;
+  }
 }
 
 #main_photo {

+ 5 - 0
static/css/style.css

@@ -128,6 +128,11 @@ body {
   #content #pagename {
     font-size: 1.5em;
     font-weight: bold; }
+  #content .source {
+    margin-top: 15px;
+    text-align: right;
+    font-size: 0.9em;
+    font-style: italic; }
 
 #main_photo {
   display: flex;