Skip to content

Commit

Permalink
Cottage: add theme (#7960)
Browse files Browse the repository at this point in the history
* "Cottage is blogging theme with a cottagecore aesthetic."

Issues caused by CBT described here must be addressed.

* A round of updates

* Fixed the empty alt attributes.
* Fixed the WordPress link in the footer.
* Fixed the quote on the homepage.

* Remove hidden .DS_store files

---------

Co-authored-by: alaczek <[email protected]>
  • Loading branch information
beafialho and alaczek authored Aug 6, 2024
1 parent 44a8b7a commit e7ff59b
Show file tree
Hide file tree
Showing 59 changed files with 2,194 additions and 0 deletions.
Binary file added cottage/assets/fonts/cormorant_italic_300.ttf
Binary file not shown.
Binary file added cottage/assets/fonts/cormorant_italic_400.ttf
Binary file not shown.
Binary file added cottage/assets/fonts/cormorant_italic_500.ttf
Binary file not shown.
Binary file added cottage/assets/fonts/cormorant_italic_600.ttf
Binary file not shown.
Binary file added cottage/assets/fonts/cormorant_italic_700.ttf
Binary file not shown.
Binary file added cottage/assets/fonts/cormorant_normal_300.ttf
Binary file not shown.
Binary file added cottage/assets/fonts/cormorant_normal_400.ttf
Binary file not shown.
Binary file added cottage/assets/fonts/cormorant_normal_500.ttf
Binary file not shown.
Binary file added cottage/assets/fonts/cormorant_normal_600.ttf
Binary file not shown.
Binary file added cottage/assets/fonts/cormorant_normal_700.ttf
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.
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 cottage/assets/images/cottage_post_1-min.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 cottage/assets/images/mood_1-min.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 cottage/assets/images/mood_2-min.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 cottage/assets/images/mood_3-min.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 cottage/assets/images/mood_4-min.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 cottage/assets/images/mood_5-min.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 cottage/assets/images/mood_6-min.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 cottage/assets/images/mood_7-scaled.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 cottage/assets/images/mood_8-min.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 61 additions & 0 deletions cottage/functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?php
/**
* Cottage functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Cottage
* @since Cottage 1.0
*/

declare( strict_types = 1 );

if ( ! function_exists( 'cottage_support' ) ) :

/**
* Sets up theme defaults and registers support for various WordPress feacottageres.
*
* @since Cottage 1.0
*
* @recottagern void
*/
function cottage_support() {

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

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

endif;

add_action( 'after_secottagep_theme', 'cottage_support' );

if ( ! function_exists( 'cottage_styles' ) ) :

/**
* Enqueue styles.
*
* @since Cottage 1.0
*
* @recottagern void
*/
function cottage_styles() {

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

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

}

endif;

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

<!-- wp:group {"layout":{"type":"constrained","justifyContent":"left"}} -->
<div class="wp-block-group">
<!-- wp:comment-template {"style":{"spacing":{"padding":{"left":"0px"}}}} -->
<!-- wp:group {"style":{"spacing":{"margin":{"top":"0","bottom":"var:preset|spacing|60"}}}} -->
<div class="wp-block-group" style="margin-top:0;margin-bottom:var(--wp--preset--spacing--60)">
<!-- wp:group {"style":{"spacing":{"blockGap":"1rem"}},"layout":{"type":"flex","flexWrap":"nowrap","verticalAlignment":"top"}} -->
<div class="wp-block-group">
<!-- wp:avatar {"size":56,"style":{"border":{"radius":"50%"}}} /-->

<!-- wp:group -->
<div class="wp-block-group">
<!-- wp:group {"style":{"spacing":{"blockGap":"0"}},"layout":{"type":"flex","orientation":"vertical"}} -->
<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 -->

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

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

<!-- wp:group {"style":{"spacing":{"margin":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|60"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="margin-top:var(--wp--preset--spacing--60);margin-bottom:var(--wp--preset--spacing--60)">
<!-- wp:comments-pagination {"paginationArrow":"arrow","layout":{"type":"flex","justifyContent":"space-between"}} -->
<!-- wp:comments-pagination-previous /-->

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

<!-- wp:group {"style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"constrained","justifyContent":"left"}} -->
<div class="wp-block-group" style="margin-top:0px;margin-bottom:0px">
<!-- wp:post-comments-form {"style":{"spacing":{"margin":{"top":"var:preset|spacing|60"}}}} /-->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:comments -->
</div>
<!-- /wp:group -->
1 change: 1 addition & 0 deletions cottage/parts/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"cottage/footer"} /-->
19 changes: 19 additions & 0 deletions cottage/parts/header-with-cover.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- wp:group {"layout":{"type":"default"}} -->
<div class="wp-block-group"><!-- wp:cover {"useFeaturedImage":true,"dimRatio":40,"focalPoint":{"x":0.5,"y":0.7},"minHeight":60,"minHeightUnit":"vh","customGradient":"linear-gradient(180deg,rgb(0,0,0) 0%,rgba(0,0,0,0) 45%,rgba(0,0,0,0) 55%,rgb(0,0,0) 100%)","contentPosition":"center center","isDark":false,"style":{"spacing":{"margin":{"top":"0px","bottom":"var:preset|spacing|60"},"padding":{"top":"0px","bottom":"0px","left":"0px","right":"0px"}}},"layout":{"type":"default"}} -->
<div class="wp-block-cover is-light" style="margin-top:0px;margin-bottom:var(--wp--preset--spacing--60);padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;min-height:60vh"><span aria-hidden="true" class="wp-block-cover__background has-background-dim-40 has-background-dim has-background-gradient" style="background:linear-gradient(180deg,rgb(0,0,0) 0%,rgba(0,0,0,0) 45%,rgba(0,0,0,0) 55%,rgb(0,0,0) 100%)"></span><div class="wp-block-cover__inner-container"><!-- wp:group {"align":"wide","style":{"dimensions":{"minHeight":"60vh"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch","verticalAlignment":"space-between"}} -->
<div class="wp-block-group alignwide" style="min-height:60vh"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50","left":"var:preset|spacing|50","right":"var:preset|spacing|50"}},"layout":{"selfStretch":"fit","flexSize":null},"elements":{"link":{"color":{"text":"var:preset|color|base"}}}},"textColor":"base","layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"}} -->
<div class="wp-block-group alignwide has-base-color has-text-color has-link-color" style="padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)"><!-- wp:site-title {"style":{"layout":{"selfStretch":"fit","flexSize":null}}} /-->

<!-- wp:navigation {"align":"wide","layout":{"type":"flex"}} /--></div>
<!-- /wp:group -->

<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|60","left":"var:preset|spacing|50","right":"var:preset|spacing|50"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignwide" style="padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--60);padding-left:var(--wp--preset--spacing--50)"><!-- wp:group {"align":"wide","style":{"elements":{"link":{"color":{"text":"var:preset|color|base"}}},"spacing":{"blockGap":"var:preset|spacing|40"}},"textColor":"base","layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group alignwide has-base-color has-text-color has-link-color"><!-- wp:post-date /-->

<!-- wp:post-title {"level":1,"style":{"typography":{"lineHeight":"1.3"}},"fontSize":"xxx-large"} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div></div>
<!-- /wp:cover --></div>
<!-- /wp:group -->
1 change: 1 addition & 0 deletions cottage/parts/header-with-sticky-post.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"cottage/header-with-sticky-post"} /-->
7 changes: 7 additions & 0 deletions cottage/parts/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50","top":"var:preset|spacing|50","bottom":"var:preset|spacing|50"}},"border":{"bottom":{"color":"var:preset|color|secondary","width":"1px"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="border-bottom-color:var(--wp--preset--color--secondary);border-bottom-width:1px;padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)"><!-- wp:group {"align":"wide","layout":{"type":"flex","flexWrap":"wrap","justifyContent":"space-between"}} -->
<div class="wp-block-group alignwide"><!-- wp:site-title {"style":{"layout":{"selfStretch":"fit","flexSize":null}}} /-->

<!-- wp:navigation {"align":"wide","layout":{"type":"flex"}} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
29 changes: 29 additions & 0 deletions cottage/patterns/404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**
* Title: 404
* Slug: cottage/404
* Categories: hidden
* Inserter: no
*/
?>
<!-- wp:group {"align":"full","style":{"background":{"backgroundImage":{"url":"<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/cottage_background-scaled.jpg","id":31,"source":"file","title":"cottage_background"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group alignfull"><!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->

<!-- wp:group {"tagName":"main","templateLock":"insert","lock":{"move":false,"remove":true},"style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}},"dimensions":{"minHeight":"400px"}},"layout":{"type":"constrained"}} -->
<main class="wp-block-group" style="min-height:400px;margin-top:0px;margin-bottom:0px"><!-- wp:group {"align":"wide","style":{"spacing":{"margin":{"top":"var:preset|spacing|70","bottom":"var:preset|spacing|70"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group alignwide" style="margin-top:var(--wp--preset--spacing--70);margin-bottom:var(--wp--preset--spacing--70)"><!-- wp:heading {"level":1,"fontSize":"xx-large"} -->
<h1 class="wp-block-heading has-xx-large-font-size" id="oops-that-page-can-t-be-found"><?php esc_html_e('Oops! That page can’t be found.', 'cottage');?></h1>
<!-- /wp:heading -->

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

<!-- wp:search {"label":"Search","showLabel":false,"placeholder":"Search...","buttonText":"Search","buttonPosition":"button-inside","buttonUseIcon":true} /--></div>
<!-- /wp:group --></main>
<!-- /wp:group -->

<!-- wp:group {"style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="margin-top:0px;margin-bottom:0px"><!-- wp:template-part {"slug":"footer","tagName":"footer","align":"full"} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
61 changes: 61 additions & 0 deletions cottage/patterns/archive.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?php
/**
* Title: archive
* Slug: cottage/archive
* Categories: hidden
* Inserter: no
*/
?>
<!-- wp:group {"align":"full","style":{"background":{"backgroundImage":{"url":"<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/cottage_background-scaled.jpg","id":31,"source":"file","title":"cottage_background"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group alignfull"><!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->

<!-- wp:group {"tagName":"main","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"constrained"}} -->
<main class="wp-block-group" style="margin-top:0px;margin-bottom:0px"><!-- wp:group {"align":"wide","style":{"spacing":{"margin":{"top":"var:preset|spacing|70","bottom":"var:preset|spacing|70"},"blockGap":"var:preset|spacing|30"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
<div class="wp-block-group alignwide" style="margin-top:var(--wp--preset--spacing--70);margin-bottom:var(--wp--preset--spacing--70)"><!-- wp:columns {"style":{"spacing":{"blockGap":{"top":"var:preset|spacing|50","left":"var:preset|spacing|60"}}}} -->
<div class="wp-block-columns"><!-- wp:column {"width":"71.5%"} -->
<div class="wp-block-column" style="flex-basis:71.5%"><!-- wp:query-title {"type":"archive","showPrefix":false} /-->

<!-- wp:term-description {"style":{"spacing":{"margin":{"top":"var:preset|spacing|30"}}}} /--></div>
<!-- /wp:column -->

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

<!-- wp:group {"align":"wide","style":{"spacing":{"margin":{"top":"var:preset|spacing|70","bottom":"var:preset|spacing|70"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignwide" style="margin-top:var(--wp--preset--spacing--70);margin-bottom:var(--wp--preset--spacing--70)"><!-- wp:query {"queryId":16,"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"exclude","inherit":true},"enhancedPagination":true,"align":"wide"} -->
<div class="wp-block-query alignwide"><!-- wp:post-template {"style":{"spacing":{"blockGap":"var:preset|spacing|60"}},"layout":{"type":"default","columnCount":3}} -->
<!-- wp:columns {"style":{"spacing":{"blockGap":{"top":"var:preset|spacing|50","left":"var:preset|spacing|60"}}}} -->
<div class="wp-block-columns"><!-- wp:column {"width":"71.5%","style":{"spacing":{"blockGap":"var:preset|spacing|40"}}} -->
<div class="wp-block-column" style="flex-basis:71.5%"><!-- wp:post-date {"style":{"spacing":{"margin":{"top":"0px"}}}} /-->

<!-- wp:post-title {"level":3,"isLink":true} /-->

<!-- wp:post-excerpt {"moreText":"Continue reading","showMoreOnNewLine":false,"excerptLength":40} /--></div>
<!-- /wp:column -->

<!-- wp:column {"width":"28.5%"} -->
<div class="wp-block-column" style="flex-basis:28.5%"><!-- wp:post-featured-image {"isLink":true,"aspectRatio":"1"} /--></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
<!-- /wp:post-template -->

<!-- wp:group {"style":{"spacing":{"margin":{"top":"var:preset|spacing|60"}}},"fontSize":"x-large","layout":{"type":"default"}} -->
<div class="wp-block-group has-x-large-font-size" style="margin-top:var(--wp--preset--spacing--60)"><!-- wp:query-pagination {"paginationArrow":"arrow","showLabel":false,"layout":{"type":"flex","justifyContent":"center"}} -->
<!-- wp:query-pagination-previous /-->

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

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

<!-- wp:group {"style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="margin-top:0px;margin-bottom:0px"><!-- wp:template-part {"slug":"footer","tagName":"footer","align":"full"} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
24 changes: 24 additions & 0 deletions cottage/patterns/footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
/**
* Title: footer
* Slug: cottage/footer
* Categories: hidden
* Inserter: no
*/
?>
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|50","right":"var:preset|spacing|50","bottom":"var:preset|spacing|50","left":"var:preset|spacing|50"}},"elements":{"link":{"color":{"text":"var:preset|color|base"}}}},"backgroundColor":"secondary","textColor":"base","layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"}} -->
<div class="wp-block-group alignfull has-base-color has-secondary-background-color has-text-color has-background has-link-color" style="padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)"><!-- wp:site-title {"level":0,"style":{"typography":{"fontStyle":"normal","fontWeight":"400","textTransform":"uppercase","letterSpacing":"0.1em"}},"fontSize":"x-small","fontFamily":"league-spartan"} /-->

<!-- wp:paragraph {"style":{"typography":{"textTransform":"uppercase","fontStyle":"normal","fontWeight":"400","letterSpacing":"0.1em"}},"fontSize":"x-small","fontFamily":"league-spartan"} -->
<p class="has-league-spartan-font-family has-x-small-font-size" style="font-style:normal;font-weight:400;letter-spacing:0.1em;text-transform:uppercase">
<?php
/* Translators: WordPress link. */
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'cottage' ) ) . '" rel="nofollow">WordPress</a>';
echo sprintf(
esc_html__( 'Designed with %1$s', 'cottage' ),
$wordpress_link
);
?>
</p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->
Loading

0 comments on commit e7ff59b

Please sign in to comment.