Add print info and options to the Customizer & minify
This commit is contained in:
parent
e83144c4b1
commit
361a17f268
|
@ -1 +1 @@
|
|||
.marianne-admin h1,.marianne-admin h2,.marianne-admin h3{margin:1rem 0;padding:0 0 .25em}.marianne-admin .marianne-admin-block{background-color:#fff;border:1px solid #c3c4c7;box-shadow:0 1px 1px rgba(0,0,0,.04);padding:1rem 2rem;margin:2em 0}.marianne-admin .marianne-admin-header{border-bottom:1px solid #c3c4c7}.marianne-admin .marianne-admin-title{font-weight:900}.marianne-admin p{margin:1rem 0}.marianne-admin .list-inline{list-style-type:none;margin:0;padding:0}.marianne-admin .list-inline li{display:inline-block}.marianne-admin #update-theme,.marianne-admin .thickbox{color:#de0000}.marianne-admin #update-theme:focus,.marianne-admin #update-theme:hover,.marianne-admin .thickbox:focus,.marianne-admin .thickbox:hover{color:#900000}.marianne-admin-margins{margin:1rem 0}.marianne-admin #marianne-button-btc{background-color:#f7931a;border-color:#f7931a;color:#fff}.marianne-admin #marianne-button-btc:hover{background-color:#e8840c;border-color:#e8840c}#marianne-button-btc[aria-expanded=false]~#marianne-btc-donate-container{display:none}#marianne-button-btc[aria-expanded=true]~#marianne-btc-donate-container{display:block}#marianne-btc-donate{background-color:#f0f0f1;display:inline-block;margin-top:1rem;padding:1rem 2rem}.marianne-admin #btc-qr{display:block;margin:0 auto;max-width:100%}.marianne-admin #btc-address a{word-break:break-all}
|
||||
.marianne-admin h1,.marianne-admin h2,.marianne-admin h3{margin:1rem 0;padding:0 0 .25em}.marianne-admin .marianne-admin-block{background-color:#fff;border:1px solid #c3c4c7;box-shadow:0 1px 1px rgba(0,0,0,.04);padding:1rem 2rem;margin:2em 0}.marianne-admin .marianne-admin-header{border-bottom:1px solid #c3c4c7}.marianne-admin .marianne-admin-title{font-weight:900}.marianne-admin p{margin:1rem 0}.marianne-admin .list-inline{list-style-type:none;margin:0;padding:0}.marianne-admin .list-inline li{display:inline-block}.marianne-admin #update-theme,.marianne-admin .thickbox{color:#de0000}.marianne-admin #update-theme:focus,.marianne-admin #update-theme:hover,.marianne-admin .thickbox:focus,.marianne-admin .thickbox:hover{color:#900000}.marianne-admin-margins{margin:1rem 0}.marianne-admin #marianne-button-btc{background-color:#f7931a;border-color:#f7931a;color:#fff}.marianne-admin #marianne-button-btc:focus,.marianne-admin #marianne-button-btc:hover{background-color:#e8840c;border-color:#e8840c}#marianne-button-btc[aria-expanded=false]~#marianne-btc-donate-container{display:none}#marianne-button-btc[aria-expanded=true]~#marianne-btc-donate-container{display:block}#marianne-btc-donate{background-color:#f0f0f1;display:inline-block;margin-top:1rem;padding:1rem 2rem}.marianne-admin #btc-qr{display:block;margin:0 auto;max-width:100%}.marianne-admin #btc-address a{word-break:break-all}#marianne-admin-button-thanks{background-color:green;border-color:green;color:#fff}#marianne-admin-button-thanks:focus,#marianne-admin-button-thanks:hover{background-color:#006400;border-color:#006400}
|
||||
|
|
|
@ -1 +1 @@
|
|||
!function(n){"use strict";function t(t,e,i){t&&e&&i&&n.each(e,function(e,o){Array.isArray(t)?n.each(t,function(t,s){n(s).hasClass(o)&&n(s).removeClass(o),e===i&&n(s).addClass(o)}):(n(t).hasClass(o)&&n(t).removeClass(o),e===i&&n(t).addClass(o))})}function e(t,e,i){t&&e&&(!0===i?n(t).hasClass(e)||n(t).addClass(e):n(t).hasClass(e)&&n(t).removeClass(e))}n(document).ready(function(n){wp.customize("blogname",function(t){t.bind(function(t){0===n(".site-title").children("a").length?n(".site-title").html(t):n(".site-title a").html(t)})}),wp.customize("blogdescription",function(t){t.bind(function(t){n(".site-description").html(t)})}),wp.customize("colors_scheme",function(n){n.bind(function(n){t("body",{light:"color-scheme-light",dark:"color-scheme-dark"},n)})}),wp.customize("colors_link_hover",function(n){n.bind(function(n){t("body",{blue:"link-hover-blue",red:"link-hover-red",green:"link-hover-green",orange:"link-hover-orange",purple:"link-hover-purple"},n)})}),wp.customize("marianne_fonts_family",function(n){n.bind(function(n){t("body",{"sans-serif":"font-family-sans-serif",serif:"font-family-serif",monospace:"font-family-monospace"},n)})}),wp.customize("marianne_fonts_size",function(n){n.bind(function(n){t("body",{80:"font-size-80",90:"font-size-90",100:"font-size-100",110:"font-size-110",120:"font-size-120"},n)})}),wp.customize("marianne_fonts_text_shadow",function(n){n.bind(function(n){e("body","text-shadow",n)})}),wp.customize("marianne_content_text_align",function(n){n.bind(function(n){t([".entry-content",".comment-content"],{left:"text-align-left",center:"text-align-center",right:"text-align-right",justify:"text-align-justify"},n)})}),wp.customize("marianne_content_hyphens",function(n){n.bind(function(n){e(".entry-content","text-hyphens",n)})}),wp.customize("marianne_footer_text",function(t){t.bind(function(t){n("#site-footer-text").length?n("#site-footer-text").html(t):n(".site-footer").prepend('<div id="site-footer-text" class="site-footer-block">'+t+"</div>")})}),wp.customize("marianne_footer_mention",function(t){t.bind(function(t){!0===t?n("#site-footer-mention").show():n("#site-footer-mention").hide()})})})}(jQuery,wp.customize);
|
||||
!function(n){"use strict";function t(t,e,o){t&&e&&o&&n.each(e,function(e,i){Array.isArray(t)?n.each(t,function(t,s){n(s).hasClass(i)&&n(s).removeClass(i),e===o&&n(s).addClass(i)}):(n(t).hasClass(i)&&n(t).removeClass(i),e===o&&n(t).addClass(i))})}function e(t,e,o){t&&e&&(!0===o?n(t).hasClass(e)||n(t).addClass(e):n(t).hasClass(e)&&n(t).removeClass(e))}n(document).ready(function(n){wp.customize("blogname",function(t){t.bind(function(t){0===n(".site-title").children("a").length?n(".site-title").html(t):n(".site-title a").html(t)})}),wp.customize("blogdescription",function(t){t.bind(function(t){n(".site-description").html(t)})}),wp.customize("colors_scheme",function(n){n.bind(function(n){t("body",{light:"color-scheme-light",dark:"color-scheme-dark",auto:"color-scheme-auto"},n)})}),wp.customize("colors_link_hover",function(n){n.bind(function(n){t("body",{blue:"link-hover-blue",red:"link-hover-red",green:"link-hover-green",orange:"link-hover-orange",purple:"link-hover-purple"},n)})}),wp.customize("marianne_fonts_family",function(n){n.bind(function(n){t("body",{"sans-serif":"font-family-sans-serif",serif:"font-family-serif",monospace:"font-family-monospace"},n)})}),wp.customize("marianne_fonts_size",function(n){n.bind(function(n){t("body",{80:"font-size-80",90:"font-size-90",100:"font-size-100",110:"font-size-110",120:"font-size-120"},n)})}),wp.customize("marianne_fonts_text_shadow",function(n){n.bind(function(n){e("body","text-shadow",n)})}),wp.customize("marianne_content_text_align",function(n){n.bind(function(n){t([".entry-content",".comment-content"],{left:"text-align-left",center:"text-align-center",right:"text-align-right",justify:"text-align-justify"},n)})}),wp.customize("marianne_content_hyphens",function(n){n.bind(function(n){e(".entry-content","text-hyphens",n)})}),wp.customize("marianne_footer_text",function(t){t.bind(function(t){n("#site-footer-text").length?n("#site-footer-text").html(t):n(".site-footer").prepend('<div id="site-footer-text" class="site-footer-block">'+t+"</div>")})}),wp.customize("marianne_footer_mention",function(t){t.bind(function(t){!0===t?n("#site-footer-mention").show():n("#site-footer-mention").hide()})}),wp.customize("marianne_social_style",function(t){t.bind(function(t){!0===t?n("#site-footer-mention").show():n("#site-footer-mention").hide()})})})}(jQuery,wp.customize);
|
||||
|
|
|
@ -24,7 +24,14 @@ if ( post_password_required() ) {
|
|||
<hr class="separator">
|
||||
|
||||
<?php if ( have_comments() ) : ?>
|
||||
<div id="comments" class="comments-area">
|
||||
<?php
|
||||
$marianne_comment_class = 'comments-area';
|
||||
|
||||
if ( true === marianne_get_theme_mod( 'marianne_print_comments_hide' ) ) {
|
||||
$marianne_comment_class .= ' comments-print-hide';
|
||||
}
|
||||
?>
|
||||
<div id="comments"<?php marianne_add_class( $marianne_comment_class ); ?>>
|
||||
<?php
|
||||
$marianne_comment_title = sprintf(
|
||||
esc_html(
|
||||
|
|
|
@ -101,6 +101,14 @@ if ( ! function_exists( 'marianne_customize_register' ) ) {
|
|||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_section(
|
||||
'marianne_print',
|
||||
array(
|
||||
'title' => __( 'Print Settings', 'marianne' ),
|
||||
'description' => __( 'These settings only apply to the printing of your pages.', 'marianne' ),
|
||||
)
|
||||
);
|
||||
|
||||
// Adds live preview to the site's name and description.
|
||||
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
|
||||
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
|
||||
|
@ -397,6 +405,38 @@ if ( ! function_exists( 'marianne_customize_register' ) ) {
|
|||
'type' => 'url',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_print',
|
||||
'id' => 'comments_hide',
|
||||
'title' => __( 'Hide comments.', 'marianne' ),
|
||||
'description' => __( 'Check to hide comments when priting a post or page. In any case, the comment form will be hidden. Default: checked.', 'marianne' ),
|
||||
'type' => 'checkbox',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_print',
|
||||
'id' => 'widgets_hide',
|
||||
'title' => __( 'Hide widgets.', 'marianne' ),
|
||||
'description' => __( 'Check to hide your widgets when priting a post or page. Default: checked.', 'marianne' ),
|
||||
'type' => 'checkbox',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_print',
|
||||
'id' => 'url',
|
||||
'title' => __( 'Display URL of links.', 'marianne' ),
|
||||
'description' => __( 'URLs will be visible on print so that readers can visit them. Default: checked.', 'marianne' ),
|
||||
'type' => 'checkbox',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_print',
|
||||
'id' => 'info',
|
||||
'title' => __( 'Display information related to printing.', 'marianne' ),
|
||||
'description' => __( 'Adds the date the post or page was retrieved and the short link to access the content. Default: checked.', 'marianne' ),
|
||||
'type' => 'checkbox',
|
||||
);
|
||||
|
||||
/**
|
||||
* Finally, adds settings and controls to the Theme Customizer.
|
||||
*
|
||||
|
@ -599,6 +639,12 @@ if ( ! function_exists( 'marianne_options_default' ) ) {
|
|||
'marianne_social_phone_type' => 'classic',
|
||||
'marianne_social_rss' => false,
|
||||
'marianne_social_twitch' => '',
|
||||
|
||||
// Print Settings.
|
||||
'marianne_print_comments_hide' => true,
|
||||
'marianne_print_info' => true,
|
||||
'marianne_print_url' => true,
|
||||
'marianne_print_widgets_hide' => true,
|
||||
);
|
||||
|
||||
$option = sanitize_key( $option );
|
||||
|
|
|
@ -22,7 +22,7 @@ if ( ! function_exists( 'marianne_logo' ) ) {
|
|||
function marianne_logo( $class = 'site-logo' ) {
|
||||
if ( has_custom_logo() ) {
|
||||
?>
|
||||
<div class="<?php echo esc_attr( $class ); ?>">
|
||||
<div<?php marianne_add_class( $class ); ?>>
|
||||
<?php the_custom_logo(); ?>
|
||||
</div>
|
||||
<?php
|
||||
|
@ -47,17 +47,17 @@ if ( ! function_exists( 'marianne_site_title' ) ) {
|
|||
?>
|
||||
|
||||
<?php if ( is_front_page() && ! is_paged() ) : ?>
|
||||
<h1 class="<?php echo esc_attr( $class ); ?>">
|
||||
<h1<?php marianne_add_class( $class ); ?>>
|
||||
<?php bloginfo( 'name' ); ?>
|
||||
</h1>
|
||||
<?php elseif ( is_front_page() || is_home() ) : ?>
|
||||
<h1 class="<?php echo esc_attr( $class ); ?>">
|
||||
<h1<?php marianne_add_class( $class ); ?>>
|
||||
<a href="<?php echo esc_url( home_url() ); ?>">
|
||||
<?php bloginfo( 'name' ); ?>
|
||||
</a>
|
||||
</h1>
|
||||
<?php else : ?>
|
||||
<p class="<?php echo esc_attr( $class ); ?>">
|
||||
<p<?php marianne_add_class( $class ); ?>>
|
||||
<a href="<?php echo esc_url( home_url() ); ?>">
|
||||
<?php bloginfo( 'name' ); ?>
|
||||
</a>
|
||||
|
@ -85,11 +85,11 @@ if ( ! function_exists( 'marianne_site_description' ) ) {
|
|||
?>
|
||||
|
||||
<?php if ( is_front_page() || is_home() ) : ?>
|
||||
<h2 class="<?php echo esc_attr( $class ); ?>">
|
||||
<h2<?php marianne_add_class( $class ); ?>>
|
||||
<?php bloginfo( 'description' ); ?>
|
||||
</h2>
|
||||
<?php else : ?>
|
||||
<p class="<?php echo esc_attr( $class ); ?>">
|
||||
<p<?php marianne_add_class( $class ); ?>>
|
||||
<?php bloginfo( 'description' ); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
@ -107,7 +107,7 @@ if ( ! function_exists( 'marianne_menu_primary' ) ) {
|
|||
function marianne_menu_primary() {
|
||||
if ( has_nav_menu( 'primary' ) ) {
|
||||
?>
|
||||
<nav id="menu-primary-container" role="navigation" aria-label="<?php echo esc_attr__( 'Primary Menu', 'marianne' ); ?>">
|
||||
<nav id="menu-primary-container" class="button" role="navigation" aria-label="<?php echo esc_attr__( 'Primary Menu', 'marianne' ); ?>">
|
||||
<button id="menu-mobile-button" onclick="marianneExpandMobileMenu(this)"><?php esc_html_e( 'Menu', 'marianne' ); ?></button>
|
||||
|
||||
<?php
|
||||
|
@ -142,7 +142,7 @@ if ( ! function_exists( 'marianne_the_date' ) ) {
|
|||
*/
|
||||
function marianne_the_date( $class = 'entry-date' ) {
|
||||
?>
|
||||
<time class="<?php echo esc_attr( $class ); ?>" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php the_date(); ?></time>
|
||||
<time<?php marianne_add_class( $class ); ?> datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php the_date(); ?></time>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ if ( ! function_exists( 'marianne_loop_navigation' ) ) {
|
|||
|
||||
if ( $nav_prev || $nav_next ) {
|
||||
?>
|
||||
<div class="<?php echo esc_attr( $class ); ?>">
|
||||
<div<?php marianne_add_class( $class ); ?>>
|
||||
<?php if ( $nav_prev ) { ?>
|
||||
<a href="<?php echo esc_url( get_previous_posts_page_link() ); ?>">
|
||||
<?php esc_html_e( '‹ Previous page', 'marianne' ); ?>
|
||||
|
@ -255,7 +255,7 @@ if ( ! function_exists( 'marianne_the_categories' ) ) {
|
|||
$cat_count = count( $categories );
|
||||
$i = 0;
|
||||
?>
|
||||
<ul class="<?php echo esc_attr( $class ); ?>">
|
||||
<ul<?php marianne_add_class( $class ); ?>>
|
||||
<?php foreach ( $categories as $category ) : ?>
|
||||
<li>
|
||||
<a href="<?php echo esc_url( get_category_link( $category->cat_ID ) ); ?>"><?php echo esc_html( $category->cat_name ); ?></a>
|
||||
|
@ -291,12 +291,6 @@ if ( ! function_exists( 'marianne_the_post_thumbnail' ) ) {
|
|||
*/
|
||||
function marianne_the_post_thumbnail( $class = '', $args = array() ) {
|
||||
if ( has_post_thumbnail() ) {
|
||||
|
||||
// If a class is set, create the attribute with its value.
|
||||
if ( $class ) {
|
||||
$class = ' class="' . esc_attr( $class ) . '"';
|
||||
}
|
||||
|
||||
// Options available.
|
||||
$allowed_options = array( 'link', 'caption' );
|
||||
|
||||
|
@ -310,7 +304,7 @@ if ( ! function_exists( 'marianne_the_post_thumbnail' ) ) {
|
|||
// Put the option(s) defined with $args in the array $options.
|
||||
$options = array();
|
||||
?>
|
||||
<figure<?php echo $class; ?>>
|
||||
<figure<?php marianne_add_class( $class ); ?>>
|
||||
<?php
|
||||
echo $before;
|
||||
|
||||
|
@ -340,7 +334,10 @@ if ( ! function_exists( 'marianne_add_class' ) ) {
|
|||
*
|
||||
* @since Marianne 1.3
|
||||
*/
|
||||
function marianne_add_class( $classes = '' ) {
|
||||
function marianne_add_class( $classes = '', $space_before = true ) {
|
||||
if ( true === $space_before ) {
|
||||
echo ' ';
|
||||
}
|
||||
echo 'class="' . esc_attr( $classes ) . '"';
|
||||
}
|
||||
}
|
||||
|
@ -675,3 +672,54 @@ if ( ! function_exists( 'marianne_social_link' ) ) {
|
|||
endif;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'marianne_print_info' ) ) {
|
||||
/**
|
||||
* Displays print information on posts and pages on print only.
|
||||
*
|
||||
* @param string $class The class of the title.
|
||||
* To set multiple classes,
|
||||
* separate them with a space.
|
||||
* Example: $class = "class-1 class-2".
|
||||
*/
|
||||
function marianne_print_info( $class = 'text-secondary' ) {
|
||||
$today_date = current_time( get_option( 'date_format' ) );
|
||||
$today_time = current_time( get_option( 'time_format' ) );
|
||||
?>
|
||||
<div id="print-info"<?php marianne_add_class( $class ); ?>>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %1$s: The retrieve date. %1$s: The retrieve time. */
|
||||
esc_html_x( 'Retrieved %1$s at %2$s (website time).', 'Use only on print.', 'marianne' ),
|
||||
esc_html( $today_date ),
|
||||
esc_html( $today_time )
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
$site_short_url = wp_get_shortlink();
|
||||
$site_scheme = parse_url( $site_short_url, PHP_URL_SCHEME ) . '://';
|
||||
$site_scheme_len = strlen( $site_scheme );
|
||||
|
||||
$site_short_url = substr_replace( $site_short_url, '', 0, $site_scheme_len );
|
||||
|
||||
if ( $site_short_url ) :
|
||||
?>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: The short link of the post. */
|
||||
esc_html_x( 'Available at: %s', 'Use only on print.', 'marianne' ),
|
||||
esc_html( $site_short_url )
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,14 @@ if ( is_active_sidebar( 'widgets' ) ) {
|
|||
?>
|
||||
<hr class="separator">
|
||||
|
||||
<aside id="secondary" class="site-secondary" role="complementary">
|
||||
<?php
|
||||
$marianne_widgets_class = 'site-secondary';
|
||||
|
||||
if ( true === marianne_get_theme_mod( 'marianne_print_widgets_hide' ) ) {
|
||||
$marianne_widgets_class .= ' print-widgets-hide';
|
||||
}
|
||||
?>
|
||||
<aside id="secondary"<?php marianne_add_class( $marianne_widgets_class ); ?> role="complementary">
|
||||
<?php dynamic_sidebar( 'widgets' ); ?>
|
||||
</aside>
|
||||
<?php
|
||||
|
|
244
style.css
244
style.css
|
@ -35,7 +35,6 @@ Text Domain: marianne
|
|||
--color-light-purple: #800080;
|
||||
--color-dark-purple: #9a389a;
|
||||
|
||||
--color-border: #aaa;
|
||||
--color-border: #aaa;
|
||||
|
||||
--color-light-background: #fff;
|
||||
|
@ -254,6 +253,31 @@ section {
|
|||
*/
|
||||
|
||||
/* Text */
|
||||
.text-secondary {
|
||||
color: var(--color-body-text-secondary);
|
||||
}
|
||||
.has-small-font-size {
|
||||
font-size: .8em;
|
||||
}
|
||||
.has-large-font-size {
|
||||
font-size: 2em;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.has-drop-cap:not(:focus)::first-letter {
|
||||
float: left;
|
||||
font-size: 5em;
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
margin: 0 .1em 0 0;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.has-drop-cap:not(:focus)::after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* Links */
|
||||
a {
|
||||
background-color: transparent; /* @source normalize.css */
|
||||
color: inherit;
|
||||
|
@ -267,12 +291,6 @@ a:focus {
|
|||
text-decoration: inherit;
|
||||
transition: all .2s ease-in-out;
|
||||
}
|
||||
figure {
|
||||
margin: 1em 0;
|
||||
}
|
||||
.text-secondary {
|
||||
color: var(--color-body-text-secondary);
|
||||
}
|
||||
|
||||
/* Titles */
|
||||
h1,
|
||||
|
@ -302,7 +320,7 @@ h6 {
|
|||
font-size: .8em;
|
||||
}
|
||||
|
||||
/* Paragraphs */
|
||||
/* Entry Content */
|
||||
strong,
|
||||
b {
|
||||
font-weight: 700;
|
||||
|
@ -382,31 +400,22 @@ kbd {
|
|||
padding: .1em;
|
||||
text-indent: 0;
|
||||
}
|
||||
.has-drop-cap:not(:focus)::first-letter {
|
||||
float: left;
|
||||
font-size: 5em;
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
margin: 0 .1em 0 0;
|
||||
text-transform: uppercase;
|
||||
dt {
|
||||
font-variant: small-caps;
|
||||
}
|
||||
.has-drop-cap:not(:focus)::after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
.has-small-font-size {
|
||||
font-size: .8em;
|
||||
}
|
||||
.has-large-font-size {
|
||||
font-size: 2em;
|
||||
line-height: 1.2;
|
||||
dd {
|
||||
margin: 0 0 1em 2em;
|
||||
}
|
||||
|
||||
/* Layout elements */
|
||||
/* Blocks */
|
||||
.wp-block-group {
|
||||
padding: 1em 2em;
|
||||
}
|
||||
.wp-block-cover {
|
||||
display: block;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.alignwide {
|
||||
width: 75vw;
|
||||
margin-top: 2em;
|
||||
|
@ -421,7 +430,7 @@ kbd {
|
|||
margin-bottom: 2em;
|
||||
margin-left: calc(-100vw / 2 + 480px / 2);
|
||||
}
|
||||
@media all and (max-width: 480px) {
|
||||
@media all and (max-width: 500px) {
|
||||
.alignwide,
|
||||
.alignfull {
|
||||
width: 100%;
|
||||
|
@ -470,14 +479,6 @@ td {
|
|||
padding: .4em;
|
||||
}
|
||||
|
||||
/* Definitions */
|
||||
dt {
|
||||
font-variant: small-caps;
|
||||
}
|
||||
dd {
|
||||
margin: 0 0 1em 2em;
|
||||
}
|
||||
|
||||
/* Separators */
|
||||
hr {
|
||||
border-top: 1px solid var(--color-border);
|
||||
|
@ -496,7 +497,7 @@ hr {
|
|||
width: 50%;
|
||||
}
|
||||
|
||||
/* Feather Icons */
|
||||
/* Feather Icons for Social Links */
|
||||
.site-social {
|
||||
margin: 1em auto;
|
||||
}
|
||||
|
@ -550,12 +551,8 @@ hr {
|
|||
}
|
||||
|
||||
/* Images */
|
||||
.image-circular,
|
||||
.image-circular .custom-logo {
|
||||
border-radius: 50%;
|
||||
}
|
||||
figure {
|
||||
margin: 0;
|
||||
margin: 1em 0;
|
||||
}
|
||||
img {
|
||||
border-style: none; /* @source normalize.css */
|
||||
|
@ -596,11 +593,6 @@ img {
|
|||
height: auto;
|
||||
margin: 0 0 1em;
|
||||
}
|
||||
.wp-block-cover {
|
||||
display: block;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
/* Forms */
|
||||
button,
|
||||
|
@ -695,6 +687,10 @@ button:focus {
|
|||
.custom-logo-link {
|
||||
display: inline-block;
|
||||
}
|
||||
.image-circular,
|
||||
.image-circular .custom-logo {
|
||||
border-radius: 50%;
|
||||
}
|
||||
.site-title {
|
||||
font-size: 1.5em;
|
||||
font-weight: 900;
|
||||
|
@ -705,9 +701,6 @@ button:focus {
|
|||
font-weight: 400;
|
||||
margin: .5em 0 0;
|
||||
}
|
||||
.site-header-image-container {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
/* Primary menu */
|
||||
#menu-primary-container {
|
||||
|
@ -772,24 +765,16 @@ button:focus {
|
|||
}
|
||||
|
||||
@media (hover: none), (max-width: 500px) {
|
||||
#menu-primary > .menu-item:not(.menu-item-has-children) > a:hover::before,
|
||||
#menu-primary > .menu-item > a:focus::before {
|
||||
visibility: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
.navigation-menu .menu-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
#menu-mobile-button {
|
||||
background-color: #eaeaea;
|
||||
border: 1px solid #000;
|
||||
color: inherit;
|
||||
display: block;
|
||||
}
|
||||
#menu-mobile-button[aria-expanded="true"] {
|
||||
border-color: var(--color-link-hover, #0057B7);
|
||||
border-color: var(--color-link-hover);
|
||||
background-color: transparent;
|
||||
color: var(--color-link-hover, #0057B7);
|
||||
color: var(--color-link-hover);
|
||||
}
|
||||
#menu-mobile-button ~ #menu-primary {
|
||||
display: none;
|
||||
|
@ -802,9 +787,6 @@ button:focus {
|
|||
margin-top: .5em;
|
||||
padding-left: .5em;
|
||||
}
|
||||
#menu-primary > .menu-item:not(.menu-item-has-children) > a:hover::before {
|
||||
visibility: hidden;
|
||||
}
|
||||
#menu-primary .menu-item {
|
||||
border: 0;
|
||||
display: block;
|
||||
|
@ -859,7 +841,6 @@ button:focus {
|
|||
}
|
||||
#menu-primary .sub-menu > .menu-item > a:hover,
|
||||
#menu-primary .sub-menu > .menu-item > a:focus {
|
||||
background-color: transparent;
|
||||
color: var(--color-link-hover);
|
||||
}
|
||||
}
|
||||
|
@ -910,17 +891,8 @@ button:focus {
|
|||
}
|
||||
|
||||
/**
|
||||
* Posts, pages, archives…
|
||||
* Posts, pages, archives and other pages
|
||||
*/
|
||||
.comment-content::before,
|
||||
.comment-content::after,
|
||||
.entry-content::before,
|
||||
.entry-content::after {
|
||||
clear: both;
|
||||
content: "";
|
||||
display: table;
|
||||
table-layout: fixed;
|
||||
}
|
||||
.entry-meta {
|
||||
font-size: .9em;
|
||||
margin: .5em 0;
|
||||
|
@ -940,6 +912,15 @@ button:focus {
|
|||
.page-content p {
|
||||
margin: 1em 0;
|
||||
}
|
||||
.entry-content::before,
|
||||
.entry-content::after,
|
||||
.comment-content::before,
|
||||
.comment-content::after {
|
||||
clear: both;
|
||||
content: "";
|
||||
display: table;
|
||||
table-layout: fixed;
|
||||
}
|
||||
.entry-content,
|
||||
.comment-content {
|
||||
line-height: 1.4;
|
||||
|
@ -975,9 +956,6 @@ button:focus {
|
|||
.post-date {
|
||||
display: block;
|
||||
}
|
||||
.post-excerpt {
|
||||
font-weight: 700;
|
||||
}
|
||||
.post-thumbnail {
|
||||
margin: 1em auto;
|
||||
}
|
||||
|
@ -1002,20 +980,19 @@ button:focus {
|
|||
.page-content .post-page-numbers {
|
||||
text-decoration: none;
|
||||
}
|
||||
.post-page-numbers:hover {
|
||||
background-color: #000;
|
||||
border-color: #000;
|
||||
color: #fff;
|
||||
}
|
||||
.post-nav-links .current {
|
||||
background-color: #000;
|
||||
border-color: #000;
|
||||
color: #fff;
|
||||
background-color: var(--color-input-background);
|
||||
border: 1px solid var(--color-border);
|
||||
box-sizing: border-box;
|
||||
color: var(--color-input-text);
|
||||
|
||||
}
|
||||
.post-page-numbers:hover {
|
||||
border-color: var(--color-links-hover);
|
||||
}
|
||||
.post-navigation .nav-links {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1043,7 +1020,7 @@ button:focus {
|
|||
list-style: inherit;
|
||||
}
|
||||
.bypostauthor .comment-content {
|
||||
background-color: #dadada;
|
||||
background-color: var(--color-input-background);
|
||||
}
|
||||
.reply {
|
||||
color: var(--color-body-text-secondary);
|
||||
|
@ -1142,7 +1119,7 @@ button:focus {
|
|||
color: var(--color-body-text-secondary);
|
||||
}
|
||||
.wp-calendar-table tbody td a {
|
||||
color: #000;
|
||||
color: var(--color-body-text-primary);
|
||||
font-weight: 700;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
@ -1182,7 +1159,7 @@ button:focus {
|
|||
word-wrap: normal !important;
|
||||
}
|
||||
.screen-reader-text:focus {
|
||||
background-color: #eee;
|
||||
background-color: var(--color-input-background);
|
||||
clip: auto !important;
|
||||
clip-path: none;
|
||||
color: #444;
|
||||
|
@ -1198,6 +1175,9 @@ button:focus {
|
|||
z-index: 100000;
|
||||
}
|
||||
|
||||
/**
|
||||
* On small screens
|
||||
*/
|
||||
@media all and (max-width: 500px) {
|
||||
.site {
|
||||
margin-right: 1em;
|
||||
|
@ -1224,25 +1204,85 @@ button:focus {
|
|||
}
|
||||
|
||||
/**
|
||||
* Styles for printing.
|
||||
* On print
|
||||
*/
|
||||
#print-info {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media print {
|
||||
#menu-primary-container {
|
||||
display: none;
|
||||
@page {
|
||||
margin: 2cm;
|
||||
}
|
||||
.comment-respond {
|
||||
body {
|
||||
font-size: 12pt !important;
|
||||
}
|
||||
#print-info {
|
||||
border-left: 1px solid var(--color-border);
|
||||
display: block;
|
||||
font-size: .9em;
|
||||
margin: 2em 0;
|
||||
padding-left: 1em;
|
||||
}
|
||||
#print-info p {
|
||||
margin: 0 0 .5em;
|
||||
}
|
||||
#print-info p:last-of-type {
|
||||
margin: .5em 0 0;
|
||||
}
|
||||
|
||||
/* Defining all page breaks */
|
||||
.entry-content p {
|
||||
orphans: 2;
|
||||
widows: 2;
|
||||
}
|
||||
a {
|
||||
break-inside: avoid;
|
||||
}
|
||||
blockquote {
|
||||
break-inside: avoid;
|
||||
}
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
break-after: avoid;
|
||||
break-inside: avoid;
|
||||
}
|
||||
img {
|
||||
break-inside: avoid;
|
||||
break-after: avoid;
|
||||
}
|
||||
table,
|
||||
pre {
|
||||
break-inside: avoid;
|
||||
}
|
||||
ul,
|
||||
ol,
|
||||
dl {
|
||||
break-before: avoid;
|
||||
}
|
||||
|
||||
/* Handling link behaviour */
|
||||
.print-url-show a[href^=http]:after,
|
||||
.print-url-show a[href^=http]:after {
|
||||
content: " [" attr(href) "] ";
|
||||
}
|
||||
|
||||
/* Hiding unnecessary elements */
|
||||
.site-social,
|
||||
#menu-primary-container,
|
||||
.entry-links,
|
||||
.comments-print-hide,
|
||||
.comment-respond,
|
||||
.separator,
|
||||
.print-widgets-hide,
|
||||
#menu-footer {
|
||||
display: none;
|
||||
}
|
||||
.comments-area {
|
||||
margin-top: 4em;
|
||||
}
|
||||
.separator {
|
||||
display: none;
|
||||
}
|
||||
.widget_search {
|
||||
display: none;
|
||||
}
|
||||
#menu-footer-container {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -24,6 +24,10 @@
|
|||
if ( false !== marianne_get_theme_mod( 'marianne_content_hyphens' ) ) {
|
||||
$marianne_single_classes .= ' text-hyphens';
|
||||
}
|
||||
|
||||
if ( true === marianne_get_theme_mod( 'marianne_print_url' ) ) {
|
||||
$marianne_single_classes .= ' print-url-show';
|
||||
}
|
||||
?>
|
||||
<section <?php marianne_add_class( $marianne_single_classes ); ?>>
|
||||
<?php
|
||||
|
@ -32,4 +36,10 @@
|
|||
wp_link_pages();
|
||||
?>
|
||||
</section>
|
||||
|
||||
<?php if ( true === marianne_get_theme_mod( 'marianne_print_info' ) ) : ?>
|
||||
<footer class="entry-footer post-footer">
|
||||
<?php marianne_print_info(); ?>
|
||||
</footer>
|
||||
<?php endif; ?>
|
||||
</article>
|
||||
|
|
|
@ -36,6 +36,10 @@
|
|||
if ( false !== marianne_get_theme_mod( 'marianne_content_hyphens' ) ) {
|
||||
$marianne_single_classes .= ' text-hyphens';
|
||||
}
|
||||
|
||||
if ( true === marianne_get_theme_mod( 'marianne_print_url' ) ) {
|
||||
$marianne_single_classes .= ' print-url-show';
|
||||
}
|
||||
?>
|
||||
<section <?php marianne_add_class( $marianne_single_classes ); ?>>
|
||||
<?php
|
||||
|
@ -47,7 +51,7 @@
|
|||
|
||||
<?php if ( has_tag() || true === marianne_get_theme_mod( 'marianne_post_nav' ) ) : ?>
|
||||
<footer class="entry-footer post-footer">
|
||||
<div class="text-secondary">
|
||||
<div class="entry-tags post-tags text-secondary">
|
||||
<?php the_tags(); ?>
|
||||
</div>
|
||||
|
||||
|
@ -58,25 +62,33 @@
|
|||
|
||||
if ( $marianne_newer_post || $marianne_older_post ) {
|
||||
?>
|
||||
<p><strong><?php esc_html_e( 'Continue reading', 'marianne' ); ?></strong></p>
|
||||
<div class="entry-links post-links">
|
||||
<p><strong><?php esc_html_e( 'Continue reading', 'marianne' ); ?></strong></p>
|
||||
|
||||
<nav class="post-navigation">
|
||||
<div class="nav-links">
|
||||
<?php
|
||||
if ( $marianne_newer_post ) {
|
||||
next_post_link( '%link', '‹ %title' );
|
||||
}
|
||||
<nav class="post-navigation">
|
||||
<div class="nav-links">
|
||||
<?php
|
||||
if ( $marianne_newer_post ) {
|
||||
next_post_link( '%link', '‹ %title' );
|
||||
}
|
||||
|
||||
if ( $marianne_older_post ) {
|
||||
previous_post_link( '%link', '%title ›' );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</nav>
|
||||
if ( $marianne_older_post ) {
|
||||
previous_post_link( '%link', '%title ›' );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ( true === marianne_get_theme_mod( 'marianne_print_info' ) ) {
|
||||
marianne_print_info();
|
||||
}
|
||||
?>
|
||||
</footer>
|
||||
<?php endif; ?>
|
||||
</article>
|
||||
|
|
Loading…
Reference in New Issue