Changeset 358231
- Timestamp:
- 11/09/2026 06:38:13 PM (7 days ago)
- Location:
- hamilton/2.1.4
- Files:
-
- 13 edited
- 1 copied
-
. (copied) (copied from hamilton/2.1.3 )
-
404.php (modified) (1 diff)
-
assets/css/hamilton-block-editor-styles.css (modified) (1 diff)
-
assets/css/hamilton-classic-editor-styles.css (modified) (3 diffs)
-
assets/js/global.js (modified) (1 diff)
-
comments.php (modified) (1 diff)
-
content.php (modified) (1 diff)
-
footer.php (modified) (1 diff)
-
functions.php (modified) (3 diffs)
-
header.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
screenshot.jpg (modified) ( previous)
-
singular.php (modified) (1 diff)
-
style.css (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hamilton/2.1.4/404.php
r130234 r358231 7 7 <div> 8 8 9 <h1 class="title"><?php _e( 'Error 404', 'hamilton' ); ?></h1>9 <h1 class="title"><?php esc_html_e( 'Error 404', 'hamilton' ); ?></h1> 10 10 11 <p><?php _e( "The page you're looking for could not be found. It may have been removed, renamed, or maybe it didn't exist in the first place.", "hamilton" ); ?></p>11 <p><?php esc_html_e( "The page you're looking for could not be found. It may have been removed, renamed, or maybe it didn't exist in the first place.", "hamilton" ); ?></p> 12 12 13 13 <div class="meta"> 14 14 15 <a href="<?php echo esc_url( home_url() ); ?>"><?php _e( 'To the front page', 'hamilton' ); ?></a>15 <a href="<?php echo esc_url( home_url() ); ?>"><?php esc_html_e( 'To the front page', 'hamilton' ); ?></a> 16 16 17 17 </div> -
hamilton/2.1.4/assets/css/hamilton-block-editor-styles.css
r130234 r358231 407 407 font-size: .7em; 408 408 padding: 20px; 409 white-space: pre-wrap; /* css-3 */ 410 white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ 411 white-space: -pre-wrap; /* Opera 4-6 */ 412 white-space: -o-pre-wrap; /* Opera 7 */ 413 word-wrap: break-word; /* Internet Explorer 5.5+ */ 409 white-space: pre-wrap; 410 word-wrap: break-word; 414 411 } 415 412 -
hamilton/2.1.4/assets/css/hamilton-classic-editor-styles.css
r130234 r358231 14 14 15 15 body#tinymce.wp-editor * { 16 -webkit-box-sizing: border-box;17 -moz-box-sizing: border-box;18 16 box-sizing: border-box; 19 17 -webkit-font-smoothing: antialiased; … … 314 312 font-size: 0.9em; 315 313 padding: 14px 16px; 316 -webkit-appearance: none; 317 -moz-appearance: none; 314 appearance: none; 318 315 width: 100%; 319 316 } … … 347 344 margin: 0; 348 345 padding: 12px 16px; 349 -webkit-appearance: none;346 appearance: none; 350 347 } 351 348 -
hamilton/2.1.4/assets/js/global.js
r356895 r358231 94 94 $( '.nav-toggle' ).on( 'click', function(){ 95 95 $( this ).add( '.site-nav' ).toggleClass( 'active' ); 96 $( this ).attr( 'aria-expanded', $( this ).hasClass( 'active' ) ? 'true' : 'false' ); 96 97 $( 'body' ).toggleClass( 'lock-screen' ); 98 } ); 99 100 // Close the navigation with the Escape key 101 $( document ).on( 'keydown', function( e ) { 102 if ( 'Escape' === e.key && $( '.nav-toggle' ).hasClass( 'active' ) ) { 103 $( '.nav-toggle' ).trigger( 'click' ).trigger( 'focus' ); 104 } 97 105 } ); 98 106 -
hamilton/2.1.4/comments.php
r130234 r358231 18 18 <div class="comments"> 19 19 20 <h3 class="comment-reply-title"><?php _e( 'Comments', 'hamilton' ) ?></h3>20 <h3 class="comment-reply-title"><?php esc_html_e( 'Comments', 'hamilton' ) ?></h3> 21 21 22 22 <?php -
hamilton/2.1.4/content.php
r130234 r358231 34 34 35 35 <?php if ( is_sticky() ) : ?> 36 <span class="sticky-post"><?php _e( 'Sticky', 'hamilton' ); ?></span>36 <span class="sticky-post"><?php esc_html_e( 'Sticky', 'hamilton' ); ?></span> 37 37 <?php endif; ?> 38 38 -
hamilton/2.1.4/footer.php
r170702 r358231 4 4 5 5 <p>© <?php echo date( 'Y' ); ?> <a href="<?php echo esc_url( home_url() ); ?>" class="site-name"><?php bloginfo( 'name' ); ?></a></p> 6 <p class="theme-by"><?php _e( 'Theme by', 'hamilton' ); ?> <a href="https://andersnoren.se">Anders Norén</a></p>6 <p class="theme-by"><?php esc_html_e( 'Theme by', 'hamilton' ); ?> <a href="https://andersnoren.se">Anders Norén</a></p> 7 7 8 8 </footer><!-- footer --> -
hamilton/2.1.4/functions.php
r356895 r358231 119 119 $theme_version = wp_get_theme( 'hamilton' )->get( 'Version' ); 120 120 121 wp_register_style( 'hamilton-fonts', get_theme_file_uri( '/assets/css/fonts.css' ) );121 wp_register_style( 'hamilton-fonts', get_theme_file_uri( '/assets/css/fonts.css' ), array(), $theme_version ); 122 122 wp_enqueue_style( 'hamilton-style', get_stylesheet_uri(), array( 'hamilton-fonts' ), $theme_version ); 123 123 … … 156 156 function hamilton_enqueue_scripts() { 157 157 158 wp_enqueue_script( 'hamilton_global', get_template_directory_uri() . '/assets/js/global.js', array( 'jquery', 'imagesloaded', 'masonry' ), '', true ); 158 $theme_version = wp_get_theme( 'hamilton' )->get( 'Version' ); 159 160 wp_enqueue_script( 'hamilton_global', get_template_directory_uri() . '/assets/js/global.js', array( 'jquery', 'imagesloaded', 'masonry' ), $theme_version, true ); 159 161 160 162 if ( ( ! is_admin() ) && is_singular() && comments_open() && get_option( 'thread_comments' ) ) { … … 415 417 $theme_version = wp_get_theme( 'hamilton' )->get( 'Version' ); 416 418 417 wp_register_style( 'hamilton-block-editor-styles-font', get_theme_file_uri( '/assets/css/fonts.css' ) );419 wp_register_style( 'hamilton-block-editor-styles-font', get_theme_file_uri( '/assets/css/fonts.css' ), array(), $theme_version ); 418 420 wp_enqueue_style( 'hamilton-block-editor-styles', get_theme_file_uri( '/assets/css/hamilton-block-editor-styles.css' ), array( 'hamilton-block-editor-styles-font' ), $theme_version, 'all' ); 419 421 -
hamilton/2.1.4/header.php
r130234 r358231 22 22 ?> 23 23 24 <a class="skip-link button" href="#site-content"><?php _e( 'Skip to the content', 'hamilton' ); ?></a>24 <a class="skip-link button" href="#site-content"><?php esc_html_e( 'Skip to the content', 'hamilton' ); ?></a> 25 25 26 26 <header class="section-inner site-header"> … … 54 54 55 55 <a href="<?php echo esc_url( home_url() ); ?>" class="custom-logo" style="background-image: url( <?php echo esc_url( $logo_url ); ?> );"> 56 <img src="<?php echo esc_url( $logo_url ); ?>" />57 <span class="screen-reader-text"><?php echo $site_title; ?></span>56 <img src="<?php echo esc_url( $logo_url ); ?>" alt="" /> 57 <span class="screen-reader-text"><?php echo esc_html( $site_title ); ?></span> 58 58 </a> 59 59 60 60 <?php else : ?> 61 <a href="<?php echo esc_url( home_url() ); ?>" class="site-name"><?php echo $site_title; ?></a>61 <a href="<?php echo esc_url( home_url() ); ?>" class="site-name"><?php echo esc_html( $site_title ); ?></a> 62 62 <?php endif; ?> 63 63 64 64 </<?php echo $site_title_elem; ?>> 65 65 66 <button class="nav-toggle">67 <span class="screen-reader-text"><?php _e( 'Toggle menu', 'hamilton' ); ?></span>68 < div class="bars">69 < div class="bar"></div>70 < div class="bar"></div>71 < div class="bar"></div>72 </ div>66 <button type="button" class="nav-toggle" aria-expanded="false"> 67 <span class="screen-reader-text"><?php esc_html_e( 'Toggle menu', 'hamilton' ); ?></span> 68 <span class="bars" aria-hidden="true"> 69 <span class="bar"></span> 70 <span class="bar"></span> 71 <span class="bar"></span> 72 </span> 73 73 </button><!-- .nav-toggle --> 74 74 … … 139 139 140 140 <p>© <?php echo date( 'Y' ); ?> <a href="<?php echo esc_url( home_url() ); ?>" class="site-name"><?php bloginfo( 'name' ); ?></a></p> 141 <p class="theme-by"><?php _e( 'Theme by', 'hamilton' ); ?> <a href="https://www.andersnoren.se">Anders Norén</a></p>141 <p class="theme-by"><?php esc_html_e( 'Theme by', 'hamilton' ); ?> <a href="https://andersnoren.se">Anders Norén</a></p> 142 142 143 143 </div> -
hamilton/2.1.4/readme.txt
r356895 r358231 70 70 71 71 == Changelog == 72 73 Version 2.1.4 (2026-11-09) 74 ------------------------- 75 - Added an aria-expanded attribute to the menu toggle, so screen readers announce whether the menu is open, and replaced the block elements inside it with valid button content. 76 - The menu can now be closed with the Escape key, which also returns focus to the menu toggle. 77 - Removed the underline from the links in the desktop menu, and added it with a slight offset on hover and focus instead. 78 - Added an empty alt attribute to the logo image, since the logo link already contains the site title as screen reader text. 79 - Removed vendor prefixes that are no longer needed, and replaced the rest with their standard equivalents where available. 80 - Updated the theme author link to https://andersnoren.se. 81 - Escaped the site title and translated strings in the templates. 82 - Added the theme version to the global.js and fonts.css URLs, so browsers load the updated files after a theme update. 83 - Recompressed screenshot.jpg, reducing its file size by more than half. 72 84 73 85 Version 2.1.3 (2026-11-03) … … 311 323 == Upgrade Notice == 312 324 325 = 2.1.4 = 326 Improves the accessibility of the menu, makes sure browsers load the updated scripts, removes outdated CSS, and updates the author link. 327 313 328 = 2.1.3 = 314 329 Tested with WordPress 7.1. Fixes Jetpack Infinite Scroll and the block editor styles in the iframed editor. -
hamilton/2.1.4/singular.php
r130234 r358231 26 26 27 27 <?php 28 e cho __( 'In', 'hamilton' ) .' '; the_category( ', ' );28 esc_html_e( 'In', 'hamilton' ); echo ' '; the_category( ', ' ); 29 29 30 30 if ( comments_open() ) : ?> -
hamilton/2.1.4/style.css
r356895 r358231 3 3 Theme Name: Hamilton 4 4 Text Domain: hamilton 5 Version: 2.1. 35 Version: 2.1.4 6 6 Description: Hamilton is a clean WordPress portfolio theme for creatives. It displays posts in a beautiful image grid that can be set to either two or three columns, which makes it a perfect fit for photographers, illustrators or graphic designers looking for a theme for their portfolio. It also features Block Editor/Gutenberg support, a dark mode, custom background color support, a resume page template, responsive design, Jetpack infinite scroll support, editor styling, and much more. Demo: https://hamilton.andersnoren.se 7 7 Tags: blog, two-columns, three-columns, custom-menu, featured-images, threaded-comments, translation-ready, grid-layout, custom-background, custom-logo, editor-style, sticky-post, theme-options, portfolio, photography, block-styles, wide-blocks … … 150 150 151 151 body * { 152 -webkit-box-sizing: border-box;153 -moz-box-sizing: border-box;154 152 box-sizing: border-box; 155 153 -moz-osx-font-smoothing: grayscale; … … 186 184 } 187 185 188 input::-webkit-input-placeholder { color: #767676; } 189 input:-ms-input-placeholder { color: #767676; } 190 input::-moz-placeholder { color: #767676; } 186 input::placeholder { color: #767676; opacity: 1; } 191 187 192 188 … … 516 512 text-align: center; 517 513 transition: background-color .2s ease-in-out; 518 -moz-appearance: none; 519 -webkit-appearance: none; 514 appearance: none; 520 515 } 521 516 … … 856 851 margin: -10px 0 0 -40px; 857 852 position: relative; 853 text-underline-offset: 0.2em; 858 854 z-index: 1; 859 855 } … … 898 894 .alt-nav li a { 899 895 display: block; 896 text-decoration: none; 897 } 898 899 .alt-nav li a:hover, 900 .alt-nav li a:focus { 901 text-decoration: underline; 900 902 } 901 903 … … 959 961 } 960 962 961 .alt-nav ul a:hover {962 text-decoration: none;963 }964 965 963 .alt-nav ul li:hover { background: rgba( 255, 255, 255, 0.2 ); } 966 964 .dark-mode .alt-nav ul li:hover { background: rgba( 0, 0, 0, 0.2 ); } … … 1088 1086 1089 1087 .post-preview header { 1090 display: -webkit-box;1091 display: -ms-flexbox;1092 1088 display: flex; 1093 -webkit-box-orient: vertical;1094 -webkit-box-direction: normal;1095 -ms-flex-direction: column;1096 1089 flex-direction: column; 1097 -webkit-box-pack: center;1098 -ms-flex-pack: center;1099 1090 justify-content: center; 1100 1091 opacity: 0; … … 2140 2131 .infinite-loader:before, 2141 2132 .infinite-loader:after { 2142 -webkit-animation: sk-bounce 2.0s infinite ease-in-out;2143 2133 animation: sk-bounce 2.0s infinite ease-in-out; 2144 2134 background: rgba( 0, 0, 0, .25 ); … … 2159 2149 2160 2150 .infinite-loader:after { 2161 -webkit-animation-delay: -1.0s;2162 2151 animation-delay: -1.0s; 2163 }2164 2165 @-webkit-keyframes sk-bounce {2166 0%, 100% { -webkit-transform: scale(0.0) }2167 50% { -webkit-transform: scale(1.0) }2168 2152 } 2169 2153 2170 2154 @keyframes sk-bounce { 2171 2155 0%, 100% { 2172 -webkit-transform: scale(0.0);2173 2156 transform: scale(0.0); 2174 2157 } 50% { 2175 -webkit-transform: scale(1.0);2176 2158 transform: scale(1.0); 2177 2159 } … … 2487 2469 } 2488 2470 2489 @supports ( display: -webkit-flex ) or ( display: -moz-flex ) or ( display:flex ) {2471 @supports ( display: flex ) { 2490 2472 .page-header { 2491 2473 min-height: 150px;
Note:
See TracChangeset
for help on using the changeset viewer.