Commit 8103bfa9 authored by lucha's avatar lucha

[auto] theme: vanilla 2.0.1

parent 6d14d805
......@@ -6,14 +6,11 @@ import ContentSpacer from './AppLayout/ContentSpacer';
import './skip-link-focus-fix';
$(function() {
$("[data-drawer]").each(function(){
new Drawer($(this));
});
});
$(function() {
let $toplevelMenuItems = $('.primary-menu .menu-item-has-children, .primary-menu .page_item_has_children');
......@@ -53,10 +50,9 @@ $(function() {
$(function() {
let $appLayout = $(".app-layout");
$(window).on( 'load resize', () => {
$appLayout.removeClass("app-layout--disable");
$appLayout.find(".app-layout__header").removeClass("app-layout__header--static");
} );
new HeaderClassController( $appLayout, "app-layout__header--fixed", 46 );
new HeaderEscaper( $appLayout, "app-layout__header--escape", 64 );
......
......@@ -22,16 +22,30 @@ h2 {
box-sizing: border-box;
font-size: 1.7em;
margin: 1em 0;
border-top: 1px solid rgba(0, 0, 0, .1);
padding-top: 1em;
&::before {
content '';
border-top: 1px solid currentColor;
opacity: 0.1;
display: block;
padding-bottom: 1em;
}
}
h3 {
font-weight: 600;
font-size: 1.38em;
border-top: 1px solid rgba(0, 0, 0, .05);
padding-top: 1em;
&::before {
content '';
border-top: 1px solid currentColor;
opacity: 0.06;
display: block;
padding-bottom: 1em;
}
}
......
// List
//
// Markup:
......@@ -21,7 +20,16 @@ ul {
padding-left: 1.5em;
}
dl {
margin-top: 1em;
}
dt {
margin-top: 1em;
font-weight: bolder;
}
dd {
margin-left: 1.5em;
margin-left: 2em;
}
......@@ -6,6 +6,7 @@
table {
width: 100%;
margin 1em 0;
}
thead {
......@@ -39,4 +40,4 @@ td {
th {
font-weight: bold;
}
\ No newline at end of file
}
@font-face {
font-family: "Cross Yu Gothic";
font-weight: 300;
src: local("YuGothic-Regular"), local("Yu Gothic"), local("YuGothic");
}
@font-face {
font-family: "Cross Yu Gothic";
font-weight: 400;
src: local("YuGothic-Medium"), local("Yu Gothic Medium"), local("YuGothic-Regular"), local("Yu Gothic"), local("YuGothic");
}
@font-face {
font-family: "Cross Yu Gothic";
font-weight: 500;
src: local("YuGothic-Medium"), local("Yu Gothic Medium"), local("YuGothic-Regular"), local("Yu Gothic"), local("YuGothic");
}
@font-face {
font-family: "Cross Yu Gothic";
font-weight: 600;
src: local("YuGothic-Bold"), local("Yu Gothic");
}
@font-face {
font-family: "Cross Yu Gothic";
font-weight: 700;
src: local("YuGothic-Bold"), local("Yu Gothic");
}
html {
font-size: percentage(10/16);
font-size: percentage(10 / 16);
min-height: 100%;
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Helvetica', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Roboto', 'Droid Sans', '游ゴシック Medium', meiryo, sans-serif;
font-family: 'Avenir', -apple-system, BlinkMacSystemFont, 'Cross Yu Gothic', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Helvetica Neue', 'Helvetica', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Roboto', 'Droid Sans', '游ゴシック Medium', meiryo, sans-serif;
font-size: 1.4em;
+medium-up() {
......@@ -17,8 +47,6 @@ body {
line-height: 1.75;
overflow-wrap: break-word;
word-wrap: break-word;
//letter-spacing: .05rem;
//text-align: justify;
-webkit-font-smoothing: subpixel-antialiased;
}
......@@ -35,5 +63,21 @@ pre {
background: #EEE;
margin: 1.2em 0;
padding: 1em;
line-height: 1.5
}
\ No newline at end of file
line-height: 1.5;
}
code,kbd {
background: #EEE;
padding: 0.2em 0.4em;
}
blockquote {
margin: 1em 0;
padding 0 2em;
border-left: 1px solid currentColor;
cite {
display: block;
text-align: right;
}
}
.archive-header {
gutter( padding-top, 1 );
gutter( padding-bottom, 1 );
gutter( padding-top );
gutter( padding-bottom );
&__title {
font-size: 1em;
......@@ -12,4 +12,4 @@
margin: 0;
font-size: 0.8em;
}
}
\ No newline at end of file
}
......@@ -73,7 +73,7 @@
}
*:last-child {
margin-bottom:0
margin-bottom: 0;
}
}
......@@ -81,11 +81,15 @@
font-size: 0.8em;
}
textarea {
width: 100%;
}
}
.pingback {
.comment-body {
padding-left: 0;
font-size: 0.9em;
}
}
\ No newline at end of file
}
......@@ -36,10 +36,14 @@
font-size: 2em;
line-height: 1.6;
margin: 0;
padding 0
padding: 0;
&::before {
display none;
}
}
&__content {
gutter( margin-bottom );
}
}
\ No newline at end of file
}
......@@ -10,12 +10,12 @@ $grid-gutter ?= 20px;
justify-content: space-around;
&-item {
margin: 0 0 $grid-gutter;
margin: 0;
box-sizing: border-box;
position: relative;
flex-grow: 0;
flex-shrink: 0;
padding: 0 ($grid-gutter / 2);
padding: ($grid-gutter / 2);
}
&-icon {
......@@ -25,21 +25,22 @@ $grid-gutter ?= 20px;
}
}
&-caption {
margin: 0.6em 0 0.2em;
font-size: 0.9em;
}
gallery-item-width($width) {
flex-basis: $width;
}
@media $medium-up {
for $i in (1..9) {
&.gallery-columns-{$i} &-item {
gallery-item-width(percentage(1 /$i));
}
}
}
}
......
$app-layout-use-escape = true;
.app-layout {
//box-sizing border-box;
//display: flex;
//width: 100%;
//min-height: 100vh;
//flex-direction: column;
background-color: inherit
&.app-layout--disable &__header {
position: relative !important;
top: 0 !important;
padding-top: 0px !important;
}
//
//&.app-layout--disable &__content {
// padding-top: 0px !important;
//}
background-color: inherit;
&__header {
background-color: #FFF;
......@@ -26,13 +10,18 @@ $app-layout-use-escape = true;
left: 0;
top: 0;
&--static {
position: relative;
}
//for WordPress
.admin-bar & {
padding-top: 46px;
position: absolute;
&--fixed {
padding-top: 0px;
padding-top: 0;
position: fixed;
}
......@@ -68,15 +57,14 @@ $app-layout-use-escape = true;
&__content {
box-sizing: border-box;
//flex-grow: 1;
background-color: inherit
background-color: inherit;
}
& &__header {
if $app-layout-use-escape {
&--escape {
transform: translateY(-100%);
//transform: translateY(-100%);
}
}
......
......@@ -44,8 +44,7 @@
.wp-caption
.wp-caption-text,
.entry-caption,
.gallery-caption {
.entry-caption {
margin: 0.6em 0 1.7em;
}
......
This diff is collapsed.
......@@ -24,10 +24,12 @@ if ( post_password_required() ) {
<?php
// You can start editing here -- including this comment!
if ( have_comments() ) : ?>
if ( have_comments() ) :
?>
<h4 class="comments-area__title">
<?php
printf( // WPCS: XSS OK.
/* translators: %1$s: comments count. %2$s: Post Title. */
esc_html( _nx( '%1$s thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'vanilla' ) ),
number_format_i18n( get_comments_number() ),
'<span>' . get_the_title() . '</span>'
......@@ -65,7 +67,8 @@ if ( post_password_required() ) {
endif; // Check for have_comments().
// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'vanilla' ); ?></p>
<?php
......
......@@ -24,10 +24,16 @@
<?php endif; ?>
<p class="text-small">
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'vanilla' ) ); ?>"><?php printf( esc_html__( 'Proudly powered by %s', 'vanilla' ), 'WordPress' ); ?></a>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'vanilla' ) ); ?>">
<?php
/* translators: %s = WordPress */ printf( esc_html__( 'Proudly powered by %s', 'vanilla' ), 'WordPress' );
?>
</a>
<span class="sep"> | </span>
<?php
printf( esc_html__( 'Theme: %1$s by %2$s.', 'vanilla' ), 'Vanilla', '<a href="' . esc_url( __( 'https://torounit.com', 'vanilla' ) ) . '" target="_blank">' . esc_html__( 'Toro_Unit', 'vanilla' ) . '</a>' ); ?>
/* translators: %1$s = Theme Name. %2$s = link author site. */
printf( esc_html__( 'Theme: %1$s by %2$s.', 'vanilla' ), 'Vanilla', '<a href="' . esc_url( __( 'https://torounit.com', 'vanilla' ) ) . '" target="_blank">' . esc_html__( 'Toro_Unit', 'vanilla' ) . '</a>' );
?>
</p>
</div>
</div>
......
......@@ -23,8 +23,8 @@
<body <?php body_class(); ?>>
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'vanilla' ); ?></a>
<div id="page" class="site [ app-layout <?php if ( ! is_front_page() ) : ?>app-layout--disable<?php endif;?> ]" data-app-layout-header=".app-layout__header" data-app-layout-spacer=".app-layout__spacer" data-app-layout-scroll-area="window">
<header class="app-layout__header" aria-hidden="false" role="banner">
<div id="page" class="site app-layout" data-app-layout-header=".app-layout__header" data-app-layout-spacer=".app-layout__spacer" data-app-layout-scroll-area="window">
<header class="app-layout__header <?php echo ( ! is_front_page() ) ? 'app-layout__header--static' : ''; ?>" aria-hidden="false" role="banner">
<div class="navbar container">
<div class="navbar__branding">
<div class="site-branding">
......@@ -33,7 +33,7 @@
<h1 class="site-branding__name site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
<p class="site-branding__name site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php endif;?>
<?php endif; ?>
</div>
</div>
......@@ -45,46 +45,46 @@
</header>
<nav class="drawer"
role="navigation"
data-drawer
data-drawer-container-selector="body"
id="primary-menu"
aria-hidden="true"
aria-expanded="false">
<nav class="drawer" role="navigation" data-drawer data-drawer-container-selector="body" id="primary-menu" aria-hidden="true" aria-expanded="false">
<div class="drawer__body primary-menu">
<div class="drawer__search">
<?php get_search_form();?>
<?php get_search_form(); ?>
</div>
<?php wp_nav_menu( array(
<?php
wp_nav_menu( array(
'theme_location' => 'primary',
'menu_class' => 'primary-menu__links',
) );?>
) );
?>
</div>
</nav>
<div class="site-content [ app-layout__content ]">
<div class="site-content app-layout__content">
<?php if ( is_front_page() and ! is_paged() ) : ?>
<div id="masthead" class="app-layout__spacer custom-header <?php if ( get_header_image() ) : ?> custom-header--has-image <?php endif;?>" role="banner">
<?php if ( is_front_page() && ! is_paged() ) : ?>
<div id="masthead" class="app-layout__spacer custom-header
<?php
if ( get_header_image() ) :
?>
custom-header--has-image <?php endif; ?>" role="banner">
<div class="custom-header__media custom-header-media ">
<?php the_custom_header_markup();?>
<?php the_custom_header_markup(); ?>
</div>
<div class="custom-header__branding">
<div class="container">
<p class="site-title [ custom-header__title ]"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<p class="site-description [ custom-header__description ]"><?php bloginfo( 'description' ); ?></p>
<p class="site-title custom-header__title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<p class="site-description custom-header__description"><?php bloginfo( 'description' ); ?></p>
</div>
</div>
</div>
<?php else : ?>
<div class="app-layout__spacer"></div>
<?php endif;?>
<?php endif; ?>
<div id="content" class="content-area">
......
......@@ -73,8 +73,8 @@ function vanilla_header_style() {
?>
<style id="vanilla-custom-header-styles" type="text/css">
<?php
// Has the text been hidden?
if ( 'blank' === $header_text_color ) :
// Has the text been hidden?
if ( 'blank' === $header_text_color ) :
?>
.custom-header__branding {
position: absolute;
......@@ -82,12 +82,14 @@ function vanilla_header_style() {
}
<?php
// If the user has set a custom color for the text use that.
else :
else :
?>
.custom-header {
color: #<?php echo esc_attr( $header_text_color ); ?>;
}
<?php endif; ?>
<?php
endif;
?>
</style>
<?php
}
......@@ -239,7 +239,8 @@ function vanilla_sanitize_posts_layout_on_front_page( $input ) {
function vanilla_color_css() {
foreach ( vanilla_get_customize_color_settings() as $key => $param ) {
if ( $value = get_theme_mod( $key ) ) {
$value = get_theme_mod( $key );
if ( $value ) {
$css = vanilla_create_css( $param['selector'], $param['property'], $value );
} else {
$css = vanilla_create_css( $param['selector'], $param['property'], $param['default'] );
......
......@@ -62,6 +62,7 @@ if ( ! function_exists( 'vanilla_entry_meta' ) ) :
if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
echo '<span class="comments-link entry-meta__item">';
echo '<span class="entry-meta__icon dashicons dashicons-admin-comments"></span>';
/* translators: %s: Name of current post */
comments_popup_link( sprintf( __( 'Leave a comment<span class="screen-reader-text"> on %s</span>', 'vanilla' ), get_the_title() ) );
echo '</span>';
}
......@@ -75,6 +76,7 @@ if ( ! function_exists( 'vanilla_entry_footer' ) ) :
* Prints HTML with meta information for the categories, tags and comments.
*/
function vanilla_entry_footer() {
/* translators: %s: Name of current post */
edit_post_link( sprintf( esc_html__( 'Edit %s', 'vanilla' ), the_title( '<span class="screen-reader-text">"', '"</span>', false ) ), '<span class="edit-link">', '</span>' );
}
endif;
......@@ -86,7 +88,7 @@ endif;
* @param WP_Customize_Partial|null $partial WP_Customize_Partial object.
* @param int $id panel ID.
*/
function vanilla_front_page_section( $partial = null, $id = 0 ) {
function vanilla_front_page_section( $partial = null, $id = 0 ) {
if ( is_a( $partial, 'WP_Customize_Partial' ) ) {
// Find out the id and set it up during a selective refresh.
......@@ -108,9 +110,14 @@ function vanilla_front_page_section( $partial = null, $id = 0 ) {
} elseif ( is_customize_preview() ) {
// The output placeholder anchor.
?>
<article class="entry panel panel--placeholder" id="panel<?php echo esc_attr( $id );?>">
<article class="entry panel panel--placeholder" id="panel<?php echo esc_attr( $id ); ?>">
<div class="entry__body container">
<div class="panel__content"><?php echo esc_html( sprintf( __( 'Front Page Section %1$s Placeholder', 'vanilla' ), $id ) );?></div>
<div class="panel__content">
<?php
/* translators: %1$s: Section Number */
echo esc_html( sprintf( __( 'Front Page Section %1$s Placeholder', 'vanilla' ), $id ) );
?>
</div>
</div>
</article>
<?php
......
......@@ -13,16 +13,26 @@ get_header(); ?>
<?php do_action( 'vanilla_site_main_prepend' ); ?>
<?php
if ( have_posts() ) :?>
if ( have_posts() ) :
?>
<?php if ( ! is_front_page() ) : ?>
<header class="archive-header">
<div class="container">
<?php if ( is_search() ) : ?>
<h1 class="archive-header__title"><?php printf( esc_html__( 'Search Results for: %s', 'vanilla' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
<h1 class="archive-header__title">
<?php
/* translators: %s: Search keyword */
printf( esc_html__( 'Search Results for: %s', 'vanilla' ), '<span>' . get_search_query() . '</span>' );
?>
</h1>
<?php elseif ( is_home() ) : ?>
<h1 class="archive-header__title"><?php single_post_title(); ?></h1>
<h1 class="archive-header__title">
<?php single_post_title(); ?>
</h1>
<?php else : ?>
<h1 class="archive-header__title"><?php the_archive_title(); ?></h1>
<h1 class="archive-header__title">
<?php the_archive_title(); ?>
</h1>
<?php echo term_description(); ?>
<?php endif; ?>
......@@ -31,7 +41,8 @@ get_header(); ?>
<?php endif; ?>
<?php
while ( have_posts() ) : the_post();
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content' );
endwhile;
......@@ -41,13 +52,15 @@ get_header(); ?>
'before_page_number' => '<span class="pagination__numbers">',
'after_page_number' => '</span>',
) ); ?>
) );
?>
<?php
else :
get_template_part( 'template-parts/content', 'none' );
endif; ?>