Commits

Ed Brannin  committed 38b4c46

Got a Speakers macro working\! Yay\!

  • Participants
  • Parent commits 4261256
  • Branches ssg-StrangeCase

Comments (0)

Files changed (3)

File helpers/macros.j2

+{% macro list_speakers(speakers) -%}
+<p class="speakers">
+  {% for speaker in speakers %}
+  <span class="nowrap"><span class="name">{{speaker.name}}</span>, {{speaker.tagline}}</span>
+  {% if not loop.last %}&bull;{% endif %}
+  {% endfor %}
+</p>
+{%- endmacro %}

File layouts/base.j2

 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 	<title>The Rochester NY Chesterton Society</title>
-<style type="text/css">
-{% block css %}
-	BODY { 
-      {% if background_image %}
-		  background: white url("{{ background_image }}");
-      {% endif %}
-		  background-repeat: no-repeat;
-		  background-position: center 0px;
-		  font-size:18px;
-	}
-	h1 {font-size: 300%; margin:0; padding: 0;}
-	h2 {font-size: 130%; margin:0; padding: 0; font-style:italic;}
-	h3 {font-size: 160%; margin:0 0 5px 0; padding: 0;}
-	h4 {font-size: 130%; margin:0; padding: 0;}
-	h5 {font-size: 70%; margin:0; padding: 0;}
-	hr {margin:0 0 0 0; padding: 0;}
-	div.image_spacer {height: 400px;}
+  <style type="text/css">
+    {% block css -%}
+    BODY {
+        font-size:18px;
+    }
+    h1 {font-size: 500%; margin:0; padding: 0;}
+    h2 {font-size: 130%; margin:0; padding: 0; font-style:italic;}
+    h3 {font-size: 160%; margin:0 0 5px 0; padding: 0;}
+    h4 {font-size: 130%; margin:0; padding: 0;}
+    h5 {font-size: 70%; margin:0; padding: 0;}
+    hr {margin:0 0 0 0; padding: 0;}
+    .hidden { margin-left: -500em; }
+    .quote { font-style: italic; margin-bottom: 2em;}
+    .annual_conference { border-top: 1px solid black; border-bottom: 1px solid black; }
+    ul.past-conferences { list-style: none; }
+    .speakers { color: #444; }
+    .nowrap { white-space: nowrap; }
+    .speakers .name {font-weight: bold; }
+    .clear { clear: both; }
+    .title { font-style: italic; }
+    .header { margin-left: auto; margin-right: auto; position: relative }
+    .header img { display: block; margin: 0px auto; }
+    .header h1 { position: absolute; top: 150px }
+    #copyright, #maintained_by { text-align: center; font-size: 0.8em; }
+    #content { margin: 0px auto; width: 750px; }
+    {% endblock %}
+  </style>
+  {% block head %}{% endblock %}
+</head>
+<body>
+  <div align="center" id="content">
+    <div align="center">
+
+{% block content %}
+      <h3 class="annual_conference">
+        Rochester NY Chesterton Society
+        <br />
+        8<sup>th</sup> Annual Conference
+      </h3>
+      <!--If only relative positioning created scroll bars in IE6...-->
+      <div class="header" >
+        <img src="chesterton_2011_v2_small.gif" id="pic" alt="Illustration of Chesterton with a paint brush and palette." height="382" />
+        <h1>Transforming <span class="nowrap">The Culture</span></h1>
+      </div>
+
+      <div class="clear" />
+
+        <div class="quote">
+          <span class="nowrap">&ldquo;Art is the signature of man.&rdquo;</span>
+          <span class="nowrap">-- GK Chesterton</span>
+        </div>
+
+        <p class="speakers">
+          <span class="nowrap"><span class="name">Joseph Pearce</span>, Author</span> &bull;
+          <span class="nowrap"><span class="name">Kevin O&rsquo;Brien</span>, Theater of the Word, Inc.</span>  &bull;
+          <span class="nowrap"><span class="name">Dale Ahlquist</span>, American Chesterton Society</span>  &bull;
+          <span class="nowrap"><span class="name">Dr. Tom Martin</span>, Philosophy, U. Nebraska</span>
+        </p>
+
+        <br />
+
+        <h2>
+          Saturday, October 1st, 2011
+        </h2>
+        9 am &mdash; 3:30 pm
+
+        <p><strong>St. John Fisher College</strong>, Coleman Chapel, Murphy Hall<br />
+          <strong>Donation:</strong> $10.  <strong>Free to students.</strong>  Lunch will be available at nominal cost.</p>
+
+        <p class="thanks">Funded by the Basilian Fathers of St. John Fisher College.
+          <br/>
+          With support from members of the Rochester NY Chesterton Society and from <a href="http://siministries.org" class="nowrap">St. Irenaeus Ministries</a>.
+        </p>
 {% endblock %}
 
-</style>
-{% block head %}{% endblock %}
-</head>
-<body>
+        <br/>
+        <h4>Recordings of our past conferences are also available:</h4>
+        <ul class="past-conferences">
+          <li><a href="/2007">Conversion of Heart: St. Paul, St. Augustine, John Henry Newman, <span class="nowrap">GK Chesterton</span> (2007)</a></li>
+          <li><a href="/2008">Paradox and the Pursuit of Truth (2008)</a></li>
+          <li><a href="/2009">Re-awakening Wonder (2009)</a></li>
+          <li><a href="/2010">What Ought To Be: Themes from Chesterton's What's Wrong with the World (2010)</a></li>
+        </ul>
 
-<div align="center">
-<table width="750"><tr><td>
+        <hr/>
+        The Rochester NY Chesterton Society meets the third Thursday of the month, September-December, and March-June.
+        Among our goals are lively discussion, good fellowship, and a deeper appreciation of the work of GKC.
+        <br/>Direct questions to <a href="mailto:rochesterton@hotmail.com">rochesterton@hotmail.com</a>
 
-{% block content %}
+        <hr style="margin-bottom: 1em;" />
+
+        {% block poster %}
+  {# TODO: Only show this if poster_url is set #}
+        <p><a href="letter-sized-2011.pdf">A letter-sized poster for this event is also available.</a></p>
 {% endblock %}
 
 
-	<hr/>
-	The Rochester NY Chesterton Society meets the third Thursday of the month, September-December, and March-June. 
-	Among our goals are lively discussion, good fellowship, and a deeper appreciation of the work of GKC.
-	<br/>Direct questions to <a href="mailto:rochesterton@hotmail.com">rochesterton@hotmail.com</a>
-	<hr/>
-{% block poster %}
-  {# TODO: Only show this if poster_url is set #}
-		<p><a href="letter_sized.pdf">A letter-sized poster for this event is also available.</a></p>
-{% endblock %}
-	<h5>Website maintained by volunteers from <a href="http://www.siministries.org">St. Irenaeus Ministries:
-  a center of orthodox Catholic mission and renewal in Rochester.</a></h5>
-</div></td></tr></table></div>
-</body>
+        <div id="maintained_by">Website maintained by volunteers from <a href="http://www.siministries.org">St. Irenaeus Ministries: a center of orthodox Catholic mission and renewal in Rochester.</a></div>
+
+        <div id="copyright">
+          &copy; 2012 Rochester NY Chesterton Society
+        </div>
+      </div>
+    </div>
+
+  </body>
 </html>

File site/2011/index.j2

-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
+---
+speakers:
+  - name: Joseph Pearce
+    tagline: Author
+  - name: Kevin O&rsquo;Brien
+    tagline: Theater of the Word, Inc.
+  - name: Dale Ahlquist
+    tagline: American Chesterton Society
+  - name: Dr. Tom Martin
+    tagline: Philosophy, U. Nebraska
+---
+{% extends "layouts/base.j2" %}
+{% from "helpers/macros.j2" import list_speakers %}
 
-	<title>The Rochester NY Chesterton Society</title>
+{% block content %}
+<h3 class="annual_conference">
+  Rochester NY Chesterton Society
+  <br />
+  8<sup>th</sup> Annual Conference
+</h3>
+<!--If only relative positioning created scroll bars in IE6...-->
+<div class="header" >
+  <img src="chesterton_2011_v2_small.gif" id="pic" alt="Illustration of Chesterton with a paint brush and palette." height="382" />
+  <h1>Transforming <span class="nowrap">The Culture</span></h1>
+</div>
 
-<style type="text/css">
-	BODY {
-		  font-size:18px;
-	}
-	h1 {font-size: 500%; margin:0; padding: 0;}
-	h2 {font-size: 130%; margin:0; padding: 0; font-style:italic;}
-	h3 {font-size: 160%; margin:0 0 5px 0; padding: 0;}
-	h4 {font-size: 130%; margin:0; padding: 0;}
-	h5 {font-size: 70%; margin:0; padding: 0;}
-	hr {margin:0 0 0 0; padding: 0;}
-	.hidden { margin-left: -500em; }
-	.quote { font-style: italic; margin-bottom: 2em;}
-	.annual_conference { border-top: 1px solid black; border-bottom: 1px solid black; }
-	ul.past-conferences { list-style: none; }
-	.speakers { color: #444; }
-	.nowrap { white-space: nowrap; }
-	.speakers .name {font-weight: bold; }
-  .clear { clear: both; }
-  .title { font-style: italic; }
-  .header { margin-left: auto; margin-right: auto; position: relative }
-  .header img { display: block; margin: 0px auto; }
-  .header h1 { position: absolute; top: 150px }
-  #copyright, #maintained_by { text-align: center; font-size: 0.8em; }
-  #content { margin: 0px auto; width: 750px; }
-</style>
+<div class="clear" />
 
-</head>
-<body>
-  <div align="center" id="content">
-    <div align="center">
+  <div class="quote">
+    <span class="nowrap">&ldquo;Art is the signature of man.&rdquo;</span>
+    <span class="nowrap">-- GK Chesterton</span>
+  </div>
 
-      <h3 class="annual_conference">
-        Rochester NY Chesterton Society
-        <br />
-        8<sup>th</sup> Annual Conference
-      </h3>
-      <!--If only relative positioning created scroll bars in IE6...-->
-      <div class="header" >
-        <img src="chesterton_2011_v2_small.gif" id="pic" alt="Illustration of Chesterton with a paint brush and palette." height="382" />
-        <h1>Transforming <span class="nowrap">The Culture</span></h1>
-      </div>
+  {{ list_speakers(speakers) }}
 
-      <div class="clear" />
+  <br />
 
-        <div class="quote">
-          <span class="nowrap">&ldquo;Art is the signature of man.&rdquo;</span>
-          <span class="nowrap">-- GK Chesterton</span>
-        </div>
+  <h2>
+    Saturday, October 1st, 2011
+  </h2>
+  9 am &mdash; 3:30 pm
 
-        <p class="speakers">
-          <span class="nowrap"><span class="name">Joseph Pearce</span>, Author</span> &bull;
-          <span class="nowrap"><span class="name">Kevin O&rsquo;Brien</span>, Theater of the Word, Inc.</span>  &bull;
-          <span class="nowrap"><span class="name">Dale Ahlquist</span>, American Chesterton Society</span>  &bull;
-          <span class="nowrap"><span class="name">Dr. Tom Martin</span>, Philosophy, U. Nebraska</span>
-        </p>
+  <p><strong>St. John Fisher College</strong>, Coleman Chapel, Murphy Hall<br />
+  <strong>Donation:</strong> $10.  <strong>Free to students.</strong>  Lunch will be available at nominal cost.</p>
 
-        <br />
+  <p class="thanks">Funded by the Basilian Fathers of St. John Fisher College.
+  <br/>
+  With support from members of the Rochester NY Chesterton Society and from <a href="http://siministries.org" class="nowrap">St. Irenaeus Ministries</a>.
+  </p>
+{% endblock %}
 
-        <h2>
-          Saturday, October 1st, 2011
-        </h2>
-        9 am &mdash; 3:30 pm
-
-        <p><strong>St. John Fisher College</strong>, Coleman Chapel, Murphy Hall<br />
-          <strong>Donation:</strong> $10.  <strong>Free to students.</strong>  Lunch will be available at nominal cost.</p>
-
-        <p class="thanks">Funded by the Basilian Fathers of St. John Fisher College.
-          <br/>
-          With support from members of the Rochester NY Chesterton Society and from <a href="http://siministries.org" class="nowrap">St. Irenaeus Ministries</a>.
-        </p>
-
-        <br/>
-        <h4>Recordings of our past conferences are also available:</h4>
-        <ul class="past-conferences">
-          <li><a href="/2007">Conversion of Heart: St. Paul, St. Augustine, John Henry Newman, <span class="nowrap">GK Chesterton</span> (2007)</a></li>
-          <li><a href="/2008">Paradox and the Pursuit of Truth (2008)</a></li>
-          <li><a href="/2009">Re-awakening Wonder (2009)</a></li>
-          <li><a href="/2010">What Ought To Be: Themes from Chesterton's What's Wrong with the World (2010)</a></li>
-        </ul>
-
-        <hr/>
-        The Rochester NY Chesterton Society meets the third Thursday of the month, September-December, and March-June.
-        Among our goals are lively discussion, good fellowship, and a deeper appreciation of the work of GKC.
-        <br/>Direct questions to <a href="mailto:rochesterton@hotmail.com">rochesterton@hotmail.com</a>
-
-        <hr style="margin-bottom: 1em;" />
-
-        <p><a href="letter-sized-2011.pdf">A letter-sized poster for this event is also available.</a></p>
-
-
-        <div id="maintained_by">Website maintained by volunteers from <a href="http://www.siministries.org">St. Irenaeus Ministries: a center of orthodox Catholic mission and renewal in Rochester.</a></div>
-
-        <div id="copyright">
-          &copy; 2011 Rochester NY Chesterton Society
-        </div>
-      </div>
-    </div>
-
-  </body>
-</html>