Przeglądaj źródła

Videomaker: add footer (#4685)

Jeff Ong 3 lat temu
rodzic
commit
654cf86e31

+ 9 - 0
videomaker/assets/theme.css

@@ -56,4 +56,13 @@ a:active {
 	border: var(--wp--custom--form--border--width) var(--wp--custom--form--border--style) var(--wp--preset--color--primary);
 }
 
+footer > .wp-block-group {
+	align-items: center;
+	justify-content: space-between;
+}
+
+footer > .wp-block-group p {
+	margin-bottom: 0;
+}
+
 /*# sourceMappingURL=theme.css.map */

+ 15 - 6
videomaker/block-template-parts/footer.html

@@ -1,7 +1,16 @@
-<!-- wp:group -->
-<div class="wp-block-group">
-	<!-- wp:paragraph {"align":"center","fontSize":"tiny"} -->
-	<p class="has-text-align-center has-tiny-font-size">Proudly Powered by <a href="https://wordpress.org" rel="nofollow">WordPress</a></p>
-	<!-- /wp:paragraph -->
+<!-- wp:group {"align":"full","layout":{"type":"flex"},"style":{"spacing":{"padding":{"top":"var(--wp--custom--gap--horizontal","right":"var(--wp--custom--gap--horizontal","bottom":"var(--wp--custom--gap--horizontal","left":"var(--wp--custom--gap--horizontal"}}}} -->
+<div class="wp-block-group alignfull" style="padding-top: var(--wp--custom--gap--horizontal);padding-right: var(--wp--custom--gap--horizontal);padding-bottom: var(--wp--custom--gap--horizontal);padding-left: var(--wp--custom--gap--horizontal);">
+	<!-- wp:group -->
+	<div class="wp-block-group">
+	<!-- wp:navigation {"orientation":"vertical","__unstableLocation":"footer"} --><!-- /wp:navigation -->
+	</div>
+	<!-- /wp:group -->
+	<!-- wp:group -->
+	<div class="wp-block-group">
+		<!-- 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 -->
+<!-- /wp:group -->

+ 9 - 0
videomaker/functions.php

@@ -10,6 +10,15 @@ function newtheme_editor_styles() {
 			'/assets/theme.css',
 		)
 	);
+	
+	// Primary navigation is used on the header and the footer pattern
+	register_nav_menus(
+		array(
+			'primary' => __( 'Primary Navigation', 'videomaker' ),
+			'social' => __( 'Social Navigation', 'videomaker' ),
+			'footer' => __( 'Footer Navigation', 'videomaker' )
+		)
+	);
 }
 add_action( 'after_setup_theme', 'newtheme_editor_styles' );
 

+ 7 - 0
videomaker/sass/templates/_footer.scss

@@ -0,0 +1,7 @@
+footer > .wp-block-group {
+	align-items: center;
+	justify-content: space-between; // Needed until we have a way to set this via block attributes
+	p {
+		margin-bottom: 0;
+	}
+}

+ 1 - 0
videomaker/sass/theme.scss

@@ -1,3 +1,4 @@
 @import "../../blockbase/sass/blocks/_buttons-outline-style";
 @import "links";
 @import "navigation";
+@import "templates/footer";