Skip to content

Commit

Permalink
Updated with relURL (devcows#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfukagaw28 authored and ryanfox1985 committed Dec 2, 2019
1 parent 2c95159 commit a0b5d70
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 18 deletions.
10 changes: 5 additions & 5 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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 }}

Expand All @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/map.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/recent_posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
9 changes: 5 additions & 4 deletions layouts/partials/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>

2 changes: 1 addition & 1 deletion layouts/partials/widgets/categories.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/widgets/tags.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit a0b5d70

Please sign in to comment.