Skip to content

Commit 4b8bbd7

Browse files
authored
Merge pull request creativecommons#362 from creativecommons/refactor
Remove multiple instances of title class
2 parents 475df28 + 3fc96fb commit 4b8bbd7

File tree

5 files changed

+40
-138
lines changed

5 files changed

+40
-138
lines changed

themes/vocabulary_theme/templates/blog.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
{% block body %}
77
<div class="blog-page">
8-
<div class="blog-page-header">
8+
<div class="title">
99
<div class="container">
1010
<h1>{{ this.title }}</h1>
11-
<div class="blog-page-description column is-9 is-paddingless">{{ this.description }}</div>
11+
<div class="description column is-9 is-paddingless">{{ this.description }}</div>
1212
</div>
1313
</div>
1414
<div class="container blog-page-posts">

themes/vocabulary_theme/templates/community_team_list.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{% extends "layout.html" %}
22

33
{% block body %}
4-
<div class="community-team-members">
4+
<div>
55
<div class="title">
66
<div class="container">
77
<h1>{{ this.title }}</h1>
8-
<p class="description column is-9">This is a list of all CC Community Team members, and their roles and privileges. For more information about CC Community Team, please see <a href="/community/community-team/">the Community Team Page</a>.</p>
8+
<p class="description column is-9 is-paddingless">This is a list of all CC Community Team members, and their roles and privileges. For more information about CC Community Team, please see <a href="/community/community-team/">the Community Team Page</a>.</p>
99
</div>
1010
</div>
11-
<div class="body container">
11+
<div class="container padding-horizontal-big padding-bottom-xl">
1212
<h2 class="padding-top-bigger">Project Teams</h2>
1313
{% for project in bag('community_team_members.projects') %}
1414
<h3 class="b-header padding-vertical-normal">{{ project.name }}</h3>

themes/vocabulary_theme/templates/page-with-toc.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{% block body %}
44
<div class="code-guidelines">
5-
<header class="code-guidelines-title">
5+
<header class="title">
66
<div class="container is-paddingless">
77
<h1>{{ this.title }}</h1>
88
<div class="description column is-9 is-paddingless">

themes/vocabulary_theme/templates/search_roadmap.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div class="title">
66
<div class="container">
77
<h1>{{ this.title }}</h1>
8-
<p class="description column is-9">The largest open source product in CC’s portfolio is CC Search: a search engine for CC licensed and public domain creative works.</p>
8+
<p class="description column is-9 is-paddingless">The largest open source product in CC’s portfolio is CC Search: a search engine for CC licensed and public domain creative works.</p>
99
</div>
1010
</div>
1111
<div class="body container">

webpack/sass/main.scss

+33-131
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
@import "../node_modules/@creativecommons/vocabulary/scss/vocabulary.scss";
22

3-
// links
3+
// Links
44
a {
55
color: $color-forest-green;
66
text-decoration: none;
77
}
88

9+
// Code
910
code {
1011
color: $color-dark-slate-gray;
1112
background-color: $color-lighter-gray;
1213
border: 1px solid $color-lighter-gray;
1314
border-radius: 0.25rem;
1415
}
1516

