Skip to content

Commit

Permalink
Pieria: add theme (#7202)
Browse files Browse the repository at this point in the history
* Add pieria theme

A theme created by @henriqueiamarino

* Make only the sidebar a pattern

* Remove theme attribute

* Update pieria/readme.txt

Co-authored-by: Sarah Norris <[email protected]>

* Update pieria/style.css

Co-authored-by: Sarah Norris <[email protected]>

* Update pieria/style.css

Co-authored-by: Sarah Norris <[email protected]>

* Update pieria/style.css

Co-authored-by: Sarah Norris <[email protected]>

* Translate 404 template, move to pattern

* Remove unused styles

* Make sidebar credit text translatable

* Replace separator paragraph with separator block

* Remove unused fonts

* Add asset licenses to readme file

* Add missing closing p tag

* Convert embedded image to webp

* Move translators comment according to style rules

* fix separator

---------

Co-authored-by: Sarah Norris <[email protected]>
  • Loading branch information
vcanales and mikachan authored Jul 7, 2023
1 parent f36cd3e commit 33a5881
Show file tree
Hide file tree
Showing 27 changed files with 1,206 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 added pieria/assets/images/sappho-statue_bw.webp
Binary file not shown.
60 changes: 60 additions & 0 deletions pieria/functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php
/**
* Pieria functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Pieria
* @since Pieria 1.0
*/


if ( ! function_exists( 'pieria_support' ) ) :

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

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

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

endif;

add_action( 'after_setup_theme', 'pieria_support' );

if ( ! function_exists( 'pieria_styles' ) ) :

/**
* Enqueue styles.
*
* @since Pieria 1.0
*
* @return void
*/
function pieria_styles() {

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

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

}

endif;

add_action( 'wp_enqueue_scripts', 'pieria_styles' );
1 change: 1 addition & 0 deletions pieria/parts/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"pieria/footer"} /-->
9 changes: 9 additions & 0 deletions pieria/parts/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- wp:group {"layout":{"type":"constrained","justifyContent":"left"}} -->
<div class="wp-block-group"><!-- wp:group {"align":"full","style":{"spacing":{"padding":{"bottom":"var:preset|spacing|20","top":"var:preset|spacing|20","right":"var:preset|spacing|20","left":"var:preset|spacing|20"}}},"layout":{"type":"flex","justifyContent":"space-between"}} -->
<div class="wp-block-group alignfull" style="padding-top:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)"></div>
<!-- /wp:group --></div>
<!-- /wp:group -->

