Skip to content

Commit

Permalink
Common: add theme (#7211)
Browse files Browse the repository at this point in the history
* add theme from zip

* deleting unused images

* adding theme uri

* version bump to 1.0.0
  • Loading branch information
matiasbenedetto committed Jul 7, 2023
1 parent 6a57f88 commit dde192d
Show file tree
Hide file tree
Showing 19 changed files with 1,460 additions and 0 deletions.
Binary file added common/assets/fonts/anonymous-pro_italic_400.ttf
Binary file not shown.
Binary file added common/assets/fonts/anonymous-pro_italic_700.ttf
Binary file not shown.
Binary file added common/assets/fonts/anonymous-pro_normal_400.ttf
Binary file not shown.
Binary file added common/assets/fonts/anonymous-pro_normal_700.ttf
Binary file not shown.
60 changes: 60 additions & 0 deletions common/functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php
/**
* Common functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Common
* @since Common 1.0
*/


if ( ! function_exists( 'common_support' ) ) :

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

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

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

endif;

add_action( 'after_setup_theme', 'common_support' );

if ( ! function_exists( 'common_styles' ) ) :

/**
* Enqueue styles.
*
* @since Common 1.0
*
* @return void
*/
function common_styles() {

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

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

}

endif;

add_action( 'wp_enqueue_scripts', 'common_styles' );
1 change: 1 addition & 0 deletions common/parts/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"common/footer"} /-->
17 changes: 17 additions & 0 deletions common/parts/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!-- wp:group {"style":{"spacing":{"padding":{"top":"0","right":"0","bottom":"0","left":"0"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="padding-top:0;padding-right:0;padding-bottom:0;padding-left:0"><!-- wp:group {"align":"full","style":{"spacing":{"padding":{"bottom":"0","top":"0","right":"0","left":"0"}}},"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group alignfull" style="padding-top:0;padding-right:0;padding-bottom:0;padding-left:0"><!-- wp:group {"layout":{"type":"flex"}} -->
<div class="wp-block-group"><!-- wp:group {"style":{"spacing":{"blockGap":"20px"}},"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group"><!-- wp:site-title /-->

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

<!-- wp:spacer {"height":"60px","width":"72px"} -->
<div style="height:60px;width:72px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:navigation {"ref":112,"overlayMenu":"never","layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"left","orientation":"vertical"},"style":{"spacing":{"margin":{"top":"0"}}}} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
7 changes: 7 additions & 0 deletions common/parts/post-meta.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!-- wp:group {"layout":{"type":"default"}} -->
<div class="wp-block-group"><!-- wp:group {"style":{"spacing":{"blockGap":"10px"}},"layout":{"type":"flex"}} -->
<div class="wp-block-group"><!-- wp:post-terms {"term":"category"} /-->

<!-- wp:post-terms {"term":"post_tag"} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
10 changes: 10 additions & 0 deletions common/patterns/hidden-no-results-content.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
/**
* Title: Hidden No Results Content
* Slug: common/hidden-no-results-content
* Inserter: no
*/
?>
<!-- wp:paragraph -->
<p><?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', 'common' ); ?></p>
<!-- /wp:paragraph -->
32 changes: 32 additions & 0 deletions common/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
=== Common ===
Contributors: Automattic
Requires at least: 5.8
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 ==

Common\'s style is anything but ordinary and it speaks for itself. The unique combination of an uppercase monospaced font and aesthetically pleasing demo content creates an excellent foundation for any website. Common is perfect for showcasing photos, articles, or collections of content. With its ever-present sidebar menu, browsing through content is both effortless and enjoyable.

== Changelog ==

= 0.0.1 =
* Initial release

== Copyright ==

Common WordPress Theme, (C) 2023 Automattic
Common is distributed under the terms of the GNU GPL.
Common is based on Images (), (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.
Binary file added common/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions common/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
Theme Name: Common
Theme URI: https://wordpress.com/theme/common
Author: Automattic
Author URI: https://automattic.com
Description: Common\'s style is anything but ordinary and it speaks for itself. The unique combination of an uppercase monospaced font and aesthetically pleasing demo content creates an excellent foundation for any website. Common is perfect for showcasing photos, articles, or collections of content. With its ever-present sidebar menu, browsing through content is both effortless and enjoyable.
Requires at least: 5.8
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: common
Tags: blog, photography, portfolio, grid-layout, one-column, three-columns, four-columns, wide-blocks, block-patterns, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, full-site-editing, rtl-language-support, template-editing, theme-options, threaded-comments, translation-ready, one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, theme-options, threaded-comments, translation-ready, wide-blocks, auto-loading-homepage
*/

/*
* 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--base);
border-color: var(--wp--preset--color--secondary);
}

/*
* Link styles
* https://github.com/WordPress/gutenberg/issues/42319
*/
a {
text-decoration-thickness: .0625em !important;
text-underline-offset: .15em;
}
11 changes: 11 additions & 0 deletions common/templates/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- wp:cover {"overlayColor":"base","minHeight":100,"minHeightUnit":"vh","isDark":false,"layout":{"type":"constrained"}} -->
<div class="wp-block-cover is-light" style="min-height:100vh"><span aria-hidden="true" class="wp-block-cover__background has-base-background-color has-background-dim-100 has-background-dim"></span><div class="wp-block-cover__inner-container"><!-- wp:group {"style":{"spacing":{"blockGap":"20px"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"center"}} -->
<div class="wp-block-group"><!-- wp:paragraph {"align":"center","placeholder":"Write title…","style":{"typography":{"fontSize":"0.75rem"}}} -->
<p class="has-text-align-center" style="font-size:0.75rem"><strong>404 Error, page not found</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center"><a href="https://common.mystagingwebsite.com">Go Home</a></p>
<!-- /wp:paragraph --></div>
<!-- /wp:group --></div></div>
<!-- /wp:cover -->
33 changes: 33 additions & 0 deletions common/templates/archive.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!-- wp:columns {"style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50"},"blockGap":{"top":"30px","left":"30px"}}}} -->
<div class="wp-block-columns" style="padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)"><!-- wp:column {"width":"24%"} -->
<div class="wp-block-column" style="flex-basis:24%"><!-- wp:template-part {"slug":"header","theme":"common","tagName":"header"} /--></div>
<!-- /wp:column -->

<!-- wp:column {"width":"76%"} -->
<div class="wp-block-column" style="flex-basis:76%"><!-- wp:query {"queryId":0,"query":{"perPage":18,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true,"taxQuery":null,"parents":[]},"tagName":"main","displayLayout":{"type":"flex","columns":6},"layout":{"type":"default"}} -->
<main class="wp-block-query"><!-- wp:query-title {"type":"archive","style":{"spacing":{"margin":{"bottom":"100px"}}}} /-->

<!-- wp:post-template -->
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|30","padding":{"right":"10px"}}}} -->
<div class="wp-block-group" style="padding-right:10px"><!-- wp:post-featured-image {"isLink":true} /-->

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

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

<!-- wp:group {"layout":{"type":"default"}} -->
<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 --></main>
<!-- /wp:query --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
31 changes: 31 additions & 0 deletions common/templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!-- wp:columns {"style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50"},"blockGap":{"top":"30px","left":"30px"}}}} -->
<div class="wp-block-columns" style="padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)"><!-- wp:column {"width":"24%"} -->
<div class="wp-block-column" style="flex-basis:24%"><!-- wp:template-part {"slug":"header","theme":"common","tagName":"header"} /--></div>
<!-- /wp:column -->

