Skip to content

Commit

Permalink
Layover: add theme (#7890)
Browse files Browse the repository at this point in the history
* Layover: add theme

* Layover: Fixing fonts and variations

* Layover: Cover image displays as a link

* Fix home image.

---------

Co-authored-by: Henrique 'Foca' Iamarino <[email protected]>
Co-authored-by: jasmussen <[email protected]>
  • Loading branch information
3 people authored Aug 13, 2024
1 parent c53b295 commit 4060e20
Show file tree
Hide file tree
Showing 40 changed files with 1,495 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added layover/assets/images/layover_background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions layover/functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php
/**
* Layover functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Layover
* @since Layover 1.0
*/


if ( ! function_exists( 'layover_support' ) ) :

/**
* Sets up theme defaults and registers support for various WordPress features.
*
* @since Layover 1.0
*
* @return void
*/
function layover_support() {

// Enqueue editor styles.
add_editor_style( 'style.css' );

// Make theme available for translation.
load_theme_textdomain( 'layover' );
}

endif;

add_action( 'after_setup_theme', 'layover_support' );

if ( ! function_exists( 'layover_styles' ) ) :

/**
* Enqueue styles.
*
* @since Layover 1.0
*
* @return void
*/
function layover_styles() {

// Register theme stylesheet.
wp_register_style(
'layover-style',
get_stylesheet_directory_uri() . '/style.css',
array(),
wp_get_theme()->get( 'Version' )
);

// Enqueue theme stylesheet.
wp_enqueue_style( 'layover-style' );

}

endif;

add_action( 'wp_enqueue_scripts', 'layover_styles' );
1 change: 1 addition & 0 deletions layover/parts/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"layover/footer"} /-->
1 change: 1 addition & 0 deletions layover/parts/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"layover/header"} /-->
Empty file added layover/parts/post-meta.html
Empty file.
31 changes: 31 additions & 0 deletions layover/patterns/404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
/**
* Title: 404
* Slug: layover/404
* Categories: hidden
* Inserter: no
*/
?>
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->

