Commit e4b5b516 authored by agata's avatar agata

[auto] theme: micro 1.5.4

parent 87e4f671
......@@ -56,4 +56,4 @@ get_header(); ?>
</section><!-- .section-fullwidth section-main -->
<?php
get_footer();
get_footer();
\ No newline at end of file
......@@ -49,6 +49,11 @@ a {
color: $color-background;
background-color: $color-text;
}
&:focus {
outline: 1px dashed $color-text;
box-shadow: inset 0 0 0 2px $color-background;
}
}
h1,h2,h3,h4,h5 {
......@@ -338,4 +343,8 @@ dd {
table {
margin: 0 0 1.5em;
width: 100%;
}
hr {
background: $color-text;
}
\ No newline at end of file
.wp-block-button {
&__link {
border-radius: 0;
border: 1px solid $color-text;
background: $color-text;
color: $color-background;
&:hover {
color: $color-background;
}
}
&.is-style-outline {
.wp-block-button__link {
border-color: $color-text;
background: $color-background;
color: $color-text;
}
}
}
.wp-block-file {
.wp-block-file__button {
border-radius: 0;
border: 1px solid $color-text;
background: $color-text;
color: $color-background;
}
}
.wp-block-gallery {
&.alignleft,
&.alignright {
display: flex;
}
}
.wp-block-column {
.wp-block-image {
margin-left: 0;
margin-right: 0;
}
}
.wp-block-latest-posts {
margin-left: 0;
a {
font-weight: bold;
}
&__post-date {
color: $color-text;
}
}
.entry {
.columns-2,
.columns-3,
.columns-4,
.columns-5,
.columns-6,
.columns-7,
.columns-8,
.wp-block-latest-posts,
.wp-block-latest-comments {
// In case there is UL tag
margin-left: 0;
}
}
.wp-block-latest-comments {
&__comment-date {
color: $color-text;
}
}
.wp-block-table {
&.is-style-stripes {
border-bottom: 1px solid $color-text;
tbody tr:nth-child(odd) {
background: $color-text;
color: $color-background;
}
}
}
\ No newline at end of file
::-webkit-input-placeholder { /* Chrome/Opera/Safari */
color: rgba($color-text, .5);
}
::-moz-placeholder { /* Firefox 19+ */
color: rgba($color-text, .5);
}
:-ms-input-placeholder { /* IE 10+ */
color: rgba($color-text, .5);
}
:-moz-placeholder { /* Firefox 18- */
color: rgba($color-text, .5);
}
input {
background: $color-background;
border: 1px solid $color-text;
color: $color-text;
font-size: 13px;
padding: 8px 10px;
&:focus {
outline: none;
}
&[type="button"]:active {
background: $color-text;
color: $color-background;
......@@ -23,7 +36,7 @@ textarea {
font-family: $font-primary;
font-size: 13px;
padding: 8px 10px;
&:focus {
outline: none;
}
......
......@@ -32,7 +32,8 @@
}
}
.menu-item {
.menu-item,
.page_item {
display: inline-block;
margin-right: 10px;
position: relative;
......@@ -51,8 +52,10 @@
}
}
.menu-item-has-children {
&:hover > .sub-menu {
.menu-item-has-children,
.page_item_has_children {
&:hover > .sub-menu,
&:hover > .children {
display: block;
}
}
......@@ -79,7 +82,8 @@
pointer-events: auto;
}
.menu-item {
.menu-item,
.page_item {
border-bottom: 1px solid rgba(black, 0.1);
margin: 0;
display: block;
......@@ -90,14 +94,16 @@
}
}
.menu-item-has-children .dropdown-arrow {
.menu-item-has-children .dropdown-arrow,
.page_item_has_children .dropdown-arrow {
height: rem-calc(10px + 16px*2);
width: rem-calc(10px + 16px*2);
line-height: rem-calc(10px + 16px*2);
padding: 0;
}
.sub-menu {
.sub-menu,
.children {
border-top: 1px solid rgba(black, 0.1);
background: black;
}
......@@ -112,35 +118,39 @@
display: block;
}
.sub-menu {
pointer-events: none;
opacity: 0;
transition: 0.2s;
transform: translateY(40px);
top: 100%;
}
li {
position: relative;
}
li:hover > .sub-menu{
a:focus + .sub-menu,
a:focus + .children,
&.focus > .sub-menu,
&.focus > .children {
opacity: 1;
pointer-events: auto;
}
}
li:hover > .sub-menu,
li:hover > .children {
opacity: 1;
pointer-events: auto;
transition: 0.2s;
transform: translateY(0);
}
.sub-menu {
.sub-menu,
.children {
pointer-events: none;
opacity: 0;
top: 100%;
position: absolute;
border: 1px solid rgba(black, 0.1);
top: 15px;
top: 100%;
background: rgba(black, 0.98);
max-width: 200px;
text-align: left;
z-index: 99;
.sub-menu {
.sub-menu
.children {
left: 100%;
top: -1px;
}
......@@ -150,7 +160,6 @@
padding: 8px 13px;
font-size: 13px;
font-weight: normal;
color: black;
&:hover {
background: transparent;
......@@ -177,6 +186,8 @@
display: inline-block;
font-size: 22px;
margin: 0;
line-height: 1.2;
font-weight: bold;
}
.site-description {
......
......@@ -35,6 +35,7 @@
@import "components/comment";
@import "components/input";
@import "components/entry";
@import "components/gutenberg";
@import "components/widgets";
......
jQuery( document ).ready( function ( $ ) {
'use strict';
/**
* The actual plugin for mobile dropdown
*/
var mobileDropdown = (function () {
var settings = {
heightHeader: 80,
heightAdminbar: 50
};
// The selector variables.
var selector = {
menuIcon: $( ".menu-toggle" ),
dropdownArrow: $( "span.dropdown-arrow" ),
menuNav: $('.main-navigation'),
wavesButtonSelector: '.button'
};
var events = function () {
// When header is clicked.
selector.menuIcon.on( 'click', openMenu );
// Dropdown menu links
$('li.menu-item-has-children').on( 'click', $(this).closest('span.dropdown-arrow'), openDropdownMenu );
};
var focusMenuWithChildren = function() {
// Get all the link elements within the primary menu.
var links, i, len,
menu = document.querySelector('.menu-primary-container');
if (!menu) {
console.log(menu);
return false;
}
links = menu.getElementsByTagName('a');
// Each time a menu link is focused or blurred, toggle focus.
for (i = 0, len = links.length; i < len; i++) {
links[i].addEventListener('focus', toggleFocus, true);
links[i].addEventListener('blur', toggleFocus, true);
}
// Sets or removes the .focus class on an element.
function toggleFocus() {
var self = this;
// Move up through the ancestors of the current link until we hit .primary-menu.
while (-1 === self.className.indexOf('menu')) {
// On li elements toggle the class .focus.
if ('li' === self.tagName.toLowerCase()) {
if (-1 !== self.className.indexOf('focus')) {
self.className = self.className.replace(' focus', '');
} else {
self.className += ' focus';
}
}
self = self.parentElement;
}
}
}
var openMenu = function ( event ) {
var headerHeight = settings.heightHeader;
var adminbarHeight = settings.heightAdminbar;
// No need for this when you are not logged in.
if ( ! $("body").hasClass("admin-bar") ) {
adminbarHeight = 0;
}
// Change button state
$( this ).toggleClass( 'is-opened' );
// Open the main menu.
selector.menuNav.toggleClass( 'is-extended' ).removeClass('init');
// selector.menuNav.height( $(window).height() - headerHeight - adminbarHeight );
$('body').toggleClass( 'is-menu-opened' );
};
var openDropdownMenu = function ( event ) {
event.stopImmediatePropagation(); // Fix issue with double clicking.
$(this).toggleClass( "is-extended" );
};
var buildDropdownArrow = function () {
$('.menu-item-has-children').each(function() {
$(this).append("<span class='dropdown-arrow'><i class='fa fa-angle-right'></i></span>");
});
};
/**
* Run the dropdown menu.
*/
var initialiseDropdown = function() {
focusMenuWithChildren();
buildDropdownArrow();
events();
};
return {
init: initialiseDropdown
};
})();
mobileDropdown.init();
});
/**
* File skip-link-focus-fix.js.
*
* Helps with accessibility for keyboard only users.
*
* Learn more: https://git.io/vWdr2
*/
( function() {
var isWebkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,
isOpera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1,
isIe = navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1;
if ( ( isWebkit || isOpera || isIe ) && document.getElementById && window.addEventListener ) {
window.addEventListener( 'hashchange', function() {
var id = location.hash.substring( 1 ),
element;
if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
return;
}
element = document.getElementById( id );
if ( element ) {
if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
element.tabIndex = -1;
}
element.focus();
}
}, false );
}
})();
jQuery( document ).ready( function ( $ ) {
'use strict';
/*
......
jQuery(document).ready(function(n){"use strict";var o=function(){return!0};o()||(console.log=function(){})});
\ No newline at end of file
jQuery(document).ready(function(e){"use strict";(function(){var n={menuIcon:e(".menu-toggle"),dropdownArrow:e("span.dropdown-arrow"),menuNav:e(".main-navigation"),wavesButtonSelector:".button"},t=function(){n.menuIcon.on("click",o),e("li.menu-item-has-children").on("click",e(this).closest("span.dropdown-arrow"),s)},a=function(){function e(){for(var e=this;-1===e.className.indexOf("menu");)"li"===e.tagName.toLowerCase()&&(-1!==e.className.indexOf("focus")?e.className=e.className.replace(" focus",""):e.className+=" focus"),e=e.parentElement}var n,t,a,o=document.querySelector(".menu-primary-container");if(!o)return console.log(o),!1;for(n=o.getElementsByTagName("a"),t=0,a=n.length;t<a;t++)n[t].addEventListener("focus",e,!0),n[t].addEventListener("blur",e,!0)},o=function(t){e("body").hasClass("admin-bar"),e(this).toggleClass("is-opened"),n.menuNav.toggleClass("is-extended").removeClass("init"),e("body").toggleClass("is-menu-opened")},s=function(n){n.stopImmediatePropagation(),e(this).toggleClass("is-extended")},i=function(){e(".menu-item-has-children").each(function(){e(this).append("<span class='dropdown-arrow'><i class='fa fa-angle-right'></i></span>")})};return{init:function(){a(),i(),t()}}})().init()}),function(){var e=navigator.userAgent.toLowerCase().indexOf("webkit")>-1,n=navigator.userAgent.toLowerCase().indexOf("opera")>-1,t=navigator.userAgent.toLowerCase().indexOf("msie")>-1;(e||n||t)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",function(){var e,n=location.hash.substring(1);/^[A-z0-9_-]+$/.test(n)&&(e=document.getElementById(n))&&(/^(?:a|select|input|button|textarea)$/i.test(e.tagName)||(e.tabIndex=-1),e.focus())},!1)}(),jQuery(document).ready(function(e){"use strict"});
\ No newline at end of file
jQuery( document ).ready( function ( $ ) {
'use strict';
/**
* The actual plugin for mobile dropdown
*/
var mobileDropdown = (function () {
var settings = {
heightHeader: 80,
heightAdminbar: 50
};
// The selector variables.
var selector = {
menuIcon: $( ".menu-toggle" ),
dropdownArrow: $( "span.dropdown-arrow" ),
menuNav: $('.main-navigation'),
wavesButtonSelector: '.button'
};
var events = function () {
// When header is clicked.
selector.menuIcon.on( 'click', openMenu );
// Dropdown menu links
$('li.menu-item-has-children').on( 'click', $(this).closest('span.dropdown-arrow'), openDropdownMenu );
};
// Code taken from https://github.com/WordPress/twentytwenty
var focusMenuWithChildren = function() {
// Get all the link elements within the primary menu.
var links, i, len,
menu = document.querySelector('.menu-primary-container');
if (!menu) {
console.log(menu);
return false;
}
links = menu.getElementsByTagName('a');
// Each time a menu link is focused or blurred, toggle focus.
for (i = 0, len = links.length; i < len; i++) {
links[i].addEventListener('focus', toggleFocus, true);
links[i].addEventListener('blur', toggleFocus, true);
}
// Sets or removes the .focus class on an element.
function toggleFocus() {
var self = this;
// Move up through the ancestors of the current link until we hit .primary-menu.
while (-1 === self.className.indexOf('menu')) {
// On li elements toggle the class .focus.
if ('li' === self.tagName.toLowerCase()) {
if (-1 !== self.className.indexOf('focus')) {
self.className = self.className.replace(' focus', '');
} else {
self.className += ' focus';
}
}
self = self.parentElement;
}
}
}
var openMenu = function ( event ) {
var headerHeight = settings.heightHeader;
var adminbarHeight = settings.heightAdminbar;
// No need for this when you are not logged in.
if ( ! $("body").hasClass("admin-bar") ) {
adminbarHeight = 0;
}
// Change button state
$( this ).toggleClass( 'is-opened' );
// Open the main menu.
selector.menuNav.toggleClass( 'is-extended' ).removeClass('init');
// selector.menuNav.height( $(window).height() - headerHeight - adminbarHeight );
$('body').toggleClass( 'is-menu-opened' );
};
var openDropdownMenu = function ( event ) {
event.stopImmediatePropagation(); // Fix issue with double clicking.
$(this).toggleClass( "is-extended" );
};
var buildDropdownArrow = function () {
$('.menu-item-has-children').each(function() {
$(this).append("<span class='dropdown-arrow'><i class='fa fa-angle-right'></i></span>");
});
};
/**
* Run the dropdown menu.
*/
var initialiseDropdown = function() {
focusMenuWithChildren();
buildDropdownArrow();
events();
};
return {
init: initialiseDropdown
};
})();
mobileDropdown.init();
});
\ No newline at end of file
/**
* File skip-link-focus-fix.js.
*
* Helps with accessibility for keyboard only users.
*
* Learn more: https://git.io/vWdr2
*/
( function() {
var isWebkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,
isOpera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1,
isIe = navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1;
if ( ( isWebkit || isOpera || isIe ) && document.getElementById && window.addEventListener ) {
window.addEventListener( 'hashchange', function() {
var id = location.hash.substring( 1 ),
element;
if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
return;
}
element = document.getElementById( id );
if ( element ) {
if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
element.tabIndex = -1;
}
element.focus();
}
}, false );
}
})();
......@@ -27,10 +27,19 @@ if ( post_password_required() ) {
if ( have_comments() ) : ?>
<h2 class="comments-title">
<?php
$comments_number = get_comments_number();
printf( // WPCS: XSS OK.
esc_html( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'micro' ) ),
number_format_i18n( get_comments_number() ),
'<span>' . get_the_title() . '</span>'
esc_html(
// translators: %1s: comments number