Skip to content

Commit 077e889

Browse files
committed
Fix redudant code issue
1 parent 0695c97 commit 077e889

File tree

4 files changed

+33
-40
lines changed

4 files changed

+33
-40
lines changed

content/contents.lr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ links_product:
3333
<h4 class="heading">Help us build our products</h4>
3434

3535
<div class="list">
36-
<h5 class="link-heading"><a href="https://opensource.creativecommons.org/contributing-code/" class="has-text-forest-green">Contribution Guidelines</a></h5>
36+
<h5 class="link-heading"><a href="/contributing-code/" class="has-text-forest-green">Contribution Guidelines</a></h5>
3737
<p class="link-caption">Learn how to contribute and then get started.</p>
3838

39-
<h5 class="link-heading"><a href="https://opensource.creativecommons.org/community/community-team/" class="has-text-forest-green">Community Team</a></h5>
39+
<h5 class="link-heading"><a href="/community/community-team/" class="has-text-forest-green">Community Team</a></h5>
4040
<p class="link-caption">Become a member of our community volunteer team.</p>
4141

42-
<h5 class="link-heading"><a href="https://opensource.creativecommons.org/contributing-code/projects/" class="has-text-forest-green">All Available Projects</a></h5>
42+
<h5 class="link-heading"><a href="/contributing-code/projects/" class="has-text-forest-green">All Available Projects</a></h5>
4343
<p class="link-caption">See all of our open source projects in one place.</p>
4444
</div>
4545
----

themes/vocabulary_theme/templates/blog-post.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ <h2 class="title">{{ this.title }}</h2>
3131
{% endif %}
3232
</div>
3333
</header>
34-
<div class="single-post-body container">
34+
<div class="single-post-body markdown container">
3535
{{ this.body }}
3636
</div>
3737
<footer class="single-post-footer container">

themes/vocabulary_theme/templates/macros/posts.html

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,29 @@
44
<div class="columns is-multiline blog-entries">
55
{% for post in posts %}
66
{% set author = post.parent.parent.children.get('authors').children.get(post.author) %}
7-
<article class="card entry-post horizontal no-border blog-entry column is-one-third">
8-
<header>
9-
<figure class="image blog-image">
10-
{% if author.about %}
11-
{% if author.md5_hashed_email %}
12-
<img class="profile" src="https://secure.gravatar.com/avatar/{{ author.md5_hashed_email }}?size=200" alt="gravatar" />
13-
{% else %}
14-
<img class="profile" src="./blank_profile.svg" alt="gravatar" />
7+
<div class="column is-one-third">
8+
<article class="card entry-post horizontal no-border blog-entry">
9+
<header>
10+
<figure class="image blog-image">
11+
{% if author.about %}
12+
{% if author.md5_hashed_email %}
13+
<img class="profile" src="https://secure.gravatar.com/avatar/{{ author.md5_hashed_email }}?size=200" alt="gravatar" />
14+
{% else %}
15+
<img class="profile" src="./blank_profile.svg" alt="gravatar" />
16+
{% endif %}
1517
{% endif %}
16-
{% endif %}
17-
</figure>
18-
</header>
19-
<div class="blog-content">
20-
<h4 class="b-header"><a class="blog-title" href="{{ post|url }}">{{ post.title }}</a></h4>
21-
<span class="blog-author">by <a href="{{ author|url }}">{{ render_author_name(author) }}</a>
22-
on {{ post.pub_date|dateformat("YYYY-MM-dd") }}</span>
23-
<div class="excerpt">
24-
{{ post.body | excerpt | string | striptags() | truncate(100) }}
18+
</figure>
19+
</header>
20+
<div class="blog-content">
21+
<h4 class="b-header"><a class="blog-title" href="{{ post|url }}">{{ post.title }}</a></h4>
22+
<span class="blog-author">by <a href="{{ author|url }}">{{ render_author_name(author) }}</a>
23+
on {{ post.pub_date|dateformat("YYYY-MM-dd") }}</span>
24+
<div class="excerpt">
25+
{{ post.body | excerpt | string | striptags() | truncate(100) }}
26+
</div>
2527
</div>
26-
</div>
27-
</article>
28+
</article>
29+
</div>
2830
{% endfor %}
2931
</div>
3032
{% endmacro %}

webpack/sass/main.scss

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ a {
1010
text-decoration: none;
1111
}
1212

13+
// Will be replaced by content class from Bulma
1314
.markdown {
1415
@extend .body-big;
1516

@@ -193,12 +194,16 @@ a {
193194
}
194195

195196
.blog-entries {
197+
.column {
198+
&:not(:nth-last-child(-n+3)) {
199+
border-bottom: 0.1875rem solid $color-light-gray !important;
200+
}
201+
}
202+
196203
.blog-entry {
197204
@extend .padding-vertical-larger;
198205
@extend .padding-horizontal-big;
199206

200-
border-bottom: 0.1875rem solid $color-light-gray !important;
201-
202207
.blog-title {
203208
@extend .has-color-dark-slate-gray;
204209
}
@@ -226,7 +231,7 @@ a {
226231
@extend .padding-top-normal;
227232

228233
.pagination-wrapper {
229-
@extend .padding-top-xl;
234+
@extend .padding-top-normal;
230235
@extend .padding-bottom-xxl;
231236
}
232237
}
@@ -274,22 +279,8 @@ a {
274279
}
275280

276281
.single-post-body {
277-
@extend .body-big;
278282
@extend .padding-top-bigger;
279283

280-
p {
281-
@extend .padding-vertical-small;
282-
}
283-
284-
h1,h2,h3,h4,h5,h6 {
285-
@extend .padding-top-large;
286-
@extend .padding-bottom-small;
287-
}
288-
289-
ol,ul {
290-
@extend .padding-horizontal-big;
291-
}
292-
293284
&:last-of-type::after {
294285
content: '';
295286

0 commit comments

Comments
 (0)