Mercurial > public > madeira
changeset 110:03f51d405400
Bootstrap: work on gigs page.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 19 Oct 2013 14:20:02 -0500 |
parents | afe5e14c7f94 |
children | 23efa49f5e29 |
files | madeira/templates/band/photos.html madeira/templates/core/navbar_tag.html madeira/templates/gigs/gigs.html |
diffstat | 3 files changed, 130 insertions(+), 130 deletions(-) [+] |
line wrap: on
line diff
--- a/madeira/templates/band/photos.html Fri Oct 18 21:34:43 2013 -0500 +++ b/madeira/templates/band/photos.html Sat Oct 19 14:20:02 2013 -0500 @@ -1,10 +1,10 @@ {% extends 'base.html' %} {% load core_tags %} {% block title %}The Madeira | Photo Galleries{% endblock %} -{% block navblock %}{% navbar 'photos' %}{% endblock %} {% block custom_css %} {% include 'core/fancybox_css.html' %} {% endblock %} +{% block navblock %}{% navbar 'photos' %}{% endblock %} {% block content %} <h1>Madeira Photo Galleries</h1> {% if galleries %}
--- a/madeira/templates/core/navbar_tag.html Fri Oct 18 21:34:43 2013 -0500 +++ b/madeira/templates/core/navbar_tag.html Sat Oct 19 14:20:02 2013 -0500 @@ -18,7 +18,7 @@ <li{% if active_tab == "press" %} class="active"{% endif %}><a href="{% url 'articles-index' %}">Press</a></li> </ul> </li> - <li class="dropdown"> + <li class="dropdown{% if active_tab == "gigs" or active_tab == "flyers" %} active{% endif %}"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Shows <b class="caret"></b></a> <ul class="dropdown-menu"> <li{% if active_tab == "gigs" %} class="active"{% endif %}><a href="{% url 'gigs-index' %}">Shows</a></li>
--- a/madeira/templates/gigs/gigs.html Fri Oct 18 21:34:43 2013 -0500 +++ b/madeira/templates/gigs/gigs.html Sat Oct 19 14:20:02 2013 -0500 @@ -1,165 +1,165 @@ {% extends 'base.html' %} +{% load core_tags %} {% block title %}The Madeira | Shows{% endblock %} {% block custom_css %} -<link rel="stylesheet" href="{{ STATIC_URL }}js/fancybox/jquery.fancybox-1.3.1.css" media="screen" /> +{% include 'core/fancybox_css.html' %} {% endblock %} -{% block custom_js %} -<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> -<script src="{{ STATIC_URL }}js/fancybox/jquery.fancybox-1.3.1.pack.js"></script> -<script> -$(function() { - $('a.fancybox').fancybox(); -}); -</script> -{% endblock %} +{% block navblock %}{% navbar 'gigs' %}{% endblock %} {% block content %} <h1>Show Dates</h1> <h2>Upcoming Shows</h2> {% if upcoming %} {% for show in upcoming %} - <p style="clear:both"> + <div class="media"> {% if show.flyer %} - <a href="{{ show.flyer.image.url }}" class="fancybox" rel="madeira-gallery"> - <!-- <img style="float:left; margin-right:5px; margin-bottom:1em" src="{{ show.flyer.get_thumbnail_url }}" --> - <img class="left" src="{{ show.flyer.get_thumbnail_url }}" - alt="{{ show.flyer.caption }}" title="{{ show.flyer.caption }}" /></a> + <a href="{{ show.flyer.image.url }}" class="pull-left fancybox" rel="madeira-gallery"> + <img class="media-object" src="{{ show.flyer.get_thumbnail_url }}" + alt="Flyer" title="{{ show.date|date:"F d, Y" }}" /></a> {% endif %} - <strong>{{ show.date|date:"F d, Y" }}</strong> - {% if show.time %}{{ show.time|time:"h:i A" }}{% endif %}<br /> + <div class="media-body"> + <h3>{{ show.date|date:"F d, Y" }}{% if show.time %} <small>{{ show.time|time:"h:i A" }}</small>{% endif %}</h3> - {% if show.title and show.url %} - <a href="{{ show.url }}" target="_blank">{{ show.title }}</a><br /> - {% else %} - {% if show.title %} - {{ show.title }}<br /> + {% if show.title and show.url %} + <p><a href="{{ show.url }}" target="_blank">{{ show.title }}</a></p> + {% elif show.title %} + <p>{{ show.title }}</p> {% endif %} - {% endif %} - {% if show.venue %} - {% if show.venue.url %} - <a href="{{ show.venue.url }}" target="_blank">{{ show.venue.name }}</a>, - {% else %} - {{ show.venue }}, + {% if show.venue %} + <address> + <strong> + {% if show.venue.url %} + <a href="{{ show.venue.url }}" target="_blank">{{ show.venue.name }}</a> + {% else %} + {{ show.venue }} + {% endif %} + </strong><br> + {% if show.venue.address %} + {{ show.venue.address }}<br> + {% endif %} + {% if show.venue.city.state %} + {{ show.venue.city.name }}, {{ show.venue.city.state.name }} + {% else %} + {{ show.venue.city.name }} + {% endif %} + <br> + {% if show.venue.city.country.name != "USA" %} + {{ show.venue.city.country.name }}<br> + {% endif %} + {% if show.venue.phone %} + {{ show.venue.phone }} + {% endif %} + </address> {% endif %} - {% if show.venue.address %} - {{ show.venue.address }}, - {% endif %} - {% if show.venue.city.state %} - {{ show.venue.city.name }}, {{ show.venue.city.state.name }} - {% else %} - {{ show.venue.city.name }} - {% endif %} - {% ifnotequal show.venue.city.country.name "USA" %} - {{ show.venue.city.country.name }} - {% endifnotequal %} - <br /> - {% if show.venue.phone %} - {{ show.venue.phone }} - <br /> - {% endif %} - {% endif %} - {% if show.bands_ %} - With: - {% for band in show.bands_ %} - {% if band.url %} - <a href="{{ band.url }}" target="_blank">{{ band.name }}</a> - {% else %} - {{ band.name }} - {% endif %} - {% if not forloop.last %} - • - {% endif %} - {% endfor %} - <br /> - {% endif %} - - {% if show.notes %} - {{ show.notes|safe }} - {% endif %} - </p> - {% endfor %} -{% else %} -None at this time. -{% endif %} -<br clear="all" /> - -{% if flyer_gigs %} -<div class="thumb-box"> - <h2>Flyers</h2> - <div style="width:90%; margin-left:auto;"> - {% for gig in flyer_gigs %} - <div style="display:inline-table;"> - <table class="image-table"> - <caption>{{ gig.venue.name}}, {{ gig.date|date:"F 'y" }}</caption> - <tr><td> - <a href="{{ gig.flyer.image.url }}" class="fancybox" rel="madeira-gallery"> - <img src="{{ gig.flyer.get_thumbnail_url }}" alt="{{ gig.date|date:"F d, Y" }}" title="{{ gig.date|date:"F d, Y" }}" /></a> - </td></tr> - </table> - </div> - {% endfor %} - </div> - <div clear="all"></div> - <center><p>To see all our flyers in full size, check out our <a href="{% url 'gigs-flyers' %}">show flyer gallery</a>.</p></center> -</div> -{% endif %} - -{% if previous %} - <h2>Previous Shows</h2> - <center> - <table border="0" cellpadding="3" cellspacing="3" width="95%"> - <tr><th width="20%" align="center">Date</th><th width="40%" align="center">Venue</th><th width="40%" align="center">Bands</th></tr> - {% for show in previous %} - <tr> - <td width="20%">{{ show.date|date:"M d, Y" }}</td> - <td width="40%"> - {% if show.title and show.url %} - <a href="{{ show.url }}" target="_blank">{{ show.title }}</a>, - {% else %} - {% if show.title %} - {{ show.title }}, - {% endif %} - {% endif %} - {% if show.venue.url %} - <a href="{{ show.venue.url }}" target="_blank">{{ show.venue.name }}</a>, - {% else %} - {{ show.venue.name }}, - {% endif %} - {{ show.venue.city.name }}, {{ show.venue.city.state.abbrev }} - {% ifnotequal show.venue.city.country.name "USA" %} - {{ show.venue.city.country.name }} - {% endifnotequal %} - </td> - <td width="40%"> + {% if show.bands_ %} + <p>With:</p> + <ul> {% for band in show.bands_ %} + <li> {% if band.url %} <a href="{{ band.url }}" target="_blank">{{ band.name }}</a> {% else %} {{ band.name }} {% endif %} - {% if not forloop.last %} - • + </li> + {% endfor %} + </ul> + {% endif %} + + {% if show.notes %} + {{ show.notes|safe|linebreaks }} + {% endif %} + </div> + </div> + {% endfor %} +{% else %} +<p>None at this time.</p> +{% endif %} + +{% if flyer_gigs %} +<h2>Flyers</h2> + +<ul class="list-inline list-unstyled row"> +{% for gig in flyer_gigs %} + <li class="col-xs-4 col-sm-4 col-md-4"> + <div class="thumbnail text-center"> + <a href="{{ gig.flyer.image.url }}" class="img-responsive fancybox" rel="madeira-gallery"> + <img src="{{ gig.flyer.get_thumbnail_url }}" alt="{{ gig.date|date:"F d, Y" }}" + title="{{ gig.date|date:"F d, Y" }}" /></a> + <div class="caption"> + <small>{{ gig.venue.name}}, {{ gig.date|date:"F 'y" }}</small> + </div> + </div> + </li> +{% endfor %} +</ul> +<p>To see all our flyers in full size, check out our <a href="{% url 'gigs-flyers' %}">show flyer gallery</a>.</p> +{% endif %} + +{% if previous %} + <h2>Previous Shows</h2> + <table class="table"> + <tr><th>Date</th><th>Venue</th><th>Bands</th></tr> + {% for show in previous %} + <tr> + <td>{{ show.date|date:"M d, Y" }}</td> + <td> + <address> + {% if show.title and show.url %} + <a href="{{ show.url }}" target="_blank">{{ show.title }}</a><br> + {% elif show.title %} + {{ show.title }}<br> + {% endif %} + {% if show.venue.url %} + <a href="{{ show.venue.url }}" target="_blank">{{ show.venue.name }}</a> + {% else %} + {{ show.venue.name }} + {% endif %} + <br>{{ show.venue.city.name }}, {{ show.venue.city.state.abbrev }}<br> + {% if show.venue.city.country.name != "USA" %} + {{ show.venue.city.country.name }} + {% endif %} + </address> + </td> + <td> + {% if show.bands_ %} + <ul> + {% for band in show.bands_ %} + <li> + {% if band.url %} + <a href="{{ band.url }}" target="_blank">{{ band.name }}</a> + {% else %} + {{ band.name }} {% endif %} + </li> {% endfor %} + </ul> + {% endif %} </td> </tr> {% endfor %} </table> - </center> {% endif %} {% if stats %} <h2>Past Show Statistics</h2> -<table border="0" cellpadding="3" cellspacing="3"> - <tr><th align="left">Number of shows:</th><td>{{ stats.count }}</td></tr> - <tr><th align="left">Number of unique venues:</th><td>{{ stats.venues }}</td></tr> - <tr><th align="left">Number of unique cities:</th><td>{{ stats.cities }}</td></tr> - <tr><th align="left">Number of unique states:</th><td>{{ stats.states }}</td></tr> - <tr><th align="left">Number of unique countries:</th><td>{{ stats.countries }}</td></tr> - <tr><th align="left">Number of unique bands:</th><td>{{ stats.bands }}</td></tr> +<div class="row"> +<div class="col-md-6"> +<table class="table table-striped"> + <tr><th>Number of shows:</th><td>{{ stats.count }}</td></tr> + <tr><th>Number of unique venues:</th><td>{{ stats.venues }}</td></tr> + <tr><th>Number of unique cities:</th><td>{{ stats.cities }}</td></tr> + <tr><th>Number of unique states:</th><td>{{ stats.states }}</td></tr> + <tr><th>Number of unique countries:</th><td>{{ stats.countries }}</td></tr> + <tr><th>Number of unique bands:</th><td>{{ stats.bands }}</td></tr> </table> +</div> +</div> {% endif %} {% endblock %} +{% block custom_js %} +{% include 'core/fancybox_js.html' %} +{% endblock %}