Skip to content

Commit

Permalink
Templates: Add a basic single photo template
Browse files Browse the repository at this point in the history
See #4
  • Loading branch information
ryelle committed Oct 18, 2024
1 parent a79ff45 commit 1b60357
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
44 changes: 44 additions & 0 deletions source/wp-content/themes/wporg-photos-2024/patterns/single.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
/**
* Title: Photo Detail
* Slug: wporg-photos-2024/single
* Inserter: no
*/

?>
<!-- wp:group {"align":"wide"} -->
<div class="wp-block-group alignwide">

<!-- wp:post-title {"level":1,"fontSize":"heading-3"} /-->

<!-- wp:group {"layout":{"type":"flex","flexWrap":"wrap"},"align":"wide"} -->
<div class="wp-block-group alignwide">
<!-- wp:wporg/favorite-button /-->

<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|10"}},"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group">
<!-- wp:avatar {"size":24,"style":{"border":{"radius":"100%"}}} /-->

<!-- wp:post-author-name {"isLink":true,"style":{"typography":{"fontStyle":"normal"},"elements":{"link":{"color":{"text":"var:preset|color|charcoal-1"}}}},"textColor":"charcoal-1","fontSize":"small"} /-->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->

</div>
<!-- /wp:group -->

<!-- wp:group {"align":"wide","backgroundColor":"light-grey-1"} -->
<div class="wp-block-group alignwide has-light-grey-1-background-color has-background">
<!-- wp:post-featured-image /-->
</div>
<!-- /wp:group -->

<!-- wp:post-terms {"term":"photo_tag","prefix":"Tags "} /-->
<!-- wp:post-terms {"term":"photo_category","prefix":"Category "} /-->
<!-- wp:post-terms {"term":"photo_color","prefix":"Color "} /-->
<!-- wp:post-terms {"term":"photo_orientation","prefix":"Orientation "} /-->

<!-- wp:spacer {"height":"60px","align":"wide","style":{"spacing":{"margin":{"top":"0","bottom":"var:preset|spacing|50"}}}} -->
<div style="margin-top:0;margin-bottom:var(--wp--preset--spacing--50);height:60px" aria-hidden="true" class="wp-block-spacer alignwide"></div>
<!-- /wp:spacer -->
15 changes: 15 additions & 0 deletions source/wp-content/themes/wporg-photos-2024/templates/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- wp:pattern {"slug":"wporg-photos-2024/header"} /-->

<!-- wp:group {"tagName":"main","layout":{"type":"constrained"},"className":"entry-content","style":{"spacing":{"blockGap":"0px"}}} -->
<main class="wp-block-group entry-content">

<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"right":"var:preset|spacing|edge-space","left":"var:preset|spacing|edge-space"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull" style="padding-right:var(--wp--preset--spacing--edge-space);padding-left:var(--wp--preset--spacing--edge-space)">
<!-- wp:pattern {"slug":"wporg-photos-2024/single"} /-->
</div>
<!-- /wp:group -->

</main>
<!-- /wp:group -->

<!-- wp:wporg/global-footer /-->

0 comments on commit 1b60357

Please sign in to comment.