Sfoglia il codice sorgente

Heiwa: initial commit (#5900)

* Heiwa: initial commit

* Heiwa: Horizontal space tweak and new screenshot

* Update heiwa/templates/header-footer-only.html

Co-authored-by: Jeff Ong <jonger4@gmail.com>

* Heiwa: Edit primary, secondary colours, and query title size

Co-authored-by: Jeff Ong <jonger4@gmail.com>
Takashi Irie 3 anni fa
parent
commit
555640575a

+ 1 - 0
heiwa/parts/footer.html

@@ -0,0 +1 @@
+<!-- wp:pattern {"slug":"heiwa/footer-default"} /-->

+ 11 - 0
heiwa/parts/header.html

@@ -0,0 +1,11 @@
+<!-- wp:group {"className":"gapless-group","layout":{"inherit":"true"}} -->
+<div class="wp-block-group gapless-group"><!-- wp:group {"align":"full","style":{"spacing":{"padding":{"bottom":"var(--wp--custom--gap--vertical)","top":"var(--wp--custom--gap--vertical)"}},"elements":{"link":{"color":{"text":"var:preset|color|foreground"}}}},"className":"site-header","layout":{"type":"flex","justifyContent":"space-between"}} -->
+<div class="wp-block-group alignfull site-header has-link-color" style="padding-top:var(--wp--custom--gap--vertical);padding-bottom:var(--wp--custom--gap--vertical)"><!-- wp:group {"className":"site-brand","layout":{"type":"flex"}} -->
+<div class="wp-block-group site-brand"><!-- wp:site-logo {"width":64} /-->
+
+<!-- wp:site-title /--></div>
+<!-- /wp:group -->
+
+<!-- wp:navigation {"ref":99,"overlayMenu":"always","__unstableLocation":"primary","layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"right","orientation":"horizontal"},"style":{"spacing":{"margin":{"top":"0"}}}} /--></div>
+<!-- /wp:group --></div>
+<!-- /wp:group -->

+ 150 - 0
heiwa/patterns/footer-default.php

@@ -0,0 +1,150 @@
+<?php
+/**
+ * Title: Default footer block pattern
+ * Slug: heiwa/footer-default
+ * Categories: footer
+ * Block Types: core/template-part/footer
+ */
+?>
+
+<!-- wp:group {"style":{"spacing":{"blockGap":{"top":"0px","left":"0px"},"margin":{"top":"0px","bottom":"0px"}}},"layout":{"inherit":true}} -->
+<div class="wp-block-group" style="margin-top:0px;margin-bottom:0px">
+
+	<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"7vw","bottom":"7vw"}},"elements":{"link":{"color":{"text":"var:preset|color|background"}}}},"backgroundColor":"foreground","textColor":"background"} -->
+	<div class="wp-block-group alignfull has-background-color has-foreground-background-color has-text-color has-background has-link-color" style="padding-top:7vw;padding-bottom:7vw">
+
+		<!-- wp:columns -->
+		<div class="wp-block-columns">
+
+			<!-- wp:column {"width":"32%"} -->
+			<div class="wp-block-column" style="flex-basis:32%">
+
+				<!-- wp:group {"style":{"spacing":{"blockGap":{"top":"0px","left":"0px"}}}} -->
+				<div class="wp-block-group">
+
+					<!-- wp:site-title {"style":{"spacing":{"margin":{"top":"0px","right":"0px","bottom":"8px","left":"0px"}},"typography":{"fontSize":"1.375rem","lineHeight":"1.272"}}} /-->
+
+					<!-- wp:paragraph -->
+						<p>
+							<?php
+								echo esc_html__( 'A design and development agency. We create digital products that make people’s lives better and healthier.', 'heiwa' );
+							?>
+						</p>
+					<!-- /wp:paragraph -->
+
+				</div>
+				<!-- /wp:group -->
+
+			</div>
+			<!-- /wp:column -->
+
+			<!-- wp:column {"width":"16%"} -->
+			<div class="wp-block-column" style="flex-basis:16%"></div>
+			<!-- /wp:column -->
+
+			<!-- wp:column {"width":"16%"} -->
+			<div class="wp-block-column" style="flex-basis:16%">
+
+				<!-- wp:paragraph -->
+				<p>
+					<?php
+						echo sprintf( '%1$s<br>%2$s<br>%3$s',
+							esc_html( '123 Example St,', 'heiwa' ),
+							esc_html( 'San Francisco,', 'heiwa' ),
+							esc_html( 'CA 12345-6789', 'heiwa' )
+						);
+					?>
+				</p>
+				<!-- /wp:paragraph -->
+
+			</div>
+			<!-- /wp:column -->
+
+			<!-- wp:column {"width":"16%"} -->
+			<div class="wp-block-column" style="flex-basis:16%">
+
+				<!-- wp:group {"style":{"spacing":{"blockGap":{"top":"0px","left":"0px"}}}} -->
+				<div class="wp-block-group">
+
+					<!-- wp:paragraph -->
+					<p>
+						<a href="#">
+							<?php echo esc_html__( 'example@example.com', 'heiwa' ); ?>
+						</a>
+					</p>
+					<!-- /wp:paragraph -->
+
+					<!-- wp:paragraph -->
+					<p>
+						<?php echo esc_html__( '123-456-7890', 'heiwa' ); ?>
+					</p>
+					<!-- /wp:paragraph -->
+
+				</div>
+				<!-- /wp:group -->
+
+			</div>
+			<!-- /wp:column -->
+
+			<!-- wp:column {"width":"20%"} -->
+			<div class="wp-block-column" style="flex-basis:20%">
+
+				<!-- wp:group {"style":{"spacing":{"blockGap":{"top":"0px","left":"0px"}}}} -->
+				<div class="wp-block-group">
+
+					<!-- wp:paragraph -->
+					<p>
+						<a href="#">
+							<?php echo esc_html__( 'Facebook', 'heiwa' ); ?>
+						</a>
+					</p>
+					<!-- /wp:paragraph -->
+
+					<!-- wp:paragraph -->
+					<p>
+						<a href="#">
+							<?php echo esc_html__( 'Twitter', 'heiwa' ); ?>
+						</a>
+					</p>
+					<!-- /wp:paragraph -->
+
+					<!-- wp:paragraph -->
+					<p>
+						<a href="#">
+							<?php echo esc_html__( 'Instagram', 'heiwa' ); ?>
+						</a>
+					</p>
+					<!-- /wp:paragraph -->
+
+				</div>
+				<!-- /wp:group -->
+
+			</div>
+			<!-- /wp:column -->
+
+		</div>
+		<!-- /wp:columns -->
+
+	</div>
+	<!-- /wp:group -->
+
+	<!-- wp:group {"align":"full","style":{"elements":{"link":{"color":{"text":"var:preset|color|background"}}}},"backgroundColor":"foreground","textColor":"background","layout":{"inherit":false}} -->
+	<div class="wp-block-group alignfull has-background-color has-foreground-background-color has-text-color has-background has-link-color">
+
+		<!-- wp:paragraph {"align":"left"} -->
+		<p class="has-text-align-left">
+			<?php
+				printf(
+					/* Translators: WordPress link. */
+					esc_html__( 'Proudly powered by %s', 'heiwa' ),
+					'<a href="' . esc_url( __( 'https://wordpress.org', 'heiwa' ) ) . '" rel="nofollow">WordPress</a>'
+				);
+			?>
+		</p>
+		<!-- /wp:paragraph -->
+
+	</div>
+	<!-- /wp:group -->
+
+</div>
+<!-- /wp:group -->

