Skip to content

Commit

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

* Psychedeli: fixes issues mentioned on the first review

* Added call to pattern to header and header home template parts

* Changed social links in header and header home template parts

* Psychedeli: fixes issues while on a huddle with Takashi

* Localise background images in header and header home template parts

* Add calls to header and header home patterns

* Psychedeli: fixes the Jetpack block and the theme tags

---------

Co-authored-by: Takashi Irie <[email protected]>
  • Loading branch information
henriqueiamarino and iamtakashi authored Dec 13, 2024
1 parent f8a5ad0 commit a2d7284
Show file tree
Hide file tree
Showing 42 changed files with 2,145 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 added psychedeli/assets/images/Aldous_Huxley.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added psychedeli/assets/images/Carlos-Castaneda.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added psychedeli/assets/images/Hermann-Hesse-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added psychedeli/assets/images/Hunter-Thompson.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 psychedeli/functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php
/**
* PsycheDeli functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package PsycheDeli
* @since PsycheDeli 1.0
*/


if ( ! function_exists( 'psychedeli_support' ) ) :

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

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

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

endif;

add_action( 'after_setup_theme', 'psychedeli_support' );

if ( ! function_exists( 'psychedeli_styles' ) ) :

/**
* Enqueue styles.
*
* @since PsycheDeli 1.0
*
* @return void
*/
function psychedeli_styles() {

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

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

}

endif;

add_action( 'wp_enqueue_scripts', 'psychedeli_styles' );
35 changes: 35 additions & 0 deletions psychedeli/parts/comments.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!-- wp:comments {"className":"wp-block-comments-query-loop","style":{"spacing":{"margin":{"top":"var:preset|spacing|70","bottom":"var:preset|spacing|70"}}}} -->
<div class="wp-block-comments wp-block-comments-query-loop" style="margin-top:var(--wp--preset--spacing--70);margin-bottom:var(--wp--preset--spacing--70)"><!-- wp:comments-title {"textAlign":"left","showPostTitle":false} /-->

<!-- 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 {"style":{"spacing":{"blockGap":"0.5em"}},"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group"><!-- wp:avatar {"size":40,"style":{"color":{"duotone":["#2e1f7a","#cbfe01"]}}} /-->

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

<!-- 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"} /-->

<!-- 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 {"style":{"spacing":{"margin":{"top":"var:preset|spacing|70","bottom":"var:preset|spacing|70"}}}} /--></div>
<!-- /wp:comments -->
1 change: 1 addition & 0 deletions psychedeli/parts/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"psychedeli/footer"} /-->
1 change: 1 addition & 0 deletions psychedeli/parts/header-home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"psychedeli/header-home"} /-->
1 change: 1 addition & 0 deletions psychedeli/parts/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"psychedeli/header"} /-->
7 changes: 7 additions & 0 deletions psychedeli/parts/post-meta.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|40","bottom":"var:preset|spacing|40"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40)"><!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|20"}},"layout":{"type":"flex"}} -->
<div class="wp-block-group"><!-- wp:post-date {"isLink":true} /-->

<!-- wp:post-terms {"term":"category","prefix":"— "} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
31 changes: 31 additions & 0 deletions psychedeli/patterns/404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
/**
* Title: 404
* Slug: psychedeli/404
* Inserter: no
*/
?>
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->

