Skip to content

Commit 1864062

Browse files
authored
Merge pull request #180 from joyofrails/feat/highlight-editor
Add Syntax Highlight preview and settings
2 parents eb8b96f + c1b89fc commit 1864062

File tree

256 files changed

+16757
-77
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

256 files changed

+16757
-77
lines changed

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ gem "meta-tags", group: [:default, :wasm] # Search Engine Optimization (SEO) for
4242
gem "bootsnap", require: false # Reduces boot times through caching; required in config/boot.rb [https://github.com/Shopify/bootsnap]
4343

4444
# Clients
45+
gem "httpx" # An HTTP client library for Ruby [https://gitlab.com/os85/httpx]
4546
gem "honeybadger" # Error monitoring and uptime reporting [https://www.honeybadger.io]
4647
gem "litestream" # Standalone streaming replication for SQLite [https://litestream.io]
4748
gem "web-push" # Web Push library for Ruby [https://github.com/pushpad/web-push]
@@ -69,6 +70,7 @@ group :test do
6970
end
7071

7172
group :development, :test do
73+
gem "css_parser", require: false # A pure Ruby CSS parser based on the CSS Syntax Level 3 specification [https://github.com/rgrove/crass]
7274
gem "brakeman", require: false # A static analysis security vulnerability scanner for Ruby on Rails applications [https://github.com/presidentbeef/brakeman]
7375
gem "bundle-audit", require: false # Patch level verification for Bundler [https://github.com/rubysec/bundler-audit]
7476
gem "debug", platforms: %i[mri windows] # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem

Gemfile.lock

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ GEM
125125
bigdecimal
126126
rexml
127127
crass (1.0.6)
128+
css_parser (1.17.1)
129+
addressable
128130
cuprite (0.15.1)
129131
capybara (~> 3.0)
130132
ferrum (~> 0.15.0)
@@ -224,6 +226,9 @@ GEM
224226
activesupport (>= 6.1)
225227
hashdiff (1.1.0)
226228
honeybadger (5.15.0)
229+
http-2 (1.0.0)
230+
httpx (1.3.0)
231+
http-2 (>= 1.0.0)
227232
i18n (1.14.5)
228233
concurrent-ruby (~> 1.0)
229234
importmap-rails (2.0.1)
@@ -547,6 +552,7 @@ DEPENDENCIES
547552
capybara
548553
color_conversion
549554
commonmarker
555+
css_parser
550556
cuprite
551557
debug
552558
device_detector
@@ -559,6 +565,7 @@ DEPENDENCIES
559565
flipper-ui
560566
fog-aws
561567
honeybadger
568+
httpx
562569
inline_svg
563570
invisible_captcha
564571
js
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/*! 256_jungle; http://bytefluent.com/devify/ */
2+
.highlight, .highlight pre, .highlight table { background: #1c1c1c !important; color: #dadada !important; }
3+
.highlight .hll { background-color: #ffffcc !important; }
4+
.highlight .c { color: #585858 !important; } /* Comment */
5+
.highlight .err { color: #dadada !important; } /* Error */
6+
.highlight .g { color: #dadada !important; } /* Generic */
7+
.highlight .k { color: #d78700 !important; } /* Keyword */
8+
.highlight .l { color: #dadada !important; } /* Literal */
9+
.highlight .n, .highlight .h { color: #dadada !important; } /* Name */
10+
.highlight .o { color: #dadada !important; } /* Operator */
11+
.highlight .x { color: #dadada !important; } /* Other */
12+
.highlight .p { color: #dadada !important; } /* Punctuation */
13+
.highlight .cm { color: #585858 !important; } /* Comment.Multiline */
14+
.highlight .cp { color: #767676 !important; } /* Comment.Preproc */
15+
.highlight .c1 { color: #585858 !important; } /* Comment.Single */
16+
.highlight .cs { color: #585858 !important; } /* Comment.Special */
17+
.highlight .gd { color: #dadada !important; } /* Generic.Deleted */
18+
.highlight .ge { color: #dadada !important; } /* Generic.Emph */
19+
.highlight .gr { color: #dadada !important; background-color: #ff0000 !important; } /* Generic.Error */
20+
.highlight .gh { color: #dadada !important; } /* Generic.Heading */
21+
.highlight .gi { color: #dadada !important; } /* Generic.Inserted */
22+
.highlight .go { color: #8787ff !important; } /* Generic.Output */
23+
.highlight .gp { color: #dadada !important; } /* Generic.Prompt */
24+
.highlight .gs { color: #dadada !important; } /* Generic.Strong */
25+
.highlight .gu { color: #dadada !important; } /* Generic.Subheading */
26+
.highlight .gt { color: #d70000 !important; background-color: #8a8a8a !important; } /* Generic.Traceback */
27+
.highlight .kc { color: #d78700 !important; } /* Keyword.Constant */
28+
.highlight .kd { color: #d78700 !important; } /* Keyword.Declaration */
29+
.highlight .kn { color: #d78700 !important; } /* Keyword.Namespace */
30+
.highlight .kp { color: #d78700 !important; } /* Keyword.Pseudo */
31+
.highlight .kr { color: #d78700 !important; } /* Keyword.Reserved */
32+
.highlight .kt { color: #d75f00 !important; } /* Keyword.Type */
33+
.highlight .ld { color: #dadada !important; } /* Literal.Date */
34+
.highlight .m { color: #5fd700 !important; } /* Literal.Number */
35+
.highlight .s { color: #5fd700 !important; } /* Literal.String */
36+
.highlight .na { color: #afaf00 !important; } /* Name.Attribute */
37+
.highlight .nb { color: #dadada !important; } /* Name.Builtin */
38+
.highlight .nc { color: #dadada !important; } /* Name.Class */
39+
.highlight .no { color: #5fd700 !important; } /* Name.Constant */
40+
.highlight .nd { color: #dadada !important; } /* Name.Decorator */
41+
.highlight .ni { color: #d78700 !important; } /* Name.Entity */
42+
.highlight .ne { color: #d75f00 !important; } /* Name.Exception */
43+
.highlight .nf { color: #afaf00 !important; } /* Name.Function */
44+
.highlight .nl { color: #d75f00 !important; } /* Name.Label */
45+
.highlight .nn { color: #dadada !important; } /* Name.Namespace */
46+
.highlight .nx { color: #dadada !important; } /* Name.Other */
47+
.highlight .py { color: #dadada !important; } /* Name.Property */
48+
.highlight .nt { color: #d78700 !important; } /* Name.Tag */
49+
.highlight .nv { color: #afaf00 !important; } /* Name.Variable */
50+
.highlight .ow { color: #d75f00 !important; } /* Operator.Word */
51+
.highlight .w { color: #dadada !important; } /* Text.Whitespace */
52+
.highlight .mf { color: #5fd700 !important; } /* Literal.Number.Float */
53+
.highlight .mh { color: #5fd700 !important; } /* Literal.Number.Hex */
54+
.highlight .mi { color: #5fd700 !important; } /* Literal.Number.Integer */
55+
.highlight .mo { color: #5fd700 !important; } /* Literal.Number.Oct */
56+
.highlight .sb { color: #5fd700 !important; } /* Literal.String.Backtick */
57+
.highlight .sc { color: #5fd700 !important; } /* Literal.String.Char */
58+
.highlight .sd { color: #5fd700 !important; } /* Literal.String.Doc */
59+
.highlight .s2 { color: #5fd700 !important; } /* Literal.String.Double */
60+
.highlight .se { color: #5fd700 !important; } /* Literal.String.Escape */
61+
.highlight .sh { color: #5fd700 !important; } /* Literal.String.Heredoc */
62+
.highlight .si { color: #5fd700 !important; } /* Literal.String.Interpol */
63+
.highlight .sx { color: #5fd700 !important; } /* Literal.String.Other */
64+
.highlight .sr { color: #5fd700 !important; } /* Literal.String.Regex */
65+
.highlight .s1 { color: #5fd700 !important; } /* Literal.String.Single */
66+
.highlight .ss { color: #5fd700 !important; } /* Literal.String.Symbol */
67+
.highlight .bp { color: #dadada !important; } /* Name.Builtin.Pseudo */
68+
.highlight .vc { color: #afaf00 !important; } /* Name.Variable.Class */
69+
.highlight .vg { color: #afaf00 !important; } /* Name.Variable.Global */
70+
.highlight .vi { color: #afaf00 !important; } /* Name.Variable.Instance */
71+
.highlight .il { color: #5fd700 !important; } /* Literal.Number.Integer.Long */
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/*! 3024 night by Jan T. Sott (http://github.com/idleberg); http://github.com/0x3024 */
2+
.highlight, .highlight pre, .highlight table { background: #090300 !important; color: #f7f7f7 !important; }
3+
.highlight .hll { background-color: #4a4543 !important; }
4+
.highlight .c { color: #5c5855 !important; } /* Comment */
5+
.highlight .err { color: #db2d20 !important; } /* Error */
6+
.highlight .k { color: #a16a94 !important; } /* Keyword */
7+
.highlight .l { color: #e8bbd0 !important; } /* Literal */
8+
.highlight .n, .highlight .h { color: #f7f7f7 !important; } /* Name */
9+
.highlight .o { color: #b5e4f4 !important; } /* Operator */
10+
.highlight .p { color: #f7f7f7 !important; } /* Punctuation */
11+
.highlight .cm { color: #5c5855 !important; } /* Comment.Multiline */
12+
.highlight .cp { color: #5c5855 !important; } /* Comment.Preproc */
13+
.highlight .c1 { color: #5c5855 !important; } /* Comment.Single */
14+
.highlight .cs { color: #5c5855 !important; } /* Comment.Special */
15+
.highlight .gd { color: #db2d20 !important; } /* Generic.Deleted */
16+
.highlight .ge { font-style: italic !important; } /* Generic.Emph */
17+
.highlight .gh { color: #f7f7f7 !important; font-weight: bold !important; } /* Generic.Heading */
18+
.highlight .gi { color: #01a252 !important; } /* Generic.Inserted */
19+
.highlight .gp { color: #5c5855 !important; font-weight: bold !important; } /* Generic.Prompt */
20+
.highlight .gs { font-weight: bold !important; } /* Generic.Strong */
21+
.highlight .gu { color: #b5e4f4 !important; font-weight: bold !important; } /* Generic.Subheading */
22+
.highlight .kc { color: #a16a94 !important; } /* Keyword.Constant */
23+
.highlight .kd { color: #a16a94 !important; } /* Keyword.Declaration */
24+
.highlight .kn { color: #b5e4f4 !important; } /* Keyword.Namespace */
25+
.highlight .kp { color: #a16a94 !important; } /* Keyword.Pseudo */
26+
.highlight .kr { color: #a16a94 !important; } /* Keyword.Reserved */
27+
.highlight .kt { color: #fded02 !important; } /* Keyword.Type */
28+
.highlight .ld { color: #01a252 !important; } /* Literal.Date */
29+
.highlight .m { color: #e8bbd0 !important; } /* Literal.Number */
30+
.highlight .s { color: #01a252 !important; } /* Literal.String */
31+
.highlight .na { color: #01a0e4 !important; } /* Name.Attribute */
32+
.highlight .nb { color: #f7f7f7 !important; } /* Name.Builtin */
33+
.highlight .nc { color: #fded02 !important; } /* Name.Class */
34+
.highlight .no { color: #db2d20 !important; } /* Name.Constant */
35+
.highlight .nd { color: #b5e4f4 !important; } /* Name.Decorator */
36+
.highlight .ni { color: #f7f7f7 !important; } /* Name.Entity */
37+
.highlight .ne { color: #db2d20 !important; } /* Name.Exception */
38+
.highlight .nf { color: #01a0e4 !important; } /* Name.Function */
39+
.highlight .nl { color: #f7f7f7 !important; } /* Name.Label */
40+
.highlight .nn { color: #fded02 !important; } /* Name.Namespace */
41+
.highlight .nx { color: #01a0e4 !important; } /* Name.Other */
42+
.highlight .py { color: #f7f7f7 !important; } /* Name.Property */
43+
.highlight .nt { color: #b5e4f4 !important; } /* Name.Tag */
44+
.highlight .nv { color: #db2d20 !important; } /* Name.Variable */
45+
.highlight .ow { color: #b5e4f4 !important; } /* Operator.Word */
46+
.highlight .w { color: #f7f7f7 !important; } /* Text.Whitespace */
47+
.highlight .mf { color: #e8bbd0 !important; } /* Literal.Number.Float */
48+
.highlight .mh { color: #e8bbd0 !important; } /* Literal.Number.Hex */
49+
.highlight .mi { color: #e8bbd0 !important; } /* Literal.Number.Integer */
50+
.highlight .mo { color: #e8bbd0 !important; } /* Literal.Number.Oct */
51+
.highlight .sb { color: #01a252 !important; } /* Literal.String.Backtick */
52+
.highlight .sc { color: #f7f7f7 !important; } /* Literal.String.Char */
53+
.highlight .sd { color: #5c5855 !important; } /* Literal.String.Doc */
54+
.highlight .s2 { color: #01a252 !important; } /* Literal.String.Double */
55+
.highlight .se { color: #e8bbd0 !important; } /* Literal.String.Escape */
56+
.highlight .sh { color: #01a252 !important; } /* Literal.String.Heredoc */
57+
.highlight .si { color: #e8bbd0 !important; } /* Literal.String.Interpol */
58+
.highlight .sx { color: #01a252 !important; } /* Literal.String.Other */
59+
.highlight .sr { color: #01a252 !important; } /* Literal.String.Regex */
60+
.highlight .s1 { color: #01a252 !important; } /* Literal.String.Single */
61+
.highlight .ss { color: #01a252 !important; } /* Literal.String.Symbol */
62+
.highlight .bp { color: #f7f7f7 !important; } /* Name.Builtin.Pseudo */
63+
.highlight .vc { color: #db2d20 !important; } /* Name.Variable.Class */
64+
.highlight .vg { color: #db2d20 !important; } /* Name.Variable.Global */
65+
.highlight .vi { color: #db2d20 !important; } /* Name.Variable.Instance */
66+
.highlight .il { color: #e8bbd0 !important; } /* Literal.Number.Integer.Long */
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/*! anotherdark; http://bytefluent.com/devify/ */
2+
.highlight, .highlight pre, .highlight table { background: #333333 !important; color: #ffffff !important; }
3+
.highlight .hll { background-color: #ffffcc !important; }
4+
.highlight .c { color: #ff4500 !important; } /* Comment */
5+
.highlight .err { color: #ffffff !important; } /* Error */
6+
.highlight .g { color: #ffffff !important; } /* Generic */
7+
.highlight .k { color: #f0e68c !important; } /* Keyword */
8+
.highlight .l { color: #ffffff !important; } /* Literal */
9+
.highlight .n, .highlight .h { color: #ffffff !important; } /* Name */
10+
.highlight .o { color: #ffffff !important; } /* Operator */
11+
.highlight .x { color: #ffffff !important; } /* Other */
12+
.highlight .p { color: #ffffff !important; } /* Punctuation */
13+
.highlight .cm { color: #ff4500 !important; } /* Comment.Multiline */
14+
.highlight .cp { color: #cd5c5c !important; } /* Comment.Preproc */
15+
.highlight .c1 { color: #ff4500 !important; } /* Comment.Single */
16+
.highlight .cs { color: #ff4500 !important; } /* Comment.Special */
17+
.highlight .gd { color: #0000c0 !important; font-weight: bold !important; background-color: #008080 !important; } /* Generic.Deleted */
18+
.highlight .ge { color: #c000c0 !important; text-decoration: underline !important; } /* Generic.Emph */
19+
.highlight .gr { color: #c0c0c0 !important; font-weight: bold !important; background-color: #c00000 !important; } /* Generic.Error */
20+
.highlight .gh { color: #cd5c5c !important; } /* Generic.Heading */
21+
.highlight .gi { color: #ffffff !important; background-color: #0000c0 } /* Generic.Inserted */
22+
.highlight .go { color: #add8e6 !important; font-weight: bold !important; background-color: #4d4d4d !important; } /* Generic.Output */
23+
.highlight .gp { color: #ffffff !important; } /* Generic.Prompt */
24+
.highlight .gs { color: #ffffff !important; } /* Generic.Strong */
25+
.highlight .gu { color: #cd5c5c !important; } /* Generic.Subheading */
26+
.highlight .gt { color: #c0c0c0 !important; font-weight: bold !important; background-color: #c00000 !important; } /* Generic.Traceback */
27+
.highlight .kc { color: #f0e68c !important; } /* Keyword.Constant */
28+
.highlight .kd { color: #f0e68c !important; } /* Keyword.Declaration */
29+
.highlight .kn { color: #f0e68c !important; } /* Keyword.Namespace */
30+
.highlight .kp { color: #f0e68c !important; } /* Keyword.Pseudo */
31+
.highlight .kr { color: #f0e68c !important; } /* Keyword.Reserved */
32+
.highlight .kt { color: #bdb76b !important; } /* Keyword.Type */
33+
.highlight .ld { color: #ffffff !important; } /* Literal.Date */
34+
.highlight .m { color: #ffffff !important; } /* Literal.Number */
35+
.highlight .s { color: #ffffff !important; } /* Literal.String */
36+
.highlight .na { color: #ffffff !important; } /* Name.Attribute */
37+
.highlight .nb { color: #ffffff !important; } /* Name.Builtin */
38+
.highlight .nc { color: #ffffff !important; } /* Name.Class */
39+
.highlight .no { color: #ffa0a0 !important; } /* Name.Constant */
40+
.highlight .nd { color: #ffffff !important; } /* Name.Decorator */
41+
.highlight .ni { color: #ffdead !important; } /* Name.Entity */
42+
.highlight .ne { color: #ffffff !important; } /* Name.Exception */
43+
.highlight .nf { color: #ffffff !important; } /* Name.Function */
44+
.highlight .nl { color: #ffffff !important; } /* Name.Label */
45+
.highlight .nn { color: #ffffff !important; } /* Name.Namespace */
46+
.highlight .nx { color: #ffffff !important; } /* Name.Other */
47+
.highlight .py { color: #ffffff !important; } /* Name.Property */
48+
.highlight .nt { color: #f0e68c !important; } /* Name.Tag */
49+
.highlight .nv { color: #98fb98 !important; } /* Name.Variable */
50+
.highlight .ow { color: #ffffff !important; } /* Operator.Word */
51+
.highlight .w { color: #ffffff !important; } /* Text.Whitespace */
52+
.highlight .mf { color: #ffffff !important; } /* Literal.Number.Float */
53+
.highlight .mh { color: #ffffff !important; } /* Literal.Number.Hex */
54+
.highlight .mi { color: #ffffff !important; } /* Literal.Number.Integer */
55+
.highlight .mo { color: #ffffff !important; } /* Literal.Number.Oct */
56+
.highlight .sb { color: #ffffff !important; } /* Literal.String.Backtick */
57+
.highlight .sc { color: #ffffff !important; } /* Literal.String.Char */
58+
.highlight .sd { color: #ffffff !important; } /* Literal.String.Doc */
59+
.highlight .s2 { color: #ffffff !important; } /* Literal.String.Double */
60+
.highlight .se { color: #ffffff !important; } /* Literal.String.Escape */
61+
.highlight .sh { color: #ffffff !important; } /* Literal.String.Heredoc */
62+
.highlight .si { color: #ffffff !important; } /* Literal.String.Interpol */
63+
.highlight .sx { color: #ffffff !important; } /* Literal.String.Other */
64+
.highlight .sr { color: #ffffff !important; } /* Literal.String.Regex */
65+
.highlight .s1 { color: #ffffff !important; } /* Literal.String.Single */
66+
.highlight .ss { color: #ffffff !important; } /* Literal.String.Symbol */
67+
.highlight .bp { color: #ffffff !important; } /* Name.Builtin.Pseudo */
68+
.highlight .vc { color: #98fb98 !important; } /* Name.Variable.Class */
69+
.highlight .vg { color: #98fb98 !important; } /* Name.Variable.Global */
70+
.highlight .vi { color: #98fb98 !important; } /* Name.Variable.Instance */
71+
.highlight .il { color: #ffffff !important; } /* Literal.Number.Integer.Long */

0 commit comments

Comments
 (0)