Compare commits

...

3 Commits

Author SHA1 Message Date
Jacob Haddon
08b870734e added files, archives, readme and screenshot.
Readme updated with attribution to the pluging and twenty sixteen theme
2023-08-30 15:55:37 -04:00
Jacob Haddon
912499696c updating previously uncommitted changes.
moved block-pre-formatted from serif to mono in css

renamed back to Haddon 2016
2023-08-30 15:14:22 -04:00
Jacob Haddon
004798ef39 renmaed css files for clarity 2020-12-21 19:18:55 -05:00
7 changed files with 479 additions and 22 deletions

101
archives.php Normal file
View File

@ -0,0 +1,101 @@
<?php
/* Template Name: Archvies
/* Template to display archives. */
get_header(); ?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div class="post">
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php the_content(); ?>
<h2>Browse by date:</h2>
<?php arl_kottke_archives(); ?>
<h2>Browse by subject:</h2>
<ul class="taxonomy"><?php wp_list_categories('title_li=');?></ul>
<h2>If all else fails, try searching for it...</h2>
<?php get_search_form(); ?>
</div><!--.post-->
<?php endwhile; // end of the loop. ?>
<?php get_footer();
function arl_kottke_archives($month_separator = ' ', $month_format = 'M')
{
/*
This function was originally a plugin, GPL2, information below:
Plugin Name: Kottke Style Archive
Version: 0.3
Plugin URI: http://www.lattimore.id.au/projects/wordpress/plugins/kottke-style-archives/
Author: Alistair Lattimore
Author URI: http://www.lattimore.id.au
Description: Displays an archive of posts in the same style to http://www.kottke.org/everfresh.
*/
global $wpdb;
$output = "";
$year = "";
$sql = "SELECT DATE_FORMAT(post_date, '%Y') AS Year, ";
$sql .= "DATE_FORMAT(post_date, '%m') AS Month ";
$sql .= "FROM $wpdb->posts ";
$sql .= "WHERE DATE_FORMAT(post_date, '%Y') <> '0000'";
$sql .= " AND post_status = 'publish'";
$sql .= " AND post_type = 'post' ";
$sql .= "GROUP BY DATE_FORMAT(post_date, '%Y'), DATE_FORMAT(post_date, '%m') ";
$sql .= "ORDER BY DATE_FORMAT(post_date, '%Y') DESC, DATE_FORMAT(post_date, '%m') ASC;";
$months = $wpdb->get_results($sql);
if (!empty($months))
{
foreach ($months as $month)
{
// Add in the year heading
if (($year == "") || ($year != $month->Year))
{
if (strlen($output))
{
$output .= "<br />\n<strong>" . $month->Year . ":</strong>&nbsp;";
}
else
{
$output .= "\n<strong>" . $month->Year . ":</strong>&nbsp;";
}
}
// Add in the monthly archive links
if ($year == $month->Year)
$output .= $month_separator;
$output .= '<a href="' . get_month_link($month->Year, $month->Month) . '">' . date($month_format, mktime(0, 0, 0, $month->Month, 1, $month->Year)) . '</a>';
$year = $month->Year;
}
}
else
{
$output = "<p>None available</p>\n";
}
print $output;
}
?>

View File

@ -1,6 +1,6 @@
<?php
# function file for Haddon 2016 child theme
# function file for Twenty Sixteen child theme
# Enqueue the css
@ -63,9 +63,9 @@ function child_theme_customizer_settings( $wp_customize ) {
'type' => 'radio',
'section' => 'dark_mode',
'choices' => array(
'blue' => 'Alpenglow',
'dark' => 'Classic Dark',
'var' => 'Variable Test',
'dark' => 'Classic Dark',
'alpenglow' => 'Alpenglow',
'blue' => 'Blue',
)
) );

45
readme.md Normal file
View File

