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

Surrealist: Add theme #7732

Merged
merged 4 commits into from
Apr 19, 2024
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 not shown.
Binary file not shown.
Binary file added surrealist/assets/fonts/kame_normal_400.otf
Binary file not shown.
Binary file added surrealist/assets/fonts/pt-sans_italic_400.ttf
Binary file not shown.
Binary file added surrealist/assets/fonts/pt-sans_italic_700.ttf
Binary file not shown.
Binary file added surrealist/assets/fonts/pt-sans_normal_400.ttf
Binary file not shown.
Binary file added surrealist/assets/fonts/pt-sans_normal_700.ttf
Binary file not shown.
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 surrealist/assets/images/the_tilled_field.jpg
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 surrealist/functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php
/**
* Surrealist functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Surrealist
* @since Surrealist 1.0
*/
declare( strict_types = 1 );

if ( ! function_exists( 'surrealist_support' ) ) :

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

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

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

endif;

add_action( 'after_setup_theme', 'surrealist_support' );

if ( ! function_exists( 'surrealist_styles' ) ) :

/**
* Enqueue styles.
*
* @since Surrealist 1.0
*
* @return void
*/
function surrealist_styles() {

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

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

}

endif;

add_action( 'wp_enqueue_scripts', 'surrealist_styles' );
53 changes: 53 additions & 0 deletions surrealist/parts/comments.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!-- wp:group {"layout":{"type":"constrained"}} -->
<div class="wp-block-group">
<!-- wp:comments {"style":{"spacing":{"margin":{"top":"var:preset|spacing|80","bottom":"var:preset|spacing|60"}}},"className":"wp-block-comments-query-loop"} -->
<div class="wp-block-comments wp-block-comments-query-loop" style="margin-top:var(--wp--preset--spacing--80);margin-bottom:var(--wp--preset--spacing--60)">
<!-- wp:comments-title {"level":3,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}}}} /-->

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

<!-- 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"} /-->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->

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

<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|40","margin":{"top":"var:preset|spacing|40"}}},"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group" style="margin-top:var(--wp--preset--spacing--40)">
<!-- wp:comment-edit-link /-->

<!-- wp:comment-reply-link /-->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
<!-- /wp:comment-template -->

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

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

<!-- wp:comments-pagination-next /-->
<!-- /wp:comments-pagination -->

<!-- wp:post-comments-form /-->
</div>
<!-- /wp:comments -->
</div>
<!-- /wp:group -->
1 change: 1 addition & 0 deletions surrealist/parts/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"surrealist/footer"} /-->
31 changes: 31 additions & 0 deletions surrealist/parts/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!-- 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:group {"align":"wide","layout":{"type":"flex","justifyContent":"space-between"}} -->
<div class="wp-block-group alignwide">
<!-- wp:group {"layout":{"type":"flex"}} -->
<div class="wp-block-group">
<!-- wp:site-logo {"width":64} /-->

<!-- wp:site-title /-->
</div>
<!-- /wp:group -->

<!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group">
<!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"left","orientation":"horizontal"}} /-->

<!-- wp:social-links {"iconColor":"contrast","iconColorValue":"#242121","size":"has-small-icon-size","style":{"spacing":{"blockGap":{"left":"var:preset|spacing|30"}}},"className":"is-style-logos-only"} -->
<ul class="wp-block-social-links has-small-icon-size has-icon-color is-style-logos-only">
<!-- wp:social-link {"url":"#","service":"facebook"} /-->

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

<!-- wp:social-link {"url":"#","service":"instagram"} /-->
</ul>
<!-- /wp:social-links -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
48 changes: 48 additions & 0 deletions surrealist/patterns/footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php
/**
* Title: Default Footer
* Slug: surrealist/footer
* Categories: footer, featured
* Block Types: core/template-part/footer
* Viewport width: 1600
*/

declare( strict_types = 1 );
?>

<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|60"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull" style="padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60)">
<!-- wp:group {"align":"full","layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
<div class="wp-block-group alignfull">
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|40"}},"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group">
<!-- wp:separator {"style":{"layout":{"selfStretch":"fill","flexSize":null}}} -->
<hr class="wp-block-separator has-alpha-channel-opacity"/>
<!-- /wp:separator -->

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

<!-- wp:paragraph {"align":"center","lock":{"move":false,"remove":false},"style":{"typography":{"textTransform":"uppercase","letterSpacing":"0.04em"},"elements":{"link":{"color":{"text":"var:preset|color|contrast"},":hover":{"color":{"text":"var:preset|color|primary"}}}}},"fontSize":"small","fontFamily":"kame-poster"} -->
<p class="has-text-align-center has-link-color has-kame-poster-font-family has-small-font-size" style="letter-spacing:0.04em;text-transform:uppercase"><?php
/* Translators: WordPress link. */
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'surrealist' ) ) . '" rel="nofollow">WordPress</a>';
echo sprintf(
esc_html__( 'Designed with %1$s', 'surrealist' ),
$wordpress_link
);
?></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->

