Loop through next.yml to render roadmap cards

This commit is contained in:
davegson 2020-07-28 12:59:21 +02:00
parent 20b1214b21
commit 21dfad4fcd
2 changed files with 165 additions and 139 deletions

View file

@ -2,51 +2,74 @@
<div class="block shadowthing p-8 rounded-lg"> <div class="block shadowthing p-8 rounded-lg">
<div class="tabs"> <div class="tabs">
<div class="tab "> <div class="tab ">
<input class="dropinput" type="checkbox" id="chck1"> <input class="dropinput" type="checkbox" id="card-{{ include.state }}-{{ forloop.index }}">
<label style="min-width: 90%; min-height: 150px; display: block;" class=" absolute" for="chck1"> <label style="min-width: 90%; min-height: 150px; display: block;" class=" absolute" for="card-{{ include.state }}-{{ forloop.index }}">
<img class="absolute right-0" style="margin-right: 1rem;" id="icon" src="{{ site.assets_url }}/icons/arrow.svg" alt=""> <img class="absolute right-0" style="margin-right: 1rem;" id="icon" src="{{ site.assets_url }}/icons/arrow.svg" alt="">
</label> </label>
<div> <div>
<div class="flex"> <div class="flex">
<span class="inline-flex items-center px-3 py-1 rounded-full text-sm font-medium leading-5 bg-blue-100 text-blue-800 mr-2"> {% for tag in card.projects %}
Portmaster {% assign tag_bg_strength = 100 %}
</span>
<span class="inline-flex items-center px-3 py-1 rounded-full text-sm font-medium leading-5 bg-green-100 text-green-800 mr-2"> {% if tag == 'Portmaster' %}
Spn {% assign tag_color = 'blue' %}
{% elsif tag == 'SPN' %}
{% assign tag_color = 'green' %}
{% elsif tag == 'Website' %}
{% assign tag_color = 'pink' %}
{% elsif tag == 'Backoffice' %}
{% assign tag_color = 'gray' %}
{% assign tag_bg_strength = 200 %}
{% elsif tag == 'Community' %}
{% assign tag_color = 'purple' %}
{% elsif tag == 'Marketing' %}
{% assign tag_color = 'orange' %}
{% endif %}
<span class="inline-flex items-center px-3 py-1 rounded-full text-sm font-medium leading-5 bg-{{ tag_color }}-{{ tag_bg_strength }} text-{{ tag_color }}-800 mr-2">
{{ tag }}
</span> </span>
{% endfor %}
</div> </div>
<div class="flex pt-6 items-center"> <div class="flex pt-6 items-center">
<div> <div>
{% if include.state == 'done' %}
<img style="min-width: 19px;" src="{{ site.assets_url }}icons/tick.svg" alt=""> <img style="min-width: 19px;" src="{{ site.assets_url }}icons/tick.svg" alt="">
<!-- cross <img style="min-width: 19px;" src="{{ site.assets_url }}icons/cross.svg" alt=""> --> {% elsif include.state == 'in_progress' %}
<!-- cross <img style="min-width: 19px;" src="{{ site.assets_url }}icons/files.svg" alt=""> --> <img style="min-width: 19px;" src="{{ site.assets_url }}icons/files.svg" alt="">
<!-- cog <img style="min-width: 19px;" src="{{ site.assets_url }}icons/cog.svg" alt=""> --> {% elsif include.state == 'discarded' %}
<img style="min-width: 19px;" src="{{ site.assets_url }}icons/cross.svg" alt="">
{% elsif include.state == 'backlog' %}
<img style="min-width: 19px;" src="{{ site.assets_url }}icons/cog.svg" alt="">
{% endif %}
</div> </div>
<h1 class="pl-3 font-bold text-lg">SPN Community Node Support</h1> <h1 class="pl-3 font-bold text-lg">{{ card.title }}</h1>
</div> </div>
</div> </div>
<div style="padding-left: 0;" class="tab-content opacity-50 text-md"> <div style="padding-left: 0;" class="tab-content opacity-50 text-md">
All details will be finished to fully support community {% for paragraph in card.description %}
nodes in the network. (This does not include the planned <p>{{ paragraph }}</p>
compensation for running a node.) There will be a website {% unless forloop.last %}
to easily get you started. <br/>
{% endunless %}
{% endfor %}
</div> </div>
</div> </div>
<div class="pt-3"> <div class="pt-3">
<hr> <hr>
<div class="flex relative pb-2 pt-6 -mt-1"> <div class="flex relative pb-2 pt-6 -mt-1" style="min-height: 16px;">
<span style="font-size: 0.8rem;">#866 opened by <strong>BinaryMuse</strong> to atom/github</span> <span style="font-size: 0.8rem;">
{% if card.link %}
#866 opened by <strong>BinaryMuse</strong> to atom/github
{% endif %}
</span>
<div class="absolute right-0"> <div class="absolute right-0">
<div class="flex-shrink-0 mt-0"> <div class="flex-shrink-0 mt-0">
<div class="flex overflow-hidden"> <div class="flex overflow-hidden">
<img class="inline-block h-6 w-6 rounded-full text-white shadow-solid border-2 border-white" src="http://localhost:4000/assets/img/profiles/raphael.png" alt=""> {% for member in card.team %}
<img class="-ml-1 inline-block h-6 w-6 rounded-full text-white shadow-solid border-2 border-white" src="http://localhost:4000/assets/img/profiles/daniel.png" alt=""> <img class="inline-block h-6 w-6 rounded-full text-white shadow-solid border-2 border-white" src="{{ site.img_url }}profiles/{{ member | downcase }}.png" alt="{{ member }}">
<img class="-ml-1 inline-block h-6 w-6 rounded-full text-white shadow-solid border-2 border-white" src="http://localhost:4000/assets/img/profiles/patrick.png" alt=""> {% endfor %}
<!-- <img class="-ml-1 inline-block h-6 w-6 rounded-full text-white shadow-solid border-2 border-white" src="http://localhost:4000/assets/img/profiles/tabitha.png" alt="">
<img class="-ml-1 inline-block h-6 w-6 rounded-full text-white shadow-solid border-2 border-white" src="http://localhost:4000/assets/img/profiles/luke.png" alt="">
<img class="-ml-1 inline-block h-6 w-6 rounded-full text-white shadow-solid border-2 border-white" src="http://localhost:4000/assets/img/profiles/alex.png" alt="">
<img class="-ml-1 inline-block h-6 w-6 rounded-full text-white shadow-solid border-2 border-white" src="http://localhost:4000/assets/img/profiles/martin.png" alt="">
<img class="-ml-1 inline-block h-6 w-6 rounded-full text-white shadow-solid border-2 border-white" src="http://localhost:4000/assets/img/profiles/david.png" alt=""> -->
</div> </div>
</div> </div>
</div> </div>
@ -55,4 +78,3 @@
</div> </div>
</div> </div>
</div> </div>

