瀏覽代碼

Building Variations

Jason Crist 3 年之前
父節點
當前提交
c885b8f3db

+ 0 - 17
geologist-blue/variation-readme.md

@@ -24,20 +24,3 @@ For a variation in that folder `/variations/geologist/geologist-banana`
 * Lastly the theme.json files in `/geologist` and `/variations/geologist/geologist-banana` will be merged.
 
 Any resource in the /variations folder will replace the resources in the source theme (with the exception of theme.json);
-
-### Template Mods
-
-A variation can have a `template-mods.json` file that lists strings in the templates to replace.  The use-case this mechanism was build
-for was so that the variation theme could have a different header by defining that in one place.  There are plenty of gaps in this
-implementation but should cover the basic use-cases we need.
-
-The format for this file is:
-
-```
-[
-	{
-		"from": "STRING TO REPLACE",
-		"to": "STRING TO BE USED AS REPLACEMENT"
-	}
-]
-```

+ 0 - 17
geologist-cream/variation-readme.md

@@ -24,20 +24,3 @@ For a variation in that folder `/variations/geologist/geologist-banana`
 * Lastly the theme.json files in `/geologist` and `/variations/geologist/geologist-banana` will be merged.
 
 Any resource in the /variations folder will replace the resources in the source theme (with the exception of theme.json);
-
-### Template Mods
-
-A variation can have a `template-mods.json` file that lists strings in the templates to replace.  The use-case this mechanism was build
-for was so that the variation theme could have a different header by defining that in one place.  There are plenty of gaps in this
-implementation but should cover the basic use-cases we need.
-
-The format for this file is:
-
-```
-[
-	{
-		"from": "STRING TO REPLACE",
-		"to": "STRING TO BE USED AS REPLACEMENT"
-	}
-]
-```

+ 0 - 17
geologist-slate/variation-readme.md

@@ -24,20 +24,3 @@ For a variation in that folder `/variations/geologist/geologist-banana`
 * Lastly the theme.json files in `/geologist` and `/variations/geologist/geologist-banana` will be merged.
 
 Any resource in the /variations folder will replace the resources in the source theme (with the exception of theme.json);
-
-### Template Mods
-
-A variation can have a `template-mods.json` file that lists strings in the templates to replace.  The use-case this mechanism was build
-for was so that the variation theme could have a different header by defining that in one place.  There are plenty of gaps in this
-implementation but should cover the basic use-cases we need.
-
-The format for this file is:
-
-```
-[
-	{
-		"from": "STRING TO REPLACE",
-		"to": "STRING TO BE USED AS REPLACEMENT"
-	}
-]
-```

+ 0 - 17
geologist-yellow/variation-readme.md

@@ -24,20 +24,3 @@ For a variation in that folder `/variations/geologist/geologist-banana`
 * Lastly the theme.json files in `/geologist` and `/variations/geologist/geologist-banana` will be merged.
 
 Any resource in the /variations folder will replace the resources in the source theme (with the exception of theme.json);
-
-### Template Mods
-
-A variation can have a `template-mods.json` file that lists strings in the templates to replace.  The use-case this mechanism was build
-for was so that the variation theme could have a different header by defining that in one place.  There are plenty of gaps in this
-implementation but should cover the basic use-cases we need.
-
-The format for this file is:
-
-```
-[
-	{
-		"from": "STRING TO REPLACE",
-		"to": "STRING TO BE USED AS REPLACEMENT"
-	}
-]
-```

+ 0 - 17
quadrat-black/variation-readme.md

@@ -24,20 +24,3 @@ For a variation in that folder `/variations/geologist/geologist-banana`
 * Lastly the theme.json files in `/geologist` and `/variations/geologist/geologist-banana` will be merged.
 
 Any resource in the /variations folder will replace the resources in the source theme (with the exception of theme.json);
-
-### Template Mods
-
-A variation can have a `template-mods.json` file that lists strings in the templates to replace.  The use-case this mechanism was build
-for was so that the variation theme could have a different header by defining that in one place.  There are plenty of gaps in this
-implementation but should cover the basic use-cases we need.
-
-The format for this file is:
-
-```
-[
-	{
-		"from": "STRING TO REPLACE",
-		"to": "STRING TO BE USED AS REPLACEMENT"
-	}
-]
-```

