Skip to content

Commit

Permalink
1.5.0
Browse files Browse the repository at this point in the history
* Improving navigation accessibility
* Improving navigation touch screen functionality
* Updating localization
* Updating version and changelog
  • Loading branch information
webmandesign committed Feb 7, 2019
1 parent 1196845 commit 33d50b1
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 35 deletions.
24 changes: 15 additions & 9 deletions assets/js/scripts-navigation-accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @copyright WebMan Design, Oliver Juhas
*
* @since 1.0.0
* @version 1.4.0
* @version 1.5.0
*/


Expand Down Expand Up @@ -73,22 +73,28 @@
*/

$siteNavigation
.on( 'touchstart click', '.menu-item-has-children > a .expander', function( e ) {
.on( 'touchstart', '.menu-item-has-children > a', function( e ) {

// Helper variables

var
$this = $( this ).parent().parent(); // Get the LI element
el = $( this ).parent( 'li' );


// Processing

e.preventDefault();

$this
.toggleClass( 'focus' )
.siblings()
.removeClass( 'focus' );
/**
* First touch does not trigger the link, only opens the submenu.
* Second touch does trigger the link.
*/
if ( ! el.hasClass( 'focus' ) ) {
e.preventDefault();

el
.toggleClass( 'focus' )
.siblings( '.focus' )
.removeClass( 'focus' );
}

} );

Expand Down
29 changes: 29 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Reykjavik Changelog

## 1.5.0

* **Update**: Improving touch screen navigation
* **Update**: Improving accessibility
* **Update**: Improving excerpt display
* **Update**: Improving Recent Posts widget enhancements
* **Update**: Improving security
* **Update**: Removing obsolete code

### Files changed:

changelog.md
readme.txt
style.css
assets/js/scripts-navigation-accessibility.js
assets/scss/main.scss
includes/frontend/class-menu.php
includes/frontend/class-post-summary.php
includes/widgets/class-wp-widget-recent-posts.php
languages/reykjavik.pot
templates/parts/component/link-more.php
templates/parts/component/link-more-product.php
templates/parts/content/content.php
templates/parts/content/content-child-page.php
templates/parts/intro/intro-content.php
templates/parts/meta/entry-meta-element-comments.php
templates/parts/meta/entry-meta-element-date.php


## 1.4.2

* **Fix**: Displaying default background image URL when no image set in theme options
Expand Down
8 changes: 4 additions & 4 deletions includes/frontend/class-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @copyright WebMan Design, Oliver Juhas
*
* @since 1.0.0
* @version 1.4.0
* @version 1.5.0
*
* Contents:
*
Expand Down Expand Up @@ -302,12 +302,12 @@ public static function nav_menu_item_description( $item_output, $item, $depth, $


/**
* Menu item modification: submenu expander
* Menu item modification: submenu expander.
*
* Primary menu only.
*
* @since 1.0.0
* @version 1.3.1
* @version 1.5.0
*
* @param string $item_output Menu item output HTML (without closing `</li>`).
* @param object $item The current menu item.
Expand All @@ -326,7 +326,7 @@ public static function nav_menu_item_expander( $item_output, $item, $depth, $arg
// `</a>` is required here as `$args->link_after` could also be an empty string.
$item_output = str_replace(
$args->link_after . '</a>',
$args->link_after . ' <span class="expander" aria-hidden="true"></span></a>', // Accessibility: on focus, no screen reader text required
$args->link_after . ' <span class="expander" aria-label="' . esc_attr__( '(Focus the link to toggle submenu.)', 'reykjavik' ) . '"></span></a>',
$item_output
);

Expand Down
28 changes: 16 additions & 12 deletions languages/reykjavik.pot
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ msgid ""
msgstr ""
"Project-Id-Version: Reykjavik\n"
"Report-Msgid-Bugs-To: https://support.webmandesign.eu\n"
"POT-Creation-Date: 2019-01-30 15:00+0100\n"
"POT-Creation-Date: 2019-02-07 20:12+0100\n"
"PO-Revision-Date: 2015-05-12 20:39+0100\n"
"Last-Translator: Oliver Juhas, WebMan Design\n"
"Language-Team: \n"
"Language: en\n"
"MIME-Version: 1.4.0\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2.1\n"
Expand Down Expand Up @@ -608,11 +608,15 @@ msgstr ""
msgid "Skip to menu toggle button"
msgstr ""

#: includes/frontend/class-post-summary.php:114
#: includes/frontend/class-menu.php:329
msgid "(Focus the link to toggle submenu.)"
msgstr ""

#: includes/frontend/class-post-summary.php:88
msgid "This content is password protected."
msgstr ""

#: includes/frontend/class-post-summary.php:114
#: includes/frontend/class-post-summary.php:90
msgid "Enter the password to view it."
msgstr ""

Expand Down Expand Up @@ -1228,7 +1232,7 @@ msgstr ""

#. translators: %s: search query.
#: includes/plugins/woocommerce/class-woocommerce-pages.php:275 search.php:32
#: templates/parts/intro/intro-content.php:85
#: templates/parts/intro/intro-content.php:89
#, php-format
msgid "Search Results for: %s"
msgstr ""
Expand Down Expand Up @@ -1714,7 +1718,7 @@ msgstr ""
msgid "Recent Posts"
msgstr ""

#: includes/widgets/class-wp-widget-recent-posts.php:272
#: includes/widgets/class-wp-widget-recent-posts.php:260
msgid "From category:"
msgstr ""

Expand Down Expand Up @@ -2638,13 +2642,13 @@ msgstr ""
msgid "Breadcrumbs navigation"
msgstr ""

#: templates/parts/component/link-more-product.php:33
#: templates/parts/component/link-more-product.php:32
#, php-format
msgctxt "%s: Product name."
msgid "View product%s&hellip;"
msgstr ""

#: templates/parts/component/link-more.php:23
#: templates/parts/component/link-more.php:22
#, php-format
msgctxt "%s: Name of current post."
msgid "Continue reading%s&hellip;"
Expand Down Expand Up @@ -2772,14 +2776,14 @@ msgctxt "Post meta info description: comments count."
msgid "Comments:"
msgstr ""

#: templates/parts/meta/entry-meta-element-date.php:25
#: templates/parts/meta/entry-meta-element-date.php:28
#: templates/parts/meta/entry-meta-element-date.php:20
#: templates/parts/meta/entry-meta-element-date.php:23
msgctxt "Post meta info description: publish date."
msgid "Posted on:"
msgstr ""

#: templates/parts/meta/entry-meta-element-date.php:33
#: templates/parts/meta/entry-meta-element-date.php:35
#: templates/parts/meta/entry-meta-element-date.php:28
#: templates/parts/meta/entry-meta-element-date.php:30
msgctxt "Post meta info description: update date."
msgid "Last updated on:"
msgstr ""
Expand Down
6 changes: 3 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: webmandesign
Tags: one-column, two-columns, right-sidebar, grid-layout, flexible-header, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-image-header, featured-images, footer-widgets, full-width-template, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, blog, e-commerce, portfolio
Requires at least: 4.7.0
Tested up to: 5.0.3
Stable tag: 1.4.2
Stable tag: 1.5.0
License: GNU General Public License v3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -37,8 +37,8 @@ Please see `changelog.md` file.

== Upgrade Notice ==

= 1.4.2 =
Fixing displaying default background image URL when no image set in theme options.
= 1.5.0 =
Improving navigation touch screen functionality, improving excerpt display, security and accessibility.


== Resources ==
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Theme Name: Reykjavik
Theme URI: https://www.webmandesign.eu/portfolio/reykjavik-wordpress-theme/
Author: WebMan Design
Author URI: https://www.webmandesign.eu/
Version: 1.4.2
Version: 1.5.0
Text Domain: reykjavik
Domain Path: /languages
License: GNU General Public License v3
Expand Down
16 changes: 10 additions & 6 deletions templates/parts/intro/intro-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,16 @@
*/
if ( $page_summary ) :

?>

<div class="page-summary">
<?php echo apply_filters( 'the_excerpt', $page_summary ); ?>
</div>
if ( strpos( $page_summary, 'entry-summary' ) ) {
$page_summary = str_replace(
'entry-summary',
'page-summary entry-summary',
$page_summary
);
} else {
$page_summary = '<div class="page-summary">' . PHP_EOL . $page_summary . PHP_EOL . '</div>';
}

<?php
echo apply_filters( 'the_excerpt', $page_summary );

endif;

0 comments on commit 33d50b1

Please sign in to comment.