flash.moe/templates/dev/projects.twig

55 lines
2.4 KiB
Twig
Raw Normal View History

2023-10-13 18:01:07 +00:00
{% extends 'dev/master.twig' %}
2023-10-12 18:45:11 +00:00
2023-10-13 19:41:25 +00:00
{% set header_title = 'projects' %}
2023-10-12 18:45:11 +00:00
{% block container %}
{% for sectionId, section in sections %}
<div class="section" id="section-{{ sectionId }}">
<div class="section-content">
<div class="section-background"></div>
<h1>{{ section.title }}</h1>
</div>
</div>
{% for project in section.items %}
<div class="project project-type-{{ sectionId }}" id="{{ project.info.cleanName }}" style="--project-colour: {{ project.colour }};">
<div class="project-content">
<div class="project-details">
<h2>{{ project.info.name }}<div class="project-languages">
{% for lang in project.langs %}
<div class="project-language" style="--language-colour: {{ lang.colour }};">{{ lang.name }}</div>
{% endfor %}</div>
</h2>
{% if project.info.hasSummary %}
<p class="project-details-summary">{{ project.info.summary }}</p>
{% endif %}
{% if project.info.hasDescription %}
{% set lines = project.info.description|split("\n") %}
{% for line in lines %}
<p>{{ line|trim }}</p>
{% endfor %}
{% endif %}
</div>
<div class="project-links">
{% if project.info.hasHomePageUrl %}
<a class="project-link project-link-homepage" href="{{ project.info.homePageUrl }}" rel="noopener" target="_blank">Homepage</a>
{% endif %}
{% if project.info.hasSourceUrl %}
<a class="project-link project-link-repository" href="{{ project.info.sourceUrl }}" rel="noopener" target="_blank">Source</a>
{% endif %}
{% if project.info.hasDiscussionUrl %}
<a class="project-link project-link-forum" href="{{ project.info.discussionUrl }}" rel="noopener" target="_blank">Discussion</a>
{% endif %}
</div>
</div>
</div>
{% endfor %}
{% endfor %}
{% endblock %}