Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mattstratton/castanet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Stratton <matt.stratton@gmail.com>2017-05-12 02:37:20 +0300
committerMatt Stratton <matt.stratton@gmail.com>2017-05-12 02:37:20 +0300
commit679248a7c13280827e3aa64c3ae048aec9efcc90 (patch)
tree7bb7564dd53131ddb038d2f86e9273232066ca12
parent38e738f81174252b65c3c5050b8af0e2096ce9d9 (diff)
Make image optional on row layout
-rw-r--r--exampleSite/content/episode/aug.md2
-rw-r--r--layouts/partials/row.html56
2 files changed, 43 insertions, 15 deletions
diff --git a/exampleSite/content/episode/aug.md b/exampleSite/content/episode/aug.md
index bedcab0..459771e 100644
--- a/exampleSite/content/episode/aug.md
+++ b/exampleSite/content/episode/aug.md
@@ -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 = []
diff --git a/layouts/partials/row.html b/layouts/partials/row.html
index d14954d..0d9c64b 100644
--- a/layouts/partials/row.html
+++ b/layouts/partials/row.html
@@ -20,7 +20,7 @@
</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>
@@ -34,14 +34,28 @@
<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">
@@ -68,13 +82,27 @@
</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" />