From ff51b6613c9e704dc7aebeb886249a04622a156e Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Fri, 30 Aug 2019 18:23:17 +0100 Subject: [PATCH] Mark user avatar on top nav bar as hidden against screen readers --- Changelog.md | 1 + core/40-page-renderer.php | 2 +- module_index.json | 4 ++-- themes/default/theme.css | 27 +++++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/Changelog.md b/Changelog.md index 673e0ca..0b0eabc 100644 --- a/Changelog.md +++ b/Changelog.md @@ -13,6 +13,7 @@ This file holds the changelog for Pepperminty Wiki. This is the master list of t - Fill out the statistics help text - Added table of contents to help page - Squashed the large blank space that sometimes appears at the bottom of the page editor page + - Marked the user avatar on the top navigation bar as hidden for screen readers ### Changed - Made `build.sh` build script more robust, especially when generating the documentation. diff --git a/core/40-page-renderer.php b/core/40-page-renderer.php index 969cc1c..f48d97a 100644 --- a/core/40-page-renderer.php +++ b/core/40-page-renderer.php @@ -502,7 +502,7 @@ class page_renderer $result = ""; $result .= ""; if($settings->avatars_show) - $result .= " "; + $result .= " "; if(in_array($name, $settings->admins)) $result .= $settings->admindisplaychar; $result .= htmlentities($name); diff --git a/module_index.json b/module_index.json index f85a4a9..bc8a487 100755 --- a/module_index.json +++ b/module_index.json @@ -337,10 +337,10 @@ "version": "0.10", "author": "Emanuil Rusev & Starbeamrainbowlabs", "description": "An upgraded (now default!) parser based on Emanuil Rusev's Parsedown Extra PHP library (https:\/\/github.com\/erusev\/parsedown-extra), which is licensed MIT. Please be careful, as this module adds some weight to your installation.", - "lastupdate": 1567107944, + "lastupdate": 1567168168, "optional": false, "extra_data": { - "Parsedown.php": "https:\/\/raw.githubusercontent.com\/erusev\/parsedown\/819c68899d593503180ed79ef4be5a4dcd8c5f92\/Parsedown.php", + "Parsedown.php": "https:\/\/raw.githubusercontent.com\/erusev\/parsedown\/fe7a50eceb4a3c867cc9fa9c0aa906b1067d1955\/Parsedown.php", "ParsedownExtra.php": "https:\/\/raw.githubusercontent.com\/erusev\/parsedown-extra\/f21b40a1973b6674903a6da9857ee215e8839f96\/ParsedownExtra.php", "ParsedownExtreme.php": "https:\/\/raw.githubusercontent.com\/BenjaminHoegh\/parsedown-extreme\/adae4136534ad1e4159fe04c74c4683681855b84\/ParsedownExtreme.php" } diff --git a/themes/default/theme.css b/themes/default/theme.css index c2d6904..d767562 100644 --- a/themes/default/theme.css +++ b/themes/default/theme.css @@ -50,6 +50,33 @@ /* #ffdb6d #36962c hsl(36, 78%, 80%) hsla(262, 92%, 68%, 0.42) */ } +@media (prefers-color-scheme: dark) { + :root { + --bg-back: hsl(270, 29%, 28%); + --bg-page: hsl(273, 15%, 16%); + + --text-dark: hsl(277, 38%, 89%); + /* --text-light: hsl(0, 0%, 6%); */ + + --text-soft: hsla(0, 0%, 92%, 0.4); + --text-ultrasoft: hsla(0, 0%, 95%, 0.4); + + --shadow: rgba(20, 20, 20, 0.5); + + --accent-a1: #9e7eb4; + --accent-a2: #442772; + --accent-a3: hsl(274, 40%, 41%); + + --accent-c1: hsl(5, 100%, 76%); + --accent-c2: hsl(4, 95%, 68%); /*#8b1a1a*/ + --accent-d1: hsl(160, 73%, 46%); + + --tag: hsl(273, 46%, 27%); + } + a { color: hsl(208, 67%, 67%); } + a:visited { color: hsl(264, 77%, 65%); } +} + /* TODO: Refactor to use the CSS grid */ body { margin: 2rem 0 0 0; background: var(--bg-back); line-height: 1.45em; color: var(--text-dark); font-family: sans-serif; }