Skip to content

Instantly share code, notes, and snippets.

@eteubert
Last active October 7, 2022 15:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eteubert/d6c51c52372dc2da2f1734a5f54c7918 to your computer and use it in GitHub Desktop.
Save eteubert/d6c51c52372dc2da2f1734a5f54c7918 to your computer and use it in GitHub Desktop.
Simple template for Podlove Publisher Shownotes
<strong>Shownotes:</strong>
{% if episode.hasShownotes %}
{% if not is_feed() %}
<style>
.psn-image {
height: 48px;
}
.psn-icon {
width: 48px;
height: 48px;
}
a.psn-link {
text-decoration: none !important;
font-size: 150%;
}
.psn-wrapper {
list-style: none;
margin-left: 0px;
}
.psn-type-link {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
padding-top: 16px;
padding-bottom: 16px;
border-bottom: 1px solid #cbd5e0
}
.psn-image, .psn-icon {
width: 48px;
height: auto;
padding-right: 8px;
}
.psn-title, .psn-link {
display: block;
line-height: 133%;
max-width: 450px;
}
</style>
<ul class="psn-wrapper">
{% for entry in episode.shownotes({groupby: false}) %}
<li class="psn-entry">
{% if entry.type == "link" %}
<span class="psn-type-link" title="{{ entry.description|escape('html_attr') }}">
<div>
{% if entry.image %}
<img class="psn-image" src="{{ entry.image }}" />
{% elseif entry.icon %}
<img class="psn-icon" src="{{ entry.icon }}"/>
{% endif %}
</div>
<div>
{% if entry.siteName %}
<span class="psn-title">{{ entry.siteName }}</span>
{% endif %}
<span class="psn-link">
<a target="_blank" href="{{ entry.url }}">{{ entry.title }}</a>
</span>
</div>
</span>
{% elseif entry.type == "topic" %}
<strong>{{ entry.title }}</strong>
{% endif %}
</li>
{% endfor %}
</ul>
{% else %}
<ul>
{% for entry in episode.shownotes({groupby: false}) %}
<li>
{% if entry.type == "link" %}
<a class="psn-link" target="_blank" href="{{ entry.url }}">{{ entry.title }}</a>
{% if entry.siteName %}
— {{ entry.siteName }}
{% endif %}
{% if entry.hasAffiliateUrl %}
(*)
{% endif %}
{% elseif entry.type == "topic" %}
<strong>{{ entry.title }}</strong>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment