Browse Source

theme init

windhamdavid 5 months ago
parent
commit
2d95e905db
9 changed files with 217 additions and 1 deletions
  1. 22 1
      functions.php
  2. 1 0
      parts/footer.html
  3. 14 0
      parts/header.html
  4. 101 0
      patterns/footer.php
  5. BIN
      screenshot.png
  6. 12 0
      templates/index.html
  7. 9 0
      templates/page-no-title.html
  8. 17 0
      templates/page.html
  9. 41 0
      templates/single.html

+ 22 - 1
functions.php

@@ -34,7 +34,28 @@ function lps24_disable_dashboard_items() {
 	remove_meta_box('dashboard_secondary', 'dashboard', 'side');
 	remove_meta_box('dashboard_secondary', 'dashboard', 'side');
 	remove_meta_box('dashboard_quick_press', 'dashboard', 'side');
 	remove_meta_box('dashboard_quick_press', 'dashboard', 'side');
 	remove_meta_box('dashboard_site_health', 'dashboard', 'normal');
 	remove_meta_box('dashboard_site_health', 'dashboard', 'normal');
-	
+}
+
+add_filter ('admin_footer_text', 'lps24_footer_filter');
+function lps24_footer_filter ($default) {
+  return '';
+}
+
+add_filter( 'admin_bar_menu', 'lps24_replace_wordpress_howdy', 25 );
+function lps24_replace_wordpress_howdy( $wp_admin_bar ) {
+  $account = $wp_admin_bar->get_node('my-account');
+  $newtext = str_replace( 'Howdy,', '', $account->title );
+  $wp_admin_bar->add_node( array(
+    'id' => 'my-account',
+    'title' => $newtext,
+  ));
+}
+/* for email */
+add_filter( 'gettext', 'lps24_change_howdy_text', 10, 2 );
+function lps24_change_howdy_text( $translation, $original ) {
+  if( 'Howdy, %1$s' == $original )
+    $translation = '%1$s';
+  return $translation;
 }
 }
 
 
 /***********************************************************
 /***********************************************************

+ 1 - 0
parts/footer.html

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

+ 14 - 0
parts/header.html

@@ -0,0 +1,14 @@
+<!-- wp:group {"style":{"spacing":{"padding":{"top":"20px","bottom":"20px"}}},"className":"has-contrast-light-color has-secondary-dark-background-color has-background","layout":{"type":"constrained"}} -->
+<div class="wp-block-group has-contrast-light-color has-secondary-dark-background-color has-background" style="padding-top:20px;padding-bottom:20px">
+	<!-- wp:group {"align":"wide","layout":{"type":"flex","flexWrap":"wrap","justifyContent":"space-between"}} -->
+	<div class="wp-block-group alignwide">
+		<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|50"},"layout":{"selfStretch":"fit","flexSize":null}},"layout":{"type":"flex"}} -->
+    <div class="wp-block-group">
+			<!-- wp:site-logo {"width":180} /-->
+		</div>
+		<!-- /wp:group -->
+	<!-- wp:navigation {"ref":5,"layout":{"type":"flex","justifyContent":"left","orientation":"horizontal"},"style":{"spacing":{"margin":{"top":"0"},"blockGap":"var:preset|spacing|60"},"layout":{"selfStretch":"fit","flexSize":null}}} /-->
+	</div>
+	<!-- /wp:group -->
+</div>
+<!-- /wp:group -->

+ 101 - 0
patterns/footer.php

@@ -0,0 +1,101 @@
+<?php
+
+/**
+ * Title: Footer
+ * Slug: uhp/footer
+ * Categories: footer
+ * Block Types: core/template-part/footer
+ */
+?>
+
+<!-- wp:group {"align":"full","textColor":"base","backgroundColor":"secondary-dark","layout":{"type":"constrained"}} -->
+<div class="wp-block-group alignfull has-text-color-base has-contrast-light-color has-secondary-dark-background-color has-text-color has-background">
+
+	<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"var:preset|spacing|70","bottom":"var:preset|spacing|50"}}}} -->
+	<div class="wp-block-group alignwide container" style="padding-top:var(--wp--preset--spacing--70);padding-bottom:var(--wp--preset--spacing--50)">
+		
+	<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
+	<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
+	<!-- /wp:spacer -->
+		
+		<!-- wp:columns {"style":{"spacing":{"padding":{"top":"var:preset|spacing|10"}}}} -->
+		<div class="wp-block-columns" style="padding-top:var(--wp--preset--spacing--10)">
+			
+			<!-- wp:column {"width":"50%"} -->
+			<div class="wp-block-column" style="flex-basis:50%">
+
+				<!-- wp:image {"id":385,"width":"160px","height":"auto","sizeSlug":"full","linkDestination":"none"} -->
+				<figure class="wp-block-image size-full is-resized"><img src="https://uhp.ovid/wp-content/uploads/Upstate-Health-Partners-white.png" alt="" class="wp-image-385" style="width:160px;height:auto"/></figure>
+				<!-- /wp:image -->
+
+				<!-- wp:paragraph {"style":{"typography":{"lineHeight":"0","font-size":"1.2rem"}}} -->
+				<p style="font-size:1.2rem;line-height:0"> PO Box 1234</p>
+				<!-- /wp:paragraph -->
+
+				<!-- wp:paragraph {"style":{"typography":{"lineHeight":"0","font-size":"1.2rem"}}} -->
+				<p style="font-size:1.2rem;line-height:0"> City, SC 12345</p>
+				<!-- /wp:paragraph -->
+
+				<!-- wp:paragraph {"style":{"typography":{"lineHeight":"0","font-size":"1.2rem"}}} -->
+				<p style="font-size:1.2rem;line-height:0"> 888-123-4567</p>
+				<!-- /wp:paragraph -->
+
+				<!-- wp:paragraph {"style":{"typography":{"lineHeight":"0","font-size":"1.2rem"}}} -->
+				<p style="font-size:1.2rem;line-height:0"> email@uhp.org</p>
+				<!-- /wp:paragraph -->
+
+				<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
+				<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
+				<!-- /wp:spacer -->
+
+		</div>
+		<!-- /wp:column -->
+			
+			<!-- wp:column {"width":"50%"} -->
+			<div class="wp-block-column" style="flex-basis:50%">
+				
+				<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|10"}},"layout":{"type":"flex","orientation":"horizontal"}} -->
+				<div class="wp-block-group">
+
+				</div>
+				<!-- /wp:group -->
+
+			</div>
+			<!-- /wp:column -->
+
+		</div>
+		<!-- /wp:columns -->
+
+
+		<!-- wp:group {"layout":{"type":"flex","flexWrap":"wrap","justifyContent":"space-between","horizontalAlignment":"top"}} -->
+		<div class="wp-block-group">
+
+			<!-- wp:group {"style":{"spacing":{"blockGap":"6px"}},"layout":{"type":"flex","flexWrap":"wrap"}} -->
+			<div class="wp-block-group">
+				<!-- wp:paragraph {"fontSize":"small"} -->
+				<p class="has-small-font-size"><?php esc_html_e('&copy;&nbsp;', 'uhp'); echo date("Y");?></p>
+				<!-- /wp:paragraph -->
+				<!-- wp:site-title {"level":0,"style":{"typography":{"fontStyle":"normal","fontWeight":"400"}},"fontSize":"small"} /-->
+			</div>
+			<!-- /wp:group -->
+
+			<!-- wp:paragraph {"className":"float-end","style":{"typography":{"font-size":"2rem"}}} -->
+			<p style="font-size:2rem" class="float-end has-primary-link-color"><a href="#"><span class="dashicons dashicons-arrow-up"></span>&#8679;</a></p>
+			<!-- /wp:paragraph -->
+
+			<!-- wp:paragraph {"style":{"typography":{"font-size":"0.8rem"},"elements":{"link":{"color":{"text":"var:preset|color|highlight"}}}}} -->
+			<p class="float-end has-small-font-size has-contrast-color has-text-color">Last Updated: <?php echo get_the_modified_time('F jS, Y');?></p>
+			<!-- /wp:paragraph -->
+
+		</div>
+		<!-- /wp:group -->
+
+	</div>
+	<!-- /wp:group -->
+
+	<!-- wp:spacer {"height":"10px"} -->
+	<div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>
+	<!-- /wp:spacer -->
+
+</div>
+<!-- /wp:group -->

BIN
screenshot.png


+ 12 - 0
templates/index.html

@@ -0,0 +1,12 @@
+<!-- wp:template-part {"slug":"header","tagName":"header","className":"site-header"} /-->
+
+<!-- wp:group {"tagName":"main","style":{"spacing":{"padding":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|50"}}},"layout":{"type":"constrained"}} -->
+<main class="wp-block-group has-base-background-color has-background" style="padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--50);">
+	<!-- wp:heading {"level": 1} -->
+
+	<!-- /wp:heading -->
+	<!-- wp:pattern {"slug":"gwp/query"} /-->
+</main>
+<!-- /wp:group -->
+
+<!-- wp:template-part {"slug":"footer","tagName":"footer","className":"site-footer"} /-->

+ 9 - 0
templates/page-no-title.html

@@ -0,0 +1,9 @@
+<!-- wp:template-part {"slug":"header","tagName":"header","className":"site-header"} /-->
+
+<!-- wp:group {"tagName":"main","style":{"spacing":{"padding":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|50"}}},"layout":{"type":"constrained"}} -->
+<main class="wp-block-group" style="padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--50);">
+	<!-- wp:post-content {"align":"full","layout":{"type":"constrained"}} /-->
+</main>
+<!-- /wp:group -->
+
+<!-- wp:template-part {"slug":"footer","tagName":"footer","className":"site-footer"} /-->

+ 17 - 0
templates/page.html

@@ -0,0 +1,17 @@
+<!-- wp:template-part {"slug":"header","tagName":"header","className":"site-header"} /-->
+
+<!-- wp:group {"tagName":"main","style":{"spacing":{"padding":{"top":"var:preset|spacing|80","bottom":"var:preset|spacing|80"}}},"layout":{"type":"default"}} -->
+<main class="wp-block-group" style="padding-top:var(--wp--preset--spacing--80);padding-bottom:var(--wp--preset--spacing--80)">
+	<!-- wp:group {"align":"full","layout":{"type":"constrained"}} -->
+	<div class="wp-block-group alignfull">
+		<!-- wp:post-title {"level":1} /-->
+	</div>
+	<!-- /wp:group -->
+	<!-- wp:post-content {"layout":{"type":"constrained"}} /-->
+	<!-- wp:spacer {"height":"1rem"} -->
+	<div style="height:1rem" aria-hidden="true" class="wp-block-spacer"></div>
+	<!-- /wp:spacer -->
+</main>
+<!-- /wp:group -->
+
+<!-- wp:template-part {"slug":"footer","tagName":"footer","className":"site-footer"} /-->

+ 41 - 0
templates/single.html

@@ -0,0 +1,41 @@
+<!-- wp:template-part {"slug":"header","tagName":"header","className":"site-header"} /-->
+<!-- wp:spacer {"height":"1rem"} -->
+<div style="height:1rem" aria-hidden="true" class="wp-block-spacer"></div>
+<!-- /wp:spacer -->
+<!-- wp:group {"tagName":"main","style":{"spacing":{"padding":{"top":"var:preset|spacing|80","bottom":"var:preset|spacing|80"}}},"layout":{"type":"default"}} -->
+<main class="wp-block-group" style="padding-top:var(--wp--preset--spacing--80);padding-bottom:var(--wp--preset--spacing--80)">
+	<!-- wp:group {"align":"full","layout":{"type":"constrained"}} -->
+	<div class="wp-block-group alignfull">
+		<!-- wp:post-title {"level":1,"className":"has-secondary-color"} /-->
+		<!-- wp:pattern {"slug":"gwp/hidden-post-meta"} /-->
+	</div>
+	<!-- /wp:group -->
+	<!-- wp:post-content {"layout":{"type":"constrained"}} /-->
+	<!-- wp:spacer {"height":"1rem"} -->
+	<div style="height:1rem" aria-hidden="true" class="wp-block-spacer"></div>
+	<!-- /wp:spacer -->
+	<!-- wp:group {"layout":{"type":"constrained"}} -->
+	<div class="wp-block-group">
+		<!-- wp:post-terms {"term":"post_tag","prefix":"Tags: "} /-->
+		<!-- wp:separator {"backgroundColor":"secondary"} -->
+		<hr class="wp-block-separator has-text-color has-secondary-color has-alpha-channel-opacity has-secondary-background-color has-background"/>
+		<!-- /wp:separator -->
+	</div>
+	<!-- wp:spacer {"height":"1rem"} -->
+	<div style="height:1rem" aria-hidden="true" class="wp-block-spacer"></div>
+	<!-- /wp:spacer -->
+	<!-- /wp:group -->
+	<!-- wp:group {"layout":{"type":"constrained"}} -->
+	<div class="wp-block-group">
+		<!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|60"}}},"layout":{"type":"flex","justifyContent":"space-between","flexWrap":"wrap"}} -->
+		<div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60)">
+			<!-- wp:post-navigation-link {"type":"previous","showTitle":true,"linkLabel":true,"arrow":"arrow"} /-->
+			<!-- wp:post-navigation-link {"showTitle":true,"linkLabel":true,"arrow":"arrow"} /-->
+		</div>
+		<!-- /wp:group -->
+	</div>
+	<!-- /wp:group -->
+</main>
+<!-- /wp:group -->
+
+<!-- wp:template-part {"slug":"footer","tagName":"footer","className":"site-footer"} /-->