<!-- wp:separator {"style":{"layout":{"selfStretch":"fill","flexSize":null}}} -->
<hr class="wp-block-separator has-alpha-channel-opacity"/>
<!-- /wp:separator -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
45 changes: 45 additions & 0 deletions surrealist/patterns/front-page.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php
/**
* Title: Front Page
* Slug: surrealist/front-page
* Inserter: no
*/

declare( strict_types = 1 );
?>

<!-- wp:cover {"url":"<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/the_tilled_field.jpg","hasParallax":true,"dimRatio":50,"overlayColor":"contrast","isUserOverlayColor":true,"minHeight":100,"minHeightUnit":"vh","contentPosition":"center center","style":{"spacing":{"padding":{"top":"0","bottom":"0"}}},"layout":{"type":"default"}} -->
<div class="wp-block-cover has-parallax" style="padding-top:0;padding-bottom:0;min-height:100vh">
<span aria-hidden="true" class="wp-block-cover__background has-contrast-background-color has-background-dim"></span>
<div class="wp-block-cover__image-background has-parallax" style="background-position:50% 50%;background-image:url(<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/the_tilled_field.jpg)"></div>
<div class="wp-block-cover__inner-container">
<!-- wp:group {"style":{"dimensions":{"minHeight":"100vh"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch","verticalAlignment":"space-between"}} -->
<div class="wp-block-group" style="min-height:100vh">
<!-- wp:spacer {"height":"0px","style":{"layout":{"flexSize":"30px","selfStretch":"fixed"}}} -->
<div style="height:0px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:group {"align":"full","style":{"spacing":{"blockGap":"var:preset|spacing|50"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
<div class="wp-block-group alignfull">
<!-- wp:spacer {"height":"0px","style":{"layout":{"flexSize":"32px","selfStretch":"fixed"}}} -->
<div style="height:0px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:site-title {"textAlign":"center","isLink":false,"style":{"typography":{"lineHeight":"0.83","fontSize":"20vw"},"elements":{"link":{"color":{"text":"var:preset|color|base"}}}},"textColor":"base"} /-->

<!-- wp:navigation {"hasIcon":false,"layout":{"type":"flex","justifyContent":"center"},"fontSize":"medium"} /-->
</div>
<!-- /wp:group -->

<!-- wp:group {"align":"wide","style":{"elements":{"link":{"color":{"text":"var:preset|color|base"},":hover":{"color":{"text":"var:preset|color|base"}}}},"spacing":{"padding":{"bottom":"var:preset|spacing|30"}}},"textColor":"base","layout":{"type":"default"}} -->
<div class="wp-block-group alignwide has-base-color has-text-color has-link-color" style="padding-bottom:var(--wp--preset--spacing--30)">
<!-- wp:paragraph {"align":"center","fontSize":"small"} -->
<p class="has-text-align-center has-small-font-size"><?php echo esc_html__( 'The Tilled Field by Joan Miró (d. 1983)', 'surrealist' ); ?> - <a href="https://www.guggenheim.org/artwork/2934" rel="nofollow">https://www.guggenheim.org/artwork/2934</a>, <?php echo esc_html__( 'Public Domain', 'surrealist' ); ?>, <a href="https://en.wikipedia.org/w/index.php?curid=17691985" rel="nofollow">https://en.wikipedia.org/w/index.php?curid=17691985</a></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</div>
</div>
<!-- /wp:cover -->
17 changes: 17 additions & 0 deletions surrealist/patterns/hidden-404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
/**
* Title: A 404 page
* Slug: surrealist/hidden-404
* Inserter: no
*/

declare( strict_types = 1 );
?>

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

<!-- wp:paragraph -->
<p><?php echo esc_html__( 'It looks like nothing was found at this location. Maybe try a search?', 'surrealist' ); ?></p>
<!-- /wp:paragraph -->
13 changes: 13 additions & 0 deletions surrealist/patterns/hidden-no-results-content.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
/**
* Title: No Results Content
* Slug: surrealist/hidden-no-results-content
* Inserter: no
*/

declare( strict_types = 1 );
?>

<!-- wp:paragraph {"style":{"spacing":{"margin":{"top":"0","bottom":"0"}}}} -->
<p style="margin-top:0;margin-bottom:0"><?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', 'surrealist' ); ?></p>
<!-- /wp:paragraph -->
11 changes: 11 additions & 0 deletions surrealist/patterns/hidden-search-field.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
/**
* Title: Search Field
* Slug: surrealist/hidden-search-field
* Inserter: no
*/

declare( strict_types = 1 );
?>

<!-- wp:search {"label":"","showLabel":false,"placeholder":"<?php echo esc_html_x( 'Search...', 'This is a placeholder text in a search field', 'surrealist' ); ?>","buttonText":"","buttonUseIcon":true} /-->
62 changes: 62 additions & 0 deletions surrealist/patterns/posts-post-list.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?php
/**
* Title: Post List
* Slug: surrealist/posts-post-list
* Categories: posts, featured
* Viewport width: 1600
*/

declare( strict_types = 1 );
?>

<!-- wp:group {"align":"full","layout":{"type":"default"}} -->
<div class="wp-block-group alignfull">
<!-- wp:query {"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false}} -->
<div class="wp-block-query">
<!-- wp:group {"style":{"spacing":{"margin":{"bottom":"var:preset|spacing|60"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="margin-bottom:var(--wp--preset--spacing--60)">
<!-- wp:post-template {"style":{"spacing":{"blockGap":"var:preset|spacing|80"}}} -->
<!-- wp:columns {"style":{"spacing":{"blockGap":{"top":"var:preset|spacing|60","left":"0"}}}} -->
<div class="wp-block-columns">
<!-- wp:column {"layout":{"type":"default"}} -->
<div class="wp-block-column">
<!-- wp:post-featured-image {"isLink":true} /-->
</div>
<!-- /wp:column -->

<!-- wp:column {"verticalAlignment":"bottom","layout":{"type":"default"}} -->
<div class="wp-block-column is-vertically-aligned-bottom">
<!-- wp:group {"style":{"spacing":{"padding":{"right":"5vw","left":"5vw"},"blockGap":"var:preset|spacing|30"}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="padding-right:5vw;padding-left:5vw">
<!-- wp:post-title {"isLink":true} /-->

<!-- wp:post-terms {"term":"category"} /-->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->
<!-- /wp:post-template -->
</div>
<!-- /wp:group -->

<!-- wp:group {"style":{"spacing":{"margin":{"top":"var:preset|spacing|80","bottom":"var:preset|spacing|60"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="margin-top:var(--wp--preset--spacing--80);margin-bottom:var(--wp--preset--spacing--60)">
<!-- 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-numbers /-->

<!-- wp:query-pagination-next /-->
<!-- /wp:query-pagination -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:query -->
</div>
<!-- /wp:group -->
40 changes: 40 additions & 0 deletions surrealist/patterns/text-biography.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php
/**
* Title: Biography
* Slug: surrealist/text-biography
* Categories: text, featured
* Viewport width: 1600
*/

declare( strict_types = 1 );
?>

<!-- wp:group {"align":"full","style":{"elements":{"link":{"color":{"text":"var:preset|color|base"}}},"spacing":{"padding":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|60","left":"5vw","right":"5vw"}}},"backgroundColor":"contrast","textColor":"base","layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull has-base-color has-contrast-background-color has-text-color has-background has-link-color" style="padding-top:var(--wp--preset--spacing--60);padding-right:5vw;padding-bottom:var(--wp--preset--spacing--60);padding-left:5vw">
<!-- wp:paragraph {"fontSize":"small"} -->
<p class="has-small-font-size"><a href="#"><?php echo esc_html__( '&larr; Back', 'surrealist' ); ?></a></p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":"220px","sizeSlug":"full","linkDestination":"none","className":"is-style-default"} -->
<figure class="wp-block-image size-full is-resized is-style-default"><img src="<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/portrait_of_joan_miro_barcelona_1935_june_13.jpg" alt="" class="" style="width:220px"/>
<figcaption class="wp-element-caption"><?php echo esc_html__( 'Photographed by Carl Van Vechten', 'surrealist' ); ?></figcaption>
</figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p><?php echo wp_kses_post( __( '<strong>Joan Miró i Ferrà </strong> (20 April 1893 – 25 December 1983) was a Spanish painter, sculptor and ceramist born in Barcelona. Professionally, he was simply known as Joan Miró. A museum dedicated to his work, the Fundació Joan Miró, was established in his native city of Barcelona in 1975, and another, the Fundació Pilar i Joan Miró, was established in his adoptive city of Palma in 1981.', 'surrealist' ) ); ?></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><?php echo esc_html__( 'Earning international acclaim, his work has been interpreted as Surrealism but with a personal style, sometimes also veering into Fauvism and Expressionism. He was notable for his interest in the unconscious or the subconscious mind, reflected in his re-creation of the childlike. His difficult-to-classify works also had a manifestation of Catalan pride. In numerous interviews dating from the 1930s onwards, Miró expressed contempt for conventional painting methods as a way of supporting bourgeois society, and declared an "assassination of painting" in favour of upsetting the visual elements of established painting.', 'surrealist' ); ?></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"fontSize":"small"} -->
<p class="has-small-font-size"><?php echo wp_kses_post( __( 'Joan Miró. (2024, April 5). In <em>Wikipedia</em>.', 'surrealist' ) ); ?> <a href="https://en.wikipedia.org/wiki/Joan_Mir%C3%B3" rel="nofollow">https://en.wikipedia.org/wiki/Joan_Mir%C3%B3</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"fontSize":"small"} -->
<p class="has-small-font-size"><a href="#"><?php echo esc_html__( '&larr; Back', 'surrealist' ); ?></a></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->
Loading
Loading