aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFélix Sipma <felix.sipma@no-log.org>2018-02-08 08:57:24 +0100
committerFélix Sipma <felix.sipma@no-log.org>2018-02-08 08:57:24 +0100
commit777b6b926fae6475ff76694d8ceacaa42949763f (patch)
treec10b7449a26559aea213b5c2be0a69f0cbbc071e
parent5b6963677af7c05e0cd13eed3e8abfc9b9d644a9 (diff)
use relURL instead of .Site.BaseURL
-rw-r--r--layouts/_default/baseof.html16
-rw-r--r--layouts/index.html18
-rw-r--r--layouts/shortcodes/image.html2
3 files changed, 18 insertions, 18 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 9408829..3768a20 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -5,16 +5,16 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<title>{{ block "title" . }}{{ .Site.Title }} - {{ .Title }}{{ end }}</title>
{{ block "head" . }}{{ end }}
- <link href="{{ .Site.BaseURL }}css/bootstrap.min.css" rel="stylesheet" type="text/css">
- <link href="{{ .Site.BaseURL }}css/fournil.css" rel="stylesheet" type="text/css">
+ <link href="{{ "css/bootstrap.min.css" | relURL }}" rel="stylesheet" type="text/css">
+ <link href="{{ "css/fournil.css" | relURL }}" rel="stylesheet" type="text/css">
</head>
<body>
{{ block "header" . }}
{{ end }}
{{ block "menu" .}}
<nav id="fournil-nav" class="navbar navbar-expand-sm navbar-light bg-light sticky-top{{ block "fournil-nav-classes" . }}{{ end }}">
- <a class="navbar-brand" href={{ .Site.BaseURL }}>
- <img src="{{ .Site.BaseURL }}/img/logo_pain_transparent.png">
+ <a class="navbar-brand" href={{ "/" | relURL }}>
+ <img src="{{ "img/logo_pain_transparent.png" | relURL }}">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Afficher/Cacher le menu">
<span class="navbar-toggler-icon"></span>
@@ -35,10 +35,10 @@
{{ block "main" . }}
{{ end }}
</div>
- <script src="{{ .Site.BaseURL }}js/jquery.min.js"></script>
- <script src="{{ .Site.BaseURL }}js/popper.min.js"></script>
- <script src="{{ .Site.BaseURL }}js/util.js"></script>
- <script src="{{ .Site.BaseURL }}js/collapse.js"></script>
+ <script src="{{ "js/jquery.min.js" | relURL }}"></script>
+ <script src="{{ "js/popper.min.js" | relURL }}"></script>
+ <script src="{{ "js/util.js" | relURL }}"></script>
+ <script src="{{ "js/collapse.js" | relURL }}"></script>
{{ block "footer" . }}
{{ end }}
</body>
diff --git a/layouts/index.html b/layouts/index.html
index 402a290..26cbec8 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,5 +1,5 @@
{{ define "head" }}
-<link href="{{ .Site.BaseURL }}css/leaflet.css" rel="stylesheet" type="text/css">
+<link href="{{ "css/leaflet.css" | relURL }}" rel="stylesheet" type="text/css">
{{ end }}
{{ define "footer" }}
@@ -16,11 +16,11 @@
}
});
</script>
-<script src="{{ .Site.BaseURL }}js/leaflet.js"></script>
-<script src="{{ .Site.BaseURL }}js/jquery.min.js"></script>
-<script src="{{ .Site.BaseURL }}js/util.js"></script>
-<script src="{{ .Site.BaseURL }}js/dropdown.js"></script>
-<script src="{{ .Site.BaseURL }}js/fournil-map.js"></script>
+<script src="{{ "js/leaflet.js" | relURL }}"></script>
+<script src="{{ "js/jquery.min.js" | relURL }}"></script>
+<script src="{{ "js/util.js" | relURL }}"></script>
+<script src="{{ "js/dropdown.js" | relURL }}"></script>
+<script src="{{ "js/fournil-map.js" | relURL }}"></script>
{{ end }}
{{ define "fournil-nav-classes" }} fournil-nologo-nav{{ end }}
@@ -29,14 +29,14 @@
<div id="fournil-header" class="header">
<div class="fournil-logo-bio">
<span>
- <img src="{{ .Site.BaseURL }}img/AB.svg" alt="logo AB" onerror="this.src='{{ .Site.BaseURL }}img/AB.png'">
+ <img src="{{ "img/AB.svg" | relURL }}" alt="logo AB" onerror="this.src='{{ "img/AB.png" | relURL }}'">
</span>
<span>
- <img src="{{ .Site.BaseURL }}img/EU_Organic.svg" alt="logo bio EU" onerror="this.src='{{ .Site.BaseURL }}img/EU_Organic.png'">
+ <img src="{{ "img/EU_Organic.svg" | relURL }}" alt="logo bio EU" onerror="this.src='{{ "img/EU_Organic.png" | relURL }}'">
</span>
</div>
<div class="fournil-logo">
- <img class="fournil-logo-img" src="{{ .Site.BaseURL }}img/logo_pain_transparent.png" alt="logo">
+ <img class="fournil-logo-img" src="{{ "img/logo_pain_transparent.png" | relURL }}" alt="logo">
{{ partial "address.html" . }}
</div>
</div>
diff --git a/layouts/shortcodes/image.html b/layouts/shortcodes/image.html
index be38077..83689de 100644
--- a/layouts/shortcodes/image.html
+++ b/layouts/shortcodes/image.html
@@ -1 +1 @@
-{{ .Site.Params.BaseURL }}img/
+{{- "img/" | relURL -}}