Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Sort out the continent and country pages

  • Loading branch information...
commit 8a3559f88e6447b834f9e393245a353ac22dba2b 1 parent cceca6e
@ranguard ranguard authored
View
4 src/groups/continent.html
@@ -34,9 +34,7 @@
[% countries = groups.keys.sort %]
[% USE table(countries, cols=3) %]
-[% col_nums = [0,1,2] %]
-
-[% FOREACH col = col_nums %]
+[% FOREACH col = [0,1,2] %]
<li id="d[% col + 1 %]">
[% FOREACH country = table.col(col) %]
<h2><a href="[% country_links.$country %]">[% country %]</a></h2>
View
45 src/groups/country.html
@@ -30,23 +30,40 @@
<p>The following groups are in [% country %], <a href="[% continent_link %]">[% continent %]</a>:</p>
+<ol class="details">
+
[% IF country == 'United States of America' %]
- [% FOREACH state = groups.keys.sort %]
- <h3><a href="/groups/[% states.$state %]">[% state %]</a></h3>
- <ul>
- [% FOREACH group = groups.$state %]
- <li><a href="[% group.id %].html">[% group.name | html_entity %]</a></li>
- [% END %]
- </ul>
- [% END %]
+ [% USE table(groups.keys.sort, cols=3) %]
+ [% FOREACH col = [0,1,2] %]
+ <li id="d[% col + 1 %]">
+ <ul>
+ [% FOREACH state = table.col(col) %]
+ <h3><a href="/groups/[% states.$state %]">[% state %]</a></h3>
+ <ul>
+ [% FOREACH group = groups.$state %]
+ <li><a href="[% group.id %].html">[% group.name | html_entity %]</a></li>
+ [% END %]
+ </ul>
+ [% END %]
+ </ul>
+ </li>
+ [% END %]
[% ELSE %]
- <ul>
- [% FOREACH group = groups %]
- <li><a href="[% group.id %].html">[% group.name | html_entity %]</a></li>
- <!-- <li><a href="[% group.web %]">[% group.name | html_entity %]</a> (<a href="[% group.id %].html">?</a>)</li> -->
- [% END %]
- </ul>
+
+ [% USE table(groups, cols=3) %]
+
+ [% FOREACH col = [0,1,2] %]
+ <li id="d[% col + 1 %]">
+ <ul>
+ [% FOREACH group = table.col(col) %]
+ <li><a href="[% group.id %].html">[% group.name | html_entity %]</a></li>
+ [% END %]
+ </ul>
+ </li>
+ [% END %]
+
[% END %]
+</ol>
[% ELSE %]
<p>There are currently no groups in [% continent %].</p>
View
28 src/groups/index.html
@@ -25,10 +25,8 @@
<p style="clear:both; height: 50px">&nbsp;</p>
-
-
<p>
-or select a continent:
+View a continent:
[% link_to("/groups/africa.html", "Africa") %],
[% link_to("/groups/asia.html", "Asia") %],
@@ -38,9 +36,6 @@
[% link_to("/groups/north_america.html", "North America") %],
[% link_to("/groups/oceania.html", "Oceania") %],
[% link_to("/groups/south_america.html", "South America") %].
-
-Or click the map above.
-
<p>
The canonical source for the Perl Mongers groups is now an
@@ -49,14 +44,25 @@
<h2>All the active groups</h2>
+[% all = allgroups.values.sort('name') %]
-<ul>
-[% FOREACH group = allgroups.keys.sort %]
- <li><a href="[% allgroups.$group.id %].html">[% group | html_entity %]</a></li>
+<ol class="details">
+
+[% USE table(all, cols=3) %]
+
+[% FOREACH col = [0,1,2] %]
+<li id="d[% col + 1 %]">
+ <ul>
+ [% FOREACH group = table.col(col) %]
+ <li><a href="[% group.id %].html">[% group.name | html_entity %]</a></li>
+ [% END %]
+ </ul>
+</li>
[% END %]
-</ul>
+</ol>
+<p style="clear:both;">
Total number of groups is [% allgroupsnum %]
-
+</p>
[% END %]
Please sign in to comment.
Something went wrong with that request. Please try again.