Skip to content

Commit c2db34b

Browse files
committed
Improvements to tutorials template.
1 parent c831ffd commit c2db34b

File tree

1 file changed

+33
-28
lines changed

1 file changed

+33
-28
lines changed

_layouts/tutorials.html

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -32,34 +32,8 @@ <h1>{{ page.title }}</h1>
3232
</tbody>
3333
</table>
3434
</div>
35+
{% unless page.disable_header %}
3536
<div id="markdown-content-container">
36-
<!--
37-
<h6 id="at-one-glance"><strong>At one glance</strong></h6>
38-
<h6 id="solver-elasticity">Solver: <code style="text-transform: uppercase;" class="language-plaintext highlighter-rouge">{{ page.solver }}</code></h6>
39-
<h6 id="requires-su2_cfd">Uses: <code style="text-transform: uppercase;" class="language-plaintext highlighter-rouge">{{ page.requires }}</code></h6>
40-
<h6 id="follows-linear-elasticity">Prerequisites:
41-
{% if page.follows %}
42-
{% for section in site.data.tutorials %}
43-
{% for item in section.tutorials %}
44-
{% if item == page.follows %}
45-
{% assign item_url = item | prepend:"/tutorials/" | append:"/" %}
46-
{% assign p = site.tutorials | where:"url", item_url | first %}
47-
<a href="{{p.permalink}}"><strong>{{p.title}}</strong></a>
48-
{% endif %}
49-
{% endfor %}
50-
{% endfor %}
51-
{% else %}
52-
<strong>None</strong>
53-
{% endif %}
54-
</h6>
55-
<h6 id="complexity-basic">
56-
Complexity:
57-
{% if page.complexity == "basic" %}
58-
<span style="color: green;"><strong>Basic</strong></span>
59-
{% elsif page.complexity == "advanced" %}
60-
<span style="color: orange;"><strong>Advanced</strong></span>
61-
{% endif %}
62-
</h6> -->
6337
<strong>At one glance:</strong>
6438
<table style="width:50%">
6539
<tbody>
@@ -71,6 +45,21 @@ <h6 id="complexity-basic">
7145
<td> <h6 id="solver-elasticity">Uses:</h6></td>
7246
<td> <h6><code style="text-transform: uppercase;" class="language-plaintext highlighter-rouge">{{ page.requires }}</code></h6></td>
7347
</tr>
48+
{% if page.userguide %}
49+
<tr>
50+
<td> <h6 id="solver-userguide"> User Guide:</h6></td>
51+
<td> <h6>
52+
{% for section in site.data.docs_v7 %}
53+
{% for item in section.docs_v7 %}
54+
{% if item == page.userguide %}
55+
{% assign item_url = item | prepend:"/docs_v7/" | append:"/" %}
56+
{% assign p = site.docs_v7 | where:"url", item_url | first %}
57+
<a href="{{p.permalink}}"><strong>{{p.title}}</strong></a>
58+
{% endif %}
59+
{% endfor %}
60+
{% endfor %}
61+
</tr>
62+
{% endif %}
7463
<tr>
7564
<td> <h6 id="solver-elasticity">Prerequisites:</h6></td>
7665
<td> <h6> {% if page.follows %}
@@ -87,19 +76,35 @@ <h6 id="complexity-basic">
8776
<strong>None</strong>
8877
{% endif %} </h6> </td>
8978
</tr>
79+
{% if page.follows2 %}
80+
<tr>
81+
<td> <h6 id="solver-follows2"> </h6></td>
82+
<td> <h6>
83+
{% for section in site.data.tutorials %}
84+
{% for item in section.tutorials %}
85+
{% if item == page.follows2 %}
86+
{% assign item_url = item | prepend:"/tutorials/" | append:"/" %}
87+
{% assign p = site.tutorials | where:"url", item_url | first %}
88+
<a href="{{p.permalink}}"><strong>{{p.title}}</strong></a>
89+
{% endif %}
90+
{% endfor %}
91+
{% endfor %}
92+
</tr>
93+
{% endif %}
9094
<tr>
9195
<td> <h6 id="solver-elasticity">Complexity:</h6></td>
9296
<td> <h6>{% if page.complexity == "basic" %}
9397
<span style="color: green;"><strong>Basic</strong></span>
9498
{% elsif page.complexity == "intermediate" %}
95-
<span style="color: orange;"><strong>Intermediate</strong></span>
99+
<span style="color: orange;"><strong>Intermediate</strong></span>
96100
{% elsif page.complexity == "advanced" %}
97101
<span style="color: red;"><strong>Advanced</strong></span>
98102
{% endif %}</h6></td>
99103
</tr>
100104
</tbody>
101105
</table>
102106
</div>
107+
{% endunless %}
103108

104109
<div id="markdown-content-container">{{ content }}</div>
105110
<hr>

0 commit comments

Comments
 (0)