aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFélix Sipma <felix.sipma@no-log.org>2018-02-07 17:08:39 +0100
committerFélix Sipma <felix.sipma@no-log.org>2018-02-07 17:08:54 +0100
commit60e4e53fc7b936b571a6d58dfa801a7d9b32b97a (patch)
tree9293017a134820f9f82680efe722bc9e0d4ce5ba
parent28bb5e6450c6f50cef5d805e77d09691c02d3752 (diff)
put address in a partial template
-rw-r--r--content/_index.md7
-rw-r--r--layouts/index.html12
-rw-r--r--layouts/partials/address.html11
3 files changed, 13 insertions, 17 deletions
diff --git a/content/_index.md b/content/_index.md
index 69049fd..395ed16 100644
--- a/content/_index.md
+++ b/content/_index.md
@@ -8,10 +8,3 @@ menu: "main"
## Date d'inauguration du fournil : mardi 13 février
Le magasin est ouvert **du mardi au samedi, de 16h30 à 19h30**
-
-<address>
-<span>16 rue des Sapins</span>
-<span>27620 Gasny</span>
-<span>+33 6 27 20 30 72</span>
-<a href="mailto:fournilsipma@gmail.com">fournilsipma@gmail.com</a>
-</address>
diff --git a/layouts/index.html b/layouts/index.html
index 819924c..f881238 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -25,16 +25,7 @@
<div class="header">
<div class="logo">
<img class="logo-img" src="{{ .Site.BaseURL }}img/logo_pain_transparent.png" alt="logo">
- <address>
- <span class="title">{{ .Site.Title }}</span>
- {{ range $address := .Site.Params.Address }}
- <span class="address">{{ $address }}</span>
- {{ end }}
- <span class="phone">{{ .Site.Params.Phone }}</span>
- <span class="email">
- <a href="mailto:{{ .Site.Params.Email }}">{{ .Site.Params.Email }}</a>
- </span>
- </address>
+ {{ partial "address.html" . }}
</div>
</div>
{{ end}}
@@ -43,6 +34,7 @@
<div class="vertical-align">
<div class="banner">
{{ .Content }}
+ {{ partial "address.html" . }}
<div id="fournilmap"></div>
</div>
</div>
diff --git a/layouts/partials/address.html b/layouts/partials/address.html
new file mode 100644
index 0000000..5d622dc
--- /dev/null
+++ b/layouts/partials/address.html
@@ -0,0 +1,11 @@
+<address>
+ {{ range $address := .Site.Params.Address }}
+ <span class="address">{{ $address }}</span>
+ {{ end }}
+ <span class="phone">
+ <a href="tel:{{ .Site.Params.Phone }}">{{ .Site.Params.Phone }}</a>
+ </span>
+ <span class="email">
+ <a href="mailto:{{ .Site.Params.Email }}">{{ .Site.Params.Email }}</a>
+ </span>
+</address>