Skip to content

Commit

Permalink
Make homepage URL the base URL
Browse files Browse the repository at this point in the history
  • Loading branch information
keanemind committed Jun 2, 2018
1 parent e7ddfa2 commit 7857c5a
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 35 deletions.
10 changes: 3 additions & 7 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<head>
{{ range .Site.Params.navlinks }}
{{ if .home }}
<meta http-equiv="refresh" content="0; URL={{ .url | absURL }}" />
{{ end }}
{{ end }}
</head>
{{ define "main" }}
{{ partial "portfolio.html" . }}
{{ end }}
90 changes: 62 additions & 28 deletions layouts/partials/portfolio.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,71 @@
{{ partial "mobile_nav_toggle.html" . }}
<div class="grid">
<div class="row">
{{ range .Data.Pages }}
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 masonry-item">
<div class="box-masonry">
{{ if and (isset .Params "image") .Params.image }}
{{ if not (eq .URL "/")}}
{{ range .Data.Pages }}
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 masonry-item">
<div class="box-masonry">
{{ if and (isset .Params "image") .Params.image }}
{{ if eq .Params.showonlyimage true }}
<a href="{{ .Permalink }}" title="" class="box-masonry-image with-hover-overlay">
{{ else }}
<a href="{{ .Permalink }}" title="" class="box-masonry-image with-hover-overlay with-hover-icon">
{{ end }}
<img src="{{.Site.BaseURL}}{{ .Params.image }}" alt="" class="img-responsive">
</a>
{{ end }}
{{ if eq .Params.showonlyimage true }}
<div class="box-masonry-hover-text-header">
{{ else }}
<div class="box-masonry-text">
{{ end }}
<h4><a href="{{ .Permalink }}">{{ .Title }}</a></h4>
<div class="box-masonry-description">
<p>
{{ if .Description }}
{{ .Description }}
{{ else }}
{{ .Summary }}
{{ end }}
</p>
</div>
</div>
</div>
</div>
{{ end }}
{{ else }}
{{ range (where .Data.Pages "Section" "home-portfolio") }}
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 masonry-item">
<div class="box-masonry">
{{ if and (isset .Params "image") .Params.image }}
{{ if eq .Params.showonlyimage true }}
<a href="{{ .Permalink }}" title="" class="box-masonry-image with-hover-overlay">
{{ else }}
<a href="{{ .Permalink }}" title="" class="box-masonry-image with-hover-overlay with-hover-icon">
{{ end }}
<img src="{{.Site.BaseURL}}{{ .Params.image }}" alt="" class="img-responsive">
</a>
{{ end }}
{{ if eq .Params.showonlyimage true }}
<a href="{{ .Permalink }}" title="" class="box-masonry-image with-hover-overlay">
<div class="box-masonry-hover-text-header">
{{ else }}
<a href="{{ .Permalink }}" title="" class="box-masonry-image with-hover-overlay with-hover-icon">
<div class="box-masonry-text">
{{ end }}
<img src="{{.Site.BaseURL}}{{ .Params.image }}" alt="" class="img-responsive">
</a>
{{ end }}
{{ if eq .Params.showonlyimage true }}
<div class="box-masonry-hover-text-header">
{{ else }}
<div class="box-masonry-text">
{{ end }}
<h4><a href="{{ .Permalink }}">{{ .Title }}</a></h4>
<div class="box-masonry-description">
<p>
{{ if .Description }}
{{ .Description }}
{{ else }}
{{ .Summary }}
{{ end }}
</p>
</div>
</div>
</div>
</div>
{{ end }}
<h4><a href="{{ .Permalink }}">{{ .Title }}</a></h4>
<div class="box-masonry-description">
<p>
{{ if .Description }}
{{ .Description }}
{{ else }}
{{ .Summary }}
{{ end }}
</p>
</div>
</div>
</div>
</div>
{{ end }}
{{ end }}
</div>
</div>
</div>

0 comments on commit 7857c5a

Please sign in to comment.