Skip to content
Permalink
Browse files

Updated with relURL (#244)

  • Loading branch information
dfukagaw28 authored and ryanfox1985 committed Dec 2, 2019
1 parent 2c95159 commit a0b5d70608296c44781899de97cf48382fca40f5
@@ -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 @@ <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
{{ 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 @@ <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>

<ul class="pager">
{{ if .Paginator.HasPrev }}
<li class="previous"><a href="{{ .Site.BaseURL }}{{ .Paginator.Prev.URL }}">&larr; {{ i18n "newer" }}</a></li>
<li class="previous"><a href="{{ .Paginator.Prev.URL | relURL }}">&larr; {{ i18n "newer" }}</a></li>
{{ else }}
<li class="previous disabled"><a href="#">&larr; {{ i18n "newer" }}</a></li>
{{ end }}

{{ if .Paginator.HasNext }}
<li class="next"><a href="{{ .Site.BaseURL }}{{ .Paginator.Next.URL }}">{{ i18n "older" }} &rarr;</a></li>
<li class="next"><a href="{{ .Paginator.Next.URL | relURL }}">{{ i18n "older" }} &rarr;</a></li>
{{ else }}
<li class="next disabled"><a href="#">{{ i18n "older" }} &rarr;</a></li>
{{ end }}
@@ -24,9 +24,9 @@ <h4>{{ i18n "recentPosts" }}</h4>
<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>
@@ -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 }}
@@ -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">
@@ -22,9 +22,9 @@ <h2>{{ .Site.Params.recent_posts.title | markdownify }}</h2>
<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>
@@ -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>

@@ -12,7 +12,7 @@ <h3 class="panel-title">{{ i18n "categoriesTitle" }}</h3>
{{ $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>
@@ -12,7 +12,7 @@ <h3 class="panel-title">{{ i18n "tagsTitle" }}</h3>
{{ $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>

0 comments on commit a0b5d70

Please sign in to comment.
You can’t perform that action at this time.