Anonymous avatar Anonymous committed b5a5983

Avoid filekey() in templates as much as possible, use link().

Comments (0)

Files changed (14)

templates/Chris Pressey's Lingography.html

 <ul>
 {% for thing in lingography() %}
   <li>
-    <p><a href="{{ filekey(thing) }}">{{ thing }}</a> ({{ data[thing].inception_date }})</p>
+    <p>{{ link(thing) }} ({{ data[thing].inception_date }})</p>
     
     {% if data[thing].description_html %}
       {{ data[thing].description_html }}
         data[thing].development_stage not in ['idea', 'work in progress', 'abandoned', 'lost'] -%}
     <li>
       <p>
-        <a href="{{ filekey(thing) }}">{{ thing }}</a>,
+        {{ link(thing) }},
         {{ indefart(data[thing].implementation_type) }}
         for
-        <a href="{{ filekey(data[thing].implementation_of[0]) }}">{{ data[thing].implementation_of[0] }}</a>
+        {{ link(data[thing].implementation_of[0]) }}
         in
-        <a href="{{ filekey(data[thing].host_language) }}">{{ data[thing].host_language }}</a>
+        {{ link(data[thing].host_language) }}
         {% if data[thing].host_platform %}
-          for <a href="{{ filekey(data[thing].host_platform) }}">{{ data[thing].host_platform }}</a>
+          for {{ link(data[thing].host_platform) }}
         {% endif %}
         {% if data[thing].inception_date %}
           ({{ data[thing].inception_date }})

templates/Collection.html

   {% if data[thing].type in include_types and
         include_author in data[thing].authors %}
     <li>
-      <p><a href="{{ filekey(thing) }}">{{ thing }}</a></p>
+      <p>{{ link(thing) }}</p>
       {% if data[thing].description_html %}
         {{ data[thing].description_html }}
       {% endif %}

templates/Competition.html

     {%- for submission in data[thing].submitted_to -%}
       {%- if submission.competition == key -%}
         <li>
-          <a href="{{ filekey(thing) }}">{{ thing }}</a>
+          {{ link(thing) }}
           {% if submission.prize %}
             -- {{ submission.prize }}
           {% endif %}

templates/Computational Class.html

 <ul>
 {% for thing in related('computational-class')|sort %}
   <li>
-    <a href="{{ filekey(thing) }}">{{ thing }}</a>
+    {{ link(thing) }}
   </li>
 {% endfor %}
 </ul>

templates/Distribution.html

       {% endif %}
       distribution of the
       {{ data[distribution_of[0]].type|lower }}
-      <a href="{{ filekey(distribution_of[0]) }}">{{ distribution_of[0] }}</a>.
+      {{ link(distribution_of[0]) }}.
       {% if distribution_of|length > 1 %}
         (and more: {{ linked_list(distribution_of) }}.)
       {% endif %}

templates/Games by Chris Pressey.html

         'Chris Pressey' in data[thing].authors and
         data[thing].development_stage not in ['idea', 'work in progress', 'abandoned', 'lost'] -%}
     <li>
-      <p><a href="{{ filekey(thing) }}">{{ thing }}</a> ({{ data[thing].inception_date }})</p>
+      <p>{{ link(thing) }} ({{ data[thing].inception_date }})</p>
 
       {% if data[thing].description_html %}
         {{ data[thing].description_html }}
         data[thing].development_stage not in ['idea', 'work in progress'] -%}
     <li>
       <p>
-        <a href="{{ filekey(data[thing].implementation_of[0]) }}">{{ data[thing].implementation_of[0] }}</a>
-        -- as
-        <a href="{{ filekey(thing) }}">{{ thing }}</a>
-        in
-        <a href="{{ filekey(data[thing].host_language) }}">{{ data[thing].host_language }}</a>
+        {{ link(data[thing].implementation_of[0]) }}
+        -- as {{ link(thing) }} in
+        {{ link(data[thing].host_language) }}
         {% if data[thing].host_platform %}
-          for <a href="{{ filekey(data[thing].host_platform) }}">{{ data[thing].host_platform }}</a>
+          for {{ link(data[thing].host_platform) }}
         {% endif %}
-         ({{ data[thing].inception_date }})
+        ({{ data[thing].inception_date }})
       </p>
       {% if data[thing].description_html %}
         {{ data[thing].description_html }}

templates/Genre.html

 <ul>
 {% for thing in related('genre')|sort %}
   <li>
-    <a href="{{ filekey(thing) }}">{{ thing }}</a>
+    {{ link(thing) }}
   </li>
 {% endfor %}
 </ul>

templates/Implementation.html

       {% if implementation_type %}
         <a href="{{ filekey(implementation_type) }}">{{ indefart(implementation_type) }}</a>,
       {% endif %}
