Skip to content

Commit

Permalink
Shhh: Add theme (#7545)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamtakashi authored Dec 12, 2023
1 parent b7a1997 commit 83f6def
Show file tree
Hide file tree
Showing 25 changed files with 1,062 additions and 0 deletions.
Binary file added shhh/assets/fonts/dm-mono_italic_300.ttf
Binary file not shown.
Binary file added shhh/assets/fonts/dm-mono_italic_400.ttf
Binary file not shown.
Binary file added shhh/assets/fonts/dm-mono_italic_500.ttf
Binary file not shown.
Binary file added shhh/assets/fonts/dm-mono_normal_300.ttf
Binary file not shown.
Binary file added shhh/assets/fonts/dm-mono_normal_400.ttf
Binary file not shown.
Binary file added shhh/assets/fonts/dm-mono_normal_500.ttf
Binary file not shown.
61 changes: 61 additions & 0 deletions shhh/functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?php
/**
* Shhh functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Shhh
* @since Shhh 1.0
*/

declare( strict_types = 1 );

if ( ! function_exists( 'shhh_support' ) ) :

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

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

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

endif;

add_action( 'after_setup_theme', 'shhh_support' );

if ( ! function_exists( 'shhh_styles' ) ) :

/**
* Enqueue styles.
*
* @since Shhh 1.0
*
* @return void
*/
function shhh_styles() {

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

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

}

endif;

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

declare( strict_types = 1 );
?>

<!-- wp:paragraph -->
<p><?php echo esc_html__( '⌇⌇ Oops, this page cannot be found.', 'shhh' ); ?></p>
<!-- /wp:paragraph -->
57 changes: 57 additions & 0 deletions shhh/patterns/comments.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php
/**
* Title: Comments
* Slug: shhh/comments
* Inserter: no
*/

declare( strict_types = 1 );
?>

<!-- wp:group {"layout":{"type":"constrained","justifyContent":"left","contentSize":"600px"}} -->
<div class="wp-block-group">
<!-- wp:comments {"className":"wp-block-comments-query-loop "} -->
<div class="wp-block-comments wp-block-comments-query-loop">
<!-- wp:comments-title {"level":3} /-->

<!-- wp:comment-template -->
<!-- wp:group {"style":{"spacing":{"margin":{"top":"0","bottom":"var:preset|spacing|50"},"blockGap":"0"}}} -->
<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","verticalAlignment":"top"}} -->
<div class="wp-block-group">
<!-- wp:avatar {"size":38,"style":{"spacing":{"margin":{"top":"0"}},"border":{"radius":"64px"}}} /-->

<!-- wp:group {"style":{"spacing":{"blockGap":"0"}}} -->
<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":"M j, Y 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 {"layout":{"type":"flex","justifyContent":"space-between"}} -->
<!-- wp:comments-pagination-previous /-->

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

<!-- wp:post-comments-form {"style":{"spacing":{"margin":{"top":"var:preset|spacing|80"}}},"fontSize":"small"} /-->
</div>
<!-- /wp:comments -->
</div>
<!-- /wp:group -->
11 changes: 11 additions & 0 deletions shhh/patterns/excerpt.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
/**
* Title: Excerpt
* Slug: shhh/excerpt
* Inserter: no
*/

declare( strict_types = 1 );
?>

<!-- wp:post-excerpt {"moreText":"<?php esc_attr_e( '— read more', 'shhh' ); ?>","showMoreOnNewLine":false} /-->
29 changes: 29 additions & 0 deletions shhh/patterns/footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**
* Title: Default footer
* Slug: shhh/footer
* Categories: footer
* Block Types: core/template-part/footer
*/

declare( strict_types = 1 );
?>

<!-- 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","justifyContent":"center"}} -->
<div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60)">
<!-- wp:paragraph {"lock":{"move":false,"remove":true},"className":"has-x-small-font-size","fontSize":"x-small"} -->
<p class="has-x-small-font-size"><?php
/* Translators: WordPress link. */
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'shhh' ) ) . '" rel="nofollow">WordPress</a>';
echo sprintf(
esc_html__( 'Designed with %1$s', 'shhh' ),
$wordpress_link
);
?></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->
36 changes: 36 additions & 0 deletions shhh/patterns/header.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php
/**
* Title: Default Header
* Slug: shhh/header
* Categories: header
* Block Types: core/template-part/header
*/

