mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-05 10:25:45 +03:00
Style the page header
This commit is contained in:
parent
5d6cb25232
commit
85b8b38ed0
6 changed files with 114 additions and 6 deletions
|
@ -18,12 +18,16 @@ get_header(); ?>
|
||||||
|
|
||||||
<header class="page-header">
|
<header class="page-header">
|
||||||
<h1 class="page-title"><?php esc_html_e( 'Pledges', 'wordpressorg' ); ?></h1>
|
<h1 class="page-title"><?php esc_html_e( 'Pledges', 'wordpressorg' ); ?></h1>
|
||||||
<a href="/for-organizations/" class="button"><?php esc_html_e( 'Pledge your company', 'wordpressorg' ); ?></a>
|
<div class="page-header-callout">
|
||||||
|
<a class="button" href="/for-organizations/" >
|
||||||
|
<?php esc_html_e( 'Pledge your company', 'wordpressorg' ); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="page-header-controls">
|
<div class="page-header-controls">
|
||||||
<form method="get" action="<?php echo esc_url( get_post_type_archive_link( CPT_ID ) ); ?>">
|
<form method="get" action="<?php echo esc_url( get_post_type_archive_link( CPT_ID ) ); ?>">
|
||||||
<label for="pledge-sort"><?php esc_html_e( 'Sort pledges by', 'wordpressorg' ); ?></label>
|
<label for="pledge-sort"><?php esc_html_e( 'Sort pledges by', 'wordpressorg' ); ?></label>
|
||||||
<select id="pledge-sort" name="order">
|
<select class="custom-select" id="pledge-sort" name="order">
|
||||||
<option value="" <?php selected( $_GET['order'], '' ); ?>>
|
<option value="" <?php selected( $_GET['order'], '' ); ?>>
|
||||||
<?php esc_html_e( 'All Pledges', 'wordpressorg' ); ?>
|
<?php esc_html_e( 'All Pledges', 'wordpressorg' ); ?>
|
||||||
</option>
|
</option>
|
||||||
|
|
|
@ -5,3 +5,4 @@
|
||||||
@import "../../../pub/wporg/css/base/lists";
|
@import "../../../pub/wporg/css/base/lists";
|
||||||
@import "../../../pub/wporg/css/base/tables";
|
@import "../../../pub/wporg/css/base/tables";
|
||||||
@import "../../../pub/wporg/css/base/typography";
|
@import "../../../pub/wporg/css/base/typography";
|
||||||
|
@import "select";
|
||||||
|
|
40
themes/wporg-5ftf/css/base/_select.scss
Normal file
40
themes/wporg-5ftf/css/base/_select.scss
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
// Remove the browser styling from a select box and create a simple dropdown.
|
||||||
|
// See https://www.filamentgroup.com/lab/select-css.html
|
||||||
|
.custom-select {
|
||||||
|
display: inline-block;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: -0.5rem 0;
|
||||||
|
padding: 0.5rem 2rem 0.5rem .8rem;
|
||||||
|
width: auto;
|
||||||
|
|
||||||
|
font-size: 1em;
|
||||||
|
line-height: 1.3;
|
||||||
|
|
||||||
|
border: none;
|
||||||
|
box-shadow: none;
|
||||||
|
border-radius: 0.5em;
|
||||||
|
-moz-appearance: none;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
appearance: none;
|
||||||
|
|
||||||
|
background-color: transparent;
|
||||||
|
background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg width="14" height="8" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M2 0L7 5L12 0L14 1L7 8L0 1L2 0Z" fill="%23555D66"/%3E%3C/svg%3E%0A');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: right .7em top 50%;
|
||||||
|
background-size: .65em auto;
|
||||||
|
|
||||||
|
&::-ms-expand {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
box-shadow: 0 0 1px 3px rgba(59, 153, 252, .7);
|
||||||
|
box-shadow: 0 0 0 3px -moz-mac-focusring;
|
||||||
|
color: #222;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
& option {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
}
|
9
themes/wporg-5ftf/css/components/_archive.scss
Normal file
9
themes/wporg-5ftf/css/components/_archive.scss
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
body.archive {
|
||||||
|
|
||||||
|
.page-title {
|
||||||
|
color: $color__text-heading-darker;
|
||||||
|
font-size: ms(8);
|
||||||
|
font-weight: 300;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
}
|
|
@ -20,6 +20,7 @@
|
||||||
@import "../../../pub/wporg/css/components/wporg-footer";
|
@import "../../../pub/wporg/css/components/wporg-footer";
|
||||||
@import "../../../pub/wporg/css/components/wporg-header";
|
@import "../../../pub/wporg/css/components/wporg-header";
|
||||||
@import "about";
|
@import "about";
|
||||||
|
@import "archive";
|
||||||
@import "entry-content";
|
@import "entry-content";
|
||||||
@import "page";
|
@import "page";
|
||||||
@import "pledge-list";
|
@import "pledge-list";
|
||||||
|
|
|
@ -1,5 +1,58 @@
|
||||||
// Expand archive content area to full-width of header.
|
body.archive.post-type-archive-5ftf_pledge {
|
||||||
body.archive.post-type-archive-5ftf_pledge .site-content .site-main {
|
|
||||||
|
// Expand archive content area to full-width of header.
|
||||||
|
.site-content .site-main {
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
max-width: $size__site-main;
|
max-width: $size__site-main;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-header {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr auto;
|
||||||
|
align-items: center;
|
||||||
|
margin: ms(12) 0;
|
||||||
|
|
||||||
|
.page-title {
|
||||||
|
grid-column: 1;
|
||||||
|
grid-row: 1;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-header-callout {
|
||||||
|
grid-column: 2;
|
||||||
|
grid-row: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-header-controls {
|
||||||
|
grid-column: 1 / span 2;
|
||||||
|
grid-row: 2;
|
||||||
|
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
margin-top: ms(2);
|
||||||
|
border-top: 1px solid $color-gray-light-500;
|
||||||
|
padding-top: ms(2);
|
||||||
|
|
||||||
|
form:nth-of-type(2n+1) {
|
||||||
|
grid-column: 1;
|
||||||
|
grid-row: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
form:nth-of-type(2n) {
|
||||||
|
grid-column: 2;
|
||||||
|
grid-row: 1;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-header-controls {
|
||||||
|
font-size: ms(-2);
|
||||||
|
|
||||||
|
label {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 1em;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue