Mercurial > public > bravenewsurf
changeset 9:f2cb9b2ec552
Added generic views for music, videos, and the buy page with placeholder text.
Fix typo in bands.json.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 29 Oct 2011 22:31:42 -0500 |
parents | 92537b487942 |
children | 01740aa4a6b9 |
files | bns_website/bands/fixtures/bands.json bns_website/templates/bands/band_list.html bns_website/templates/buy.html bns_website/templates/core/navbar_tag.html bns_website/templates/home.html bns_website/templates/music.html bns_website/templates/videos.html bns_website/urls.py |
diffstat | 8 files changed, 98 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- a/bns_website/bands/fixtures/bands.json Sat Oct 29 21:07:53 2011 -0500 +++ b/bns_website/bands/fixtures/bands.json Sat Oct 29 22:31:42 2011 -0500 @@ -83,7 +83,7 @@ "pk": 9, "model": "bands.band", "fields": { - "url": "http://www.loskahunas.co/", + "url": "http://www.loskahunas.com/", "notes": "Los Kahunas hail from Argentina where they have been riding the crest of the new wave of popularity of surf and garage music. Their highly traditional style can be heard on 2005\u2019s \u201cEl Fantastico Sonido Surf & Hot-Rod\u201d and 2007\u2019s \u201cOtro Reverberante Encuentro.\u201d Their new CD, \u201c7 Mares,\u201d will be released soon. They\u2019ve opened shows for some of the biggest Argentinian rock bands and have toured Chile, Spain and Italy, where they had the distinction of being the first South American band to play the Surfer Joe Festival in 2010.", "name": "Los Kahunas", "order": 8 @@ -199,4 +199,4 @@ "order": 19 } } -] \ No newline at end of file +]
--- a/bns_website/templates/bands/band_list.html Sat Oct 29 21:07:53 2011 -0500 +++ b/bns_website/templates/bands/band_list.html Sat Oct 29 22:31:42 2011 -0500 @@ -1,6 +1,20 @@ {% extends 'base.html' %} {% load core_tags %} {% block title %}Bands{% endblock %} + +{% block custom_css %} +<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/redmond/jquery-ui.css"> +{% endblock %} +{% block custom_js %} +<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> +<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script> +<script type="text/javascript"> + $(function() { + $("#accordion").accordion({active: false}); + }); +</script> +{% endblock %} + {% block content %} {% navbar 'bands' %} <h1>Bands</h1> @@ -11,4 +25,16 @@ <dd>{{ band.notes|linebreaksbr }}</dd> {% endfor %} </dl> + +<p>And here is what it looks like as a jQuery accordion.</p> +<div id="accordion"> +{% for band in object_list %} +<h3><a href="#">{{ band.name }}</a></h3> +<div> + {{ band.notes|linebreaksbr }} + <p style="margin-top:1em"><a class="btn default" href="{{ band.url }}">{{ band.name }} Website</a></p> +</div> +{% endfor %} +</div> + {% endblock %}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bns_website/templates/buy.html Sat Oct 29 22:31:42 2011 -0500 @@ -0,0 +1,8 @@ +{% extends 'base.html' %} +{% load core_tags %} +{% block title %}Buy{% endblock %} +{% block content %} +{% navbar 'buy' %} +<h1>Buy</h1> +<p><strong>TODO</strong>: Put links to buy the CD here.</p> +{% endblock %}
--- a/bns_website/templates/core/navbar_tag.html Sat Oct 29 21:07:53 2011 -0500 +++ b/bns_website/templates/core/navbar_tag.html Sat Oct 29 22:31:42 2011 -0500 @@ -4,13 +4,13 @@ <div class="container"> <a class="brand" href="{% url 'home' %}">Brave New Surf</a> <ul class="nav"> -<li {% if active_tab == "home" %}class="active"{% endif %}><a href="{% url 'home' %}">Home</a></li> -<li {% if active_tab == "news" %}class="active"{% endif %}><a href="#">News</a></li> -<li {% if active_tab == "reviews" %}class="active"{% endif %}><a href="#">Reviews</a></li> -<li {% if active_tab == "bands" %}class="active"{% endif %}><a href="{% url 'bands' %}">Bands</a></li> -<li {% if active_tab == "music" %}class="active"{% endif %}><a href="#">Listen</a></li> -<li {% if active_tab == "videos" %}class="active"{% endif %}><a href="#">Watch</a></li> -<li {% if active_tab == "buy" %}class="active"{% endif %}><a href="#">Buy</a></li> +<li{% if active_tab == "home" %} class="active"{% endif %}><a href="{% url 'home' %}">Home</a></li> +<li{% if active_tab == "news" %} class="active"{% endif %}><a href="#">News</a></li> +<li{% if active_tab == "reviews" %} class="active"{% endif %}><a href="#">Reviews</a></li> +<li{% if active_tab == "bands" %} class="active"{% endif %}><a href="{% url 'bands' %}">Bands</a></li> +<li{% if active_tab == "music" %} class="active"{% endif %}><a href="{% url 'music' %}">Listen</a></li> +<li{% if active_tab == "videos" %} class="active"{% endif %}><a href="{% url 'videos' %}">Watch</a></li> +<li{% if active_tab == "buy" %} class="active"{% endif %}><a href="{% url 'buy' %}">Buy</a></li> </ul> </div> </div>
--- a/bns_website/templates/home.html Sat Oct 29 21:07:53 2011 -0500 +++ b/bns_website/templates/home.html Sat Oct 29 22:31:42 2011 -0500 @@ -1,4 +1,5 @@ {% extends 'base.html' %} +{% load url from future %} {% load core_tags %} {% block title %}Home{% endblock %} {% block custom_css %} @@ -48,11 +49,11 @@ <li>Daikaiju: Laser Runner</li> <li>The Anacondas: Floating Home</li> </ol> - <p><a href="#" class="btn primary">Buy Now »</a></p> + <p><a href="{% url 'buy' %}" class="btn primary">Buy Now »</a></p> </div> </div> <div class="row"> - <div class="span10"> + <div class="span9"> <h2>Brave New Surf</h2> <p> Welcome to Brave New Surf, a showcase for the amazing new sounds of surf music. Here is undeniable evidence that the surf genre is not only still alive but thriving. Surf music’s legendary first wave came to an untimely end at the hands of the British Invasion bands, but the genre was resurrected in 1980 by the great Jon & the Nightriders. In the three decades since, surf music has ebbed and swelled (mostly as an underground phenomenon), growing stronger with each new wave. The past four years have been extraordinarily fruitful in both the number and the quality of new releases. The best of these new tracks – many compiled for you here – can stand toe to toe with the very best of the 1960s. @@ -67,15 +68,29 @@ </p><p> Surf music has never been so vibrant, so diverse, so charged with energy and excitement. It’s time for the new surf classics. It’s time for BRAVE NEW SURF! </p> + <p><a href="{% url 'buy' %}" class="btn primary">Buy Now »</a></p> </div> - <div class="span6"> + <div class="span7"> <div class="alert-message block-message info"> - <h3>Credits</h3> + <h3>News</h3> + <p>This box shows links to the 5 most recent news items.</p> <ul> - <li>Produced, compiled and sequenced by Ivan Pongracic and Sean Berry.</li> - <li>Graphics and package design by Ferenc Dobronyi.</li> - <li>Mastering by Bob Ridgley, Binary Recording Studio, Bellingham, WA.</li> + <li><a href="#">Headline number 3 goes here.</a> - <small>Oct. 29, 2011</small></li> + <li><a href="#">Headline number 2 goes here.</a> - <small>Oct. 12, 2011</small></li> + <li><a href="#">Headline number 1 goes here.</a> - <small>Oct. 2, 2011</small></li> </ul> + <p><br /><a class="btn default" href="#">All News »</a></p> + </div> + <div class="alert-message block-message info"> + <h3>Reviews</h3> + <p>This box shows links to the 5 most recent reviews.</p> + <ul> + <li><a href="#">Review number 4 goes here.</a> - <small>Oct. 29, 2011</small></li> + <li><a href="#">Review number 3 goes here.</a> - <small>Oct. 28, 2011</small></li> + <li><a href="#">Review number 2 goes here.</a> - <small>Oct. 12, 2011</small></li> + <li><a href="#">Review number 1 goes here.</a> - <small>Oct. 2, 2011</small></li> + </ul> + <p><br /><a class="btn default" href="#">All Reviews »</a></p> </div> <div class="alert-message block-message info"> <h3>Looking for more surf music?</h3> @@ -97,28 +112,15 @@ <li><a href="http://newgandydancer.tripod.com/">New Gandy Dancer</a></li> </ul> </div> + <div class="alert-message block-message info"> + <h3>Credits</h3> + <ul> + <li>Produced, compiled and sequenced by Ivan Pongracic and Sean Berry.</li> + <li>Graphics and package design by Ferenc Dobronyi.</li> + <li>Mastering by Bob Ridgley, Binary Recording Studio, Bellingham, WA.</li> + </ul> + </div> </div> </div> -<div class="row"> - <div class="span8"> - <h2>Latest News</h2> - <p>The first one or two news items are displayed here.</p> - <p> -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc malesuada ligula in nibh fringilla sodales. Mauris non metus urna, vel aliquet massa. Praesent scelerisque nibh ac nisi tincidunt scelerisque. Suspendisse id arcu ac justo cursus fermentum vel id justo. Nunc adipiscing rhoncus odio, ut varius tellus lobortis ac. Quisque imperdiet mi et nisi suscipit facilisis. Aliquam erat volutpat. Pellentesque malesuada metus et nulla consectetur molestie at quis felis. Fusce dapibus lorem auctor magna suscipit gravida. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam imperdiet posuere sapien vitae lobortis. Integer elementum aliquam erat, vitae gravida tortor congue nec. -</p><p> -Sed at arcu et orci varius iaculis ac non tortor. Praesent placerat, metus id cursus cursus, velit magna tincidunt diam, sed fringilla leo orci malesuada nulla. Fusce ante diam, aliquet in sodales ut, feugiat sollicitudin ipsum. Quisque neque nunc, fringilla commodo tincidunt vitae, iaculis sed elit. Nam nec quam eu lorem sagittis fringilla. Nulla suscipit porttitor mauris, quis luctus nibh auctor sit amet. Nullam ac pharetra nunc. Cras adipiscing interdum sapien porttitor eleifend. Sed gravida lectus sed nunc ornare id sodales augue eleifend. Vivamus vulputate egestas tortor. Duis ultrices felis ac quam rhoncus ut mollis augue volutpat. -</p><p> -Fusce a placerat sapien. Nulla euismod facilisis massa, vitae faucibus tortor facilisis at. Praesent hendrerit quam mauris, ut vestibulum erat. Quisque cursus urna vel sapien viverra vehicula. Aenean nisi mi, pretium placerat consectetur at, rhoncus eget felis. Vivamus ornare hendrerit tellus, vel mollis ipsum suscipit sed. In sem orci, scelerisque ac lobortis vitae, placerat quis tortor. Fusce aliquam eleifend tincidunt. -</p> -<p><a class="btn default" href="#">More News »</a></p> - </div> - <div class="span8"> - <h2>Latest Reviews</h2> - <p>The first one or two reivews are displayed here.</p> - <p> -Integer cursus accumsan lacus, vitae iaculis elit dictum blandit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nam ante tortor, lobortis non scelerisque posuere, vehicula eu arcu. Integer non mi enim. Proin aliquet consequat neque, nec imperdiet justo rhoncus at. Cras sodales, diam in consectetur accumsan, nunc dui consequat nibh, et convallis mauris nulla in est. Etiam ultricies ullamcorper sapien, et faucibus lacus viverra in. Aenean dignissim neque vitae turpis pulvinar eu sodales quam luctus. -</p> -<p><a class="btn default" href="#">More Reviews »</a></p> - </div> </div> {% endblock %}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bns_website/templates/music.html Sat Oct 29 22:31:42 2011 -0500 @@ -0,0 +1,8 @@ +{% extends 'base.html' %} +{% load core_tags %} +{% block title %}Listen{% endblock %} +{% block content %} +{% navbar 'music' %} +<h1>Listen</h1> +<p><strong>TODO</strong>: put some kind of music player here. Possibly embed a ReverbNation player, or use jPlayer.</p> +{% endblock %}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bns_website/templates/videos.html Sat Oct 29 22:31:42 2011 -0500 @@ -0,0 +1,8 @@ +{% extends 'base.html' %} +{% load core_tags %} +{% block title %}Watch{% endblock %} +{% block content %} +{% navbar 'videos' %} +<h1>Watch</h1> +<p><strong>TODO</strong>: embed some YouTube videos of the bands.</p> +{% endblock %}
--- a/bns_website/urls.py Sat Oct 29 21:07:53 2011 -0500 +++ b/bns_website/urls.py Sat Oct 29 22:31:42 2011 -0500 @@ -14,6 +14,15 @@ url(r'^bands/$', ListView.as_view(model=Band), name="bands"), + url(r'^listen/$', + TemplateView.as_view(template_name="music.html"), + name="music"), + url(r'^watch/$', + TemplateView.as_view(template_name="videos.html"), + name="videos"), + url(r'^buy/$', + TemplateView.as_view(template_name="buy.html"), + name="buy"), # Examples: # url(r'^$', 'bns_website.views.home', name='home'),