瀏覽代碼

Varia: Fix 404 page layout issue

Allan Cole 6 年之前
父節點
當前提交
7117ec064d
共有 5 個文件被更改,包括 18 次插入2 次删除
  1. 1 1
      varia/404.php
  2. 2 0
      varia/sass/layout/_structure.scss
  3. 7 0
      varia/style-rtl.css
  4. 7 0
      varia/style.css
  5. 1 1
      varia/template-parts/content/content-none.php

+ 1 - 1
varia/404.php

@@ -20,7 +20,7 @@ get_header();
 					<h1 class="page-title"><?php _e( 'Oops! That page can&rsquo;t be found.', 'varia' ); ?></h1>
 				</header><!-- .page-header -->
 
-				<div class="page-content">
+				<div class="page-content responsive-max-width">
 					<p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'varia' ); ?></p>
 					<?php get_search_form(); ?>
 				</div><!-- .page-content -->

+ 2 - 0
varia/sass/layout/_structure.scss

@@ -85,6 +85,7 @@
  */
 .site-footer > *,
 .site-main > article > *, // apply vertical margins to article level
+.site-main > .not-found > *, // apply vertical margins to article level
 .entry-content > *,
 [class*="inner-container"] > *,
 .widget-area > * {
@@ -113,6 +114,7 @@
 .site-header > *,
 .entry-header > *,
 .post-thumbnail > *,
+.page-content > *,
 .comment-content > *,
 .author-bio > * {
 	margin-top: map-deep-get($config-global, "spacing", "unit");

+ 7 - 0
varia/style-rtl.css

@@ -768,6 +768,7 @@ footer {
  */
 .site-footer > *,
 .site-main > article > *,
+.site-main > .not-found > *,
 .entry-content > *,
 [class*="inner-container"] > *,
 .widget-area > * {
@@ -778,6 +779,7 @@ footer {
 @media only screen and (min-width: 560px) {
 	.site-footer > *,
 	.site-main > article > *,
+	.site-main > .not-found > *,
 	.entry-content > *,
 	[class*="inner-container"] > *,
 	.widget-area > * {
@@ -788,6 +790,7 @@ footer {
 
 .site-footer > *:first-child,
 .site-main > article > *:first-child,
+.site-main > .not-found > *:first-child,
 .entry-content > *:first-child,
 [class*="inner-container"] > *:first-child,
 .widget-area > *:first-child {
@@ -796,6 +799,7 @@ footer {
 
 .site-footer > *:last-child,
 .site-main > article > *:last-child,
+.site-main > .not-found > *:last-child,
 .entry-content > *:last-child,
 [class*="inner-container"] > *:last-child,
 .widget-area > *:last-child {
@@ -809,6 +813,7 @@ footer {
 .site-header > *,
 .entry-header > *,
 .post-thumbnail > *,
+.page-content > *,
 .comment-content > *,
 .author-bio > * {
 	margin-top: 16px;
@@ -818,6 +823,7 @@ footer {
 .site-header > *:first-child,
 .entry-header > *:first-child,
 .post-thumbnail > *:first-child,
+.page-content > *:first-child,
 .comment-content > *:first-child,
 .author-bio > *:first-child {
 	margin-top: 0;
@@ -826,6 +832,7 @@ footer {
 .site-header > *:last-child,
 .entry-header > *:last-child,
 .post-thumbnail > *:last-child,
+.page-content > *:last-child,
 .comment-content > *:last-child,
 .author-bio > *:last-child {
 	margin-bottom: 0;

+ 7 - 0
varia/style.css

@@ -768,6 +768,7 @@ footer {
  */
 .site-footer > *,
 .site-main > article > *,
+.site-main > .not-found > *,
 .entry-content > *,
 [class*="inner-container"] > *,
 .widget-area > * {
@@ -778,6 +779,7 @@ footer {
 @media only screen and (min-width: 560px) {
 	.site-footer > *,
 	.site-main > article > *,
+	.site-main > .not-found > *,
 	.entry-content > *,
 	[class*="inner-container"] > *,
 	.widget-area > * {
@@ -788,6 +790,7 @@ footer {
 
 .site-footer > *:first-child,
 .site-main > article > *:first-child,
+.site-main > .not-found > *:first-child,
 .entry-content > *:first-child,
 [class*="inner-container"] > *:first-child,
 .widget-area > *:first-child {
@@ -796,6 +799,7 @@ footer {
 
 .site-footer > *:last-child,
 .site-main > article > *:last-child,
+.site-main > .not-found > *:last-child,
 .entry-content > *:last-child,
 [class*="inner-container"] > *:last-child,
 .widget-area > *:last-child {
@@ -809,6 +813,7 @@ footer {
 .site-header > *,
 .entry-header > *,
 .post-thumbnail > *,
+.page-content > *,
 .comment-content > *,
 .author-bio > * {
 	margin-top: 16px;
@@ -818,6 +823,7 @@ footer {
 .site-header > *:first-child,
 .entry-header > *:first-child,
 .post-thumbnail > *:first-child,
+.page-content > *:first-child,
 .comment-content > *:first-child,
 .author-bio > *:first-child {
 	margin-top: 0;
@@ -826,6 +832,7 @@ footer {
 .site-header > *:last-child,
 .entry-header > *:last-child,
 .post-thumbnail > *:last-child,
+.page-content > *:last-child,
 .comment-content > *:last-child,
 .author-bio > *:last-child {
 	margin-bottom: 0;

+ 1 - 1
varia/template-parts/content/content-none.php

@@ -16,7 +16,7 @@
 		<h1 class="page-title"><?php _e( 'Nothing Found', 'varia' ); ?></h1>
 	</header><!-- .page-header -->
 
-	<div class="page-content">
+	<div class="page-content responsive-max-width">
 		<?php
 		if ( is_home() && current_user_can( 'publish_posts' ) ) :