generate select list for labels

This commit is contained in:
Justin Cooper 2019-10-14 11:18:36 -05:00
parent ce8f723280
commit 924d8b76b6
2 changed files with 26 additions and 6 deletions

View file

@ -34,7 +34,7 @@ collections:
jekyll_get_json:
- data: libraries
json: 'https://adafruit-circuit-python.s3.amazonaws.com/adabot/web/libraries.json'
json: 'https://adafruit-circuit-python.s3.amazonaws.com/adabot/web/libraries.v2.json'
### Exclude from processing.
exclude:

View file

@ -48,16 +48,34 @@ permalink: /libraries/contributing
</ul>
</div>
<div class="libraries open-issues">
<h3>Open Issues</h3>
<ul>
{% comment %}
create labels array by looping through labels of each issue
ensuring unique for select list
{% endcomment %}
{% assign labels = "" | split: "," %}
{% for library in site.data.libraries.open_issues %}
{% for issue in library[1] %}
{% for label in issue.labels %}
{% if label == "None" %}
{% continue %}
{% endif %}
{% assign labels = labels | push: label | uniq %}
{% endfor %}
{% endfor %}
{% endfor %}
<select>
{% for label in labels %}
<option value='{{ label }}'>{{ label }}</option>
{% endfor %}
<select>
<h3>Open Issues</h3>
<ul>
{% for library in site.data.libraries.open_issues %}
<li>
{{library[0]}}
<ul>
{% for issue in library[1] %}
{% for details in issue %}
<li><a href="{{ details[0] }}">{{ details[1] }}</a></li>
{% endfor %}
<li><a href="{{ issue.url }}">{{ issue.title }}</a></li>
{% endfor %}
</ul>
</li>
@ -98,3 +116,5 @@ permalink: /libraries/contributing
</div>
</div>
</div>
<script src="/assets/javascript/contributing.js"></script>