added files, archives, readme and screenshot.

Readme updated with attribution to the pluging and twenty sixteen theme
This commit is contained in:
Jacob Haddon 2023-08-30 15:55:37 -04:00
parent 912499696c
commit 08b870734e
3 changed files with 146 additions and 0 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;
}
?>

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