Browse Source

Quadrat: Remove PHP templates (#4187)

Ben Dwyer 4 years ago
parent
commit
9faabc6957

+ 0 - 19
quadrat/404.php

@@ -1,19 +0,0 @@
-<?php
-/**
- * 404 template file
- *
- * This is the most generic template file in a WordPress theme
- * and one of the two required files for a theme (the other being style.css).
- * It is used to display a page when nothing more specific matches a query.
- * E.g., it puts together the home page when no home.php file exists.
- *
- * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
- *
- * @package Quadrat
- * @since 1.0.0
- */
-get_header();
-
-	echo gutenberg_block_template_part( '404' );
-
-get_footer();

+ 0 - 18
quadrat/block-template-parts/404.html

@@ -1,18 +0,0 @@
-<!-- wp:template-part {"slug":"header"} /-->
-
-<!-- wp:group {"layout":{"inherit":true}, "className":"page-content"} -->
-<div class="wp-block-group page-content">
-
-<!-- wp:heading {"textAlign":"center","level":1,"fontSize":"large"} -->
-<h1 class="has-text-align-center has-large-font-size">Oops! That page can’t be found.</h1>
-<!-- /wp:heading -->
-
-<!-- wp:paragraph -->
-<p>It looks like nothing was found at this location. Maybe try a search?</p>
-<!-- /wp:paragraph -->
-
-<!-- wp:search {"label":"","buttonText":"Search"} /-->
-</div>
-<!-- /wp:group -->
-
-<!-- wp:template-part {"slug":"footer"} /-->

+ 0 - 22
quadrat/block-template-parts/index.html

@@ -1,22 +0,0 @@
-<!-- wp:template-part {"slug":"header"} /-->
-
-<!-- wp:query {"className":"page-content","tagName":"main","layout":{"inherit":true},"queryId":1,"query":{"perPage":5,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","sticky":"","inherit":true}} -->
-<main class="wp-block-query page-content">
-	<!-- wp:post-template -->
-		<!-- wp:post-date {"fontSize":"tiny","textAlign":"center"} /-->
-		<!-- wp:post-title {"isLink":true, "level": 3, "textAlign":"center"} /-->
-		<!-- wp:post-featured-image {"isLink":true} /-->
-		<!-- wp:post-excerpt /-->
-		<!-- wp:spacer {"height":60} -->
-		<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
-		<!-- /wp:spacer -->
-	<!-- /wp:post-template -->
-	<!-- wp:query-pagination {"align":"wide"} -->
-	<div class="wp-block-query-pagination alignwide"><!-- wp:query-pagination-previous {"label":"Previous Page"} /-->
-	<!-- wp:query-pagination-numbers /-->
-	<!-- wp:query-pagination-next {"label":"Next Page"} /--></div>
-	<!-- /wp:query-pagination -->
-</main>
-<!-- /wp:query -->
-
-<!-- wp:template-part {"slug":"footer"} /-->

+ 0 - 19
quadrat/block-template-parts/page.html

@@ -1,19 +0,0 @@
-<!-- wp:template-part {"slug":"header"} /-->
-
-<!-- wp:group {"style":{"spacing":{"padding":{"top":"30px","right":"20px","bottom":"30px","left":"20px"}}},"layout":{"inherit":true}} -->
-<div class="wp-block-group" style="padding-top:30px;padding-right:20px;padding-bottom:30px;padding-left:20px">
-	<!-- wp:post-title {"textAlign":"center","level":1,"align":"wide"} /-->
-	<!-- wp:spacer {"height":30} -->
-	<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>
-	<!-- /wp:spacer -->
-	<!-- wp:post-featured-image {"align":"wide"} /-->
-</div>
-<!-- /wp:group -->
-
-<!-- wp:spacer {"height":60} -->
-<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
-<!-- /wp:spacer -->
-
-<!-- wp:post-content {"layout":{"inherit":true}} /-->
-
-<!-- wp:template-part {"slug":"footer"} /-->

+ 0 - 22
quadrat/block-template-parts/search.html

@@ -1,22 +0,0 @@
-<!-- wp:template-part {"slug":"header"} /-->
-
-<!-- wp:group {"layout":{"inherit":true}, "className":"page-content"} -->
-<div class="wp-block-group page-content">
-
-<!-- wp:heading -->
-<h2>Results:</h2>
-<!-- /wp:heading -->
-
-<!-- wp:query {"queryId":1,"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true}} -->
-<!-- wp:query-loop -->
-
-	<!-- wp:post-title {"level":5,"isLink":true} /-->
-	<!-- wp:post-excerpt /-->
-
-<!-- /wp:query-loop -->
-<!-- /wp:query -->
-
-</div>
-<!-- /wp:group -->
-
-<!-- wp:template-part {"slug":"footer"} /-->

+ 0 - 60
quadrat/block-template-parts/single.html

@@ -1,60 +0,0 @@
-<!-- wp:template-part {"slug":"header"} /-->
-
-<!-- wp:group {"className":"post-header"} -->
-<div class="wp-block-group post-header">
-
-<!-- wp:group {"style":{"spacing":{"padding":{"top":"170px"}}},"className":"post-meta"} -->
-<div class="wp-block-group post-meta" style="padding-top:170px">
-	<!-- wp:post-date {"textAlign":"center","fontSize":"tiny"} /-->
-	<!-- wp:post-terms {"term":"category","textAlign":"center","fontSize":"tiny"} /-->
-</div>
-<!-- /wp:group -->
-
-<!-- wp:group {"style":{"spacing":{"padding":{"top":"30px","bottom":"30px"}}},"layout":{"inherit":true}} -->
-<div class="wp-block-group" style="padding-top:30px;padding-bottom:30px;">
-	<!-- wp:post-title {"textAlign":"center","level":1,"align":"wide"} /-->
-	<!-- wp:spacer {"height":30} -->
-	<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>
-	<!-- /wp:spacer -->
-	<!-- wp:post-featured-image {"align":"wide"} /-->
-</div>
-<!-- /wp:group -->
-
-
-<!-- wp:spacer {"height":60} -->
-<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
-<!-- /wp:spacer -->
-
-</div>
-<!-- /wp:group -->
-
-<!-- wp:post-content {"layout":{"inherit":true}} /-->
-
-<!-- wp:spacer {"height":150} -->
-<div style="height:150px" aria-hidden="true" class="wp-block-spacer"></div>
-<!-- /wp:spacer -->
-
-<!-- wp:group {"layout":{"inherit":true},"style":{"spacing":{"padding":{"top":"30px","right":"20px","bottom":"0px","left":"20px"}}}} -->
-<div class="wp-block-group" style="padding-top:30px;padding-right:20px;padding-bottom:0px;padding-left:20px">
-	<!-- wp:columns {"align":"wide","className":"next-prev-links"} -->
-	<div class="wp-block-columns alignwide next-prev-links">
-		<!-- wp:column -->
-		<div class="wp-block-column">
-			<!-- wp:post-navigation-link {"type":"previous","label":"←","showTitle":true} /-->
-		</div>
-		<!-- /wp:column -->
-		<!-- wp:column -->
-		<div class="wp-block-column">
-			<!-- wp:post-navigation-link {"textAlign":"right","label":"→","showTitle":true} /-->
-		</div>
-		<!-- /wp:column -->
-	</div>
-	<!-- /wp:columns -->
-	<!-- wp:spacer {"height":150} -->
-	<div style="height:150px" aria-hidden="true" class="wp-block-spacer"></div>
-	<!-- /wp:spacer -->
-	<!-- wp:post-comments /-->
-</div>
-<!-- /wp:group -->
-
-<!-- wp:template-part {"slug":"footer"} /-->

+ 18 - 1
quadrat/block-templates/404.html

@@ -1 +1,18 @@
-<!-- wp:template-part {"slug":"404"} /-->
+<!-- wp:template-part {"slug":"header"} /-->
+
+<!-- wp:group {"layout":{"inherit":true}, "className":"page-content"} -->
+<div class="wp-block-group page-content">
+
+	<!-- wp:heading {"textAlign":"center","level":1,"fontSize":"large"} -->
+	<h1 class="has-text-align-center has-large-font-size">Oops! That page can’t be found.</h1>
+	<!-- /wp:heading -->
+
+	<!-- wp:paragraph -->
+	<p>It looks like nothing was found at this location. Maybe try a search?</p>
+	<!-- /wp:paragraph -->
+
+	<!-- wp:search {"label":"","buttonText":"Search"} /-->
+	</div>
+	<!-- /wp:group -->
+
+	<!-- wp:template-part {"slug":"footer"} /-->

+ 22 - 1
quadrat/block-templates/index.html

@@ -1 +1,22 @@
-<!-- wp:template-part {"slug":"index"} /-->
+<!-- wp:template-part {"slug":"header"} /-->
+
+<!-- wp:query {"className":"page-content","tagName":"main","layout":{"inherit":true},"queryId":1,"query":{"perPage":5,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","sticky":"","inherit":true}} -->
+<main class="wp-block-query page-content">
+	<!-- wp:post-template -->
+		<!-- wp:post-date {"fontSize":"tiny","textAlign":"center"} /-->
+		<!-- wp:post-title {"isLink":true, "level": 3, "textAlign":"center"} /-->
+		<!-- wp:post-featured-image {"isLink":true} /-->
+		<!-- wp:post-excerpt /-->
+		<!-- wp:spacer {"height":60} -->
+		<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
+		<!-- /wp:spacer -->
+	<!-- /wp:post-template -->
+	<!-- wp:query-pagination {"align":"wide"} -->
+	<div class="wp-block-query-pagination alignwide"><!-- wp:query-pagination-previous {"label":"Previous Page"} /-->
+	<!-- wp:query-pagination-numbers /-->
+	<!-- wp:query-pagination-next {"label":"Next Page"} /--></div>
+	<!-- /wp:query-pagination -->
+</main>
+<!-- /wp:query -->
+
+<!-- wp:template-part {"slug":"footer"} /-->

+ 19 - 1
quadrat/block-templates/page.html

@@ -1 +1,19 @@
-<!-- wp:template-part {"slug":"page"} /-->
+<!-- wp:template-part {"slug":"header"} /-->
+
+<!-- wp:group {"style":{"spacing":{"padding":{"top":"30px","right":"20px","bottom":"30px","left":"20px"}}},"layout":{"inherit":true}} -->
+<div class="wp-block-group" style="padding-top:30px;padding-right:20px;padding-bottom:30px;padding-left:20px">
+	<!-- wp:post-title {"textAlign":"center","level":1,"align":"wide"} /-->
+	<!-- wp:spacer {"height":30} -->
+	<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>
+	<!-- /wp:spacer -->
+	<!-- wp:post-featured-image {"align":"wide"} /-->
+</div>
+<!-- /wp:group -->
+
+<!-- wp:spacer {"height":60} -->
+<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
+<!-- /wp:spacer -->
+
+<!-- wp:post-content {"layout":{"inherit":true}} /-->
+
+<!-- wp:template-part {"slug":"footer"} /-->

+ 22 - 1
quadrat/block-templates/search.html

@@ -1 +1,22 @@
-<!-- wp:template-part {"slug":"search"} /-->
+<!-- wp:template-part {"slug":"header"} /-->
+
+<!-- wp:group {"layout":{"inherit":true}, "className":"page-content"} -->
+<div class="wp-block-group page-content">
+
+	<!-- wp:heading -->
+	<h2>Results:</h2>
+	<!-- /wp:heading -->
+
+	<!-- wp:query {"queryId":1,"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true}} -->
+	<!-- wp:query-loop -->
+
+		<!-- wp:post-title {"level":5,"isLink":true} /-->
+		<!-- wp:post-excerpt /-->
+
+	<!-- /wp:query-loop -->
+	<!-- /wp:query -->
+
+	</div>
+	<!-- /wp:group -->
+
+	<!-- wp:template-part {"slug":"footer"} /-->

+ 60 - 1
quadrat/block-templates/single.html

@@ -1 +1,60 @@
-<!-- wp:template-part {"slug":"single"} /-->
+<!-- wp:template-part {"slug":"header"} /-->
+
+<!-- wp:group {"className":"post-header"} -->
+<div class="wp-block-group post-header">
+
+	<!-- wp:group {"style":{"spacing":{"padding":{"top":"170px"}}},"className":"post-meta"} -->
+	<div class="wp-block-group post-meta" style="padding-top:170px">
+		<!-- wp:post-date {"textAlign":"center","fontSize":"tiny"} /-->
+		<!-- wp:post-terms {"term":"category","textAlign":"center","fontSize":"tiny"} /-->
+	</div>
+	<!-- /wp:group -->
+
+	<!-- wp:group {"style":{"spacing":{"padding":{"top":"30px","bottom":"30px"}}},"layout":{"inherit":true}} -->
+	<div class="wp-block-group" style="padding-top:30px;padding-bottom:30px;">
+		<!-- wp:post-title {"textAlign":"center","level":1,"align":"wide"} /-->
+		<!-- wp:spacer {"height":30} -->
+		<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>
+		<!-- /wp:spacer -->
+		<!-- wp:post-featured-image {"align":"wide"} /-->
+	</div>
+	<!-- /wp:group -->
+
+
+	<!-- wp:spacer {"height":60} -->
+	<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
+	<!-- /wp:spacer -->
+
+	</div>
+	<!-- /wp:group -->
+
+	<!-- wp:post-content {"layout":{"inherit":true}} /-->
+
+	<!-- wp:spacer {"height":150} -->
+	<div style="height:150px" aria-hidden="true" class="wp-block-spacer"></div>
+	<!-- /wp:spacer -->
+
+	<!-- wp:group {"layout":{"inherit":true},"style":{"spacing":{"padding":{"top":"30px","right":"20px","bottom":"0px","left":"20px"}}}} -->
+	<div class="wp-block-group" style="padding-top:30px;padding-right:20px;padding-bottom:0px;padding-left:20px">
+		<!-- wp:columns {"align":"wide","className":"next-prev-links"} -->
+		<div class="wp-block-columns alignwide next-prev-links">
+			<!-- wp:column -->
+			<div class="wp-block-column">
+				<!-- wp:post-navigation-link {"type":"previous","label":"←","showTitle":true} /-->
+			</div>
+			<!-- /wp:column -->
+			<!-- wp:column -->
+			<div class="wp-block-column">
+				<!-- wp:post-navigation-link {"textAlign":"right","label":"→","showTitle":true} /-->
+			</div>
+			<!-- /wp:column -->
+		</div>
+		<!-- /wp:columns -->
+		<!-- wp:spacer {"height":150} -->
+		<div style="height:150px" aria-hidden="true" class="wp-block-spacer"></div>
+		<!-- /wp:spacer -->
+		<!-- wp:post-comments /-->
+	</div>
+	<!-- /wp:group -->
+
+	<!-- wp:template-part {"slug":"footer"} /-->

+ 0 - 19
quadrat/footer.php

@@ -1,19 +0,0 @@
-<?php
-/**
- * The template for displaying the footer
- *
- * Contains the closing of the #content div and all content after.
- *
- * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
- *
- * @package WordPress
- * @subpackage Quadrat
- * @since 1.0.0
- */
-
-?>
-
-<?php wp_footer(); ?>
-
-</body>
-</html>

+ 0 - 27
quadrat/header.php

@@ -1,27 +0,0 @@
-<?php
-/**
- * The header for our theme
- *
- * This is the template that displays all of the <head> section and everything up until <div id="content">
- *
- * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
- *
- * @package WordPress
- * @subpackage Quadrat
- * @since 1.0.0
- */
-?><!doctype html>
-<html <?php language_attributes(); ?>>
-<head>
-	<meta charset="<?php bloginfo( 'charset' ); ?>" />
-	<meta name="viewport" content="width=device-width, initial-scale=1" />
-	<link rel="profile" href="https://gmpg.org/xfn/11" />
-	<?php wp_head(); ?>
-</head>
-
-<body <?php body_class(); ?>>
-
-<?php
-if ( function_exists( 'wp_body_open' ) ) {
-	wp_body_open();
-}

+ 0 - 25
quadrat/page.php

@@ -1,25 +0,0 @@
-<?php
-/**
- * Singular template file
- *
- * This is the most generic template file in a WordPress theme
- * and one of the two required files for a theme (the other being style.css).
- * It is used to display a page when nothing more specific matches a query.
- * E.g., it puts together the home page when no home.php file exists.
- *
- * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
- *
- * @package Quadrat
- * @since 1.0.0
- */
-get_header();
-
-	// the header
-	get_template_part( 'template-parts/header' );
-
-	echo gutenberg_block_template_part( 'page' );
-
-	// the footer
-	echo gutenberg_block_template_part( 'footer' );
-
-get_footer();

+ 0 - 19
quadrat/search.php

@@ -1,19 +0,0 @@
-<?php
-/**
- * Search template file
- *
- * This is the most generic template file in a WordPress theme
- * and one of the two required files for a theme (the other being style.css).
- * It is used to display a page when nothing more specific matches a query.
- * E.g., it puts together the home page when no home.php file exists.
- *
- * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
- *
- * @package Quadrat
- * @since 1.0.0
- */
-get_header();
-
-echo gutenberg_block_template_part( 'search' );
-
-get_footer();

+ 0 - 14
quadrat/single.php

@@ -1,14 +0,0 @@
-<?php
-/**
- * Template file for rendering a single post
- *
- * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
- *
- * @package Quadrat
- * @since 1.0.0
- */
-get_header();
-
-echo gutenberg_block_template_part( 'single' );
-
-get_footer();