Commits

Anonymous committed 947794b

Merge Ranking into Collection and get rid of Ranking type.

Comments (0)

Files changed (5)

data/collections.yaml

     Of course, if you do manage to complete something based on one of them,
     I would appreciate being given some credit (since you are a gracious
     individual as well, right?)
+
+Chris Pressey's Favourite Video Games:
+  type: Collection
+  domain: Chris Pressey
+  description: |
+    Well, I figured that if
+    [Wouter could have such a page](http://strlen.com/rants/fav_games.html),
+    and that since I've been told I have good taste in video games...
+    
+    Gameplay impresses me far more than the graphics or sound
+    effects or "realism" of the game.   Music does has some influence
+    on me though, in that an exceptional soundtrack will count for some
+    extra points.
+  see-also:
+  - Chris Pressey's Favourite Text Adventures
+  - Chris Pressey's Favourite Other Computer Games
+  - Games by Chris Pressey
+  entries:
+  - Typhoon Thompson
+  - Pepper II
+  - City Connection
+  - Katamari Damacy
+  - Liquid Kids
+  - Lost Tomb
+  - The New Zealand Story
+  - CoolBoarders 2
+  - Super Monkey Ball 2
+  - Cloak and Dagger
+  - Fall Down
+
+Chris Pressey's Favourite Text Adventures:
+  type: Collection
+  domain: Chris Pressey
+  description: |
+    Here is a list of [[Text Adventure|text adventure]] games that I've played (though some of
+    them do have supplementary graphics), and, while I'm a bit hesitant to call
+    some of them my favourites, I must have enjoyed them enough to remember them.
+    You'll notice that I am not actually particularly good at solving these things!
+  see-also:
+  - Chris Pressey's Favourite Video Games
+  - Chris Pressey's Favourite Other Computer Games
+  - Games by Chris Pressey
+  entries:
+  - The Hitch-Hiker's Guide to the Galaxy
+  - Winter Wonderland
+  - The Africa Adventure
+  - Cranston Manor
+  - Creature Venture
+  - Dungeon (MIT)
+  - The Secret of St. Bride's
+  - Time & Magick
+
+Chris Pressey's Favourite Other Computer Games:
+  type: Collection
+  domain: Chris Pressey
+  description: |
+    Please forgive the awkward title.  This is a list of computer games,
+    that are neither video games nor text adventure games,
+    that I've played and enjoyed.
+  see-also:
+  - Chris Pressey's Favourite Video Games
+  - Chris Pressey's Favourite Text Adventures
+  - Games by Chris Pressey
+  entries:
+  - Civilization II
+  - Dungeon Master
+  - The Incredible Machine 2
+  - Adventure Construction Set
+  - Zelazny Angband
+  - Alphaman
+  - Dungeon Keeper II
+  - King's Quest V
+  - Ultima VII Part 2

data/rankings.yaml