@ -0,0 +1,45 @@
# DarkChild 2016
## Wordpress Child Theme
This child theme is for Twenty Sixteen and has two things:
1. A dark mode, with different theme options
2. Collected styles for ease of changing typography
# Dark mode
Dark mode is set with `@media screen and (prefers-color-scheme: dark)` and is configurable via Dark Mode under the Customize menu
There are three themes:
1. Classic Dark - Black and grays with white text
2. Alpenglow - Dark purples with white text, based on the [Firefox theme](https://addons.mozilla.org/en-US/firefox/addon/firefox-alpenglow/)
3. Blue - Dark blue/gray colors, white text
# Font Substitutions
The CSS for font choices has been collected in the child theme style.css making changing the fonts for the different styles simpler.
The theme currently uses the following:
1. Seriff (body text): Merriweather, Georgia, serif;
2. San-Seriff (headings): Raleway, "Helvetica Neue", sans-serif;
3. Mono (code): 'IBM Plex Mono', monospace;
# Archives.php
The Archives page features code originally from a plugin, GPL2, information below:
Plugin Name: Kottke Style Archive
Version: 0.3
Plugin URI: http://www.lattimore.id.au/projects/wordpress/plugins/kottke-style-archives/
Author: Alistair Lattimore
Author URI: http://www.lattimore.id.au
Description: Displays an archive of posts in the same style to http://www.kottke.org/everfresh.
# Twenty-Sixteen
A GPL wordpress theme by [Wordpress.org](https://wordpress.org/themes/twentysixteen/)

BIN
screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 887 KiB

301
style-alpenglow.css Normal file
View File

@ -0,0 +1,301 @@
/* Dark Mode Theme */
@media screen and (prefers-color-scheme: dark)
{
/* Text Colors */
/*
Primary Colors:
1 #e1e1e1 Primary Text Color
2 #21133C Darkest Main Body Area Color
3 #271C4D Dark
4 #381D71 Med Dark
Accent Colors:
1 #FC4CA0
2 #52FFBD
Binary:
Either white (#FFF) or black (#000)
Accent color 1 and 2 are used as inverse of each other thoughout the theme
*/
/* Primary Color 1 : Text Color */
body,
button,
input,
select,
textarea,
blockquote cite,
.wp-block-quote cite,
blockquote small,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
input[type="week"]:focus,
input[type="month"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus,
.main-navigation a,
.dropdown-toggle,
.social-navigation a,
.post-navigation a,
.widget-title a,
.site-branding .site-title a,
.menu-toggle,
.entry-title a,
.page-links > .page-links-title,
.pagination a:hover,
.pagination a:focus,
.comment-reply-title small a:hover,
.comment-reply-title small a:focus,
.wp-block-code { color: #e1e1e1; }
/* Accent Color 1 */
blockquote,
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="week"],
input[type="month"],
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea,
.post-password-form label,
a:hover,
a:focus,
a:active,
.post-navigation .meta-nav,
.image-navigation,
.comment-navigation,
.widget_recent_entries .post-date,
.widget_rss .rss-date,
.widget_rss cite,
.site-description,
.author-bio,
.entry-footer,
.entry-footer a,
.sticky-post,
.taxonomy-description,
.entry-caption,
.comment-author,
.comment-metadata,
.pingback .edit-link,
.comment-metadata a,
.pingback .comment-edit-link,
.comment-form label,
.comment-notes,
.comment-awaiting-moderation,
.logged-in-as,
.form-allowed-tags,
.site-info,
.site-info a,
.wp-caption .wp-caption-text,
.gallery-caption,
.widecolumn label,
.widecolumn .mu_register label,
a.page-numbers:hover { color: #FC4CA0; }
/* Accent Color 2 */
a,
.main-navigation a:hover,
.main-navigation a:focus,
.dropdown-toggle:hover,
.dropdown-toggle:focus,
.social-navigation a:hover:before,
.social-navigation a:focus:before,
.post-navigation a:hover .post-title,
.post-navigation a:focus .post-title,
.tagcloud a:hover,
.tagcloud a:focus,
.site-branding .site-title a:hover,
.site-branding .site-title a:focus,
.menu-toggle:hover,
.menu-toggle:focus,
.entry-title a:hover,
.entry-title a:focus,
.entry-footer a:hover,
.entry-footer a:focus,
.comment-metadata a:hover,
.comment-metadata a:focus,
.pingback .comment-edit-link:hover,
.pingback .comment-edit-link:focus,
.comment-reply-link,
.required,
.site-info a:hover,
.site-info a:focus,
.main-navigation li:hover > a,
.main-navigation li.focus > a { color: #52FFBD; }
/* Binary, White or Black: color: #fff; */
mark,
ins,
button,
button[disabled]:hover,
button[disabled]:focus,
input[type="button"],
input[type="button"][disabled]:hover,
input[type="button"][disabled]:focus,
input[type="reset"],
input[type="reset"][disabled]:hover,
input[type="reset"][disabled]:focus,
input[type="submit"],
input[type="submit"][disabled]:hover,
input[type="submit"][disabled]:focus,
.pagination .nav-links:before,
.pagination .nav-links:after,
.pagination .prev,
.pagination .next,
.pagination .prev:hover,
.pagination .prev:focus,
.pagination .next:hover,
.pagination .next:focus,
.widget_calendar tbody a,
.widget_calendar tbody a:hover,
.widget_calendar tbody a:focus,
.menu-toggle.toggled-on,
.menu-toggle.toggled-on:hover,
.menu-toggle.toggled-on:focus,
.page-links a,
.page-links a:hover,
.page-links a:focus
{
/* color: #000; */
color: #fff;
}
/* Back Ground Colors */
/* Primary Color 2: Darkest */
.main-navigation ul ul li,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
input[type="week"]:focus,
input[type="month"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus,
.site { background-color: #21133C; }
/* Primary Color 3 Dark */
body,
button,
button[disabled]:hover,
button[disabled]:focus,
input[type="button"],
input[type="button"][disabled]:hover,
input[type="button"][disabled]:focus,
input[type="reset"],
input[type="reset"][disabled]:hover,
input[type="reset"][disabled]:focus,
input[type="submit"],
input[type="submit"][disabled]:hover,
input[type="submit"][disabled]:focus,
.pagination:before,
.pagination:after,
.pagination .prev,
.pagination .next,
.menu-toggle.toggled-on,
.menu-toggle.toggled-on:hover,
.menu-toggle.toggled-on:focus,
.page-links a { background: #271C4D; }
/* Primary color 4 Medium Dark */
code,
hr { background: #381D71; }
/* Primary Color 4: Inactive */
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="week"],
input[type="month"],
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea { background: #271C4D; }
/* Accent Color 1; */
.widget_calendar tbody a:hover,
.widget_calendar tbody a:focus { background-color: #FC4CA0; }
/* Accent Color 2 */
mark,
ins,
.pagination .prev:hover,
.pagination .prev:focus,
.pagination .next:hover,
.pagination .next:focus,
button:hover,
button:focus,
input[type="button"]:hover,
input[type="button"]:focus,
input[type="reset"]:hover,
input[type="reset"]:focus,
input[type="submit"]:hover,
input[type="submit"]:focus,
.widget_calendar tbody a,
.page-links a:hover,
.page-links a:focus { background: #52FFBD; }
/* Border Colors */
/* Primary color 3 Dark */
.post-navigation,
.post-navigation div + div,
.widget,
.comments-title,
.comment-reply-title { border-color: #271C4D; }
/* Primary Color 4 */
/* This is separate because of the 'transparent' */
.main-navigation ul ul:before,
.main-navigation ul ul:after { border-color: #381D71 transparent; }
/* Primary Color 4 */
.main-navigation ul ul li,
.main-navigation ul ul { border-color: #381D71; }
/* Accent Color 1 */
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
input[type="week"]:focus,
input[type="month"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus,
.tagcloud a:hover,
.tagcloud a:focus { border-color: #FC4CA0; }
/* background-color: transparent; */
.menu-toggle,
.menu-toggle:hover,
.menu-toggle:focus { background-color: transparent; }
body:not(.search-results) .entry-summary blockquote { border-color: currentColor; }
}

View File

@ -1,5 +1,15 @@
/* Dark Mode Theme */
:root {
--primary1: #e1e1e1;
--primary2: #1b264d;
--primary3: #263b61;
--primary4: #13576e;
--accent1: #8b9fad;
--accent2: #FE6813;
--binary: #fff;
}
@media screen and (prefers-color-scheme: dark)
{
/* Text Colors */
@ -56,7 +66,7 @@
.pagination a:focus,
.comment-reply-title small a:hover,
.comment-reply-title small a:focus,
.wp-block-code { color: #e1e1e1; }
.wp-block-code { color: var(--primary1); }
/* Accent Color 1 */
blockquote,
@ -106,7 +116,7 @@
.gallery-caption,
.widecolumn label,
.widecolumn .mu_register label,
a.page-numbers:hover { color: #FC4CA0; }
a.page-numbers:hover { color: var(--accent1); }
/* Accent Color 2 */
a,
@ -137,7 +147,7 @@
.site-info a:hover,
.site-info a:focus,
.main-navigation li:hover > a,
.main-navigation li.focus > a { color: #52FFBD; }
.main-navigation li.focus > a { color: var(--accent2); }
/* Binary, White or Black: color: #fff; */
mark,
@ -173,7 +183,7 @@
.page-links a:focus
{
/* color: #000; */
color: #fff;
color: var(--binary);
}
/* Back Ground Colors */
@ -192,7 +202,7 @@
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus,
.site { background-color: #21133C; }
.site { background-color: var(--primary2); }
/* Primary Color 3 Dark */
body,
@ -215,11 +225,11 @@
.menu-toggle.toggled-on,
.menu-toggle.toggled-on:hover,
.menu-toggle.toggled-on:focus,
.page-links a { background: #271C4D; }
.page-links a { background: var(--primary3);}
/* Primary color 4 Medium Dark */
code,
hr { background: #381D71; }
hr { background: var(--primary4); }
/* Primary Color 4: Inactive */
input[type="date"],
@ -234,11 +244,11 @@
input[type="search"],
input[type="tel"],
input[type="number"],
textarea { background: #271C4D; }
textarea { background: var(--primary3); }
/* Accent Color 1; */
.widget_calendar tbody a:hover,
.widget_calendar tbody a:focus { background-color: #FC4CA0; }
.widget_calendar tbody a:focus { background-color: var(--accent1); }
/* Accent Color 2 */
mark,
@ -257,7 +267,7 @@
input[type="submit"]:focus,
.widget_calendar tbody a,
.page-links a:hover,
.page-links a:focus { background: #52FFBD; }
.page-links a:focus { background: var(--accent2); }
/* Border Colors */
/* Primary color 3 Dark */
@ -265,16 +275,16 @@
.post-navigation div + div,
.widget,
.comments-title,
.comment-reply-title { border-color: #271C4D; }
.comment-reply-title { border-color: var(--primary3); }
/* Primary Color 4 */
/* This is separate because of the 'transparent' */
.main-navigation ul ul:before,
.main-navigation ul ul:after { border-color: #381D71 transparent; }
.main-navigation ul ul:after { border-color: var(--primary4) transparent; }
/* Primary Color 4 */
.main-navigation ul ul li,
.main-navigation ul ul { border-color: #381D71; }
.main-navigation ul ul { border-color: var(--primary4); }
/* Accent Color 1 */
input[type="date"]:focus,
@ -291,7 +301,7 @@
input[type="number"]:focus,
textarea:focus,
.tagcloud a:hover,
.tagcloud a:focus { border-color: #FC4CA0; }
.tagcloud a:focus { border-color: var(--accent1); }
/* background-color: transparent; */
.menu-toggle,

View File

@ -5,7 +5,7 @@
Author: Jacob Haddon
Author URI: http://jacobhaddon.com
Template: twentysixteen
Version: 1.2.0
Version: 1.3.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: Twenty Sixteen, Dark Mode
@ -24,8 +24,7 @@ button,
input,
select,
textarea,
.wp-block-verse,
.wp-block-preformatted { font-family: Merriweather, Georgia, serif; }
.wp-block-verse { font-family: Merriweather, Georgia, serif; }
/* Sans-Serif */
blockquote,
@ -52,7 +51,8 @@ blockquote,
/* Monospace */
pre,
code,
.wp-block-code
.wp-block-code,
.wp-block-preformatted
{
font-family: 'IBM Plex Mono', monospace;
background-color: transparent;