+ 0 - 17
quadrat-green/variation-readme.md

@@ -24,20 +24,3 @@ For a variation in that folder `/variations/geologist/geologist-banana`
 * Lastly the theme.json files in `/geologist` and `/variations/geologist/geologist-banana` will be merged.
 
 Any resource in the /variations folder will replace the resources in the source theme (with the exception of theme.json);
-
-### Template Mods
-
-A variation can have a `template-mods.json` file that lists strings in the templates to replace.  The use-case this mechanism was build
-for was so that the variation theme could have a different header by defining that in one place.  There are plenty of gaps in this
-implementation but should cover the basic use-cases we need.
-
-The format for this file is:
-
-```
-[
-	{
-		"from": "STRING TO REPLACE",
-		"to": "STRING TO BE USED AS REPLACEMENT"
-	}
-]
-```

+ 0 - 17
quadrat-red/variation-readme.md

@@ -24,20 +24,3 @@ For a variation in that folder `/variations/geologist/geologist-banana`
 * Lastly the theme.json files in `/geologist` and `/variations/geologist/geologist-banana` will be merged.
 
 Any resource in the /variations folder will replace the resources in the source theme (with the exception of theme.json);
-
-### Template Mods
-
-A variation can have a `template-mods.json` file that lists strings in the templates to replace.  The use-case this mechanism was build
-for was so that the variation theme could have a different header by defining that in one place.  There are plenty of gaps in this
-implementation but should cover the basic use-cases we need.
-
-The format for this file is:
-
-```
-[
-	{
-		"from": "STRING TO REPLACE",
-		"to": "STRING TO BE USED AS REPLACEMENT"
-	}
-]
-```

+ 0 - 17
quadrat-white/variation-readme.md

@@ -24,20 +24,3 @@ For a variation in that folder `/variations/geologist/geologist-banana`
 * Lastly the theme.json files in `/geologist` and `/variations/geologist/geologist-banana` will be merged.
 
 Any resource in the /variations folder will replace the resources in the source theme (with the exception of theme.json);
-
-### Template Mods
-
-A variation can have a `template-mods.json` file that lists strings in the templates to replace.  The use-case this mechanism was build
-for was so that the variation theme could have a different header by defining that in one place.  There are plenty of gaps in this
-implementation but should cover the basic use-cases we need.
-
-The format for this file is:
-
-```
-[
-	{
-		"from": "STRING TO REPLACE",
-		"to": "STRING TO BE USED AS REPLACEMENT"
-	}
-]
-```

+ 0 - 17
quadrat-yellow/variation-readme.md

@@ -24,20 +24,3 @@ For a variation in that folder `/variations/geologist/geologist-banana`
 * Lastly the theme.json files in `/geologist` and `/variations/geologist/geologist-banana` will be merged.
 
 Any resource in the /variations folder will replace the resources in the source theme (with the exception of theme.json);
-
-### Template Mods
-
-A variation can have a `template-mods.json` file that lists strings in the templates to replace.  The use-case this mechanism was build
-for was so that the variation theme could have a different header by defining that in one place.  There are plenty of gaps in this
-implementation but should cover the basic use-cases we need.
-
-The format for this file is:
-
-```
-[
-	{
-		"from": "STRING TO REPLACE",
-		"to": "STRING TO BE USED AS REPLACEMENT"
-	}
-]
-```

+ 1 - 1
videomaker-white/block-template-parts/footer.html

@@ -1,4 +1,4 @@
 <!-- wp:spacer {"height":140} -->
 <div style="height:140px" aria-hidden="true" class="wp-block-spacer"></div>
 <!-- /wp:spacer -->
-<!-- wp:pattern {"slug":"blockbase/footer-vertical-menu"} /-->
+<!-- wp:pattern {"slug":"videomaker/footer"} /-->

