Files
appimage.github.io/_includes/list_links.html
T

55 lines
2.3 KiB
HTML

{% for link in post.links %}
{% case link.type %}
{% when "Launchpad" %}
{% assign prefix = "https://launchpad.net/" %}
{% when "Download" %}
{% assign prefix = nil %}
{% assign octicon = "octicon-desktop-download" %}
{% when "GitHub" %}
{% assign prefix = "https://github.com/" %}
{% assign octicon = "octicon-mark-github" %}
{% when "Twitter" %}
{% assign prefix = "https://twitter.com/" %}
{% when "Google+" %}
{% assign prefix = "https://plus.google.com/" %}
{% when "Bitbucket" %}
{% assign prefix = "https://bitbucket.org/" %}
{% when "Build" or "License" %}
{% assign prefix = nil %}
{% when "Screenshots" or "Videos" %}
{% continue %}
{% else %}
{% assign prefix = nil %}
{% assign octicon = nil %}
{% endcase %}
<a href="{{ prefix }}{{ link.url }}" class="button {% if link.name == "Download" or link.type == "Download" %}green{% else %}white{% endif %}">
{% if octicon %}<span class="octicon {{ octicon }}"></span> {% endif %}{% if link.name %}{{ link.name }}{% else %}{{ link.type }}{% endif %}
</a>
{% if forloop.last == false %} {% endif %}
{% endfor %}
{% if post.appdata.Url.homepage %}
<a href="{{ post.appdata.Url.homepage }}" class="button white"><span class="octicon octicon-link-external"></span> {{ page.name | remove: ".md" }} Website</a>
{% endif %}
{% if post.appdata.Url.bugtracker %}
<a href="{{ post.appdata.Url.bugtracker }}" class="button white"><span class="octicon octicon-bug"></span> {{ page.name | remove: ".md" }} Bugtracker</a>
{% endif %}
{% if post.appdata.Url.faq %}
<a href="{{ post.appdata.Url.faq }}" class="button white"><span class="octicon octicon-question"></span> {{ page.name | remove: ".md" }} FAQ</a>
{% endif %}
{% if post.appdata.Url.help %}
<a href="{{ post.appdata.Url.help }}" class="button white"><span class="octicon octicon-link-external"></span> {{ page.name | remove: ".md" }} Help</a>
{% endif %}
{% if post.appdata.Url.donation %}
<a href="{{ post.appdata.Url.donation }}" class="button white"><span class="octicon octicon-link-external"></span> Donate</a>
{% endif %}
{% if post.appdata.Url.translate %}
<a href="{{ post.appdata.Url.translate }}" class="button white"><span class="octicon octicon-link-external"></span> Help translating {{ page.name | remove: ".md" }}</a>
{% endif %}