Skip to content

Commit

Permalink
Make image optional on row layout
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstratton committed May 11, 2017
1 parent 38e738f commit 679248a
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 15 deletions.
2 changes: 1 addition & 1 deletion exampleSite/content/episode/aug.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
Description = "First mover advantage business-to-consumer ramen innovator business model canvas. Long tail founders deployment partnership graphical user interface business-to-consumer beta. Non-disclosure agreement technology monetization. Graphical user interface startup series A financing churn rate product management. Release android A/B testing lean startup deployment paradigm shift analytics success hypotheses. Low hanging fruit facebook network effects. Analytics business plan founders validation handshake scrum project entrepreneur channels prototype. Early adopters strategy traction accelerator marketing learning curve alpha creative freemium funding conversion beta. Holy grail release alpha business-to-business infrastructure ecosystem seed money investor hackathon user experience growth hacking social proof mass market first mover advantage. Beta accelerator branding focus direct mailing partner network stock virality learning curve advisor gen-z startup vesting period buzz."
Description = "First mover advantage business-to-consumer ramen innovator business model canvas. Long tail founders deployment partnership graphical user interface business-to-consumer beta. Non-disclosure agreement technology monetization. Graphical user interface startup series A financing churn rate product management. Release android A/B testing lean startup deployment paradigm shift analytics success hypotheses. Low hanging fruit facebook network effects."
aliases = ["/11"]
author = "Matt"
categories = []
Expand Down
56 changes: 42 additions & 14 deletions layouts/partials/row.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h2>
</div>
<div class = "row homepage_episode_row">
<div class = "col">
{{ .Description | markdownify }}
{{ .Description | markdownify | truncate 600 " "}}&nbsp;<small><a href = "{{ .Permalink }}">Read More</a></small>
</div>
</div>

Expand All @@ -34,14 +34,28 @@ <h2>
<small>Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }}</small>
</div>
</div>
<div class = "row homepage_episode_row">
<div class = "col-md-4">
<img class = "homepage_thumbnail img-rounded" src = "{{ .Params.episode_image | absURL }}" />
</div>
<div class = "col-md-8">
<p class = "hompage_episode_description">{{ .Description | markdownify}}</p>
{{ if .Params.episode_image }}
<div class = "row homepage_episode_row">
<div class = "col-md-3">
<img class = "homepage_thumbnail img-rounded" src = "{{ .Params.episode_image | absURL }}" />
</div>
<div class = "col-md-8">
{{ if ge (countrunes .Description ) 600 }}
<p class = "hompage_episode_description">{{ .Description | markdownify | truncate 600 " "}}&nbsp;<small><a href = "{{ .Permalink }}">Read More</a></small></p>
{{ else }}
<p class = "hompage_episode_description">{{ .Description | markdownify }}</p>
{{ end }}
</div>
</div><!-- end square row -->
{{ else }}
<div class = "col">
{{ if ge (countrunes .Description ) 600 }}
<p class = "hompage_episode_description">{{ .Description | markdownify | truncate 900 " "}}&nbsp;<small><a href = "{{ .Permalink }}">Read More</a></small></p>
{{ else }}
<p class = "hompage_episode_description">{{ .Description | markdownify }}</p>
{{ end }}
</div>
</div><!-- end square row -->
{{ end }}
{{ end }}
<div class = "row">
<div class = "col-md-12">
Expand All @@ -68,13 +82,27 @@ <h2>
</div>
</div>
<div class = "row homepage_episode_row">
<div class = "col-md-4">
<img class = "homepage_thumbnail img-rounded" src = "{{ .Params.episode_image | absURL }}" />
{{ if .Params.episode_image}}
<div class = "col-md-4">
<img class = "homepage_thumbnail img-rounded" src = "{{ .Params.episode_image | absURL }}" />
</div>
<div class = "col-md-8">
{{ if ge (countrunes .Description ) 600 }}
<p class = "hompage_episode_description">{{ .Description | markdownify | truncate 600 " "}}&nbsp;<small><a href = "{{ .Permalink }}">Read More</a></small></p>
{{ else }}
<p class = "hompage_episode_description">{{ .Description | markdownify }}</p>
{{ end }}
</div>
{{ else }}
<div class = "col">
{{ if ge (countrunes .Description ) 900 }}
<p class = "hompage_episode_description">{{ .Description | markdownify | truncate 900 " "}}&nbsp;<small><a href = "{{ .Permalink }}">Read More</a></small></p>
{{ else }}
<p class = "hompage_episode_description">{{ .Description | markdownify }}</p>
{{ end }}
</div>
{{ end }}
</div>
<div class = "col-md-8">
<p class = "hompage_episode_description">{{ .Description | markdownify}}</p>
</div>
</div>
<div class = "row homepage_episode_row">
<div class = "col-md-12 player_row">
<audio src="{{ .Site.Params.media_prefix }}{{ .Params.podcast_file }}" preload="auto" />
Expand Down

0 comments on commit 679248a

Please sign in to comment.