initial commit

This commit is contained in:
Justin Cooper 2018-11-07 12:04:04 -06:00
commit 5b5cb6ffd6
25 changed files with 868 additions and 0 deletions

6
.gitignore vendored Normal file
View file

@ -0,0 +1,6 @@
_site
.sass-cache
.jekyll-metadata
.DS_Store
_drafts/
downloads.json

24
404.html Normal file
View file

@ -0,0 +1,24 @@
---
layout: default
---
<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>
<div class="container">
<h1>404</h1>
<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>

24
Gemfile Normal file
View file

@ -0,0 +1,24 @@
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 3.8.4"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
gem 'jekyll-sitemap'
gem 'jekyll-feed'
gem 'jekyll-seo-tag'
gem 'jekyll-paginate'
end

74
Gemfile.lock Normal file
View file

@ -0,0 +1,74 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
colorator (1.1.0)
concurrent-ruby (1.0.5)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
ffi (1.9.25)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jekyll (3.8.4)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0)
kramdown (~> 1.14)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-feed (0.11.0)
jekyll (~> 3.3)
jekyll-paginate (1.1.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-seo-tag (2.5.0)
jekyll (~> 3.3)
jekyll-sitemap (1.2.0)
jekyll (~> 3.3)
jekyll-watch (2.1.2)
listen (~> 3.0)
kramdown (1.17.0)
liquid (4.0.1)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
mercenary (0.3.6)
pathutil (0.16.1)
forwardable-extended (~> 2.6)
public_suffix (3.0.3)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rouge (3.3.0)
ruby_dep (1.5.0)
safe_yaml (1.0.4)
sass (3.6.0)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
PLATFORMS
ruby
DEPENDENCIES
jekyll (~> 3.8.4)
jekyll-feed
jekyll-paginate
jekyll-seo-tag
jekyll-sitemap
BUNDLED WITH
1.17.1

47
_config.yml Normal file
View file

@ -0,0 +1,47 @@
title: Circuit Python
email: justin@adafruit.com
description: >-
Circuit Python Organization
baseurl: ""
url: https://circuitpython.org
timezone: America/New_York
twitter_username: adafruit
github_username: adafruit
paginate: 5
excerpt_separator: <!--more-->
permalink: pretty
plugins:
- jekyll-feed
- jekyll-sitemap
- jekyll-seo-tag
- jekyll-paginate
# Build settings
markdown: kramdown
kramdown:
input: GFM
hard_wrap: false
# Sass settings
sass:
add_charset: true
sass_dir: assets/sass
style: :compressed
### Exclude from processing.
exclude:
- Gemfile
- Gemfile.lock
- node_modules
- vendor
- _src
- _images
- LICENSE
- package.json
- README.md
- webpack.config.js
- yarn-error.log
- yarn.lock
- config
- optimization-fix
- optimization-fix-this-file-is-ignored.js
- icon.png

13
_includes/head.html Normal file
View file

@ -0,0 +1,13 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="msapplication-TileColor" content="#1a1919">
<meta name="msapplication-TileImage" content="https://cdn-shop.adafruit.com/static/mstile-144x144.png">
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
<link rel="stylesheet" href="{{ "/assets/css/main.css" | prepend: site.baseurl }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
</head>

17
_includes/header.html Normal file
View file

@ -0,0 +1,17 @@
<header id="site-header">
<div class="wrapper">
<div class="content">
<div class="site-brand">
<div class="site-logo"><a href="https://circuitpython.org"><img src="/assets/images/blinka.png" height="100" width="112"></a></div>
<div class="site-banner"><a href="https://circuitpython.org">CircuitPython</a></div>
</div>
<div class="site-navigation">
<a href="/downloads">DOWNLOADS</a>
<a href="/news">NEWS</a>
<a href="/help">HELP</a>
</div>
</div>
</div>
<div class="bottom-bar"></div>
</header>

18
_layouts/default.html Normal file
View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
{% include head.html %}
<body>
{% include header.html %}
<div class="wrapper">
{{ content }}
</div>
<!-- Google Analytics -->
<!-- TODO -->
<!-- End Google Analytics -->
</body>
</html>

6
_layouts/home.html Normal file
View file

@ -0,0 +1,6 @@
---
layout: default
---
<div>
{{ content }}
</div>

31
_layouts/news.html Normal file
View file

@ -0,0 +1,31 @@
---
layout: default
---
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
<p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name"><a href="https://github.com/{{page.author}}">@{{page.author}}</a></span></span>{% endif %}</p>
</header>
<div class="post-content" itemprop="articleBody">
{{ content }}
</div>
</article>
<script type='text/javascript'>
window.onload = function () {
try {
var headers = document.querySelectorAll('h2');
headers.forEach(function (hdr) {
var id = hdr.id,
title = hdr.innerText,
link = "<a href='#" + id + "' class='header-link'>link</a>";
hdr.innerHTML = title + " " + link;
});
} catch (ex) {
// ignore
}
}
</script>

View file

@ -0,0 +1,6 @@
---
layout: news
title: "Welcome to CircuitPython.org!"
date: 2018-10-25 16:35:13 -0500
categories: news
---

14
assets/css/main.scss Normal file
View file

@ -0,0 +1,14 @@
---
---
@charset "utf-8";
@import 'vendors/normalize';
@import 'base/typography';
@import 'base/base';
@import 'layout/grid';
@import 'layout/header';
@import 'pages/home';
@import 'pages/downloads';

BIN
assets/images/blinka.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View file

@ -0,0 +1,17 @@
var searchElement = document.getElementById("search");
searchElement.addEventListener('keyup', function(event) {
var regex = new RegExp(searchElement.value, "gi");
var i, downloads = document.getElementsByClassName("download");
for (i = 0; i < downloads.length; i++) {
download = downloads[i];
var id = download.dataset.id;
if (id.match(regex)) {
download.style.display = 'block';
} else {
download.style.display = 'none';
}
}
});

View file

@ -0,0 +1,7 @@
body {
font-family: "Proxima Nova","Montserrat","Lucida Grande","Lucida Sans Unicode","Lucida Sans",Geneva,Verdana,sans-serif;
}
a {
text-decoration: none;
}

View file

@ -0,0 +1,22 @@
@font-face {
font-family: 'Proxima Nova';
src: url('https://cdn-shop.adafruit.com/fonts/proximanova/proximanova-light-webfont.woff2') format('woff2'),
url('https://cdn-shop.adafruit.com/fonts/proximanova/proximanova-light-webfont.woff') format('woff');
font-weight: 300;
font-style: normal;
letter-spacing: 0.3em;
}
@font-face {
font-family: 'Proxima Nova';
src: url('https://cdn-shop.adafruit.com/fonts/proximanova/proximanova-regular-webfont.woff2') format('woff2'),
url('https://cdn-shop.adafruit.com/fonts/proximanova/proximanova-regular-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Proxima Nova';
src: url('https://cdn-shop.adafruit.com/fonts/proximanova/proximanova-semibold-webfont.woff2') format('woff2'),
url('https://cdn-shop.adafruit.com/fonts/proximanova/proximanova-semibold-webfont.woff') format('woff');
font-weight: 500;
font-style: normal;
}

View file

View file

@ -0,0 +1,63 @@
#site-header {
display: grid;
grid-template-rows: 1fr 3px;
grid-column: full;
&> * {
display: grid;
grid-template-columns:
[full-start] minmax(1em, 1fr)
[main-start] minmax(0, 80em) [main-end]
minmax(1em, 1fr) [full-end];
&> * {
grid-column: main;
}
}
.wrapper {
background-color: #333333;
height: 100px;
}
.content {
display: grid;
grid-template-columns: 2fr 1fr;
padding-bottom: 20px;
}
}
.site-brand {
display: flex;
flex-direction: row;
align-items: flex-end;
}
.site-logo {
position: absolute;
top: 20px;
}
.site-banner {
font-size: 20px;
padding-left: 120px;
a {
color: #fff;
}
}
.site-navigation {
display:flex;
align-items: flex-end;
a {
color: #fff;
margin-left: auto;
}
}
.bottom-bar {
background-color: #e90e8b;
}

View file

@ -0,0 +1,84 @@
#download-page {
padding: 50px 0 0 0;
display: grid;
grid-template-columns:
[full-start] minmax(1em, 1fr)
[main-start] minmax(0, 80em) [main-end]
minmax(1em, 1fr) [full-end];
grid-row-gap: 1em;
&> * {
grid-column: main;
}
h1 {
}
.download-search {
.search-wrapper {
position: relative;
&:before {
font-family: 'Font Awesome\ 5 Free';
font-size: 24px;
font-weight: 900;
color: #652f8f;
content: "\f002";
position: absolute;
right: 15px;
top: 50%;
transform: translateY(-50%);
}
}
input {
width: 40%;
height: 50px;
padding: 15px;
border-radius: 5px;
border: 3px solid #652f8f;
box-sizing: border-box;
}
.sort {
float: right;
}
}
.download-section {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-column-gap: 1em;
grid-row-gap: 1em;
.download {
img {
width: 100%;
}
a {
display: block;
padding: 5px 5px 15px 5px;
color: #000;
border: 1px solid #cecece;
margin: 1px;
border-radius: 5px;
&:hover {
border-radius: 5px;
margin: 0px;
border: 2px solid #e90e8b;
}
}
h3 {
font-size: 24px;
font-weight: 500;
margin: 5px 0 5px 0;
}
}
}
}

