Skip to content

Commit 1a16a28

Browse files
author
delphidabbler
committed
Add code to list applications from applications collection
Retained older code that reads application info from programs.yml. This code will be removed when all mothballed programs added to applications collection.
1 parent 356cc6f commit 1a16a28

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

programs.html

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,38 @@ <h1 roll="heading">
99

1010
<p>Each program's page provides links that can be used to download the program and its source code.</p>
1111

12+
{% assign sorted-apps = site.applications | sort: "priority" %}
13+
{% for program in sorted-apps %}
14+
{% assign test = forloop.index | modulo: 2 %}
15+
{% if test <> 0 %}<div class="row">{% endif %}
16+
<section role="section" aria-labelledby="{{ program.id | escape }}-head">
17+
<div class="col-sm-6">
18+
<div class="panel panel-primary">
19+
<header class="panel-heading" id="{{ program.id | escape }}-head">
20+
<h2>{{ program.title | escape }}</h2>
21+
</header>
22+
<div class="panel-body">
23+
<p>{{ program.summary | escape }}</p>
24+
{% if program.mothballed %}<p class="alert alert-warning small" role="alert"><span class="fa fa-flag fa-lg fa-x-pad-right" aria-hidden="true"></span><span class="sr-only">Note</span> This program is mothballed. It is being neither developed nor supported.</p>{% endif %}
25+
</div>
26+
<div class="panel-footer text-right">
27+
<a href="{{ program.url }}" aria-label="{{ program.title | escape }} page on {{ site.data.core.orig-site-name | escape }}">More info</a>
28+
</div>
29+
</div>
30+
</div>
31+
</section>
32+
{% if test == 0 or forloop.last %}
33+
</div> <!-- ./row -->
34+
<!-- Clear the lg cols if their content doesn't match in height -->
35+
<div class="clearfix visible-sm-block" role="presentation"></div>
36+
{% endif %}
37+
{%endfor %}
38+
39+
<!-- TEMPORARY: Now loop through collection in _data/programs
40+
Following code will eventually be removed when each program has its own
41+
page.
42+
-->
43+
1244
{% assign supported-programs = site.data.programs %}
1345
{% for program in supported-programs %}
1446
{% assign test = forloop.index | modulo: 2 %}
@@ -35,4 +67,4 @@ <h2>{{ program.title | escape }}</h2>
3567
<div class="clearfix visible-sm-block" role="presentation"></div>
3668
{% endif %}
3769
{%endfor %}
38-
70+
<!-- END TEMPORARY section -->

0 commit comments

Comments
 (0)