]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/style.php
Merge pull request #11200 from annando/issue-11034
[friendica.git] / view / theme / frio / style.php
index dadd04580554cb43d6a9f7f4d4bea71f3a186b49..b39cef10294d96c910d51685b1ac9204794e5d90 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
  */
 
 use Friendica\DI;
+use Friendica\Network\HTTPException\NotModifiedException;
 use Friendica\Util\Strings;
 
+require_once 'view/theme/frio/theme.php';
 require_once 'view/theme/frio/php/PHPColors/Color.php';
 
 $scheme = '';
@@ -33,6 +35,7 @@ DI::config()->load('frio');
 
 // Default to hard-coded values for empty settings
 $scheme           = DI::config()->get('frio', 'scheme', DI::config()->get('frio', 'schema'));
+$scheme_accent    = DI::config()->get('frio', 'scheme_accent')    ?: FRIO_SCHEME_ACCENT_BLUE;
 $nav_bg           = DI::config()->get('frio', 'nav_bg')           ?: '#708fa0';
 $nav_icon_color   = DI::config()->get('frio', 'nav_icon_color')   ?: '#ffffff';
 $link_color       = DI::config()->get('frio', 'link_color')       ?: '#6fdbe8';
@@ -56,6 +59,7 @@ if ($uid) {
 
        // Only override display settings that have actually been set
        $scheme           = DI::pConfig()->get($uid, 'frio', 'scheme', DI::pConfig()->get($uid, 'frio', 'schema')) ?: $scheme;
+       $scheme_accent    = DI::pConfig()->get($uid, 'frio', 'scheme_accent')    ?: $scheme_accent;
        $nav_bg           = DI::pConfig()->get($uid, 'frio', 'nav_bg')           ?: $nav_bg;
        $nav_icon_color   = DI::pConfig()->get($uid, 'frio', 'nav_icon_color')   ?: $nav_icon_color;
        $link_color       = DI::pConfig()->get($uid, 'frio', 'link_color')       ?: $link_color;
@@ -185,8 +189,8 @@ $options = [
        '$background_repeat'           => $background_repeat,
        '$login_bg_image'              => $login_bg_image,
        '$login_bg_color'              => $login_bg_color,
-       '$font_color_darker'           => $font_color_darker ?? '#555',
-       '$font_color'                  => $font_color ?? '#777',
+       '$font_color_darker'           => $font_color_darker ?? '#222',
+       '$font_color'                  => $font_color ?? '#444',
 ];
 
 $css_tpl = file_get_contents('view/theme/frio/css/style.css');
@@ -222,8 +226,7 @@ if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && isset($_SERVER['HTTP_IF_NONE_MA
                                stripslashes($_SERVER['HTTP_IF_NONE_MATCH']));
 
        if (($cached_modified == $modified) && ($cached_etag == $etag)) {
-               header('HTTP/1.1 304 Not Modified');
-               exit();
+               throw new NotModifiedException();
        }
 }