<!-- wp:group {"style":{"spacing":{"padding":{"bottom":"4rem","top":"4rem"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="padding-top:4rem;padding-bottom:4rem"><!-- wp:group -->
<div class="wp-block-group"><!-- wp:group {"style":{"spacing":{"blockGap":"0rem"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"center"}} -->
<div class="wp-block-group"><!-- wp:heading {"textAlign":"center","level":1,"align":"wide"} -->
<h1 class="wp-block-heading alignwide has-text-align-center" id="oops-that-page-can-t-be-found"><?php echo __('Oops!', 'layover');?></h1>
<!-- /wp:heading -->

<!-- wp:heading {"textAlign":"center","level":1,"align":"wide"} -->
<h1 class="wp-block-heading alignwide has-text-align-center" id="oops-that-page-can-t-be-found"><?php echo __('That page can’t be found.', 'layover');?></h1>
<!-- /wp:heading --></div>
<!-- /wp:group -->

<!-- wp:paragraph {"align":"center","fontSize":"medium"} -->
<p class="has-text-align-center has-medium-font-size"><?php echo __('It looks like nothing was found at this location.<br>Maybe try a search?', 'layover');?></p>
<!-- /wp:paragraph -->

<!-- wp:search {"showLabel":false,"placeholder":"SEARCH","buttonPosition":"button-inside","buttonUseIcon":true,"style":{"border":{"width":"0px","style":"none"}}} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->
52 changes: 52 additions & 0 deletions layover/patterns/comments.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php
/**
* Title: Comments
* slug: layover/comments
* inserter: no
*/

?>

<!-- wp:comments {"className":"wp-block-comments-query-loop"} -->
<div class="wp-block-comments wp-block-comments-query-loop">
<!-- wp:comments-title {"level":3} /-->

<!-- wp:comment-template -->
<!-- wp:group {"style":{"spacing":{"margin":{"top":"0","bottom":"var:preset|spacing|50"}}}} -->
<div class="wp-block-group" style="margin-top:0;margin-bottom:var(--wp--preset--spacing--50)">
<!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap"},"style":{"spacing":{"blockGap":"0.5em"}}} -->
<div class="wp-block-group">
<!-- wp:avatar {"size":40,"style":{"spacing":{"margin":{"top":"0.5em"}}}} /-->

<!-- wp:group -->
<div class="wp-block-group">
<!-- wp:comment-author-name /-->

<!-- wp:group {"layout":{"type":"flex"},"style":{"spacing":{"margin":{"top":"0px","bottom":"0px"},"blockGap":"0.5em"}}} -->
<div class="wp-block-group" style="margin-top:0px;margin-bottom:0px">
<!-- wp:comment-date {"format":"F j, Y \\a\\t g:i a"} /-->

<!-- wp:comment-edit-link /-->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->

<!-- wp:comment-content /-->

<!-- wp:comment-reply-link /-->
</div>
<!-- /wp:group -->
<!-- /wp:comment-template -->

<!-- wp:comments-pagination -->
<!-- wp:comments-pagination-previous /-->
<!-- wp:comments-pagination-numbers /-->
<!-- wp:comments-pagination-next /-->
<!-- /wp:comments-pagination -->

<!-- wp:post-comments-form /-->
</div>
<!-- /wp:comments -->
13 changes: 13 additions & 0 deletions layover/patterns/footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
/**
* Title: footer
* Slug: layover/footer
* Categories: hidden
* Inserter: no
*/
?>
<!-- wp:group {"style":{"spacing":{"padding":{"bottom":"4rem","top":"4rem"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="padding-top:4rem;padding-bottom:4rem"><!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center"><?php echo __('Designed with <a href="https://wordpress.org" rel="nofollow">WordPress</a>.', 'layover');?></p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->
25 changes: 25 additions & 0 deletions layover/patterns/header.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
/**
* Title: header
* Slug: layover/header
* Categories: hidden
* Inserter: no
*/
?>
<!-- wp:group {"style":{"spacing":{"padding":{"top":"4rem"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="padding-top:4rem"><!-- wp:group {"layout":{"type":"flex","orientation":"vertical","justifyContent":"center"}} -->
<div class="wp-block-group"><!-- wp:site-logo {"width":24,"shouldSyncIcon":true,"style":{"color":[]}} /-->

<!-- wp:site-title {"style":{"spacing":{"blockGap":"2rem"}}} /--></div>
<!-- /wp:group -->

<!-- wp:group {"style":{"dimensions":{"minHeight":""}},"layout":{"type":"constrained","contentSize":"40px"}} -->
<div class="wp-block-group"><!-- wp:group {"style":{"spacing":{"blockGap":"0.5rem","padding":{"top":"2px","right":"2px","bottom":"2px","left":"2px"}},"border":{"top":{"width":"1px"},"bottom":{"width":"1px"}},"dimensions":{"minHeight":""}},"layout":{"type":"constrained","contentSize":""}} -->
<div class="wp-block-group" style="border-top-width:1px;border-bottom-width:1px;padding-top:2px;padding-right:2px;padding-bottom:2px;padding-left:2px"></div>
<!-- /wp:group --></div>
<!-- /wp:group -->

<!-- wp:paragraph {"align":"center","style":{"elements":{"link":{"color":{"text":"var:preset|color|foreground"}}}},"textColor":"foreground"} -->
<p class="has-text-align-center has-foreground-color has-text-color has-link-color"><?php echo __('Shakespeare published 154 sonnets in his <em>quarto</em> in 1609. While the initial 126 are addressed to a young man, the final 28 are directed toward an enigmatic woman referred to as the <em>dark lady</em>.', 'layover');?></p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->
10 changes: 10 additions & 0 deletions layover/patterns/hidden-no-results-content.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
/**
* Title: Hidden No Results Content
* Slug: layover/hidden-no-results-content
* Inserter: no
*/
?>
<!-- wp:paragraph -->
<p><?php echo esc_html_x( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'Message explaining that there are no results returned from a search', 'layover' ); ?></p>
<!-- /wp:paragraph -->
39 changes: 39 additions & 0 deletions layover/patterns/home.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
/**
* Title: home
* Slug: layover/home
* Categories: hidden
* Inserter: no
*/
?>
<!-- wp:cover {"url":"<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/layover_background.jpg","hasParallax":true,"dimRatio":0,"customOverlayColor":"#212121","isUserOverlayColor":true,"contentPosition":"center center","style":{"spacing":{"margin":{"top":"0rem","bottom":"0rem"},"padding":{"top":"0rem","right":"0rem","bottom":"0rem","left":"0rem"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-cover has-parallax" style="margin-top:0rem;margin-bottom:0rem;padding-top:0rem;padding-right:0rem;padding-bottom:0rem;padding-left:0rem"><span aria-hidden="true" class="wp-block-cover__background has-background-dim-0 has-background-dim" style="background-color:#212121"></span><div class="wp-block-cover__image-background has-parallax" style="background-position:50% 50%;background-image:url(<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/layover_background.jpg)"></div><div class="wp-block-cover__inner-container"><!-- wp:template-part {"slug":"header","align":"wide"} /-->

<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"4rem","bottom":"4rem"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignwide" style="padding-top:4rem;padding-bottom:4rem"><!-- wp:query {"queryId":0,"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true,"parents":[]},"tagName":"main","align":"wide","layout":{"type":"constrained"}} -->
<main class="wp-block-query alignwide"><!-- wp:post-template {"align":"wide","style":{"spacing":{"blockGap":"8rem"}},"layout":{"type":"default"}} -->
<!-- wp:post-title {"textAlign":"center","level":1,"isLink":true,"align":"wide","style":{"spacing":{"padding":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"margin":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}}} /-->

<!-- wp:group {"style":{"spacing":{"padding":{"top":"1rem","bottom":"1rem"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="padding-top:1rem;padding-bottom:1rem"><!-- wp:post-excerpt {"textAlign":"center","moreText":"More.","showMoreOnNewLine":false,"excerptLength":23} /--></div>
<!-- /wp:group -->
<!-- /wp:post-template -->

<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"center"}} -->
<!-- wp:query-pagination-previous {"label":"Prev"} /-->

<!-- wp:query-pagination-numbers /-->

<!-- wp:query-pagination-next {"label":"Next"} /-->
<!-- /wp:query-pagination -->

<!-- wp:query-no-results -->
<!-- wp:paragraph {"align":"center","placeholder":"Add text or blocks that will display when a query returns no results."} -->
<p class="has-text-align-center"><?php echo __('There are no posts available. Try creating one.', 'layover');?></p>
<!-- /wp:paragraph -->
<!-- /wp:query-no-results --></main>
<!-- /wp:query --></div>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","tagName":"footer","align":"wide"} /--></div></div>
<!-- /wp:cover -->
58 changes: 58 additions & 0 deletions layover/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
== Layover ==

Contributors: Automattic
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 5.7
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html


== Description ==

Layover displays large titles and excerpts that scroll over an image on the Homepage and neat single pages for users who want their blogging to be simple.

== Changelog ==

= 1.0.0 =
* Initial release


== Copyright ==

Layover WordPress Theme, (C) 2024 Automattic
Layover is distributed under the terms of the GNU GPL.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.


Layover is based on Overlay (), (C) Automattic, [GPLv2 or later](http://www.gnu.org/licenses/gpl-2.0.html)


== Images ==
William II, Prince of Orange, and his Bride, Mary Stuart (1641) - Anthony van Dyck (Flemish, 1599-1641)
License: Public domain
File: https://artvee.com/dl/william-ii-prince-of-orange-and-his-bride-mary-stuart/


== Fonts ==

Manrope
Copyright 2019 The Manrope Project Authors (https://github.com/sharanda/manrope)
Source: http://gent.media
License: This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: http://scripts.sil.org/OFL

DM Sans
Copyright 2014 The DM Sans Project Authors (https://github.com/googlefonts/dm-fonts)
Source: https://www.colophon-foundry.org
License: This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: https://scripts.sil.org/OFL


Binary file added layover/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 75 additions & 0 deletions layover/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*
Theme Name: Layover
Theme URI:
Author: Automattic
Author URI: https://wordpress.org
Description: Layover displays large titles and excerpts that scroll over an image on the Homepage and neat single pages for users who want their blogging to be simple.
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 5.7
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: layover
Tags: blog, one-column, wide-blocks, block-patterns, custom-background, custom-colors, custom-logo, custom-menu, editor-style, featured-image-header, featured-images, flexible-header, full-site-editing, full-width-template, post-formats, rtl-language-support, template-editing, theme-options, threaded-comments, translation-ready
/* Progresive enhancement to reduce widows and orphans.
/* https://github.com/WordPress/gutenberg/issues/55190
*/

h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption {
text-wrap: balance;
}
p {
text-wrap: pretty;
}

/**
* Currently table styles are only available with 'wp-block-styles'
* theme support (block css) thus the following needs to be included
* since 'wp-block-styles' aren't used for this theme.
* https://github.com/WordPress/gutenberg/issues/45065
*/

/*
* Control the hover stylings of outline block style.
* Unnecessary once block styles are configurable via theme.json
* https://github.com/WordPress/gutenberg/issues/42794
*/
.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background):hover {
background-color: var(--wp--preset--color--secondary);
color: var(--wp--preset--color--background);
border-color: var(--wp--preset--color--secondary);
}

/**
* Currently table styles are only available with 'wp-block-styles'
* theme support (block css) thus the following needs to be included
* since 'wp-block-styles' aren't used for this theme.
* https://github.com/WordPress/gutenberg/issues/45065
*/
.wp-block-table thead {
border-bottom: 3px solid;
}
.wp-block-table tfoot {
border-top: 3px solid;
}
.wp-block-table td,
.wp-block-table th {
padding: var(--wp--preset--spacing--30);
border: 1px solid;
word-break: normal;
}
.wp-block-table figcaption {
font-size: var(--wp--preset--font-size--small);
text-align: center;
}

/*
* Link styles
* https://github.com/WordPress/gutenberg/issues/42319
*/
a {
text-decoration-thickness: .0625em !important;
text-underline-offset: .15em;
}
Loading

0 comments on commit 4060e20

Please sign in to comment.