Skip to content

Commit

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

* remove theme attribute from the template part definitions

* remove queryId from the templates

* move 404 content to pattern

* move footer content to pattern

* move comments block to pattern

* remove empty height attribute on spacer block

* update theme and min wp versions

* add theme uri

* remove invlid blocks and styles

* fix search page and update footer social links

* update license information and remove unused assets

---------

Co-authored-by: madhusudhand <[email protected]>
  • Loading branch information
matiasbenedetto and madhusudhand authored Jun 23, 2023
1 parent 54c6d1a commit 835255f
Show file tree
Hide file tree
Showing 26 changed files with 1,252 additions and 1 deletion.
2 changes: 1 addition & 1 deletion george-lois/style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Theme Name: George Lois
Theme URI: https://github.com/Automattic/themes/tree/trunk/george-lois
Theme URI: https://github.com/Automattic/themes/tree/trunk/jaida
Author: Automattic
Author URI: https://wordpress.org/themes/
Description: A theme in homage to George Lois, visionary American Art Director, and author. We will all miss your big ideas. Rest in Peace, George. From the Creative People of Automattic.
Expand Down
Binary file added jaida/assets/fonts/albert-sans_italic_300.ttf
Binary file not shown.
Binary file added jaida/assets/fonts/albert-sans_italic_400.ttf
Binary file not shown.
Binary file added jaida/assets/fonts/albert-sans_italic_600.ttf
Binary file not shown.
Binary file added jaida/assets/fonts/albert-sans_normal_300.ttf
Binary file not shown.
Binary file added jaida/assets/fonts/albert-sans_normal_400.ttf
Binary file not shown.
Binary file added jaida/assets/fonts/albert-sans_normal_600.ttf
Binary file not shown.
60 changes: 60 additions & 0 deletions jaida/functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php
/**
* Jaida functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Jaida
* @since Jaida 1.0
*/


if ( ! function_exists( 'jaida_support' ) ) :

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

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

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

endif;

add_action( 'after_setup_theme', 'jaida_support' );

if ( ! function_exists( 'jaida_styles' ) ) :

/**
* Enqueue styles.
*
* @since Jaida 1.0
*
* @return void
*/
function jaida_styles() {

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

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

}

endif;

add_action( 'wp_enqueue_scripts', 'jaida_styles' );
1 change: 1 addition & 0 deletions jaida/parts/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"jaida/footer"} /-->
9 changes: 9 additions & 0 deletions jaida/parts/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- wp:group {"layout":{"type":"constrained","wideSize":"1400px"}} -->
<div class="wp-block-group"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"bottom":"var:preset|spacing|70","top":"var:preset|spacing|70","right":"0","left":"0"}}},"layout":{"type":"flex","justifyContent":"space-between"}} -->
<div class="wp-block-group alignwide" style="padding-top:var(--wp--preset--spacing--70);padding-right:0;padding-bottom:var(--wp--preset--spacing--70);padding-left:0"><!-- wp:site-title {"textAlign":"left","style":{"elements":{"link":{"color":{"text":"var:preset|color|background"}}}},"textColor":"background"} /-->

<!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group"><!-- wp:navigation {"ref":18,"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"right","orientation":"horizontal"},"style":{"spacing":{"margin":{"top":"0"}}}} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
13 changes: 13 additions & 0 deletions jaida/parts/post-meta.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|20"}},"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group"><!-- wp:post-date {"style":{"typography":{"fontStyle":"normal","fontWeight":"500","fontSize":"0.8rem","textTransform":"uppercase","letterSpacing":"1px"},"elements":{"link":{"color":{"text":"var:preset|color|background"}}}},"textColor":"background"} /-->

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

<!-- wp:paragraph {"style":{"typography":{"fontSize":"0.8rem","letterSpacing":"1px","fontStyle":"normal","fontWeight":"500","textTransform":"uppercase"}}} -->
<p style="font-size:0.8rem;font-style:normal;font-weight:500;letter-spacing:1px;text-transform:uppercase">Written by:</p>
<!-- /wp:paragraph -->

<!-- wp:post-author-name {"isLink":true,"style":{"typography":{"fontSize":"0.8rem","textTransform":"uppercase","letterSpacing":"1px","fontStyle":"normal","fontWeight":"500"},"elements":{"link":{"color":{"text":"var:preset|color|background"}}}}} /--></div>
<!-- /wp:group -->
9 changes: 9 additions & 0 deletions jaida/parts/secondary-header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- wp:group {"layout":{"type":"constrained","wideSize":"1400px"}} -->
<div class="wp-block-group"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"bottom":"var:preset|spacing|70","top":"var:preset|spacing|70","right":"0","left":"0"}}},"layout":{"type":"flex","justifyContent":"space-between"}} -->
<div class="wp-block-group alignwide" style="padding-top:var(--wp--preset--spacing--70);padding-right:0;padding-bottom:var(--wp--preset--spacing--70);padding-left:0"><!-- wp:site-title {"textAlign":"left"} /-->

