Skip to content

Commit

Permalink
Otis: Add theme for review (#7013)
Browse files Browse the repository at this point in the history
* Add Otis theme for review

* removing unused css

* set versionto 1.0.0
  • Loading branch information
matiasbenedetto authored Jun 27, 2023
1 parent fed72d5 commit bfd45e7
Show file tree
Hide file tree
Showing 22 changed files with 856 additions and 0 deletions.
Binary file added otis/assets/fonts/open-sauce-sans_italic_300.ttf
Binary file not shown.
Binary file added otis/assets/fonts/open-sauce-sans_italic_400.ttf
Binary file not shown.
Binary file added otis/assets/fonts/open-sauce-sans_italic_700.ttf
Binary file not shown.
Binary file added otis/assets/fonts/open-sauce-sans_normal_300.ttf
Binary file not shown.
Binary file added otis/assets/fonts/open-sauce-sans_normal_400.ttf
Binary file not shown.
Binary file added otis/assets/fonts/open-sauce-sans_normal_700.ttf
Binary file not shown.
60 changes: 60 additions & 0 deletions otis/functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php
/**
* Otis functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Otis
* @since Otis 1.0
*/


if ( ! function_exists( 'otis_support' ) ) :

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

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

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

endif;

add_action( 'after_setup_theme', 'otis_support' );

if ( ! function_exists( 'otis_styles' ) ) :

/**
* Enqueue styles.
*
* @since Otis 1.0
*
* @return void
*/
function otis_styles() {

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

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

}

endif;

add_action( 'wp_enqueue_scripts', 'otis_styles' );
13 changes: 13 additions & 0 deletions otis/parts/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- wp:spacer {"height":"var(\u002d\u002dwp\u002d\u002dpreset\u002d\u002dspacing\u002d\u002d80)"} -->
<div style="height:var(--wp--preset--spacing--80)" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)"><!-- wp:paragraph {"fontSize":"medium"} -->
<p class="has-medium-font-size"><a href="http://workshoptheme.local">Instagram</a> / <a href="http://workshoptheme.local">LinkedIn</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"align":"left","style":{"typography":{"fontSize":"0.6rem"}}} -->
<p class="has-text-align-left" style="font-size:0.6rem">Designed with <a rel="nofollow" href="https://wordpress.org">WordPress</a></p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->
15 changes: 15 additions & 0 deletions otis/parts/header-2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)"><!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"width":"50%"} -->
<div class="wp-block-column" style="flex-basis:50%"><!-- wp:site-title {"style":{"typography":{"fontSize":"7rem","fontStyle":"normal","fontWeight":"400"}}} /--></div>
<!-- /wp:column -->

<!-- wp:column {"width":"50%"} -->
<div class="wp-block-column" style="flex-basis:50%"><!-- wp:post-title {"textAlign":"right","style":{"typography":{"fontSize":"7rem","fontStyle":"normal","fontWeight":"300"}}} /--></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->

<!-- wp:separator -->
<hr class="wp-block-separator has-alpha-channel-opacity"/>
<!-- /wp:separator --></div>
<!-- /wp:group -->
7 changes: 7 additions & 0 deletions otis/parts/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)"><!-- wp:site-title {"style":{"typography":{"fontSize":"7rem","fontStyle":"normal","fontWeight":"400"}}} /-->

<!-- wp:separator -->
<hr class="wp-block-separator has-alpha-channel-opacity"/>
<!-- /wp:separator --></div>
<!-- /wp:group -->
11 changes: 11 additions & 0 deletions otis/parts/post-meta.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- wp:group {"layout":{"type":"default"}} -->
<div class="wp-block-group"><!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|30"}},"layout":{"type":"flex"}} -->
<div class="wp-block-group"><!-- wp:post-date {"format":"M j","isLink":true,"style":{"typography":{"fontSize":"0.8rem"}}} /-->

<!-- wp:paragraph {"style":{"typography":{"fontSize":"0.8rem"}}} -->
<p style="font-size:0.8rem">———</p>
<!-- /wp:paragraph -->

<!-- wp:post-terms {"term":"category","style":{"typography":{"fontSize":"0.8rem"}}} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
18 changes: 18 additions & 0 deletions otis/patterns/404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
/**
* Title: A 404 page
* Slug: otis/404
* Categories: 404
* Block Types: core/template/404
* Inserter: yes
*/

?>

