Skip to content

Commit 3ca89ec

Browse files
Added css classes to automatically center page titles on all pages.
1 parent de87727 commit 3ca89ec

File tree

9 files changed

+37
-19
lines changed

9 files changed

+37
-19
lines changed

_pages/01_about.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<section class="about">
88
<!--REPLACE THIS IMAGE WITH A NEW ONE - MIX PREVIOUS MEETUPS AND MAKE A COLLAGE -->
9-
<div class="events-page__background-img" data-image-type="responsive">
9+
<div class="about__background-img" data-image-type="responsive">
1010
<picture>
1111
<source srcset="../static/images/events_page/events_page_top_480x150px.jpg 480w,
1212
../static/images/events_page/events_page_top_960x300px.jpg 960w,
@@ -22,7 +22,7 @@
2222
alt="Events"
2323
data-overlay="linear-gradient(180deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.65) 100%)">
2424
</picture>
25-
<div class="row container-fluid">
25+
<div class="about__page-title-container row container-fluid">
2626
<div class="col-sm-12">
2727
<h1 class="about__page-title">About Us</h1>
2828
<h2 class="about__page-subtitle">Our Goals, Our Story</h2>

_pages/03_events.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
alt="Events"
2121
data-overlay="linear-gradient(180deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.65) 100%)">
2222
</picture>
23-
<div class="row container-fluid">
23+
<div class="events-page__title-container row container-fluid">
2424
<div class="col-sm-12">
2525
<h1 class="events-page__page-title">Events</h1>
2626
<h2 class="events-page__page-subtitle">See What's New And What We Did Already</h2>

_pages/04_contact.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
alt="Contact Us"
2121
data-overlay="linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.75) 100%)">
2222
</picture>
23-
<div class="row container-fluid">
23+
<div class="contact__page-title-container row container-fluid">
2424
<div class="col-sm-12">
2525
<h1 class="contact__page-title">Contact Us</h1>
2626
<h2 class="contact__page-subtitle">Got An Idea? Can You Help Us? Let Us Know</h2>

_sass/about.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
.about__background-img {
2+
@extend .contact__background-img;
3+
}
4+
5+
.about__page-title-container {
6+
@extend .page__title-container
7+
}
8+
19
.about__page-title {
210
@extend .page__title;
3-
margin-top: 15vh;
411
}
512

613
.about__page-subtitle {

_sass/contact.scss

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,16 @@
22
margin-top: -66px;
33
}
44

5-
@media (orientation: landscape) {
6-
.contact__background-img {
7-
min-height: 55vh;
8-
}
5+
.contact__background-img {
6+
height: 55vh;
97
}
108

11-
@media (orientation: portrait) {
12-
.contact__background-img {
13-
min-height: 25vh;
14-
}
9+
.contact__page-title-container {
10+
@extend .page__title-container;
1511
}
1612

1713
.contact__page-title {
1814
@extend .page__title;
19-
margin-top: 15vh;
2015
}
2116

2217
.contact__page-subtitle {

_sass/events.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@
66
@extend .contact__background-img
77
}
88

9+
.events-page__title-container {
10+
@extend .page__title-container;
11+
}
12+
913
.events-page__page-title {
1014
@extend .page__title;
11-
margin-top: 15vh;
1215
}
1316

1417
.events-page__page-subtitle {

_sass/style.scss

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,18 @@ a {
115115
background-color: rgba(7, 41, 72, 0.7);
116116
}
117117

118+
119+
.navigation__title-container {
120+
@extend .page__title-container;
121+
}
122+
118123
.navigation__title {
119124
@extend .page__title;
120-
margin-top: 40vh;
121125
}
122126

123127

124128
.navigation__subtitle {
125129
@extend .page__subtitle;
126-
margin-bottom: 50%;
127130
}
128131

129132
.navigation__button-close {
@@ -259,8 +262,8 @@ a {
259262

260263
.upcoming__title {
261264
@extend .section-title;
265+
background-color: rgba(0, 0, 0, 0.5);
262266
width: 100%;
263-
background: rgba(0, 0, 0, 0.9);
264267
font-size: 2.5em;
265268
color: $title-light;
266269
margin-top: 0;

_sass/typography.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@
3535
// Text styles below.
3636
// Page title.
3737

38+
.page__title-container {
39+
position: relative;
40+
top: 50%;
41+
-moz-transform: translateY(-50%);
42+
-webkit-transform: translateY(-50%);
43+
-ms-transform: translateY(-50%);
44+
transform: translateY(-50%);
45+
}
46+
47+
3848
.page__title, .page__subtitle {
3949
user-select: none;
4050
-moz-user-select: none;

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
data-overlay="linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.8) 100%)">
2727
</picture>
2828

29-
<div class="row">
29+
<div class="navigation__title-container row">
3030
<div class="col-md-12">
3131
<h1 class="navigation__title">Python Sprints</h1>
3232
<h2 class="navigation__subtitle"><em>The World Needs Your Code</em></h2>

0 commit comments

Comments
 (0)