<!-- wp:group {"tagName":"main","metadata":{"name":"Content"},"style":{"spacing":{"margin":{"top":"0","bottom":"0"},"padding":{"right":"var:preset|spacing|40","left":"var:preset|spacing|40"}},"dimensions":{"minHeight":"50vh"}},"gradient":"default-gradient","layout":{"type":"constrained"}} -->
<main class="wp-block-group has-default-gradient-gradient-background has-background" style="min-height:50vh;margin-top:0;margin-bottom:0;padding-right:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)"><!-- wp:group {"metadata":{"name":"Contrast Color Wrapper"},"align":"wide","style":{"border":{"left":{"width":"1px"},"right":{"width":"1px"}},"spacing":{"padding":{"right":"4px","left":"4px"}},"dimensions":{"minHeight":"50vh"}},"backgroundColor":"primary","layout":{"type":"constrained"}} -->
<div class="wp-block-group alignwide has-primary-background-color has-background" style="border-right-width:1px;border-left-width:1px;min-height:50vh;padding-right:4px;padding-left:4px"><!-- wp:group {"metadata":{"name":"Base Color Wrapper"},"align":"wide","style":{"spacing":{"padding":{"right":"var:preset|spacing|60","left":"var:preset|spacing|60","top":"var:preset|spacing|80","bottom":"var:preset|spacing|80"},"blockGap":"var:preset|spacing|70","margin":{"top":"0","bottom":"0"}},"border":{"left":{"width":"1px"},"right":{"width":"1px"}},"dimensions":{"minHeight":"50vh"}},"backgroundColor":"base","layout":{"type":"constrained"}} -->
<div class="wp-block-group alignwide has-base-background-color has-background" style="border-right-width:1px;border-left-width:1px;min-height:50vh;margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--80);padding-right:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--80);padding-left:var(--wp--preset--spacing--60)"><!-- wp:group {"metadata":{"name":"404 Copy"},"style":{"spacing":{"blockGap":"var:preset|spacing|40"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"center"}} -->
<div class="wp-block-group"><!-- wp:heading {"textAlign":"center","level":1} -->
<h1 class="wp-block-heading has-text-align-center" id="oops-that-page-can-t-be-found"><?php /* Translators: 1. is a 'br' HTML element */
echo sprintf( esc_html__( 'Oops! That page%1$scan’t be found.', 'psychedeli' ), '<br>' ); ?></h1>
<!-- /wp:heading -->

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

<!-- wp:search {"showLabel":false,"width":100,"widthUnit":"%","buttonPosition":"button-inside","buttonUseIcon":true} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group --></main>
<!-- /wp:group -->

<!-- wp:group {"metadata":{"name":"Footer wrapper"},"style":{"spacing":{"margin":{"top":"0","bottom":"0"},"padding":{"bottom":"var:preset|spacing|40"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="margin-top:0;margin-bottom:0;padding-bottom:var(--wp--preset--spacing--40)"><!-- wp:template-part {"slug":"footer","tagName":"footer","align":"wide"} /--></div>
<!-- /wp:group -->
60 changes: 60 additions & 0 deletions psychedeli/patterns/archive.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php
/**
* Title: archive
* Slug: psychedeli/archive
* Inserter: no
*/
?>
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->

<!-- wp:group {"tagName":"main","metadata":{"name":"Content"},"style":{"spacing":{"margin":{"top":"0","bottom":"0"},"padding":{"right":"var:preset|spacing|40","left":"var:preset|spacing|40"}}},"gradient":"default-gradient","layout":{"type":"constrained"}} -->
<main class="wp-block-group has-default-gradient-gradient-background has-background" style="margin-top:0;margin-bottom:0;padding-right:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)"><!-- wp:group {"metadata":{"name":"Contrast Color Wrapper"},"align":"wide","style":{"border":{"left":{"width":"1px"},"right":{"width":"1px"}},"spacing":{"padding":{"right":"4px","left":"4px"}}},"backgroundColor":"primary","layout":{"type":"constrained"}} -->
<div class="wp-block-group alignwide has-primary-background-color has-background" style="border-right-width:1px;border-left-width:1px;padding-right:4px;padding-left:4px"><!-- wp:group {"metadata":{"name":"Base Color Wrapper"},"align":"wide","style":{"spacing":{"padding":{"right":"var:preset|spacing|60","left":"var:preset|spacing|60","top":"var:preset|spacing|70","bottom":"var:preset|spacing|70"},"blockGap":"var:preset|spacing|70","margin":{"top":"0","bottom":"0"}},"border":{"left":{"width":"1px"},"right":{"width":"1px"}}},"backgroundColor":"base","layout":{"type":"constrained"}} -->
<div class="wp-block-group alignwide has-base-background-color has-background" style="border-right-width:1px;border-left-width:1px;margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--70);padding-right:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--70);padding-left:var(--wp--preset--spacing--60)"><!-- wp:query {"queryId":14,"query":{"perPage":10,"pages":0,"offset":"3","postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true},"align":"wide"} -->
<div class="wp-block-query alignwide"><!-- wp:query-title {"type":"archive","textAlign":"center"} /-->

<!-- wp:post-template {"style":{"spacing":{"blockGap":"var:preset|spacing|70"}}} -->
<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"width":"33.3%"} -->
<div class="wp-block-column" style="flex-basis:33.3%"><!-- wp:cover {"useFeaturedImage":true,"dimRatio":0,"isUserOverlayColor":true,"minHeight":100,"minHeightUnit":"%","contentPosition":"center center","isDark":false,"style":{"color":[],"dimensions":{"aspectRatio":"4/3"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-cover is-light" style="min-height:100%"><span aria-hidden="true" class="wp-block-cover__background has-background-dim-0 has-background-dim"></span><div class="wp-block-cover__inner-container"><!-- wp:post-featured-image {"isLink":true,"aspectRatio":"1","width":"75%","height":"","style":{"color":[],"border":{"radius":"50%"}}} /--></div></div>
<!-- /wp:cover --></div>
<!-- /wp:column -->

<!-- wp:column {"verticalAlignment":"stretch","width":"5%"} -->
<div class="wp-block-column is-vertically-aligned-stretch" style="flex-basis:5%"></div>
<!-- /wp:column -->

<!-- wp:column {"verticalAlignment":"stretch","width":"61.66%"} -->
<div class="wp-block-column is-vertically-aligned-stretch" style="flex-basis:61.66%"><!-- wp:group {"metadata":{"name":"QL Copy"},"style":{"spacing":{"blockGap":"var:preset|spacing|30"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
<div class="wp-block-group"><!-- wp:post-title {"isLink":true} /-->

<!-- wp:post-excerpt {"showMoreOnNewLine":false,"excerptLength":25} /--></div>
<!-- /wp:group -->

<!-- wp:post-date /--></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
<!-- /wp:post-template -->

<!-- wp:query-no-results -->
<!-- wp:paragraph {"placeholder":"Add text or blocks that will display when a query returns no results."} -->
<p><?php esc_html_e('Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'psychedeli');?></p>
<!-- /wp:paragraph -->
<!-- /wp:query-no-results -->

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

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

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

<!-- wp:group {"metadata":{"name":"Footer wrapper"},"style":{"spacing":{"margin":{"top":"0","bottom":"0"},"padding":{"bottom":"var:preset|spacing|40"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="margin-top:0;margin-bottom:0;padding-bottom:var(--wp--preset--spacing--40)"><!-- wp:template-part {"slug":"footer","tagName":"footer","align":"wide"} /--></div>
<!-- /wp:group -->
33 changes: 33 additions & 0 deletions psychedeli/patterns/footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php
/**
* Title: footer
* Slug: psychedeli/footer
* Inserter: no
*/
?>
<!-- wp:group {"metadata":{"name":"Contrast Color Wrapper"},"style":{"spacing":{"padding":{"top":"var:preset|spacing|70","bottom":"var:preset|spacing|70"},"margin":{"top":"0","bottom":"0"}},"border":{"left":{"width":"1px"},"right":{"width":"1px"},"bottom":{"width":"1px"}}},"backgroundColor":"primary","layout":{"type":"constrained"}} -->
<div class="wp-block-group has-primary-background-color has-background" style="border-right-width:1px;border-bottom-width:1px;border-left-width:1px;margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--70);padding-bottom:var(--wp--preset--spacing--70)"><!-- wp:group {"metadata":{"name":"Footer Stack"},"style":{"spacing":{"padding":{"top":"var:preset|spacing|40","bottom":"var:preset|spacing|40"}}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"center"}} -->
<div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40)"><!-- wp:site-title {"textAlign":"center"} /-->

<!-- wp:spacer {"height":"0px","metadata":{"name":"Spacer M"},"style":{"layout":{"selfStretch":"fixed","flexSize":"clamp(1rem, 2vw, 2rem)"}}} -->
<div style="height:0px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:social-links {"iconColor":"contrast","iconColorValue":"#1e1551","openInNewTab":true,"size":"has-normal-icon-size","className":"is-style-logos-only","style":{"spacing":{"blockGap":{"left":"var:preset|spacing|40"}}},"layout":{"type":"flex","justifyContent":"center"}} -->
<ul class="wp-block-social-links has-normal-icon-size has-icon-color is-style-logos-only"><!-- wp:social-link {"url":"#","service":"bluesky"} /-->

<!-- wp:social-link {"url":"#","service":"tumblr"} /-->

<!-- wp:social-link {"url":"#","service":"mastodon"} /--></ul>
<!-- /wp:social-links -->

<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|20"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
<div class="wp-block-group"><!-- wp:site-tagline {"textAlign":"center"} /-->

<!-- wp:paragraph {"align":"center","fontSize":"x-small"} -->
<p class="has-text-align-center has-x-small-font-size"><?php /* Translators: 1. is the start of a 'a' HTML element, 2. is the end of a 'a' HTML element */
echo sprintf( esc_html__( 'Designed with %1$sWordPress%2$s', 'psychedeli' ), '<a href="' . esc_url( 'https://wordpress.org' ) . '" rel="nofollow">', '</a>' ); ?></p>
<!-- /wp:paragraph --></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
Loading

0 comments on commit a2d7284

Please sign in to comment.