+ 45 - 0
heiwa/readme.txt

@@ -0,0 +1,45 @@
+=== Heiwa ===
+Contributors: Automattic
+Requires at least: 5.8
+Tested up to: 5.9
+Requires PHP: 5.7
+License: GPLv2 or later
+License URI: http://www.gnu.org/licenses/gpl-2.0.html
+
+== Description ==
+
+Heiwa is a theme that supports full-site editing.
+
+== Changelog ==
+
+= 1.0.0 =
+* Initial release
+
+== Copyright ==
+
+Heiwa WordPress Theme, (C) 2022 Automattic
+Heiwa 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.
+
+Heiwa uses the following third-party resources:
+
+Water Journal by Water Journal
+* https://unsplash.com/photos/2bxqtxOJhKo
+* https://unsplash.com/photos/-EvvsegVoUE
+
+Japanese Soccer Magazine by charlesdeluvio
+* https://unsplash.com/photos/vfq0y6Zvex0
+
+Person reading book on white surface photo by Sarah Dorweiler
+* https://unsplash.com/photos/Sy8dsVyiPgs
+
+Used in theme screenshot and demo site.

BIN
heiwa/screenshot.png


+ 16 - 0
heiwa/style.css

@@ -0,0 +1,16 @@
+/*
+Theme Name: Heiwa
+Theme URI: https://wordpress.com/theme/heiwa
+Author: Automattic
+Author URI: https://automattic.com/
+Description: Heiwa is a theme that supports full-site editing.
+Requires at least: 5.8
+Tested up to: 5.9
+Requires PHP: 5.7
+Version: 0.0.1
+License: GNU General Public License v2 or later
+License URI: https://raw.githubusercontent.com/Automattic/themes/trunk/LICENSE
+Template: blockbase
+Text Domain: heiwa
+Tags: auto-loading-homepage, one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, rtl-language-support, theme-options, threaded-comments, translation-ready, wide-blocks
+*/

+ 7 - 0
heiwa/templates/header-footer-only.html

