initial libraries commit

This commit is contained in:
Justin Cooper 2019-04-15 16:44:00 -05:00
parent ebb702c315
commit 86ff20e8dc
4 changed files with 104 additions and 1 deletions

View file

@ -16,7 +16,7 @@
<div class="site-navigation">
<a href="{{ "/downloads" | relative_url }}">DOWNLOADS</a>
<a href="https://circuitpython.readthedocs.io/projects/bundle/en/latest/drivers.html">LIBRARIES</a>
<a href="{{ "/libraries" | relative_url }}">LIBRARIES</a>
<a href="https://blog.adafruit.com/category/circuitpython">NEWS</a>
<a href="https://adafru.it/discord">DISCORD</a>
<a href="{{ "/awesome" | relative_url }}">AWESOME</a>

View file

@ -0,0 +1,24 @@
document.addEventListener('DOMContentLoaded', function() {
async function getLatestReleases() {
let response = await fetch('https://api.github.com/repos/adafruit/Adafruit_CircuitPython_Bundle/releases/latest');
let data = await response.json();
return data;
}
function buildReleaseLinks(data) {
let releaseList = document.querySelector('.release-list');
data.assets.forEach(function(asset) {
let liElement = document.createElement('li');
let linkElement = document.createElement('a');
linkElement.title = asset.name;
linkElement.href = asset.browser_download_url;
let linkText = document.createTextNode(asset.name);
linkElement.appendChild(linkText);
liElement.appendChild(linkElement);
releaseList.appendChild(liElement);
});
}
getLatestReleases().then(buildReleaseLinks);
});

View file

@ -0,0 +1,26 @@
---
layout: default
title: Libraries - Contributing
permalink: /libraries/contributing
---
<div id="libraries-page" class="common-layout">
<div class="content">
<h1>Contributing</h1>
<p>Quick bit about contributing (TODO TEXT FROM KATTNI)</p>
<div class="libraries open-issues">
<h3>Open Issues</h3>
<ul>
{% for library in site.data.libraries.open_issues %}
<li>
{{library[0]}}
{% for issue in library[1] %}
<li><a href="{{issue}}">{{issue}}</a></li>
{% endfor %}
</li>
{% endfor %}
</ul>
</div>
</div>
</div>

53
libraries/index.html Normal file
View file

@ -0,0 +1,53 @@
---
layout: default
title: Libraries
permalink: /libraries
---
<div id="libraries-page" class="common-layout">
<div class="content">
<h1>CircuitPython Libraries</h1>
<p>
These are libraries and drivers available in separate GitHub repos.
They are designed for use with CircuitPython and may or may not work with MicroPython.
</p>
<h2>Download Instructions</h2>
<p>
<ul class="release-list">
</ul>
<p>
<p>
The libraries in each release are compiled for all recent major versions
of CircuitPython. Please download the one that matches the major version
of your CircuitPython. For example, if you are running 3.0.0 you should
download the 3.x bundle.
</p>
<p>
To install, simply download the matching zip file, unzip it, and copy
the lib folder onto your CIRCUITPY drive. Non-express boards such as the
Trinket M0, Gemma M0 and Feather M0 Basic will need to selectively copy
files over.
</p>
<h2>Contributing</h2>
<p>Quick bit about contributing (TODO TEXT FROM KATTNI)</p>
<div class="libraries new">
<h3>New Libraries</h3>
<ul>
{% for library in site.data.libraries.library_updates.new %}
<li><a href="{{library[1]}}">{{library[0]}}</a></li>
{% endfor %}
</ul>
</div>
<div class="libraries updated">
<h3>Updated Libraries</h3>
<ul>
{% for library in site.data.libraries.library_updates.updated %}
<li><a href="{{library[1]}}">{{library[0]}}</a></li>
{% endfor %}
</ul>
</div>
</div>
</div>
<script src="/assets/javascript/libraries.js"></script>