-      {{ writtenverb }} in <a href="{{ filekey(host_language) }}">{{ host_language }}</a>
+      {{ writtenverb }} in {{ link(host_language) }}
       {%- if host_platform %}
-        for the <a href="{{ filekey(host_platform) }}">{{ host_platform }}</a> platform
+        for the {{ link(host_platform) }} platform
       {%- endif %}
       {%- if implementation_type == 'compiler' %}
-        that generates <a href="{{ filekey(target_language) }}">{{ target_language }}</a>
+        that generates {{ link(target_language) }}
         {%- if target_platform %}
-          for the <a href="{{ filekey(target_platform) }}">{{ target_platform }}</a> platform
+          for the {{ link(target_platform) }} platform
         {%- endif %}
       {%- endif -%}.
 
       {% if in_distributions %}
         {% if in_distributions|length == 1 %}
-          It is distributed in the <a href="{{ filekey(in_distributions[0]) }}">{{ in_distributions[0] }}</a>
-          and it
+          It is distributed in the {{ link(in_distributions[0]) }} and it
         {% else %}
-          It is found in these distributions:
+          It is found in these distributions: {# TODO: linked_list? #}
           {% for distribution in in_distributions %}
-            <a href="{{ filekey(distribution) }}">{{ distribution }}</a>,
+            {{ link(distribution) }},
           {% endfor %}
           and it
         {% endif %}
         It
       {% endif %}
       {% if license == 'Public Domain' %}
-        is in the <a href="{{ filekey('Public Domain') }}">public domain</a>
+        is in the {{ link('Public Domain') }}
       {% elif license == 'Freely Redistributable' %}
         is freely redistributable unmodified for non-commercial purposes
       {%- elif license == 'Proprietary' %}
       {%- elif license == 'Unknown license' %}
         has unknown licensing terms
       {%- else %}
-        is distributed under the
-        <a href="{{ filekey(license) }}">{{ license }}</a>
+        is distributed under the {{ link(license) }}
       {%- endif -%}.
     </p>
     {% if description_html %}

templates/LoUIE.html

         'Chris Pressey' in data[thing].authors and
         data[thing].development_stage in ['idea'] -%}
     <li>
-      <p><a href="{{ filekey(thing) }}">{{ thing }}</a> ({{ data[thing].inception_date }})</p>
+      <p>{{ link(thing) }} ({{ data[thing].inception_date }})</p>
       {% if data[thing].description_html %}
         {{ data[thing].description_html }}
       {% endif %}

templates/Music by What is this I don't even.html

         related('implementation-of', key=thing) -%}
     <li>
       <p>
-        <a href="{{ filekey(thing) }}">{{ thing }}</a>
+        {{ link(thing) }}
         (<i>{{ link_lower(data[thing].genre) }},
          {{ link(data[thing].composed_on) }},
          {{ data[thing].inception_date }}</i>)
     <li>
       {% set thing = data[impl].implementation_of[0] %}
       <p>
-        <a href="{{ filekey(thing) }}">{{ thing }}</a>
+        {{ link(thing) }}
         (<i>{{ link_lower(data[thing].genre) }}
          {%- if data[thing].composed_on and data[thing].inception_date -%},
            {{ link(data[thing].composed_on) }},

templates/News.html

 <ul>
 {%- for thing in news_items() -%}
   <li>
-      {{ data[thing].news_date }}: <a href="{{ filekey(thing) }}">{{ thing }}</a>
+      {{ data[thing].news_date }}: {{ link(thing) }}
   </li>
 {%- endfor -%}
 </ul>

templates/Platform.html

 {% block implementable_content %}
 <h2>Native Language</h2>
 
-<p><a href="{{ filekey(native_language) }}">{{ native_language }}</a></p>
+<p>{{ link(native_language) }}</p>
 
 {% if other_languages %}
   <h2>Other Languages</h2>
 
   <ul>
     {% for language in other_languages %}
-      <li><a href="{{ filekey(language) }}">{{ language }}</a></li>
+      <li>{{ link(language) }}</li>
     {% endfor %}
   </ul>
 {% endif %}

templates/Programming Paradigm.html

 <ul>
 {% for thing in related('paradigms')|sort %}
     <li>
-      <a href="{{ filekey(thing) }}">{{ thing }}</a>
+      {{ link(thing) }}
     </li>
 {% endfor %}
 </ul>

templates/Ranking.html

 <ol>
 {% for thing in entries %}
   <li>
-    <p><a href="{{ filekey(thing) }}">{{ thing }}</a></p>
+    <p>{{ link(thing) }}</p>
     {% if data[thing].description_html %}
       {{ data[thing].description_html }}
     {% endif %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.