Skip to content

Commit

Permalink
Merge pull request #79 from piperhaywood/dev
Browse files Browse the repository at this point in the history
v2.1.3
  • Loading branch information
piperhaywood authored Oct 2, 2019
2 parents a9aab17 + 60a8ea2 commit c251cd6
Show file tree
Hide file tree
Showing 13 changed files with 323 additions and 498 deletions.
4 changes: 2 additions & 2 deletions css/_components.site-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ body.is-not-tabbing.is-header-open {
margin-bottom: 1em;
}

.smallprint a:hover {
text-decoration: underline;
.smallprint a {
text-decoration-color: $grey !important;
}

.menu-header-container {
Expand Down
45 changes: 27 additions & 18 deletions css/_fonts.scss
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
@font-face {
font-family: 'IBMPlexMono';
font-display: swap;
font-family: "IBMPlexMono";
font-weight: 400;
src: url('fonts/IBMPlexMono-Regular.eot'); /* IE9 Compat Modes */
src: url('fonts/IBMPlexMono-Regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('fonts/IBMPlexMono-Regular.woff2') format('woff2'), /* Super Modern Browsers */
url('fonts/IBMPlexMono-Regular.woff') format('woff'), /* Pretty Modern Browsers */
url('fonts/IBMPlexMono-Regular.ttf') format('truetype'); /* Safari, Android, iOS */
src: url("fonts/IBMPlexMono-Regular.eot"); /* IE9 Compat Modes */
src: url("fonts/IBMPlexMono-Regular.eot?#iefix") format("embedded-opentype"),
/* IE6-IE8 */ url("fonts/IBMPlexMono-Regular.woff2") format("woff2"),
/* Super Modern Browsers */ url("fonts/IBMPlexMono-Regular.woff")
format("woff"),
/* Pretty Modern Browsers */ url("fonts/IBMPlexMono-Regular.ttf")
format("truetype"); /* Safari, Android, iOS */
}

@font-face {
font-family: 'IBMPlexMono';
font-display: swap;
font-family: "IBMPlexMono";
font-weight: 700;
src: url('fonts/IBMPlexMono-Bold.eot'); /* IE9 Compat Modes */
src: url('fonts/IBMPlexMono-Bold.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('fonts/IBMPlexMono-Bold.woff2') format('woff2'), /* Super Modern Browsers */
url('fonts/IBMPlexMono-Bold.woff') format('woff'), /* Pretty Modern Browsers */
url('fonts/IBMPlexMono-Bold.ttf') format('truetype'); /* Safari, Android, iOS */
src: url("fonts/IBMPlexMono-Bold.eot"); /* IE9 Compat Modes */
src: url("fonts/IBMPlexMono-Bold.eot?#iefix") format("embedded-opentype"),
/* IE6-IE8 */ url("fonts/IBMPlexMono-Bold.woff2") format("woff2"),
/* Super Modern Browsers */ url("fonts/IBMPlexMono-Bold.woff")
format("woff"),
/* Pretty Modern Browsers */ url("fonts/IBMPlexMono-Bold.ttf")
format("truetype"); /* Safari, Android, iOS */
}

@font-face {
font-family: 'IBMPlexMono';
font-display: swap;
font-family: "IBMPlexMono";
font-weight: 400;
font-style: italic;
src: url('fonts/IBMPlexMono-Italic.eot'); /* IE9 Compat Modes */
src: url('fonts/IBMPlexMono-Italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('fonts/IBMPlexMono-Italic.woff2') format('woff2'), /* Super Modern Browsers */
url('fonts/IBMPlexMono-Italic.woff') format('woff'), /* Pretty Modern Browsers */
url('fonts/IBMPlexMono-Italic.ttf') format('truetype'); /* Safari, Android, iOS */
src: url("fonts/IBMPlexMono-Italic.eot"); /* IE9 Compat Modes */
src: url("fonts/IBMPlexMono-Italic.eot?#iefix") format("embedded-opentype"),
/* IE6-IE8 */ url("fonts/IBMPlexMono-Italic.woff2") format("woff2"),
/* Super Modern Browsers */ url("fonts/IBMPlexMono-Italic.woff")
format("woff"),
/* Pretty Modern Browsers */ url("fonts/IBMPlexMono-Italic.ttf")
format("truetype"); /* Safari, Android, iOS */
}
134 changes: 134 additions & 0 deletions css/_print.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
@media print {
@page {
size: A4;
margin: 0;
}
* {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
html,
body {
font-size: 10px;
background: #ffffff;
overflow: visible;
}
.header {
position: static;
}
.header__breadcrumb {
font-weight: bold;
}
.nav-icon {
display: none;
}
.article {
padding-top: 15mm;
}
.post__footer {
padding-bottom: 15mm;
}
.post__time {
margin-bottom: 1.5rem;
}
.post__time .has-bg {
background: #ffffff;
color: #000000;
height: auto;
padding: 0;
}
.post__header,
.prose,
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5 .prose h6 {
break-after: avoid-page;
}
.prose img:not(.emoji) {
height: auto !important;
max-height: 5cm;
max-width: 5cm;
width: auto !important;
}
.prose .thumbs img {
max-width: 100%;
}
.prose img.alignleft,
.prose p .alignleft {
margin-left: 0;
padding-left: 0;
}
.prose img.alignright,
.prose p .alignright {
margin-right: 0;
padding-right: 0;
}
.article .prose blockquote,
.rainbow .article .prose blockquote {
border: 0.25mm solid #000000;
}
.prose hr {
height: 0.25mm;
}
.prose hr,
.rainbow .prose hr {
background-color: #000000;
color: #000000;
}
.rainbow .post__author a:active,
.rainbow .post__author a:focus,
.rainbow .post__author a:hover,
.rainbow .post__tag a:active,
.rainbow .post__tag a:focus,
.rainbow .post__tag a:hover,
.rainbow .prose a,
.rainbow .prose del,
.rainbow .prose ins,
.rainbow .prose s,
.rainbow .prose strike,
.rainbow .termindex a:active,
.rainbow .termindex a:focus,
.rainbow .termindex a:hover {
text-decoration-color: #000000;
}
.termindex {
margin-left: auto;
margin-right: auto;
max-width: 40rem;
}
.post-index__post-item {
border-top: 0.25mm solid #000000;
}
.post-index__post-item:last-child {
border-bottom: 0.25mm solid #000000;
}
.post-item__link {
background: #ffffff;
color: #000000;
height: 32px;
padding: 0;
}
.post-item__image {
mix-blend-mode: normal;
}
.post-item__image {
height: 24px;
}
.pagination .post-index,
.rpbt_shortcode .post-index {
padding-bottom: 0;
}
.pagination {
margin-bottom: 1cm;
padding-top: 1cm;
}
.infinite-loading,
.infinite-end {
display: none !important;
}
.pagination {
display: block !important;
}
}
4 changes: 4 additions & 0 deletions css/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@
white-space: pre-wrap;
}

.prose pre.nowrap code {
white-space: inherit;
}

.prose table {
display: block;
max-width: 100%;
Expand Down
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var browserSync = require("browser-sync").create();
var sass = require("gulp-sass");
var autoprefixer = require("gulp-autoprefixer");
var sourcemaps = require("gulp-sourcemaps");
var cssmin = require("gulp-cssmin");
var cleanCSS = require("gulp-clean-css");
var concat = require("gulp-concat");
var uglify = require("gulp-uglify");
var header = require("gulp-header");
Expand Down Expand Up @@ -56,7 +56,7 @@ gulp.task("sass", function() {
.pipe(sourcemaps.write())
.pipe(autoprefixer())
.pipe(concat("style.css"))
.pipe(cssmin())
.pipe(cleanCSS())
.pipe(header(banner, { pkg: pkg }))
.pipe(gulp.dest(themeDir));
});
Expand Down
1 change: 0 additions & 1 deletion notebook-ph/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,6 @@ function nph_get_list($posts = false) {
<?php endif; ?>
<li class="post-index__post-item post-item" style="--color:<?php echo $hsl; ?>;">
<a class="post-item__link" href="<?php the_permalink(); ?>"
aria-role="button"
aria-label="<?php printf(esc_attr__('Visit post published %s titled “%s”', 'notebook-ph'), get_the_date('d F Y'), get_the_title()); ?>">
<time class="post-item__time" datetime="<?php echo nph_date(true, false); ?>"><?php echo get_the_date('d M Y'); ?></time>
<span>&mdash;</span>
Expand Down
8 changes: 4 additions & 4 deletions notebook-ph/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

<header id="top" class="header js-header">
<div class="container">
<a class="visuallyhidden button" href="#main" aria-role="button"><?php esc_html_e('Skip to main content', 'notebook-ph'); ?></a>
<a class="visuallyhidden button" href="#main"><?php esc_html_e('Skip to main content', 'notebook-ph'); ?></a>
<?php if (class_exists('GA_Google_Analytics_Pro')) : ?>
<a class="visuallyhidden button" href="#ga-pro" aria-role="button"><?php esc_html_e('Skip to analytics settings', 'notebook-ph'); ?></a>
<a class="visuallyhidden button" href="#ga-pro"><?php esc_html_e('Skip to analytics settings', 'notebook-ph'); ?></a>
<?php endif; ?>
</div>
<h1 id="title" aria-label="<?php echo nph_archive_label(); ?>">
Expand Down Expand Up @@ -63,7 +63,7 @@

<?php get_search_form(); ?>

<div class="smallprint">
<div class="smallprint prose">
<?php if ($copyright) : ?>
<p class="copyright"><?php echo strip_tags($copyright, '<em><a><img><br>'); ?></p>
<?php endif; ?>
Expand All @@ -81,7 +81,7 @@
?>
</p>
</div>
<a href="#" class="visuallyhidden button js-close-menu" aria-role="button"><?php _e('Close menu', 'notebook-ph'); ?></a>
<a href="#" class="visuallyhidden button js-close-menu"><?php _e('Close menu', 'notebook-ph'); ?></a>
</div>

</details>
Expand Down
6 changes: 3 additions & 3 deletions notebook-ph/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<header class="post__header">
<?php if (get_post_type() == 'post') : ?>
<time class="dt-published post__time" datetime="<?php echo nph_date(true, false); ?>">
<a class="u-url has-bg" href="<?php the_permalink(); ?>" aria-label="<?php printf(esc_html__('View post published %s', 'notebook-ph'), get_the_date('l, j F Y')); ?>" aria-role="button">
<a class="u-url has-bg" href="<?php the_permalink(); ?>" aria-label="<?php printf(esc_html__('View post published %s', 'notebook-ph'), get_the_date('l, j F Y')); ?>">
<?php echo get_the_date('l, j F Y'); ?>
</a>
</time>
Expand All @@ -32,7 +32,7 @@
</h1>
</header>

<section class="prose">
<section class="prose e-content">
<?php the_content(esc_html__('Read more', 'notebook-ph')); ?>
</section>

Expand Down Expand Up @@ -73,7 +73,7 @@
<?php endif; ?>
<?php endif; ?>
<?php wp_link_pages(); ?>
<a href="#top" class="visuallyhidden button" aria-role="button"><?php _e('Back to top', 'notebook-ph'); ?></a>
<a href="#top" class="visuallyhidden button"><?php _e('Back to top', 'notebook-ph'); ?></a>

</footer>
</div>
Expand Down
15 changes: 1 addition & 14 deletions notebook-ph/library/cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,10 @@ function start_cleanup() {
add_filter('gallery_style', 'gallery_style');
}

function addBackPostFeed() {
echo '<link rel="alternate" type="application/rss+xml" title="' . get_bloginfo('name') . '" href="'.get_bloginfo('rss2_url').'" />';
}

function cleanup_head() {
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'feed_links_extra', 3);
remove_action('wp_head', 'feed_links', 2);
add_action('wp_head', 'addBackPostFeed');
remove_action ('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'index_rel_link');
remove_action('wp_head', 'parent_post_rel_link', 10, 0);
remove_action('wp_head', 'start_post_rel_link', 10, 0);
remove_action('wp_head', 'rel_canonical', 10, 0);
remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0);
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
remove_action('wp_head', 'wp_generator');
add_filter('style_loader_src', 'alter_wp_ver_css_js', 9999);
add_filter('script_loader_src', 'alter_wp_ver_css_js', 9999);
}
Expand Down
2 changes: 1 addition & 1 deletion notebook-ph/page-templates/no-title.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<?php endif; ?>
<?php endif; ?>
<?php wp_link_pages(); ?>
<a href="#top" class="visuallyhidden button" aria-role="button"><?php _e('Back to top', 'notebook-ph'); ?></a>
<a href="#top" class="visuallyhidden button"><?php _e('Back to top', 'notebook-ph'); ?></a>

</footer>
</div>
Expand Down
4 changes: 2 additions & 2 deletions notebook-ph/style.css

Large diffs are not rendered by default.

Loading

0 comments on commit c251cd6

Please sign in to comment.