Skip to content

Commit 7490ee6

Browse files
authored
Merge pull request #1593 from jwcooper/updated-design
Updated Design
2 parents 7bb0edc + 68b7ce2 commit 7490ee6

34 files changed

+705
-634
lines changed

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby 3.2.2
1+
ruby 3.4.2

Gemfile.lock

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,47 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
addressable (2.8.1)
5-
public_suffix (>= 2.0.2, < 6.0)
6-
bigdecimal (3.1.8)
4+
addressable (2.8.7)
5+
public_suffix (>= 2.0.2, < 7.0)
6+
base64 (0.2.0)
7+
bigdecimal (3.1.9)
78
colorator (1.1.0)
8-
concurrent-ruby (1.2.2)
9+
concurrent-ruby (1.3.5)
10+
csv (3.3.2)
911
deep_merge (1.2.2)
1012
em-websocket (0.5.3)
1113
eventmachine (>= 0.12.9)
1214
http_parser.rb (~> 0)
1315
eventmachine (1.2.7)
14-
ffi (1.15.5)
16+
ffi (1.17.1)
17+
ffi (1.17.1-x86_64-linux-gnu)
1518
forwardable-extended (2.6.0)
16-
google-protobuf (4.27.5)
19+
google-protobuf (4.29.3)
1720
bigdecimal
1821
rake (>= 13)
19-
google-protobuf (4.27.5-x86_64-linux)
22+
google-protobuf (4.29.3-x86_64-linux)
2023
bigdecimal
2124
rake (>= 13)
2225
http_parser.rb (0.8.0)
23-
i18n (1.12.0)
26+
i18n (1.14.7)
2427
concurrent-ruby (~> 1.0)
2528
image_processing (1.12.2)
2629
mini_magick (>= 4.9.5, < 5)
2730
ruby-vips (>= 2.0.17, < 3)
28-
jekyll (4.3.3)
31+
jekyll (4.4.1)
2932
addressable (~> 2.4)
33+
base64 (~> 0.2)
3034
colorator (~> 1.0)
35+
csv (~> 3.0)
3136
em-websocket (~> 0.5)
3237
i18n (~> 1.0)
3338
jekyll-sass-converter (>= 2.0, < 4.0)
3439
jekyll-watch (~> 2.0)
40+
json (~> 2.6)
3541
kramdown (~> 2.3, >= 2.3.1)
3642
kramdown-parser-gfm (~> 1.0)
3743
liquid (~> 4.0)
38-
mercenary (>= 0.3.6, < 0.5)
44+
mercenary (~> 0.3, >= 0.3.6)
3945
pathutil (~> 0.9)
4046
rouge (>= 3.0, < 5.0)
4147
safe_yaml (~> 1.0)
@@ -47,45 +53,46 @@ GEM
4753
jekyll-paginate (1.1.0)
4854
jekyll-redirect-from (0.16.0)
4955
jekyll (>= 3.3, < 5.0)
50-
jekyll-sass-converter (3.0.0)
51-
sass-embedded (~> 1.54)
56+
jekyll-sass-converter (3.1.0)
57+
sass-embedded (~> 1.75)
5258
jekyll-seo-tag (2.8.0)
5359
jekyll (>= 3.8, < 5.0)
5460
jekyll-sitemap (1.4.0)
5561
jekyll (>= 3.7, < 5.0)
5662
jekyll-watch (2.2.1)
5763
listen (~> 3.0)
58-
kramdown (2.4.0)
59-
rexml
64+
json (2.10.1)
65+
kramdown (2.5.1)
66+
rexml (>= 3.3.9)
6067
kramdown-parser-gfm (1.1.0)
6168
kramdown (~> 2.0)
6269
liquid (4.0.4)
63-
listen (3.8.0)
70+
listen (3.9.0)
6471
rb-fsevent (~> 0.10, >= 0.10.3)
6572
rb-inotify (~> 0.9, >= 0.9.10)
6673
mercenary (0.4.0)
6774
mini_magick (4.12.0)
6875
pathutil (0.16.2)
6976
forwardable-extended (~> 2.6)
70-
public_suffix (5.0.1)
77+
public_suffix (6.0.1)
7178
rake (13.2.1)
7279
rb-fsevent (0.11.2)
73-
rb-inotify (0.10.1)
80+
rb-inotify (0.11.1)
7481
ffi (~> 1.0)
75-
rexml (3.3.9)
76-
rouge (4.1.0)
82+
rexml (3.4.1)
83+
rouge (4.5.1)
7784
ruby-vips (2.1.4)
7885
ffi (~> 1.12)
7986
safe_yaml (1.0.5)
80-
sass-embedded (1.75.0)
81-
google-protobuf (>= 3.25, < 5.0)
82-
rake (>= 13.0.0)
83-
sass-embedded (1.75.0-x86_64-linux-gnu)
84-
google-protobuf (>= 3.25, < 5.0)
87+
sass-embedded (1.85.0)
88+
google-protobuf (~> 4.29)
89+
rake (>= 13)
90+
sass-embedded (1.85.0-x86_64-linux-gnu)
91+
google-protobuf (~> 4.29)
8592
terminal-table (3.0.2)
8693
unicode-display_width (>= 1.1.1, < 3)
87-
unicode-display_width (2.4.2)
88-
webrick (1.8.2)
94+
unicode-display_width (2.6.0)
95+
webrick (1.9.1)
8996

