Skip to content

Commit 787b8dd

Browse files
committed
new common layout for pages, add common layout to connect page to update styling
1 parent 25ff6fc commit 787b8dd

File tree

7 files changed

+273
-274
lines changed

7 files changed

+273
-274
lines changed

_layouts/common.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
layout: default
3+
---
4+
5+
<div id="libraries-page" class="common-layout">
6+
<div class="content">
7+
{{ content }}
8+
</div>
9+
</div>

_layouts/contributing.html

Lines changed: 49 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,57 @@
11
---
2-
layout: default
2+
layout: common
33
---
44

55
<!-- https://github.com/adafruit/circuitpython/issues/1246 -->
6-
<div id="libraries-page" class="common-layout">
7-
<div class="content">
8-
<h1>Contributing</h1>
9-
<p>
10-
If you'd like to contribute to the CircuitPython project, the CircuitPython
11-
libraries are a great way to begin. This page is updated with daily status
12-
information from the CircuitPython libraries, including open pull requests,
13-
open issues and library infrastructure issues.
14-
</p>
15-
<p>
16-
Do you write a language other than English? Another great way to contribute
17-
to the project is to contribute new localizations (translations) of
18-
CircuitPython, or update current localizations, using
19-
<a href="https://hosted.weblate.org/engage/circuitpython/">Weblate</a>.
20-
</p>
21-
<p>
22-
If this is your first time contributing, or you'd
23-
like to see our recommended contribution workflow, we have a guide on
24-
<a href="https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github">Contributing to CircuitPython with Git and Github</a>.
25-
You can also find us in the #circuitpython channel on the
26-
<a href="https://adafru.it/discord">Adafruit Discord</a>.
27-
</p>
28-
<p>
29-
Have an idea for a new driver or library?
30-
<a href="https://github.com/adafruit/circuitpython/issues">File an issue on the CircuitPython repo!</a>
31-
</p>
32-
<h2>Current Status for {{ site.data.libraries.updated_at | date: "%a, %b %d, %Y" }}</h2>
6+
<div id="libraries-page">
7+
<h1>Contributing</h1>
8+
<p>
9+
If you'd like to contribute to the CircuitPython project, the CircuitPython
10+
libraries are a great way to begin. This page is updated with daily status
11+
information from the CircuitPython libraries, including open pull requests,
12+
open issues and library infrastructure issues.
13+
</p>
14+
<p>
15+
Do you write a language other than English? Another great way to contribute
16+
to the project is to contribute new localizations (translations) of
17+
CircuitPython, or update current localizations, using
18+
<a href="https://hosted.weblate.org/engage/circuitpython/">Weblate</a>.
19+
</p>
20+
<p>
21+
If this is your first time contributing, or you'd
22+
like to see our recommended contribution workflow, we have a guide on
23+
<a href="https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github">Contributing to CircuitPython with Git and Github</a>.
24+
You can also find us in the #circuitpython channel on the
25+
<a href="https://adafru.it/discord">Adafruit Discord</a>.
26+
</p>
27+
<p>
28+
Have an idea for a new driver or library?
29+
<a href="https://github.com/adafruit/circuitpython/issues">File an issue on the CircuitPython repo!</a>
30+
</p>
31+
<h2>Current Status for {{ site.data.libraries.updated_at | date: "%a, %b %d, %Y" }}</h2>
3332

34-
{% assign current = page.url | downcase | split: '/' %}
35-
<ul class='tabbed-navigation'>
36-
<li>
37-
<a href="/contributing" {% if current[2] ==
38-
nil %}class='active'{% endif %}>Pull Requests</a>
39-
</li>
40-
<li>
41-
<a href="/contributing/open-issues" {% if current[2] ==
42-
'open-issues' %}class='active'{% endif %}>Open Issues</a>
43-
</li>
44-
<li>
45-
<a href="/contributing/library-infrastructure-issues" {% if
46-
current[2] ==
47-
'library-infrastructure-issues' %}class='active'{% endif %}>Library Infrastructure Issues</a>
48-
</li>
49-
<li>
50-
<a href="/contributing/weblate" {% if current[2] ==
51-
'weblate' %}class='active'{% endif %}>CircuitPython Localization</a>
52-
</li>
53-
</ul>
54-
<div class="clear"></div>
55-
{{ content }}
56-
</div>
33+
{% assign current = page.url | downcase | split: '/' %}
34+
<ul class='tabbed-navigation'>
35+
<li>
36+
<a href="/contributing" {% if current[2] ==
37+
nil %}class='active'{% endif %}>Pull Requests</a>
38+
</li>
39+
<li>
40+
<a href="/contributing/open-issues" {% if current[2] ==
41+
'open-issues' %}class='active'{% endif %}>Open Issues</a>
42+
</li>
43+
<li>
44+
<a href="/contributing/library-infrastructure-issues" {% if
45+
current[2] ==
46+
'library-infrastructure-issues' %}class='active'{% endif %}>Library Infrastructure Issues</a>
47+
</li>
48+
<li>
49+
<a href="/contributing/weblate" {% if current[2] ==
50+
'weblate' %}class='active'{% endif %}>CircuitPython Localization</a>
51+
</li>
52+
</ul>
53+
<div class="clear"></div>
54+
{{ content }}
5755
</div>
5856

5957
<script src="/assets/javascript/contributing.js"></script>

assets/sass/pages/_libraries.scss

Lines changed: 40 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,51 @@
11
#libraries-page {
2-
.content {
3-
h1 {
4-
text-align: center;
5-
}
6-
7-
p {
8-
margin-bottom: 16px;
9-
}
2+
h1 {
3+
text-align: center;
4+
}
105

11-
h2 {
12-
border-bottom: 1px solid $gray-border;
13-
padding-bottom: .3em;
14-
margin-bottom: 16px;
15-
margin-top: 24px;
16-
}
6+
p {
7+
margin-bottom: 16px;
8+
}
179

18-
ul {
19-
margin-bottom: 16px;
20-
li {
21-
margin-top: .25em;
22-
}
23-
}
10+
h2 {
11+
border-bottom: 1px solid $gray-border;
12+
padding-bottom: .3em;
13+
margin-bottom: 16px;
14+
margin-top: 24px;
2415
}
2516

26-
.release-section {
27-
margin-left: 20px;
17+
ul {
18+
margin-bottom: 16px;
19+
li {
20+
margin-top: .25em;
21+
}
2822
}
23+
}
2924

30-
.tabbed-navigation {
31-
list-style: none;
32-
padding: 0;
33-
margin: 0;
34-
width: 100%;
35-
background: white;
25+
.release-section {
26+
margin-left: 20px;
27+
}
3628

37-
li {
38-
float: left;
39-
margin: 0 1em 0 0;
40-
41-
a {
42-
display: block;
43-
text-decoration: none;
44-
padding: 0.5em 0.5em;
45-
font-weight: bold;
46-
border-bottom: 0.5em solid $gray-border;
47-
48-
&.active {
49-
border-color: #000;
50-
}
29+
.tabbed-navigation {
30+
list-style: none;
31+
padding: 0;
32+
margin: 0;
33+
width: 100%;
34+
background: white;
35+
36+
li {
37+
float: left;
38+
margin: 0 1em 0 0;
39+
40+
a {
41+
display: block;
42+
text-decoration: none;
43+
padding: 0.5em 0.5em;
44+
font-weight: bold;
45+
border-bottom: 0.5em solid $gray-border;
46+
47+
&.active {
48+
border-color: #000;
5149
}
5250
}
5351
}

awesome.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
---
2-
layout: home
2+
layout: common
33
title: Awesome
44
permalink: /awesome
55
---
66

7-
<div id="awesome-page" class="common-layout">
8-
<div class="content">
9-
{% capture awesome_include %}{% include_relative awesome-circuitpython/README.md %}{% endcapture %}
10-
{{ awesome_include | markdownify }}
11-
<div>
7+
<div id="awesome-page">
8+
{% capture awesome_include %}{% include_relative awesome-circuitpython/README.md %}{% endcapture %}
9+
{{ awesome_include | markdownify }}
1210
</div>

connect/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: default
2+
layout: common
33
---
44

55
# Overview

libraries/contributing/index.html

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
---
2-
layout: default
2+
layout: common
33
title: Libraries
44
permalink: /libraries/contributing
55
redirect_to: /contributing
66
---
7-
<div id="libraries-page" class="common-layout">
8-
<div class="content">
9-
<p>This page has moved to <a href="/contributing">the dedicated contributing
10-
page</a>.
11-
</p>
12-
</div>
7+
<div id="libraries-page">
8+
<p>This page has moved to <a href="/contributing">the dedicated contributing
9+
page</a>.
10+
</p>
1311
</div>

0 commit comments

Comments
 (0)