<!-- wp:group {"style":{"border":{"width":"0px","style":"none","radius":"2px"}},"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group" style="border-style:none;border-width:0px;border-radius:2px"><!-- wp:navigation {"ref":18,"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"right","orientation":"horizontal"},"style":{"spacing":{"blockGap":"var:preset|spacing|50"}}} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
27 changes: 27 additions & 0 deletions jaida/parts/sidebar-2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- wp:group {"align":"full","style":{"spacing":{"blockGap":"var:preset|spacing|50"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull"><!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|60","right":"var:preset|spacing|60","bottom":"var:preset|spacing|60","left":"var:preset|spacing|60"}},"border":{"radius":"2px"}},"backgroundColor":"tertiary","layout":{"type":"constrained"}} -->
<div class="wp-block-group has-tertiary-background-color has-background" style="border-radius:2px;padding-top:var(--wp--preset--spacing--60);padding-right:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60);padding-left:var(--wp--preset--spacing--60)"><!-- wp:paragraph {"style":{"typography":{"letterSpacing":"1px","fontStyle":"normal","fontWeight":"500","textTransform":"uppercase","fontSize":"0.8rem"}}} -->
<p style="font-size:0.8rem;font-style:normal;font-weight:500;letter-spacing:1px;text-transform:uppercase">Latest Articles</p>
<!-- /wp:paragraph -->

<!-- wp:query {"queryId":24,"query":{"perPage":3,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false},"layout":{"type":"default"}} -->
<div class="wp-block-query"><!-- wp:post-template -->
<!-- wp:group {"align":"wide","style":{"spacing":{"blockGap":"var:preset|spacing|20","padding":{"top":"0","right":"0","bottom":"0","left":"0"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignwide" style="padding-top:0;padding-right:0;padding-bottom:0;padding-left:0"><!-- wp:post-featured-image {"style":{"border":{"width":"2px"}}} /-->

<!-- wp:post-title {"isLink":true,"fontSize":"medium"} /-->

<!-- wp:post-date {"displayType":"modified","style":{"typography":{"fontSize":"0.6rem","textTransform":"uppercase","letterSpacing":"0.05em","fontStyle":"normal","fontWeight":"500"}}} /-->

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

<!-- wp:spacer {"height":"170px"} -->
<div style="height:170px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer --></div>
<!-- /wp:group -->
21 changes: 21 additions & 0 deletions jaida/patterns/404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* Title: A 404 page
* Slug: jaida/404
* Inserter: no
*/

?>

<!-- wp:group {"tagName":"main","style":{"spacing":{"blockGap":"var:preset|spacing|50","margin":{"top":"16vh","bottom":"16vh"}}},"layout":{"type":"constrained","wideSize":"1400px"}} -->
<main class="wp-block-group" style="margin-top:16vh;margin-bottom:16vh"><!-- wp:heading {"textAlign":"left","level":1,"align":"wide","className":"wp-block-heading","anchor":"oops-that-page-can-t-be-found"} -->
<h1 class="wp-block-heading alignwide has-text-align-left" id="oops-that-page-can-t-be-found"><?php echo esc_html__( 'Oops! That page can’t be found.', 'jaida' ); ?></h1>
<!-- /wp:heading -->

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

<!-- wp:search {"label":"","showLabel":false} /--></main>
<!-- /wp:group -->

50 changes: 50 additions & 0 deletions jaida/patterns/comments.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php
/**
* Title: Comments
* slug: jaida/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"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="margin-top:0;margin-bottom:var(--wp--preset--spacing--50)"><!-- wp:group {"style":{"spacing":{"blockGap":"0.5em"}},"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group"><!-- wp:avatar {"size":40,"style":{"spacing":{"margin":{"top":"0.5em"}},"border":{"radius":"100px"}}} /-->

<!-- wp:group -->
<div class="wp-block-group"><!-- wp:comment-author-name {"isLink":false,"style":{"typography":{"fontStyle":"normal","fontWeight":"500","fontSize":"0.9rem"}}} /-->

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

<!-- wp:comment-edit-link {"style":{"typography":{"fontSize":"0.9rem"}}} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->

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

<!-- wp:comment-reply-link {"style":{"typography":{"fontSize":"0.9rem"}}} /--></div>
<!-- /wp:group -->
<!-- /wp:comment-template -->

<!-- wp:comments-pagination {"layout":{"type":"flex","justifyContent":"space-between"}} -->
<!-- wp:comments-pagination-previous {"fontSize":"small"} /-->

<!-- wp:comments-pagination-next {"fontSize":"small"} /-->
<!-- /wp:comments-pagination -->

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

<!-- wp:post-comments-form /-->

<!-- wp:spacer -->
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer --></div>
<!-- /wp:comments -->
53 changes: 53 additions & 0 deletions jaida/patterns/footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php
/**
* Title: Default footer
* Slug: jaida/footer
* Categories: footer
* Block Types: core/template-part/footer
*/
?>

<!-- wp:group {"style":{"elements":{"link":{"color":{"text":"var:preset|color|background"}}},"spacing":{"padding":{"top":"0","right":"var:preset|spacing|50","bottom":"var:preset|spacing|50","left":"var:preset|spacing|50"},"blockGap":"0"}},"backgroundColor":"primary","textColor":"background","layout":{"type":"constrained","wideSize":"1400px"}} -->
<div class="wp-block-group has-background-color has-primary-background-color has-text-color has-background has-link-color" style="padding-top:0;padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)"><!-- wp:columns {"verticalAlignment":"top","align":"wide","style":{"spacing":{"padding":{"right":"0","left":"0","top":"var:preset|spacing|80","bottom":"var:preset|spacing|60"}}}} -->
<div class="wp-block-columns alignwide are-vertically-aligned-top" style="padding-top:var(--wp--preset--spacing--80);padding-right:0;padding-bottom:var(--wp--preset--spacing--60);padding-left:0"><!-- wp:column {"verticalAlignment":"top","width":"38.1%"} -->
<div class="wp-block-column is-vertically-aligned-top" style="flex-basis:38.1%"><!-- wp:site-title /-->

<!-- wp:site-tagline {"fontSize":"small"} /--></div>
<!-- /wp:column -->

<!-- wp:column {"width":"33.33%"} -->
<div class="wp-block-column" style="flex-basis:33.33%"></div>
<!-- /wp:column -->

<!-- wp:column {"verticalAlignment":"top","width":"28.57%"} -->
<div class="wp-block-column is-vertically-aligned-top" style="flex-basis:28.57%"><!-- wp:social-links {"iconColor":"background","iconColorValue":"#e9e1e5","iconBackgroundColor":"primary","iconBackgroundColorValue":"#3b2b27","size":"has-normal-icon-size","style":{"spacing":{"blockGap":{"top":"var:preset|spacing|40","left":"var:preset|spacing|40"}}},"layout":{"type":"flex","justifyContent":"right"}} -->
<ul class="wp-block-social-links has-normal-icon-size has-icon-color has-icon-background-color"><!-- wp:social-link {"url":"https://twitter.com","service":"twitter"} /-->

<!-- wp:social-link {"url":"https://youtube.com","service":"youtube"} /-->

<!-- wp:social-link {"url":"https://pinterest.com","service":"pinterest"} /-->

<!-- wp:social-link {"url":"https://tiktok.com","service":"tiktok"} /--></ul>
<!-- /wp:social-links --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->

<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"right":"0","left":"0","top":"var:preset|spacing|80","bottom":"var:preset|spacing|70"}}},"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"}} -->
<div class="wp-block-group alignwide" style="padding-top:var(--wp--preset--spacing--80);padding-right:0;padding-bottom:var(--wp--preset--spacing--70);padding-left:0"><!-- wp:paragraph {"style":{"typography":{"fontSize":"0.8rem"}}} -->
<p style="font-size:0.8rem"><?php echo esc_html__( 'Jaida Theme', 'jaida' ); ?> © 2023</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"align":"right","style":{"typography":{"fontSize":"0.8rem"}}} -->
<p class="has-text-align-right" style="font-size:0.8rem">
<?php
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'jaida' ) ) . '" rel="nofollow">WordPress</a>';
echo sprintf(
/* Translators: WordPress link. */
esc_html__( 'Designed with %1$s', 'jaida' ),
$wordpress_link
);
?>
</p>
<!-- /wp:paragraph --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
37 changes: 37 additions & 0 deletions jaida/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
=== Jaida ===
Contributors: Automattic
Requires at least: 6.1
Tested up to: 6.2
Requires PHP: 5.7
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

== Description ==

A WordPress block theme made for blogging.

== Changelog ==

= 1.0.0 =
* Initial release

== Copyright ==

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

Albert Sans from Google Fonts, Open Font License (https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL)
https://fonts.google.com/specimen/Albert+Sans/about
Binary file added jaida/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions jaida/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
Theme Name: Jaida
Theme URI: https://github.com/Automattic/themes/tree/trunk/george-lois
Author: Automattic
Author URI: https://automattic.com
Description: A WordPress block theme made for blogging.
Requires at least: 6.1
Tested up to: 6.2
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: jaida
Tags: blog, news, photography, grid-layout, two-columns, right-sidebar, wide-blocks, block-patterns, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, full-site-editing, rtl-language-support, template-editing, theme-options, threaded-comments, 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);
}

/**
* 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;
}
5 changes: 5 additions & 0 deletions jaida/templates/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- wp:template-part {"slug":"secondary-header"} /-->

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

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

0 comments on commit 835255f

Please sign in to comment.