Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xanadu: Add theme #7533

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added xanadu/assets/fonts/crimson-pro_italic_200.ttf
Binary file not shown.
Binary file added xanadu/assets/fonts/crimson-pro_italic_300.ttf
Binary file not shown.
Binary file added xanadu/assets/fonts/crimson-pro_italic_400.ttf
Binary file not shown.
Binary file added xanadu/assets/fonts/crimson-pro_italic_500.ttf
Binary file not shown.
Binary file added xanadu/assets/fonts/crimson-pro_italic_600.ttf
Binary file not shown.
Binary file added xanadu/assets/fonts/crimson-pro_italic_700.ttf
Binary file not shown.
Binary file added xanadu/assets/fonts/crimson-pro_italic_800.ttf
Binary file not shown.
Binary file added xanadu/assets/fonts/crimson-pro_italic_900.ttf
Binary file not shown.
Binary file added xanadu/assets/fonts/crimson-pro_normal_200.ttf
Binary file not shown.
Binary file added xanadu/assets/fonts/crimson-pro_normal_300.ttf
Binary file not shown.
Binary file added xanadu/assets/fonts/crimson-pro_normal_400.ttf
Binary file not shown.
Binary file added xanadu/assets/fonts/crimson-pro_normal_500.ttf
Binary file not shown.
Binary file added xanadu/assets/fonts/crimson-pro_normal_600.ttf
Binary file not shown.
Binary file added xanadu/assets/fonts/crimson-pro_normal_700.ttf
Binary file not shown.
Binary file added xanadu/assets/fonts/crimson-pro_normal_800.ttf
Binary file not shown.
Binary file added xanadu/assets/fonts/crimson-pro_normal_900.ttf
Binary file not shown.
60 changes: 60 additions & 0 deletions xanadu/functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php
/**
* Xanadu functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Xanadu
* @since Xanadu 1.0
*/


if ( ! function_exists( 'xanadu_support' ) ) :

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

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

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

endif;

add_action( 'after_setup_theme', 'xanadu_support' );

if ( ! function_exists( 'xanadu_styles' ) ) :

/**
* Enqueue styles.
*
* @since Xanadu 1.0
*
* @return void
*/
function xanadu_styles() {

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

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

}

endif;

add_action( 'wp_enqueue_scripts', 'xanadu_styles' );
1 change: 1 addition & 0 deletions xanadu/parts/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"xanadu/footer"} /-->
1 change: 1 addition & 0 deletions xanadu/parts/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"xanadu/header"} /-->
13 changes: 13 additions & 0 deletions xanadu/patterns/404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
/**
* Title: A 404 page
* Slug: xanadu/404
* Inserter: no
*/
?>

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

<!-- wp:search {"label":"<?php esc_attr_e( 'Search', 'xanadu' ); ?>","showLabel":false,"width":518,"widthUnit":"px","buttonText":"<?php esc_attr_e( 'Search', 'xanadu' ); ?>","align":"center"} /-->
27 changes: 27 additions & 0 deletions xanadu/patterns/footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
/**
* Title: Default footer
* Slug: xanadu/footer
* Categories: footer
* Block Types: core/template-part/footer
*/
?>

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

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

