diff -r 228471fbc9fa -r b3d23c1b791e web/client.php --- a/web/client.php Fri Sep 14 15:44:27 2018 +0200 +++ b/web/client.php Wed Sep 19 18:09:27 2018 +0200 @@ -11,6 +11,7 @@ include_once 'common.php'; + /** * Do we already have a valid Access Token or need to go get one? */ @@ -52,7 +53,15 @@ $_SESSION['TWITTER_REDIRECT_URL'] = isset($_REQUEST['auth_redirect']) ? $_REQUEST['auth_redirect'] : $_SERVER['HTTP_REFERER']; }; -$annotations = get_default_annotations_config($config, $translate); +$defaultAnnotations = get_default_annotations_config($config, $translate); +$annotations = array(); +foreach ($defaultAnnotations as $annot_cat => $annot_def) { + if($annot_cat !== 'default' && !isset($annot_def['colors_class'])) { + $annot_def['colors_class'] = 'tweetButton_'.md5($annot_cat); + } + $annotations[$annot_cat] = $annot_def; +} + ?> px; height: px; } + $annot_def) { + if($annot_cat === 'default') { + continue; + } + $hVal = intval(($annot_def['colors']['h']<1.0)?floatval($annot_def['colors']['h']) * 360.0:$annot_def['colors']['h']); + $sVal = intval(floatval($annot_def['colors']['s']) * 100.0); + + $baseColor = "hsl($hVal, ${sVal}%, 90%)"; + $borderColor = "hsl($hVal, ${sVal}%, 60%)"; + $selectedColor = "hsl($hVal, 15%, 70%)"; + $selectedBorderColor = "hsl($hVal, 15%, 60%)"; + $gradientColor = "hsl($hVal, ${sVal}%, 50%)"; + ?> + .tweetButton. { + background: ; + border: solid 1px; + background-image: -webkit-linear-gradient(top, , ); + background-image: -moz-linear-gradient(top, , ); + background-image: -ms-linear-gradient(top, , ); + background-image: -o-linear-gradient(top, , ); + background-image: linear-gradient(to bottom, , ); + } + .tweetButton..selected,.tweetButton:active.:active,.tweetButton:hover.:hover.selected { + background: ; + border: solid 1px; + } + .tweetButton.:hover { + background-image: -webkit-linear-gradient(top, , ); + background-image: -moz-linear-gradient(top, , ); + background-image: -ms-linear-gradient(top, , ); + background-image: -o-linear-gradient(top, , ); + background-image: linear-gradient(to bottom, , ); + } +