declare( strict_types = 1 );
?>

<!-- wp:group {"style":{"spacing":{"padding":{"top":"16vw"},"blockGap":"0"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="padding-top:16vw">
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|60"}},"layout":{"type":"flex","flexWrap":"wrap"}} -->
<div class="wp-block-group">
<!-- wp:site-title /-->

<!-- wp:paragraph {"textColor":"tertiary","className":"has-tertiary-color has-text-color has-small-font-size","fontSize":"small"} -->
<p class="has-tertiary-color has-text-color has-small-font-size">•</p>
<!-- /wp:paragraph -->

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

<!-- wp:group {"style":{"spacing":{"blockGap":"0","padding":{"top":"var:preset|spacing|70"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--70)">
<!-- wp:site-tagline {"style":{"layout":{"selfStretch":"fixed","flexSize":"60%"}}} /-->
</div>
<!-- /wp:group -->

<!-- wp:spacer -->
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
</div>
<!-- /wp:group -->
38 changes: 38 additions & 0 deletions shhh/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
=== Shhh ===
Contributors: Automattic
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 ==

Silence.

== Changelog ==

= 1.0.0 =
* Initial release

== Copyright ==

Shhh WordPress Theme, (C) 2023 Matías & Pablo
Shhh 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.

DM Mono Font
Copyright 2020 The DM Mono Project Authors (https://www.github.com/googlefonts/dm-mono)
This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: http://scripts.sil.org/OFL
License URL: http://scripts.sil.org/OFL
Source: https://www.colophon-foundry.org
-- End of DM Mono Font credits --
Binary file added shhh/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions shhh/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
Theme Name: Shhh
Theme URI: https://wordpress.com/theme/shhh/
Author: Automattic
Author URI: https://automattic.com/
Description: Silence.
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: shhh
Tags: blog, one-column, wide-blocks, block-styles, featured-images, full-site-editing, rtl-language-support, threaded-comments, translation-ready
*/

/*
* 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);
}

/*
* Control the hover stylings of the pseudo element in post title block.
* For some reason, this does not work if the style is added to the theme.json.
*/
.wp-block-post-title:hover::before {
color:var(--wp--preset--color--primary);
}
46 changes: 46 additions & 0 deletions shhh/styles/dark.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"title": "Dark",
"settings": {
"color": {
"palette": [
{
"color": "#111111",
"name": "base",
"slug": "Base"
},
{
"color": "#2F5EE9",
"name": "Primary",
"slug": "primary"
},
{
"color": "#ffffff",
"name": "Secondary",
"slug": "secondary"
},
{
"color": "#878787",
"name": "Tertiary",
"slug": "tertiary"
},
{
"color": "#2F5EE911",
"name": "Accent",
"slug": "accent"
},
{
"color": "#2F5EE91F",
"name": "Accent / Two",
"slug": "accent-2"
},
{
"color": "#11111111",
"name": "Accent / Three",
"slug": "accent-3"
}
]
}
}
}
13 changes: 13 additions & 0 deletions shhh/templates/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->

<!-- wp:group {"tagName":"main","layout":{"type":"constrained"}} -->
<main class="wp-block-group">
<!-- wp:pattern {"slug":"shhh/404"} /-->

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

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

<!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|80"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--80)">
<!-- wp:query-title {"type":"archive"} /-->
</div>
<!-- /wp:group -->

<!-- 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","layout":{"type":"constrained"}} -->
<main class="wp-block-query">
<!-- wp:post-template {"layout":{"type":"default"}} -->
<!-- wp:post-title {"isLink":true,"style":{"spacing":{"margin":{"top":"var:preset|spacing|70","bottom":"var:preset|spacing|60"}}}} /-->

<!-- wp:pattern {"slug":"shhh/excerpt"} /-->

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

<!-- wp:post-date {"format":"M j, Y","isLink":true} /-->

<!-- wp:spacer {"height":"150px"} -->
<div style="height:150px" 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 {"paginationArrow":"arrow","layout":{"type":"flex","justifyContent":"center"}} -->
<!-- wp:query-pagination-previous /-->

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

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

0 comments on commit 83f6def

Please sign in to comment.