9097
PLATFORMS
9198
ruby

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@ were tested with ruby 2.5 and ruby-bundler 1.17.3 on a Debian Stretch system.
3333
5. Visit the displayed "server address"
3434
6. After most local edits, the content will be updated. You will need to
3535
reload (ctrl-r or F5) your browser
36+
37+
Note: For faster jekyll builds, you can use the `--incremental` flag. You'll
38+
also want to install ruby with yjit enabled for even faster builds.

_config.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ email: [email protected]
33
description: >-
44
The easiest way to program microcontrollers
55
site_image: "https://circuitpython.org/assets/images/CircuitPythonLogo_Black.png"
6-
hero_image: CircuitPython_Hero.jpg
76
timezone: America/New_York
87
twitter_username: circuitpython
9-
github_username: adafruit
8+
github_username: adafruit
109
baseurl: ""
1110
url: "https://circuitpython.org"
1211
paginate: 5
@@ -39,7 +38,9 @@ collections:
3938

4039
jekyll_get_json:
4140
- data: libraries
42-
json: 'https://adafruit-circuit-python.s3.amazonaws.com/adabot/web/libraries.v2.json'
41+
json: "https://adafruit-circuit-python.s3.amazonaws.com/adabot/web/libraries.v2.json"
42+
- data: guides
43+
json: "https://learn.adafruit.com/api/categories/circuitpython.json?count=10&filter=guides_only,random,exclude_product"
4344

4445
### Exclude from processing.
4546
exclude:

_includes/download/board.html

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ <h3>CircuitPython {{ version.version }}</h3>
1818
{% if version.stable %}
1919
<p>
2020
This is the latest <strong>stable</strong> release of CircuitPython that will work with the {{ page.name }}.
21-
</p>
22-
<p>
2321
<strong>Use this release</strong> if you are new to CircuitPython.
2422
</p>
2523
{% else %}
@@ -45,14 +43,10 @@ <h3>CircuitPython {{ version.version }}</h3>
4543
Older bootloaders cannot load the firmware. See <i>Update UF2 Bootloader</i> below.</b>
4644
</p>
4745
{% endif %}
48-
<div class="release-details">
49-
<p>
50-
<a href="https://github.com/adafruit/circuitpython/releases/tag/{{ version.version }}">Release Notes for {{ version.version }}</a>
51-
</p>
52-
{% if page.download_instructions != nil and page.download_instructions != "" %}
53-
<a class="download-button install-instructions-button" target="_blank" href="{{ page.download_instructions }}">HOW TO INSTALL<i class="fas fa-arrow-circle-right" aria-hidden="true"></i></a>
54-
{% endif %}
55-
</div>
46+
<p>
47+
<a href="https://github.com/adafruit/circuitpython/releases/tag/{{ version.version }}">Release Notes for {{ version.version }}</a>
48+
</p>
49+
5650
<div class="download-details">
5751
{% comment %}
5852
Create a list of language codes and names so it can be sorted.
@@ -150,20 +144,23 @@ <h3>CircuitPython {{ version.version }}</h3>
150144
{% endif %}
151145
</div>
152146
</div>
147+
{% if page.download_instructions != nil and page.download_instructions != "" %}
148+
<a class="install-instructions" target="_blank" href="{{ page.download_instructions }}">Learn how to install CircuitPython on this board <i class="fas fa-external-link-alt" aria-hidden="true"></i></a>
149+
{% endif %}
153150
{% if version.modules %}
154-
<p>
155-
Built-in modules available:
151+
<details>
152+
<summary>Modules included in this download</summary>
156153
<span class="download-modules {% if version.stable %}stable{% else %}unstable{% endif %}">
157154
{% for module_name in version.modules %}
158155
{% if module_name contains "." %}
159156
<a target="_blank" class="library-link" href="https://docs.circuitpython.org/en/latest/shared-bindings/{{ module_name | split: '.' | first }}/#{{ module_name }}">
160157
{% else %}
161158
<a target="_blank" class="library-link" href="https://docs.circuitpython.org/en/latest/shared-bindings/{{ module_name }}">
162159
{% endif %}
163-
{{ module_name }}</a>{% unless forloop.last %}, {% endunless %}
160+
{{ module_name }}</a>
164161
{% endfor %}
165162
</span>
166-
</p>
163+
</details>
167164
{% endif %}
168165
{% if version.frozen_libraries and version.frozen_libraries.size != 0 %}
169166
<p>