View file

@ -5,8 +5,6 @@ layout: page
<section style="margin-top: 12rem; margin-bottom: 8rem;" class="mb-40"> <section style="margin-top: 12rem; margin-bottom: 8rem;" class="mb-40">
<div class="items-center h-full"> <div class="items-center h-full">
<div>
<div>
<div class="relative max-w-screen-sm lg:max-w-screen-xl mx-auto px-4 sm:px-6 xl:px-0 lg:flex"> <div class="relative max-w-screen-sm lg:max-w-screen-xl mx-auto px-4 sm:px-6 xl:px-0 lg:flex">
<div class="pt-8"> <div class="pt-8">
<div class="text-center lg:text-left"> <div class="text-center lg:text-left">
@ -57,42 +55,50 @@ layout: page
</div> </div>
</div> </div>
</div> </div>
{% if site.data.next.cards.done.size > 0 %}
<div class="pt-48"> <div class="pt-48">
<div class="gridwrapper"> <div class="gridwrapper">
<div style="margin-top: -3rem;" class="flex absolute pl-8 "> <div style="margin-top: -3rem;" class="flex absolute pl-8 ">
<span class="opacity-50">Recently Done</span> <span class="opacity-50">Recently Done</span>
<strong class="pl-2 opacity-75">(3)</strong> <strong class="pl-2 opacity-75">({{ site.data.next.cards.done.size }})</strong>
</div>
{% include roadmap_card.html %}
{% include roadmap_card.html %}
</div> </div>
{% for card in site.data.next.cards.done %}
{% include roadmap_card.html state = 'done' %}
{% endfor %}
</div> </div>
</div> </div>
{% endif %}
{% if site.data.next.cards.in_progress.size > 0 %}
<div class="pt-48"> <div class="pt-48">
<div class="gridwrapper"> <div class="gridwrapper">
<div style="margin-top: -3rem;" class="flex absolute pl-8 "> <div style="margin-top: -3rem;" class="flex absolute pl-8 ">
<span class="opacity-50">In Progress</span> <span class="opacity-50">In Progress</span>
<strong class="pl-2 opacity-75">(3)</strong> <strong class="pl-2 opacity-75">({{ site.data.next.cards.in_progress.size }})</strong>
</div>
{% include roadmap_card.html %}
{% include roadmap_card.html %}
{% include roadmap_card.html %}
{% include roadmap_card.html %}
</div> </div>
{% for card in site.data.next.cards.in_progress %}
{% include roadmap_card.html state = 'in_progress' %}
{% endfor %}
</div> </div>
</div> </div>
{% endif %}
{% if site.data.next.cards.discarded.size > 0 %}
<div class="pt-48"> <div class="pt-48">
<div class="gridwrapper"> <div class="gridwrapper">
<div style="margin-top: -3rem;" class="flex absolute pl-8 "> <div style="margin-top: -3rem;" class="flex absolute pl-8 ">
<span class="opacity-50">Abandoned</span> <span class="opacity-50">Discarded</span>
<strong class="pl-2 opacity-75">(3)</strong> <strong class="pl-2 opacity-75">({{ site.data.next.cards.discarded.size }})</strong>
</div>
{% include roadmap_card.html %}
</div>
</div>
</div> </div>
{% for card in site.data.next.cards.discarded %}
{% include roadmap_card.html state = 'discarded' %}
{% endfor %}
</div> </div>
</div> </div>
{% endif %}
</section> </section>
<section class="mt-20 lg:mt-40 mb-16 lg:mb-48"> <section class="mt-20 lg:mt-40 mb-16 lg:mb-48">
<div class="items-center h-full"> <div class="items-center h-full">
@ -171,5 +177,3 @@ layout: page
} }
</style> </style>