Skip to content
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php
/**
* Title: Site Hero (Featured)
* Slug: wporg-showcase-2022/site-hero
* Inserter: no
*
* This renders a random single sticky (hero featured) site.
*/

?>
<!-- wp:query {"queryId":0,"query":{"perPage":"1","pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"rand","author":"","search":"","exclude":[],"sticky":"only","inherit":false},"className":"is-section-site-hero"} -->
<div class="wp-block-query is-section-site-hero">
<!-- wp:post-template -->
<!-- wp:columns {"style":{"spacing":{"blockGap":{"top":"var:preset|spacing|30","left":"var:preset|spacing|50"}}}} -->
<div class="wp-block-columns">
<!-- wp:column {"width":"24%"} -->
<div class="wp-block-column" style="flex-basis:24%">
<!-- wp:group {"layout":{"type":"constrained"}} -->
<div class="wp-block-group">
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:heading {"fontSize":"heading-2"} -->
<h1 class="wp-block-heading has-heading-2-font-size"><?php esc_attr_e( 'Showcase', 'wporg' ); ?></h1>
<!-- /wp:heading -->

<!-- wp:paragraph {style":{"spacing":{"margin":{"top":"var:preset|spacing|10"}}}} -->
<p style="margin-top:var(--wp--preset--spacing--10)"><?php esc_attr_e( 'Star-studded sites built with WordPress', 'wporg' ); ?></p>
<!-- /wp:paragraph -->

<!-- wp:wporg/site-meta-list {"meta":["author","domain","category"],"showLabel":false,"style":{"elements":{"link":{"color":{"text":"var:preset|color|blueberry-2"}}},"border":{"radius":"2px","style":"solid","width":"1px"},"spacing":{"margin":{"top":"var:preset|spacing|40","bottom":"var:preset|spacing|40"}}},"borderColor":"charcoal-3","textColor":"light-grey-2"} /-->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:column -->

<!-- wp:column {"verticalAlignment":"bottom"} -->
<div class="wp-block-column is-vertically-aligned-bottom">
<!-- wp:cover {"url":"http://localhost:8888/wp-content/themes/wporg-showcase-2022/images/dots-dark.svg","isRepeated":true,"dimRatio":0,"focalPoint":{"x":0.5,"y":0},"minHeight":440,"contentPosition":"bottom center","style":{"spacing":{"padding":{"top":"70px","right":"70px","bottom":"0","left":"70px"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-cover is-repeated has-custom-content-position is-position-bottom-center" style="padding-top:70px;padding-right:70px;padding-bottom:0;padding-left:70px;min-height:440px">
<span aria-hidden="true" class="wp-block-cover__background has-background-dim-0 has-background-dim"></span>
<div role="img" class="wp-block-cover__image-background is-repeated" style="background-position:50% 0%;background-image:url(http://localhost:8888/wp-content/themes/wporg-showcase-2022/images/dots-dark.svg)"></div>
<div class="wp-block-cover__inner-container">
<!-- wp:wporg/site-screenshot {"isLink":true} /-->
</div>
</div>
<!-- /wp:cover -->
</div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->
<!-- /wp:post-template -->
</div>
<!-- /wp:query -->
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
*/

?>
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|40","bottom":"var:preset|spacing|40","right":"var:preset|spacing|edge-space","left":"var:preset|spacing|edge-space"}}},"backgroundColor":"charcoal-2","textColor":"white","className":"has-color","layout":{"type":"default"}} -->
<div class="wp-block-group alignfull has-color has-white-color has-charcoal-2-background-color has-text-color has-background" style="padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--edge-space);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--edge-space)">
<!-- wp:paragraph -->
<p>Slider…</p>
<!-- /wp:paragraph -->
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"right":"var:preset|spacing|edge-space","left":"var:preset|spacing|edge-space"}}},"backgroundColor":"charcoal-1","textColor":"white","className":"has-color","layout":{"type":"constrained","wideSize":"1760px"}} -->
<div class="wp-block-group alignfull has-color has-white-color has-charcoal-1-background-color has-text-color has-background" style="padding-right:var(--wp--preset--spacing--edge-space);padding-left:var(--wp--preset--spacing--edge-space)">
<!-- wp:pattern {"slug":"wporg-showcase-2022/site-hero"} /-->
</div>
<!-- /wp:group -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@
}
}

.is-section-site-hero & {
max-width: none;
border-width: 20px;
border-bottom-width: 0;
border-radius: 30px 30px 0 0; // 30 = 10px inner radius plus the 20px border size.
border-color: var(--wp--preset--color--charcoal-2) !important;
}

a {
display: block;

Expand Down
16 changes: 16 additions & 0 deletions source/wp-content/themes/wporg-showcase-2022/src/style/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ a:where(:not(.wp-element-button)):focus-visible {
border-radius: 2px;
}

/* Site Hero section */
.is-section-site-hero {

/* Switch down to one column when image gets squished. */
@media (max-width: 1179px) {
.wp-block-columns {
flex-direction: column;
gap: 0;
}

.wp-block-cover {
min-height: 0 !important;
}
}
}

/* Style the site grid. */
.wp-block-query .is-layout-grid {
.wp-block-post-title {
Expand Down