From 344991d5b14f927261f75e788f853dc2629c43ee Mon Sep 17 00:00:00 2001 From: "WebMan Design, Oliver Juhas" Date: Fri, 25 Mar 2022 17:34:52 +0100 Subject: [PATCH] 2.5.1 --- assets/css/main-rtl.css | 29 +++------------ assets/css/main.css | 29 +++------------ assets/js/scripts-global.js | 20 +++++------ assets/js/scripts-global.min.js | 1 + assets/js/scripts-navigation-mobile.js | 4 +-- assets/js/scripts-navigation-mobile.min.js | 1 + assets/scss/main-rtl.scss | 21 ++++------- assets/scss/main.scss | 16 ++++----- assets/scss/main/content/__comments.scss | 36 ++----------------- .../scss/starter/content/comments/__list.scss | 2 +- changelog.md | 15 ++++++++ includes/frontend/class-assets.php | 8 ++--- style.css | 2 +- 13 files changed, 59 insertions(+), 125 deletions(-) create mode 100644 assets/js/scripts-global.min.js create mode 100644 assets/js/scripts-navigation-mobile.min.js diff --git a/assets/css/main-rtl.css b/assets/css/main-rtl.css index 6c5c1d6..5764915 100644 --- a/assets/css/main-rtl.css +++ b/assets/css/main-rtl.css @@ -1665,7 +1665,7 @@ form[role=search] .search-field, .comment-list .children { clear: both; margin: 0; - margin-right: 1.62em; + margin-right: 1em; } @media only screen and (min-width: 42em) { .comment-list .children { @@ -2077,7 +2077,7 @@ div.sharedaddy .sd-social .sd-button .share-count { /* FILE: main/icons/_icons.scss */ .breadcrumbs .home::before, .widget_archive li::before, .widget_categories li::before, .widget_pages li::before, .widget_recent_comments li::before, .widget_recent_entries li::before, .pingback .comment-body::before, .trackback .comment-body::before, .comment-edit-link::before, -.comment-reply-link::before, .bypostauthor > .comment-body .comment-author::before, .entry-meta .tags-links a::before, .format-status .entry-content::before, .posts .format-link .entry-content a::before, .format-image .entry-media::before, .posts .type-page .entry-title::before, .posts .sticky::before, .social-links a.back-to-top::before, .menu-toggle::before, .post-password-form::before, .site form[role=search]::before, +.comment-reply-link::before, .entry-meta .tags-links a::before, .format-status .entry-content::before, .posts .format-link .entry-content a::before, .format-image .entry-media::before, .posts .type-page .entry-title::before, .posts .sticky::before, .social-links a.back-to-top::before, .menu-toggle::before, .post-password-form::before, .site form[role=search]::before, .site .search-form::before, blockquote::before, .entry-meta-description::before, .slick-arrow::before { font-family: "Genericons-Neue"; font-style: normal; @@ -5049,28 +5049,9 @@ a .entry-date { list-style: decimal; } -@media only screen and (max-width: 41.9375em) { - .bypostauthor > .comment-body .comment-author .avatar { - border-left: 0.38em solid; - } -} -@media only screen and (min-width: 42em) { - .bypostauthor > .comment-body .comment-author::before { - content: ""; - position: absolute; - display: block; - width: 30px; - height: 30px; - right: 25px; - top: 65px; - margin-top: 1.62em; - font-size: 16px; - line-height: 28px; - text-align: center; - font-size: 1.19em; - border-radius: 50%; - z-index: 1; - } +.bypostauthor > .comment-body .vcard .fn::before { + content: "✍️ "; + speak: none; } .comment-edit-link, diff --git a/assets/css/main.css b/assets/css/main.css index a47fa6e..668f18e 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -1660,7 +1660,7 @@ form[role=search] .search-field, .comment-list .children { clear: both; margin: 0; - margin-left: 1.62em; + margin-left: 1em; } @media only screen and (min-width: 42em) { .comment-list .children { @@ -2072,7 +2072,7 @@ div.sharedaddy .sd-social .sd-button .share-count { /* FILE: main/icons/_icons.scss */ .breadcrumbs .home::before, .widget_archive li::before, .widget_categories li::before, .widget_pages li::before, .widget_recent_comments li::before, .widget_recent_entries li::before, .pingback .comment-body::before, .trackback .comment-body::before, .comment-edit-link::before, -.comment-reply-link::before, .bypostauthor > .comment-body .comment-author::before, .entry-meta .tags-links a::before, .format-status .entry-content::before, .posts .format-link .entry-content a::before, .format-image .entry-media::before, .posts .type-page .entry-title::before, .posts .sticky::before, .social-links a.back-to-top::before, .menu-toggle::before, .post-password-form::before, .site form[role=search]::before, +.comment-reply-link::before, .entry-meta .tags-links a::before, .format-status .entry-content::before, .posts .format-link .entry-content a::before, .format-image .entry-media::before, .posts .type-page .entry-title::before, .posts .sticky::before, .social-links a.back-to-top::before, .menu-toggle::before, .post-password-form::before, .site form[role=search]::before, .site .search-form::before, blockquote::before, .entry-meta-description::before, .slick-arrow::before { font-family: "Genericons-Neue"; font-style: normal; @@ -5044,28 +5044,9 @@ a .entry-date { list-style: decimal; } -@media only screen and (max-width: 41.9375em) { - .bypostauthor > .comment-body .comment-author .avatar { - border-left: 0.38em solid; - } -} -@media only screen and (min-width: 42em) { - .bypostauthor > .comment-body .comment-author::before { - content: ""; - position: absolute; - display: block; - width: 30px; - height: 30px; - left: 25px; - top: 65px; - margin-top: 1.62em; - font-size: 16px; - line-height: 28px; - text-align: center; - font-size: 1.19em; - border-radius: 50%; - z-index: 1; - } +.bypostauthor > .comment-body .vcard .fn::before { + content: "✍️ "; + speak: none; } .comment-edit-link, diff --git a/assets/js/scripts-global.js b/assets/js/scripts-global.js index 1fccb76..5b33c46 100644 --- a/assets/js/scripts-global.js +++ b/assets/js/scripts-global.js @@ -5,24 +5,22 @@ * @copyright WebMan Design, Oliver Juhas * * @since 1.0.0 - * @version 2.5.0 + * @version 2.5.1 */ ( function() { 'use strict'; // Tell CSS that JS is enabled... - var nojs = document.getElementsByClassName( 'no-js' ); - for ( var i = 0, max = nojs.length; i < max; i++ ) { - if ( nojs[ i ] ) { - nojs[ i ].classList.remove( 'no-js' ); - } - } + const nojs = document.querySelectorAll( '.no-js' ); + nojs.forEach( ( item ) => { + item.classList.remove( 'no-js' ); + } ); // Fixing Recent Comments widget multiple appearances. - var widgetRecentComments = document.querySelector( '.widget_recent_comments ul' ); - for ( var i = 0, max = widgetRecentComments.length; i < max; i++ ) { - widgetRecentComments[ i ].removeAttribute( 'id' ); - } + const widgetRecentCommentsUL = document.querySelectorAll( '.widget_recent_comments ul' ); + widgetRecentCommentsUL.forEach( ( item ) => { + item.removeAttribute( 'id' ); + } ); } )(); diff --git a/assets/js/scripts-global.min.js b/assets/js/scripts-global.min.js new file mode 100644 index 0000000..077048a --- /dev/null +++ b/assets/js/scripts-global.min.js @@ -0,0 +1 @@ +"use strict";document.querySelectorAll(".no-js").forEach((function(e){e.classList.remove("no-js")})),document.querySelectorAll(".widget_recent_comments ul").forEach((function(e){e.removeAttribute("id")})); \ No newline at end of file diff --git a/assets/js/scripts-navigation-mobile.js b/assets/js/scripts-navigation-mobile.js index 3f320e9..2661d68 100644 --- a/assets/js/scripts-navigation-mobile.js +++ b/assets/js/scripts-navigation-mobile.js @@ -11,7 +11,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 1.4.5 - * @version 2.5.0 + * @version 2.5.1 */ ( function() { @@ -62,7 +62,7 @@ const selectors = 'a, button, input:not([type=hidden]), select', elements = container.querySelectorAll( selectors ), - firstEl = elements[0]; + firstEl = elements[0], lastEl = elements[ elements.length - 1 ], activeEl = document.activeElement, tabKey = ( 9 === event.keyCode ), diff --git a/assets/js/scripts-navigation-mobile.min.js b/assets/js/scripts-navigation-mobile.min.js new file mode 100644 index 0000000..0992187 --- /dev/null +++ b/assets/js/scripts-navigation-mobile.min.js @@ -0,0 +1 @@ +"use strict";!function(){var e=document.getElementById("site-navigation");if(e){var t=document.getElementById("menu-toggle");if(t)document.getElementById("menu-primary")?(t.onclick=function(){n()},document.addEventListener("keydown",(function(o){if(e.classList.contains("toggled")){var l=e.querySelectorAll("a, button, input:not([type=hidden]), select"),a=l[0],i=l[l.length-1],s=document.activeElement,c=9===o.keyCode,d=27===o.keyCode,u=o.shiftKey;d&&(o.preventDefault(),n(),t.focus()),!u&&c&&i===s&&(o.preventDefault(),a.focus()),u&&c&&a===s&&(o.preventDefault(),i.focus()),c&&a===i&&o.preventDefault()}}))):t.style.display="none"}function n(){e.classList.toggle("toggled"),document.body.classList.toggle("has-navigation-toggled"),document.documentElement.classList.toggle("lock-scroll"),-1!==e.className.indexOf("toggled")?t.setAttribute("aria-expanded","true"):t.setAttribute("aria-expanded","false")}}(); \ No newline at end of file diff --git a/assets/scss/main-rtl.scss b/assets/scss/main-rtl.scss index 26bfa83..810755a 100644 --- a/assets/scss/main-rtl.scss +++ b/assets/scss/main-rtl.scss @@ -7,22 +7,13 @@ // @copyright WebMan Design, Oliver Juhas // +$language_direction: rtl; +$rtl_multiplier: -1; // For `translateX` transform, for example. +@import 'setup'; +@import 'css-vars'; +@import 'starter/starter'; -// Setup language direction - - $language_direction: rtl; - - - -// Imports - - @import 'setup'; - - @import 'css-vars'; - - @import 'starter/starter'; - - @import 'main/main'; +@import 'main/main'; diff --git a/assets/scss/main.scss b/assets/scss/main.scss index 3a472c4..e20ea4c 100644 --- a/assets/scss/main.scss +++ b/assets/scss/main.scss @@ -7,19 +7,15 @@ // @copyright WebMan Design, Oliver Juhas // // @since 2.0.0 -// @version 2.5.0 +// @version 2.5.1 // +$rtl_multiplier: 1; // For `translateX` transform, for example. +@import 'setup'; +@import 'css-vars'; +@import 'starter/starter'; -// Imports - - @import 'setup'; - - @import 'css-vars'; - - @import 'starter/starter'; - - @import 'main/main'; +@import 'main/main'; diff --git a/assets/scss/main/content/__comments.scss b/assets/scss/main/content/__comments.scss index 077f900..f779c35 100644 --- a/assets/scss/main/content/__comments.scss +++ b/assets/scss/main/content/__comments.scss @@ -118,39 +118,9 @@ // By post author - .bypostauthor > .comment-body .comment-author { - - .avatar { - - @include media( ( map_get( $breakpoint, 'm' ), 'max-width' ) ) { - border-left: ( $golden_minor +em ) solid; - } - - } - - &::before { - @extend %genericon; - - @include media( map_get( $breakpoint, 'm' ) ) { - // Avatar is 80x80 px - content: '\f411'; - position: absolute; - display: block; - width: 30px; - height: 30px; - #{$left}: 25px; // {{RTL}} - top: 65px; - margin-top: $golden +em; - font-size: 16px; - line-height: 28px; - text-align: center; - font-size: 1em + $golden_minor / 2; - border-radius: 50%; - z-index: 1; - } - - } - + .bypostauthor > .comment-body .vcard .fn::before { + content: '✍️ '; // https://emojipedia.org/writing-hand/ + speak: none; } diff --git a/assets/scss/starter/content/comments/__list.scss b/assets/scss/starter/content/comments/__list.scss index 1d96086..6cb8865 100644 --- a/assets/scss/starter/content/comments/__list.scss +++ b/assets/scss/starter/content/comments/__list.scss @@ -38,7 +38,7 @@ .children { clear: both; margin: 0; - margin-#{$left}: $golden +em; // {{RTL}} + margin-#{$left}: 1em; // {{RTL}} @include media( map_get( $breakpoint, 'm' ) ) { margin-#{$left}: 5em - $golden; // {{RTL}} diff --git a/changelog.md b/changelog.md index a15e067..414945a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,20 @@ # Modern Changelog +## 2.5.1, 20220325 + +### Fixed +- JavaScript error +- Comments responsive styles + +### File updates + changelog.md + style.css + assets/js/scripts-global.js + assets/js/scripts-navigation-mobile.js + assets/scss/main.scss + includes/frontend/class-assets.php + + ## 2.5.0, 20220320 ### Added diff --git a/includes/frontend/class-assets.php b/includes/frontend/class-assets.php index 3dddf07..5ef5a21 100644 --- a/includes/frontend/class-assets.php +++ b/includes/frontend/class-assets.php @@ -6,7 +6,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 2.0.0 - * @version 2.5.0 + * @version 2.5.1 * * Contents: * @@ -146,7 +146,7 @@ public static function register_styles() { * Registering theme scripts * * @since 1.0.0 - * @version 2.5.0 + * @version 2.5.1 */ public static function register_scripts() { @@ -158,10 +158,10 @@ public static function register_scripts() { 'jquery-slick' => array( get_theme_file_uri( 'assets/js/vendors/slick/slick.min.js' ), 'deps' => array( 'jquery' ) ), 'modern-skip-link-focus-fix' => array( 'src' => get_theme_file_uri( 'assets/js/skip-link-focus-fix.js' ) ), - 'modern-scripts-global' => array( 'src' => get_theme_file_uri( 'assets/js/scripts-global.js' ) ), + 'modern-scripts-global' => array( 'src' => get_theme_file_uri( 'assets/js/scripts-global.min.js' ) ), 'modern-scripts-masonry' => array( 'src' => get_theme_file_uri( 'assets/js/scripts-masonry.js' ), 'deps' => array( 'jquery-masonry' ) ), 'modern-scripts-slick' => array( 'src' => get_theme_file_uri( 'assets/js/scripts-slick.js' ), 'deps' => array( 'jquery-slick' ) ), - 'modern-scripts-nav-mobile' => array( get_theme_file_uri( 'assets/js/scripts-navigation-mobile.js' ) ), + 'modern-scripts-nav-mobile' => array( get_theme_file_uri( 'assets/js/scripts-navigation-mobile.min.js' ) ), ); $register_assets = (array) apply_filters( 'wmhook_modern_assets_register_scripts', $register_assets ); diff --git a/style.css b/style.css index 29e696e..9efc689 100644 --- a/style.css +++ b/style.css @@ -3,7 +3,7 @@ Theme Name: Modern Theme URI: https://www.webmandesign.eu/portfolio/modern-wordpress-theme/ Author: WebMan Design Author URI: https://www.webmandesign.eu/ -Version: 2.5.0 +Version: 2.5.1 Text Domain: modern Domain Path: /languages License: GNU General Public License v3