<!-- wp:column {"width":"76%"} -->
<div class="wp-block-column" style="flex-basis:76%"><!-- wp:query {"queryId":0,"query":{"perPage":18,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"taxQuery":null,"parents":[]},"tagName":"main","displayLayout":{"type":"flex","columns":6},"layout":{"type":"default"}} -->
<main class="wp-block-query"><!-- wp:post-template -->
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|30","padding":{"right":"10px"}}}} -->
<div class="wp-block-group" style="padding-right:10px"><!-- wp:post-featured-image {"isLink":true} /-->

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

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

<!-- wp:group {"layout":{"type":"default"}} -->
<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 --></main>
<!-- /wp:query --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
55 changes: 55 additions & 0 deletions common/templates/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!-- wp:columns {"style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50"},"blockGap":{"top":"30px","left":"30px"}}}} -->
<div class="wp-block-columns" style="padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)"><!-- wp:column {"width":"24%"} -->
<div class="wp-block-column" style="flex-basis:24%"><!-- wp:template-part {"slug":"header","theme":"common","tagName":"header"} /--></div>
<!-- /wp:column -->

<!-- wp:column {"width":"76%"} -->
<div class="wp-block-column" style="flex-basis:76%"><!-- wp:columns {"style":{"spacing":{"padding":{"top":"0px","right":"0px","bottom":"0px","left":"0px"},"blockGap":{"top":"30px","left":"30px"}}}} -->
<div class="wp-block-columns" style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px"><!-- wp:column {"width":"50%"} -->
<div class="wp-block-column" style="flex-basis:50%"><!-- wp:post-content /--></div>
<!-- /wp:column -->

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

