Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Add 404 template #56

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ac98cc6
add patterns fold with hidden-404 file
cliffralessio Aug 16, 2024
3e54b37
Merge branch 'trunk' of https://github.com/cliffralessio/twentytwenty…
cliffralessio Aug 16, 2024
d004fa7
Merge branch 'WordPress:trunk' into trunk
cliffralessio Aug 19, 2024
6f57c9a
Add 404 template
cliffralessio Aug 19, 2024
fb0e4f1
Merge branch 'trunk' of https://github.com/cliffralessio/twentytwenty…
cliffralessio Aug 19, 2024
a22ce28
Remove class wp-image-17 in
cliffralessio Aug 19, 2024
be6e9be
Change image with that in figma file and correct some extra blank line
cliffralessio Aug 20, 2024
bc20c43
Add License link on readme.txt
cliffralessio Aug 20, 2024
95824ff
Adding some spacing presets and correcting some closures in php
cliffralessio Aug 21, 2024
8a9d981
Fixed formatting issues
cliffralessio Aug 21, 2024
162cda6
Removed @package affiunto by mistake
cliffralessio Aug 21, 2024
7e6bc47
Fixed error Lint:PHP
cliffralessio Aug 21, 2024
bb57283
fixed another error in php
cliffralessio Aug 21, 2024
b84ad70
Remove Id from image block tag
cliffralessio Aug 21, 2024
298e84b
Add context on escape php functions
cliffralessio Aug 22, 2024
e786a5c
Merge branch 'WordPress:trunk' into trunk
cliffralessio Aug 23, 2024
3e04bae
remove some hardcoded dimensions
cliffralessio Aug 23, 2024
d60fd0d
resolve php issue
cliffralessio Aug 23, 2024
92a7e09
change some designe issues
cliffralessio Aug 23, 2024
8aa0103
Remove spaces in the final line
cliffralessio Aug 24, 2024
dc89319
Remove left and right padding from the columns block
cliffralessio Aug 24, 2024
0a1f258
fixed phpcs
cliffralessio Aug 24, 2024
bd99b05
Change custom color on search button and link and className on image
cliffralessio Aug 26, 2024
3b87500
Merge branch 'trunk' into trunk
cliffralessio Sep 1, 2024
b43222b
Change layout in columns
cliffralessio Sep 1, 2024
4728aa0
Fix php error
cliffralessio Sep 1, 2024
193b800
Merge branch 'trunk' into trunk
cliffralessio Sep 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
48 changes: 48 additions & 0 deletions patterns/hidden-404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php
/**
* Title: 404
* Slug: twentytwentyfive/hidden-404
* Inserter: no
*
* @package WordPress
* @subpackage Twenty_Twenty_Five
* @since Twenty Twenty-Five 1.0
*/

?>

<!-- wp:group {"align":"wide","layout":{"type":"constrained","justifyContent":"left"}} -->
<div class="wp-block-group alignwide">
<!-- wp:columns {"align":"wide","style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50"},"blockGap":{"left":"var:preset|spacing|60"}}}} -->
<div class="wp-block-columns alignwide" style="padding-top:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50)">
<!-- wp:column {"width":"40%"} -->
<div class="wp-block-column" style="flex-basis:40%">
<!-- wp:image {"sizeSlug":"large","linkDestination":"none","className":"is-resized"} -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<!-- wp:image {"sizeSlug":"large","linkDestination":"none","className":"is-resized"} -->
<!-- wp:image {"sizeSlug":"large"} -->

Image is not resized and linked.

Copy link
Contributor

@carolinan carolinan Aug 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the default values when you add an image in the block editor.
If they are removed, the editor has to manually add the class name and change the markup to this:
<!-- wp:image {"id":19,"className":"size-large"} -->
Please motivate why it should be removed?

<figure class="wp-block-image size-large is-resized">
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/image-from-rawpixel-id-13029755-jpeg.webp" alt="<?php echo esc_attr_x( 'Small totara tree on ridge above Long Point', 'image description', 'twentytwentyfive' ); ?>"/>
</figure>
<!-- /wp:image -->
</div>
<!-- /wp:column -->

<!-- wp:column {"verticalAlignment":"bottom","width":"60%","style":{"spacing":{"padding":{"left":"var:preset|spacing|40"}}}} -->
<div class="wp-block-column is-vertically-aligned-bottom" style="padding-left:var(--wp--preset--spacing--40);flex-basis:60%">
<!-- wp:heading {"level":3,"style":{"typography":{"fontStyle":"normal","fontWeight":"500"}}} -->
<h3 class="wp-block-heading" style="font-style:normal;font-weight:500">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main heading on the page should be an H1.

<?php echo esc_html_x( 'Page not found', '404 error message', 'twentytwentyfive' ); ?>
</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>
<?php echo esc_html_x( 'The page you are looking for doesn\'t exist, or it has been moved. Please try searching using the form below.', '404 error message', 'twentytwentyfive' ); ?>
</p>
<!-- /wp:paragraph -->

<!-- wp:search {"label":"","placeholder":"<?php echo esc_attr_x( 'Type something...', 'input placeholder text', 'twentytwentyfive' ); ?>","buttonText":"<?php echo esc_attr_x( 'Search', 'button label', 'twentytwentyfive' ); ?>","style":{"border":{"radius":"50px","width":"1px"},"typography":{"fontSize":"18px"}},"borderColor":"opacity-20"} /-->
</div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->
</div>
<!-- /wp:group -->
6 changes: 6 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,9 @@ Source: https://fonts.google.com/specimen/Literata

=== Images ===

License: CC0 https://creativecommons.org/publicdomain/zero/1.0/

Small totara tree on ridge above Long Point, Porirua Harbour, by Leslie Adkin.
Public domain.
image-from-rawpixel-id-13029755-jpeg.webp
https://www.rawpixel.com/image/13029755
9 changes: 9 additions & 0 deletions templates/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- wp:template-part {"slug":"header","area":"header","tagName":"header"} /-->

<!-- wp:group {"tagName":"main","layout":{"type":"constrained","justifyContent":"left"}} -->
carolinan marked this conversation as resolved.
Show resolved Hide resolved
<main class="wp-block-group">
<!-- wp:pattern {"slug":"twentytwentyfive/hidden-404"} /-->
</main>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","area":"footer","tagName":"footer"} /-->
Loading