Pledges: Tweak spacing & typography

Related: 7174ae2
This commit is contained in:
Ian Dunn 2021-05-11 13:41:56 -07:00
parent 19eb0b2221
commit 145047cafa
No known key found for this signature in database
GPG key ID: 99B971B50343CBCB
4 changed files with 38 additions and 21 deletions

View file

@ -20,21 +20,22 @@ body.single.single-5ftf_pledge {
.pledge-introduction { .pledge-introduction {
background-color: $color-gray-light-200; background-color: $color-gray-light-200;
padding: 1em; margin-bottom: 36px;
font-size: 1.5em; padding: 30px;
font-size: 1.1rem;
p { p {
max-width: 525px; /* Keep it on two lines, ala https://stackoverflow.com/q/61923996/450127 */ max-width: 400px; /* Balance across two lines, ala https://stackoverflow.com/q/61923996/450127 */
margin: 1em auto; margin: 0 auto 1rem auto;
&:first-child {
margin-top: 0;
}
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
} }
.pledge-introduction__more {
font-size: .9rem;
}
} }
.pledge-status { .pledge-status {
@ -48,16 +49,29 @@ body.single.single-5ftf_pledge {
} }
.entry-title { .entry-title {
margin-top: 30px;
margin-bottom: 0; margin-bottom: 0;
} }
.has-post-thumbnail .pledge-introduction { .has-post-thumbnail .pledge-introduction {
padding-bottom: 2em; padding-bottom: 60px;
}
.pledge-company-summary {
h1 {
font-size: 2.2rem;
font-weight: 600;
}
.pledge-url {
font-size: .9rem;
margin-top: 18px;
}
} }
.has-post-thumbnail .pledge-company-summary { .has-post-thumbnail .pledge-company-summary {
position: relative; position: relative;
top: -30px; top: -65px;
} }
.entry-image__logo { .entry-image__logo {
@ -66,9 +80,11 @@ body.single.single-5ftf_pledge {
img { img {
background-color: white; background-color: white;
max-width: 330px; max-width: 170px;
border-radius: 10px; max-height: 100px;
border: 5px solid white; box-sizing: content-box;
border-radius: 3px;
border: 12px solid white;
} }
} }

View file

@ -123,7 +123,7 @@ add_action( 'after_setup_theme', __NAMESPACE__ . '\content_width', 0 );
* Enqueue scripts and styles. * Enqueue scripts and styles.
*/ */
function scripts() { function scripts() {
wp_enqueue_style( 'wporg-style', get_theme_file_uri( '/css/style.css' ), [ 'dashicons', 'open-sans' ], '2021-05-04' ); wp_enqueue_style( 'wporg-style', get_theme_file_uri( '/css/style.css' ), [ 'dashicons', 'open-sans' ], '2021-05-11' );
wp_enqueue_script( 'wporg-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20181209', true ); wp_enqueue_script( 'wporg-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20181209', true );
wp_enqueue_script( 'wporg-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true ); wp_enqueue_script( 'wporg-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );

View file

@ -35,7 +35,7 @@ get_header();
<?php esc_html_e( 'This organization contributes 5% of their resources to the WordPress project.', 'wporg-5ftf' ); ?> <?php esc_html_e( 'This organization contributes 5% of their resources to the WordPress project.', 'wporg-5ftf' ); ?>
</p> </p>
<p> <p class="pledge-introduction__more">
<a href="<?php echo esc_url( home_url() ); ?>"> <a href="<?php echo esc_url( home_url() ); ?>">
<?php esc_html_e( 'More about Five for the Future', 'wporg-5ftf' ); ?> <?php esc_html_e( 'More about Five for the Future', 'wporg-5ftf' ); ?>
</a> </a>
@ -46,7 +46,7 @@ get_header();
<?php if ( has_post_thumbnail() ) : ?> <?php if ( has_post_thumbnail() ) : ?>
<div class="entry-image"> <div class="entry-image">
<div class="entry-image__logo"> <div class="entry-image__logo">
<?php the_post_thumbnail( 'pledge-logo' ); ?> <?php the_post_thumbnail(); ?>
</div> </div>
</div> </div>
<?php endif; ?> <?php endif; ?>
@ -54,17 +54,18 @@ get_header();
<?php if ( DEACTIVE_STATUS === get_post_status() ) : ?> <?php if ( DEACTIVE_STATUS === get_post_status() ) : ?>
<span class="pledge-status"><?php esc_html_e( 'deactivated', 'wporg-5ftf' ); ?></span> <span class="pledge-status"><?php esc_html_e( 'deactivated', 'wporg-5ftf' ); ?></span>
<?php endif; ?> <?php endif; ?>
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
<span class="pledge-url">
<p class="pledge-url">
<?php <?php
printf( printf(
'<a href="%1$s" rel="nofollow">%1$s</a>', '<a href="%1$s" rel="nofollow noopener">%1$s</a>',
esc_url( $post->{ META_PREFIX . 'org-url' } ) esc_url( $post->{ META_PREFIX . 'org-url' } )
); );
?> ?>
</span> </p>
</div> </div>
</header> </header>
<div class="entry-content"> <div class="entry-content">

View file

@ -52,7 +52,7 @@ $contributor_title = sprintf(
<div class="entry-image"> <div class="entry-image">
<?php if ( has_post_thumbnail() ) : ?> <?php if ( has_post_thumbnail() ) : ?>
<div class="entry-image__logo"> <div class="entry-image__logo">
<?php the_post_thumbnail( 'pledge-logo' ); ?> <?php the_post_thumbnail(); ?>
</div> </div>
<?php else : ?> <?php else : ?>
<div class="entry-image__placeholder"></div> <div class="entry-image__placeholder"></div>