Skip to content

Commit 861442b

Browse files
authored
Merge pull request #1525 from FoamyGuy/modules_comma_fix
Fix modules extra comma and spacing
2 parents c764990 + 5565a34 commit 861442b

File tree

2 files changed

+9
-19
lines changed

2 files changed

+9
-19
lines changed

_includes/download/board.html

+7-7
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,7 @@ <h3>CircuitPython {{ version.version }}</h3>
160160
{% else %}
161161
<a target="_blank" class="library-link" href="https://docs.circuitpython.org/en/latest/shared-bindings/{{ module_name }}">
162162
{% endif %}
163-
{{ module_name }}
164-
</a>{% if module_name != version.modules[version.modules.size - 1] %}, {% endif %}
163+
{{ module_name }}</a>{% unless forloop.last %}, {% endunless %}
165164
{% endfor %}
166165
</span>
167166
</p>
@@ -172,17 +171,18 @@ <h3>CircuitPython {{ version.version }}</h3>
172171
<span class="download-modules {% if version.stable %}stable{% else %}unstable{% endif %}">
173172
{% for module_name in version.frozen_libraries %}
174173
<a target="_blank" class="library-link" href="https://docs.circuitpython.org/projects/{{ module_name | split: 'adafruit_' | last }}">
175-
{{ module_name }}
176-
</a>{% if module_name != version.frozen_libraries[version.frozen_libraries.size - 1] %}, {% endif %}
174+
{{ module_name }}</a>{% unless forloop.last %}, {% endunless %}
177175
{% endfor %}
178176
</span>
179177
</p>
180178
{% endif %}
181179
{% if page.features %}
182180
<p>Features:
183-
{% for feature in page.features %}
184-
<span class="feature-span">{{feature}}</span>
185-
{% endfor %}
181+
<span class="features-list">
182+
{% for feature in page.features %}
183+
<a class="library-link" href="/downloads?features={{ feature }}">{{feature}}</a>{% unless forloop.last %}, {% endunless %}
184+
{% endfor %}
185+
</span>
186186
</p>
187187
{% endif %}
188188
</div>

assets/sass/pages/_download.scss

+2-12
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
background-color: $purple;
117117
}
118118

119-
.download-modules {
119+
.download-modules, .features-list {
120120
color: $purple;
121121
}
122122
}
@@ -135,7 +135,7 @@
135135
a.download-button:hover, a.download-button-unrecommended:hover {
136136
background-color: $purple;
137137
}
138-
.download-modules {
138+
.download-modules, .features-list {
139139
color: $purple;
140140
}
141141
}
@@ -184,16 +184,6 @@
184184
}
185185
}
186186
}
187-
.feature-span {
188-
padding: 2px 4px 2px 4px;
189-
margin-left: 3px;
190-
margin-bottom: 3px;
191-
display: inline-block;
192-
background-color: $purple;
193-
color: #fff;
194-
border-radius: 5px;
195-
font-size: 14px;
196-
}
197187
}
198188

199189
@media (max-width: $screen-lg) {

0 commit comments

Comments
 (0)