<!-- wp:heading {"textAlign":"center","level":1,"fontSize":"x-large"} -->
<h1 class="has-text-align-center has-x-large-font-size" id="oops-that-page-can-t-be-found"><?php echo esc_html__( 'Oops! That page can&rsquo;t be found.', 'otis' ); ?></h1>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><?php echo esc_html__( 'It looks like nothing was found at this location. Maybe try a search?', 'otis' ); ?></p>
<!-- /wp:paragraph -->
33 changes: 33 additions & 0 deletions otis/patterns/footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php
/**
* Title: Default footer
* Slug: otis/footer
* Categories: footer
* Block Types: core/template-part/footer
*/
?>

<!-- wp:spacer {"height":"var(--wp--preset--spacing--80)"} -->
<div style="height:var(--wp--preset--spacing--80)" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:group {"layout":{"type":"constrained"}} -->
<div class="wp-block-group">
<!-- wp:group {"style":{"spacing":{"padding":{"top":"var(--wp--preset--spacing--60)","bottom":"var(--wp--preset--spacing--60)"}}}} -->
<div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60)">
<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center">
<?php
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'otis' ) ) . '" rel="nofollow">WordPress</a>';
echo sprintf(
/* Translators: WordPress link. */
esc_html__( 'Designed with %1$s', 'otis' ),
$wordpress_link
);
?>
</p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
25 changes: 25 additions & 0 deletions otis/patterns/posts.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
/**
* Title: Post titles separated by lines
* Slug: otis/posts
* Categories: query
* Block Types: core/template/posts
* Inserter: yes
*/
?>

<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group alignfull" style="padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)"><!-- wp:query {"queryId":7,"query":{"perPage":3,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false},"displayLayout":{"type":"list"},"align":"full"} -->
<div class="wp-block-query alignfull"><!-- wp:post-template -->
<!-- wp:post-title {"isLink":true,"style":{"typography":{"fontStyle":"normal","fontWeight":"300"}},"fontSize":"x-large"} /-->

<!-- wp:spacer {"height":"10px"} -->
<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:separator {"opacity":"css"} -->
<hr class="wp-block-separator has-css-opacity"/>
<!-- /wp:separator -->
<!-- /wp:post-template --></div>
<!-- /wp:query --></div>
<!-- /wp:group -->
32 changes: 32 additions & 0 deletions otis/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
=== Otis ===
Contributors: Automattic
Requires at least: 5.8
Tested up to: 5.9
Requires PHP: 5.7
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

== Description ==

Otis is a WordPress block theme that is well-suited for personal blogging. It is designed to provide a polished, modern user experience. Its default templates include an opinionated header template with large type, and straightforward single and page templates, which are particularly useful for users who do not want to include images on their site. Otis\' strong design point of view encourages users to follow its design principles. It is focused on simplicity and readability, with a clean and uncluttered layout that allows readers to easily navigate content.

== Changelog ==

= 0.0.1 =
* Initial release

== Copyright ==

Otis WordPress Theme, (C) 2023 Automattic
Otis is distributed under the terms of the GNU GPL.
Otis is based on Block Canvas (https://github.com/Automattic/themes/tree/trunk/block-canvas), (C) Automattic, [GPLv2 or later](http://www.gnu.org/licenses/gpl-2.0.html)

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.
Binary file added otis/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions otis/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
Theme Name: Otis
Theme URI:
Author: Automattic
Author URI: https://automattic.com
Description: Otis is a WordPress block theme that is well-suited for personal blogging. It is designed to provide a polished, modern user experience. Its default templates include an opinionated header template with large type, and straightforward single and page templates, which are particularly useful for users who do not want to include images on their site. Otis\' strong design point of view encourages users to follow its design principles. It is focused on simplicity and readability, with a clean and uncluttered layout that allows readers to easily navigate content.
Requires at least: 5.8
Tested up to: 5.9
Requires PHP: 5.7
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: otis
Tags: blog, news, portfolio, one-column, wide-blocks, block-patterns, block-styles, custom-colors, custom-header, custom-menu, editor-style, full-site-editing, rtl-language-support, theme-options, translation-ready
/*
* 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);
}

/*
* Link styles
* https://github.com/WordPress/gutenberg/issues/42319
*/
a {
text-decoration-thickness: .0625em !important;
text-underline-offset: .15em;
}
19 changes: 19 additions & 0 deletions otis/templates/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- wp:template-part {"slug":"header","theme":"otis","tagName":"header"} /-->

<!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)"><!-- wp:query {"queryId":7,"query":{"perPage":3,"pages":3,"offset":0,"postType":"page","order":"asc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"parents":[]},"displayLayout":{"type":"list"},"layout":{"type":"default"}} -->
<div class="wp-block-query"><!-- wp:post-template -->
<!-- wp:post-title {"isLink":true,"style":{"typography":{"fontSize":"7rem","fontStyle":"normal","fontWeight":"300"}}} /-->

