Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post typography. #146

Merged
merged 3 commits into from Oct 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 0 additions & 11 deletions themes/helphub/functions.php
Expand Up @@ -167,17 +167,6 @@ function helphub_scripts() {

add_action( 'wp_enqueue_scripts', 'helphub_scripts' );

/**
* Echoes read time if the plugin exists
* Makes templates cleaner by wrapping it again and
* other theme areas can use it without re-checking if function exists
*/
function helphub_wrap_the_read_time() {
if ( function_exists( 'hh_the_read_time' ) ) :
hh_the_read_time();
endif;
}

add_filter( 'wp_nav_menu_items', 'helphub_append_searchform_to_menu', 10, 2 );
/**
* Append search form to 'primary' menu.
Expand Down
52 changes: 0 additions & 52 deletions themes/helphub/sass/modules/_table-of-contents.scss

This file was deleted.

16 changes: 8 additions & 8 deletions themes/helphub/sass/site/primary/_posts-and-pages.scss
Expand Up @@ -23,11 +23,18 @@

.single-post {

h1 {

&.entry-title {
font-size: 29px;
line-height: 31px;
}
}

article {

&.post {
float: left;
padding: 2em;
box-sizing: border-box;
position: relative;
}
Expand All @@ -38,13 +45,6 @@
position: relative;
}

.entry-header {
border-bottom: 2px solid #000;
margin-bottom: 2em;
padding-bottom: 0.5em;
text-align: center;
}

.entry-content {

ul {
Expand Down
5 changes: 0 additions & 5 deletions themes/helphub/sass/style.scss
Expand Up @@ -91,11 +91,6 @@ Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normalize.css/
--------------------------------------------------------------*/
@import "modules/clearings";

/*--------------------------------------------------------------
# Table of Contents
--------------------------------------------------------------*/
@import "modules/table-of-contents";

/*--------------------------------------------------------------
# Widgets
--------------------------------------------------------------*/
Expand Down
2 changes: 1 addition & 1 deletion themes/helphub/sass/typography/_copy.scss
@@ -1,5 +1,5 @@
p {
margin-bottom: 1.5em;
margin: 1.2em 0;
}

dfn,
Expand Down
2 changes: 1 addition & 1 deletion themes/helphub/sass/typography/_typography.scss
Expand Up @@ -8,7 +8,7 @@ textarea {
color: $color__text-main;
font-family: $font__main;

@include font-size(1);
@include font-size(0.88);
}

@import "headings";
Expand Down
2 changes: 1 addition & 1 deletion themes/helphub/sass/variables-site/_colors.scss
Expand Up @@ -11,7 +11,7 @@ $color__text-input-focus: #111;
$color__link: #4169e1;
$color__link-visited: #0073aa;
$color__link-hover: #191970;
$color__text-main: #404040;
$color__text-main: #555;

$color__border-button: #ccc #ccc #bbb;
$color__border-button-hover: #ccc #bbb #aaa;
Expand Down
65 changes: 9 additions & 56 deletions themes/helphub/style.css
Expand Up @@ -324,10 +324,10 @@ input,
select,
optgroup,
textarea {
color: #404040;
color: #555;
font-family: "Open Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
font-size: 16px;
font-size: 1rem;
font-size: 14.08px;
font-size: 0.88rem;
}

h1,
Expand All @@ -351,7 +351,7 @@ body p {
}

p {
margin-bottom: 1.5em;
margin: 1.2em 0;
}

dfn,
Expand Down Expand Up @@ -882,50 +882,6 @@ a:hover, a:active {
clear: both;
}

/*--------------------------------------------------------------
# Table of Contents
--------------------------------------------------------------*/
.table-of-contents {
background-color: #f5f5f5;
float: right;
max-width: 35%;
border-top: 5px solid #d0d0d0;
padding-top: 2%;
padding-bottom: 2%;
}

.table-of-contents ul {
margin-left: 0.2em;
}

.table-of-contents li {
list-style: none;
padding-left: 5%;
padding-right: 3%;
padding-bottom: 2%;
font-weight: 900;
line-height: 1.2;
}

.single-post h1.entry-title {
font-family: HelveticaNeue-Light, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: 300;
font-size: 2.5em;
}

h2.toc-heading,
h3.toc-heading,
h4.toc-heading {
margin-top: 2em;
font-size: 1.2em;
font-weight: 400;
}

p.toc-jump {
float: right;
font-size: 1em;
}

/*--------------------------------------------------------------
# Widgets
--------------------------------------------------------------*/
Expand Down Expand Up @@ -1022,9 +978,13 @@ p.toc-jump {
margin: 0 0 1.5em;
}

.single-post h1.entry-title {
font-size: 29px;
line-height: 31px;
}

.single-post article.post {
float: left;
padding: 2em;
box-sizing: border-box;
position: relative;
}
Expand All @@ -1033,13 +993,6 @@ p.toc-jump {
position: relative;
}

.entry-header {
border-bottom: 2px solid #000;
margin-bottom: 2em;
padding-bottom: 0.5em;
text-align: center;
}

.entry-content ul {
margin-left: 2em;
}
Expand Down
73 changes: 36 additions & 37 deletions themes/helphub/template-parts/content-post.php
Expand Up @@ -9,40 +9,39 @@
*/

?>
<article id="post-<?php the_ID(); ?>" <?php post_class( array( 'handbook' ) ); ?>>


<div class="entry-content">
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>

<span class="read-time">
<?php helphub_wrap_the_read_time(); ?>
</span>
</header><!-- .entry-header -->
<?php
the_content();

wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'helphub' ),
'after' => '</div>',
) );
?>
<footer class="entry-footer">
<?php
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', 'helphub' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
),
'<span class="edit-link">',
'</span>'
);
?>
</footer><!-- .entry-footer -->
</div><!-- .entry-content -->



</article><!-- #post-## -->
<div class="o2-posts">
<article id="post-<?php the_ID(); ?>" <?php post_class( array( 'handbook' ) ); ?>>

<div class="o2-post">
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header -->

<div class="entry-content">
<?php
the_content();

wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'helphub' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->

<footer class="entry-footer">
<?php
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', 'helphub' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
),
'<span class="edit-link">',
'</span>'
);
?>
</footer><!-- .entry-footer -->
</div><!-- .o2-post -->

</article><!-- #post-## -->
</div><!-- .o2-posts -->