+ 1 - 2
videomaker-white/inc/block-patterns.php

@@ -24,9 +24,8 @@ if ( ! function_exists( 'videomaker_register_block_patterns' ) ) :
 				'description',
 				'film-credits',
 				'film-poster',
-				'full-width-homepage',
 				'footer',
-				'description',
+				'full-width-homepage',
 				'header-description-and-grid-of-projects',
 				'header-names-list-and-grid',
 				'pattern-grid',

+ 22 - 14
videomaker-white/inc/patterns/footer.php

@@ -1,24 +1,32 @@
 <?php
 /**
- * Footer
+ * Footer with a vertical menu
  *
  * @package Videomaker
  */
 
 return array(
-	'title'      => __( 'Footer', 'videomaker' ),
+	'title'      => __( 'Footer with a vertical menu', 'blockbase' ),
 	'categories' => array( 'videomaker' ),
-	'content'    => '<!-- wp:columns {"align":"wide"} -->
-	<div class="wp-block-columns alignwide"><!-- wp:column -->
-	<div class="wp-block-column">
-	<!-- wp:navigation {"overlayMenu":"never","__unstableLocation":"footer","layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"left","orientation":"vertical"},"style":{"typography":{"lineHeight":"1"}}} /-->
+	'blockTypes' => array( 'core/template-part/footer' ),
+	'content'    => '<!-- wp:group {"layout":{"inherit":"true"}} -->
+	<div class="wp-block-group">
+		<!-- wp:group {"align":"wide","layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"space-between"},"style":{"spacing":{"padding":{"top":"30px","bottom":"min(30px, 5vw)"}}}} -->
+		<div class="wp-block-group alignwide" style="padding-top: 30px;padding-bottom: min(30px, 5vw)">	<!-- wp:group -->
+			<div class="wp-block-group">
+				<!-- wp:navigation {"overlayMenu":"never","__unstableLocation":"footer","layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"left","orientation":"vertical"},"style":{"typography":{"textTransform":"uppercase"},"spacing":{"blockGap":"0px"}}} /-->
+			</div>
+			<!-- /wp:group -->
+			<!-- wp:group {"className":"footer-credit"} -->
+			<div class="wp-block-group footer-credit">
+				<!-- wp:paragraph {"fontSize":"small"} -->
+				<p class="has-small-font-size">Proudly Powered by <a href="https://wordpress.org" rel="nofollow">WordPress</a></p>
+				<!-- /wp:paragraph -->
+			</div>
+			<!-- /wp:group -->
+		</div>
+		<!-- /wp:group -->
 	</div>
-	<!-- /wp:column -->
-
-	<!-- wp:column -->
-	<div class="wp-block-column"><!-- wp:paragraph {"align":"right","style":{"typography":{"lineHeight":1.4}},"fontSize":"extra-small"} -->
-	<p class="has-text-align-right has-extra-small-font-size" style="line-height:1.4">'. esc_html__( '© Mary Han 2021', 'videomaker' ) . '<br>' . esc_html__( 'Creative Director', 'videomaker' ) . '</p>
-	<!-- /wp:paragraph --></div>
-	<!-- /wp:column --></div>
-	<!-- /wp:columns -->',
+	<!-- /wp:group -->
+	',
 );

+ 0 - 17
videomaker-white/variation-readme.md

@@ -24,20 +24,3 @@ For a variation in that folder `/variations/geologist/geologist-banana`
 * Lastly the theme.json files in `/geologist` and `/variations/geologist/geologist-banana` will be merged.
 
 Any resource in the /variations folder will replace the resources in the source theme (with the exception of theme.json);
-
-### Template Mods
-
-A variation can have a `template-mods.json` file that lists strings in the templates to replace.  The use-case this mechanism was build
-for was so that the variation theme could have a different header by defining that in one place.  There are plenty of gaps in this
-implementation but should cover the basic use-cases we need.
-
-The format for this file is:
-
-```
-[
-	{
-		"from": "STRING TO REPLACE",
-		"to": "STRING TO BE USED AS REPLACEMENT"
-	}
-]
-```