-# encoding: UTF-8
-Chris Pressey's Favourite Video Games:
-  type: Ranking
-  domain: Chris Pressey
-  description: |
-    Well, I figured that if
-    [Wouter could have such a page](http://strlen.com/rants/fav_games.html),
-    and that since I've been told I have good taste in video games...
-    
-    Gameplay impresses me far more than the graphics or sound
-    effects or "realism" of the game.   Music does has some influence
-    on me though, in that an exceptional soundtrack will count for some
-    extra points.
-  see-also:
-  - Chris Pressey's Favourite Text Adventures
-  - Chris Pressey's Favourite Other Computer Games
-  - Games by Chris Pressey
-  entries:
-  - Typhoon Thompson
-  - Pepper II
-  - City Connection
-  - Katamari Damacy
-  - Liquid Kids
-  - Lost Tomb
-  - The New Zealand Story
-  - CoolBoarders 2
-  - Super Monkey Ball 2
-  - Cloak and Dagger
-  - Fall Down
-
-Chris Pressey's Favourite Text Adventures:
-  type: Ranking
-  domain: Chris Pressey
-  description: |
-    Here is a list of [[Text Adventure|text adventure]] games that I've played (though some of
-    them do have supplementary graphics), and, while I'm a bit hesitant to call
-    some of them my favourites, I must have enjoyed them enough to remember them.
-    You'll notice that I am not actually particularly good at solving these things!
-  see-also:
-  - Chris Pressey's Favourite Video Games
-  - Chris Pressey's Favourite Other Computer Games
-  - Games by Chris Pressey
-  entries:
-  - The Hitch-Hiker's Guide to the Galaxy
-  - Winter Wonderland
-  - The Africa Adventure
-  - Cranston Manor
-  - Creature Venture
-  - Dungeon (MIT)
-  - The Secret of St. Bride's
-  - Time & Magick
-
-Chris Pressey's Favourite Other Computer Games:
-  type: Ranking
-  domain: Chris Pressey
-  description: |
-    Please forgive the awkward title.  This is a list of computer games,
-    that are neither video games nor text adventure games,
-    that I've played and enjoyed.
-  see-also:
-  - Chris Pressey's Favourite Video Games
-  - Chris Pressey's Favourite Text Adventures
-  - Games by Chris Pressey
-  entries:
-  - Civilization II
-  - Dungeon Master
-  - The Incredible Machine 2
-  - Adventure Construction Set
-  - Zelazny Angband
-  - Alphaman
-  - Dungeon Keeper II
-  - King's Quest V
-  - Ultima VII Part 2
   type: type
 Discipline:
   type: type
-Ranking:
-  type: type
 Collection:
   type: type
 Programming Language Family:

templates/Collection.html

 {% extends "base.html" %}
 
 {#
-  The query functionality presented here is very crude,
+  The query functionality presented here is fairly crude,
   and so most Collection nodes should provide bespoke
   templates for themselves which implement their query
   logic in Jinja2.
+  
+  If the collection node has an 'entries' key, it is taken
+  to be an ordered list of explicit entries.
 #}
 
 {% block content %}
 
-<ul>
-{% for thing in data %}
-  {% if data[thing].type in include_types and
-        include_author in data[thing].authors %}
+{% if entries %}
+  <ol>
+  {% for thing in entries %}
     <li>
-      <p>{{ link(thing) }}</p>
+      <p><b>{{ link(thing) }}</b>
+      (
+        {{- link(data[thing].genre) }}
+        {%- if data[thing].platform -%}, {{ link(data[thing].platform) }}{% endif -%}
+        {%- if data[thing].controls -%}, {{ data[thing].controls }}{% endif -%}
+      )
+      </p>
       {% if data[thing].description_html %}
         {{ data[thing].description_html }}
       {% endif %}
         {{ data[thing].commentary_html }}
       {% endif %}
     </li>
-  {% endif %}
-{% endfor %}
-</ul>
+  {% endfor %}
+  </ol>
+{% else %}
+  <ul>
+  {% for thing in data %}
+    {% if data[thing].type in include_types and
+          include_author in data[thing].authors %}
+      <li>
+        <p>{{ link(thing) }}</p>
+        {% if data[thing].description_html %}
+          {{ data[thing].description_html }}
+        {% endif %}
+        {% if data[thing].commentary_html %}
+          {{ data[thing].commentary_html }}
+        {% endif %}
+      </li>
+    {% endif %}
+  {% endfor %}
+  </ul>
+{% endif %}
 
 {% endblock content %}

templates/Ranking.html

-{% extends "base.html" %}
-
-{% block content %}
-
-<ol>
-{% for thing in entries %}
-  <li>
-    <p><b>{{ link(thing) }}</b>
-    (
-      {{- link(data[thing].genre) }}
-      {%- if data[thing].platform -%}, {{ link(data[thing].platform) }}{% endif -%}
-      {%- if data[thing].controls -%}, {{ data[thing].controls }}{% endif -%}
-    )
-    </p>
-    {% if data[thing].description_html %}
-      {{ data[thing].description_html }}
-    {% endif %}
-    {% if data[thing].commentary_html %}
-      {{ data[thing].commentary_html }}
-    {% endif %}
-  </li>
-{% endfor %}
-</ol>
-
-{% endblock content %}