Mercurial > public > sg101
changeset 1086:aa43db10c565
Convert podcast app to V3 design.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 03 May 2016 20:58:15 -0500 |
parents | 16e190fa6ef8 |
children | 7fb9bc5a1232 |
files | podcast/views.py sg101/templates/podcast/base.html sg101/templates/podcast/detail.html |
diffstat | 3 files changed, 68 insertions(+), 34 deletions(-) [+] |
line wrap: on
line diff
--- a/podcast/views.py Mon May 02 20:03:18 2016 -0500 +++ b/podcast/views.py Tue May 03 20:58:15 2016 -0500 @@ -62,11 +62,12 @@ return render(request, 'podcast/index.html', { 'channel': channel, + 'V3_DESIGN': True, }) def detail(request, id): - podcast = get_object_or_404(Item.objects.select_related(), pk = id) + podcast = get_object_or_404(Item.objects.select_related(), pk=id) ext = get_ext_from_url(podcast.enclosure_url) alt_ext = None @@ -83,6 +84,7 @@ 'alt_ext': alt_ext, 'jplayer_media': jplayer_media, 'jplayer_supplied': jplayer_supplied, + 'V3_DESIGN': True, })
--- a/sg101/templates/podcast/base.html Mon May 02 20:03:18 2016 -0500 +++ b/sg101/templates/podcast/base.html Tue May 03 20:58:15 2016 -0500 @@ -1,29 +1,56 @@ -{% extends 'base.html' %} +{% extends 'v3/base.html' %} {% load static from staticfiles %} {% block custom_head %} <link rel="alternate" type="application/rss+xml" title="SurfGuitar101 Podcast" href="{% url 'podcast-feed' %}" /> {% endblock %} {% block content %} <h2><a href="{% url 'podcast-main' %}">SurfGuitar101 Podcast</a></h2> -<img src="{{ channel.image.url }}" alt="Podcast Logo" style="float: left; margin-right:10px;" /> +<div class="media-object"> + <div class="media-object-section"> + <img src="{{ channel.image.url }}" alt="Podcast Logo" /> + </div> + <div class="media-object-section"> + Welcome to the <strong>Surfguitar101 Podcast</strong>! The podcast + started as an experiment just to see what it took to create a podcast. + The reaction was very positive so hopefully we will start seeing new + episodes on a semi-regular basis. You can download the podcast episodes + here and we are also listed in iTunes. + </div> +</div> <p> -Welcome to the <strong>Surfguitar101 Podcast</strong>! The podcast started as an experiment just to see what it took to create a podcast. The reaction was very positive so hopefully we will start seeing new episodes on a semi-regular basis. You can download the podcast episodes here and we are also listed in iTunes. + Please discuss the podcasts in our Podcast forum. We'd love to hear your + suggestions, and let us know if you would like to help in any way. We + need producers, interviewers, artwork, etc. you name it. Thanks! </p> <p> -Please discuss the podcasts in our Podcast forum. We'd love to hear your suggestions, and let us know if you would like -to help in any way. We need producers, interviewers, artwork, etc. you name it. Thanks! + In addition to the forum, you can contact us by email at + <a href="mailto:podcast@surfguitar101.com">podcast@surfguitar101.com</a>. </p> <p> -In addition to the forum, you can contact us by email at -<a href="mailto:podcast@surfguitar101.com">podcast@surfguitar101.com</a>. -</p> -<p> -<a href="{% url 'podcast-feed' %}"><img src="{% static "icons/feed.png" %}" alt="RSS Feed" title="RSS Feed" /></a> <a href="{% url 'podcast-feed' %}">Subscribe to the podcast via RSS</a>. + <a href="{% url 'podcast-feed' %}"><i class="fi-rss size-24"></i></a> + <a href="{% url 'podcast-feed' %}">Subscribe to the podcast via RSS</a>. </p> <p> <strong>Hey iTunes users!</strong> Here is our <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=284928526">listing in iTunes</a>. Follow the previous link and then click the subscribe button to let iTunes automatically download episodes for you. </p> -<br clear="all" /> +<div class="secondary callout"> + <div class="media-object"> + <div class="media-object-section"> + <i class="fi-volume-strike size-36"></i> + </div> + <div class="media-object-section"> + Sorry folks, the SG101 podcast is on hiatus. Fortunately there are several + good Internet-based radio shows these days that more than take up the slack. + We encourage you to check out <a href="http://www.northseasurfradio.com/"> + North Sea Surf Music Radio</a> and + <a href="http://www.luxuriamusic.com/podcasts/Fiberglass%20Jungle">Fiberglass + Jungle</a>, just to name two. + </div> + </div> + <p> + Who knows what the future will bring, the podcast may return someday! + </p> +</div> <hr /> {% block podcast-content %}{% endblock %} {% endblock %}
--- a/sg101/templates/podcast/detail.html Mon May 02 20:03:18 2016 -0500 +++ b/sg101/templates/podcast/detail.html Tue May 03 20:58:15 2016 -0500 @@ -9,29 +9,14 @@ {% block custom_css %} <link type="text/css" href="{% static "js/jplayer/skins/blue.monday/jplayer.blue.monday.css" %}" rel="stylesheet" /> {% endblock %} -{% block custom_js %} -<script type="text/javascript" src="{% static "js/jplayer/jquery.jplayer.min.js" %}"></script> +{% block podcast-content %} +<nav aria-label="You are here:" role="navigation"> + <ul class="breadcrumbs"> + <li><a href="{% url 'podcast-main' %}">Podcast Index</a></li> + <li>{{ podcast.title }}</li> + </ul> +</nav> -<script type="text/javascript"> -//<![CDATA[ - var jplayer_media = {{ jplayer_media|safe }}; - $(document).ready(function(){ - $("#jquery_jplayer_1").jPlayer({ - ready: function () { - $.jPlayer.timeFormat.showHour = true; - $(this).jPlayer("setMedia", jplayer_media); - }, - swfPath: "{% static "js/jplayer" %}", - supplied: "{{ jplayer_supplied }}" - }); - }); -//]]> -</script> -{% endblock %} -{% block podcast-content %} -<div class="breadcrumbs"> - <a href="{% url 'podcast-main' %}">Podcast Index</a> >> {{ podcast.title }} -</div> <h3>{{ podcast.pubdate|date:"F d, Y" }} • {{ podcast.title }}</h3> <h4>{{ podcast.subtitle }}</h4> {{ podcast.summary|linebreaks }} @@ -93,3 +78,23 @@ </ul> {% social_sharing podcast.search_title podcast.get_absolute_url %} {% endblock %} + +{% block custom_js %} +<script type="text/javascript" src="{% static "js/jplayer/jquery.jplayer.min.js" %}"></script> + +<script type="text/javascript"> +//<![CDATA[ + var jplayer_media = {{ jplayer_media|safe }}; + $(document).ready(function(){ + $("#jquery_jplayer_1").jPlayer({ + ready: function () { + $.jPlayer.timeFormat.showHour = true; + $(this).jPlayer("setMedia", jplayer_media); + }, + swfPath: "{% static "js/jplayer" %}", + supplied: "{{ jplayer_supplied }}" + }); + }); +//]]> +</script> +{% endblock %}