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-03 21:53:38 +0300
committerGitHub <noreply@github.com>2017-05-03 21:53:38 +0300
commit3169e603df3d06ade40ac467cdb067f61035bd28 (patch)
treef1204a71b388ad9fc4d072b2efd54380fd0d20fb
parentb12a4ca9c6a4acb986719c567310858a66db098b (diff)
parent3114376912fc59fd03c424f1a5b39a693f1aef9f (diff)
Merge pull request #72 from mattstratton/add-banner-option
Add banner option
-rw-r--r--README.md5
-rw-r--r--config.codekit318
-rw-r--r--exampleSite/content/episode/aug.md1
-rw-r--r--exampleSite/static/img/episode/default-banner.jpgbin0 -> 116684 bytes
-rw-r--r--layouts/episode/single.html30
-rw-r--r--layouts/partials/row.html27
6 files changed, 55 insertions, 26 deletions
diff --git a/README.md b/README.md
index 36206c0..aac151f 100644
--- a/README.md
+++ b/README.md
@@ -111,6 +111,7 @@ author = "Matt"
date = "2016-09-25T04:10:01-05:00"
episode = "12"
episode_image = "img/episode/default.jpg"
+episode_banner = "img/episode/default-banner.jpg"
explicit = "no"
guests = ["jsmith"]
images = ["img/episode/default-social.jpg"]
@@ -132,7 +133,9 @@ Graphical user interface influencer value proposition startup hackathon iPad ana
| `author` | No | The name of an author from your config.toml file | "Matt" |
| `date` | Yes | The release date of the episode. The `hugo new` episode will pre-populate this, but you may want to adjust it. | "2016-09-25T04:10:01-05:00" |
| `episode` | No | The episode number. Currently unused. | "12" |
-| `episode_image` | Yes | The square thumbnail to represent the episode. A default image is provided, and the archetype will pre-populate it. This image needs to be relative to your baseURL. | "img/episode/default.jpg" |
+| `episode_image` | Yes | The square thumbnail to represent the episode. A default image is provided, and the archetype will pre-populate it. This image needs to be relative to your baseURL. | "img/episode/default.jpg"
+ |
+ | `episode_banner` | No | The banner to represent the episode. This image needs to be relative to your baseURL. This image will be display at the top of the episode page, as well as the top of the home page for the most recent episode. Recommend that it is at least 1024 pixels wide. | "img/episode/default-banner.jpg"
| `explicit` | Yes | Whether or not the episode contains explicit content. Default value from the archetype is "no". Valid values are "yes" or "no" | "yes" |
| `guests` | No | If your episode has guests, populate the `guests[]` array with a comma-separated list of their names. If there is only one guest, no comma is needed. | ["jdoe", "msmith", "gbluth"] or ["jsmith]" |
| `images` | No | The social sharing image used by Facebook, Twitter, etc. The archetype will populate this with a default sharing image. This image needs to be relative to your baseURL | ["img/episode/default-social.jpg"] |
diff --git a/config.codekit3 b/config.codekit3
index b0c601f..aa0ed49 100644
--- a/config.codekit3
+++ b/config.codekit3
@@ -4893,24 +4893,6 @@
"rFN": 0,
"uCM": 0
},
- "\/exampleSite\/content\/episode\/matt-rules.md": {
- "cS": 0,
- "eF": 1,
- "eL": 1,
- "eLB": 0,
- "ema": 1,
- "eSQ": 1,
- "ft": 4096,
- "oA": 1,
- "oAP": "\/exampleSite\/content\/episode\/matt-rules.html",
- "oF": 0,
- "oFM": 0,
- "oS": 0,
- "pHT": 0,
- "pME": 1,
- "rFN": 0,
- "uCM": 0
- },
"\/exampleSite\/content\/episode\/may.md": {
"cS": 0,
"eF": 1,
diff --git a/exampleSite/content/episode/aug.md b/exampleSite/content/episode/aug.md
index c01c72d..c4018aa 100644
--- a/exampleSite/content/episode/aug.md
+++ b/exampleSite/content/episode/aug.md
@@ -6,6 +6,7 @@ categories = []
date = "2016-08-25T04:09:58-05:00"
episode = "11"
episode_image = "img/episode/default.jpg"
+episode_banner = "img/episode/default-banner.jpg"
explicit = "no"
guests = ["mstratton"]
images = ["img/episode/default-social.jpg"]
diff --git a/exampleSite/static/img/episode/default-banner.jpg b/exampleSite/static/img/episode/default-banner.jpg
new file mode 100644
index 0000000..d83a130
--- /dev/null
+++ b/exampleSite/static/img/episode/default-banner.jpg
Binary files differ
diff --git a/layouts/episode/single.html b/layouts/episode/single.html
index f05bccf..e233744 100644
--- a/layouts/episode/single.html
+++ b/layouts/episode/single.html
@@ -3,17 +3,35 @@
<div class="row">
<div class="col-md-12">
<h1>{{ title .Title }}</h1>
+ <small>Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }}</small>
</div>
</div>
- <div class="row">
- <div class="col-md-3">
- <img src="{{ .Params.episode_image | absURL }}" class="img-fluid episode_image"/>
+ {{ if isset .Params "episode_banner" }}
+ {{ if ne .Params.episode_banner "" }}
+ <div class = "row">
+ <div class = "col">
+ <img src="{{ .Params.episode_banner | absURL }}" class="img-fluid episode_image"/>
</div>
- <div class="col-md-8">
- {{ .Description | markdownify }}
</div>
- </div>
+ <div class = "row">
+ <div class = "col">
+ {{ .Description | markdownify }}
+ </div>
+ </div>
+ {{ end }}
+ {{ else }}
+ <!-- begin square row -->
+ <div class="row">
+ <div class="col-md-3">
+ <img src="{{ .Params.episode_image | absURL }}" class="img-fluid episode_image"/>
+ </div>
+ <div class="col-md-8">
+ {{ .Description | markdownify }}
+ </div>
+ </div>
+ <!-- end square row -->
+ {{ end }}
<div class="row">
<div class="col-md-12 player_row">
<audio src="{{ .Site.Params.media_prefix }}{{ .Params.podcast_file }}" preload="auto"/>
diff --git a/layouts/partials/row.html b/layouts/partials/row.html
index c1646e6..d14954d 100644
--- a/layouts/partials/row.html
+++ b/layouts/partials/row.html
@@ -5,6 +5,29 @@
</h2>
{{ range first 1 (where .Data.Pages "Type" "episode") }}
+ {{ if isset .Params "episode_banner" }}
+ {{ if ne .Params.episode_banner "" }}
+ <div class = "row homepage_episode_row">
+ <div class = "col">
+ <a href="{{ .Permalink }}"><h2>{{ .Title }}</h2></a>
+ <small>Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }}</small>
+ </div>
+ </div>
+ <div class = "row homepage_episode_row">
+ <div class = "col">
+ <img src="{{ .Params.episode_banner | absURL }}" class="img-fluid episode_image"/>
+ </div>
+ </div>
+ <div class = "row homepage_episode_row">
+ <div class = "col">
+ {{ .Description | markdownify }}
+ </div>
+ </div>
+
+
+ {{ end }}
+ {{ else }}
+ <!-- begin square row -->
<div class = "row homepage_episode_row">
<div class = "col-md-12">
<a href="{{ .Permalink }}"><h2>{{ .Title }}</h2></a>
@@ -18,12 +41,14 @@
<div class = "col-md-8">
<p class = "hompage_episode_description">{{ .Description | markdownify}}</p>
</div>
- </div>
+ </div><!-- end square row -->
+ {{ end }}
<div class = "row">
<div class = "col-md-12">
<audio src="{{ .Site.Params.media_prefix }}{{ .Params.podcast_file }}" preload="auto" />
</div>
</div>
+
{{ end }}
</div>
</div>