<!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|30","right":"var:preset|spacing|30","bottom":"var:preset|spacing|30","left":"var:preset|spacing|30"},"blockGap":"0","margin":{"top":"var:preset|spacing|80","bottom":"var:preset|spacing|80"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="margin-top:var(--wp--preset--spacing--80);margin-bottom:var(--wp--preset--spacing--80);padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)">
<!-- wp:group {"style":{"spacing":{"blockGap":"0"}},"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"center"}} -->
<div class="wp-block-group">
<!-- wp:site-title {"textAlign":"center","style":{"layout":{"flexSize":"400px"}}} /-->

<!-- wp:paragraph {"style":{"typography":{"fontSize":"6rem","fontStyle":"normal","fontWeight":"500"}}} -->
<p style="font-size:6rem;font-style:normal;font-weight:500">,</p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->

<!-- wp:spacer {"height":"20px"} -->
<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
</div>
<!-- /wp:group -->
11 changes: 11 additions & 0 deletions xanadu/patterns/no-results.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
/**
* Title: No Results Content
* Slug: xanadu/no-results
* Inserter: no
*/
?>

<!-- wp:paragraph {"style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}}} -->
<p style="margin-top:0px;margin-bottom:0px"><?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', 'xanadu' ); ?></p>
<!-- /wp:paragraph -->
35 changes: 35 additions & 0 deletions xanadu/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
=== Xanadu ===
Contributors:
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 5.7
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

== Description ==

This theme is named after the city in Samuel Taylor Coleridge’s poem Kubla Khan. Literary legend says the poem came to Coleridge in a dream, which he rushed to write down without preamble. Likewise, this design begins in earnest.

== Changelog ==

= 1.0.0 =
* Initial release

== Copyright ==

Xanadu WordPress Theme, (C) 2023
Xanadu 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.

Crimson Pro Font
Licensed under SIL Open Font License, 1.1 (http://scripts.sil.org/OFL)
https://fonts.google.com/specimen/Crimson+Pro
Binary file added xanadu/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions xanadu/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Theme Name: Xanadu
Theme URI: https://wordpress.com/theme/xanadu
Author: Automattic
Author URI: https://automattic.com/
Description: This theme is named after the city in Samuel Taylor Coleridge’s poem Kubla Khan. Literary legend says the poem came to Coleridge in a dream, which he rushed to write down without preamble. Likewise, this design begins in earnest.
Requires at least: 6.0
Tested up to: 6.4
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: xanadu
Tags: one-column, featured-images, full-site-editing, rtl-language-support, theme-options, threaded-comments, translation-ready, wide-blocks
*/

/*
* Control the hover stylings of outline block style.
*/
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background):hover {
background-color: var(--wp--preset--color--primary);
border-color: var(--wp--preset--color--primary);
color: var(--wp--preset--color--base);
}
26 changes: 26 additions & 0 deletions xanadu/styles/old-book.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"title": "Old Book",
"settings": {
"color": {
"palette": [
{
"color": "#f2ebe2",
"name": "Base",
"slug": "base"
},
{
"color": "#5b3d25",
"name": "Primary",
"slug": "primary"
},
{
"color": "#53360a",
"name": "Secondary",
"slug": "secondary"
}
]
}
}
}
14 changes: 14 additions & 0 deletions xanadu/templates/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->

<!-- wp:group {"tagName":"main","style":{"spacing":{"blockGap":"var:preset|spacing|50","margin":{"top":"var:preset|spacing|80","bottom":"var:preset|spacing|60"}}},"layout":{"inherit":true,"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":"xanadu/404"} /-->

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

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

<!-- wp:query {"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true,"taxQuery":null,"parents":[]},"tagName":"main"} -->
<main class="wp-block-query">
<!-- wp:group {"style":{"spacing":{"blockGap":"0"}},"layout":{"type":"constrained","justifyContent":"center"}} -->
<div class="wp-block-group">
<!-- wp:query-title {"type":"archive"} /-->

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

<!-- wp:post-template {"layout":{"type":"default"}} -->
<!-- wp:group {"style":{"spacing":{"blockGap":"2px"}},"layout":{"type":"constrained","justifyContent":"center"}} -->
<div class="wp-block-group">
<!-- wp:post-content /-->

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

<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|30"},"elements":{"link":{"color":{"text":"var:preset|color|primary"}}}},"textColor":"primary","layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group has-primary-color has-text-color has-link-color">
<!-- wp:post-title {"isLink":true} /-->

<!-- wp:paragraph {"fontSize":"large"} -->
<p class="has-large-font-size">–––––––</p>
<!-- /wp:paragraph -->

<!-- wp:post-date {"format":"M j"} /-->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->

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

<!-- wp:group {"layout":{"type":"constrained"}} -->
<div class="wp-block-group">
<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"space-between"}} -->
<!-- wp:query-pagination-previous /-->

<!-- wp:query-pagination-next /-->
<!-- /wp:query-pagination -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</main>
<!-- /wp:query -->

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

<!-- wp:query {"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true,"taxQuery":null,"parents":[]},"tagName":"main"} -->
<main class="wp-block-query">
<!-- wp:group {"style":{"spacing":{"blockGap":"0"}},"layout":{"type":"constrained","justifyContent":"center"}} -->
<div class="wp-block-group">
<!-- wp:post-template {"layout":{"type":"default"}} -->
<!-- wp:group {"style":{"spacing":{"blockGap":"2px"}},"layout":{"type":"constrained","justifyContent":"center"}} -->
<div class="wp-block-group">
<!-- wp:post-content /-->

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

<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|30"},"elements":{"link":{"color":{"text":"var:preset|color|primary"}}}},"textColor":"primary","layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group has-primary-color has-text-color has-link-color">
<!-- wp:post-title {"isLink":true} /-->

<!-- wp:paragraph {"fontSize":"large"} -->
<p class="has-large-font-size">–––––––</p>
<!-- /wp:paragraph -->

<!-- wp:post-date {"format":"M j"} /-->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->

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

<!-- wp:group {"layout":{"type":"constrained"}} -->
<div class="wp-block-group">
<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"space-between"}} -->
<!-- wp:query-pagination-previous /-->

<!-- wp:query-pagination-next /-->
<!-- /wp:query-pagination -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</main>
<!-- /wp:query -->

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

<!-- wp:group {"style":{"spacing":{"blockGap":"0"}},"layout":{"type":"constrained","justifyContent":"center"}} -->
<div class="wp-block-group">
<!-- wp:group {"style":{"spacing":{"blockGap":"2px"}},"layout":{"type":"constrained","justifyContent":"center"}} -->
<div class="wp-block-group">
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|30"},"elements":{"link":{"color":{"text":"var:preset|color|primary"}}}},"textColor":"primary","layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group has-primary-color has-text-color has-link-color">
<!-- wp:post-title {"isLink":true,"style":{"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"}}}} /-->

<!-- wp:paragraph {"fontSize":"large"} -->
<p class="has-large-font-size">–––––––</p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->

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

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

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

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

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