@@ -0,0 +1,7 @@
+<!-- wp:template-part {"slug":"header","tagName":"header"} /-->
+
+<!-- wp:group {"tagName":"main","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}}} -->
+<main class="wp-block-group" style="margin-top:0px;margin-bottom:0px"><!-- wp:post-content {"layout":{"inherit":true}} /--></main>
+<!-- /wp:group -->
+
+<!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->

+ 204 - 0
heiwa/theme.json

@@ -0,0 +1,204 @@
+{
+	"version": 2,
+	"settings": {
+		"color": {
+			"palette": [
+				{
+					"slug": "primary",
+					"color": "#000000",
+					"name": "Primary"
+				},
+				{
+					"slug": "secondary",
+					"color": "#5a00ff",
+					"name": "Secondary"
+				},
+				{
+					"slug": "foreground",
+					"color": "#000000",
+					"name": "Foreground"
+				},
+				{
+					"slug": "background",
+					"color": "#ffffff",
+					"name": "Background"
+				},
+				{
+					"slug": "tertiary",
+					"color": "#f9f9f9",
+					"name": "Tertiary"
+				}
+			]
+		},
+		"custom": {
+			"body": {
+				"typography": {
+					"lineHeight": 1.56
+				}
+			},
+			"button": {
+				"border": {
+					"color": "var(--wp--custom--color--foreground)",
+					"radius": "0px",
+					"style": "solid",
+					"width": "1px"
+				},
+				"color": {
+					"background": "var(--wp--custom--color--foreground)",
+					"text": "var(--wp--custom--color--background)"
+				},
+				"hover": {
+					"color": {
+						"background": "var(--wp--custom--color--primary)",
+						"text": "var(--wp--custom--color--background)"
+					},
+					"border": {
+						"color": "var(--wp--custom--color--primary)"
+					}
+				},
+				"spacing": {
+					"padding": {
+						"top": "1em",
+						"bottom": "1em",
+						"left": "2.111em",
+						"right": "2.111em"
+					}
+				},
+				"typography": {
+					"lineHeight": 1
+				}
+			},
+			"form": {
+				"border": {
+					"width": "1px"
+				},
+				"color": {
+					"background": "#ffffff"
+				},
+				"label": {
+					"spacing": {
+						"margin": {
+							"bottom": "calc(2 * var(--wp--custom--gap--baseline) )"
+						}
+					}
+				}
+			},
+			"gap": {
+				"baseline": "4px",
+				"horizontal": "min(56px, 5vw)",
+				"vertical": "min(28px, 5vw)"
+			}
+		},
+		"layout": {
+			"wideSize": "1240px"
+		},
+		"typography": {
+			"fontFamilies": [
+				{
+					"fontFamily": "\"EB Garamond\", serif",
+					"slug": "body-font",
+					"name": "Body (EB Garamond)",
+					"google": "family=EB+Garamond:ital,wght@0,400..800;1,400..800",
+					"fontSlug": "eb-garamond"
+				},
+				{
+					"fontFamily": "\"EB Garamond\", serif",
+					"slug": "heading-font",
+					"name": "Heading (EB Garamond)",
+					"google": "family=EB+Garamond:ital,wght@0,400..800;1,400..800",
+					"fontSlug": "eb-garamond"
+				}
+			],
+			"fontSizes": [
+				{
+					"name": "Small",
+					"size": "0.94rem",
+					"slug": "small"
+				},
+				{
+					"name": "Normal",
+					"size": "1.13rem",
+					"slug": "normal"
+				},
+				{
+					"name": "Medium",
+					"size": "1.35rem",
+					"slug": "medium"
+				},
+				{
+					"name": "Large",
+					"size": "1.62rem",
+					"slug": "large"
+				},
+				{
+					"name": "Huge",
+					"size": "1.95rem",
+					"slug": "huge"
+				}
+			]
+		}
+	},
+	"styles": {
+		"blocks": {
+			"core/post-title": {
+				"typography": {
+					"lineHeight": "1.39"
+				}
+			},
+			"core/query-title": {
+				"typography": {
+					"fontSize": "var(--wp--preset--font-size--normal)"
+				}
+			},
+			"core/site-title": {
+				"typography": {
+					"fontSize": "var(--wp--preset--font-size--large)",
+					"fontWeight": "600",
+					"lineHeight": "1.077"
+				}
+			}
+		},
+		"elements": {
+			"h1": {
+				"typography": {
+					"fontSize": "clamp(2.312rem, 5vw, 3.375rem)",
+					"lineHeight": "1.167"
+				}
+			},
+			"h2": {
+				"typography": {
+					"fontSize": "var(--wp--preset--font-size--large)",
+					"lineHeight": "1.389"
+				}
+			},
+			"h3": {
+				"typography": {
+					"fontSize": "var(--wp--preset--font-size--medium)",
+					"lineHeight": "1.482"
+				}
+			},
+			"h4": {
+				"typography": {
+					"fontSize": "var(--wp--preset--font-size--normal)",
+					"lineHeight": "1.549"
+				}
+			},
+			"h5": {
+				"typography": {
+					"fontSize": "var(--wp--preset--font-size--small)",
+					"lineHeight": "1.330",
+					"textTransform": "uppercase"
+				}
+			},
+			"h6": {
+				"typography": {
+					"fontSize": "var(--wp--preset--font-size--small)",
+					"lineHeight": "1.595"
+				}
+			}
+		},
+		"spacing": {
+			"blockGap": "calc(7 * var(--wp--custom--gap--baseline))"
+		}
+	}
+}