From 679248a7c13280827e3aa64c3ae048aec9efcc90 Mon Sep 17 00:00:00 2001 From: Matt Stratton Date: Thu, 11 May 2017 18:37:20 -0500 Subject: Make image optional on row layout --- exampleSite/content/episode/aug.md | 2 +- layouts/partials/row.html | 56 ++++++++++++++++++++++++++++---------- 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 @@
- {{ .Description | markdownify }} + {{ .Description | markdownify | truncate 600 " "}} Read More
@@ -34,14 +34,28 @@ Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }} -
-
- -
-
-

{{ .Description | markdownify}}

+ {{ if .Params.episode_image }} +
+
+ +
+
+ {{ if ge (countrunes .Description ) 600 }} +

{{ .Description | markdownify | truncate 600 " "}} Read More

+ {{ else }} +

{{ .Description | markdownify }}

+ {{ end }} +
+
+ {{ else }} +
+ {{ if ge (countrunes .Description ) 600 }} +

{{ .Description | markdownify | truncate 900 " "}} Read More

+ {{ else }} +

{{ .Description | markdownify }}

+ {{ end }}
-
+ {{ end }} {{ end }}
@@ -68,13 +82,27 @@
-
- + {{ if .Params.episode_image}} +
+ +
+
+ {{ if ge (countrunes .Description ) 600 }} +

{{ .Description | markdownify | truncate 600 " "}} Read More

+ {{ else }} +

{{ .Description | markdownify }}

+ {{ end }} +
+ {{ else }} +
+ {{ if ge (countrunes .Description ) 900 }} +

{{ .Description | markdownify | truncate 900 " "}} Read More

+ {{ else }} +

{{ .Description | markdownify }}

+ {{ end }} +
+ {{ end }}
-
-

{{ .Description | markdownify}}

-
-