View file

341
assets/sass/vendors/_normalize.scss vendored Normal file
View file

@ -0,0 +1,341 @@
/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
html {
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body {
margin: 0;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10.
*/
img {
border-style: none;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* Correct the inability to style clickable types in iOS and Safari.
*/
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Remove the default vertical scrollbar in IE 10+.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Misc
========================================================================== */
/**
* Add the correct display in IE 10+.
*/
template {
display: none;
}
/**
* Add the correct display in IE 10.
*/
[hidden] {
display: none;
}

31
downloads.html Normal file
View file

@ -0,0 +1,31 @@
---
layout: default
title: Downloads
permalink: /downloads
---
<div id="download-page">
<h1>Downloads</h1>
<div class="download-search">
<label class="search-wrapper">
<input type="text" id="search" placeholder="Search for CircuitPython boards" />
</label>
<span class="filter">...</span>
<span class="sort">SORT BY</span>
</div>
<div class="download-section">
{% for boards in site.data.downloads.data %}
<div class="download" data-id="{{ boards.id }}">
<a href="/download/{{ boards.id | url_encode }}">
<img src="{{ boards.attributes.board_image }}">
<div class="details">
<h3>{{ boards.id }}</h3>
By {{ boards.attributes.manufacturer}}
</div>
</a>
</div>
{% endfor %}
</div>
</div>
<script src="/assets/javascript/downloads.js"></script>

7
help.md Normal file
View file

@ -0,0 +1,7 @@
---
layout: home
title: Help
permalink: /help/
---
Help Circuit Python Org

8
index.md Normal file
View file

@ -0,0 +1,8 @@
---
# Feel free to add content and custom Front Matter to this file.
# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults
layout: home
---
Landing Page Content

8
news.md Normal file
View file

@ -0,0 +1,8 @@
---
# Feel free to add content and custom Front Matter to this file.
# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults
layout: news
---
News Content