<!-- wp:separator {"opacity":"css"} -->
<hr class="wp-block-separator has-css-opacity"/>
<!-- /wp:separator -->
<!-- /wp:post-template --></div>
<!-- /wp:query --></div>
<!-- /wp:group -->

<!-- wp:spacer {"height":"140px"} -->
<div style="height:140px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:template-part {"slug":"footer","theme":"otis","tagName":"footer"} /-->
35 changes: 35 additions & 0 deletions otis/templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!-- wp:template-part {"slug":"header","theme":"otis"} /-->

<!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)"><!-- wp:query {"queryId":7,"query":{"perPage":3,"pages":0,"offset":0,"postType":"page","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"parents":[]},"displayLayout":{"type":"list"},"layout":{"type":"default"}} -->
<div class="wp-block-query"><!-- wp:post-template -->
<!-- wp:post-title {"isLink":true,"style":{"typography":{"fontSize":"7rem","fontStyle":"normal","fontWeight":"300"}}} /-->

<!-- wp:separator {"opacity":"css"} -->
<hr class="wp-block-separator has-css-opacity"/>
<!-- /wp:separator -->
<!-- /wp:post-template --></div>
<!-- /wp:query --></div>
<!-- /wp:group -->

<!-- wp:spacer -->
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group alignfull" style="padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)"><!-- wp:query {"queryId":7,"query":{"perPage":3,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false},"displayLayout":{"type":"list"},"align":"full"} -->
<div class="wp-block-query alignfull"><!-- wp:post-template -->
<!-- wp:post-title {"isLink":true,"style":{"typography":{"fontStyle":"normal","fontWeight":"300"}},"fontSize":"x-large"} /-->

<!-- wp:spacer {"height":"10px"} -->
<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:separator {"opacity":"css"} -->
<hr class="wp-block-separator has-css-opacity"/>
<!-- /wp:separator -->
<!-- /wp:post-template --></div>
<!-- /wp:query --></div>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer","theme":"otis"} /-->
21 changes: 21 additions & 0 deletions otis/templates/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- wp:template-part {"slug":"header-2","theme":"otis"} /-->

<!-- wp:group {"style":{"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="padding-top:0;padding-right:0;padding-bottom:0;padding-left:0"><!-- wp:group {"tagName":"main","lock":{"move":false,"remove":false},"style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50"},"blockGap":"var:preset|spacing|60"}},"layout":{"type":"constrained"}} -->
<main class="wp-block-group" style="padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)"><!-- wp:spacer -->
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:post-content {"lock":{"move":false,"remove":false},"align":"full","style":{"dimensions":{"minHeight":"700px"}},"layout":{"type":"constrained","justifyContent":"left"}} /-->

<!-- wp:spacer -->
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer --></main>
<!-- /wp:group -->

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

<!-- wp:template-part {"slug":"footer","theme":"otis","tagName":"footer"} /-->
37 changes: 37 additions & 0 deletions otis/templates/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!-- wp:template-part {"slug":"header","theme":"otis"} /-->

<!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)"><!-- wp:spacer -->
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:post-title {"style":{"typography":{"fontSize":"5rem"},"spacing":{"padding":{"bottom":"var:preset|spacing|40"}}}} /-->

<!-- wp:template-part {"slug":"post-meta","theme":"otis","area":"uncategorized"} /--></div>
<!-- /wp:group -->

<!-- wp:group {"tagName":"main","lock":{"move":false,"remove":false},"style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50"},"blockGap":"var:preset|spacing|60"}},"layout":{"type":"constrained","contentSize":"700px","justifyContent":"left"}} -->
<main class="wp-block-group" style="padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)"><!-- wp:spacer {"height":"10px"} -->
<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:post-content {"lock":{"move":false,"remove":false},"layout":{"type":"default"}} /-->

<!-- wp:spacer -->
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group alignfull" style="padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)"><!-- wp:separator {"className":"is-style-wide"} -->
<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide"/>
<!-- /wp:separator -->

<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|50","right":"0","bottom":"var:preset|spacing|50","left":"0"}},"border":{"width":"0px","style":"none"}},"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"}} -->
<div class="wp-block-group alignfull" style="border-style:none;border-width:0px;padding-top:var(--wp--preset--spacing--50);padding-right:0;padding-bottom:var(--wp--preset--spacing--50);padding-left:0"><!-- wp:post-navigation-link {"type":"previous","label":"Previous: ","showTitle":true} /-->

<!-- wp:post-navigation-link {"textAlign":"right","label":"Next: ","showTitle":true} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group --></main>
<!-- /wp:group -->

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

0 comments on commit bfd45e7

Please sign in to comment.