diff --git a/archives.php b/archives.php new file mode 100644 index 0000000..151c392 --- /dev/null +++ b/archives.php @@ -0,0 +1,101 @@ + + + + +
+ +

+ + + +

Browse by date:

+ + + +

Browse by subject:

+ + + +

If all else fails, try searching for it...

+ + + +
+ + + +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 .= "
\n" . $month->Year . ": "; + } + else + { + $output .= "\n" . $month->Year . ": "; + } + } + + // Add in the monthly archive links + if ($year == $month->Year) + $output .= $month_separator; + + $output .= '' . date($month_format, mktime(0, 0, 0, $month->Month, 1, $month->Year)) . ''; + + $year = $month->Year; + } + } + else + { + $output = "

None available

\n"; + } + + print $output; +} + +?> \ No newline at end of file diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..86e0731 --- /dev/null +++ b/readme.md @@ -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/) + + diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..01a76ae Binary files /dev/null and b/screenshot.png differ