_includes/header.html

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,26 @@
1818
<div class="wrapper">
1919
<div class="content">
2020
<nav class="site-brand">
21-
<div class="site-logo">
22-
<a href="{{ "/" | relative_url }}">
23-
<img src="{{ "/assets/images/logo.png" | relative_url }}"
24-
srcset="{{ "/assets/images/logo.png" | relative_url }} 1x,
25-
{{ "/assets/images/[email protected]" | relative_url }} 2x,
26-
{{ "/assets/images/[email protected]" | relative_url }} 3x"
27-
alt="CircuitPython Logo"
28-
height="60" width="136">
29-
</a>
30-
</div>
3121
<div class="site-navigation">
3222
<a {% if current[1] == 'downloads' %}class="active" aria-current="page"{% endif %} href="{{ "/downloads" | relative_url }}">Downloads</a>
3323
<a {% if current[1] == 'libraries' %}class="active" aria-current="page"{% endif %} href="{{ "/libraries" | relative_url }}">Libraries</a>
3424
<a {% if current[1] == 'blinka' %}class="active" aria-current="page"{% endif %} href="{{ "/blinka" | relative_url }}">Blinka</a>
3525
<a href="https://code.circuitpython.org">Code Editor</a>
3626
</div>
27+
<div class="site-logo">
28+
<a href="{{ "/" | relative_url }}">
29+
<img src="{{ "/assets/images/logo-dark.png" | relative_url }}"
30+
srcset="{{ "/assets/images/logo-dark.png" | relative_url }} 1x,
31+
{{ "/assets/images/[email protected]" | relative_url }} 2x,
32+
{{ "/assets/images/logo-dark3x.png" | relative_url }} 3x"
33+
alt="CircuitPython Logo"
34+
height="60" width="136">
35+
</a>
36+
</div>
3737
<div class="get-started">
3838
<a href="https://learn.adafruit.com/welcome-to-circuitpython">Get Started</a>
3939
</div>
4040
</nav>
4141
</div>
4242
</div>
43-
<div class="bottom-bar"></div>
4443
</header>

_includes/header_mobile.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,4 @@
4040
</ul>
4141
</nav>
4242
</div>
43-
<div class="bottom-bar"></div>
4443
</header>

_includes/index/learn_block.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<div class="image">
2+
{% assign guide = site.data.guides[include.index] %}
3+
<img class="image-headline" alt="{{ guide.image_alt_attribute }}"
4+
src="{{ guide.image }}"
5+
/>
6+
<span class="image-title">
7+
<span>
8+
<p><a href="{{ guide.guide_url }}">{{ guide.title }} by {{ guide.author }}</a></p>
9+
</span>
10+
<img alt="Made with CircuitPython Logo"
11+
src="{{ "assets/images/made_with_circuitpython.svg" |
12+
relative_url }}"
13+
/>
14+
</span>
15+
</div>

_layouts/download.html

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,41 @@
11
---
22
layout: default
33
---
4-
<div id="download-page">
5-
<h1>{{ page.name }}</h1>
6-
<h3>by {{ page.manufacturer }}</h3>
74

5+
<div id="download-page">
86
<div class="download-section">
9-
<div class="details">
7+
<div>
8+
<div class="image-section">
9+
{% assign large_image = "/assets/images/boards/large/" | append:
10+
page.board_image %}
11+
<img src="{{ large_image | relative_url }}" alt="Image of Board" />
12+
<h1>{{ page.name }} by {{ page.manufacturer }}</h1>
13+
</div>
1014
<div class="section">
11-
{% assign large_image = "/assets/images/boards/large/" | append: page.board_image %}
12-
<img src="{{ large_image | relative_url }}" alt="Image of Board">
15+
<p>{{ content }}</p>
16+
<h2>Contribute</h2>
1317
<p>
14-
{{ content }}
18+
Have some info to add for this board? Edit the source for this page
19+
<a
20+
href="https://github.com/adafruit/circuitpython-org/edit/main/{{ page.path }}"
21+
>here</a
22+
>.
1523
</p>
16-
<h2>Contribute</h2>
17-
<p>Have some info to add for this board? Edit the source for this page <a href="https://github.com/adafruit/circuitpython-org/edit/main/{{ page.path }}">here</a>.</p>
1824
</div>
1925
</div>
2026
<div class="download">
21-
{% if page.blinka == true %}
22-
{% include download/blinka.html %}
23-
{% else %}
24-
{% include download/board.html %}
25-
{% endif %}
27+
{% if page.blinka == true %} {% include download/blinka.html %} {% else %}
28+
{% include download/board.html %} {% endif %}
2629
</div>
2730
</div>
2831
</div>
2932

30-
{% if page.family == 'esp32' or page.family == 'esp32s2' or page.family == 'esp32c3' or page.family == 'esp32s3' or page.family == 'esp32c6' %}
31-
<script src="https://cdn.jsdelivr.net/gh/adafruit/[email protected]/dist/cpinstaller.min.js" type="module"></script>
33+
{% if page.family == 'esp32' or page.family == 'esp32s2' or page.family ==
34+
'esp32c3' or page.family == 'esp32s3' or page.family == 'esp32c6' %}
35+
<script
36+
src="https://cdn.jsdelivr.net/gh/adafruit/[email protected]/dist/cpinstaller.min.js"
37+
type="module"
38+
></script>
3239
<!--<script src="/assets/javascript/installer/cpinstaller.js" type="module"></script>-->
3340
{% endif %}
3441
<script src="/assets/javascript/download.js"></script>

0 commit comments

Comments
 (0)