Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dark mode #6 #7

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,29 @@ Nothing WordPress Theme

> Fastest way to hide a WordPress site's content.

* Requires: [WordPress 1.5](https://wordpress.org/support/wordpress-version/version-1-5/)
* Tested up to: [WordPress 6.3](https://wordpress.org/documentation/wordpress-version/version-6-3/)
* Stable version: [2.2.0](https://github.com/mitchelldmiller/nothing/releases/latest)

## About
Access WP dashboard, while hiding content. Does not affect site's content.
Access WordPress dashboard, while hiding content. Does not affect site's content.

Displays "Under Construction" on responsive page for non-admin page requests.

Displays dark page if "dark mode" is active.

### Usage
- Use [WP-CLI](https://wp-cli.org/) to install / activate theme, hide content quickly:

``wp theme install https://github.com/mitchelldmiller/nothing/archive/refs/tags/v2.1.3.zip --activate``
- (Optional) Install theme from release.
- (Optional) Edit nothing.html to change content.
- (Optional) Edit nothing.html. Change body class to change colors.
- (Optional) Delete or rename sitemap.

### Credit
#### Credit
* CSS inspired by [Solved by Flexbox](https://philipwalton.github.io/solved-by-flexbox/demos/vertical-centering/).

#### License
Nothing WordPress Theme, Copyright 2019-2023 Mitchell D. Miller.
Copyright 2019-2023 Mitchell D. Miller.

Distributed under GNU GPL version 3.
1 change: 0 additions & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* One function to display nothing.
*
* @package Nothing
* @version 2.1.3
*/

function show_nothing() {
Expand Down
29 changes: 21 additions & 8 deletions nothing.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,40 @@
<title>Under Construction</title>
<style>
body {
height: 100%;
width: 100%;
background-color: #f8f9fa;
height: 100%;
width: 100%;
}
.light {
background-color: #f8f9fa;
color: #212529;
}
.dark {
background-color: #333333;
color: #337ab7;
}
.container {
align-items: center;
display: flex;
font-size: 16px;
justify-content: center;
min-height: 24em;
}
.inner-container {
color: #212529;
flex: 1;
font: normal 32px helvetica,sans-serif;
text-align: center;
}
</style>
</head>
<body>
<div class="container">
<div class="inner-container">Under Construction</div>
</div>
<div class="container">
<div class="inner-container">Under Construction</div>
</div>
<script>
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.body.classList.add('dark');
} else {
document.body.classList.add('light');
}
</script>
</body>
</html>
6 changes: 3 additions & 3 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Theme Name: Nothing
Theme URI: https://github.com/mitchelldmiller/nothing
Author: Mitchell D. Miller
Author URI: https://mitchelldmiller.com/
Description: Under Construction. No menu. No content.
Version: 2.1.3
Tested up to: 6.2.2
Description: Under Construction. No menu. No content. Detects dark mode.
Version: 2.2.0
Tested up to: 6.3.2
Requires PHP: 5.2.4
License: GNU General Public License 3
License URI: http://www.gnu.org/licenses/gpl.txt
Expand Down