17+
// Navbar
1618
.navbar-item {
1719
&.has-dropdown {
1820
.navbar-dropdown {
@@ -26,19 +28,21 @@ code {
2628
}
2729
}
2830

31+
// Breadcrumb
2932
.breadcrumb-container {
3033
border-top: 4px solid $color-forest-green;
3134
background-color: $color-lighter-gray;
3235

3336
.breadcrumb {
34-
@extend .padding-bigger;
37+
@extend .padding-big;
3538

3639
.link {
3740
@extend .has-color-forest-green;
3841
}
3942
}
4043
}
4144

45+
// Hero section - Home page
4246
.hero {
4347
@extend .margin-top-large;
4448

@@ -68,6 +72,7 @@ code {
6872
}
6973
}
7074

75+
// Get-involved section - Home page
7176
.get-involved {
7277
background-color: $color-lighter-gray;
7378

@@ -106,6 +111,7 @@ code {
106111
}
107112
}
108113

114+
// Recent-posts section - Home page
109115
.recent-posts {
110116
background-color: rgba(4, 166, 53, 0.1);
111117

@@ -134,6 +140,7 @@ code {
134140
}
135141
}
136142

143+
// Featured-projects section - Home page
137144
.featured-projects {
138145
@extend .padding-vertical-xxl;
139146

@@ -183,23 +190,27 @@ code {
183190
}
184191
}
185192

186-
.blog-page {
187-
.blog-page-header {
188-
@extend .padding-top-bigger;
189-
@extend .padding-bottom-xl;
193+
// Common Title section
194+
.title {
195+
background-color: $color-lighter-gray;
190196

191-
background-color: $color-lighter-gray;
197+
.container {
198+
@extend .padding-horizontal-big;
199+
@extend .padding-bottom-xl;
192200

193-
.container {
194-
@extend .padding-horizontal-big;
195-
}
201+
word-wrap: break-word;
196202

197-
.blog-page-description {
203+
.description {
204+
@extend .body-bigger;
198205
@extend .padding-top-normal;
199-
@extend .body-big;
206+
207+
line-height: 1.8125;
200208
}
201209
}
210+
}
202211

212+
// Blog page
213+
.blog-page {
203214
.blog-page-posts {
204215
@extend .padding-top-normal;
205216

@@ -210,6 +221,7 @@ code {
210221
}
211222
}
212223

224+
// Single Post page
213225
.single-post {
214226
.container {
215227
@extend .padding-horizontal-xxl;
@@ -317,14 +329,10 @@ code {
317329
}
318330
}
319331

332+
// Author Post page
320333
.author-posts {
321334
.title {
322-
background-color: $color-lighter-gray;
323-
324335
.container {
325-
@extend .padding-horizontal-big;
326-
@extend .padding-bottom-xl;
327-
328336
.image {
329337
width: 9.5rem;
330338
height: 9.5rem;
@@ -349,16 +357,8 @@ code {
349357
}
350358
}
351359

360+
// Series page
352361
.all-series {
353-
.title {
354-
background-color: $color-lighter-gray;
355-
356-
.container {
357-
@extend .padding-horizontal-big;
358-
@extend .padding-bottom-xl;
359-
}
360-
}
361-
362362
.series-list {
363363
@extend .padding-horizontal-big;
364364
@extend .padding-top-xl;
@@ -384,34 +384,17 @@ code {
384384
}
385385
}
386386

387+
// Categories page
387388
.all-categories {
388-
.title {
389-
background-color: $color-lighter-gray;
390-
overflow-wrap: break-word;
391-
392-
.container {
393-
@extend .padding-horizontal-big;
394-
@extend .padding-bottom-xl;
395-
}
396-
}
397-
398389
.categories-list {
399390
@extend .padding-horizontal-big;
400391
@extend .padding-top-xl;
401392
@extend .padding-bottom-xxl;
402393
}
403394
}
404395

396+
// All Authors page
405397
.all-authors {
406-
.title {
407-
background-color: $color-lighter-gray;
408-
409-
.container {
410-
@extend .padding-horizontal-big;
411-
@extend .padding-bottom-xl;
412-
}
413-
}
414-
415398
.authors-list {
416399
@extend .padding-horizontal-big;
417400
@extend .padding-top-xl;
@@ -453,22 +436,8 @@ code {
453436
}
454437
}
455438

439+
// Guidelines page
456440
.code-guidelines {
457-
.code-guidelines-title {
458-
background-color: $color-lighter-gray;
459-
460-
.container {
461-
@extend .padding-horizontal-bigger;
462-
463-
word-wrap: break-word;
464-
465-
.description {
466-
@extend .body-bigger;
467-
@extend .padding-top-small;
468-
@extend .padding-bottom-xl;
469-
}
470-
}
471-
}
472441
.code-guidelines-body {
473442
@extend .padding-horizontal-big;
474443

@@ -493,24 +462,8 @@ code {
493462
}
494463
}
495464

465+
// Project List page
496466
.project-list {
497-
.title {
498-
background-color: $color-lighter-gray;
499-
500-
501-
.container {
502-
@extend .padding-horizontal-big;
503-
504-
.description {
505-
@extend .padding-top-normal;
506-
@extend .padding-bottom-xl;
507-
@extend .body-bigger;
508-
509-
line-height: 1.4375;
510-
}
511-
}
512-
}
513-
514467
.body {
515468
@extend .padding-horizontal-big;
516469
@extend .body-big;
@@ -534,38 +487,19 @@ code {
534487
}
535488
}
536489

490+
// CC Search Guidelines page
537491
.cc-search-guide {
538-
.title {
539-
background-color: $color-lighter-gray;
540-
541-
.container {
542-
@extend .padding-horizontal-big;
543-
@extend .padding-bottom-xl;
544-
}
545-
}
546-
547492
.body {
548493
@extend .padding-horizontal-big;
549494
@extend .padding-top-xl;
550495
@extend .padding-bottom-xxl;
551496
}
552497
}
553498

499+
// Project Ideas page
554500
.project-ideas {
555501
.title {
556-
background-color: $color-lighter-gray;
557-
558502
.container {
559-
@extend .padding-horizontal-big;
560-
@extend .padding-bottom-xl;
561-
562-
.description {
563-
@extend .padding-top-normal;
564-
@extend .body-bigger;
565-
566-
line-height: 2.0625;
567-
}
568-
569503
.filter-labels {
570504
@extend .padding-top-xl;
571505

@@ -652,23 +586,8 @@ code {
652586
}
653587
}
654588

589+
// CC Search Roadmap
655590
.cc-search-roadmap {
656-
.title {
657-
background-color: $color-lighter-gray;
658-
659-
.container {
660-
@extend .padding-horizontal-big;
661-
@extend .padding-bottom-xl;
662-
663-
.description {
664-
@extend .padding-top-normal;
665-
@extend .body-bigger;
666-
667-
line-height: 1.4375;
668-
}
669-
}
670-
}
671-
672591
.body {
673592
@extend .padding-horizontal-big;
674593
@extend .padding-top-xl;
@@ -688,20 +607,3 @@ code {
688607
}
689608
}
690609
}
691-
692-
.community-team-members {
693-
.container {
694-
@extend .padding-horizontal-big;
695-
@extend .padding-bottom-xl;
696-
}
697-
698-
.title {
699-
background-color: $color-lighter-gray;
700-
overflow-wrap: break-word;
701-
702-
.description {
703-
@extend .body-bigger;
704-
@extend .padding-top-small;
705-
}
706-
}
707-
}

0 commit comments

Comments
 (0)