From d1b07b96aab6cf1c4c11ed4b9968993062f23da6 Mon Sep 17 00:00:00 2001 From: spaghetti Date: Sat, 10 Jun 2017 22:09:37 -0400 Subject: [PATCH] Support theme-color meta tag This allows for some browsers like chrome mobile to change the color of the address bar to smoothly match the theme of the page --- design/privateheader.php | 14 +++++++++++--- design/publicheader.php | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/design/privateheader.php b/design/privateheader.php index a629a49..9dcad5b 100755 --- a/design/privateheader.php +++ b/design/privateheader.php @@ -59,9 +59,17 @@ if (isset(G::$LoggedUser['Notify'])) { - + if (($StyleColors = G::$Cache->get_value('stylesheet_colors')) === false) { + G::$DB->query('SELECT LOWER(REPLACE(Name, " ", "_")) AS Name, Color FROM stylesheets WHERE COLOR IS NOT NULL'); + while (list($StyleName, $StyleColor) = G::$DB->next_record()) { + $StyleColors[$StyleName] = $StyleColor; + } + G::$Cache->cache_value('stylesheet_colors', $StyleColors, 0); + } + if (isset($StyleColors[G::$LoggedUser['StyleName']])) { ?> + + + <?=display_str($PageTitle)?> +