Skip to content

Commit

Permalink
unify page header structure and styling
Browse files Browse the repository at this point in the history
this introduces slight spacing changes from how things rendered before,
but they are now reasonably consistent between pages (though still not
exact).
  • Loading branch information
willnorris committed Oct 11, 2021
1 parent 6f20d05 commit 640931f
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 71 deletions.
13 changes: 6 additions & 7 deletions assets/css/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -149,28 +149,27 @@ span.Icon--caretDown {
background-color: var(--tw-color-blue-primary);
color: white;

padding: var(--feather-grid-mega) 0;
@media (prefers-color-scheme: dark) {
background-color: black;
}
}

.simple-header {
.header {
padding-top: calc(var(--feather-grid-mega) * 3);
padding-bottom: var(--feather-grid-mega);
}

.large-title {
font-size: var(--font-size-xxjumbo);
line-height: var(--line-height-xxjumbo);
}

/* Footer */

.footer {
padding-top: var(--feather-grid-mega);
padding-bottom: var(--feather-grid-mega);
.subtitle {
margin: var(--feather-grid-large) 0;
}

/* Footer */

.footer .Grid-cell {
min-width: 180px;
}
Expand Down
9 changes: 0 additions & 9 deletions assets/css/index.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
/* Styles specific to home page */

.home-header {
padding-top: calc(var(--feather-grid-mega) * 3);
padding-bottom: calc(var(--feather-grid-mega) * 1.75);
}

.subheading {
margin: var(--feather-grid-medium) 0;
}

.grey {
background-color: var(--tw-color-gray-faint);

Expand Down
22 changes: 0 additions & 22 deletions assets/css/memberships.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,6 @@
--logo-size-small: 60px;
}

/* Header sizing */

.memberships-header {
padding-top: calc(var(--feather-grid-mega) * 3);
padding-bottom: var(--feather-grid-mega);
}

.memberships-subheading {
margin-top: var(--feather-grid-mega);
}

/* When header less than var(--feather-grid-page-width) + (var(--feather-grid-mega) * 2) */
@media (max-width: 1236px) {
.subheading-header {
padding-bottom: var(--feather-grid-large);
}

.memberships-subheading {
margin-top: var(--feather-grid-large);
}
}

/* Adjusts width and margins of membership-container */

.membership-container {
Expand Down
8 changes: 7 additions & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@

<!-- Site wrapper -->
<div class="site">
{{ block "header" . }}{{ end }}
<div class="header">
<div class="Grid container">
<div id="header-text" class="Grid-cell">
{{ block "header" . }}{{ end }}
</div>
</div>
</div>
{{ block "main" . }}{{ end }}
</div>

Expand Down
10 changes: 2 additions & 8 deletions layouts/_default/memberships.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{{ define "header" }}
<div class="header memberships-header">
<div class="Grid container">
<div id="header-text" class="Grid-cell">
<h1 class="large-title">Memberships</h1>
<h1 class="memberships-subheading">Our upstream and downstream partners who make open source happen</h1>
</div>
</div>
</div>
<h1 class="large-title">Memberships</h1>
<h1 class="subtitle">Our upstream and downstream partners who make open source happen</h1>
{{ end }}

{{ define "main" }}
Expand Down
16 changes: 4 additions & 12 deletions layouts/_default/projects.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
{{ define "header" }}
<!-- Header -->

<div class="header simple-header">
<div class="Grid container">
<div id="header-text" class="Grid-cell">
<h1 class="large-title">Projects</h1>
<div class="search-bar">
<input class="search-box" type="text" name="search" placeholder="Search Projects" autocomplete="off" />
<span class="Icon Icon--search"></span>
</div>
</div>
</div>
<h1 class="large-title">Projects</h1>
<div class="search-bar">
<input class="search-box" type="text" name="search" placeholder="Search Projects" autocomplete="off" />
<span class="Icon Icon--search"></span>
</div>
{{ end }}

Expand Down
16 changes: 4 additions & 12 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
{{ define "header" }}
<!-- Header -->

<div class="header home-header">
<div class="Grid container">
<div id="header-text" class="Grid-cell u-size7of8">
<h1 class="subheading">
<a href="https://twitter.com/TwitterOSS" target="_blank">@TwitterOSS</a>
</h1>
<h1 class="large-title">Open Source is Happening</h1>
</div>
</div>
</div>
<h1 class="subtitle">
<a href="https://twitter.com/TwitterOSS" target="_blank">@TwitterOSS</a>
</h1>
<h1 class="large-title">Open Source is Happening</h1>
{{ end }}

{{ define "main" }}
Expand Down

0 comments on commit 640931f

Please sign in to comment.