<!-- wp:spacer {"height":"8rem","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}}} -->
<div style="margin-top:0px;margin-bottom:0px;height:8rem" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
9 changes: 9 additions & 0 deletions pieria/parts/post-meta.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- wp:group {"layout":{"type":"constrained","justifyContent":"left"}} -->
<div class="wp-block-group"><!-- wp:group {"layout":{"type":"flex"}} -->
<div class="wp-block-group"><!-- wp:post-date {"format":"M j, Y","isLink":true,"fontSize":"small"} /-->

<!-- wp:post-terms {"term":"category","fontSize":"small"} /-->

<!-- wp:post-terms {"term":"post_tag","fontSize":"small"} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
31 changes: 31 additions & 0 deletions pieria/patterns/404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
/**
* Title: 404
* Slug: pieria/404
* Categories: featured, 404
*/
?>

<!-- wp:heading {"textAlign":"left","level":1} -->
<h1 class="wp-block-heading has-text-align-left" id="oops-that-page-can-t-be-found">
<?php
/* Translators: 404 message. */
echo sprintf(
esc_html__( 'Oops! That page can’t be found.', 'pieria' )
);
?>
</h1>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>
<?php
/* Translators: suggest a search */
echo sprintf(
esc_html__( 'It looks like nothing was found at this location. Maybe try a search?', 'pieria' )
);
?>
</p>
<!-- /wp:paragraph -->

<!-- wp:search {"label":"","showLabel":false,"width":75,"widthUnit":"%","buttonText":"Search","buttonPosition":"button-inside","style":{"border":{"radius":"0px","width":"1px"}},"borderColor":"background","fontSize":"small"} /-->
52 changes: 52 additions & 0 deletions pieria/patterns/comments.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php
/**
* Title: Comments
* slug: pieria/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 -->
33 changes: 33 additions & 0 deletions pieria/patterns/footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php
/**
* Title: Default footer
* Slug: pieria/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
/* Translators: WordPress link. */
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'pieria' ) ) . '" rel="nofollow">WordPress</a>';
echo sprintf(
esc_html__( 'Designed with %1$s', 'pieria' ),
$wordpress_link
);
?>
</p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
36 changes: 36 additions & 0 deletions pieria/patterns/sidebar.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php
/**
* Title: sidebar
* Slug: pieria/sidebar
* Categories: hidden
* Inserter: no
*/
?>
<!-- wp:group {"style":{"spacing":{"blockGap":"3rem","padding":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group" style="margin-top:0px;margin-bottom:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px"><!-- wp:group {"style":{"spacing":{"blockGap":"0.5rem","padding":{"top":"0rem","right":"0rem","bottom":"0rem","left":"0rem"},"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="margin-top:0px;margin-bottom:0px;padding-top:0rem;padding-right:0rem;padding-bottom:0rem;padding-left:0rem"><!-- wp:paragraph -->
<p>Sappho, spelled (in the dialect spoken by the poet) Psappho, (born c. 610, Lesbos, Greece — died c. 570 BCE). A lyric poet greatly admired in all ages for the beauty of her writing style.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Her language contains elements from Aeolic vernacular and poetic tradition, with traces of epic vocabulary familiar to readers of Homer. She has the ability to judge critically her own ecstasies and grief, and her emotions lose nothing of their force by being recollected in tranquillity.</p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->

<!-- wp:image {"id":145,"sizeSlug":"full","linkDestination":"none","style":{"color":{"duotone":["#111111","#ffbbbb"]}}} -->
<figure class="wp-block-image size-full"><img src="<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/sappho-statue_bw.webp" alt="" class="wp-image-145"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center">
<?php
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'pieria' ) ) . '" rel="nofollow">WordPress</a>';
echo sprintf(
/* Translators: WordPress link. */
esc_html__( 'Designed with %1$s', 'pieria' ),
$wordpress_link
);
?>
</p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->
41 changes: 41 additions & 0 deletions pieria/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
=== Pieria ===
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 ==

Pieria is a theme focused on typography — essentially following a low-level styling approach. Its headings, paragraphs, links, and navigation have the same appearance, with everything sitting quietly into simple columns that split navigation, blog posts, and a content block. A soft design to make your content sparkle.

== Changelog ==

= 0.0.1 =
* Initial release

== Copyright ==

Pieria WordPress Theme, (C) 2023 the WordPress team
Pieria is distributed under the terms of the GNU GPL.
Pieria 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.

This theme bundles the following third-party resources:

Fonts
Times Newer Roman font
License: GNU GENERAL PUBLIC LICENSE -- https://timesnewerroman.com/assets/TimesNewerLicense.pdf

Images
“Sappho” (modeled 1862, carved 1867), by William Wetmore Story (1819–1895). Image via Flickr, under a CC BY 2.0 license.
Binary file added pieria/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions pieria/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
Theme Name: Pieria
Theme URI: https://wordpress.com/theme/pieria
Author: Automattic
Author URI: https://automattic.com/
Description: Pieria is a theme focused on typography — essentially following a low-level styling approach. Its headings, paragraphs, links, and navigation have the same appearance, with everything sitting quietly into simple columns that split navigation, blog posts, and a content block. A soft design to make your content sparkle.
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
Template:
Text Domain: pieria
Tags: blog, one-column, wide-blocks, block-patterns, custom-colors, custom-logo, custom-menu, editor-style, featured-images, full-site-editing, rtl-language-support, theme-options, threaded-comments, translation-ready, blog, simple-format, low-formatting, blog-posts, serif, serifs, simple-blog, simple-blogging
*/

/*
* 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;
}
47 changes: 47 additions & 0 deletions pieria/templates/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!-- wp:columns {"align":"full","style":{"spacing":{"padding":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"margin":{"top":"0px","bottom":"0px"},"blockGap":{"top":"0rem","left":"0rem"}}}} -->
<div class="wp-block-columns alignfull" style="margin-top:0px;margin-bottom:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px"><!-- wp:column {"width":"20%","style":{"spacing":{"padding":{"top":"0rem","right":"2rem","bottom":"0rem","left":"2rem"}}}} -->
<div class="wp-block-column" style="padding-top:0rem;padding-right:2rem;padding-bottom:0rem;padding-left:2rem;flex-basis:20%"><!-- wp:group {"style":{"spacing":{"padding":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"margin":{"top":"0px","bottom":"0px"},"blockGap":"0px"},"position":{"type":"sticky","top":"0px"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="margin-top:0px;margin-bottom:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px"><!-- wp:spacer {"height":"4rem","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}}} -->
<div style="margin-top:0px;margin-bottom:0px;height:4rem" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:group {"style":{"spacing":{"blockGap":"0rem","padding":{"top":"0rem","right":"0rem","bottom":"0rem","left":"0rem"},"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group" style="margin-top:0px;margin-bottom:0px;padding-top:0rem;padding-right:0rem;padding-bottom:0rem;padding-left:0rem"><!-- wp:site-title {"style":{"typography":{"fontSize":"16px","textDecoration":"underline"}}} /-->

<!-- wp:spacer {"height":"2rem","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}}} -->
<div style="margin-top:0px;margin-bottom:0px;height:2rem" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:navigation {"ref":40,"overlayMenu":"never","layout":{"type":"flex","orientation":"vertical"},"style":{"spacing":{"blockGap":"0px"}}} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:column -->

<!-- wp:column {"width":"60%","style":{"spacing":{"padding":{"top":"0rem","right":"2rem","bottom":"0rem","left":"2rem"},"blockGap":"0px"},"border":{"left":{"color":"var:preset|color|primary","width":"1px"}}},"layout":{"type":"constrained","justifyContent":"left"}} -->
<div class="wp-block-column" style="border-left-color:var(--wp--preset--color--primary);border-left-width:1px;padding-top:0rem;padding-right:2rem;padding-bottom:0rem;padding-left:2rem;flex-basis:60%"><!-- wp:spacer {"height":"4rem","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}}} -->
<div style="margin-top:0px;margin-bottom:0px;height:4rem" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:group {"tagName":"main","style":{"spacing":{"blockGap":"var:preset|spacing|50","margin":{"top":"var:preset|spacing|80","bottom":"var:preset|spacing|60"}}},"layout":{"type":"constrained"}} -->
<main class="wp-block-group" style="margin-top:var(--wp--preset--spacing--80);margin-bottom:var(--wp--preset--spacing--60)">

<!-- wp:pattern {"slug":"pieria/404"} /-->

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

<!-- wp:column {"width":"20%","style":{"spacing":{"padding":{"top":"0rem","right":"2rem","bottom":"0rem","left":"2rem"}},"border":{"left":{"color":"var:preset|color|primary","width":"1px"}}}} -->
<div class="wp-block-column" style="border-left-color:var(--wp--preset--color--primary);border-left-width:1px;padding-top:0rem;padding-right:2rem;padding-bottom:0rem;padding-left:2rem;flex-basis:20%"><!-- wp:group {"style":{"spacing":{"padding":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"margin":{"top":"0px","bottom":"0px"},"blockGap":"0px"},"position":{"type":"sticky","top":"0px"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="margin-top:0px;margin-bottom:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px"><!-- wp:spacer {"height":"4rem","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}}} -->
<div style="margin-top:0px;margin-bottom:0px;height:4rem" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:pattern {"slug":"pieria/sidebar"} /-->

<!-- wp:spacer {"height":"4rem","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}}} -->
<div style="margin-top:0px;margin-bottom:0px;height:4rem" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer --></div>
<!-- /wp:group --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
Loading

0 comments on commit 33a5881

Please sign in to comment.