Skip to content

Commit

Permalink
feat: discord links and download terms
Browse files Browse the repository at this point in the history
  • Loading branch information
vinteo committed May 9, 2024
1 parent 89cd335 commit 3011de9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
10 changes: 10 additions & 0 deletions _includes/assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ nord-stack#ship-page h1:not(#ship-name, [slot="header"]) {
}
}

#ship-links ul {
list-style-type: none;
margin: 0;
padding: 0;

li {
margin-left: 20px;
}
}

#usage nord-table td {
white-space: normal;
}
Expand Down
25 changes: 24 additions & 1 deletion ships/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ eleventyComputed:
currentTitle: "{{ ship.name }}"
---

{% macro linkIcon(url) %}
{% if r/github\.com/.test(url) %}
<i class="fa-brands fa-github fa-lg fa-fw"></i>
{% elseif r/discord\.com/.test(url) %}
<i class="fa-brands fa-discord fa-lg fa-fw"></i>
{% else %}
<i class="fa-solid fa-globe fa-lg fa-fw"></i>
{% endif %}
{% endmacro %}

<nord-header slot="header">
<nord-stack direction="horizontal" wrap>
<nord-button-group>
Expand Down Expand Up @@ -221,6 +231,10 @@ eleventyComputed:
</table>
</nord-table>
</nord-card>
<nord-banner variant="warning">
EGOTech's free blueprints and any of its derivatives can be freely distributed but are not to be sold in game or otherwise.
<a href="http://creativecommons.org/licenses/by-nc-sa/4.0/">License</a>
</nord-banner>
{% else %}
<h1 id="purchase">Purchase Blueprint</h1>
<nord-banner variant="info" style="width: 300px">Price: {{ ship.cost.toLocaleString() }} Credits</nord-banner>
Expand Down Expand Up @@ -257,8 +271,17 @@ eleventyComputed:
<h1>Links</h1>
<ul>
{% for link in ship.links %}
<li><a href="{{link.url}}">{{link.text}}</a></li>
<li>
{{ linkIcon(link.url) }}
<a href="{{link.url}}" alt="{{link.text}}" target="_blank">{{link.text}}</a>
</li>
{% endfor %}
{% if ship.discord %}
<li>
{{ linkIcon(ship.discord) }}
<a href="{{ship.discord}}" alt="EGOTech Discord Server Ship Information" target="_blank">EGOTech Discord Server Ship Information</a>
</li>
{% endif %}
</ul>
</nord-stack>
<nord-stack id="changelog">
Expand Down

0 comments on commit 3011de9

Please sign in to comment.