Skip to content

Commit

Permalink
Fix misaligned stuff at bottom of episodes
Browse files Browse the repository at this point in the history
Fixes #87
  • Loading branch information
mattstratton committed May 19, 2017
1 parent 929651c commit b904f61
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 74 deletions.
29 changes: 11 additions & 18 deletions config.codekit3
Original file line number Diff line number Diff line change
Expand Up @@ -4749,24 +4749,6 @@
"rFN": 0,
"uCM": 0
},
"\/exampleSite\/content\/episode\/april.md": {
"cS": 0,
"eF": 1,
"eL": 1,
"eLB": 0,
"ema": 1,
"eSQ": 1,
"ft": 4096,
"oA": 1,
"oAP": "\/exampleSite\/content\/episode\/april.html",
"oF": 0,
"oFM": 0,
"oS": 0,
"pHT": 0,
"pME": 1,
"rFN": 0,
"uCM": 0
},
"\/exampleSite\/content\/episode\/aug.md": {
"cS": 0,
"eF": 1,
Expand Down Expand Up @@ -7705,6 +7687,17 @@
"opt": 0,
"q": 100
},
"\/exampleSite\/static\/img\/host\/matt.png": {
"ft": 32768,
"iS": 66491,
"oA": 0,
"oAP": "\/exampleSite\/static\/img\/host\/matt.png",
"oF": 0,
"oIPL": 0,
"opt": 0,
"oT": 1,
"q": 100
},
"\/images\/screenshot-v01.png": {
"ft": 32768,
"iS": 545100,
Expand Down
4 changes: 2 additions & 2 deletions layouts/about/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ <h2>Hosts</h2>
<div class="row person_row">
<div class="col-md-3">
{{ if (eq (slicestr $p.thumbnail 0 4) "http") }}
<img alt = "{{ $p.name }}" src = "{{ $p.thumbnail }}" class="img-responsive">
<img alt = "{{ $p.name }}" src = "{{ $p.thumbnail }}" class="img-fluid">
{{ else }}
<img alt = "{{ $p.name }}" src = "{{ $p.thumbnail | absURL }}" class="img-responsive">
<img alt = "{{ $p.name }}" src = "{{ $p.thumbnail | absURL }}" class="img-fluid">
{{ end }}
</div>
<div class= "col-md-6">
Expand Down
109 changes: 55 additions & 54 deletions layouts/episode/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h1>{{ title .Title }}</h1>
</div>
<div class = "row">
<div class = "col">
{{ .Description | markdownify }}
{{ .Description | markdownify }}
</div>
</div>
{{ end }}
Expand Down Expand Up @@ -63,87 +63,87 @@ <h2>Guests</h2>
</div>
{{ range $name := . }}
{{ $.Scratch.Set "person" $name }}
{{ range where $.Site.Pages "Type" "guest" }}
{{ if eq .File.BaseFileName ($.Scratch.Get "person") }}
{{ $.Scratch.Set "guest-exist" "true" }}
{{- range where $.Site.Pages "Type" "guest" -}}
{{- if eq .File.BaseFileName ($.Scratch.Get "person") -}}
{{- $.Scratch.Set "guest-exist" "true" -}}
<div class="row person_row">
<div class="col-md-3">
{{ if and (isset .Params "thumbnail") (ne .Params.thumbnail "") }}
{{ if (eq (slicestr .Params.thumbnail 0 4) "http") }}
<img alt="{{ .Title }}" src="{{ .Params.thumbnail }}" class="img-responsive" width="250px">
{{ else }}
<img alt="{{ .Title }}" src="{{ .Params.thumbnail | absURL}}" class="img-responsive" width="250px">
{{ end }}
{{ else }}
<img alt="{{ .Title }}" src="{{ "img/guest/default-guest.png" | absURL }}" class="img-responsive" width="250px"/>
{{ end }}
{{- if and (isset .Params "thumbnail") (ne .Params.thumbnail "") -}}
{{- if (eq (slicestr .Params.thumbnail 0 4) "http") -}}
<img alt="{{ .Title }}" src="{{ .Params.thumbnail }}" class="img-fluid" width="250px">
{{- else -}}
<img alt="{{ .Title }}" src="{{ .Params.thumbnail | absURL}}" class="img-fluid" width="250px">
{{- end -}}
{{- else -}}
<img alt="{{ .Title }}" src="{{ "img/guest/default-guest.png" | absURL }}" class="img-fluid" width="250px"/>
{{- end -}}
</div>
<div class="col-md-8">
<h2><a href = "{{(printf "guest/%s" .File.BaseFileName) | absURL }}">{{ .Title }}</a></h2>
{{ .Content }}
{{ if .Params.Website }}
<a href="{{ .Params.Website }}">
{{- with .Params.Website -}}
<a href="{{ . }}">
<i class="fa fa-home fa-2x"></i>
</a>
{{ end }}
{{ if .Params.Twitter }}
<a href="https://twitter.com/{{ .Params.Twitter }}">
{{- end -}}
{{- with .Params.Twitter -}}
<a href="https://twitter.com/{{ . }}">
<i class="fa fa-twitter-square fa-2x"></i>
</a>
{{ end }}
{{ if .Params.GitHub }}
<a href="https://github.com/{{ .Params.GitHub}}">
{{- end -}}
{{- with .Params.GitHub -}}
<a href="https://github.com/{{ . }}">
<i class="fa fa-github-square fa-2x"></i>
</a>
{{ end }}
{{ if .Params.LinkedIn }}
<a href="https://www.linkedin.com/in/{{ .Params.LinkedIn}}">
{{- end -}}
{{- with .Params.LinkedIn -}}
<a href="https://www.linkedin.com/in/{{ . }}">
<i class="fa fa-linkedin-square fa-2x"></i>
</a>
{{ end }}
{{ if .Params.Facebook }}
<a href="https://www.facebook.com/{{ .Params.Facebook}}">
{{- end -}}
{{- with .Params.Facebook -}}
<a href="https://www.facebook.com/{{ . }}">
<i class="fa fa-facebook-square fa-2x"></i>
</a>
{{ end }}
{{ if .Params.Pinterest }}
<a href="https://www.pinterest.com/{{ .Params.Pinterest}}">
{{- end -}}
{{- with .Params.Pinterest -}}
<a href="https://www.pinterest.com/{{ . }}">
<i class="fa fa-pinterest-square fa-2x"></i>
</a>
{{ end }}
{{ if .Params.Instagram }}
<a href="https://www.instagram.com/{{ .Params.Instagram}}">
{{- end -}}
{{- with .Params.Instagram -}}
<a href="https://www.instagram.com/{{ . }}">
<i class="fa fa-instagram fa-2x"></i>
</a>
{{ end }}
{{ if .Params.YouTube }}
<a href="https://www.youtube.com/{{ .Params.YouTube}}">
{{- end -}}
{{- with .Params.YouTube -}}
<a href="https://www.youtube.com/{{ . }}">
<i class="fa fa-youtube-square fa-2x"></i>
</a>
{{ end }}
{{- end -}}
</div>
</div>
</div>
{{- $.Scratch.Set "guest-exist" "false" -}}
{{ end }}
{{ end }}
{{ if ne ($.Scratch.Get "guest-exist") "true"}}
{{ if (isset $.Site.Data.guests ($.Scratch.Get "person")) }}
{{ $p := (index $.Site.Data.guests ($.Scratch.Get "person")) }}
{{- end -}}
{{- end -}}
{{- if ne ($.Scratch.Get "guest-exist") "true" -}}
{{- if (isset $.Site.Data.guests ($.Scratch.Get "person")) -}}
{{- $p := (index $.Site.Data.guests ($.Scratch.Get "person")) -}}
<div class="row person_row">
<div class="col-md-3">
{{ if and (isset $p "thumbnail") (ne $p.thumbnail "") }}
{{ if (eq (slicestr $p.thumbnail 0 4) "http") }}
<img alt = "{{ $p.full_name }}" src = "{{ $p.thumbnail}}" class="img-responsive" width = "250px">
{{ else }}
<img alt = "{{ $p.full_name }}" src = "{{ $.Site.BaseURL }}{{ $p.thumbnail}}" class="img-responsive" width = "250px">
{{ end }}
{{ else }}
<img alt = "{{ $p.full_name }}" src = "{{ $.Site.BaseURL }}/img/guest/default-guest.png" class="img-responsive" width = "250px" />
{{ end }}
{{- if and (isset $p "thumbnail") (ne $p.thumbnail "") -}}
{{- if (eq (slicestr $p.thumbnail 0 4) "http") -}}
<img alt = "{{ $p.full_name }}" src = "{{ $p.thumbnail}}" class="img-fluid" width = "250px">
{{- else -}}
<img alt = "{{ $p.full_name }}" src = "{{ $p.thumbnail | absURL }}" class="img-fluid" width = "250px">
{{- end -}}
{{- else -}}
<img alt = "{{ $p.full_name }}" src = "{{ "img/guest/default-guest.png" | absURL }}" class="img-fluid" width = "250px" />
{{- end -}}
</div>
<div class= "col-md-8">
<h2>{{ $p.full_name }}</h2>
{{ if isset $p "bio" }}
{{- if isset $p "bio" -}}
<p>{{ $p.bio | markdownify }}</p>
{{ end }}
{{ if isset $p "homepage" }}
Expand All @@ -162,8 +162,9 @@ <h2>{{ $p.full_name }}</h2>
<a href = "{{ $p.Facebook}}"><i class="fa fa-facebook-square fa-2x"></i></a>
{{ end }}
</div>
{{ end }}
</div>
{{ end }}

{{ end }}
{{ end }}
{{ end }}
Expand Down

0 comments on commit b904f61

Please sign in to comment.