diff options
author | dfukagaw28 <dfukagaw28@gmail.com> | 2019-12-02 19:05:31 +0300 |
---|---|---|
committer | Guillermo Guerrero Ibarra <wolf.fox1985@gmail.com> | 2019-12-02 19:05:31 +0300 |
commit | a0b5d70608296c44781899de97cf48382fca40f5 (patch) | |
tree | daaba9b47b6dc05e20bff4dfc51db4309e973680 /layouts | |
parent | 2c951590bce77f987b14efe59647f3e48a7dd435 (diff) |
Updated with relURL (#244)
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/list.html | 10 | ||||
-rw-r--r-- | layouts/partials/footer.html | 4 | ||||
-rw-r--r-- | layouts/partials/map.html | 2 | ||||
-rw-r--r-- | layouts/partials/nav.html | 4 | ||||
-rw-r--r-- | layouts/partials/recent_posts.html | 4 | ||||
-rw-r--r-- | layouts/partials/scripts.html | 9 | ||||
-rw-r--r-- | layouts/partials/widgets/categories.html | 2 | ||||
-rw-r--r-- | layouts/partials/widgets/tags.html | 2 |
8 files changed, 19 insertions, 18 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 816c6ba..647dddc 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -30,9 +30,9 @@ <div class="image"> <a href="{{ .Permalink }}"> {{ if .Params.banner }} - <img src="{{ .Site.BaseURL}}{{ .Params.banner }}" class="img-responsive" alt=""> + <img src="{{ .Params.banner | relURL }}" class="img-responsive" alt=""> {{ else }} - <img src="{{ .Site.BaseURL}}img/placeholder.png" class="img-responsive" alt=""> + <img src="{{ "img/placeholder.png" | relURL }}" class="img-responsive" alt=""> {{ end }} </a> </div> @@ -46,7 +46,7 @@ {{ end }} {{ if isset .Params "categories" }} {{ if gt (len .Params.categories) 0 }} - in <a href="{{ $.Site.BaseURL }}categories/{{ index .Params.categories 0 | urlize | lower }}">{{ index .Params.categories 0 }}</a> + in <a href="{{ "categories/" | relURL }}{{ index .Params.categories 0 | urlize | lower }}">{{ index .Params.categories 0 }}</a> {{ end }} {{ end }} @@ -65,13 +65,13 @@ <ul class="pager"> {{ if .Paginator.HasPrev }} - <li class="previous"><a href="{{ .Site.BaseURL }}{{ .Paginator.Prev.URL }}">← {{ i18n "newer" }}</a></li> + <li class="previous"><a href="{{ .Paginator.Prev.URL | relURL }}">← {{ i18n "newer" }}</a></li> {{ else }} <li class="previous disabled"><a href="#">← {{ i18n "newer" }}</a></li> {{ end }} {{ if .Paginator.HasNext }} - <li class="next"><a href="{{ .Site.BaseURL }}{{ .Paginator.Next.URL }}">{{ i18n "older" }} →</a></li> + <li class="next"><a href="{{ .Paginator.Next.URL | relURL }}">{{ i18n "older" }} →</a></li> {{ else }} <li class="next disabled"><a href="#">{{ i18n "older" }} →</a></li> {{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index c7a880d..f037eb4 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -24,9 +24,9 @@ <div class="image same-height-always"> <a href="{{ .Permalink }}"> {{ if isset .Params "banner" }} - <img src="{{ .Site.BaseURL}}{{ .Params.banner }}" class="img-responsive" alt="{{ .Title }}"> + <img src="{{ .Params.banner | relURL }}" class="img-responsive" alt="{{ .Title }}"> {{ else }} - <img src="{{ .Site.BaseURL}}img/placeholder.png" class="img-responsive" alt="{{ .Title }}"> + <img src="{{ "img/placeholder.png" | relURL }}" class="img-responsive" alt="{{ .Title }}"> {{ end }} </a> </div> diff --git a/layouts/partials/map.html b/layouts/partials/map.html index 4b1499e..8df6c23 100644 --- a/layouts/partials/map.html +++ b/layouts/partials/map.html @@ -3,7 +3,7 @@ <div class="hidden"> <input id="gmap-lat" value="{{ .Site.Params.latitude }}" /> <input id="gmap-lng" value="{{ .Site.Params.longitude }}" /> - <input id="gmap-marker" value="{{ .Site.BaseURL }}img/marker.png" /> + <input id="gmap-marker" value="{{ "img/marker.png" | relURL }}" /> {{ if isset .Site.Params "direction" }} <input id="gmap-dir" value="{{ .Site.Params.direction }}" /> {{ else }} diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index f755fa2..83e7ab3 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -5,8 +5,8 @@ <div class="container"> <div class="navbar-header"> <a class="navbar-brand home" href="{{ .Site.BaseURL }}"> - <img src="{{ .Site.BaseURL }}{{ .Site.Params.logo }}" alt="{{ .Title }} logo" class="hidden-xs hidden-sm"> - <img src="{{ .Site.BaseURL }}{{ .Site.Params.logo_small }}" alt="{{ .Title }} logo" class="visible-xs visible-sm"> + <img src="{{ .Site.Params.logo | relURL }}" alt="{{ .Title }} logo" class="hidden-xs hidden-sm"> + <img src="{{ .Site.Params.logo_small | relURL }}" alt="{{ .Title }} logo" class="visible-xs visible-sm"> <span class="sr-only">{{ .Title }} - {{ i18n "navHome" }}</span> </a> <div class="navbar-buttons"> diff --git a/layouts/partials/recent_posts.html b/layouts/partials/recent_posts.html index 2e4eba2..b482966 100644 --- a/layouts/partials/recent_posts.html +++ b/layouts/partials/recent_posts.html @@ -22,9 +22,9 @@ <div class="top"> <div class="image" style="overflow:hidden"> {{ if isset .Params "banner" }} - <img src="{{ .Site.BaseURL}}{{ .Params.banner }}" class="img-responsive" alt="" > + <img src="{{ .Params.banner | relURL }}" class="img-responsive" alt="" > {{ else }} - <img src="{{ .Site.BaseURL}}img/placeholder.png" class="img-responsive" alt=""> + <img src="{{ "img/placeholder.png" | relURL }}" class="img-responsive" alt=""> {{ end }} </div> <div class="bg"></div> diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 33d9762..5b064fb 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -11,9 +11,10 @@ {{ else }} <script src="//maps.googleapis.com/maps/api/js?v=3.exp"></script> {{ end }} -<script src="{{ .Site.BaseURL }}js/hpneo.gmaps.js"></script> -<script src="{{ .Site.BaseURL }}js/gmaps.init.js"></script> -<script src="{{ .Site.BaseURL }}js/front.js"></script> +<script src="{{ "js/hpneo.gmaps.js" | relURL }}"></script> +<script src="{{ "js/gmaps.init.js" | relURL }}"></script> +<script src="{{ "js/front.js" | relURL }}"></script> <!-- owl carousel --> -<script src="{{ .Site.BaseURL }}js/owl.carousel.min.js"></script> +<script src="{{ "js/owl.carousel.min.js" | relURL }}"></script> + diff --git a/layouts/partials/widgets/categories.html b/layouts/partials/widgets/categories.html index 0a7e126..52fed98 100644 --- a/layouts/partials/widgets/categories.html +++ b/layouts/partials/widgets/categories.html @@ -12,7 +12,7 @@ {{ $current := . }} {{ range $name, $items := .Site.Taxonomies.categories }} <li{{ if eq $current.RelPermalink ($name | urlize | lower | printf "/categories/%s/") }} class="active"{{ end }}> - <a href="{{ $.Site.BaseURL }}categories/{{ $name | urlize | lower }}">{{ $name }} ({{ len $items }})</a> + <a href="{{ "categories/" | relURL }}{{ $name | urlize | lower }}">{{ $name }} ({{ len $items }})</a> </li> {{ end }} </ul> diff --git a/layouts/partials/widgets/tags.html b/layouts/partials/widgets/tags.html index abe986a..d6aa383 100644 --- a/layouts/partials/widgets/tags.html +++ b/layouts/partials/widgets/tags.html @@ -12,7 +12,7 @@ {{ $current := . }} {{ range $name, $items := .Site.Taxonomies.tags }} <li{{ if eq $current.RelPermalink ($name | urlize | lower | printf "/tags/%s/") }} class="active"{{ end }}> - <a href="{{ $.Site.BaseURL }}tags/{{ $name | urlize | lower }}"><i class="fas fa-tags"></i> {{ $name }}</a> + <a href="{{ "tags/" | relURL }}{{ $name | urlize | lower }}"><i class="fas fa-tags"></i> {{ $name }}</a> </li> {{ end }} </ul> |