Skip to content

Commit 2223d82

Browse files
committed
Resolve conflicts
2 parents 6ea66d1 + d7d68a0 commit 2223d82

File tree

3 files changed

+140
-64
lines changed

3 files changed

+140
-64
lines changed

themes/vocabulary_theme/templates/layout.html

+126-62
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,19 @@
4040

4141
<body>
4242
<div class="ga-script">{{ generate_google_analytics() }}</div>
43+
44+
<!-- Header -->
4345
<header class="container">
4446
<nav class="navbar">
4547
<div class="navbar-brand">
4648
<a class="has-text-black" href="{{ '/'|url }}">
4749
<svg
48-
class="logo margin-top-big"
49-
xmlns="http://www.w3.org/2000/svg"
50-
preserveAspectRatio="xMidYMid meet"
51-
viewBox="0 0 304 73">
52-
<use href="#opensource"></use>
53-
</svg>
50+
class="logo margin-top-big"
51+
xmlns="http://www.w3.org/2000/svg"
52+
preserveAspectRatio="xMidYMid meet"
53+
viewBox="0 0 304 73">
54+
<use href="#opensource"></use>
55+
</svg>
5456
</a>
5557
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
5658
<span aria-hidden="true"></span>
@@ -64,7 +66,8 @@
6466
Blog
6567
</a>
6668
<div class="navbar-item has-dropdown is-hoverable">
67-
<a class="navbar-link is-arrowless {% if this.is_child_of('/contributing-code') %} is-active{% endif%}">Contribute<i class="icon caret-down"></i></a>
69+
<a class="navbar-link is-arrowless {% if this.is_child_of('/contributing-code') %} is-active{% endif%}">
70+
Contribute<i class="icon caret-down"></i></a>
6871
<div class="navbar-dropdown">
6972
{% for href, title in [
7073
['/contributing-code', 'Contribution Guidelines'],
@@ -78,7 +81,8 @@
7881
</div>
7982
</div>
8083
<div class="navbar-item has-dropdown is-hoverable">
81-
<a class="navbar-link is-arrowless {% if this.is_child_of('/community') %} is-active{% endif%}">Community<i class="icon caret-down"></i></a>
84+
<a class="navbar-link is-arrowless {% if this.is_child_of('/community') %} is-active{% endif%}">
85+
Community<i class="icon caret-down"></i></a>
8286
<div class="navbar-dropdown is-active">
8387
{% for href, title in [
8488
['/community', 'Join the Community'],
@@ -95,7 +99,8 @@
9599
</div>
96100
</div>
97101
<div class="navbar-item has-dropdown is-hoverable">
98-
<a class="navbar-link is-arrowless {% if this.is_child_of('/internships') %} is-active{% endif%}">Internships<i class="icon caret-down"></i></a>
102+
<a class="navbar-link is-arrowless {% if this.is_child_of('/internships') %} is-active{% endif%}">
103+
Internships<i class="icon caret-down"></i></a>
99104
<div class="navbar-dropdown">
100105
{% for href, title in [
101106
['/internships', 'Overview'],
@@ -109,17 +114,19 @@
109114
{% endfor %}
110115
</div>
111116
</div>
112-
<a class="navbar-item {% if this.is_child_of('/cc-search') %} is-active{% endif%}" href="{{ '/cc-search'|url }}">
117+
<a class="navbar-item {% if this.is_child_of('/cc-search') %} is-active{% endif%}"
118+
href="{{ '/cc-search'|url }}">
113119
CC Search
114120
</a>
115121
<div class="navbar-item has-dropdown is-hoverable">
116-
<a class="navbar-link is-arrowless {% if this.is_child_of('/archives') %} is-active{% endif%}">Archives<i class="icon caret-down"></i></a>
122+
<a class="navbar-link is-arrowless {% if this.is_child_of('/archives') %} is-active{% endif%}">Archives<i
123+
class="icon caret-down"></i></a>
117124
<div class="navbar-dropdown">
118125
{% for href, title in [
119126
['/archives/old-tech-blog', 'CC Tech Blog (2007-2014)'],
120127
['https://lists.ibiblio.org/pipermail/cc-devel/', 'cc-devel mailing list (2005-2015)'],
121128
] %}
122-
<a class="navbar-item" href="{{ href }}">{{ title }}</a>
129+
<a class="navbar-item" href="{{ href }}">{{ title }}</a>
123130
{% endfor %}
124131
</div>
125132
</div>
@@ -128,23 +135,68 @@
128135
</nav>
129136
</header>
130137

138+
<!-- Breadcrumb -->
139+
{% if this._path != '/'%}
140+
<div class="breadcrumb-container">
141+
<nav class="container breadcrumb caption bold" aria-label="breadcrumbs">
142+
<ul>
143+
{% set crumbs = [] %}
144+
{% set current = {'crumb': this} %}
145+
<!-- Extracting the slugs of URL -->
146+
{% for i in this._path.split("/") %}
147+
{% if current.crumb is not none %}
148+
{% if crumbs.insert(0, current.crumb._slug) %}{% endif %}
149+
{% if current.update({"crumb": current.crumb.parent}) %}{% endif %}
150+
{% endif %}
151+
{% endfor %}
152+
{% for crumb in crumbs %}
153+
<!-- Active link -->
154+
{% if this._slug == crumb %}
155+
<li class="is-active"><a aria-current="page displayed">{{ crumb | title | replace('-', ' ') }}</a></li>
156+
{% else %}
157+
<!-- Forming the URL using extracted slugs -->
158+
{% set i = loop.index %}
159+
{% set ns = namespace (link = '') %}
160+
{% for j in range(i) %}
161+
{% set ns.link = ns.link + crumbs[j] + '/' %}
162+
{% endfor %}
163+
<li><a class="link" href="{{ ns.link|url }}">
164+
{% if crumb != '' %}
165+
{{ crumb | title | replace('-', ' ') }}
166+
{% else %}
167+
Home
168+
{% endif %}
169+
</a></li>
170+
{% endif %}
171+
{% endfor %}
172+
</ul>
173+
</nav>
174+
</div>
175+
{% endif %}
176+
177+
<!-- Body -->
131178
{% block body %}{% endblock %}
132179

180+
<!-- Footer -->
133181
<footer class="main-footer">
134182
<div class="container">
135183
<div class="columns">
136-
<div class="column">
184+
<div class="column is-one-quarter">
137185
<a href="https://creativecommons.org" class="main-logo margin-bottom-bigger">
138-
<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" viewBox="0 0 304 73"
139-
class=has-text-white>
140-
<use href="#logomark"></use>
141-
</svg>
186+
<span class="has-text-white">
187+
<svg
188+
xmlns="http://www.w3.org/2000/svg"
189+
preserveAspectRatio="xMidYMid meet"
190+
viewBox="0 0 304 73">
191+
<use href="#logomark"></use>
192+
</svg>
193+
</span>
142194
</a>
143-
<p>
195+
<div>
144196
<address class="margin-bottom-normal">Creative Commons<br />PO Box 1866, Mountain View CA 94042</address>
145197
<a href="mailto:info@creativecommons.org" class="mail">info@creativecommons.org</a><br />
146198
<a href="tel://+1-415-429-6753" class="phone">+1-415-429-6753</a>
147-
</p>
199+
</div>
148200
<div class="margin-vertical-large">
149201
<a href="https://www.instagram.com/creativecommons" class="social has-text-white" target="_blank"
150202
rel="noopener">
@@ -164,53 +216,65 @@
164216
</a>
165217
</div>
166218
</div>
167-
<div class="column is-half">
168-
<nav class="footer-navigation">
169-
<ul class="menu">
170-
<li>
171-
<a href="{{ '/blog'|url }}" class="menu-item">Blog</a>
172-
</li>
173-
<li>
174-
<a href="{{ '/contributing-code'|url }}" class="menu-item">Contributing Guidelines</a>
175-
</li>
176-
<li>
177-
<a href="{{ '/community/community-team'|url }}" class="menu-item">Community Teams</a>
178-
</li>
179-
<li>
180-
<a href="{{ '/contributing-code/projects'|url }}" class="menu-item">Project List</a>
181-
</li>
182-
</ul>
183-
</nav>
184-
<div class="subscription">
185-
<h5 class="b-header">Subscribe to our newsletter</h5>
186-
<form class="newsletter">
187-
<input type="text" class="input" placeholder="Your email">
188-
<input type="submit" value="subscribe" class="button small">
189-
</form>
219+
<div class="column is-three-quarters">
220+
<div class="columns">
221+
<div class="column is-full">
222+
<nav class="footer-navigation">
223+
<ul class="menu">
224+
<li>
225+
<a href="{{ '/blog'|url }}" class="menu-item">Blog</a>
226+
</li>
227+
<li>
228+
<a href="{{ '/contributing-code'|url }}" class="menu-item">Contributing Guidelines</a>
229+
</li>
230+
<li>
231+
<a href="{{ '/community/community-team'|url }}" class="menu-item">Community Teams</a>
232+
</li>
233+
<li>
234+
<a href="{{ '/contributing-code/projects'|url }}" class="menu-item">Project List</a>
235+
</li>
236+
</ul>
237+
</nav>
238+
</div>
190239
</div>
191-
<div class="attribution margin-top-bigger">
192-
<p class="caption">Except where otherwise <a href="https://creativecommons.org/policies#license"
193-
target="_blank">noted</a>, content on this site is licensed under a <a
194-
href="https://creativecommons.org/licenses/by/4.0/" target="_blank">Creative Commons Attribution 4.0
195-
International license</a>. Icons by <a href="https://fontawesome.com/" target="_blank" rel="noopener"
196-
class="has-text-white">Font Awesome</a>.</p>
197-
<div class="margin-top-smaller">
198-
<i class="icon margin-right-small is-size-4">cclogo</i>
199-
<i class="icon margin-right-small is-size-4">ccby</i>
240+
<div class="columns">
241+
<div class="column is-two-thirds">
242+
<div class="subscription">
243+
<h5 class="b-header">Subscribe to our newsletter</h5>
244+
<form class="newsletter">
245+
<input type="text" class="input" placeholder="Your email">
246+
<input type="submit" value="subscribe" class="button small">
247+
</form>
248+
</div>
249+
<div class="attribution margin-top-bigger">
250+
<p class="caption">
251+
Except where otherwise
252+
<a href="https://creativecommons.org/policies#license" target="_blank" rel="noopener">noted</a>,
253+
content on this site is licensed under a
254+
<a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="noopener">Creative Commons
255+
Attribution 4.0 International license</a>.
256+
<a href="https://creativecommons.org/website-icons" target="_blank" rel="noopener">Icons</a>
257+
by
258+
<a href="https://fontawesome.com/" target="_blank" rel="noopener">Font Awesome</a>.
259+
</p>
260+
<div class="margin-top-smaller">
261+
<i class="icon margin-right-small is-size-4">cclogo</i>
262+
<i class="icon margin-right-small is-size-4">ccby</i>
263+
</div>
264+
</div>
265+
</div>
266+
<div class="column is-one-third">
267+
<aside class="donate-section">
268+
<h5>Our work relies on you!</h5>
269+
<p>Help us keep the internet free and open.</p>
270+
<a class="button small donate" href="http://creativecommons.org/donate">
271+
<i class="icon cc-letterheart margin-right-small is-size-5 padding-top-smaller"></i>
272+
Donate now
273+
</a>
274+
</aside>
200275
</div>
201276
</div>
202277
</div>
203-
<div class="column">
204-
<aside class="donate-section">
205-
<h5>Our work relies on you!</h5>
206-
<p>Help us keep the internet free and open.</p>
207-
<a class="button small donate">
208-
<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" viewBox="0 0 80 72">
209-
<use href="#letterheart"></use>
210-
</svg>Donate Now
211-
</a>
212-
</aside>
213-
</div>
214278
</div>
215279
</div>
216280
</footer>

webpack/js/main.js

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ $(document).ready(function () {
88
});
99

1010
patchAssetIntoDom('/assets/logos/cc/logomark.svg');
11-
patchAssetIntoDom('/assets/logos/cc/letterheart.svg');
1211
patchAssetIntoDom('/assets/logos/products/open_source.svg');
1312

1413
// Check for click events on the navbar burger icon

webpack/sass/main.scss

+14-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ a {
2323
}
2424
}
2525

26+
.breadcrumb-container {
27+
border-top: 4px solid $color-forest-green;
28+
background-color: $color-lighter-gray;
29+
30+
.breadcrumb {
31+
@extend .padding-bigger;
32+
33+
.link {
34+
@extend .has-color-forest-green;
35+
}
36+
}
37+
}
38+
2639
.single-entry {
2740
.container {
2841
@extend .padding-horizontal-xxl;
@@ -68,7 +81,7 @@ a {
6881

6982
&:last-of-type::after {
7083
content: '';
71-
84+
7285
display: block;
7386

7487
@extend .padding-top-bigger;

0 commit comments

Comments
 (0)