From a53f69ae4f5616967e1716462109031cd0af8f38 Mon Sep 17 00:00:00 2001 From: EmilKidi Date: Sun, 25 Mar 2018 14:03:11 +0200 Subject: [PATCH 1/2] Created fastdev theme --- src/PHP5.3/theme.json | 32 ++++++++++++++++++++++++++++---- src/PHP7.0/theme.json | 32 ++++++++++++++++++++++++++++---- 2 files changed, 56 insertions(+), 8 deletions(-) diff --git a/src/PHP5.3/theme.json b/src/PHP5.3/theme.json index f244c90..a23bf09 100644 --- a/src/PHP5.3/theme.json +++ b/src/PHP5.3/theme.json @@ -1,4 +1,32 @@ { + "fastdev": { + "body": { "background": "#282c34", "width": "100%" }, + "keywords": { "color": "#edb83d"}, + "cast": { "color": "#038C8C" }, + "null": { "color": "#FF5D38" }, + "bool": { "color": "#FF5D38" }, + "self": { "color": "#FF5D38" }, + "quote": { "color": "#FFFFFF" }, + "class": { "color": "#edb83d" }, + "parent": { "color": "#edb83d" }, + "number": { "color": "#edb83d" }, + "comment": { "color": "#6e7a94", "font-style": "italic" }, + "tag_open": { "color": "#F00000" }, + "function": { "color": "#FF464E", "font-style": "bold" }, + "variable": { "color": "#FF464E" }, + "constant": { "color": "#0F255E" }, + "tag_close": { "color": "#F00000" }, + "operators": { "color": "#FFFFFF" }, + "semi_colon": { "color": "#dee3ec" }, + "parenthesis": { "color": "#FFFFFF" }, + "return_type": { "color": "#FE648A" }, + "php_function": { "color": "#edb83d" }, + "curly_braces": { "color": "#dee3ec" }, + "parameter_type": { "color": "#E3093F" }, + "square_bracket": { "color": "#edb83d" }, + "custom_function": { "color": "#edb83d" }, + "multi_line_comment": { "color": "#6e7a94", "font-style": "italic" } + }, "bittr": { "body": { "background": "#2b303b", "width": "100%" }, "keywords": { "color": "#26A6A6"}, @@ -233,7 +261,3 @@ "multi_line_comment": { "color": "#969896", "font-style": "italic" } } } - - - - diff --git a/src/PHP7.0/theme.json b/src/PHP7.0/theme.json index f244c90..a23bf09 100644 --- a/src/PHP7.0/theme.json +++ b/src/PHP7.0/theme.json @@ -1,4 +1,32 @@ { + "fastdev": { + "body": { "background": "#282c34", "width": "100%" }, + "keywords": { "color": "#edb83d"}, + "cast": { "color": "#038C8C" }, + "null": { "color": "#FF5D38" }, + "bool": { "color": "#FF5D38" }, + "self": { "color": "#FF5D38" }, + "quote": { "color": "#FFFFFF" }, + "class": { "color": "#edb83d" }, + "parent": { "color": "#edb83d" }, + "number": { "color": "#edb83d" }, + "comment": { "color": "#6e7a94", "font-style": "italic" }, + "tag_open": { "color": "#F00000" }, + "function": { "color": "#FF464E", "font-style": "bold" }, + "variable": { "color": "#FF464E" }, + "constant": { "color": "#0F255E" }, + "tag_close": { "color": "#F00000" }, + "operators": { "color": "#FFFFFF" }, + "semi_colon": { "color": "#dee3ec" }, + "parenthesis": { "color": "#FFFFFF" }, + "return_type": { "color": "#FE648A" }, + "php_function": { "color": "#edb83d" }, + "curly_braces": { "color": "#dee3ec" }, + "parameter_type": { "color": "#E3093F" }, + "square_bracket": { "color": "#edb83d" }, + "custom_function": { "color": "#edb83d" }, + "multi_line_comment": { "color": "#6e7a94", "font-style": "italic" } + }, "bittr": { "body": { "background": "#2b303b", "width": "100%" }, "keywords": { "color": "#26A6A6"}, @@ -233,7 +261,3 @@ "multi_line_comment": { "color": "#969896", "font-style": "italic" } } } - - - - From 7511a85081fd6ff0c77d7e1c6d25f46647b6ec15 Mon Sep 17 00:00:00 2001 From: EmilKidi Date: Sun, 25 Mar 2018 14:15:24 +0200 Subject: [PATCH 2/2] added-option-for-fallback-textcolor --- src/PHP5.3/Highlight.php | 4 +++- src/PHP5.3/theme.json | 1 + src/PHP7.0/Highlight.php | 4 +++- src/PHP7.0/theme.json | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/PHP5.3/Highlight.php b/src/PHP5.3/Highlight.php index 0b32cc6..e5ad750 100644 --- a/src/PHP5.3/Highlight.php +++ b/src/PHP5.3/Highlight.php @@ -47,6 +47,7 @@ class Highlight private static $show_line_number = false; private static $body = ''; + private static $default = '#000000'; private static $cast = '#038C8C'; private static $null = '#0000FF'; private static $bool = '#D8C300'; @@ -384,8 +385,9 @@ private static function format($code, $file_name, $cache) $new_code .= ''; $new_code = str_replace(array('\"', '\\\'', ' '), array('"', '\'', '  '), $new_code); + $default_color = 'color:' . self::$default; $style = '.strip font,.strip span{color:inherit !important;all:initial !important;all:unset !important}'; - $pretty = ''. $new_code . '
'; + $pretty = ''. $new_code . '
'; if ($cache) { diff --git a/src/PHP5.3/theme.json b/src/PHP5.3/theme.json index a23bf09..cead6e2 100644 --- a/src/PHP5.3/theme.json +++ b/src/PHP5.3/theme.json @@ -1,6 +1,7 @@ { "fastdev": { "body": { "background": "#282c34", "width": "100%" }, + "default": {"color": "edb83d"}, "keywords": { "color": "#edb83d"}, "cast": { "color": "#038C8C" }, "null": { "color": "#FF5D38" }, diff --git a/src/PHP7.0/Highlight.php b/src/PHP7.0/Highlight.php index 96d88dc..4f0acac 100644 --- a/src/PHP7.0/Highlight.php +++ b/src/PHP7.0/Highlight.php @@ -48,6 +48,7 @@ class Highlight private static $show_line_number = false; private static $body = ''; + private static $default = '#000000'; private static $cast = '#038C8C'; private static $null = '#0000FF'; private static $bool = '#D8C300'; @@ -383,8 +384,9 @@ private static function format(string $code, string $file_name, bool $cache): st $new_code .= ''; $new_code = str_replace(['\"', '\\\'', ' '], ['"', '\'', '  '], $new_code); + $default_color = 'color:' . self::$default; $style = '.strip font,.strip span{color:inherit !important;all:initial !important;all:unset !important}'; - $pretty = ''. $new_code . '
'; + $pretty = ''. $new_code . '
'; if ($cache) { diff --git a/src/PHP7.0/theme.json b/src/PHP7.0/theme.json index a23bf09..cead6e2 100644 --- a/src/PHP7.0/theme.json +++ b/src/PHP7.0/theme.json @@ -1,6 +1,7 @@ { "fastdev": { "body": { "background": "#282c34", "width": "100%" }, + "default": {"color": "edb83d"}, "keywords": { "color": "#edb83d"}, "cast": { "color": "#038C8C" }, "null": { "color": "#FF5D38" },