404 page working, fixed some purgecss issues

This commit is contained in:
Adam Piontek 2021-07-10 19:30:03 -04:00
parent f2f300a50e
commit e6b5433d0f
8 changed files with 48 additions and 12 deletions

21
404.php
View file

@ -1,4 +1,5 @@
<?php <?php
/** /**
* The template for displaying 404 pages (not found). * The template for displaying 404 pages (not found).
* *
@ -9,13 +10,19 @@
get_header(); ?> get_header(); ?>
<main class="content-wrap"> <main class="container-fluid d-flex flex-column justify-content-center align-items-center text-light mt-4">
<section class="container mx-auto relative z-10">
<h1>Oops! That page can't be found.</h1> <img src="<?php echo get_stylesheet_directory_uri() . '/dist/images/40x_unicorn-300.png'; ?>" class="img-fluid mb-3" alt="UNICORN">
<p>It looks like nothing was found at this location. Maybe try one of the links below or a search?</p>
<?php <h2 class="fs-2 mb-0">Oh no! Problem!</h2>
get_search_form(); ?> <p class="lead mb-0">What you seek cannot be found.</p>
</section> <p class="mb-0" style="font-size: 14px;">(deep, huh?)</p>
<p class="lead mb-0">Maybe try one of the links above or below, or a search?</p>
<p class="mt-3" style="font-size: 10px;">
(Unicorn image <a href="https://creativecommons.org/licenses/by-nc/4.0/" rel="noreferrer" target="_blank">Creative Commons 4.0 BY-NC</a>
via <a href="http://pngimg.com/download/24891" rel="noreferrer" target="_blank">pngimg.com</a>)
</p>
</main> </main>
<?php <?php

View file

@ -43,10 +43,10 @@
- [X] ~~*sidebar.php ??*~~ [2021-07-10] - [X] ~~*sidebar.php ??*~~ [2021-07-10]
- [X] ~~*search field up top somewhere?*~~ [2021-07-10] - [X] ~~*search field up top somewhere?*~~ [2021-07-10]
- [X] ~~*search.php ??*~~ [2021-07-10] - [X] ~~*search.php ??*~~ [2021-07-10]
- [ ] 404.php - [X] ~~*404.php*~~ [2021-07-10]
- [ ] NGINX SNIPPETS - bring in for testing! - [X] ~~*NGINX SNIPPETS - bring in for testing!*~~ [2021-07-10]
- [ ] nginx 404 handling? - [X] ~~*nginx 404 handling?*~~ [2021-07-10]
- [ ] nginx 50x handling! - nginx purposefully generate 505 errors somehow? - [X] ~~*nginx 50x handling! - nginx purposefully generate 505 errors somehow?*~~ [2021-07-10]
- [ ] double-check npm run build output to ensure it's all working - [ ] double-check npm run build output to ensure it's all working
- [ ] disable WP/SCRIPT DEBUG - [ ] disable WP/SCRIPT DEBUG
- [ ] ... - [ ] ...

View file

@ -255,6 +255,9 @@ blockquote {
@extend .py-3; @extend .py-3;
max-width: 25rem; max-width: 25rem;
} }
ul {
padding-inline-start: 2rem;
}
.wp-block-loginout { .wp-block-loginout {
display: list-item; display: list-item;
margin-left: 2rem; margin-left: 2rem;
@ -272,6 +275,10 @@ blockquote {
.search-form .form-control:focus { .search-form .form-control:focus {
border-color: $input-focus-border-color; border-color: $input-focus-border-color;
} }
.form-control::-ms-clear,
input.form-control::-ms-clear,
.form-control::-ms-reveal,
input.form-control::-ms-reveal { display: none; }
.form-control::-webkit-input-placeholder { /* WebKit, Blink, Edge */ .form-control::-webkit-input-placeholder { /* WebKit, Blink, Edge */
color: $gray-500 !important; color: $gray-500 !important;
} }
@ -292,6 +299,10 @@ blockquote {
.form-control::placeholder { /* Most modern browsers support this now. */ .form-control::placeholder { /* Most modern browsers support this now. */
color: $gray-500 !important; color: $gray-500 !important;
} }
.search-form .btn-outline-light {
color: $gray-300;
border-color: $gray-500;
}
.search-form .btn-outline-light:hover { .search-form .btn-outline-light:hover {
color: $primary; color: $primary;
background-color: inherit; background-color: inherit;

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

View file

@ -14,6 +14,8 @@ import "../../node_modules/@mdi/svg/svg/typewriter.svg";
import "../../node_modules/@mdi/svg/svg/calendar-clock.svg"; import "../../node_modules/@mdi/svg/svg/calendar-clock.svg";
import "../../node_modules/@mdi/svg/svg/tag-multiple.svg"; import "../../node_modules/@mdi/svg/svg/tag-multiple.svg";
import "../../node_modules/@mdi/svg/svg/rss.svg"; import "../../node_modules/@mdi/svg/svg/rss.svg";
import "../../node_modules/@mdi/svg/svg/account-hard-hat.svg";
import "../../node_modules/@mdi/svg/svg/open-in-new.svg";
import "../../node_modules/@mdi/svg/svg/magnify.svg"; import "../../node_modules/@mdi/svg/svg/magnify.svg";
// social // social
import "../../node_modules/@mdi/svg/svg/linkedin.svg"; import "../../node_modules/@mdi/svg/svg/linkedin.svg";

View file

@ -44,11 +44,22 @@ namespace WP_73k;
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>"> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?> <?php wp_head(); ?>
<?php if (is_404()) : ?>
<style>
body {
background: url(<?php echo get_stylesheet_directory_uri() . '/dist/images/40x_rainbow.jpg'; ?>);
background-repeat: no-repeat;
background-size: cover;
background-attachment: fixed;
background-position: center;
}
</style>
<?php endif; ?>
</head> </head>
<body <?php body_class(); ?> itemscope itemtype="https://schema.org/WebPage"> <body <?php body_class(); ?> itemscope itemtype="https://schema.org/WebPage">
<nav class="navbar <?php echo ($args['fixednav'] ? 'fixed-top' : ''); ?> navbar-expand-lg navbar-dark bg-dark px-1 px-sm-2 px-lg-3 px-xl-4 px-xxl-5 py-3"> <nav class="navbar <?php echo ($args['fixednav'] ? 'fixed-top' : ''); ?> navbar-expand-lg navbar-dark px-1 px-sm-2 px-lg-3 px-xl-4 px-xxl-5 py-3">
<div class="container-fluid"> <div class="container-fluid">
<h1 class="my-0 py-0 lh-base"> <h1 class="my-0 py-0 lh-base">

View file

@ -182,6 +182,11 @@ function getCSSWhitelistPatterns() {
/^children(-.*)?$/, /^children(-.*)?$/,
/^hljs(-.*)?$/, /^hljs(-.*)?$/,
/^tek(-.*)?$/, /^tek(-.*)?$/,
/^html$/,
/^body$/,
/^blockquote$/,
/^ul$/,
/^h.$/,
]; ];
} }