Skip to content

Commit

Permalink
Hide useful links section on DataTypes page
Browse files Browse the repository at this point in the history
  • Loading branch information
vpavkin committed Feb 4, 2016
1 parent b01a01e commit 456ed11
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
11 changes: 9 additions & 2 deletions docs/src/site/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,15 @@ <h1>Cats</h1>
{{ content }}
</div>
</div>
{% if (page.section == 'data') or (page.section == 'typeclasses') and ((page.source != null) or (page.scaladoc != null))%}
<div id="extra">
<!--workaround of poor boolean algebra implementation (see: http://stackoverflow.com/questions/23054564/how-to-use-multiple-arguments-in-an-if-statement-with-liquid?answertab=oldest#tab-top) -->
{% if (page.section == 'data') or (page.section == 'typeclasses') %}
{% assign linksSection = true %}
{% endif %}
{% if (page.source != null) or (page.scaladoc != null) %}
{% assign linksContent = true %}
{% endif %}
{% if linksSection and linksContent %}
<div id="extra">
<h5>Useful links:</h5>
<ul>
{% if (page.source != null) and (page.source contains 'https:') %}
Expand Down
7 changes: 2 additions & 5 deletions docs/src/site/datatypes.html → docs/src/site/datatypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
title: "Data Types"
section: "data"
---
# Data Types

<h1>Data Types</h1>

<ul>
{% for x in site.tut %}
{% if x.section == 'data' %}
<li><a href="{{ site.baseurl }}{{ x.url }}">{{ x.title }}</a></li>
- [{{x.title}}]({{site.baseurl}}{{x.url}})
{% endif %}
{% endfor %}
</ul>

0 comments on commit 456ed11

Please sign in to comment.