<!-- wp:column {"width":"25%"} -->
<div class="wp-block-column" style="flex-basis:25%"><!-- wp:post-featured-image /--></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->

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

<!-- wp:group {"style":{"spacing":{"padding":{"bottom":"40px"}}},"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"}} -->
<div class="wp-block-group" style="padding-bottom:40px"><!-- wp:post-navigation-link {"type":"previous","label":"◀ ","showTitle":true} /-->

<!-- wp:post-navigation-link {"textAlign":"right","label":"▶ ","showTitle":true} /--></div>
<!-- /wp:group -->

<!-- wp:query {"queryId":0,"query":{"perPage":18,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"taxQuery":null,"parents":[]},"tagName":"main","displayLayout":{"type":"flex","columns":6},"layout":{"type":"default"}} -->
<main class="wp-block-query"><!-- wp:post-template -->
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|30","padding":{"right":"10px"}}}} -->
<div class="wp-block-group" style="padding-right:10px"><!-- wp:post-featured-image {"isLink":true} /-->

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

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

<!-- wp:group {"layout":{"type":"default"}} -->
<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 --></main>
<!-- /wp:query --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
51 changes: 51 additions & 0 deletions common/templates/search.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!-- wp:columns {"style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50"},"blockGap":{"top":"30px","left":"30px"}}}} -->
<div class="wp-block-columns" style="padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)"><!-- wp:column {"width":"24%"} -->
<div class="wp-block-column" style="flex-basis:24%"><!-- wp:template-part {"slug":"header","theme":"common","tagName":"header"} /--></div>
<!-- /wp:column -->

<!-- wp:column {"width":"76%"} -->
<div class="wp-block-column" style="flex-basis:76%"><!-- wp:group {"style":{"spacing":{"blockGap":"20px"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
<div class="wp-block-group"><!-- wp:query-title {"type":"search"} /-->

<!-- wp:search {"showLabel":false,"widthUnit":"%","style":{"border":{"radius":"0px"}}} /--></div>
<!-- /wp:group -->

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

<!-- wp:query {"queryId":0,"query":{"perPage":18,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true,"taxQuery":null,"parents":[]},"tagName":"main","displayLayout":{"type":"flex","columns":6},"layout":{"type":"default"}} -->
<main class="wp-block-query"><!-- wp:post-template -->
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|30","padding":{"right":"10px"}}}} -->
<div class="wp-block-group" style="padding-right:10px"><!-- wp:post-featured-image {"isLink":true} /-->

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

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

<!-- wp:group {"layout":{"type":"default"}} -->
<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 -->

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

<!-- wp:query-no-results -->
<!-- wp:paragraph -->
<p>Sorry, but nothing matched your search terms. Please try again with some different keywords.</p>
<!-- /wp:paragraph -->
<!-- /wp:query-no-results --></main>
<!-- /wp:query --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
Loading

0 comments on commit dde192d

Please sign in to comment.