├── .eslintignore
├── .gitignore
├── README.md
├── app
├── _locales
│ └── en
│ │ └── messages.json
├── images
│ ├── icon-128.png
│ ├── icon-16.png
│ ├── icon-19.png
│ └── icon-38.png
├── manifest.json
├── options.html
├── package.json
├── popup.html
├── scripts
│ ├── background.js
│ ├── cnblogs.js
│ ├── lib
│ │ ├── codemirror.js
│ │ ├── emoji.js
│ │ ├── jquery.js
│ │ └── pangu.js
│ ├── mode
│ │ ├── css.js
│ │ ├── gfm.js
│ │ ├── html.js
│ │ ├── javascript.js
│ │ ├── markdown.js
│ │ ├── overlay.js
│ │ └── xml.js
│ ├── options.js
│ ├── popup.js
│ └── sort.js
├── styles
│ ├── codemirror.css
│ ├── style.css
│ └── theme
│ │ ├── 3024-night.css
│ │ ├── abcdef.css
│ │ ├── ambiance-mobile.css
│ │ ├── ambiance.css
│ │ ├── base16-dark.css
│ │ ├── base16-light.css
│ │ ├── bespin.css
│ │ ├── blackboard.css
│ │ ├── cobalt.css
│ │ ├── colorforth.css
│ │ ├── darcula.css
│ │ ├── dracula.css
│ │ ├── duotone-dark.css
│ │ ├── duotone-light.css
│ │ ├── eclipse.css
│ │ ├── elegant.css
│ │ ├── erlang-dark.css
│ │ ├── gruvbox-dark.css
│ │ ├── hopscotch.css
│ │ ├── icecoder.css
│ │ ├── idea.css
│ │ ├── isotope.css
│ │ ├── lesser-dark.css
│ │ ├── liquibyte.css
│ │ ├── lucario.css
│ │ ├── material-darker.css
│ │ ├── material-ocean.css
│ │ ├── material-palenight.css
│ │ ├── material.css
│ │ ├── mbo.css
│ │ ├── mdn-like.css
│ │ ├── midnight.css
│ │ ├── monokai.css
│ │ ├── moxer.css
│ │ ├── neat.css
│ │ ├── neo.css
│ │ ├── night.css
│ │ ├── nord.css
│ │ ├── oceanic-next.css
│ │ ├── panda-syntax.css
│ │ ├── paraiso-dark.css
│ │ ├── paraiso-light.css
│ │ ├── pastel-on-dark.css
│ │ ├── railscasts.css
│ │ ├── rubyblue.css
│ │ ├── seti.css
│ │ ├── shadowfox.css
│ │ ├── solarized.css
│ │ ├── ssms.css
│ │ ├── the-matrix.css
│ │ ├── tomorrow-night-bright.css
│ │ ├── tomorrow-night-eighties.css
│ │ ├── ttcn.css
│ │ ├── twilight.css
│ │ ├── vibrant-ink.css
│ │ ├── xq-dark.css
│ │ ├── xq-light.css
│ │ ├── yeti.css
│ │ ├── yonce.css
│ │ └── zenburn.css
└── test
│ ├── index.js
│ ├── newMd.md
│ ├── test.md
│ └── toc.js
└── images
├── css.png
├── dest-0.jpg
├── doutu.gif
├── emoji.png
├── mdeditor.png
├── shatter1.gif
├── shatter2.gif
└── sort.png
/.eslintignore:
--------------------------------------------------------------------------------
1 | app/scripts/lib/
2 | app/scripts/mode/
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.crx
2 | *.pem
3 | *.zip
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # cnblogs md editor
2 |
3 |
4 |

5 |
6 |
7 | ---
8 |
9 | 由于博客园的markdown编辑器不是很好用,撸了一个chrome插件,改善一下用户体验
10 |
11 | ## 功能/截图
12 |
13 | - 高亮markdown代码
14 |
15 | 
16 |
17 | - 生成博文目录
18 |
19 | 
20 |
21 | - 添加盘古之白
22 |
23 | 
24 |
25 | **注意**:使用盘古之白时,emoji缩写的第一个冒号后面会被加空格,造成页面渲染不出表情,可通过在第一个冒号前面加空格解决
26 |
27 | - 插入emoji表情
28 |
29 | 
30 |
31 | - 高亮自定义css
32 |
33 | 
34 |
35 | - 搜索/插入网络表情包
36 |
37 | 感谢[斗图啦](https://www.doutula.com/)提供的API
38 |
39 | 
40 |
41 | - 对首页博文按阅读量等排序
42 |
43 | 
44 |
45 | 更多功能欢迎到issue中提出😊
46 |
47 | ## TODO
48 |
49 | - [x] 支持emoji
50 | - [x] 支持字数统计
51 | - [x] 支持给选中字体加颜色
52 | - [x] 支持表情包搜索(https://www.doutula.com/apidoc)
53 |
54 | ## 安装
55 | **可以通过应用商店安装 [传送门>>](https://chrome.google.com/webstore/detail/cnblogs/dmohalpippgmopnbpnknmapokjdkifmc)**
56 |
57 | 或者直接clone代码到本地安装:
58 |
59 | - 在选项中将默认编辑器设为Markdown编辑器 https://i.cnblogs.com/Preferences.aspx#Editor
60 | - 在浏览器中输入`chrome://extensions`
61 | - 打开开发者模式
62 | - clone仓库
63 | - 点击加载已解压的扩展程序,选择clone下来的app文件夹
64 | - 如果一切正常,打开新增随笔时即可看到变化
65 |
66 | ## 设置
67 |
68 | 目前支持设置主题(light 和 dark)
69 | 更多详情见: https://www.cnblogs.com/imgss/p/9368869.html
70 |
71 | ## issues
72 |
73 | 发现了bug,想到好的功能可以在[issues](https://github.com/imgss/cnblogs-mdEditor/issues)中提出
74 |
75 | ## lisence
76 |
77 | MIT
78 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/app/_locales/en/messages.json:
--------------------------------------------------------------------------------
1 | {
2 | "appName": {
3 | "message": "cnblogs_mdEditor",
4 | "description": ""
5 | },
6 | "appDescription": {
7 | "message": "优化博客园的markdown编辑器",
8 | "description": "优化博客园的markdown编辑器"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/app/images/icon-128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imgss/cnblogs-mdEditor/617fe1251a1281cbcae2fa92245dce08cddc0c2f/app/images/icon-128.png
--------------------------------------------------------------------------------
/app/images/icon-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imgss/cnblogs-mdEditor/617fe1251a1281cbcae2fa92245dce08cddc0c2f/app/images/icon-16.png
--------------------------------------------------------------------------------
/app/images/icon-19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imgss/cnblogs-mdEditor/617fe1251a1281cbcae2fa92245dce08cddc0c2f/app/images/icon-19.png
--------------------------------------------------------------------------------
/app/images/icon-38.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imgss/cnblogs-mdEditor/617fe1251a1281cbcae2fa92245dce08cddc0c2f/app/images/icon-38.png
--------------------------------------------------------------------------------
/app/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "cnblogs",
3 | "version": "0.1.6",
4 | "manifest_version": 2,
5 | "homepage_url": "https://github.com/imgss/cnblogs-mdEditor",
6 | "description": "__MSG_appDescription__",
7 | "icons": {
8 | "16": "images/icon-16.png",
9 | "19": "images/icon-19.png",
10 | "38": "images/icon-38.png",
11 | "128": "images/icon-128.png"
12 | },
13 | "default_locale": "en",
14 | "background": {
15 | "scripts": ["scripts/background.js"],
16 | "persistent": true
17 | },
18 | "content_scripts":
19 | [
20 | {
21 | "matches": ["https://i.cnblogs.com/*", "https://i1.cnblogs.com/*", "https://www.cnblogs.com/*"],
22 | "js": [
23 | "scripts/lib/jquery.js",
24 | "scripts/lib/codemirror.js",
25 | "scripts/lib/pangu.js",
26 | "scripts/lib/emoji.js",
27 | "scripts/mode/overlay.js",
28 | "scripts/mode/markdown.js",
29 | "scripts/mode/gfm.js",
30 | "scripts/mode/css.js",
31 | "scripts/mode/javascript.js",
32 | "scripts/mode/xml.js",
33 | "scripts/mode/html.js",
34 | "scripts/cnblogs.js",
35 | "scripts/sort.js"
36 | ],
37 | "css": [
38 | "styles/codemirror.css",
39 | "styles/style.css",
40 | "styles/theme/3024-night.css",
41 | "styles/theme/abcdef.css",
42 | "styles/theme/ambiance.css",
43 | "styles/theme/base16-dark.css",
44 | "styles/theme/base16-light.css",
45 | "styles/theme/bespin.css",
46 | "styles/theme/blackboard.css",
47 | "styles/theme/cobalt.css",
48 | "styles/theme/colorforth.css",
49 | "styles/theme/darcula.css",
50 | "styles/theme/dracula.css",
51 | "styles/theme/duotone-dark.css",
52 | "styles/theme/duotone-light.css",
53 | "styles/theme/eclipse.css",
54 | "styles/theme/elegant.css",
55 | "styles/theme/erlang-dark.css",
56 | "styles/theme/gruvbox-dark.css",
57 | "styles/theme/hopscotch.css",
58 | "styles/theme/icecoder.css",
59 | "styles/theme/idea.css",
60 | "styles/theme/isotope.css",
61 | "styles/theme/lesser-dark.css",
62 | "styles/theme/liquibyte.css",
63 | "styles/theme/lucario.css",
64 | "styles/theme/material.css",
65 | "styles/theme/material-darker.css",
66 | "styles/theme/material-palenight.css",
67 | "styles/theme/material-ocean.css",
68 | "styles/theme/mbo.css",
69 | "styles/theme/mdn-like.css",
70 | "styles/theme/midnight.css",
71 | "styles/theme/monokai.css",
72 | "styles/theme/moxer.css",
73 | "styles/theme/neat.css",
74 | "styles/theme/neo.css",
75 | "styles/theme/night.css",
76 | "styles/theme/nord.css",
77 | "styles/theme/oceanic-next.css",
78 | "styles/theme/panda-syntax.css",
79 | "styles/theme/paraiso-dark.css",
80 | "styles/theme/paraiso-light.css",
81 | "styles/theme/pastel-on-dark.css",
82 | "styles/theme/railscasts.css",
83 | "styles/theme/rubyblue.css",
84 | "styles/theme/seti.css",
85 | "styles/theme/shadowfox.css",
86 | "styles/theme/solarized.css",
87 | "styles/theme/the-matrix.css",
88 | "styles/theme/tomorrow-night-bright.css",
89 | "styles/theme/tomorrow-night-eighties.css",
90 | "styles/theme/ttcn.css",
91 | "styles/theme/twilight.css",
92 | "styles/theme/vibrant-ink.css",
93 | "styles/theme/xq-dark.css",
94 | "styles/theme/xq-light.css",
95 | "styles/theme/yeti.css",
96 | "styles/theme/yonce.css",
97 | "styles/theme/zenburn.css"
98 | ],
99 | "run_at": "document_end"
100 | }
101 | ],
102 | "options_ui": {
103 | "chrome_style": true,
104 | "page": "options.html"
105 | },
106 | "permissions": [
107 | "storage",
108 | "clipboardRead",
109 | "clipboardWrite",
110 | "webRequest",
111 | "*://*.cnblogs.com/"
112 | ],
113 | "page_action": {
114 | "default_icon": {
115 | "19": "images/icon-19.png",
116 | "38": "images/icon-38.png"
117 | },
118 | "default_title": "cnblogs",
119 | "default_popup": "popup.html"
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/app/options.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | options
8 |
9 |
10 | 选择主题:
11 |
15 |
16 |
17 |
18 | px
19 |
22 |
23 |
--------------------------------------------------------------------------------
/app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "eslintConfig": {
3 | "parserOptions": {
4 | "ecmaVersion": 6,
5 | "sourceType": "module",
6 | "ecmaFeatures": {
7 | "jsx": true
8 | }
9 | },
10 | "rules": {
11 | "semi": "error",
12 | "no-unused-vars": 2,
13 | "no-undef": 2
14 | },
15 | "env": {
16 | "browser": true
17 | },
18 | "globals": {
19 | "$": "readonly",
20 | "chrome": "readonly",
21 | "pangu": "readonly",
22 | "emoji_list": "readonly",
23 | "Promise": "readonly",
24 | "CodeMirror": "readonly"
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/app/popup.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | 'Allo, 'Allo!
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/scripts/background.js:
--------------------------------------------------------------------------------
1 | let ajaxUrl = "https://upload.cnblogs.com/imageuploader/CorsUpload";
2 |
3 | // https://www.cnblogs.com/MainActivity/p/8550895.html
4 | function dataURLtoFile(dataurl, filename) {//将base64转换为文件
5 | let arr = dataurl.split(','),
6 | mime = arr[0].match(/:(.*?);/)[1],
7 | bstr = atob(arr[1]),
8 | n = bstr.length,
9 | u8arr = new Uint8Array(n);
10 | while(n--){
11 | u8arr[n] = bstr.charCodeAt(n);
12 | }
13 | return new File([u8arr], filename, {type:mime});
14 | }
15 |
16 | chrome.runtime.onMessage.addListener(
17 | function(request, sender, sendResponse) {
18 |
19 | if (request.contentScriptQuery == "uploadFile") {
20 | let {file, filename, uploadType} = request;
21 | let formData = new FormData();
22 | formData.append("imageFile", dataURLtoFile(file, filename));
23 | formData.append("host", "www.cnblogs.com");
24 | formData.append("uploadType", uploadType);
25 | console.log(formData);
26 | fetch(ajaxUrl, {
27 | credentials: 'include',
28 | body: formData,
29 | method: 'POST',
30 | mode: 'cors'
31 | })
32 | .then(response => response.json())
33 | .then(res => sendResponse(res))
34 | .catch(error => {
35 | sendResponse({success: false});
36 | });
37 | return true; // Will respond asynchronously.
38 | }
39 | });
--------------------------------------------------------------------------------
/app/scripts/cnblogs.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | // 默认使用旧版后台
4 | $('#blog_nav_admin').attr('href', 'https://i1.cnblogs.com/').attr('title', '插件启用了旧版后台');
5 | console.log($('#blog_nav_newpost').length);
6 | $('#blog_nav_newpost').attr('href', 'https://i1.cnblogs.com/EditPosts.aspx?opt=1').attr('title', '插件启用了旧版后台');
7 | $('.postDesc a').each((index, a) => {
8 | const $a = $(a);
9 | $a.attr('href', $a.attr('href').replace('https://i', 'https://i1'));
10 | });
11 |
12 | //获取设置
13 | const getSetting = function() {
14 | return new Promise((resolve) => {
15 | chrome.storage.sync.get({ theme: "3024-night", fontSize: 14, color: '#000000' }, function(items) {
16 | resolve(items);
17 | });
18 | });
19 | };
20 | getSetting().then(config => {
21 | // 当前页面是设置页面时
22 | const cssTextarea = document.getElementById("Edit_txbSecondaryCss");
23 | if (cssTextarea) {
24 | initSettingEditors(cssTextarea);
25 | } else {
26 | // 加入icon样式
27 | initIconStyle();
28 | // 初始化markdown editor
29 | initMdEditor(config);
30 | }
31 | });
32 |
33 | function initMdEditor(config) {
34 |
35 | const textarea = $("#Editor_Edit_EditorBody")[0];
36 | if (!textarea) return;
37 |
38 | // 不改变除markdown外的其他编辑器
39 | let tips = $("#edit_body_tip").text();
40 | if (!/Markdown/.test(tips)) {
41 | return;
42 | }
43 |
44 | // 不显示默认的上传图片按钮
45 | $("#edit_body>img").hide();
46 | // 初始化博客文本编辑器
47 | const editor = CodeMirror.fromTextArea(textarea, {
48 | mode: {
49 | name: "gfm",
50 | tokenTypeOverrides: {
51 | emoji: "emoji"
52 | }
53 | },
54 | value: "",
55 | lineWrapping: true,
56 | theme: "default " + config.theme,
57 | allowDropFileTypes: ["image/png", "image/jpeg"],
58 | lineNumbers: false
59 | });
60 |
61 | initEmoji(editor);
62 |
63 | // 修复「恢复」缓存的功能
64 | $("#Posts").click(function(e) {
65 | if (e.target.textContent === "恢复") {
66 | setTimeout(function() {
67 | editor.setValue(textarea.value);
68 | }, 0);
69 | }
70 | });
71 | $(textarea).css({fontSize: config.fontSize});
72 |
73 | editor.on("change", function(target) {
74 | let value = target.getValue();
75 | textarea.value = value;
76 | updateWordsCounter(value);
77 | });
78 |
79 | // 右键快捷菜单
80 | editor.on("contextmenu", function(cm, e) {
81 | e.preventDefault();
82 | const selection = cm.getSelection();
83 | const posi = cm.getCursor();
84 | if (selection) {
85 | const widget = $(``)[0];
88 | cm.addWidget(posi, widget);
89 | cm.myWidget = widget;
90 | $(widget).on('click', 'li.color', function() {
91 | setSelectionColor(editor, $('#colorInput').val());
92 | });
93 | }
94 | });
95 |
96 | $(document.body).click(function() {
97 | if (editor.myWidget) {
98 | editor.myWidget.remove();
99 | }
100 | });
101 |
102 | initPasteUploadImage(editor);
103 | $(".CodeMirror").pasteUploadImage();
104 |
105 | // 初始化菜单
106 | initMenu(editor, config);
107 | updateWordsCounter(textarea.value);
108 | }
109 |
110 | function initEmoji(cm) {
111 | let emojis = Object.values(emoji_list).map(e => e.char);
112 |
113 | const emojiBoard = $(``);
114 | emojiBoard.html(emojis.map(e => `${e}`).join(""));
115 | // 插入emoji
116 | emojiBoard.click(function(e) {
117 | e.stopPropagation();
118 | if (e.target.nodeName === "SPAN") {
119 | let cursor = cm.getCursor();
120 | cm.replaceRange(e.target.textContent, cursor, cursor);
121 | }
122 | }).appendTo(document.body);
123 |
124 | document.body.onclick = function() {
125 | emojiBoard.hide();
126 | };
127 | }
128 |
129 | function initIconStyle() {
130 | let link = document.createElement("link");
131 | link.rel = "stylesheet";
132 | link.href = "https://at.alicdn.com/t/font_871145_xnvcmxbtu8h.css";
133 | document.head.appendChild(link);
134 | }
135 |
136 | function initSettingEditors(cssTextarea) {
137 | CodeMirror.fromTextArea(cssTextarea, {
138 | mode: "css",
139 | lineWrapping: true,
140 | theme: "default ",
141 | lineNumbers: true
142 | });
143 | const htmlTextareas = document.querySelectorAll(
144 | "#Edit_EditorBody,#Edit_txbPageBeginHtml,#Edit_txbPageEndHtml"
145 | );
146 | Array.from(htmlTextareas).forEach(function(textarea) {
147 | CodeMirror.fromTextArea(textarea, {
148 | mode: {
149 | name: "htmlmixed",
150 | scriptTypes: [
151 | { matches: /\/x-handlebars-template|\/x-mustache/i, mode: null }
152 | ]
153 | },
154 | lineWrapping: false,
155 | theme: "default ",
156 | lineNumbers: false
157 | });
158 | textarea.nextElementSibling.style =
159 | "height:300px;width:850px;padding:5px 10px;";
160 | });
161 | }
162 |
163 | function initMenu(editor, config) {
164 | const menu = new Menu([
165 | {
166 | text: "全屏模式",
167 | className: "icon-full",
168 | listener: function() {
169 | let codeEl = $(".CodeMirror")[0];
170 | codeEl.webkitRequestFullScreen();
171 | // 退出全屏时重置宽高
172 | document.addEventListener("webkitfullscreenchange", function() {
173 | if (codeEl.style.width === "100vw") {
174 | codeEl.style.width = "";
175 | codeEl.style.height = "";
176 | } else {
177 | codeEl.style.width = "100vw";
178 | codeEl.style.height = "100vh";
179 | }
180 | });
181 | }
182 | },
183 | {
184 | text: "🖼上传图片",
185 | listener: function() {
186 | alert("将图片拖到编辑器中即可");
187 | }
188 | },
189 | {
190 | text: "📜生成目录",
191 | listener: function(e) {
192 | e.stopPropagation();
193 | let md = editor.getValue();
194 | let newMd = generateToc(md);
195 | editor.setValue(newMd);
196 | }
197 | },
198 | {
199 | text: "📐显示行数",
200 | listener: function() {
201 | editor.setOption("lineNumbers", !editor.getOption("lineNumbers"));
202 | }
203 | },
204 | {
205 | text: "主题切换",
206 | template: `🎨主题切换 `,
207 | mounted: function() {
208 | const options = [
209 | "default",
210 | "3024-night",
211 | "abcdef",
212 | "ambiance",
213 | "base16-dark",
214 | "base16-light",
215 | "bespin",
216 | "blackboard",
217 | "cobalt",
218 | "colorforth",
219 | "darcula",
220 | "dracula",
221 | "duotone-dark",
222 | "duotone-light",
223 | "eclipse",
224 | "elegant",
225 | "erlang-dark",
226 | "gruvbox-dark",
227 | "hopscotch",
228 | "icecoder",
229 | "idea",
230 | "isotope",
231 | "lesser-dark",
232 | "liquibyte",
233 | "lucario",
234 | "material",
235 | "material-darker",
236 | "material-palenight",
237 | "material-ocean",
238 | "mbo",
239 | "mdn-like",
240 | "midnight",
241 | "monokai",
242 | "moxer",
243 | "neat",
244 | "neo",
245 | "night",
246 | "nord",
247 | "oceanic-next",
248 | "panda-syntax",
249 | "paraiso-dark",
250 | "paraiso-light",
251 | "pastel-on-dark",
252 | "railscasts",
253 | "rubyblue",
254 | "seti",
255 | "shadowfox",
256 | "solarized dark",
257 | "solarized light",
258 | "the-matrix",
259 | "tomorrow-night-bright",
260 | "tomorrow-night-eighties",
261 | "ttcn",
262 | "twilight",
263 | "vibrant-ink",
264 | "xq-dark",
265 | "xq-light",
266 | "yeti",
267 | "yonce",
268 | "zenburn"
269 | ];
270 |
271 | $('#themePicker')
272 | .html(options.map(o => ``).join(''))
273 | .val(config.theme || 'default')
274 | .change(e => {
275 | editor.setOption("theme", e.target.value);
276 | chrome.storage.sync.set({
277 | theme: e.target.value
278 | });
279 | });
280 | }
281 | },
282 | {
283 | text: "😂emoji",
284 | className: "emoji",
285 | listener: function(e) {
286 | e.stopPropagation();
287 | $("#emojiBoard").css({top: e.pageY, left: e.pageX}).show();
288 | }
289 | },
290 | {
291 | template:
292 | '🌚斗图',
293 | mounted: function() {
294 | let bqbData = [];
295 | $.get(
296 | `https://raw.githubusercontent.com/zhaoolee/ChineseBQB/master/chinesebqb_github.json`
297 | ).then((res) => {
298 | localStorage.setItem('cnblogs-bqb', res);
299 | const {data, info} = JSON.parse(res);
300 | console.log(info, `${data.length}条数据`);
301 | bqbData = data;
302 | }, (err) => {
303 | const cache = localStorage.getItem('cnblogs-bqb');
304 | if (cache) {
305 | bqbData = JSON.parse(cache).data;
306 | }
307 | })
308 | let search = $("#search");
309 | search.on(
310 | "input",
311 | debounce(function(e) {
312 | if (!e.target.value) {
313 | return;
314 | }
315 |
316 | const matchedBQB = bqbData.filter(data => {
317 | return data.category.match(e.target.value);
318 | })
319 | console.log(matchedBQB.length);
320 | if (matchedBQB.length) {
321 | let html = matchedBQB.slice(0, 30).map(img => {
322 | return `
`;
323 | });
324 | $("#cnblog-md-editor-imgs").html(html);
325 | } else {
326 | $("#cnblog-md-editor-imgs").html('没有数据
');
327 | console.log('未搜索到表情');
328 | }
329 | }, 200)
330 | ).on('keydown', (e) => {
331 | e.preventDefault();
332 | });
333 |
334 | function throttle(fn, delay = 500, context) {
335 | var isLock = false;
336 | return function() {
337 | if (isLock) return;
338 | isLock = true;
339 | let arg = arguments;
340 | setTimeout(function() {
341 | fn.apply(context, arg);
342 | isLock = false;
343 | }, delay);
344 | };
345 | }
346 |
347 | function debounce(fn, delay) {
348 | let timer = null;
349 | return function(...args) {
350 | clearTimeout(timer);
351 | timer = setTimeout(() => {
352 | fn(...args);
353 | }, delay);
354 | }
355 | }
356 |
357 | $("#cnblog-md-editor-imgs").on("click", function(e) {
358 | e.stopPropagation();
359 | if (e.target.nodeName !== "IMG") {
360 | return;
361 | }
362 | let cursor = editor.getCursor();
363 | let imgHtml = `
`; // 默认插入图片是30%
364 | editor.replaceRange(imgHtml, cursor, cursor);
365 | $("#cnblog-md-editor-imgs").addClass("hidden");
366 | });
367 |
368 | $(document.body).click(function() {
369 | $("#cnblog-md-editor-imgs").addClass("hidden");
370 | });
371 | $(".editor-menu").click(function(e) {
372 | e.stopPropagation();
373 | });
374 |
375 | $("#search").on("focus", function() {
376 | $("#cnblog-md-editor-imgs").removeClass("hidden");
377 | });
378 | }
379 | },
380 | {
381 | template:
382 | '🌈字体颜色',
383 | mounted: function() {
384 | // 初始化字体颜色
385 | $('#colorInput').val(config.color);
386 | $("#colorInput").change(function(e) {
387 | setSelectionColor(editor, e.target.value);
388 | // 记住字体颜色
389 | chrome.storage.sync.set({
390 | color: e.target.value
391 | });
392 | });
393 | // 使用上次设置的颜色
394 | $("#colorLabel").click(function() {
395 | setSelectionColor(editor, $('#colorInput').val());
396 | });
397 | }
398 | },
399 | {
400 | text: "🈳️盘古之白",
401 | className: "pangu",
402 | listener: function() {
403 | let md = editor.getValue();
404 | let newMd = pangu.spacing(md);
405 | editor.setValue(newMd);
406 | }
407 | },
408 | {
409 | text: "🧮字数",
410 | className: "word-count"
411 | }
412 | ]);
413 | menu.render();
414 | }
415 |
416 | function initPasteUploadImage(editor) {
417 | // 上传图片 author: cnblogs.com
418 | let $this;
419 | let cursorPosi;
420 | let $textarea = $("#Editor_Edit_EditorBody");
421 |
422 | $.fn.pasteUploadImage = function() {
423 | $this = $(this);
424 | $this.on("paste", function(event) {
425 | let filename, image, pasteEvent, text;
426 | pasteEvent = event.originalEvent;
427 | if (pasteEvent.clipboardData && pasteEvent.clipboardData.items) {
428 | image = isImage(pasteEvent);
429 | if (image) {
430 | event.preventDefault();
431 | filename = getFilename(pasteEvent) || generateFilename();
432 | text = "{{" + filename + "(uploading...)}}";
433 | pasteText(text);
434 | let file = image.getAsFile();
435 | return uploadFile(file, filename, "Paste");
436 | }
437 | }
438 | });
439 | $this.on("drop", function(event) {
440 | let filename, image, pasteEvent, text;
441 | pasteEvent = event.originalEvent;
442 | if (pasteEvent.dataTransfer && pasteEvent.dataTransfer.files) {
443 | image = isImageForDrop(pasteEvent);
444 | if (image) {
445 | event.preventDefault();
446 | filename =
447 | pasteEvent.dataTransfer.files[0].name || generateFilename();
448 | text = "{{" + filename + "(uploading...)}}";
449 | pasteText(text);
450 | return uploadFile(image, filename, "Drop");
451 | }
452 | }
453 | });
454 | };
455 |
456 | $textarea.on("input", function() {
457 | editor.doc.setValue(this.value);
458 | editor.setCursor(cursorPosi);
459 | });
460 |
461 | let pasteText = function(text) {
462 | console.log(text);
463 | let afterSelection, beforeSelection, caretEnd, caretStart, textEnd, posi;
464 | cursorPosi = editor.getCursor();
465 | caretStart = editor.indexFromPos(cursorPosi);
466 | caretEnd = caretStart;
467 | textEnd = $textarea.val().length;
468 | beforeSelection = $textarea.val().substring(0, caretStart);
469 | afterSelection = $textarea.val().substring(caretEnd, textEnd);
470 | $textarea.val(beforeSelection + text + afterSelection);
471 | $textarea
472 | .get(0)
473 | .setSelectionRange(caretStart + text.length, caretEnd + text.length);
474 | return $textarea.trigger("updateEditor", posi);
475 | };
476 |
477 | let isImage = function(data) {
478 | let i, item;
479 | i = 0;
480 | while (i < data.clipboardData.items.length) {
481 | item = data.clipboardData.items[i];
482 | if (item.type.indexOf("image") !== -1) {
483 | return item;
484 | }
485 | i++;
486 | }
487 | return false;
488 | };
489 |
490 | let isImageForDrop = function(data) {
491 | let i, item;
492 | i = 0;
493 | while (i < data.dataTransfer.files.length) {
494 | item = data.dataTransfer.files[i];
495 | if (item.type.indexOf("image") !== -1) {
496 | return item;
497 | }
498 | i++;
499 | }
500 | return false;
501 | };
502 |
503 | let getFilename = function(e) {
504 | let value;
505 | if (window.clipboardData && window.clipboardData.getData) {
506 | value = window.clipboardData.getData("Text");
507 | } else if (e.clipboardData && e.clipboardData.getData) {
508 | value = e.clipboardData.getData("text/plain");
509 | }
510 | value = value.split("\r");
511 | return value[0];
512 | };
513 | // 上传图片
514 | let uploadFile = function(file, filename, uploadType) {
515 | var reader = new FileReader();
516 | reader.onload = function(e) {
517 | // chrome 73之后无法在content scripts中跨域请求
518 | // https://www.chromium.org/Home/chromium-security/extension-content-script-fetches
519 | chrome.runtime.sendMessage(
520 | {
521 | contentScriptQuery: "uploadFile",
522 | file: e.target.result,
523 | filename: filename,
524 | uploadType: uploadType
525 | },
526 | res => {
527 | if (res.success) {
528 | return insertToTextArea(filename, res.message);
529 | }
530 | replaceLoadingTest(filename);
531 | alert("上传失败! " + res.message);
532 | }
533 | );
534 | };
535 | reader.readAsDataURL(file);
536 | };
537 | // 上传文件后将图片地址插入编辑器
538 | let insertToTextArea = function(filename, url) {
539 | return $textarea
540 | .val(function(index, val) {
541 | let re = new RegExp(
542 | String.raw`(${filename})?\{\{${filename}\(uploading...\)\}\}`
543 | );
544 | return val.replace(re, "" + "\n");
545 | })
546 | .trigger("input");
547 | };
548 |
549 | let replaceLoadingTest = function(filename) {
550 | return $textarea
551 | .val(function(index, val) {
552 | return val.replace(
553 | "{{" + filename + "(uploading...)}}",
554 | filename + "\n"
555 | );
556 | })
557 | .trigger("input");
558 | };
559 |
560 | let generateFilename = function() {
561 | return "uploading-image-" + Math.floor(Math.random() * 1000000) + ".png";
562 | };
563 | }
564 |
565 | function updateWordsCounter(str) {
566 | let len = str.replace(/\s|\n|\r/gm, "").length;
567 | document.querySelector(".word-count").textContent = `字数:${len}字`;
568 | }
569 |
570 | function generateToc(md) {
571 | // 过滤掉代码块中的 # 号
572 | md = md.replace(/```[\s\S]*?```/g, "");
573 |
574 | let re = /^\s*(#{1,6})\s+(.+)$/gm;
575 | let tocList = [];
576 |
577 | while (true) {
578 | let match = re.exec(md);
579 | if (!match) break;
580 | tocList.push({
581 | level: match[1].length,
582 | content: match[2].replace("\n", ""),
583 | all: match[0]
584 | });
585 | }
586 |
587 | // 找出最大是几级标题
588 | let minLevel = Math.min(...tocList.map(t => t.level));
589 |
590 | // - [提示](#提示)
591 | let tocStr = tocList
592 | .map(
593 | item =>
594 | " ".repeat(item.level - minLevel) +
595 | "- " +
596 | `[${item.content}](#${item.content})`
597 | )
598 | .join("\n");
599 |
600 | //
601 | for (let t of tocList) {
602 | md = md.replace(
603 | t.all,
604 | `${t.content}\n`
605 | );
606 | }
607 |
608 | let newMd = `#### 目录
609 |
610 | ${tocStr}
611 |
612 | ${md}
613 | `;
614 | return newMd;
615 | }
616 |
617 | function setSelectionColor(editor, color) {
618 | const selection = editor.getSelection();
619 | if (selection) {
620 | editor.replaceSelection(`${selection}`);
621 | }
622 | }
623 |
624 | function Menu(menuItems) {
625 | this.menuList = [];
626 | this.menuItems = menuItems;
627 | if (Array.isArray(menuItems)) {
628 | for (let menu of menuItems) {
629 | this.addMenuItem(menu);
630 | }
631 | }
632 | }
633 |
634 | Menu.prototype.addMenuItem = function({ text, className, listener, template }) {
635 | if (template) {
636 | let menuEl = $(template).click(listener)[0];
637 | this.menuList.push(menuEl);
638 | } else {
639 | let el = document.createElement("span");
640 | el.className = "iconfont " + className;
641 | el.textContent = text;
642 | if (listener) {
643 | el.addEventListener("click", listener.bind(this.el));
644 | }
645 | this.menuList.push(el);
646 | }
647 | };
648 |
649 | Menu.prototype.render = function() {
650 | let div = document.createElement("div");
651 | div.className = "editor-menu";
652 | for (let menu of this.menuList) {
653 | div.appendChild(menu);
654 | }
655 | document.querySelector('[title="上传图片"]').after(div);
656 | for (let menuItem of this.menuItems) {
657 | if (menuItem.mounted) {
658 | menuItem.mounted();
659 | }
660 | }
661 | };
662 |
--------------------------------------------------------------------------------
/app/scripts/mode/gfm.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function(mod) {
5 | if (typeof exports == "object" && typeof module == "object") // CommonJS
6 | mod(require("../../lib/codemirror"), require("../markdown/markdown"), require("../../addon/mode/overlay"));
7 | else if (typeof define == "function" && define.amd) // AMD
8 | define(["../../lib/codemirror", "../markdown/markdown", "../../addon/mode/overlay"], mod);
9 | else // Plain browser env
10 | mod(CodeMirror);
11 | })(function(CodeMirror) {
12 | "use strict";
13 |
14 | var urlRE = /^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i
15 |
16 | CodeMirror.defineMode("gfm", function(config, modeConfig) {
17 | var codeDepth = 0;
18 | function blankLine(state) {
19 | state.code = false;
20 | return null;
21 | }
22 | var gfmOverlay = {
23 | startState: function() {
24 | return {
25 | code: false,
26 | codeBlock: false,
27 | ateSpace: false
28 | };
29 | },
30 | copyState: function(s) {
31 | return {
32 | code: s.code,
33 | codeBlock: s.codeBlock,
34 | ateSpace: s.ateSpace
35 | };
36 | },
37 | token: function(stream, state) {
38 | state.combineTokens = null;
39 |
40 | // Hack to prevent formatting override inside code blocks (block and inline)
41 | if (state.codeBlock) {
42 | if (stream.match(/^```+/)) {
43 | state.codeBlock = false;
44 | return null;
45 | }
46 | stream.skipToEnd();
47 | return null;
48 | }
49 | if (stream.sol()) {
50 | state.code = false;
51 | }
52 | if (stream.sol() && stream.match(/^```+/)) {
53 | stream.skipToEnd();
54 | state.codeBlock = true;
55 | return null;
56 | }
57 | // If this block is changed, it may need to be updated in Markdown mode
58 | if (stream.peek() === '`') {
59 | stream.next();
60 | var before = stream.pos;
61 | stream.eatWhile('`');
62 | var difference = 1 + stream.pos - before;
63 | if (!state.code) {
64 | codeDepth = difference;
65 | state.code = true;
66 | } else {
67 | if (difference === codeDepth) { // Must be exact
68 | state.code = false;
69 | }
70 | }
71 | return null;
72 | } else if (state.code) {
73 | stream.next();
74 | return null;
75 | }
76 | // Check if space. If so, links can be formatted later on
77 | if (stream.eatSpace()) {
78 | state.ateSpace = true;
79 | return null;
80 | }
81 | if (stream.sol() || state.ateSpace) {
82 | state.ateSpace = false;
83 | if (modeConfig.gitHubSpice !== false) {
84 | if(stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/)) {
85 | // User/Project@SHA
86 | // User@SHA
87 | // SHA
88 | state.combineTokens = true;
89 | return "link";
90 | } else if (stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/)) {
91 | // User/Project#Num
92 | // User#Num
93 | // #Num
94 | state.combineTokens = true;
95 | return "link";
96 | }
97 | }
98 | }
99 | if (stream.match(urlRE) &&
100 | stream.string.slice(stream.start - 2, stream.start) != "](" &&
101 | (stream.start == 0 || /\W/.test(stream.string.charAt(stream.start - 1)))) {
102 | // URLs
103 | // Taken from http://daringfireball.net/2010/07/improved_regex_for_matching_urls
104 | // And then (issue #1160) simplified to make it not crash the Chrome Regexp engine
105 | // And then limited url schemes to the CommonMark list, so foo:bar isn't matched as a URL
106 | state.combineTokens = true;
107 | return "link";
108 | }
109 | stream.next();
110 | return null;
111 | },
112 | blankLine: blankLine
113 | };
114 |
115 | var markdownConfig = {
116 | taskLists: true,
117 | strikethrough: true,
118 | emoji: true
119 | };
120 | for (var attr in modeConfig) {
121 | markdownConfig[attr] = modeConfig[attr];
122 | }
123 | markdownConfig.name = "markdown";
124 | return CodeMirror.overlayMode(CodeMirror.getMode(config, markdownConfig), gfmOverlay);
125 |
126 | }, "markdown");
127 |
128 | CodeMirror.defineMIME("text/x-gfm", "gfm");
129 | });
--------------------------------------------------------------------------------
/app/scripts/mode/html.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function(mod) {
5 | if (typeof exports == "object" && typeof module == "object") // CommonJS
6 | mod(require("../../lib/codemirror"), require("../xml/xml"), require("../javascript/javascript"), require("../css/css"));
7 | else if (typeof define == "function" && define.amd) // AMD
8 | define(["../../lib/codemirror", "../xml/xml", "../javascript/javascript", "../css/css"], mod);
9 | else // Plain browser env
10 | mod(CodeMirror);
11 | })(function(CodeMirror) {
12 | "use strict";
13 |
14 | var defaultTags = {
15 | script: [
16 | ["lang", /(javascript|babel)/i, "javascript"],
17 | ["type", /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i, "javascript"],
18 | ["type", /./, "text/plain"],
19 | [null, null, "javascript"]
20 | ],
21 | style: [
22 | ["lang", /^css$/i, "css"],
23 | ["type", /^(text\/)?(x-)?(stylesheet|css)$/i, "css"],
24 | ["type", /./, "text/plain"],
25 | [null, null, "css"]
26 | ]
27 | };
28 |
29 | function maybeBackup(stream, pat, style) {
30 | var cur = stream.current(), close = cur.search(pat);
31 | if (close > -1) {
32 | stream.backUp(cur.length - close);
33 | } else if (cur.match(/<\/?$/)) {
34 | stream.backUp(cur.length);
35 | if (!stream.match(pat, false)) stream.match(cur);
36 | }
37 | return style;
38 | }
39 |
40 | var attrRegexpCache = {};
41 | function getAttrRegexp(attr) {
42 | var regexp = attrRegexpCache[attr];
43 | if (regexp) return regexp;
44 | return attrRegexpCache[attr] = new RegExp("\\s+" + attr + "\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*");
45 | }
46 |
47 | function getAttrValue(text, attr) {
48 | var match = text.match(getAttrRegexp(attr))
49 | return match ? /^\s*(.*?)\s*$/.exec(match[2])[1] : ""
50 | }
51 |
52 | function getTagRegexp(tagName, anchored) {
53 | return new RegExp((anchored ? "^" : "") + "<\/\s*" + tagName + "\s*>", "i");
54 | }
55 |
56 | function addTags(from, to) {
57 | for (var tag in from) {
58 | var dest = to[tag] || (to[tag] = []);
59 | var source = from[tag];
60 | for (var i = source.length - 1; i >= 0; i--)
61 | dest.unshift(source[i])
62 | }
63 | }
64 |
65 | function findMatchingMode(tagInfo, tagText) {
66 | for (var i = 0; i < tagInfo.length; i++) {
67 | var spec = tagInfo[i];
68 | if (!spec[0] || spec[1].test(getAttrValue(tagText, spec[0]))) return spec[2];
69 | }
70 | }
71 |
72 | CodeMirror.defineMode("htmlmixed", function (config, parserConfig) {
73 | var htmlMode = CodeMirror.getMode(config, {
74 | name: "xml",
75 | htmlMode: true,
76 | multilineTagIndentFactor: parserConfig.multilineTagIndentFactor,
77 | multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag
78 | });
79 |
80 | var tags = {};
81 | var configTags = parserConfig && parserConfig.tags, configScript = parserConfig && parserConfig.scriptTypes;
82 | addTags(defaultTags, tags);
83 | if (configTags) addTags(configTags, tags);
84 | if (configScript) for (var i = configScript.length - 1; i >= 0; i--)
85 | tags.script.unshift(["type", configScript[i].matches, configScript[i].mode])
86 |
87 | function html(stream, state) {
88 | var style = htmlMode.token(stream, state.htmlState), tag = /\btag\b/.test(style), tagName
89 | if (tag && !/[<>\s\/]/.test(stream.current()) &&
90 | (tagName = state.htmlState.tagName && state.htmlState.tagName.toLowerCase()) &&
91 | tags.hasOwnProperty(tagName)) {
92 | state.inTag = tagName + " "
93 | } else if (state.inTag && tag && />$/.test(stream.current())) {
94 | var inTag = /^([\S]+) (.*)/.exec(state.inTag)
95 | state.inTag = null
96 | var modeSpec = stream.current() == ">" && findMatchingMode(tags[inTag[1]], inTag[2])
97 | var mode = CodeMirror.getMode(config, modeSpec)
98 | var endTagA = getTagRegexp(inTag[1], true), endTag = getTagRegexp(inTag[1], false);
99 | state.token = function (stream, state) {
100 | if (stream.match(endTagA, false)) {
101 | state.token = html;
102 | state.localState = state.localMode = null;
103 | return null;
104 | }
105 | return maybeBackup(stream, endTag, state.localMode.token(stream, state.localState));
106 | };
107 | state.localMode = mode;
108 | state.localState = CodeMirror.startState(mode, htmlMode.indent(state.htmlState, ""));
109 | } else if (state.inTag) {
110 | state.inTag += stream.current()
111 | if (stream.eol()) state.inTag += " "
112 | }
113 | return style;
114 | };
115 |
116 | return {
117 | startState: function () {
118 | var state = CodeMirror.startState(htmlMode);
119 | return {token: html, inTag: null, localMode: null, localState: null, htmlState: state};
120 | },
121 |
122 | copyState: function (state) {
123 | var local;
124 | if (state.localState) {
125 | local = CodeMirror.copyState(state.localMode, state.localState);
126 | }
127 | return {token: state.token, inTag: state.inTag,
128 | localMode: state.localMode, localState: local,
129 | htmlState: CodeMirror.copyState(htmlMode, state.htmlState)};
130 | },
131 |
132 | token: function (stream, state) {
133 | return state.token(stream, state);
134 | },
135 |
136 | indent: function (state, textAfter, line) {
137 | if (!state.localMode || /^\s*<\//.test(textAfter))
138 | return htmlMode.indent(state.htmlState, textAfter);
139 | else if (state.localMode.indent)
140 | return state.localMode.indent(state.localState, textAfter, line);
141 | else
142 | return CodeMirror.Pass;
143 | },
144 |
145 | innerMode: function (state) {
146 | return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode};
147 | }
148 | };
149 | }, "xml", "javascript", "css");
150 |
151 | CodeMirror.defineMIME("text/html", "htmlmixed");
152 | });
--------------------------------------------------------------------------------
/app/scripts/mode/overlay.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | // Utility function that allows modes to be combined. The mode given
5 | // as the base argument takes care of most of the normal mode
6 | // functionality, but a second (typically simple) mode is used, which
7 | // can override the style of text. Both modes get to parse all of the
8 | // text, but when both assign a non-null style to a piece of code, the
9 | // overlay wins, unless the combine argument was true and not overridden,
10 | // or state.overlay.combineTokens was true, in which case the styles are
11 | // combined.
12 |
13 | (function(mod) {
14 | if (typeof exports == "object" && typeof module == "object") // CommonJS
15 | mod(require("../../lib/codemirror"));
16 | else if (typeof define == "function" && define.amd) // AMD
17 | define(["../../lib/codemirror"], mod);
18 | else // Plain browser env
19 | mod(CodeMirror);
20 | })(function(CodeMirror) {
21 | "use strict";
22 |
23 | CodeMirror.overlayMode = function(base, overlay, combine) {
24 | return {
25 | startState: function() {
26 | return {
27 | base: CodeMirror.startState(base),
28 | overlay: CodeMirror.startState(overlay),
29 | basePos: 0, baseCur: null,
30 | overlayPos: 0, overlayCur: null,
31 | streamSeen: null
32 | };
33 | },
34 | copyState: function(state) {
35 | return {
36 | base: CodeMirror.copyState(base, state.base),
37 | overlay: CodeMirror.copyState(overlay, state.overlay),
38 | basePos: state.basePos, baseCur: null,
39 | overlayPos: state.overlayPos, overlayCur: null
40 | };
41 | },
42 |
43 | token: function(stream, state) {
44 | if (stream != state.streamSeen ||
45 | Math.min(state.basePos, state.overlayPos) < stream.start) {
46 | state.streamSeen = stream;
47 | state.basePos = state.overlayPos = stream.start;
48 | }
49 |
50 | if (stream.start == state.basePos) {
51 | state.baseCur = base.token(stream, state.base);
52 | state.basePos = stream.pos;
53 | }
54 | if (stream.start == state.overlayPos) {
55 | stream.pos = stream.start;
56 | state.overlayCur = overlay.token(stream, state.overlay);
57 | state.overlayPos = stream.pos;
58 | }
59 | stream.pos = Math.min(state.basePos, state.overlayPos);
60 |
61 | // state.overlay.combineTokens always takes precedence over combine,
62 | // unless set to null
63 | if (state.overlayCur == null) return state.baseCur;
64 | else if (state.baseCur != null &&
65 | state.overlay.combineTokens ||
66 | combine && state.overlay.combineTokens == null)
67 | return state.baseCur + " " + state.overlayCur;
68 | else return state.overlayCur;
69 | },
70 |
71 | indent: base.indent && function(state, textAfter, line) {
72 | return base.indent(state.base, textAfter, line);
73 | },
74 | electricChars: base.electricChars,
75 |
76 | innerMode: function(state) { return {state: state.base, mode: base}; },
77 |
78 | blankLine: function(state) {
79 | var baseToken, overlayToken;
80 | if (base.blankLine) baseToken = base.blankLine(state.base);
81 | if (overlay.blankLine) overlayToken = overlay.blankLine(state.overlay);
82 |
83 | return overlayToken == null ?
84 | baseToken :
85 | (combine && baseToken != null ? baseToken + " " + overlayToken : overlayToken);
86 | }
87 | };
88 | };
89 |
90 | });
--------------------------------------------------------------------------------
/app/scripts/mode/xml.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function(mod) {
5 | if (typeof exports == "object" && typeof module == "object") // CommonJS
6 | mod(require("../../lib/codemirror"));
7 | else if (typeof define == "function" && define.amd) // AMD
8 | define(["../../lib/codemirror"], mod);
9 | else // Plain browser env
10 | mod(CodeMirror);
11 | })(function(CodeMirror) {
12 | "use strict";
13 |
14 | var htmlConfig = {
15 | autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,
16 | 'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,
17 | 'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,
18 | 'track': true, 'wbr': true, 'menuitem': true},
19 | implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,
20 | 'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,
21 | 'th': true, 'tr': true},
22 | contextGrabbers: {
23 | 'dd': {'dd': true, 'dt': true},
24 | 'dt': {'dd': true, 'dt': true},
25 | 'li': {'li': true},
26 | 'option': {'option': true, 'optgroup': true},
27 | 'optgroup': {'optgroup': true},
28 | 'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,
29 | 'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,
30 | 'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,
31 | 'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,
32 | 'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},
33 | 'rp': {'rp': true, 'rt': true},
34 | 'rt': {'rp': true, 'rt': true},
35 | 'tbody': {'tbody': true, 'tfoot': true},
36 | 'td': {'td': true, 'th': true},
37 | 'tfoot': {'tbody': true},
38 | 'th': {'td': true, 'th': true},
39 | 'thead': {'tbody': true, 'tfoot': true},
40 | 'tr': {'tr': true}
41 | },
42 | doNotIndent: {"pre": true},
43 | allowUnquoted: true,
44 | allowMissing: true,
45 | caseFold: true
46 | }
47 |
48 | var xmlConfig = {
49 | autoSelfClosers: {},
50 | implicitlyClosed: {},
51 | contextGrabbers: {},
52 | doNotIndent: {},
53 | allowUnquoted: false,
54 | allowMissing: false,
55 | allowMissingTagName: false,
56 | caseFold: false
57 | }
58 |
59 | CodeMirror.defineMode("xml", function(editorConf, config_) {
60 | var indentUnit = editorConf.indentUnit
61 | var config = {}
62 | var defaults = config_.htmlMode ? htmlConfig : xmlConfig
63 | for (var prop in defaults) config[prop] = defaults[prop]
64 | for (var prop in config_) config[prop] = config_[prop]
65 |
66 | // Return variables for tokenizers
67 | var type, setStyle;
68 |
69 | function inText(stream, state) {
70 | function chain(parser) {
71 | state.tokenize = parser;
72 | return parser(stream, state);
73 | }
74 |
75 | var ch = stream.next();
76 | if (ch == "<") {
77 | if (stream.eat("!")) {
78 | if (stream.eat("[")) {
79 | if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>"));
80 | else return null;
81 | } else if (stream.match("--")) {
82 | return chain(inBlock("comment", "-->"));
83 | } else if (stream.match("DOCTYPE", true, true)) {
84 | stream.eatWhile(/[\w\._\-]/);
85 | return chain(doctype(1));
86 | } else {
87 | return null;
88 | }
89 | } else if (stream.eat("?")) {
90 | stream.eatWhile(/[\w\._\-]/);
91 | state.tokenize = inBlock("meta", "?>");
92 | return "meta";
93 | } else {
94 | type = stream.eat("/") ? "closeTag" : "openTag";
95 | state.tokenize = inTag;
96 | return "tag bracket";
97 | }
98 | } else if (ch == "&") {
99 | var ok;
100 | if (stream.eat("#")) {
101 | if (stream.eat("x")) {
102 | ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";");
103 | } else {
104 | ok = stream.eatWhile(/[\d]/) && stream.eat(";");
105 | }
106 | } else {
107 | ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";");
108 | }
109 | return ok ? "atom" : "error";
110 | } else {
111 | stream.eatWhile(/[^&<]/);
112 | return null;
113 | }
114 | }
115 | inText.isInText = true;
116 |
117 | function inTag(stream, state) {
118 | var ch = stream.next();
119 | if (ch == ">" || (ch == "/" && stream.eat(">"))) {
120 | state.tokenize = inText;
121 | type = ch == ">" ? "endTag" : "selfcloseTag";
122 | return "tag bracket";
123 | } else if (ch == "=") {
124 | type = "equals";
125 | return null;
126 | } else if (ch == "<") {
127 | state.tokenize = inText;
128 | state.state = baseState;
129 | state.tagName = state.tagStart = null;
130 | var next = state.tokenize(stream, state);
131 | return next ? next + " tag error" : "tag error";
132 | } else if (/[\'\"]/.test(ch)) {
133 | state.tokenize = inAttribute(ch);
134 | state.stringStartCol = stream.column();
135 | return state.tokenize(stream, state);
136 | } else {
137 | stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);
138 | return "word";
139 | }
140 | }
141 |
142 | function inAttribute(quote) {
143 | var closure = function(stream, state) {
144 | while (!stream.eol()) {
145 | if (stream.next() == quote) {
146 | state.tokenize = inTag;
147 | break;
148 | }
149 | }
150 | return "string";
151 | };
152 | closure.isInAttribute = true;
153 | return closure;
154 | }
155 |
156 | function inBlock(style, terminator) {
157 | return function(stream, state) {
158 | while (!stream.eol()) {
159 | if (stream.match(terminator)) {
160 | state.tokenize = inText;
161 | break;
162 | }
163 | stream.next();
164 | }
165 | return style;
166 | }
167 | }
168 |
169 | function doctype(depth) {
170 | return function(stream, state) {
171 | var ch;
172 | while ((ch = stream.next()) != null) {
173 | if (ch == "<") {
174 | state.tokenize = doctype(depth + 1);
175 | return state.tokenize(stream, state);
176 | } else if (ch == ">") {
177 | if (depth == 1) {
178 | state.tokenize = inText;
179 | break;
180 | } else {
181 | state.tokenize = doctype(depth - 1);
182 | return state.tokenize(stream, state);
183 | }
184 | }
185 | }
186 | return "meta";
187 | };
188 | }
189 |
190 | function Context(state, tagName, startOfLine) {
191 | this.prev = state.context;
192 | this.tagName = tagName;
193 | this.indent = state.indented;
194 | this.startOfLine = startOfLine;
195 | if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))
196 | this.noIndent = true;
197 | }
198 | function popContext(state) {
199 | if (state.context) state.context = state.context.prev;
200 | }
201 | function maybePopContext(state, nextTagName) {
202 | var parentTagName;
203 | while (true) {
204 | if (!state.context) {
205 | return;
206 | }
207 | parentTagName = state.context.tagName;
208 | if (!config.contextGrabbers.hasOwnProperty(parentTagName) ||
209 | !config.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {
210 | return;
211 | }
212 | popContext(state);
213 | }
214 | }
215 |
216 | function baseState(type, stream, state) {
217 | if (type == "openTag") {
218 | state.tagStart = stream.column();
219 | return tagNameState;
220 | } else if (type == "closeTag") {
221 | return closeTagNameState;
222 | } else {
223 | return baseState;
224 | }
225 | }
226 | function tagNameState(type, stream, state) {
227 | if (type == "word") {
228 | state.tagName = stream.current();
229 | setStyle = "tag";
230 | return attrState;
231 | } else if (config.allowMissingTagName && type == "endTag") {
232 | setStyle = "tag bracket";
233 | return attrState(type, stream, state);
234 | } else {
235 | setStyle = "error";
236 | return tagNameState;
237 | }
238 | }
239 | function closeTagNameState(type, stream, state) {
240 | if (type == "word") {
241 | var tagName = stream.current();
242 | if (state.context && state.context.tagName != tagName &&
243 | config.implicitlyClosed.hasOwnProperty(state.context.tagName))
244 | popContext(state);
245 | if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {
246 | setStyle = "tag";
247 | return closeState;
248 | } else {
249 | setStyle = "tag error";
250 | return closeStateErr;
251 | }
252 | } else if (config.allowMissingTagName && type == "endTag") {
253 | setStyle = "tag bracket";
254 | return closeState(type, stream, state);
255 | } else {
256 | setStyle = "error";
257 | return closeStateErr;
258 | }
259 | }
260 |
261 | function closeState(type, _stream, state) {
262 | if (type != "endTag") {
263 | setStyle = "error";
264 | return closeState;
265 | }
266 | popContext(state);
267 | return baseState;
268 | }
269 | function closeStateErr(type, stream, state) {
270 | setStyle = "error";
271 | return closeState(type, stream, state);
272 | }
273 |
274 | function attrState(type, _stream, state) {
275 | if (type == "word") {
276 | setStyle = "attribute";
277 | return attrEqState;
278 | } else if (type == "endTag" || type == "selfcloseTag") {
279 | var tagName = state.tagName, tagStart = state.tagStart;
280 | state.tagName = state.tagStart = null;
281 | if (type == "selfcloseTag" ||
282 | config.autoSelfClosers.hasOwnProperty(tagName)) {
283 | maybePopContext(state, tagName);
284 | } else {
285 | maybePopContext(state, tagName);
286 | state.context = new Context(state, tagName, tagStart == state.indented);
287 | }
288 | return baseState;
289 | }
290 | setStyle = "error";
291 | return attrState;
292 | }
293 | function attrEqState(type, stream, state) {
294 | if (type == "equals") return attrValueState;
295 | if (!config.allowMissing) setStyle = "error";
296 | return attrState(type, stream, state);
297 | }
298 | function attrValueState(type, stream, state) {
299 | if (type == "string") return attrContinuedState;
300 | if (type == "word" && config.allowUnquoted) {setStyle = "string"; return attrState;}
301 | setStyle = "error";
302 | return attrState(type, stream, state);
303 | }
304 | function attrContinuedState(type, stream, state) {
305 | if (type == "string") return attrContinuedState;
306 | return attrState(type, stream, state);
307 | }
308 |
309 | return {
310 | startState: function(baseIndent) {
311 | var state = {tokenize: inText,
312 | state: baseState,
313 | indented: baseIndent || 0,
314 | tagName: null, tagStart: null,
315 | context: null}
316 | if (baseIndent != null) state.baseIndent = baseIndent
317 | return state
318 | },
319 |
320 | token: function(stream, state) {
321 | if (!state.tagName && stream.sol())
322 | state.indented = stream.indentation();
323 |
324 | if (stream.eatSpace()) return null;
325 | type = null;
326 | var style = state.tokenize(stream, state);
327 | if ((style || type) && style != "comment") {
328 | setStyle = null;
329 | state.state = state.state(type || style, stream, state);
330 | if (setStyle)
331 | style = setStyle == "error" ? style + " error" : setStyle;
332 | }
333 | return style;
334 | },
335 |
336 | indent: function(state, textAfter, fullLine) {
337 | var context = state.context;
338 | // Indent multi-line strings (e.g. css).
339 | if (state.tokenize.isInAttribute) {
340 | if (state.tagStart == state.indented)
341 | return state.stringStartCol + 1;
342 | else
343 | return state.indented + indentUnit;
344 | }
345 | if (context && context.noIndent) return CodeMirror.Pass;
346 | if (state.tokenize != inTag && state.tokenize != inText)
347 | return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0;
348 | // Indent the starts of attribute names.
349 | if (state.tagName) {
350 | if (config.multilineTagIndentPastTag !== false)
351 | return state.tagStart + state.tagName.length + 2;
352 | else
353 | return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1);
354 | }
355 | if (config.alignCDATA && /$/,
384 | blockCommentStart: "",
386 |
387 | configuration: config.htmlMode ? "html" : "xml",
388 | helperType: config.htmlMode ? "html" : "xml",
389 |
390 | skipAttribute: function(state) {
391 | if (state.state == attrValueState)
392 | state.state = attrState
393 | }
394 | };
395 | });
396 |
397 | CodeMirror.defineMIME("text/xml", "xml");
398 | CodeMirror.defineMIME("application/xml", "xml");
399 | if (!CodeMirror.mimeModes.hasOwnProperty("text/html"))
400 | CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true});
401 |
402 | });
403 |
--------------------------------------------------------------------------------
/app/scripts/options.js:
--------------------------------------------------------------------------------
1 | chrome.storage.sync.get({
2 | theme: 'dark',
3 | fontSize: 14
4 | },function(items) {
5 | current.innerHTML = items.theme || 1;
6 | ft.textContent = items.fontSize;
7 | document.getElementById('theme').value = items.theme;
8 | document.getElementById('fontsize').value = items.fontSize;
9 | });
10 | document.getElementById('theme').onchange = function(){
11 | current.innerHTML = this.value;
12 | chrome.storage.sync.set({
13 | theme: this.value
14 | });
15 | };
16 | document.getElementById('fontsize').onchange = function(){
17 | ft.textContent = this.value;
18 | chrome.storage.sync.set({
19 | fontSize: this.value
20 | });
21 | };
--------------------------------------------------------------------------------
/app/scripts/popup.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | console.log('\'Allo \'Allo! Popup');
--------------------------------------------------------------------------------
/app/scripts/sort.js:
--------------------------------------------------------------------------------
1 | //https://www.cnblogs.com/
2 | /**
3 | * 用于支持首页博文的排序功能
4 | * 支持按推荐/ 按阅读量/ 按评论量/ 按默认排序
5 | */
6 | (function() {
7 | let isHomePage = /^https:\/\/www\.cnblogs\.com\/#?/.test(window.location.href);
8 | if (isHomePage) {
9 | let $postList = $('#post_list');
10 | let dftHTML;
11 |
12 | $postList.before(`
13 | 按推荐
14 | 按阅读
15 |
16 | 按默认
17 | ⇅
18 |
`);
19 |
20 | if ($('#tips_block').length === 1) {
21 | // 加载状态
22 | setDefaultHTML();
23 | } else {
24 | // 博文加载完毕
25 | dftHTML = $postList.html();
26 | }
27 | window.onhashchange = function(){
28 | setDefaultHTML();
29 | $('.sorter .dft').addClass('active');
30 | $('.sorter .btn:not(.dft)').removeClass('active');
31 | };
32 |
33 | function setDefaultHTML(){
34 | let timer = setInterval(function() {
35 | let postLength = $('#post_list .post_item').length;
36 | if (postLength > 0) {
37 | dftHTML = $postList.html();
38 | clearInterval(timer);
39 | }
40 | }, 100);
41 | }
42 |
43 | // 按推荐排序
44 | $('.sorter .recommend').click(function() {
45 | let sortFunction = (el1, el2) => $(el2).find('.diggnum').text() - $(el1).find('.diggnum').text();
46 | sort(sortFunction);
47 | });
48 |
49 | // 按阅读量排序
50 | $('.sorter .read').click(function() {
51 | function sortFunction(el1, el2) {
52 | let read_el1 = $(el1).find('.article_view>a');
53 | let read_el2 = $(el2).find('.article_view>a');
54 | return read_el2.text().trim().slice(3, -1) - read_el1.text().trim().slice(3, -1);
55 | };
56 | sort(sortFunction);
57 | });
58 |
59 | // 按评论排序
60 | $('.sorter .comment').click(function() {
61 | function sortFunction(el1, el2) {
62 | let comment_el1 = $(el1).find('.article_comment>.gray');
63 | let comment_el2 = $(el2).find('.article_comment>.gray');
64 | return comment_el2.text().trim().slice(3, -1) - comment_el1.text().trim().slice(3, -1);
65 | };
66 | sort(sortFunction);
67 | });
68 |
69 | // 默认排序
70 | $('.sorter .dft').click(function() {
71 | $postList.html(dftHTML);
72 | });
73 |
74 | $('.sorter').on('click', '.btn:not(.void)', function(e){
75 | $('.sorter .btn').each(function(i, el) {
76 | el.classList.remove('active');
77 | });
78 | $(this).addClass('active');
79 | });
80 | }
81 | function sort(sortFunction) {
82 | let $0 = document.getElementById('post_list');
83 | $0.innerHTML = Array.from($0.children).sort(sortFunction).map(el => el.outerHTML).join('');
84 | }
85 | })();
86 |
--------------------------------------------------------------------------------
/app/styles/codemirror.css:
--------------------------------------------------------------------------------
1 | /* CodeMirror v5.0 | CodeMirror, copyright (c) by Marijn Haverbeke and others | Distributed under an MIT license: http://codemirror.net/LICENSE */
2 | .CodeMirror{font-family:-apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', 'Ubuntu', 'Droid Sans', sans-serif;font-size:14px;height:500px;color:black}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror .CodeMirror-cursor{border-left:1px solid black}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.CodeMirror.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}@-moz-keyframes blink{0%{background:#7e7}50%{background:0}100%{background:#7e7}}@-webkit-keyframes blink{0%{background:#7e7}50%{background:0}100%{background:#7e7}}@keyframes blink{0%{background:#7e7}50%{background:0}100%{background:#7e7}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative;-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-sizer{position:relative;border-right:30px solid transparent;-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;-moz-box-sizing:content-box;box-sizing:content-box;display:inline-block;margin-bottom:-30px;*zoom:1;*display:inline}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;height:100%}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper{-webkit-user-select:none;-moz-user-select:none;user-select:none}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:0}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;border-right:0;width:0}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror ::selection{background:#d7d4f0}.CodeMirror ::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.CodeMirror span{*vertical-align:text-bottom}.cm-force-border{padding-right:.1px}
3 | @media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0}
4 |
--------------------------------------------------------------------------------
/app/styles/style.css:
--------------------------------------------------------------------------------
1 |
2 | .iconfont {
3 | cursor: pointer;
4 | font-size: 16px;
5 | white-space: nowrap;
6 | margin-left: 10px;
7 | cursor: pointer;
8 | user-select: none;
9 | }
10 |
11 | .iconfont:hover{
12 | color: #CC0066;
13 | }
14 |
15 | #cnblog-md-editor-imgs{
16 | display: flex;
17 | flex-wrap: wrap;
18 | width: 320px;
19 | height: 200px;
20 | left: 0;
21 | overflow: scroll;
22 | position: absolute;
23 | z-index: 999;
24 | background: #fff;
25 | box-shadow: 1px 1px 4px #aeaeae;
26 | }
27 |
28 | #cnblog-md-editor-imgs.hidden{
29 | display: none;
30 | }
31 |
32 | .iconfont.doutu{
33 | position: relative;
34 | }
35 |
36 | span#cnblog-md-editor-imgs img {
37 | width: 70px;
38 | height: 70px;
39 | padding: 5px;
40 | }
41 |
42 | #emojiBoard{
43 | font-size: 20px;
44 | width: 200px;
45 | overflow-x: scroll;
46 | padding: 10px 40px;
47 | background: #fff;
48 | z-index:99999;
49 | border-radius: 12px;
50 | white-space: nowrap;
51 | position: absolute;
52 | }
53 | #emojiBoard span{
54 | padding: 10px;
55 | cursor: pointer;
56 | }
57 |
58 | #search{
59 | width: 80px;
60 | transition: width 0.3s ease;
61 | border: none;
62 | padding: 0 5px;
63 | }
64 | #search:focus{
65 | width: 100px;
66 | border: none;
67 | outline: none;
68 | }
69 | /* 排序模块css */
70 | .sorter{
71 | margin-top: 5px;
72 | margin-bottom: 5px;
73 |
74 | }
75 | .sorter > .btn{
76 | display: inline-block;
77 | padding: 6px 12px;
78 | margin-bottom: 0;
79 | font-size: 14px;
80 | font-weight: 400;
81 | line-height: 1.42857143;
82 | text-align: center;
83 | white-space: nowrap;
84 | vertical-align: middle;
85 | -ms-touch-action: manipulation;
86 | touch-action: manipulation;
87 | cursor: pointer;
88 | -webkit-user-select: none;
89 | -moz-user-select: none;
90 | -ms-user-select: none;
91 | user-select: none;
92 | background-image: none;
93 | border: 1px solid transparent;
94 | color: #333;
95 | background-color: #fff;
96 | border-color: #ccc;
97 | margin-left: -5px;
98 | }
99 | .sorter > .btn.active{
100 | background-color: #e6e6e6;
101 | }
102 | .sorter .btn:first-child{
103 | border-top-left-radius: 4px;
104 | border-bottom-left-radius: 4px;
105 | }
106 | .sorter .btn:last-child{
107 | border-top-right-radius: 4px;
108 | border-bottom-right-radius: 4px;
109 | }
110 | .sorter > .btn:hover{
111 | background-color: #e6e6e6;
112 | border-color: #adadad;
113 | }
114 |
115 | .menu{
116 | background: #fff;
117 | padding: 0 10px;
118 | color: #4a4a4a;
119 | z-index: 999;
120 | border-radius: 6px;
121 | }
122 | .menu li{
123 | list-style: none;
124 | cursor: pointer;
125 | }
--------------------------------------------------------------------------------
/app/styles/theme/3024-night.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: 3024 night
4 | Author: Jan T. Sott (http://github.com/idleberg)
5 |
6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
8 |
9 | */
10 |
11 | .cm-s-3024-night.CodeMirror { background: #090300; color: #d6d5d4; }
12 | .cm-s-3024-night div.CodeMirror-selected { background: #3a3432; }
13 | .cm-s-3024-night .CodeMirror-line::selection, .cm-s-3024-night .CodeMirror-line > span::selection, .cm-s-3024-night .CodeMirror-line > span > span::selection { background: rgba(58, 52, 50, .99); }
14 | .cm-s-3024-night .CodeMirror-line::-moz-selection, .cm-s-3024-night .CodeMirror-line > span::-moz-selection, .cm-s-3024-night .CodeMirror-line > span > span::-moz-selection { background: rgba(58, 52, 50, .99); }
15 | .cm-s-3024-night .CodeMirror-gutters { background: #090300; border-right: 0px; }
16 | .cm-s-3024-night .CodeMirror-guttermarker { color: #db2d20; }
17 | .cm-s-3024-night .CodeMirror-guttermarker-subtle { color: #5c5855; }
18 | .cm-s-3024-night .CodeMirror-linenumber { color: #5c5855; }
19 |
20 | .cm-s-3024-night .CodeMirror-cursor { border-left: 1px solid #807d7c; }
21 |
22 | .cm-s-3024-night span.cm-comment { color: #cdab53; }
23 | .cm-s-3024-night span.cm-atom { color: #a16a94; }
24 | .cm-s-3024-night span.cm-number { color: #a16a94; }
25 |
26 | .cm-s-3024-night span.cm-property, .cm-s-3024-night span.cm-attribute { color: #01a252; }
27 | .cm-s-3024-night span.cm-keyword { color: #db2d20; }
28 | .cm-s-3024-night span.cm-string { color: #fded02; }
29 |
30 | .cm-s-3024-night span.cm-variable { color: #01a252; }
31 | .cm-s-3024-night span.cm-variable-2 { color: #01a0e4; }
32 | .cm-s-3024-night span.cm-def { color: #e8bbd0; }
33 | .cm-s-3024-night span.cm-bracket { color: #d6d5d4; }
34 | .cm-s-3024-night span.cm-tag { color: #db2d20; }
35 | .cm-s-3024-night span.cm-link { color: #a16a94; }
36 | .cm-s-3024-night span.cm-error { background: #db2d20; color: #807d7c; }
37 |
38 | .cm-s-3024-night .CodeMirror-activeline-background { background: #2F2F2F; }
39 | .cm-s-3024-night .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
40 |
--------------------------------------------------------------------------------
/app/styles/theme/abcdef.css:
--------------------------------------------------------------------------------
1 | .cm-s-abcdef.CodeMirror { background: #0f0f0f; color: #defdef; }
2 | .cm-s-abcdef div.CodeMirror-selected { background: #515151; }
3 | .cm-s-abcdef .CodeMirror-line::selection, .cm-s-abcdef .CodeMirror-line > span::selection, .cm-s-abcdef .CodeMirror-line > span > span::selection { background: rgba(56, 56, 56, 0.99); }
4 | .cm-s-abcdef .CodeMirror-line::-moz-selection, .cm-s-abcdef .CodeMirror-line > span::-moz-selection, .cm-s-abcdef .CodeMirror-line > span > span::-moz-selection { background: rgba(56, 56, 56, 0.99); }
5 | .cm-s-abcdef .CodeMirror-gutters { background: #555; border-right: 2px solid #314151; }
6 | .cm-s-abcdef .CodeMirror-guttermarker { color: #222; }
7 | .cm-s-abcdef .CodeMirror-guttermarker-subtle { color: azure; }
8 | .cm-s-abcdef .CodeMirror-linenumber { color: #FFFFFF; }
9 | .cm-s-abcdef .CodeMirror-cursor { border-left: 1px solid #00FF00; }
10 |
11 | .cm-s-abcdef span.cm-keyword { color: darkgoldenrod; font-weight: bold; }
12 | .cm-s-abcdef span.cm-atom { color: #77F; }
13 | .cm-s-abcdef span.cm-number { color: violet; }
14 | .cm-s-abcdef span.cm-def { color: #fffabc; }
15 | .cm-s-abcdef span.cm-variable { color: #abcdef; }
16 | .cm-s-abcdef span.cm-variable-2 { color: #cacbcc; }
17 | .cm-s-abcdef span.cm-variable-3, .cm-s-abcdef span.cm-type { color: #def; }
18 | .cm-s-abcdef span.cm-property { color: #fedcba; }
19 | .cm-s-abcdef span.cm-operator { color: #ff0; }
20 | .cm-s-abcdef span.cm-comment { color: #7a7b7c; font-style: italic;}
21 | .cm-s-abcdef span.cm-string { color: #2b4; }
22 | .cm-s-abcdef span.cm-meta { color: #C9F; }
23 | .cm-s-abcdef span.cm-qualifier { color: #FFF700; }
24 | .cm-s-abcdef span.cm-builtin { color: #30aabc; }
25 | .cm-s-abcdef span.cm-bracket { color: #8a8a8a; }
26 | .cm-s-abcdef span.cm-tag { color: #FFDD44; }
27 | .cm-s-abcdef span.cm-attribute { color: #DDFF00; }
28 | .cm-s-abcdef span.cm-error { color: #FF0000; }
29 | .cm-s-abcdef span.cm-header { color: aquamarine; font-weight: bold; }
30 | .cm-s-abcdef span.cm-link { color: blueviolet; }
31 |
32 | .cm-s-abcdef .CodeMirror-activeline-background { background: #314151; }
33 |
--------------------------------------------------------------------------------
/app/styles/theme/ambiance-mobile.css:
--------------------------------------------------------------------------------
1 | .cm-s-ambiance.CodeMirror {
2 | -webkit-box-shadow: none;
3 | -moz-box-shadow: none;
4 | box-shadow: none;
5 | }
6 |
--------------------------------------------------------------------------------
/app/styles/theme/base16-dark.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: Base16 Default Dark
4 | Author: Chris Kempson (http://chriskempson.com)
5 |
6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
8 |
9 | */
10 |
11 | .cm-s-base16-dark.CodeMirror { background: #151515; color: #e0e0e0; }
12 | .cm-s-base16-dark div.CodeMirror-selected { background: #303030; }
13 | .cm-s-base16-dark .CodeMirror-line::selection, .cm-s-base16-dark .CodeMirror-line > span::selection, .cm-s-base16-dark .CodeMirror-line > span > span::selection { background: rgba(48, 48, 48, .99); }
14 | .cm-s-base16-dark .CodeMirror-line::-moz-selection, .cm-s-base16-dark .CodeMirror-line > span::-moz-selection, .cm-s-base16-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(48, 48, 48, .99); }
15 | .cm-s-base16-dark .CodeMirror-gutters { background: #151515; border-right: 0px; }
16 | .cm-s-base16-dark .CodeMirror-guttermarker { color: #ac4142; }
17 | .cm-s-base16-dark .CodeMirror-guttermarker-subtle { color: #505050; }
18 | .cm-s-base16-dark .CodeMirror-linenumber { color: #505050; }
19 | .cm-s-base16-dark .CodeMirror-cursor { border-left: 1px solid #b0b0b0; }
20 |
21 | .cm-s-base16-dark span.cm-comment { color: #8f5536; }
22 | .cm-s-base16-dark span.cm-atom { color: #aa759f; }
23 | .cm-s-base16-dark span.cm-number { color: #aa759f; }
24 |
25 | .cm-s-base16-dark span.cm-property, .cm-s-base16-dark span.cm-attribute { color: #90a959; }
26 | .cm-s-base16-dark span.cm-keyword { color: #ac4142; }
27 | .cm-s-base16-dark span.cm-string { color: #f4bf75; }
28 |
29 | .cm-s-base16-dark span.cm-variable { color: #90a959; }
30 | .cm-s-base16-dark span.cm-variable-2 { color: #6a9fb5; }
31 | .cm-s-base16-dark span.cm-def { color: #d28445; }
32 | .cm-s-base16-dark span.cm-bracket { color: #e0e0e0; }
33 | .cm-s-base16-dark span.cm-tag { color: #ac4142; }
34 | .cm-s-base16-dark span.cm-link { color: #aa759f; }
35 | .cm-s-base16-dark span.cm-error { background: #ac4142; color: #b0b0b0; }
36 |
37 | .cm-s-base16-dark .CodeMirror-activeline-background { background: #202020; }
38 | .cm-s-base16-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
39 |
--------------------------------------------------------------------------------
/app/styles/theme/base16-light.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: Base16 Default Light
4 | Author: Chris Kempson (http://chriskempson.com)
5 |
6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
8 |
9 | */
10 |
11 | .cm-s-base16-light.CodeMirror { background: #f5f5f5; color: #202020; }
12 | .cm-s-base16-light div.CodeMirror-selected { background: #e0e0e0; }
13 | .cm-s-base16-light .CodeMirror-line::selection, .cm-s-base16-light .CodeMirror-line > span::selection, .cm-s-base16-light .CodeMirror-line > span > span::selection { background: #e0e0e0; }
14 | .cm-s-base16-light .CodeMirror-line::-moz-selection, .cm-s-base16-light .CodeMirror-line > span::-moz-selection, .cm-s-base16-light .CodeMirror-line > span > span::-moz-selection { background: #e0e0e0; }
15 | .cm-s-base16-light .CodeMirror-gutters { background: #f5f5f5; border-right: 0px; }
16 | .cm-s-base16-light .CodeMirror-guttermarker { color: #ac4142; }
17 | .cm-s-base16-light .CodeMirror-guttermarker-subtle { color: #b0b0b0; }
18 | .cm-s-base16-light .CodeMirror-linenumber { color: #b0b0b0; }
19 | .cm-s-base16-light .CodeMirror-cursor { border-left: 1px solid #505050; }
20 |
21 | .cm-s-base16-light span.cm-comment { color: #8f5536; }
22 | .cm-s-base16-light span.cm-atom { color: #aa759f; }
23 | .cm-s-base16-light span.cm-number { color: #aa759f; }
24 |
25 | .cm-s-base16-light span.cm-property, .cm-s-base16-light span.cm-attribute { color: #90a959; }
26 | .cm-s-base16-light span.cm-keyword { color: #ac4142; }
27 | .cm-s-base16-light span.cm-string { color: #f4bf75; }
28 |
29 | .cm-s-base16-light span.cm-variable { color: #90a959; }
30 | .cm-s-base16-light span.cm-variable-2 { color: #6a9fb5; }
31 | .cm-s-base16-light span.cm-def { color: #d28445; }
32 | .cm-s-base16-light span.cm-bracket { color: #202020; }
33 | .cm-s-base16-light span.cm-tag { color: #ac4142; }
34 | .cm-s-base16-light span.cm-link { color: #aa759f; }
35 | .cm-s-base16-light span.cm-error { background: #ac4142; color: #505050; }
36 |
37 | .cm-s-base16-light .CodeMirror-activeline-background { background: #DDDCDC; }
38 | .cm-s-base16-light .CodeMirror-matchingbracket { color: #f5f5f5 !important; background-color: #6A9FB5 !important}
39 |
--------------------------------------------------------------------------------
/app/styles/theme/bespin.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: Bespin
4 | Author: Mozilla / Jan T. Sott
5 |
6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
8 |
9 | */
10 |
11 | .cm-s-bespin.CodeMirror {background: #28211c; color: #9d9b97;}
12 | .cm-s-bespin div.CodeMirror-selected {background: #36312e !important;}
13 | .cm-s-bespin .CodeMirror-gutters {background: #28211c; border-right: 0px;}
14 | .cm-s-bespin .CodeMirror-linenumber {color: #666666;}
15 | .cm-s-bespin .CodeMirror-cursor {border-left: 1px solid #797977 !important;}
16 |
17 | .cm-s-bespin span.cm-comment {color: #937121;}
18 | .cm-s-bespin span.cm-atom {color: #9b859d;}
19 | .cm-s-bespin span.cm-number {color: #9b859d;}
20 |
21 | .cm-s-bespin span.cm-property, .cm-s-bespin span.cm-attribute {color: #54be0d;}
22 | .cm-s-bespin span.cm-keyword {color: #cf6a4c;}
23 | .cm-s-bespin span.cm-string {color: #f9ee98;}
24 |
25 | .cm-s-bespin span.cm-variable {color: #54be0d;}
26 | .cm-s-bespin span.cm-variable-2 {color: #5ea6ea;}
27 | .cm-s-bespin span.cm-def {color: #cf7d34;}
28 | .cm-s-bespin span.cm-error {background: #cf6a4c; color: #797977;}
29 | .cm-s-bespin span.cm-bracket {color: #9d9b97;}
30 | .cm-s-bespin span.cm-tag {color: #cf6a4c;}
31 | .cm-s-bespin span.cm-link {color: #9b859d;}
32 |
33 | .cm-s-bespin .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
34 | .cm-s-bespin .CodeMirror-activeline-background { background: #404040; }
35 |
--------------------------------------------------------------------------------
/app/styles/theme/blackboard.css:
--------------------------------------------------------------------------------
1 | /* Port of TextMate's Blackboard theme */
2 |
3 | .cm-s-blackboard.CodeMirror { background: #0C1021; color: #F8F8F8; }
4 | .cm-s-blackboard div.CodeMirror-selected { background: #253B76; }
5 | .cm-s-blackboard .CodeMirror-line::selection, .cm-s-blackboard .CodeMirror-line > span::selection, .cm-s-blackboard .CodeMirror-line > span > span::selection { background: rgba(37, 59, 118, .99); }
6 | .cm-s-blackboard .CodeMirror-line::-moz-selection, .cm-s-blackboard .CodeMirror-line > span::-moz-selection, .cm-s-blackboard .CodeMirror-line > span > span::-moz-selection { background: rgba(37, 59, 118, .99); }
7 | .cm-s-blackboard .CodeMirror-gutters { background: #0C1021; border-right: 0; }
8 | .cm-s-blackboard .CodeMirror-guttermarker { color: #FBDE2D; }
9 | .cm-s-blackboard .CodeMirror-guttermarker-subtle { color: #888; }
10 | .cm-s-blackboard .CodeMirror-linenumber { color: #888; }
11 | .cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7; }
12 |
13 | .cm-s-blackboard .cm-keyword { color: #FBDE2D; }
14 | .cm-s-blackboard .cm-atom { color: #D8FA3C; }
15 | .cm-s-blackboard .cm-number { color: #D8FA3C; }
16 | .cm-s-blackboard .cm-def { color: #8DA6CE; }
17 | .cm-s-blackboard .cm-variable { color: #FF6400; }
18 | .cm-s-blackboard .cm-operator { color: #FBDE2D; }
19 | .cm-s-blackboard .cm-comment { color: #AEAEAE; }
20 | .cm-s-blackboard .cm-string { color: #61CE3C; }
21 | .cm-s-blackboard .cm-string-2 { color: #61CE3C; }
22 | .cm-s-blackboard .cm-meta { color: #D8FA3C; }
23 | .cm-s-blackboard .cm-builtin { color: #8DA6CE; }
24 | .cm-s-blackboard .cm-tag { color: #8DA6CE; }
25 | .cm-s-blackboard .cm-attribute { color: #8DA6CE; }
26 | .cm-s-blackboard .cm-header { color: #FF6400; }
27 | .cm-s-blackboard .cm-hr { color: #AEAEAE; }
28 | .cm-s-blackboard .cm-link { color: #8DA6CE; }
29 | .cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; }
30 |
31 | .cm-s-blackboard .CodeMirror-activeline-background { background: #3C3636; }
32 | .cm-s-blackboard .CodeMirror-matchingbracket { outline:1px solid grey;color:white !important; }
33 |
--------------------------------------------------------------------------------
/app/styles/theme/cobalt.css:
--------------------------------------------------------------------------------
1 | .cm-s-cobalt.CodeMirror { background: #002240; color: white; }
2 | .cm-s-cobalt div.CodeMirror-selected { background: #b36539; }
3 | .cm-s-cobalt .CodeMirror-line::selection, .cm-s-cobalt .CodeMirror-line > span::selection, .cm-s-cobalt .CodeMirror-line > span > span::selection { background: rgba(179, 101, 57, .99); }
4 | .cm-s-cobalt .CodeMirror-line::-moz-selection, .cm-s-cobalt .CodeMirror-line > span::-moz-selection, .cm-s-cobalt .CodeMirror-line > span > span::-moz-selection { background: rgba(179, 101, 57, .99); }
5 | .cm-s-cobalt .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
6 | .cm-s-cobalt .CodeMirror-guttermarker { color: #ffee80; }
7 | .cm-s-cobalt .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
8 | .cm-s-cobalt .CodeMirror-linenumber { color: #d0d0d0; }
9 | .cm-s-cobalt .CodeMirror-cursor { border-left: 1px solid white; }
10 |
11 | .cm-s-cobalt span.cm-comment { color: #08f; }
12 | .cm-s-cobalt span.cm-atom { color: #845dc4; }
13 | .cm-s-cobalt span.cm-number, .cm-s-cobalt span.cm-attribute { color: #ff80e1; }
14 | .cm-s-cobalt span.cm-keyword { color: #ffee80; }
15 | .cm-s-cobalt span.cm-string { color: #3ad900; }
16 | .cm-s-cobalt span.cm-meta { color: #ff9d00; }
17 | .cm-s-cobalt span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #9effff; }
18 | .cm-s-cobalt span.cm-variable-3, .cm-s-cobalt span.cm-def, .cm-s-cobalt .cm-type { color: white; }
19 | .cm-s-cobalt span.cm-bracket { color: #d8d8d8; }
20 | .cm-s-cobalt span.cm-builtin, .cm-s-cobalt span.cm-special { color: #ff9e59; }
21 | .cm-s-cobalt span.cm-link { color: #845dc4; }
22 | .cm-s-cobalt span.cm-error { color: #9d1e15; }
23 |
24 | .cm-s-cobalt .CodeMirror-activeline-background { background: #002D57; }
25 | .cm-s-cobalt .CodeMirror-matchingbracket { outline:1px solid grey;color:white !important; }
26 |
--------------------------------------------------------------------------------
/app/styles/theme/colorforth.css:
--------------------------------------------------------------------------------
1 | .cm-s-colorforth.CodeMirror { background: #000000; color: #f8f8f8; }
2 | .cm-s-colorforth .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
3 | .cm-s-colorforth .CodeMirror-guttermarker { color: #FFBD40; }
4 | .cm-s-colorforth .CodeMirror-guttermarker-subtle { color: #78846f; }
5 | .cm-s-colorforth .CodeMirror-linenumber { color: #bababa; }
6 | .cm-s-colorforth .CodeMirror-cursor { border-left: 1px solid white; }
7 |
8 | .cm-s-colorforth span.cm-comment { color: #ededed; }
9 | .cm-s-colorforth span.cm-def { color: #ff1c1c; font-weight:bold; }
10 | .cm-s-colorforth span.cm-keyword { color: #ffd900; }
11 | .cm-s-colorforth span.cm-builtin { color: #00d95a; }
12 | .cm-s-colorforth span.cm-variable { color: #73ff00; }
13 | .cm-s-colorforth span.cm-string { color: #007bff; }
14 | .cm-s-colorforth span.cm-number { color: #00c4ff; }
15 | .cm-s-colorforth span.cm-atom { color: #606060; }
16 |
17 | .cm-s-colorforth span.cm-variable-2 { color: #EEE; }
18 | .cm-s-colorforth span.cm-variable-3, .cm-s-colorforth span.cm-type { color: #DDD; }
19 | .cm-s-colorforth span.cm-property {}
20 | .cm-s-colorforth span.cm-operator {}
21 |
22 | .cm-s-colorforth span.cm-meta { color: yellow; }
23 | .cm-s-colorforth span.cm-qualifier { color: #FFF700; }
24 | .cm-s-colorforth span.cm-bracket { color: #cc7; }
25 | .cm-s-colorforth span.cm-tag { color: #FFBD40; }
26 | .cm-s-colorforth span.cm-attribute { color: #FFF700; }
27 | .cm-s-colorforth span.cm-error { color: #f00; }
28 |
29 | .cm-s-colorforth div.CodeMirror-selected { background: #333d53; }
30 |
31 | .cm-s-colorforth span.cm-compilation { background: rgba(255, 255, 255, 0.12); }
32 |
33 | .cm-s-colorforth .CodeMirror-activeline-background { background: #253540; }
34 |
--------------------------------------------------------------------------------
/app/styles/theme/darcula.css:
--------------------------------------------------------------------------------
1 | /**
2 | Name: IntelliJ IDEA darcula theme
3 | From IntelliJ IDEA by JetBrains
4 | */
5 |
6 | .cm-s-darcula { font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;}
7 | .cm-s-darcula.CodeMirror { background: #2B2B2B; color: #A9B7C6; }
8 |
9 | .cm-s-darcula span.cm-meta { color: #BBB529; }
10 | .cm-s-darcula span.cm-number { color: #6897BB; }
11 | .cm-s-darcula span.cm-keyword { color: #CC7832; line-height: 1em; font-weight: bold; }
12 | .cm-s-darcula span.cm-def { color: #A9B7C6; font-style: italic; }
13 | .cm-s-darcula span.cm-variable { color: #A9B7C6; }
14 | .cm-s-darcula span.cm-variable-2 { color: #A9B7C6; }
15 | .cm-s-darcula span.cm-variable-3 { color: #9876AA; }
16 | .cm-s-darcula span.cm-type { color: #AABBCC; font-weight: bold; }
17 | .cm-s-darcula span.cm-property { color: #FFC66D; }
18 | .cm-s-darcula span.cm-operator { color: #A9B7C6; }
19 | .cm-s-darcula span.cm-string { color: #6A8759; }
20 | .cm-s-darcula span.cm-string-2 { color: #6A8759; }
21 | .cm-s-darcula span.cm-comment { color: #61A151; font-style: italic; }
22 | .cm-s-darcula span.cm-link { color: #CC7832; }
23 | .cm-s-darcula span.cm-atom { color: #CC7832; }
24 | .cm-s-darcula span.cm-error { color: #BC3F3C; }
25 | .cm-s-darcula span.cm-tag { color: #629755; font-weight: bold; font-style: italic; text-decoration: underline; }
26 | .cm-s-darcula span.cm-attribute { color: #6897bb; }
27 | .cm-s-darcula span.cm-qualifier { color: #6A8759; }
28 | .cm-s-darcula span.cm-bracket { color: #A9B7C6; }
29 | .cm-s-darcula span.cm-builtin { color: #FF9E59; }
30 | .cm-s-darcula span.cm-special { color: #FF9E59; }
31 | .cm-s-darcula span.cm-matchhighlight { color: #FFFFFF; background-color: rgba(50, 89, 48, .7); font-weight: normal;}
32 | .cm-s-darcula span.cm-searching { color: #FFFFFF; background-color: rgba(61, 115, 59, .7); font-weight: normal;}
33 |
34 | .cm-s-darcula .CodeMirror-cursor { border-left: 1px solid #A9B7C6; }
35 | .cm-s-darcula .CodeMirror-activeline-background { background: #323232; }
36 | .cm-s-darcula .CodeMirror-gutters { background: #313335; border-right: 1px solid #313335; }
37 | .cm-s-darcula .CodeMirror-guttermarker { color: #FFEE80; }
38 | .cm-s-darcula .CodeMirror-guttermarker-subtle { color: #D0D0D0; }
39 | .cm-s-darcula .CodeMirrir-linenumber { color: #606366; }
40 | .cm-s-darcula .CodeMirror-matchingbracket { background-color: #3B514D; color: #FFEF28 !important; font-weight: bold; }
41 |
42 | .cm-s-darcula div.CodeMirror-selected { background: #214283; }
43 |
44 | .CodeMirror-hints.darcula {
45 | font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
46 | color: #9C9E9E;
47 | background-color: #3B3E3F !important;
48 | }
49 |
50 | .CodeMirror-hints.darcula .CodeMirror-hint-active {
51 | background-color: #494D4E !important;
52 | color: #9C9E9E !important;
53 | }
54 |
--------------------------------------------------------------------------------
/app/styles/theme/dracula.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: dracula
4 | Author: Michael Kaminsky (http://github.com/mkaminsky11)
5 |
6 | Original dracula color scheme by Zeno Rocha (https://github.com/zenorocha/dracula-theme)
7 |
8 | */
9 |
10 |
11 | .cm-s-dracula.CodeMirror, .cm-s-dracula .CodeMirror-gutters {
12 | background-color: #282a36 !important;
13 | color: #f8f8f2 !important;
14 | border: none;
15 | }
16 | .cm-s-dracula .CodeMirror-gutters { color: #282a36; }
17 | .cm-s-dracula .CodeMirror-cursor { border-left: solid thin #f8f8f0; }
18 | .cm-s-dracula .CodeMirror-linenumber { color: #6D8A88; }
19 | .cm-s-dracula .CodeMirror-selected { background: rgba(255, 255, 255, 0.10); }
20 | .cm-s-dracula .CodeMirror-line::selection, .cm-s-dracula .CodeMirror-line > span::selection, .cm-s-dracula .CodeMirror-line > span > span::selection { background: rgba(255, 255, 255, 0.10); }
21 | .cm-s-dracula .CodeMirror-line::-moz-selection, .cm-s-dracula .CodeMirror-line > span::-moz-selection, .cm-s-dracula .CodeMirror-line > span > span::-moz-selection { background: rgba(255, 255, 255, 0.10); }
22 | .cm-s-dracula span.cm-comment { color: #6272a4; }
23 | .cm-s-dracula span.cm-string, .cm-s-dracula span.cm-string-2 { color: #f1fa8c; }
24 | .cm-s-dracula span.cm-number { color: #bd93f9; }
25 | .cm-s-dracula span.cm-variable { color: #50fa7b; }
26 | .cm-s-dracula span.cm-variable-2 { color: white; }
27 | .cm-s-dracula span.cm-def { color: #50fa7b; }
28 | .cm-s-dracula span.cm-operator { color: #ff79c6; }
29 | .cm-s-dracula span.cm-keyword { color: #ff79c6; }
30 | .cm-s-dracula span.cm-atom { color: #bd93f9; }
31 | .cm-s-dracula span.cm-meta { color: #f8f8f2; }
32 | .cm-s-dracula span.cm-tag { color: #ff79c6; }
33 | .cm-s-dracula span.cm-attribute { color: #50fa7b; }
34 | .cm-s-dracula span.cm-qualifier { color: #50fa7b; }
35 | .cm-s-dracula span.cm-property { color: #66d9ef; }
36 | .cm-s-dracula span.cm-builtin { color: #50fa7b; }
37 | .cm-s-dracula span.cm-variable-3, .cm-s-dracula span.cm-type { color: #ffb86c; }
38 |
39 | .cm-s-dracula .CodeMirror-activeline-background { background: rgba(255,255,255,0.1); }
40 | .cm-s-dracula .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
41 |
--------------------------------------------------------------------------------
/app/styles/theme/duotone-dark.css:
--------------------------------------------------------------------------------
1 | /*
2 | Name: DuoTone-Dark
3 | Author: by Bram de Haan, adapted from DuoTone themes by Simurai (http://simurai.com/projects/2016/01/01/duotone-themes)
4 |
5 | CodeMirror template by Jan T. Sott (https://github.com/idleberg), adapted by Bram de Haan (https://github.com/atelierbram/)
6 | */
7 |
8 | .cm-s-duotone-dark.CodeMirror { background: #2a2734; color: #6c6783; }
9 | .cm-s-duotone-dark div.CodeMirror-selected { background: #545167!important; }
10 | .cm-s-duotone-dark .CodeMirror-gutters { background: #2a2734; border-right: 0px; }
11 | .cm-s-duotone-dark .CodeMirror-linenumber { color: #545167; }
12 |
13 | /* begin cursor */
14 | .cm-s-duotone-dark .CodeMirror-cursor { border-left: 1px solid #ffad5c; /* border-left: 1px solid #ffad5c80; */ border-right: .5em solid #ffad5c; /* border-right: .5em solid #ffad5c80; */ opacity: .5; }
15 | .cm-s-duotone-dark .CodeMirror-activeline-background { background: #363342; /* background: #36334280; */ opacity: .5;}
16 | .cm-s-duotone-dark .cm-fat-cursor .CodeMirror-cursor { background: #ffad5c; /* background: #ffad5c80; */ opacity: .5;}
17 | /* end cursor */
18 |
19 | .cm-s-duotone-dark span.cm-atom, .cm-s-duotone-dark span.cm-number, .cm-s-duotone-dark span.cm-keyword, .cm-s-duotone-dark span.cm-variable, .cm-s-duotone-dark span.cm-attribute, .cm-s-duotone-dark span.cm-quote, .cm-s-duotone-dark span.cm-hr, .cm-s-duotone-dark span.cm-link { color: #ffcc99; }
20 |
21 | .cm-s-duotone-dark span.cm-property { color: #9a86fd; }
22 | .cm-s-duotone-dark span.cm-punctuation, .cm-s-duotone-dark span.cm-unit, .cm-s-duotone-dark span.cm-negative { color: #e09142; }
23 | .cm-s-duotone-dark span.cm-string { color: #ffb870; }
24 | .cm-s-duotone-dark span.cm-operator { color: #ffad5c; }
25 | .cm-s-duotone-dark span.cm-positive { color: #6a51e6; }
26 |
27 | .cm-s-duotone-dark span.cm-variable-2, .cm-s-duotone-dark span.cm-variable-3, .cm-s-duotone-dark span.cm-type, .cm-s-duotone-dark span.cm-string-2, .cm-s-duotone-dark span.cm-url { color: #7a63ee; }
28 | .cm-s-duotone-dark span.cm-def, .cm-s-duotone-dark span.cm-tag, .cm-s-duotone-dark span.cm-builtin, .cm-s-duotone-dark span.cm-qualifier, .cm-s-duotone-dark span.cm-header, .cm-s-duotone-dark span.cm-em { color: #eeebff; }
29 | .cm-s-duotone-dark span.cm-bracket, .cm-s-duotone-dark span.cm-comment { color: #6c6783; }
30 |
31 | /* using #f00 red for errors, don't think any of the colorscheme variables will stand out enough, ... maybe by giving it a background-color ... */
32 | .cm-s-duotone-dark span.cm-error, .cm-s-duotone-dark span.cm-invalidchar { color: #f00; }
33 |
34 | .cm-s-duotone-dark span.cm-header { font-weight: normal; }
35 | .cm-s-duotone-dark .CodeMirror-matchingbracket { text-decoration: underline; color: #eeebff !important; }
36 |
--------------------------------------------------------------------------------
/app/styles/theme/duotone-light.css:
--------------------------------------------------------------------------------
1 | /*
2 | Name: DuoTone-Light
3 | Author: by Bram de Haan, adapted from DuoTone themes by Simurai (http://simurai.com/projects/2016/01/01/duotone-themes)
4 |
5 | CodeMirror template by Jan T. Sott (https://github.com/idleberg), adapted by Bram de Haan (https://github.com/atelierbram/)
6 | */
7 |
8 | .cm-s-duotone-light.CodeMirror { background: #faf8f5; color: #b29762; }
9 | .cm-s-duotone-light div.CodeMirror-selected { background: #e3dcce !important; }
10 | .cm-s-duotone-light .CodeMirror-gutters { background: #faf8f5; border-right: 0px; }
11 | .cm-s-duotone-light .CodeMirror-linenumber { color: #cdc4b1; }
12 |
13 | /* begin cursor */
14 | .cm-s-duotone-light .CodeMirror-cursor { border-left: 1px solid #93abdc; /* border-left: 1px solid #93abdc80; */ border-right: .5em solid #93abdc; /* border-right: .5em solid #93abdc80; */ opacity: .5; }
15 | .cm-s-duotone-light .CodeMirror-activeline-background { background: #e3dcce; /* background: #e3dcce80; */ opacity: .5; }
16 | .cm-s-duotone-light .cm-fat-cursor .CodeMirror-cursor { background: #93abdc; /* #93abdc80; */ opacity: .5; }
17 | /* end cursor */
18 |
19 | .cm-s-duotone-light span.cm-atom, .cm-s-duotone-light span.cm-number, .cm-s-duotone-light span.cm-keyword, .cm-s-duotone-light span.cm-variable, .cm-s-duotone-light span.cm-attribute, .cm-s-duotone-light span.cm-quote, .cm-s-duotone-light-light span.cm-hr, .cm-s-duotone-light-light span.cm-link { color: #063289; }
20 |
21 | .cm-s-duotone-light span.cm-property { color: #b29762; }
22 | .cm-s-duotone-light span.cm-punctuation, .cm-s-duotone-light span.cm-unit, .cm-s-duotone-light span.cm-negative { color: #063289; }
23 | .cm-s-duotone-light span.cm-string, .cm-s-duotone-light span.cm-operator { color: #1659df; }
24 | .cm-s-duotone-light span.cm-positive { color: #896724; }
25 |
26 | .cm-s-duotone-light span.cm-variable-2, .cm-s-duotone-light span.cm-variable-3, .cm-s-duotone-light span.cm-type, .cm-s-duotone-light span.cm-string-2, .cm-s-duotone-light span.cm-url { color: #896724; }
27 | .cm-s-duotone-light span.cm-def, .cm-s-duotone-light span.cm-tag, .cm-s-duotone-light span.cm-builtin, .cm-s-duotone-light span.cm-qualifier, .cm-s-duotone-light span.cm-header, .cm-s-duotone-light span.cm-em { color: #2d2006; }
28 | .cm-s-duotone-light span.cm-bracket, .cm-s-duotone-light span.cm-comment { color: #b6ad9a; }
29 |
30 | /* using #f00 red for errors, don't think any of the colorscheme variables will stand out enough, ... maybe by giving it a background-color ... */
31 | /* .cm-s-duotone-light span.cm-error { background: #896724; color: #728fcb; } */
32 | .cm-s-duotone-light span.cm-error, .cm-s-duotone-light span.cm-invalidchar { color: #f00; }
33 |
34 | .cm-s-duotone-light span.cm-header { font-weight: normal; }
35 | .cm-s-duotone-light .CodeMirror-matchingbracket { text-decoration: underline; color: #faf8f5 !important; }
36 |
37 |
--------------------------------------------------------------------------------
/app/styles/theme/eclipse.css:
--------------------------------------------------------------------------------
1 | .cm-s-eclipse span.cm-meta { color: #FF1717; }
2 | .cm-s-eclipse span.cm-keyword { line-height: 1em; font-weight: bold; color: #7F0055; }
3 | .cm-s-eclipse span.cm-atom { color: #219; }
4 | .cm-s-eclipse span.cm-number { color: #164; }
5 | .cm-s-eclipse span.cm-def { color: #00f; }
6 | .cm-s-eclipse span.cm-variable { color: black; }
7 | .cm-s-eclipse span.cm-variable-2 { color: #0000C0; }
8 | .cm-s-eclipse span.cm-variable-3, .cm-s-eclipse span.cm-type { color: #0000C0; }
9 | .cm-s-eclipse span.cm-property { color: black; }
10 | .cm-s-eclipse span.cm-operator { color: black; }
11 | .cm-s-eclipse span.cm-comment { color: #3F7F5F; }
12 | .cm-s-eclipse span.cm-string { color: #2A00FF; }
13 | .cm-s-eclipse span.cm-string-2 { color: #f50; }
14 | .cm-s-eclipse span.cm-qualifier { color: #555; }
15 | .cm-s-eclipse span.cm-builtin { color: #30a; }
16 | .cm-s-eclipse span.cm-bracket { color: #cc7; }
17 | .cm-s-eclipse span.cm-tag { color: #170; }
18 | .cm-s-eclipse span.cm-attribute { color: #00c; }
19 | .cm-s-eclipse span.cm-link { color: #219; }
20 | .cm-s-eclipse span.cm-error { color: #f00; }
21 |
22 | .cm-s-eclipse .CodeMirror-activeline-background { background: #e8f2ff; }
23 | .cm-s-eclipse .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; }
24 |
--------------------------------------------------------------------------------
/app/styles/theme/elegant.css:
--------------------------------------------------------------------------------
1 | .cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom { color: #762; }
2 | .cm-s-elegant span.cm-comment { color: #262; font-style: italic; line-height: 1em; }
3 | .cm-s-elegant span.cm-meta { color: #555; font-style: italic; line-height: 1em; }
4 | .cm-s-elegant span.cm-variable { color: black; }
5 | .cm-s-elegant span.cm-variable-2 { color: #b11; }
6 | .cm-s-elegant span.cm-qualifier { color: #555; }
7 | .cm-s-elegant span.cm-keyword { color: #730; }
8 | .cm-s-elegant span.cm-builtin { color: #30a; }
9 | .cm-s-elegant span.cm-link { color: #762; }
10 | .cm-s-elegant span.cm-error { background-color: #fdd; }
11 |
12 | .cm-s-elegant .CodeMirror-activeline-background { background: #e8f2ff; }
13 | .cm-s-elegant .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; }
14 |
--------------------------------------------------------------------------------
/app/styles/theme/erlang-dark.css:
--------------------------------------------------------------------------------
1 | .cm-s-erlang-dark.CodeMirror { background: #002240; color: white; }
2 | .cm-s-erlang-dark div.CodeMirror-selected { background: #b36539; }
3 | .cm-s-erlang-dark .CodeMirror-line::selection, .cm-s-erlang-dark .CodeMirror-line > span::selection, .cm-s-erlang-dark .CodeMirror-line > span > span::selection { background: rgba(179, 101, 57, .99); }
4 | .cm-s-erlang-dark .CodeMirror-line::-moz-selection, .cm-s-erlang-dark .CodeMirror-line > span::-moz-selection, .cm-s-erlang-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(179, 101, 57, .99); }
5 | .cm-s-erlang-dark .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
6 | .cm-s-erlang-dark .CodeMirror-guttermarker { color: white; }
7 | .cm-s-erlang-dark .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
8 | .cm-s-erlang-dark .CodeMirror-linenumber { color: #d0d0d0; }
9 | .cm-s-erlang-dark .CodeMirror-cursor { border-left: 1px solid white; }
10 |
11 | .cm-s-erlang-dark span.cm-quote { color: #ccc; }
12 | .cm-s-erlang-dark span.cm-atom { color: #f133f1; }
13 | .cm-s-erlang-dark span.cm-attribute { color: #ff80e1; }
14 | .cm-s-erlang-dark span.cm-bracket { color: #ff9d00; }
15 | .cm-s-erlang-dark span.cm-builtin { color: #eaa; }
16 | .cm-s-erlang-dark span.cm-comment { color: #77f; }
17 | .cm-s-erlang-dark span.cm-def { color: #e7a; }
18 | .cm-s-erlang-dark span.cm-keyword { color: #ffee80; }
19 | .cm-s-erlang-dark span.cm-meta { color: #50fefe; }
20 | .cm-s-erlang-dark span.cm-number { color: #ffd0d0; }
21 | .cm-s-erlang-dark span.cm-operator { color: #d55; }
22 | .cm-s-erlang-dark span.cm-property { color: #ccc; }
23 | .cm-s-erlang-dark span.cm-qualifier { color: #ccc; }
24 | .cm-s-erlang-dark span.cm-special { color: #ffbbbb; }
25 | .cm-s-erlang-dark span.cm-string { color: #3ad900; }
26 | .cm-s-erlang-dark span.cm-string-2 { color: #ccc; }
27 | .cm-s-erlang-dark span.cm-tag { color: #9effff; }
28 | .cm-s-erlang-dark span.cm-variable { color: #50fe50; }
29 | .cm-s-erlang-dark span.cm-variable-2 { color: #e0e; }
30 | .cm-s-erlang-dark span.cm-variable-3, .cm-s-erlang-dark span.cm-type { color: #ccc; }
31 | .cm-s-erlang-dark span.cm-error { color: #9d1e15; }
32 |
33 | .cm-s-erlang-dark .CodeMirror-activeline-background { background: #013461; }
34 | .cm-s-erlang-dark .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; }
35 |
--------------------------------------------------------------------------------
/app/styles/theme/gruvbox-dark.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: gruvbox-dark
4 | Author: kRkk (https://github.com/krkk)
5 |
6 | Original gruvbox color scheme by Pavel Pertsev (https://github.com/morhetz/gruvbox)
7 |
8 | */
9 |
10 | .cm-s-gruvbox-dark.CodeMirror, .cm-s-gruvbox-dark .CodeMirror-gutters { background-color: #282828; color: #bdae93; }
11 | .cm-s-gruvbox-dark .CodeMirror-gutters {background: #282828; border-right: 0px;}
12 | .cm-s-gruvbox-dark .CodeMirror-linenumber {color: #7c6f64;}
13 | .cm-s-gruvbox-dark .CodeMirror-cursor { border-left: 1px solid #ebdbb2; }
14 | .cm-s-gruvbox-dark div.CodeMirror-selected { background: #928374; }
15 | .cm-s-gruvbox-dark span.cm-meta { color: #83a598; }
16 |
17 | .cm-s-gruvbox-dark span.cm-comment { color: #928374; }
18 | .cm-s-gruvbox-dark span.cm-number, span.cm-atom { color: #d3869b; }
19 | .cm-s-gruvbox-dark span.cm-keyword { color: #f84934; }
20 |
21 | .cm-s-gruvbox-dark span.cm-variable { color: #ebdbb2; }
22 | .cm-s-gruvbox-dark span.cm-variable-2 { color: #ebdbb2; }
23 | .cm-s-gruvbox-dark span.cm-variable-3, .cm-s-gruvbox-dark span.cm-type { color: #fabd2f; }
24 | .cm-s-gruvbox-dark span.cm-operator { color: #ebdbb2; }
25 | .cm-s-gruvbox-dark span.cm-callee { color: #ebdbb2; }
26 | .cm-s-gruvbox-dark span.cm-def { color: #ebdbb2; }
27 | .cm-s-gruvbox-dark span.cm-property { color: #ebdbb2; }
28 | .cm-s-gruvbox-dark span.cm-string { color: #b8bb26; }
29 | .cm-s-gruvbox-dark span.cm-string-2 { color: #8ec07c; }
30 | .cm-s-gruvbox-dark span.cm-qualifier { color: #8ec07c; }
31 | .cm-s-gruvbox-dark span.cm-attribute { color: #8ec07c; }
32 |
33 | .cm-s-gruvbox-dark .CodeMirror-activeline-background { background: #3c3836; }
34 | .cm-s-gruvbox-dark .CodeMirror-matchingbracket { background: #928374; color:#282828 !important; }
35 |
36 | .cm-s-gruvbox-dark span.cm-builtin { color: #fe8019; }
37 | .cm-s-gruvbox-dark span.cm-tag { color: #fe8019; }
38 |
--------------------------------------------------------------------------------
/app/styles/theme/hopscotch.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: Hopscotch
4 | Author: Jan T. Sott
5 |
6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
8 |
9 | */
10 |
11 | .cm-s-hopscotch.CodeMirror {background: #322931; color: #d5d3d5;}
12 | .cm-s-hopscotch div.CodeMirror-selected {background: #433b42 !important;}
13 | .cm-s-hopscotch .CodeMirror-gutters {background: #322931; border-right: 0px;}
14 | .cm-s-hopscotch .CodeMirror-linenumber {color: #797379;}
15 | .cm-s-hopscotch .CodeMirror-cursor {border-left: 1px solid #989498 !important;}
16 |
17 | .cm-s-hopscotch span.cm-comment {color: #b33508;}
18 | .cm-s-hopscotch span.cm-atom {color: #c85e7c;}
19 | .cm-s-hopscotch span.cm-number {color: #c85e7c;}
20 |
21 | .cm-s-hopscotch span.cm-property, .cm-s-hopscotch span.cm-attribute {color: #8fc13e;}
22 | .cm-s-hopscotch span.cm-keyword {color: #dd464c;}
23 | .cm-s-hopscotch span.cm-string {color: #fdcc59;}
24 |
25 | .cm-s-hopscotch span.cm-variable {color: #8fc13e;}
26 | .cm-s-hopscotch span.cm-variable-2 {color: #1290bf;}
27 | .cm-s-hopscotch span.cm-def {color: #fd8b19;}
28 | .cm-s-hopscotch span.cm-error {background: #dd464c; color: #989498;}
29 | .cm-s-hopscotch span.cm-bracket {color: #d5d3d5;}
30 | .cm-s-hopscotch span.cm-tag {color: #dd464c;}
31 | .cm-s-hopscotch span.cm-link {color: #c85e7c;}
32 |
33 | .cm-s-hopscotch .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
34 | .cm-s-hopscotch .CodeMirror-activeline-background { background: #302020; }
35 |
--------------------------------------------------------------------------------
/app/styles/theme/icecoder.css:
--------------------------------------------------------------------------------
1 | /*
2 | ICEcoder default theme by Matt Pass, used in code editor available at https://icecoder.net
3 | */
4 |
5 | .cm-s-icecoder { color: #666; background: #1d1d1b; }
6 |
7 | .cm-s-icecoder span.cm-keyword { color: #eee; font-weight:bold; } /* off-white 1 */
8 | .cm-s-icecoder span.cm-atom { color: #e1c76e; } /* yellow */
9 | .cm-s-icecoder span.cm-number { color: #6cb5d9; } /* blue */
10 | .cm-s-icecoder span.cm-def { color: #b9ca4a; } /* green */
11 |
12 | .cm-s-icecoder span.cm-variable { color: #6cb5d9; } /* blue */
13 | .cm-s-icecoder span.cm-variable-2 { color: #cc1e5c; } /* pink */
14 | .cm-s-icecoder span.cm-variable-3, .cm-s-icecoder span.cm-type { color: #f9602c; } /* orange */
15 |
16 | .cm-s-icecoder span.cm-property { color: #eee; } /* off-white 1 */
17 | .cm-s-icecoder span.cm-operator { color: #9179bb; } /* purple */
18 | .cm-s-icecoder span.cm-comment { color: #97a3aa; } /* grey-blue */
19 |
20 | .cm-s-icecoder span.cm-string { color: #b9ca4a; } /* green */
21 | .cm-s-icecoder span.cm-string-2 { color: #6cb5d9; } /* blue */
22 |
23 | .cm-s-icecoder span.cm-meta { color: #555; } /* grey */
24 |
25 | .cm-s-icecoder span.cm-qualifier { color: #555; } /* grey */
26 | .cm-s-icecoder span.cm-builtin { color: #214e7b; } /* bright blue */
27 | .cm-s-icecoder span.cm-bracket { color: #cc7; } /* grey-yellow */
28 |
29 | .cm-s-icecoder span.cm-tag { color: #e8e8e8; } /* off-white 2 */
30 | .cm-s-icecoder span.cm-attribute { color: #099; } /* teal */
31 |
32 | .cm-s-icecoder span.cm-header { color: #6a0d6a; } /* purple-pink */
33 | .cm-s-icecoder span.cm-quote { color: #186718; } /* dark green */
34 | .cm-s-icecoder span.cm-hr { color: #888; } /* mid-grey */
35 | .cm-s-icecoder span.cm-link { color: #e1c76e; } /* yellow */
36 | .cm-s-icecoder span.cm-error { color: #d00; } /* red */
37 |
38 | .cm-s-icecoder .CodeMirror-cursor { border-left: 1px solid white; }
39 | .cm-s-icecoder div.CodeMirror-selected { color: #fff; background: #037; }
40 | .cm-s-icecoder .CodeMirror-gutters { background: #1d1d1b; min-width: 41px; border-right: 0; }
41 | .cm-s-icecoder .CodeMirror-linenumber { color: #555; cursor: default; }
42 | .cm-s-icecoder .CodeMirror-matchingbracket { color: #fff !important; background: #555 !important; }
43 | .cm-s-icecoder .CodeMirror-activeline-background { background: #000; }
44 |
--------------------------------------------------------------------------------
/app/styles/theme/idea.css:
--------------------------------------------------------------------------------
1 | /**
2 | Name: IDEA default theme
3 | From IntelliJ IDEA by JetBrains
4 | */
5 |
6 | .cm-s-idea span.cm-meta { color: #808000; }
7 | .cm-s-idea span.cm-number { color: #0000FF; }
8 | .cm-s-idea span.cm-keyword { line-height: 1em; font-weight: bold; color: #000080; }
9 | .cm-s-idea span.cm-atom { font-weight: bold; color: #000080; }
10 | .cm-s-idea span.cm-def { color: #000000; }
11 | .cm-s-idea span.cm-variable { color: black; }
12 | .cm-s-idea span.cm-variable-2 { color: black; }
13 | .cm-s-idea span.cm-variable-3, .cm-s-idea span.cm-type { color: black; }
14 | .cm-s-idea span.cm-property { color: black; }
15 | .cm-s-idea span.cm-operator { color: black; }
16 | .cm-s-idea span.cm-comment { color: #808080; }
17 | .cm-s-idea span.cm-string { color: #008000; }
18 | .cm-s-idea span.cm-string-2 { color: #008000; }
19 | .cm-s-idea span.cm-qualifier { color: #555; }
20 | .cm-s-idea span.cm-error { color: #FF0000; }
21 | .cm-s-idea span.cm-attribute { color: #0000FF; }
22 | .cm-s-idea span.cm-tag { color: #000080; }
23 | .cm-s-idea span.cm-link { color: #0000FF; }
24 | .cm-s-idea .CodeMirror-activeline-background { background: #FFFAE3; }
25 |
26 | .cm-s-idea span.cm-builtin { color: #30a; }
27 | .cm-s-idea span.cm-bracket { color: #cc7; }
28 | .cm-s-idea { font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;}
29 |
30 |
31 | .cm-s-idea .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; }
32 |
33 | .CodeMirror-hints.idea {
34 | font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
35 | color: #616569;
36 | background-color: #ebf3fd !important;
37 | }
38 |
39 | .CodeMirror-hints.idea .CodeMirror-hint-active {
40 | background-color: #a2b8c9 !important;
41 | color: #5c6065 !important;
42 | }
--------------------------------------------------------------------------------
/app/styles/theme/isotope.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: Isotope
4 | Author: David Desandro / Jan T. Sott
5 |
6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
8 |
9 | */
10 |
11 | .cm-s-isotope.CodeMirror {background: #000000; color: #e0e0e0;}
12 | .cm-s-isotope div.CodeMirror-selected {background: #404040 !important;}
13 | .cm-s-isotope .CodeMirror-gutters {background: #000000; border-right: 0px;}
14 | .cm-s-isotope .CodeMirror-linenumber {color: #808080;}
15 | .cm-s-isotope .CodeMirror-cursor {border-left: 1px solid #c0c0c0 !important;}
16 |
17 | .cm-s-isotope span.cm-comment {color: #3300ff;}
18 | .cm-s-isotope span.cm-atom {color: #cc00ff;}
19 | .cm-s-isotope span.cm-number {color: #cc00ff;}
20 |
21 | .cm-s-isotope span.cm-property, .cm-s-isotope span.cm-attribute {color: #33ff00;}
22 | .cm-s-isotope span.cm-keyword {color: #ff0000;}
23 | .cm-s-isotope span.cm-string {color: #ff0099;}
24 |
25 | .cm-s-isotope span.cm-variable {color: #33ff00;}
26 | .cm-s-isotope span.cm-variable-2 {color: #0066ff;}
27 | .cm-s-isotope span.cm-def {color: #ff9900;}
28 | .cm-s-isotope span.cm-error {background: #ff0000; color: #c0c0c0;}
29 | .cm-s-isotope span.cm-bracket {color: #e0e0e0;}
30 | .cm-s-isotope span.cm-tag {color: #ff0000;}
31 | .cm-s-isotope span.cm-link {color: #cc00ff;}
32 |
33 | .cm-s-isotope .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
34 | .cm-s-isotope .CodeMirror-activeline-background { background: #202020; }
35 |
--------------------------------------------------------------------------------
/app/styles/theme/lesser-dark.css:
--------------------------------------------------------------------------------
1 | /*
2 | http://lesscss.org/ dark theme
3 | Ported to CodeMirror by Peter Kroon
4 | */
5 | .cm-s-lesser-dark {
6 | line-height: 1.3em;
7 | }
8 | .cm-s-lesser-dark.CodeMirror { background: #262626; color: #EBEFE7; text-shadow: 0 -1px 1px #262626; }
9 | .cm-s-lesser-dark div.CodeMirror-selected { background: #45443B; } /* 33322B*/
10 | .cm-s-lesser-dark .CodeMirror-line::selection, .cm-s-lesser-dark .CodeMirror-line > span::selection, .cm-s-lesser-dark .CodeMirror-line > span > span::selection { background: rgba(69, 68, 59, .99); }
11 | .cm-s-lesser-dark .CodeMirror-line::-moz-selection, .cm-s-lesser-dark .CodeMirror-line > span::-moz-selection, .cm-s-lesser-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(69, 68, 59, .99); }
12 | .cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white; }
13 | .cm-s-lesser-dark pre { padding: 0 8px; }/*editable code holder*/
14 |
15 | .cm-s-lesser-dark.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/
16 |
17 | .cm-s-lesser-dark .CodeMirror-gutters { background: #262626; border-right:1px solid #aaa; }
18 | .cm-s-lesser-dark .CodeMirror-guttermarker { color: #599eff; }
19 | .cm-s-lesser-dark .CodeMirror-guttermarker-subtle { color: #777; }
20 | .cm-s-lesser-dark .CodeMirror-linenumber { color: #777; }
21 |
22 | .cm-s-lesser-dark span.cm-header { color: #a0a; }
23 | .cm-s-lesser-dark span.cm-quote { color: #090; }
24 | .cm-s-lesser-dark span.cm-keyword { color: #599eff; }
25 | .cm-s-lesser-dark span.cm-atom { color: #C2B470; }
26 | .cm-s-lesser-dark span.cm-number { color: #B35E4D; }
27 | .cm-s-lesser-dark span.cm-def { color: white; }
28 | .cm-s-lesser-dark span.cm-variable { color:#D9BF8C; }
29 | .cm-s-lesser-dark span.cm-variable-2 { color: #669199; }
30 | .cm-s-lesser-dark span.cm-variable-3, .cm-s-lesser-dark span.cm-type { color: white; }
31 | .cm-s-lesser-dark span.cm-property { color: #92A75C; }
32 | .cm-s-lesser-dark span.cm-operator { color: #92A75C; }
33 | .cm-s-lesser-dark span.cm-comment { color: #666; }
34 | .cm-s-lesser-dark span.cm-string { color: #BCD279; }
35 | .cm-s-lesser-dark span.cm-string-2 { color: #f50; }
36 | .cm-s-lesser-dark span.cm-meta { color: #738C73; }
37 | .cm-s-lesser-dark span.cm-qualifier { color: #555; }
38 | .cm-s-lesser-dark span.cm-builtin { color: #ff9e59; }
39 | .cm-s-lesser-dark span.cm-bracket { color: #EBEFE7; }
40 | .cm-s-lesser-dark span.cm-tag { color: #669199; }
41 | .cm-s-lesser-dark span.cm-attribute { color: #81a4d5; }
42 | .cm-s-lesser-dark span.cm-hr { color: #999; }
43 | .cm-s-lesser-dark span.cm-link { color: #7070E6; }
44 | .cm-s-lesser-dark span.cm-error { color: #9d1e15; }
45 |
46 | .cm-s-lesser-dark .CodeMirror-activeline-background { background: #3C3A3A; }
47 | .cm-s-lesser-dark .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; }
48 |
--------------------------------------------------------------------------------
/app/styles/theme/liquibyte.css:
--------------------------------------------------------------------------------
1 | .cm-s-liquibyte.CodeMirror {
2 | background-color: #000;
3 | color: #fff;
4 | line-height: 1.2em;
5 | font-size: 1em;
6 | }
7 | .cm-s-liquibyte .CodeMirror-focused .cm-matchhighlight {
8 | text-decoration: underline;
9 | text-decoration-color: #0f0;
10 | text-decoration-style: wavy;
11 | }
12 | .cm-s-liquibyte .cm-trailingspace {
13 | text-decoration: line-through;
14 | text-decoration-color: #f00;
15 | text-decoration-style: dotted;
16 | }
17 | .cm-s-liquibyte .cm-tab {
18 | text-decoration: line-through;
19 | text-decoration-color: #404040;
20 | text-decoration-style: dotted;
21 | }
22 | .cm-s-liquibyte .CodeMirror-gutters { background-color: #262626; border-right: 1px solid #505050; padding-right: 0.8em; }
23 | .cm-s-liquibyte .CodeMirror-gutter-elt div { font-size: 1.2em; }
24 | .cm-s-liquibyte .CodeMirror-guttermarker { }
25 | .cm-s-liquibyte .CodeMirror-guttermarker-subtle { }
26 | .cm-s-liquibyte .CodeMirror-linenumber { color: #606060; padding-left: 0; }
27 | .cm-s-liquibyte .CodeMirror-cursor { border-left: 1px solid #eee; }
28 |
29 | .cm-s-liquibyte span.cm-comment { color: #008000; }
30 | .cm-s-liquibyte span.cm-def { color: #ffaf40; font-weight: bold; }
31 | .cm-s-liquibyte span.cm-keyword { color: #c080ff; font-weight: bold; }
32 | .cm-s-liquibyte span.cm-builtin { color: #ffaf40; font-weight: bold; }
33 | .cm-s-liquibyte span.cm-variable { color: #5967ff; font-weight: bold; }
34 | .cm-s-liquibyte span.cm-string { color: #ff8000; }
35 | .cm-s-liquibyte span.cm-number { color: #0f0; font-weight: bold; }
36 | .cm-s-liquibyte span.cm-atom { color: #bf3030; font-weight: bold; }
37 |
38 | .cm-s-liquibyte span.cm-variable-2 { color: #007f7f; font-weight: bold; }
39 | .cm-s-liquibyte span.cm-variable-3, .cm-s-liquibyte span.cm-type { color: #c080ff; font-weight: bold; }
40 | .cm-s-liquibyte span.cm-property { color: #999; font-weight: bold; }
41 | .cm-s-liquibyte span.cm-operator { color: #fff; }
42 |
43 | .cm-s-liquibyte span.cm-meta { color: #0f0; }
44 | .cm-s-liquibyte span.cm-qualifier { color: #fff700; font-weight: bold; }
45 | .cm-s-liquibyte span.cm-bracket { color: #cc7; }
46 | .cm-s-liquibyte span.cm-tag { color: #ff0; font-weight: bold; }
47 | .cm-s-liquibyte span.cm-attribute { color: #c080ff; font-weight: bold; }
48 | .cm-s-liquibyte span.cm-error { color: #f00; }
49 |
50 | .cm-s-liquibyte div.CodeMirror-selected { background-color: rgba(255, 0, 0, 0.25); }
51 |
52 | .cm-s-liquibyte span.cm-compilation { background-color: rgba(255, 255, 255, 0.12); }
53 |
54 | .cm-s-liquibyte .CodeMirror-activeline-background { background-color: rgba(0, 255, 0, 0.15); }
55 |
56 | /* Default styles for common addons */
57 | .cm-s-liquibyte .CodeMirror span.CodeMirror-matchingbracket { color: #0f0; font-weight: bold; }
58 | .cm-s-liquibyte .CodeMirror span.CodeMirror-nonmatchingbracket { color: #f00; font-weight: bold; }
59 | .CodeMirror-matchingtag { background-color: rgba(150, 255, 0, .3); }
60 | /* Scrollbars */
61 | /* Simple */
62 | .cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div:hover, .cm-s-liquibyte div.CodeMirror-simplescroll-vertical div:hover {
63 | background-color: rgba(80, 80, 80, .7);
64 | }
65 | .cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div, .cm-s-liquibyte div.CodeMirror-simplescroll-vertical div {
66 | background-color: rgba(80, 80, 80, .3);
67 | border: 1px solid #404040;
68 | border-radius: 5px;
69 | }
70 | .cm-s-liquibyte div.CodeMirror-simplescroll-vertical div {
71 | border-top: 1px solid #404040;
72 | border-bottom: 1px solid #404040;
73 | }
74 | .cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div {
75 | border-left: 1px solid #404040;
76 | border-right: 1px solid #404040;
77 | }
78 | .cm-s-liquibyte div.CodeMirror-simplescroll-vertical {
79 | background-color: #262626;
80 | }
81 | .cm-s-liquibyte div.CodeMirror-simplescroll-horizontal {
82 | background-color: #262626;
83 | border-top: 1px solid #404040;
84 | }
85 | /* Overlay */
86 | .cm-s-liquibyte div.CodeMirror-overlayscroll-horizontal div, div.CodeMirror-overlayscroll-vertical div {
87 | background-color: #404040;
88 | border-radius: 5px;
89 | }
90 | .cm-s-liquibyte div.CodeMirror-overlayscroll-vertical div {
91 | border: 1px solid #404040;
92 | }
93 | .cm-s-liquibyte div.CodeMirror-overlayscroll-horizontal div {
94 | border: 1px solid #404040;
95 | }
96 |
--------------------------------------------------------------------------------
/app/styles/theme/lucario.css:
--------------------------------------------------------------------------------
1 | /*
2 | Name: lucario
3 | Author: Raphael Amorim
4 |
5 | Original Lucario color scheme (https://github.com/raphamorim/lucario)
6 | */
7 |
8 | .cm-s-lucario.CodeMirror, .cm-s-lucario .CodeMirror-gutters {
9 | background-color: #2b3e50 !important;
10 | color: #f8f8f2 !important;
11 | border: none;
12 | }
13 | .cm-s-lucario .CodeMirror-gutters { color: #2b3e50; }
14 | .cm-s-lucario .CodeMirror-cursor { border-left: solid thin #E6C845; }
15 | .cm-s-lucario .CodeMirror-linenumber { color: #f8f8f2; }
16 | .cm-s-lucario .CodeMirror-selected { background: #243443; }
17 | .cm-s-lucario .CodeMirror-line::selection, .cm-s-lucario .CodeMirror-line > span::selection, .cm-s-lucario .CodeMirror-line > span > span::selection { background: #243443; }
18 | .cm-s-lucario .CodeMirror-line::-moz-selection, .cm-s-lucario .CodeMirror-line > span::-moz-selection, .cm-s-lucario .CodeMirror-line > span > span::-moz-selection { background: #243443; }
19 | .cm-s-lucario span.cm-comment { color: #5c98cd; }
20 | .cm-s-lucario span.cm-string, .cm-s-lucario span.cm-string-2 { color: #E6DB74; }
21 | .cm-s-lucario span.cm-number { color: #ca94ff; }
22 | .cm-s-lucario span.cm-variable { color: #f8f8f2; }
23 | .cm-s-lucario span.cm-variable-2 { color: #f8f8f2; }
24 | .cm-s-lucario span.cm-def { color: #72C05D; }
25 | .cm-s-lucario span.cm-operator { color: #66D9EF; }
26 | .cm-s-lucario span.cm-keyword { color: #ff6541; }
27 | .cm-s-lucario span.cm-atom { color: #bd93f9; }
28 | .cm-s-lucario span.cm-meta { color: #f8f8f2; }
29 | .cm-s-lucario span.cm-tag { color: #ff6541; }
30 | .cm-s-lucario span.cm-attribute { color: #66D9EF; }
31 | .cm-s-lucario span.cm-qualifier { color: #72C05D; }
32 | .cm-s-lucario span.cm-property { color: #f8f8f2; }
33 | .cm-s-lucario span.cm-builtin { color: #72C05D; }
34 | .cm-s-lucario span.cm-variable-3, .cm-s-lucario span.cm-type { color: #ffb86c; }
35 |
36 | .cm-s-lucario .CodeMirror-activeline-background { background: #243443; }
37 | .cm-s-lucario .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
38 |
--------------------------------------------------------------------------------
/app/styles/theme/material-darker.css:
--------------------------------------------------------------------------------
1 | /*
2 | Name: material
3 | Author: Mattia Astorino (http://github.com/equinusocio)
4 | Website: https://material-theme.site/
5 | */
6 |
7 | .cm-s-material-darker.CodeMirror {
8 | background-color: #212121;
9 | color: #EEFFFF;
10 | }
11 |
12 | .cm-s-material-darker .CodeMirror-gutters {
13 | background: #212121;
14 | color: #545454;
15 | border: none;
16 | }
17 |
18 | .cm-s-material-darker .CodeMirror-guttermarker,
19 | .cm-s-material-darker .CodeMirror-guttermarker-subtle,
20 | .cm-s-material-darker .CodeMirror-linenumber {
21 | color: #545454;
22 | }
23 |
24 | .cm-s-material-darker .CodeMirror-cursor {
25 | border-left: 1px solid #FFCC00;
26 | }
27 |
28 | .cm-s-material-darker div.CodeMirror-selected {
29 | background: rgba(97, 97, 97, 0.2);
30 | }
31 |
32 | .cm-s-material-darker.CodeMirror-focused div.CodeMirror-selected {
33 | background: rgba(97, 97, 97, 0.2);
34 | }
35 |
36 | .cm-s-material-darker .CodeMirror-line::selection,
37 | .cm-s-material-darker .CodeMirror-line>span::selection,
38 | .cm-s-material-darker .CodeMirror-line>span>span::selection {
39 | background: rgba(128, 203, 196, 0.2);
40 | }
41 |
42 | .cm-s-material-darker .CodeMirror-line::-moz-selection,
43 | .cm-s-material-darker .CodeMirror-line>span::-moz-selection,
44 | .cm-s-material-darker .CodeMirror-line>span>span::-moz-selection {
45 | background: rgba(128, 203, 196, 0.2);
46 | }
47 |
48 | .cm-s-material-darker .CodeMirror-activeline-background {
49 | background: rgba(0, 0, 0, 0.5);
50 | }
51 |
52 | .cm-s-material-darker .cm-keyword {
53 | color: #C792EA;
54 | }
55 |
56 | .cm-s-material-darker .cm-operator {
57 | color: #89DDFF;
58 | }
59 |
60 | .cm-s-material-darker .cm-variable-2 {
61 | color: #EEFFFF;
62 | }
63 |
64 | .cm-s-material-darker .cm-variable-3,
65 | .cm-s-material-darker .cm-type {
66 | color: #f07178;
67 | }
68 |
69 | .cm-s-material-darker .cm-builtin {
70 | color: #FFCB6B;
71 | }
72 |
73 | .cm-s-material-darker .cm-atom {
74 | color: #F78C6C;
75 | }
76 |
77 | .cm-s-material-darker .cm-number {
78 | color: #FF5370;
79 | }
80 |
81 | .cm-s-material-darker .cm-def {
82 | color: #82AAFF;
83 | }
84 |
85 | .cm-s-material-darker .cm-string {
86 | color: #C3E88D;
87 | }
88 |
89 | .cm-s-material-darker .cm-string-2 {
90 | color: #f07178;
91 | }
92 |
93 | .cm-s-material-darker .cm-comment {
94 | color: #545454;
95 | }
96 |
97 | .cm-s-material-darker .cm-variable {
98 | color: #f07178;
99 | }
100 |
101 | .cm-s-material-darker .cm-tag {
102 | color: #FF5370;
103 | }
104 |
105 | .cm-s-material-darker .cm-meta {
106 | color: #FFCB6B;
107 | }
108 |
109 | .cm-s-material-darker .cm-attribute {
110 | color: #C792EA;
111 | }
112 |
113 | .cm-s-material-darker .cm-property {
114 | color: #C792EA;
115 | }
116 |
117 | .cm-s-material-darker .cm-qualifier {
118 | color: #DECB6B;
119 | }
120 |
121 | .cm-s-material-darker .cm-variable-3,
122 | .cm-s-material-darker .cm-type {
123 | color: #DECB6B;
124 | }
125 |
126 |
127 | .cm-s-material-darker .cm-error {
128 | color: rgba(255, 255, 255, 1.0);
129 | background-color: #FF5370;
130 | }
131 |
132 | .cm-s-material-darker .CodeMirror-matchingbracket {
133 | text-decoration: underline;
134 | color: white !important;
135 | }
--------------------------------------------------------------------------------
/app/styles/theme/material-ocean.css:
--------------------------------------------------------------------------------
1 | /*
2 | Name: material
3 | Author: Mattia Astorino (http://github.com/equinusocio)
4 | Website: https://material-theme.site/
5 | */
6 |
7 | .cm-s-material-ocean.CodeMirror {
8 | background-color: #0F111A;
9 | color: #8F93A2;
10 | }
11 |
12 | .cm-s-material-ocean .CodeMirror-gutters {
13 | background: #0F111A;
14 | color: #464B5D;
15 | border: none;
16 | }
17 |
18 | .cm-s-material-ocean .CodeMirror-guttermarker,
19 | .cm-s-material-ocean .CodeMirror-guttermarker-subtle,
20 | .cm-s-material-ocean .CodeMirror-linenumber {
21 | color: #464B5D;
22 | }
23 |
24 | .cm-s-material-ocean .CodeMirror-cursor {
25 | border-left: 1px solid #FFCC00;
26 | }
27 |
28 | .cm-s-material-ocean div.CodeMirror-selected {
29 | background: rgba(113, 124, 180, 0.2);
30 | }
31 |
32 | .cm-s-material-ocean.CodeMirror-focused div.CodeMirror-selected {
33 | background: rgba(113, 124, 180, 0.2);
34 | }
35 |
36 | .cm-s-material-ocean .CodeMirror-line::selection,
37 | .cm-s-material-ocean .CodeMirror-line>span::selection,
38 | .cm-s-material-ocean .CodeMirror-line>span>span::selection {
39 | background: rgba(128, 203, 196, 0.2);
40 | }
41 |
42 | .cm-s-material-ocean .CodeMirror-line::-moz-selection,
43 | .cm-s-material-ocean .CodeMirror-line>span::-moz-selection,
44 | .cm-s-material-ocean .CodeMirror-line>span>span::-moz-selection {
45 | background: rgba(128, 203, 196, 0.2);
46 | }
47 |
48 | .cm-s-material-ocean .CodeMirror-activeline-background {
49 | background: rgba(0, 0, 0, 0.5);
50 | }
51 |
52 | .cm-s-material-ocean .cm-keyword {
53 | color: #C792EA;
54 | }
55 |
56 | .cm-s-material-ocean .cm-operator {
57 | color: #89DDFF;
58 | }
59 |
60 | .cm-s-material-ocean .cm-variable-2 {
61 | color: #EEFFFF;
62 | }
63 |
64 | .cm-s-material-ocean .cm-variable-3,
65 | .cm-s-material-ocean .cm-type {
66 | color: #f07178;
67 | }
68 |
69 | .cm-s-material-ocean .cm-builtin {
70 | color: #FFCB6B;
71 | }
72 |
73 | .cm-s-material-ocean .cm-atom {
74 | color: #F78C6C;
75 | }
76 |
77 | .cm-s-material-ocean .cm-number {
78 | color: #FF5370;
79 | }
80 |
81 | .cm-s-material-ocean .cm-def {
82 | color: #82AAFF;
83 | }
84 |
85 | .cm-s-material-ocean .cm-string {
86 | color: #C3E88D;
87 | }
88 |
89 | .cm-s-material-ocean .cm-string-2 {
90 | color: #f07178;
91 | }
92 |
93 | .cm-s-material-ocean .cm-comment {
94 | color: #464B5D;
95 | }
96 |
97 | .cm-s-material-ocean .cm-variable {
98 | color: #f07178;
99 | }
100 |
101 | .cm-s-material-ocean .cm-tag {
102 | color: #FF5370;
103 | }
104 |
105 | .cm-s-material-ocean .cm-meta {
106 | color: #FFCB6B;
107 | }
108 |
109 | .cm-s-material-ocean .cm-attribute {
110 | color: #C792EA;
111 | }
112 |
113 | .cm-s-material-ocean .cm-property {
114 | color: #C792EA;
115 | }
116 |
117 | .cm-s-material-ocean .cm-qualifier {
118 | color: #DECB6B;
119 | }
120 |
121 | .cm-s-material-ocean .cm-variable-3,
122 | .cm-s-material-ocean .cm-type {
123 | color: #DECB6B;
124 | }
125 |
126 |
127 | .cm-s-material-ocean .cm-error {
128 | color: rgba(255, 255, 255, 1.0);
129 | background-color: #FF5370;
130 | }
131 |
132 | .cm-s-material-ocean .CodeMirror-matchingbracket {
133 | text-decoration: underline;
134 | color: white !important;
135 | }
--------------------------------------------------------------------------------
/app/styles/theme/material-palenight.css:
--------------------------------------------------------------------------------
1 | /*
2 | Name: material
3 | Author: Mattia Astorino (http://github.com/equinusocio)
4 | Website: https://material-theme.site/
5 | */
6 |
7 | .cm-s-material-palenight.CodeMirror {
8 | background-color: #292D3E;
9 | color: #A6ACCD;
10 | }
11 |
12 | .cm-s-material-palenight .CodeMirror-gutters {
13 | background: #292D3E;
14 | color: #676E95;
15 | border: none;
16 | }
17 |
18 | .cm-s-material-palenight .CodeMirror-guttermarker,
19 | .cm-s-material-palenight .CodeMirror-guttermarker-subtle,
20 | .cm-s-material-palenight .CodeMirror-linenumber {
21 | color: #676E95;
22 | }
23 |
24 | .cm-s-material-palenight .CodeMirror-cursor {
25 | border-left: 1px solid #FFCC00;
26 | }
27 |
28 | .cm-s-material-palenight div.CodeMirror-selected {
29 | background: rgba(113, 124, 180, 0.2);
30 | }
31 |
32 | .cm-s-material-palenight.CodeMirror-focused div.CodeMirror-selected {
33 | background: rgba(113, 124, 180, 0.2);
34 | }
35 |
36 | .cm-s-material-palenight .CodeMirror-line::selection,
37 | .cm-s-material-palenight .CodeMirror-line>span::selection,
38 | .cm-s-material-palenight .CodeMirror-line>span>span::selection {
39 | background: rgba(128, 203, 196, 0.2);
40 | }
41 |
42 | .cm-s-material-palenight .CodeMirror-line::-moz-selection,
43 | .cm-s-material-palenight .CodeMirror-line>span::-moz-selection,
44 | .cm-s-material-palenight .CodeMirror-line>span>span::-moz-selection {
45 | background: rgba(128, 203, 196, 0.2);
46 | }
47 |
48 | .cm-s-material-palenight .CodeMirror-activeline-background {
49 | background: rgba(0, 0, 0, 0.5);
50 | }
51 |
52 | .cm-s-material-palenight .cm-keyword {
53 | color: #C792EA;
54 | }
55 |
56 | .cm-s-material-palenight .cm-operator {
57 | color: #89DDFF;
58 | }
59 |
60 | .cm-s-material-palenight .cm-variable-2 {
61 | color: #EEFFFF;
62 | }
63 |
64 | .cm-s-material-palenight .cm-variable-3,
65 | .cm-s-material-palenight .cm-type {
66 | color: #f07178;
67 | }
68 |
69 | .cm-s-material-palenight .cm-builtin {
70 | color: #FFCB6B;
71 | }
72 |
73 | .cm-s-material-palenight .cm-atom {
74 | color: #F78C6C;
75 | }
76 |
77 | .cm-s-material-palenight .cm-number {
78 | color: #FF5370;
79 | }
80 |
81 | .cm-s-material-palenight .cm-def {
82 | color: #82AAFF;
83 | }
84 |
85 | .cm-s-material-palenight .cm-string {
86 | color: #C3E88D;
87 | }
88 |
89 | .cm-s-material-palenight .cm-string-2 {
90 | color: #f07178;
91 | }
92 |
93 | .cm-s-material-palenight .cm-comment {
94 | color: #676E95;
95 | }
96 |
97 | .cm-s-material-palenight .cm-variable {
98 | color: #f07178;
99 | }
100 |
101 | .cm-s-material-palenight .cm-tag {
102 | color: #FF5370;
103 | }
104 |
105 | .cm-s-material-palenight .cm-meta {
106 | color: #FFCB6B;
107 | }
108 |
109 | .cm-s-material-palenight .cm-attribute {
110 | color: #C792EA;
111 | }
112 |
113 | .cm-s-material-palenight .cm-property {
114 | color: #C792EA;
115 | }
116 |
117 | .cm-s-material-palenight .cm-qualifier {
118 | color: #DECB6B;
119 | }
120 |
121 | .cm-s-material-palenight .cm-variable-3,
122 | .cm-s-material-palenight .cm-type {
123 | color: #DECB6B;
124 | }
125 |
126 |
127 | .cm-s-material-palenight .cm-error {
128 | color: rgba(255, 255, 255, 1.0);
129 | background-color: #FF5370;
130 | }
131 |
132 | .cm-s-material-palenight .CodeMirror-matchingbracket {
133 | text-decoration: underline;
134 | color: white !important;
135 | }
--------------------------------------------------------------------------------
/app/styles/theme/material.css:
--------------------------------------------------------------------------------
1 | /*
2 | Name: material
3 | Author: Mattia Astorino (http://github.com/equinusocio)
4 | Website: https://material-theme.site/
5 | */
6 |
7 | .cm-s-material.CodeMirror {
8 | background-color: #263238;
9 | color: #EEFFFF;
10 | }
11 |
12 | .cm-s-material .CodeMirror-gutters {
13 | background: #263238;
14 | color: #546E7A;
15 | border: none;
16 | }
17 |
18 | .cm-s-material .CodeMirror-guttermarker,
19 | .cm-s-material .CodeMirror-guttermarker-subtle,
20 | .cm-s-material .CodeMirror-linenumber {
21 | color: #546E7A;
22 | }
23 |
24 | .cm-s-material .CodeMirror-cursor {
25 | border-left: 1px solid #FFCC00;
26 | }
27 |
28 | .cm-s-material div.CodeMirror-selected {
29 | background: rgba(128, 203, 196, 0.2);
30 | }
31 |
32 | .cm-s-material.CodeMirror-focused div.CodeMirror-selected {
33 | background: rgba(128, 203, 196, 0.2);
34 | }
35 |
36 | .cm-s-material .CodeMirror-line::selection,
37 | .cm-s-material .CodeMirror-line>span::selection,
38 | .cm-s-material .CodeMirror-line>span>span::selection {
39 | background: rgba(128, 203, 196, 0.2);
40 | }
41 |
42 | .cm-s-material .CodeMirror-line::-moz-selection,
43 | .cm-s-material .CodeMirror-line>span::-moz-selection,
44 | .cm-s-material .CodeMirror-line>span>span::-moz-selection {
45 | background: rgba(128, 203, 196, 0.2);
46 | }
47 |
48 | .cm-s-material .CodeMirror-activeline-background {
49 | background: rgba(0, 0, 0, 0.5);
50 | }
51 |
52 | .cm-s-material .cm-keyword {
53 | color: #C792EA;
54 | }
55 |
56 | .cm-s-material .cm-operator {
57 | color: #89DDFF;
58 | }
59 |
60 | .cm-s-material .cm-variable-2 {
61 | color: #EEFFFF;
62 | }
63 |
64 | .cm-s-material .cm-variable-3,
65 | .cm-s-material .cm-type {
66 | color: #f07178;
67 | }
68 |
69 | .cm-s-material .cm-builtin {
70 | color: #FFCB6B;
71 | }
72 |
73 | .cm-s-material .cm-atom {
74 | color: #F78C6C;
75 | }
76 |
77 | .cm-s-material .cm-number {
78 | color: #FF5370;
79 | }
80 |
81 | .cm-s-material .cm-def {
82 | color: #82AAFF;
83 | }
84 |
85 | .cm-s-material .cm-string {
86 | color: #C3E88D;
87 | }
88 |
89 | .cm-s-material .cm-string-2 {
90 | color: #f07178;
91 | }
92 |
93 | .cm-s-material .cm-comment {
94 | color: #546E7A;
95 | }
96 |
97 | .cm-s-material .cm-variable {
98 | color: #f07178;
99 | }
100 |
101 | .cm-s-material .cm-tag {
102 | color: #FF5370;
103 | }
104 |
105 | .cm-s-material .cm-meta {
106 | color: #FFCB6B;
107 | }
108 |
109 | .cm-s-material .cm-attribute {
110 | color: #C792EA;
111 | }
112 |
113 | .cm-s-material .cm-property {
114 | color: #C792EA;
115 | }
116 |
117 | .cm-s-material .cm-qualifier {
118 | color: #DECB6B;
119 | }
120 |
121 | .cm-s-material .cm-variable-3,
122 | .cm-s-material .cm-type {
123 | color: #DECB6B;
124 | }
125 |
126 |
127 | .cm-s-material .cm-error {
128 | color: rgba(255, 255, 255, 1.0);
129 | background-color: #FF5370;
130 | }
131 |
132 | .cm-s-material .CodeMirror-matchingbracket {
133 | text-decoration: underline;
134 | color: white !important;
135 | }
--------------------------------------------------------------------------------
/app/styles/theme/mbo.css:
--------------------------------------------------------------------------------
1 | /****************************************************************/
2 | /* Based on mbonaci's Brackets mbo theme */
3 | /* https://github.com/mbonaci/global/blob/master/Mbo.tmTheme */
4 | /* Create your own: http://tmtheme-editor.herokuapp.com */
5 | /****************************************************************/
6 |
7 | .cm-s-mbo.CodeMirror { background: #2c2c2c; color: #ffffec; }
8 | .cm-s-mbo div.CodeMirror-selected { background: #716C62; }
9 | .cm-s-mbo .CodeMirror-line::selection, .cm-s-mbo .CodeMirror-line > span::selection, .cm-s-mbo .CodeMirror-line > span > span::selection { background: rgba(113, 108, 98, .99); }
10 | .cm-s-mbo .CodeMirror-line::-moz-selection, .cm-s-mbo .CodeMirror-line > span::-moz-selection, .cm-s-mbo .CodeMirror-line > span > span::-moz-selection { background: rgba(113, 108, 98, .99); }
11 | .cm-s-mbo .CodeMirror-gutters { background: #4e4e4e; border-right: 0px; }
12 | .cm-s-mbo .CodeMirror-guttermarker { color: white; }
13 | .cm-s-mbo .CodeMirror-guttermarker-subtle { color: grey; }
14 | .cm-s-mbo .CodeMirror-linenumber { color: #dadada; }
15 | .cm-s-mbo .CodeMirror-cursor { border-left: 1px solid #ffffec; }
16 |
17 | .cm-s-mbo span.cm-comment { color: #95958a; }
18 | .cm-s-mbo span.cm-atom { color: #00a8c6; }
19 | .cm-s-mbo span.cm-number { color: #00a8c6; }
20 |
21 | .cm-s-mbo span.cm-property, .cm-s-mbo span.cm-attribute { color: #9ddfe9; }
22 | .cm-s-mbo span.cm-keyword { color: #ffb928; }
23 | .cm-s-mbo span.cm-string { color: #ffcf6c; }
24 | .cm-s-mbo span.cm-string.cm-property { color: #ffffec; }
25 |
26 | .cm-s-mbo span.cm-variable { color: #ffffec; }
27 | .cm-s-mbo span.cm-variable-2 { color: #00a8c6; }
28 | .cm-s-mbo span.cm-def { color: #ffffec; }
29 | .cm-s-mbo span.cm-bracket { color: #fffffc; font-weight: bold; }
30 | .cm-s-mbo span.cm-tag { color: #9ddfe9; }
31 | .cm-s-mbo span.cm-link { color: #f54b07; }
32 | .cm-s-mbo span.cm-error { border-bottom: #636363; color: #ffffec; }
33 | .cm-s-mbo span.cm-qualifier { color: #ffffec; }
34 |
35 | .cm-s-mbo .CodeMirror-activeline-background { background: #494b41; }
36 | .cm-s-mbo .CodeMirror-matchingbracket { color: #ffb928 !important; }
37 | .cm-s-mbo .CodeMirror-matchingtag { background: rgba(255, 255, 255, .37); }
38 |
--------------------------------------------------------------------------------
/app/styles/theme/mdn-like.css:
--------------------------------------------------------------------------------
1 | /*
2 | MDN-LIKE Theme - Mozilla
3 | Ported to CodeMirror by Peter Kroon
4 | Report bugs/issues here: https://github.com/codemirror/CodeMirror/issues
5 | GitHub: @peterkroon
6 |
7 | The mdn-like theme is inspired on the displayed code examples at: https://developer.mozilla.org/en-US/docs/Web/CSS/animation
8 |
9 | */
10 | .cm-s-mdn-like.CodeMirror { color: #999; background-color: #fff; }
11 | .cm-s-mdn-like div.CodeMirror-selected { background: #cfc; }
12 | .cm-s-mdn-like .CodeMirror-line::selection, .cm-s-mdn-like .CodeMirror-line > span::selection, .cm-s-mdn-like .CodeMirror-line > span > span::selection { background: #cfc; }
13 | .cm-s-mdn-like .CodeMirror-line::-moz-selection, .cm-s-mdn-like .CodeMirror-line > span::-moz-selection, .cm-s-mdn-like .CodeMirror-line > span > span::-moz-selection { background: #cfc; }
14 |
15 | .cm-s-mdn-like .CodeMirror-gutters { background: #f8f8f8; border-left: 6px solid rgba(0,83,159,0.65); color: #333; }
16 | .cm-s-mdn-like .CodeMirror-linenumber { color: #aaa; padding-left: 8px; }
17 | .cm-s-mdn-like .CodeMirror-cursor { border-left: 2px solid #222; }
18 |
19 | .cm-s-mdn-like .cm-keyword { color: #6262FF; }
20 | .cm-s-mdn-like .cm-atom { color: #F90; }
21 | .cm-s-mdn-like .cm-number { color: #ca7841; }
22 | .cm-s-mdn-like .cm-def { color: #8DA6CE; }
23 | .cm-s-mdn-like span.cm-variable-2, .cm-s-mdn-like span.cm-tag { color: #690; }
24 | .cm-s-mdn-like span.cm-variable-3, .cm-s-mdn-like span.cm-def, .cm-s-mdn-like span.cm-type { color: #07a; }
25 |
26 | .cm-s-mdn-like .cm-variable { color: #07a; }
27 | .cm-s-mdn-like .cm-property { color: #905; }
28 | .cm-s-mdn-like .cm-qualifier { color: #690; }
29 |
30 | .cm-s-mdn-like .cm-operator { color: #cda869; }
31 | .cm-s-mdn-like .cm-comment { color:#777; font-weight:normal; }
32 | .cm-s-mdn-like .cm-string { color:#07a; font-style:italic; }
33 | .cm-s-mdn-like .cm-string-2 { color:#bd6b18; } /*?*/
34 | .cm-s-mdn-like .cm-meta { color: #000; } /*?*/
35 | .cm-s-mdn-like .cm-builtin { color: #9B7536; } /*?*/
36 | .cm-s-mdn-like .cm-tag { color: #997643; }
37 | .cm-s-mdn-like .cm-attribute { color: #d6bb6d; } /*?*/
38 | .cm-s-mdn-like .cm-header { color: #FF6400; }
39 | .cm-s-mdn-like .cm-hr { color: #AEAEAE; }
40 | .cm-s-mdn-like .cm-link { color:#ad9361; font-style:italic; text-decoration:none; }
41 | .cm-s-mdn-like .cm-error { border-bottom: 1px solid red; }
42 |
43 | div.cm-s-mdn-like .CodeMirror-activeline-background { background: #efefff; }
44 | div.cm-s-mdn-like span.CodeMirror-matchingbracket { outline:1px solid grey; color: inherit; }
45 |
46 | .cm-s-mdn-like.CodeMirror { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAAAyCAYAAAAp8UeFAAAHvklEQVR42s2b63bcNgyEQZCSHCdt2vd/0tWF7I+Q6XgMXiTtuvU5Pl57ZQKkKHzEAOtF5KeIJBGJ8uvL599FRFREZhFx8DeXv8trn68RuGaC8TRfo3SNp9dlDDHedyLyTUTeRWStXKPZrjtpZxaRw5hPqozRs1N8/enzIiQRWcCgy4MUA0f+XWliDhyL8Lfyvx7ei/Ae3iQFHyw7U/59pQVIMEEPEz0G7XiwdRjzSfC3UTtz9vchIntxvry5iMgfIhJoEflOz2CQr3F5h/HfeFe+GTdLaKcu9L8LTeQb/R/7GgbsfKedyNdoHsN31uRPWrfZ5wsj/NzzRQHuToIdU3ahwnsKPxXCjJITuOsi7XLc7SG/v5GdALs7wf8JjTFiB5+QvTEfRyGOfX3Lrx8wxyQi3sNq46O7QahQiCsRFgqddjBouVEHOKDgXAQHD9gJCr5sMKkEdjwsarG/ww3BMHBU7OBjXnzdyY7SfCxf5/z6ATccrwlKuwC/jhznnPF4CgVzhhVf4xp2EixcBActO75iZ8/fM9zAs2OMzKdslgXWJ9XG8PQoOAMA5fGcsvORgv0doBXyHrCwfLJAOwo71QLNkb8n2Pl6EWiR7OCibtkPaz4Kc/0NNAze2gju3zOwekALDaCFPI5vjPFmgGY5AZqyGEvH1x7QfIb8YtxMnA/b+QQ0aQDAwc6JMFg8CbQZ4qoYEEHbRwNojuK3EHwd7VALSgq+MNDKzfT58T8qdpADrgW0GmgcAS1lhzztJmkAzcPNOQbsWEALBDSlMKUG0Eq4CLAQWvEVQ9WU57gZJwZtgPO3r9oBTQ9WO8TjqXINx8R0EYpiZEUWOF3FxkbJkgU9B2f41YBrIj5ZfsQa0M5kTgiAAqM3ShXLgu8XMqcrQBvJ0CL5pnTsfMB13oB8athpAq2XOQmcGmoACCLydx7nToa23ATaSIY2ichfOdPTGxlasXMLaL0MLZAOwAKIM+y8CmicobGdCcbbK9DzN+yYGVoNNI5iUKTMyYOjPse4A8SM1MmcXgU0toOq1yO/v8FOxlASyc7TgeYaAMBJHcY1CcCwGI/TK4AmDbDyKYBBtFUkRwto8gygiQEaByFgJ00BH2M8JWwQS1nafDXQCidWyOI8AcjDCSjCLk8ngObuAm3JAHAdubAmOaK06V8MNEsKPJOhobSprwQa6gD7DclRQdqcwL4zxqgBrQcabUiBLclRDKAlWp+etPkBaNMA0AKlrHwTdEByZAA4GM+SNluSY6wAzcMNewxmgig5Ks0nkrSpBvSaQHMdKTBAnLojOdYyGpQ254602ZILPdTD1hdlggdIm74jbTp8vDwF5ZYUeLWGJpWsh6XNyXgcYwVoJQTEhhTYkxzZjiU5npU2TaB979TQehlaAVq4kaGpiPwwwLkYUuBbQwocyQTv1tA0+1UFWoJF3iv1oq+qoSk8EQdJmwHkziIF7oOZk14EGitibAdjLYYK78H5vZOhtWpoI0ATGHs0Q8OMb4Ey+2bU2UYztCtA0wFAs7TplGLRVQCcqaFdGSPCeTI1QNIC52iWNzof6Uib7xjEp07mNNoUYmVosVItHrHzRlLgBn9LFyRHaQCtVUMbtTNhoXWiTOO9k/V8BdAc1Oq0ArSQs6/5SU0hckNy9NnXqQY0PGYo5dWJ7nINaN6o958FWin27aBaWRka1r5myvLOAm0j30eBJqCxHLReVclxhxOEN2JfDWjxBtAC7MIH1fVaGdoOp4qJYDgKtKPSFNID2gSnGldrCqkFZ+5UeQXQBIRrSwocbdZYQT/2LwRahBPBXoHrB8nxaGROST62DKUbQOMMzZIC9abkuELfQzQALWTnDNAm8KHWFOJgJ5+SHIvTPcmx1xQyZRhNL5Qci689aXMEaN/uNIWkEwDAvFpOZmgsBaaGnbs1NPa1Jm32gBZAIh1pCtG7TSH4aE0y1uVY4uqoFPisGlpP2rSA5qTecWn5agK6BzSpgAyD+wFaqhnYoSZ1Vwr8CmlTQbrcO3ZaX0NAEyMbYaAlyquFoLKK3SPby9CeVUPThrSJmkCAE0CrKUQadi4DrdSlWhmah0YL9z9vClH59YGbHx1J8VZTyAjQepJjmXwAKTDQI3omc3p1U4gDUf6RfcdYfrUp5ClAi2J3Ba6UOXGo+K+bQrjjssitG2SJzshaLwMtXgRagUNpYYoVkMSBLM+9GGiJZMvduG6DRZ4qc04DMPtQQxOjEtACmhO7K1AbNbQDEggZyJwscFpAGwENhoBeUwh3bWolhe8BTYVKxQEWrSUn/uhcM5KhvUu/+eQu0Lzhi+VrK0PrZZNDQKs9cpYUuFYgMVpD4/NxenJTiMCNqdUEUf1qZWjppLT5qSkkUZbCwkbZMSuVnu80hfSkzRbQeqCZSAh6huR4VtoM2gHAlLf72smuWgE+VV7XpE25Ab2WFDgyhnSuKbs4GuGzCjR+tIoUuMFg3kgcWKLTwRqanJQ2W00hAsenfaApRC42hbCvK1SlE0HtE9BGgneJO+ELamitD1YjjOYnNYVcraGhtKkW0EqVVeDx733I2NH581k1NNxNLG0i0IJ8/NjVaOZ0tYZ2Vtr0Xv7tPV3hkWp9EFkgS/J0vosngTaSoaG06WHi+xObQkaAdlbanP8B2+2l0f90LmUAAAAASUVORK5CYII=); }
47 |
--------------------------------------------------------------------------------
/app/styles/theme/midnight.css:
--------------------------------------------------------------------------------
1 | /* Based on the theme at http://bonsaiden.github.com/JavaScript-Garden */
2 |
3 | /**/
4 | .cm-s-midnight .CodeMirror-activeline-background { background: #253540; }
5 |
6 | .cm-s-midnight.CodeMirror {
7 | background: #0F192A;
8 | color: #D1EDFF;
9 | }
10 |
11 | .cm-s-midnight div.CodeMirror-selected { background: #314D67; }
12 | .cm-s-midnight .CodeMirror-line::selection, .cm-s-midnight .CodeMirror-line > span::selection, .cm-s-midnight .CodeMirror-line > span > span::selection { background: rgba(49, 77, 103, .99); }
13 | .cm-s-midnight .CodeMirror-line::-moz-selection, .cm-s-midnight .CodeMirror-line > span::-moz-selection, .cm-s-midnight .CodeMirror-line > span > span::-moz-selection { background: rgba(49, 77, 103, .99); }
14 | .cm-s-midnight .CodeMirror-gutters { background: #0F192A; border-right: 1px solid; }
15 | .cm-s-midnight .CodeMirror-guttermarker { color: white; }
16 | .cm-s-midnight .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
17 | .cm-s-midnight .CodeMirror-linenumber { color: #D0D0D0; }
18 | .cm-s-midnight .CodeMirror-cursor { border-left: 1px solid #F8F8F0; }
19 |
20 | .cm-s-midnight span.cm-comment { color: #428BDD; }
21 | .cm-s-midnight span.cm-atom { color: #AE81FF; }
22 | .cm-s-midnight span.cm-number { color: #D1EDFF; }
23 |
24 | .cm-s-midnight span.cm-property, .cm-s-midnight span.cm-attribute { color: #A6E22E; }
25 | .cm-s-midnight span.cm-keyword { color: #E83737; }
26 | .cm-s-midnight span.cm-string { color: #1DC116; }
27 |
28 | .cm-s-midnight span.cm-variable { color: #FFAA3E; }
29 | .cm-s-midnight span.cm-variable-2 { color: #FFAA3E; }
30 | .cm-s-midnight span.cm-def { color: #4DD; }
31 | .cm-s-midnight span.cm-bracket { color: #D1EDFF; }
32 | .cm-s-midnight span.cm-tag { color: #449; }
33 | .cm-s-midnight span.cm-link { color: #AE81FF; }
34 | .cm-s-midnight span.cm-error { background: #F92672; color: #F8F8F0; }
35 |
36 | .cm-s-midnight .CodeMirror-matchingbracket {
37 | text-decoration: underline;
38 | color: white !important;
39 | }
40 |
--------------------------------------------------------------------------------
/app/styles/theme/monokai.css:
--------------------------------------------------------------------------------
1 | /* Based on Sublime Text's Monokai theme */
2 |
3 | .cm-s-monokai.CodeMirror { background: #272822; color: #f8f8f2; }
4 | .cm-s-monokai div.CodeMirror-selected { background: #49483E; }
5 | .cm-s-monokai .CodeMirror-line::selection, .cm-s-monokai .CodeMirror-line > span::selection, .cm-s-monokai .CodeMirror-line > span > span::selection { background: rgba(73, 72, 62, .99); }
6 | .cm-s-monokai .CodeMirror-line::-moz-selection, .cm-s-monokai .CodeMirror-line > span::-moz-selection, .cm-s-monokai .CodeMirror-line > span > span::-moz-selection { background: rgba(73, 72, 62, .99); }
7 | .cm-s-monokai .CodeMirror-gutters { background: #272822; border-right: 0px; }
8 | .cm-s-monokai .CodeMirror-guttermarker { color: white; }
9 | .cm-s-monokai .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
10 | .cm-s-monokai .CodeMirror-linenumber { color: #d0d0d0; }
11 | .cm-s-monokai .CodeMirror-cursor { border-left: 1px solid #f8f8f0; }
12 |
13 | .cm-s-monokai span.cm-comment { color: #75715e; }
14 | .cm-s-monokai span.cm-atom { color: #ae81ff; }
15 | .cm-s-monokai span.cm-number { color: #ae81ff; }
16 |
17 | .cm-s-monokai span.cm-comment.cm-attribute { color: #97b757; }
18 | .cm-s-monokai span.cm-comment.cm-def { color: #bc9262; }
19 | .cm-s-monokai span.cm-comment.cm-tag { color: #bc6283; }
20 | .cm-s-monokai span.cm-comment.cm-type { color: #5998a6; }
21 |
22 | .cm-s-monokai span.cm-property, .cm-s-monokai span.cm-attribute { color: #a6e22e; }
23 | .cm-s-monokai span.cm-keyword { color: #f92672; }
24 | .cm-s-monokai span.cm-builtin { color: #66d9ef; }
25 | .cm-s-monokai span.cm-string { color: #e6db74; }
26 |
27 | .cm-s-monokai span.cm-variable { color: #f8f8f2; }
28 | .cm-s-monokai span.cm-variable-2 { color: #9effff; }
29 | .cm-s-monokai span.cm-variable-3, .cm-s-monokai span.cm-type { color: #66d9ef; }
30 | .cm-s-monokai span.cm-def { color: #fd971f; }
31 | .cm-s-monokai span.cm-bracket { color: #f8f8f2; }
32 | .cm-s-monokai span.cm-tag { color: #f92672; }
33 | .cm-s-monokai span.cm-header { color: #ae81ff; }
34 | .cm-s-monokai span.cm-link { color: #ae81ff; }
35 | .cm-s-monokai span.cm-error { background: #f92672; color: #f8f8f0; }
36 |
37 | .cm-s-monokai .CodeMirror-activeline-background { background: #373831; }
38 | .cm-s-monokai .CodeMirror-matchingbracket {
39 | text-decoration: underline;
40 | color: white !important;
41 | }
42 |
--------------------------------------------------------------------------------
/app/styles/theme/moxer.css:
--------------------------------------------------------------------------------
1 | /*
2 | Name: Moxer Theme
3 | Author: Mattia Astorino (http://github.com/equinusocio)
4 | Website: https://github.com/moxer-theme/moxer-code
5 | */
6 |
7 | .cm-s-moxer.CodeMirror {
8 | background-color: #090A0F;
9 | color: #8E95B4;
10 | line-height: 1.8;
11 | }
12 |
13 | .cm-s-moxer .CodeMirror-gutters {
14 | background: #090A0F;
15 | color: #35394B;
16 | border: none;
17 | }
18 |
19 | .cm-s-moxer .CodeMirror-guttermarker,
20 | .cm-s-moxer .CodeMirror-guttermarker-subtle,
21 | .cm-s-moxer .CodeMirror-linenumber {
22 | color: #35394B;
23 | }
24 |
25 |
26 | .cm-s-moxer .CodeMirror-cursor {
27 | border-left: 1px solid #FFCC00;
28 | }
29 |
30 | .cm-s-moxer div.CodeMirror-selected {
31 | background: rgba(128, 203, 196, 0.2);
32 | }
33 |
34 | .cm-s-moxer.CodeMirror-focused div.CodeMirror-selected {
35 | background: #212431;
36 | }
37 |
38 | .cm-s-moxer .CodeMirror-line::selection,
39 | .cm-s-moxer .CodeMirror-line>span::selection,
40 | .cm-s-moxer .CodeMirror-line>span>span::selection {
41 | background: #212431;
42 | }
43 |
44 | .cm-s-moxer .CodeMirror-line::-moz-selection,
45 | .cm-s-moxer .CodeMirror-line>span::-moz-selection,
46 | .cm-s-moxer .CodeMirror-line>span>span::-moz-selection {
47 | background: #212431;
48 | }
49 |
50 | .cm-s-moxer .CodeMirror-activeline-background,
51 | .cm-s-moxer .CodeMirror-activeline-gutter .CodeMirror-linenumber {
52 | background: rgba(33, 36, 49, 0.5);
53 | }
54 |
55 | .cm-s-moxer .cm-keyword {
56 | color: #D46C6C;
57 | }
58 |
59 | .cm-s-moxer .cm-operator {
60 | color: #D46C6C;
61 | }
62 |
63 | .cm-s-moxer .cm-variable-2 {
64 | color: #81C5DA;
65 | }
66 |
67 |
68 | .cm-s-moxer .cm-variable-3,
69 | .cm-s-moxer .cm-type {
70 | color: #f07178;
71 | }
72 |
73 | .cm-s-moxer .cm-builtin {
74 | color: #FFCB6B;
75 | }
76 |
77 | .cm-s-moxer .cm-atom {
78 | color: #A99BE2;
79 | }
80 |
81 | .cm-s-moxer .cm-number {
82 | color: #7CA4C0;
83 | }
84 |
85 | .cm-s-moxer .cm-def {
86 | color: #F5DFA5;
87 | }
88 |
89 | .cm-s-moxer .CodeMirror-line .cm-def ~ .cm-def {
90 | color: #81C5DA;
91 | }
92 |
93 | .cm-s-moxer .cm-string {
94 | color: #B2E4AE;
95 | }
96 |
97 | .cm-s-moxer .cm-string-2 {
98 | color: #f07178;
99 | }
100 |
101 | .cm-s-moxer .cm-comment {
102 | color: #3F445A;
103 | }
104 |
105 | .cm-s-moxer .cm-variable {
106 | color: #8E95B4;
107 | }
108 |
109 | .cm-s-moxer .cm-tag {
110 | color: #FF5370;
111 | }
112 |
113 | .cm-s-moxer .cm-meta {
114 | color: #FFCB6B;
115 | }
116 |
117 | .cm-s-moxer .cm-attribute {
118 | color: #C792EA;
119 | }
120 |
121 | .cm-s-moxer .cm-property {
122 | color: #81C5DA;
123 | }
124 |
125 | .cm-s-moxer .cm-qualifier {
126 | color: #DECB6B;
127 | }
128 |
129 | .cm-s-moxer .cm-variable-3,
130 | .cm-s-moxer .cm-type {
131 | color: #DECB6B;
132 | }
133 |
134 |
135 | .cm-s-moxer .cm-error {
136 | color: rgba(255, 255, 255, 1.0);
137 | background-color: #FF5370;
138 | }
139 |
140 | .cm-s-moxer .CodeMirror-matchingbracket {
141 | text-decoration: underline;
142 | color: white !important;
143 | }
--------------------------------------------------------------------------------
/app/styles/theme/neat.css:
--------------------------------------------------------------------------------
1 | .cm-s-neat span.cm-comment { color: #a86; }
2 | .cm-s-neat span.cm-keyword { line-height: 1em; font-weight: bold; color: blue; }
3 | .cm-s-neat span.cm-string { color: #a22; }
4 | .cm-s-neat span.cm-builtin { line-height: 1em; font-weight: bold; color: #077; }
5 | .cm-s-neat span.cm-special { line-height: 1em; font-weight: bold; color: #0aa; }
6 | .cm-s-neat span.cm-variable { color: black; }
7 | .cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; }
8 | .cm-s-neat span.cm-meta { color: #555; }
9 | .cm-s-neat span.cm-link { color: #3a3; }
10 |
11 | .cm-s-neat .CodeMirror-activeline-background { background: #e8f2ff; }
12 | .cm-s-neat .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; }
13 |
--------------------------------------------------------------------------------
/app/styles/theme/neo.css:
--------------------------------------------------------------------------------
1 | /* neo theme for codemirror */
2 |
3 | /* Color scheme */
4 |
5 | .cm-s-neo.CodeMirror {
6 | background-color:#ffffff;
7 | color:#2e383c;
8 | line-height:1.4375;
9 | }
10 | .cm-s-neo .cm-comment { color:#75787b; }
11 | .cm-s-neo .cm-keyword, .cm-s-neo .cm-property { color:#1d75b3; }
12 | .cm-s-neo .cm-atom,.cm-s-neo .cm-number { color:#75438a; }
13 | .cm-s-neo .cm-node,.cm-s-neo .cm-tag { color:#9c3328; }
14 | .cm-s-neo .cm-string { color:#b35e14; }
15 | .cm-s-neo .cm-variable,.cm-s-neo .cm-qualifier { color:#047d65; }
16 |
17 |
18 | /* Editor styling */
19 |
20 | .cm-s-neo pre {
21 | padding:0;
22 | }
23 |
24 | .cm-s-neo .CodeMirror-gutters {
25 | border:none;
26 | border-right:10px solid transparent;
27 | background-color:transparent;
28 | }
29 |
30 | .cm-s-neo .CodeMirror-linenumber {
31 | padding:0;
32 | color:#e0e2e5;
33 | }
34 |
35 | .cm-s-neo .CodeMirror-guttermarker { color: #1d75b3; }
36 | .cm-s-neo .CodeMirror-guttermarker-subtle { color: #e0e2e5; }
37 |
38 | .cm-s-neo .CodeMirror-cursor {
39 | width: auto;
40 | border: 0;
41 | background: rgba(155,157,162,0.37);
42 | z-index: 1;
43 | }
44 |
--------------------------------------------------------------------------------
/app/styles/theme/night.css:
--------------------------------------------------------------------------------
1 | /* Loosely based on the Midnight Textmate theme */
2 |
3 | .cm-s-night.CodeMirror { background: #0a001f; color: #f8f8f8; }
4 | .cm-s-night div.CodeMirror-selected { background: #447; }
5 | .cm-s-night .CodeMirror-line::selection, .cm-s-night .CodeMirror-line > span::selection, .cm-s-night .CodeMirror-line > span > span::selection { background: rgba(68, 68, 119, .99); }
6 | .cm-s-night .CodeMirror-line::-moz-selection, .cm-s-night .CodeMirror-line > span::-moz-selection, .cm-s-night .CodeMirror-line > span > span::-moz-selection { background: rgba(68, 68, 119, .99); }
7 | .cm-s-night .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
8 | .cm-s-night .CodeMirror-guttermarker { color: white; }
9 | .cm-s-night .CodeMirror-guttermarker-subtle { color: #bbb; }
10 | .cm-s-night .CodeMirror-linenumber { color: #f8f8f8; }
11 | .cm-s-night .CodeMirror-cursor { border-left: 1px solid white; }
12 |
13 | .cm-s-night span.cm-comment { color: #8900d1; }
14 | .cm-s-night span.cm-atom { color: #845dc4; }
15 | .cm-s-night span.cm-number, .cm-s-night span.cm-attribute { color: #ffd500; }
16 | .cm-s-night span.cm-keyword { color: #599eff; }
17 | .cm-s-night span.cm-string { color: #37f14a; }
18 | .cm-s-night span.cm-meta { color: #7678e2; }
19 | .cm-s-night span.cm-variable-2, .cm-s-night span.cm-tag { color: #99b2ff; }
20 | .cm-s-night span.cm-variable-3, .cm-s-night span.cm-def, .cm-s-night span.cm-type { color: white; }
21 | .cm-s-night span.cm-bracket { color: #8da6ce; }
22 | .cm-s-night span.cm-builtin, .cm-s-night span.cm-special { color: #ff9e59; }
23 | .cm-s-night span.cm-link { color: #845dc4; }
24 | .cm-s-night span.cm-error { color: #9d1e15; }
25 |
26 | .cm-s-night .CodeMirror-activeline-background { background: #1C005A; }
27 | .cm-s-night .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; }
28 |
--------------------------------------------------------------------------------
/app/styles/theme/nord.css:
--------------------------------------------------------------------------------
1 | /* Based on arcticicestudio's Nord theme */
2 | /* https://github.com/arcticicestudio/nord */
3 |
4 | .cm-s-nord.CodeMirror { background: #2e3440; color: #d8dee9; }
5 | .cm-s-nord div.CodeMirror-selected { background: #434c5e; }
6 | .cm-s-nord .CodeMirror-line::selection, .cm-s-nord .CodeMirror-line > span::selection, .cm-s-nord .CodeMirror-line > span > span::selection { background: #3b4252; }
7 | .cm-s-nord .CodeMirror-line::-moz-selection, .cm-s-nord .CodeMirror-line > span::-moz-selection, .cm-s-nord .CodeMirror-line > span > span::-moz-selection { background: #3b4252; }
8 | .cm-s-nord .CodeMirror-gutters { background: #2e3440; border-right: 0px; }
9 | .cm-s-nord .CodeMirror-guttermarker { color: #4c566a; }
10 | .cm-s-nord .CodeMirror-guttermarker-subtle { color: #4c566a; }
11 | .cm-s-nord .CodeMirror-linenumber { color: #4c566a; }
12 | .cm-s-nord .CodeMirror-cursor { border-left: 1px solid #f8f8f0; }
13 |
14 | .cm-s-nord span.cm-comment { color: #4c566a; }
15 | .cm-s-nord span.cm-atom { color: #b48ead; }
16 | .cm-s-nord span.cm-number { color: #b48ead; }
17 |
18 | .cm-s-nord span.cm-comment.cm-attribute { color: #97b757; }
19 | .cm-s-nord span.cm-comment.cm-def { color: #bc9262; }
20 | .cm-s-nord span.cm-comment.cm-tag { color: #bc6283; }
21 | .cm-s-nord span.cm-comment.cm-type { color: #5998a6; }
22 |
23 | .cm-s-nord span.cm-property, .cm-s-nord span.cm-attribute { color: #8FBCBB; }
24 | .cm-s-nord span.cm-keyword { color: #81A1C1; }
25 | .cm-s-nord span.cm-builtin { color: #81A1C1; }
26 | .cm-s-nord span.cm-string { color: #A3BE8C; }
27 |
28 | .cm-s-nord span.cm-variable { color: #d8dee9; }
29 | .cm-s-nord span.cm-variable-2 { color: #d8dee9; }
30 | .cm-s-nord span.cm-variable-3, .cm-s-nord span.cm-type { color: #d8dee9; }
31 | .cm-s-nord span.cm-def { color: #8FBCBB; }
32 | .cm-s-nord span.cm-bracket { color: #81A1C1; }
33 | .cm-s-nord span.cm-tag { color: #bf616a; }
34 | .cm-s-nord span.cm-header { color: #b48ead; }
35 | .cm-s-nord span.cm-link { color: #b48ead; }
36 | .cm-s-nord span.cm-error { background: #bf616a; color: #f8f8f0; }
37 |
38 | .cm-s-nord .CodeMirror-activeline-background { background: #3b4252; }
39 | .cm-s-nord .CodeMirror-matchingbracket {
40 | text-decoration: underline;
41 | color: white !important;
42 | }
43 |
--------------------------------------------------------------------------------
/app/styles/theme/oceanic-next.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: oceanic-next
4 | Author: Filype Pereira (https://github.com/fpereira1)
5 |
6 | Original oceanic-next color scheme by Dmitri Voronianski (https://github.com/voronianski/oceanic-next-color-scheme)
7 |
8 | */
9 |
10 | .cm-s-oceanic-next.CodeMirror { background: #304148; color: #f8f8f2; }
11 | .cm-s-oceanic-next div.CodeMirror-selected { background: rgba(101, 115, 126, 0.33); }
12 | .cm-s-oceanic-next .CodeMirror-line::selection, .cm-s-oceanic-next .CodeMirror-line > span::selection, .cm-s-oceanic-next .CodeMirror-line > span > span::selection { background: rgba(101, 115, 126, 0.33); }
13 | .cm-s-oceanic-next .CodeMirror-line::-moz-selection, .cm-s-oceanic-next .CodeMirror-line > span::-moz-selection, .cm-s-oceanic-next .CodeMirror-line > span > span::-moz-selection { background: rgba(101, 115, 126, 0.33); }
14 | .cm-s-oceanic-next .CodeMirror-gutters { background: #304148; border-right: 10px; }
15 | .cm-s-oceanic-next .CodeMirror-guttermarker { color: white; }
16 | .cm-s-oceanic-next .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
17 | .cm-s-oceanic-next .CodeMirror-linenumber { color: #d0d0d0; }
18 | .cm-s-oceanic-next .CodeMirror-cursor { border-left: 1px solid #f8f8f0; }
19 |
20 | .cm-s-oceanic-next span.cm-comment { color: #65737E; }
21 | .cm-s-oceanic-next span.cm-atom { color: #C594C5; }
22 | .cm-s-oceanic-next span.cm-number { color: #F99157; }
23 |
24 | .cm-s-oceanic-next span.cm-property { color: #99C794; }
25 | .cm-s-oceanic-next span.cm-attribute,
26 | .cm-s-oceanic-next span.cm-keyword { color: #C594C5; }
27 | .cm-s-oceanic-next span.cm-builtin { color: #66d9ef; }
28 | .cm-s-oceanic-next span.cm-string { color: #99C794; }
29 |
30 | .cm-s-oceanic-next span.cm-variable,
31 | .cm-s-oceanic-next span.cm-variable-2,
32 | .cm-s-oceanic-next span.cm-variable-3 { color: #f8f8f2; }
33 | .cm-s-oceanic-next span.cm-def { color: #6699CC; }
34 | .cm-s-oceanic-next span.cm-bracket { color: #5FB3B3; }
35 | .cm-s-oceanic-next span.cm-tag { color: #C594C5; }
36 | .cm-s-oceanic-next span.cm-header { color: #C594C5; }
37 | .cm-s-oceanic-next span.cm-link { color: #C594C5; }
38 | .cm-s-oceanic-next span.cm-error { background: #C594C5; color: #f8f8f0; }
39 |
40 | .cm-s-oceanic-next .CodeMirror-activeline-background { background: rgba(101, 115, 126, 0.33); }
41 | .cm-s-oceanic-next .CodeMirror-matchingbracket {
42 | text-decoration: underline;
43 | color: white !important;
44 | }
45 |
--------------------------------------------------------------------------------
/app/styles/theme/panda-syntax.css:
--------------------------------------------------------------------------------
1 | /*
2 | Name: Panda Syntax
3 | Author: Siamak Mokhtari (http://github.com/siamak/)
4 | CodeMirror template by Siamak Mokhtari (https://github.com/siamak/atom-panda-syntax)
5 | */
6 | .cm-s-panda-syntax {
7 | background: #292A2B;
8 | color: #E6E6E6;
9 | line-height: 1.5;
10 | font-family: 'Operator Mono', 'Source Code Pro', Menlo, Monaco, Consolas, Courier New, monospace;
11 | }
12 | .cm-s-panda-syntax .CodeMirror-cursor { border-color: #ff2c6d; }
13 | .cm-s-panda-syntax .CodeMirror-activeline-background {
14 | background: rgba(99, 123, 156, 0.1);
15 | }
16 | .cm-s-panda-syntax .CodeMirror-selected {
17 | background: #FFF;
18 | }
19 | .cm-s-panda-syntax .cm-comment {
20 | font-style: italic;
21 | color: #676B79;
22 | }
23 | .cm-s-panda-syntax .cm-operator {
24 | color: #f3f3f3;
25 | }
26 | .cm-s-panda-syntax .cm-string {
27 | color: #19F9D8;
28 | }
29 | .cm-s-panda-syntax .cm-string-2 {
30 | color: #FFB86C;
31 | }
32 |
33 | .cm-s-panda-syntax .cm-tag {
34 | color: #ff2c6d;
35 | }
36 | .cm-s-panda-syntax .cm-meta {
37 | color: #b084eb;
38 | }
39 |
40 | .cm-s-panda-syntax .cm-number {
41 | color: #FFB86C;
42 | }
43 | .cm-s-panda-syntax .cm-atom {
44 | color: #ff2c6d;
45 | }
46 | .cm-s-panda-syntax .cm-keyword {
47 | color: #FF75B5;
48 | }
49 | .cm-s-panda-syntax .cm-variable {
50 | color: #ffb86c;
51 | }
52 | .cm-s-panda-syntax .cm-variable-2 {
53 | color: #ff9ac1;
54 | }
55 | .cm-s-panda-syntax .cm-variable-3, .cm-s-panda-syntax .cm-type {
56 | color: #ff9ac1;
57 | }
58 |
59 | .cm-s-panda-syntax .cm-def {
60 | color: #e6e6e6;
61 | }
62 | .cm-s-panda-syntax .cm-property {
63 | color: #f3f3f3;
64 | }
65 | .cm-s-panda-syntax .cm-unit {
66 | color: #ffb86c;
67 | }
68 |
69 | .cm-s-panda-syntax .cm-attribute {
70 | color: #ffb86c;
71 | }
72 |
73 | .cm-s-panda-syntax .CodeMirror-matchingbracket {
74 | border-bottom: 1px dotted #19F9D8;
75 | padding-bottom: 2px;
76 | color: #e6e6e6;
77 | }
78 | .cm-s-panda-syntax .CodeMirror-gutters {
79 | background: #292a2b;
80 | border-right-color: rgba(255, 255, 255, 0.1);
81 | }
82 | .cm-s-panda-syntax .CodeMirror-linenumber {
83 | color: #e6e6e6;
84 | opacity: 0.6;
85 | }
86 |
--------------------------------------------------------------------------------
/app/styles/theme/paraiso-dark.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: Paraíso (Dark)
4 | Author: Jan T. Sott
5 |
6 | Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror)
7 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
8 |
9 | */
10 |
11 | .cm-s-paraiso-dark.CodeMirror { background: #2f1e2e; color: #b9b6b0; }
12 | .cm-s-paraiso-dark div.CodeMirror-selected { background: #41323f; }
13 | .cm-s-paraiso-dark .CodeMirror-line::selection, .cm-s-paraiso-dark .CodeMirror-line > span::selection, .cm-s-paraiso-dark .CodeMirror-line > span > span::selection { background: rgba(65, 50, 63, .99); }
14 | .cm-s-paraiso-dark .CodeMirror-line::-moz-selection, .cm-s-paraiso-dark .CodeMirror-line > span::-moz-selection, .cm-s-paraiso-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(65, 50, 63, .99); }
15 | .cm-s-paraiso-dark .CodeMirror-gutters { background: #2f1e2e; border-right: 0px; }
16 | .cm-s-paraiso-dark .CodeMirror-guttermarker { color: #ef6155; }
17 | .cm-s-paraiso-dark .CodeMirror-guttermarker-subtle { color: #776e71; }
18 | .cm-s-paraiso-dark .CodeMirror-linenumber { color: #776e71; }
19 | .cm-s-paraiso-dark .CodeMirror-cursor { border-left: 1px solid #8d8687; }
20 |
21 | .cm-s-paraiso-dark span.cm-comment { color: #e96ba8; }
22 | .cm-s-paraiso-dark span.cm-atom { color: #815ba4; }
23 | .cm-s-paraiso-dark span.cm-number { color: #815ba4; }
24 |
25 | .cm-s-paraiso-dark span.cm-property, .cm-s-paraiso-dark span.cm-attribute { color: #48b685; }
26 | .cm-s-paraiso-dark span.cm-keyword { color: #ef6155; }
27 | .cm-s-paraiso-dark span.cm-string { color: #fec418; }
28 |
29 | .cm-s-paraiso-dark span.cm-variable { color: #48b685; }
30 | .cm-s-paraiso-dark span.cm-variable-2 { color: #06b6ef; }
31 | .cm-s-paraiso-dark span.cm-def { color: #f99b15; }
32 | .cm-s-paraiso-dark span.cm-bracket { color: #b9b6b0; }
33 | .cm-s-paraiso-dark span.cm-tag { color: #ef6155; }
34 | .cm-s-paraiso-dark span.cm-link { color: #815ba4; }
35 | .cm-s-paraiso-dark span.cm-error { background: #ef6155; color: #8d8687; }
36 |
37 | .cm-s-paraiso-dark .CodeMirror-activeline-background { background: #4D344A; }
38 | .cm-s-paraiso-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
39 |
--------------------------------------------------------------------------------
/app/styles/theme/paraiso-light.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: Paraíso (Light)
4 | Author: Jan T. Sott
5 |
6 | Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror)
7 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
8 |
9 | */
10 |
11 | .cm-s-paraiso-light.CodeMirror { background: #e7e9db; color: #41323f; }
12 | .cm-s-paraiso-light div.CodeMirror-selected { background: #b9b6b0; }
13 | .cm-s-paraiso-light .CodeMirror-line::selection, .cm-s-paraiso-light .CodeMirror-line > span::selection, .cm-s-paraiso-light .CodeMirror-line > span > span::selection { background: #b9b6b0; }
14 | .cm-s-paraiso-light .CodeMirror-line::-moz-selection, .cm-s-paraiso-light .CodeMirror-line > span::-moz-selection, .cm-s-paraiso-light .CodeMirror-line > span > span::-moz-selection { background: #b9b6b0; }
15 | .cm-s-paraiso-light .CodeMirror-gutters { background: #e7e9db; border-right: 0px; }
16 | .cm-s-paraiso-light .CodeMirror-guttermarker { color: black; }
17 | .cm-s-paraiso-light .CodeMirror-guttermarker-subtle { color: #8d8687; }
18 | .cm-s-paraiso-light .CodeMirror-linenumber { color: #8d8687; }
19 | .cm-s-paraiso-light .CodeMirror-cursor { border-left: 1px solid #776e71; }
20 |
21 | .cm-s-paraiso-light span.cm-comment { color: #e96ba8; }
22 | .cm-s-paraiso-light span.cm-atom { color: #815ba4; }
23 | .cm-s-paraiso-light span.cm-number { color: #815ba4; }
24 |
25 | .cm-s-paraiso-light span.cm-property, .cm-s-paraiso-light span.cm-attribute { color: #48b685; }
26 | .cm-s-paraiso-light span.cm-keyword { color: #ef6155; }
27 | .cm-s-paraiso-light span.cm-string { color: #fec418; }
28 |
29 | .cm-s-paraiso-light span.cm-variable { color: #48b685; }
30 | .cm-s-paraiso-light span.cm-variable-2 { color: #06b6ef; }
31 | .cm-s-paraiso-light span.cm-def { color: #f99b15; }
32 | .cm-s-paraiso-light span.cm-bracket { color: #41323f; }
33 | .cm-s-paraiso-light span.cm-tag { color: #ef6155; }
34 | .cm-s-paraiso-light span.cm-link { color: #815ba4; }
35 | .cm-s-paraiso-light span.cm-error { background: #ef6155; color: #776e71; }
36 |
37 | .cm-s-paraiso-light .CodeMirror-activeline-background { background: #CFD1C4; }
38 | .cm-s-paraiso-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
39 |
--------------------------------------------------------------------------------
/app/styles/theme/pastel-on-dark.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Pastel On Dark theme ported from ACE editor
3 | * @license MIT
4 | * @copyright AtomicPages LLC 2014
5 | * @author Dennis Thompson, AtomicPages LLC
6 | * @version 1.1
7 | * @source https://github.com/atomicpages/codemirror-pastel-on-dark-theme
8 | */
9 |
10 | .cm-s-pastel-on-dark.CodeMirror {
11 | background: #2c2827;
12 | color: #8F938F;
13 | line-height: 1.5;
14 | }
15 | .cm-s-pastel-on-dark div.CodeMirror-selected { background: rgba(221,240,255,0.2); }
16 | .cm-s-pastel-on-dark .CodeMirror-line::selection, .cm-s-pastel-on-dark .CodeMirror-line > span::selection, .cm-s-pastel-on-dark .CodeMirror-line > span > span::selection { background: rgba(221,240,255,0.2); }
17 | .cm-s-pastel-on-dark .CodeMirror-line::-moz-selection, .cm-s-pastel-on-dark .CodeMirror-line > span::-moz-selection, .cm-s-pastel-on-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(221,240,255,0.2); }
18 |
19 | .cm-s-pastel-on-dark .CodeMirror-gutters {
20 | background: #34302f;
21 | border-right: 0px;
22 | padding: 0 3px;
23 | }
24 | .cm-s-pastel-on-dark .CodeMirror-guttermarker { color: white; }
25 | .cm-s-pastel-on-dark .CodeMirror-guttermarker-subtle { color: #8F938F; }
26 | .cm-s-pastel-on-dark .CodeMirror-linenumber { color: #8F938F; }
27 | .cm-s-pastel-on-dark .CodeMirror-cursor { border-left: 1px solid #A7A7A7; }
28 | .cm-s-pastel-on-dark span.cm-comment { color: #A6C6FF; }
29 | .cm-s-pastel-on-dark span.cm-atom { color: #DE8E30; }
30 | .cm-s-pastel-on-dark span.cm-number { color: #CCCCCC; }
31 | .cm-s-pastel-on-dark span.cm-property { color: #8F938F; }
32 | .cm-s-pastel-on-dark span.cm-attribute { color: #a6e22e; }
33 | .cm-s-pastel-on-dark span.cm-keyword { color: #AEB2F8; }
34 | .cm-s-pastel-on-dark span.cm-string { color: #66A968; }
35 | .cm-s-pastel-on-dark span.cm-variable { color: #AEB2F8; }
36 | .cm-s-pastel-on-dark span.cm-variable-2 { color: #BEBF55; }
37 | .cm-s-pastel-on-dark span.cm-variable-3, .cm-s-pastel-on-dark span.cm-type { color: #DE8E30; }
38 | .cm-s-pastel-on-dark span.cm-def { color: #757aD8; }
39 | .cm-s-pastel-on-dark span.cm-bracket { color: #f8f8f2; }
40 | .cm-s-pastel-on-dark span.cm-tag { color: #C1C144; }
41 | .cm-s-pastel-on-dark span.cm-link { color: #ae81ff; }
42 | .cm-s-pastel-on-dark span.cm-qualifier,.cm-s-pastel-on-dark span.cm-builtin { color: #C1C144; }
43 | .cm-s-pastel-on-dark span.cm-error {
44 | background: #757aD8;
45 | color: #f8f8f0;
46 | }
47 | .cm-s-pastel-on-dark .CodeMirror-activeline-background { background: rgba(255, 255, 255, 0.031); }
48 | .cm-s-pastel-on-dark .CodeMirror-matchingbracket {
49 | border: 1px solid rgba(255,255,255,0.25);
50 | color: #8F938F !important;
51 | margin: -1px -1px 0 -1px;
52 | }
53 |
--------------------------------------------------------------------------------
/app/styles/theme/railscasts.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: Railscasts
4 | Author: Ryan Bates (http://railscasts.com)
5 |
6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
8 |
9 | */
10 |
11 | .cm-s-railscasts.CodeMirror {background: #2b2b2b; color: #f4f1ed;}
12 | .cm-s-railscasts div.CodeMirror-selected {background: #272935 !important;}
13 | .cm-s-railscasts .CodeMirror-gutters {background: #2b2b2b; border-right: 0px;}
14 | .cm-s-railscasts .CodeMirror-linenumber {color: #5a647e;}
15 | .cm-s-railscasts .CodeMirror-cursor {border-left: 1px solid #d4cfc9 !important;}
16 |
17 | .cm-s-railscasts span.cm-comment {color: #bc9458;}
18 | .cm-s-railscasts span.cm-atom {color: #b6b3eb;}
19 | .cm-s-railscasts span.cm-number {color: #b6b3eb;}
20 |
21 | .cm-s-railscasts span.cm-property, .cm-s-railscasts span.cm-attribute {color: #a5c261;}
22 | .cm-s-railscasts span.cm-keyword {color: #da4939;}
23 | .cm-s-railscasts span.cm-string {color: #ffc66d;}
24 |
25 | .cm-s-railscasts span.cm-variable {color: #a5c261;}
26 | .cm-s-railscasts span.cm-variable-2 {color: #6d9cbe;}
27 | .cm-s-railscasts span.cm-def {color: #cc7833;}
28 | .cm-s-railscasts span.cm-error {background: #da4939; color: #d4cfc9;}
29 | .cm-s-railscasts span.cm-bracket {color: #f4f1ed;}
30 | .cm-s-railscasts span.cm-tag {color: #da4939;}
31 | .cm-s-railscasts span.cm-link {color: #b6b3eb;}
32 |
33 | .cm-s-railscasts .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
34 | .cm-s-railscasts .CodeMirror-activeline-background { background: #303040; }
35 |
--------------------------------------------------------------------------------
/app/styles/theme/rubyblue.css:
--------------------------------------------------------------------------------
1 | .cm-s-rubyblue.CodeMirror { background: #112435; color: white; }
2 | .cm-s-rubyblue div.CodeMirror-selected { background: #38566F; }
3 | .cm-s-rubyblue .CodeMirror-line::selection, .cm-s-rubyblue .CodeMirror-line > span::selection, .cm-s-rubyblue .CodeMirror-line > span > span::selection { background: rgba(56, 86, 111, 0.99); }
4 | .cm-s-rubyblue .CodeMirror-line::-moz-selection, .cm-s-rubyblue .CodeMirror-line > span::-moz-selection, .cm-s-rubyblue .CodeMirror-line > span > span::-moz-selection { background: rgba(56, 86, 111, 0.99); }
5 | .cm-s-rubyblue .CodeMirror-gutters { background: #1F4661; border-right: 7px solid #3E7087; }
6 | .cm-s-rubyblue .CodeMirror-guttermarker { color: white; }
7 | .cm-s-rubyblue .CodeMirror-guttermarker-subtle { color: #3E7087; }
8 | .cm-s-rubyblue .CodeMirror-linenumber { color: white; }
9 | .cm-s-rubyblue .CodeMirror-cursor { border-left: 1px solid white; }
10 |
11 | .cm-s-rubyblue span.cm-comment { color: #999; font-style:italic; line-height: 1em; }
12 | .cm-s-rubyblue span.cm-atom { color: #F4C20B; }
13 | .cm-s-rubyblue span.cm-number, .cm-s-rubyblue span.cm-attribute { color: #82C6E0; }
14 | .cm-s-rubyblue span.cm-keyword { color: #F0F; }
15 | .cm-s-rubyblue span.cm-string { color: #F08047; }
16 | .cm-s-rubyblue span.cm-meta { color: #F0F; }
17 | .cm-s-rubyblue span.cm-variable-2, .cm-s-rubyblue span.cm-tag { color: #7BD827; }
18 | .cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def, .cm-s-rubyblue span.cm-type { color: white; }
19 | .cm-s-rubyblue span.cm-bracket { color: #F0F; }
20 | .cm-s-rubyblue span.cm-link { color: #F4C20B; }
21 | .cm-s-rubyblue span.CodeMirror-matchingbracket { color:#F0F !important; }
22 | .cm-s-rubyblue span.cm-builtin, .cm-s-rubyblue span.cm-special { color: #FF9D00; }
23 | .cm-s-rubyblue span.cm-error { color: #AF2018; }
24 |
25 | .cm-s-rubyblue .CodeMirror-activeline-background { background: #173047; }
26 |
--------------------------------------------------------------------------------
/app/styles/theme/seti.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: seti
4 | Author: Michael Kaminsky (http://github.com/mkaminsky11)
5 |
6 | Original seti color scheme by Jesse Weed (https://github.com/jesseweed/seti-syntax)
7 |
8 | */
9 |
10 |
11 | .cm-s-seti.CodeMirror {
12 | background-color: #151718 !important;
13 | color: #CFD2D1 !important;
14 | border: none;
15 | }
16 | .cm-s-seti .CodeMirror-gutters {
17 | color: #404b53;
18 | background-color: #0E1112;
19 | border: none;
20 | }
21 | .cm-s-seti .CodeMirror-cursor { border-left: solid thin #f8f8f0; }
22 | .cm-s-seti .CodeMirror-linenumber { color: #6D8A88; }
23 | .cm-s-seti.CodeMirror-focused div.CodeMirror-selected { background: rgba(255, 255, 255, 0.10); }
24 | .cm-s-seti .CodeMirror-line::selection, .cm-s-seti .CodeMirror-line > span::selection, .cm-s-seti .CodeMirror-line > span > span::selection { background: rgba(255, 255, 255, 0.10); }
25 | .cm-s-seti .CodeMirror-line::-moz-selection, .cm-s-seti .CodeMirror-line > span::-moz-selection, .cm-s-seti .CodeMirror-line > span > span::-moz-selection { background: rgba(255, 255, 255, 0.10); }
26 | .cm-s-seti span.cm-comment { color: #41535b; }
27 | .cm-s-seti span.cm-string, .cm-s-seti span.cm-string-2 { color: #55b5db; }
28 | .cm-s-seti span.cm-number { color: #cd3f45; }
29 | .cm-s-seti span.cm-variable { color: #55b5db; }
30 | .cm-s-seti span.cm-variable-2 { color: #a074c4; }
31 | .cm-s-seti span.cm-def { color: #55b5db; }
32 | .cm-s-seti span.cm-keyword { color: #ff79c6; }
33 | .cm-s-seti span.cm-operator { color: #9fca56; }
34 | .cm-s-seti span.cm-keyword { color: #e6cd69; }
35 | .cm-s-seti span.cm-atom { color: #cd3f45; }
36 | .cm-s-seti span.cm-meta { color: #55b5db; }
37 | .cm-s-seti span.cm-tag { color: #55b5db; }
38 | .cm-s-seti span.cm-attribute { color: #9fca56; }
39 | .cm-s-seti span.cm-qualifier { color: #9fca56; }
40 | .cm-s-seti span.cm-property { color: #a074c4; }
41 | .cm-s-seti span.cm-variable-3, .cm-s-seti span.cm-type { color: #9fca56; }
42 | .cm-s-seti span.cm-builtin { color: #9fca56; }
43 | .cm-s-seti .CodeMirror-activeline-background { background: #101213; }
44 | .cm-s-seti .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
45 |
--------------------------------------------------------------------------------
/app/styles/theme/shadowfox.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: shadowfox
4 | Author: overdodactyl (http://github.com/overdodactyl)
5 |
6 | Original shadowfox color scheme by Firefox
7 |
8 | */
9 |
10 | .cm-s-shadowfox.CodeMirror { background: #2a2a2e; color: #b1b1b3; }
11 | .cm-s-shadowfox div.CodeMirror-selected { background: #353B48; }
12 | .cm-s-shadowfox .CodeMirror-line::selection, .cm-s-shadowfox .CodeMirror-line > span::selection, .cm-s-shadowfox .CodeMirror-line > span > span::selection { background: #353B48; }
13 | .cm-s-shadowfox .CodeMirror-line::-moz-selection, .cm-s-shadowfox .CodeMirror-line > span::-moz-selection, .cm-s-shadowfox .CodeMirror-line > span > span::-moz-selection { background: #353B48; }
14 | .cm-s-shadowfox .CodeMirror-gutters { background: #0c0c0d ; border-right: 1px solid #0c0c0d; }
15 | .cm-s-shadowfox .CodeMirror-guttermarker { color: #555; }
16 | .cm-s-shadowfox .CodeMirror-linenumber { color: #939393; }
17 | .cm-s-shadowfox .CodeMirror-cursor { border-left: 1px solid #fff; }
18 |
19 | .cm-s-shadowfox span.cm-comment { color: #939393; }
20 | .cm-s-shadowfox span.cm-atom { color: #FF7DE9; }
21 | .cm-s-shadowfox span.cm-quote { color: #FF7DE9; }
22 | .cm-s-shadowfox span.cm-builtin { color: #FF7DE9; }
23 | .cm-s-shadowfox span.cm-attribute { color: #FF7DE9; }
24 | .cm-s-shadowfox span.cm-keyword { color: #FF7DE9; }
25 | .cm-s-shadowfox span.cm-error { color: #FF7DE9; }
26 |
27 | .cm-s-shadowfox span.cm-number { color: #6B89FF; }
28 | .cm-s-shadowfox span.cm-string { color: #6B89FF; }
29 | .cm-s-shadowfox span.cm-string-2 { color: #6B89FF; }
30 |
31 | .cm-s-shadowfox span.cm-meta { color: #939393; }
32 | .cm-s-shadowfox span.cm-hr { color: #939393; }
33 |
34 | .cm-s-shadowfox span.cm-header { color: #75BFFF; }
35 | .cm-s-shadowfox span.cm-qualifier { color: #75BFFF; }
36 | .cm-s-shadowfox span.cm-variable-2 { color: #75BFFF; }
37 |
38 | .cm-s-shadowfox span.cm-property { color: #86DE74; }
39 |
40 | .cm-s-shadowfox span.cm-def { color: #75BFFF; }
41 | .cm-s-shadowfox span.cm-bracket { color: #75BFFF; }
42 | .cm-s-shadowfox span.cm-tag { color: #75BFFF; }
43 | .cm-s-shadowfox span.cm-link:visited { color: #75BFFF; }
44 |
45 | .cm-s-shadowfox span.cm-variable { color: #B98EFF; }
46 | .cm-s-shadowfox span.cm-variable-3 { color: #d7d7db; }
47 | .cm-s-shadowfox span.cm-link { color: #737373; }
48 | .cm-s-shadowfox span.cm-operator { color: #b1b1b3; }
49 | .cm-s-shadowfox span.cm-special { color: #d7d7db; }
50 |
51 | .cm-s-shadowfox .CodeMirror-activeline-background { background: rgba(185, 215, 253, .15) }
52 | .cm-s-shadowfox .CodeMirror-matchingbracket { outline: solid 1px rgba(255, 255, 255, .25); color: white !important; }
53 |
--------------------------------------------------------------------------------
/app/styles/theme/solarized.css:
--------------------------------------------------------------------------------
1 | /*
2 | Solarized theme for code-mirror
3 | http://ethanschoonover.com/solarized
4 | */
5 |
6 | /*
7 | Solarized color palette
8 | http://ethanschoonover.com/solarized/img/solarized-palette.png
9 | */
10 |
11 | .solarized.base03 { color: #002b36; }
12 | .solarized.base02 { color: #073642; }
13 | .solarized.base01 { color: #586e75; }
14 | .solarized.base00 { color: #657b83; }
15 | .solarized.base0 { color: #839496; }
16 | .solarized.base1 { color: #93a1a1; }
17 | .solarized.base2 { color: #eee8d5; }
18 | .solarized.base3 { color: #fdf6e3; }
19 | .solarized.solar-yellow { color: #b58900; }
20 | .solarized.solar-orange { color: #cb4b16; }
21 | .solarized.solar-red { color: #dc322f; }
22 | .solarized.solar-magenta { color: #d33682; }
23 | .solarized.solar-violet { color: #6c71c4; }
24 | .solarized.solar-blue { color: #268bd2; }
25 | .solarized.solar-cyan { color: #2aa198; }
26 | .solarized.solar-green { color: #859900; }
27 |
28 | /* Color scheme for code-mirror */
29 |
30 | .cm-s-solarized {
31 | line-height: 1.45em;
32 | color-profile: sRGB;
33 | rendering-intent: auto;
34 | }
35 | .cm-s-solarized.cm-s-dark {
36 | color: #839496;
37 | background-color: #002b36;
38 | text-shadow: #002b36 0 1px;
39 | }
40 | .cm-s-solarized.cm-s-light {
41 | background-color: #fdf6e3;
42 | color: #657b83;
43 | text-shadow: #eee8d5 0 1px;
44 | }
45 |
46 | .cm-s-solarized .CodeMirror-widget {
47 | text-shadow: none;
48 | }
49 |
50 | .cm-s-solarized .cm-header { color: #586e75; }
51 | .cm-s-solarized .cm-quote { color: #93a1a1; }
52 |
53 | .cm-s-solarized .cm-keyword { color: #cb4b16; }
54 | .cm-s-solarized .cm-atom { color: #d33682; }
55 | .cm-s-solarized .cm-number { color: #d33682; }
56 | .cm-s-solarized .cm-def { color: #2aa198; }
57 |
58 | .cm-s-solarized .cm-variable { color: #839496; }
59 | .cm-s-solarized .cm-variable-2 { color: #b58900; }
60 | .cm-s-solarized .cm-variable-3, .cm-s-solarized .cm-type { color: #6c71c4; }
61 |
62 | .cm-s-solarized .cm-property { color: #2aa198; }
63 | .cm-s-solarized .cm-operator { color: #6c71c4; }
64 |
65 | .cm-s-solarized .cm-comment { color: #586e75; font-style:italic; }
66 |
67 | .cm-s-solarized .cm-string { color: #859900; }
68 | .cm-s-solarized .cm-string-2 { color: #b58900; }
69 |
70 | .cm-s-solarized .cm-meta { color: #859900; }
71 | .cm-s-solarized .cm-qualifier { color: #b58900; }
72 | .cm-s-solarized .cm-builtin { color: #d33682; }
73 | .cm-s-solarized .cm-bracket { color: #cb4b16; }
74 | .cm-s-solarized .CodeMirror-matchingbracket { color: #859900; }
75 | .cm-s-solarized .CodeMirror-nonmatchingbracket { color: #dc322f; }
76 | .cm-s-solarized .cm-tag { color: #93a1a1; }
77 | .cm-s-solarized .cm-attribute { color: #2aa198; }
78 | .cm-s-solarized .cm-hr {
79 | color: transparent;
80 | border-top: 1px solid #586e75;
81 | display: block;
82 | }
83 | .cm-s-solarized .cm-link { color: #93a1a1; cursor: pointer; }
84 | .cm-s-solarized .cm-special { color: #6c71c4; }
85 | .cm-s-solarized .cm-em {
86 | color: #999;
87 | text-decoration: underline;
88 | text-decoration-style: dotted;
89 | }
90 | .cm-s-solarized .cm-error,
91 | .cm-s-solarized .cm-invalidchar {
92 | color: #586e75;
93 | border-bottom: 1px dotted #dc322f;
94 | }
95 |
96 | .cm-s-solarized.cm-s-dark div.CodeMirror-selected { background: #073642; }
97 | .cm-s-solarized.cm-s-dark.CodeMirror ::selection { background: rgba(7, 54, 66, 0.99); }
98 | .cm-s-solarized.cm-s-dark .CodeMirror-line::-moz-selection, .cm-s-dark .CodeMirror-line > span::-moz-selection, .cm-s-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(7, 54, 66, 0.99); }
99 |
100 | .cm-s-solarized.cm-s-light div.CodeMirror-selected { background: #eee8d5; }
101 | .cm-s-solarized.cm-s-light .CodeMirror-line::selection, .cm-s-light .CodeMirror-line > span::selection, .cm-s-light .CodeMirror-line > span > span::selection { background: #eee8d5; }
102 | .cm-s-solarized.cm-s-light .CodeMirror-line::-moz-selection, .cm-s-ligh .CodeMirror-line > span::-moz-selection, .cm-s-ligh .CodeMirror-line > span > span::-moz-selection { background: #eee8d5; }
103 |
104 | /* Editor styling */
105 |
106 |
107 |
108 | /* Little shadow on the view-port of the buffer view */
109 | .cm-s-solarized.CodeMirror {
110 | -moz-box-shadow: inset 7px 0 12px -6px #000;
111 | -webkit-box-shadow: inset 7px 0 12px -6px #000;
112 | box-shadow: inset 7px 0 12px -6px #000;
113 | }
114 |
115 | /* Remove gutter border */
116 | .cm-s-solarized .CodeMirror-gutters {
117 | border-right: 0;
118 | }
119 |
120 | /* Gutter colors and line number styling based of color scheme (dark / light) */
121 |
122 | /* Dark */
123 | .cm-s-solarized.cm-s-dark .CodeMirror-gutters {
124 | background-color: #073642;
125 | }
126 |
127 | .cm-s-solarized.cm-s-dark .CodeMirror-linenumber {
128 | color: #586e75;
129 | text-shadow: #021014 0 -1px;
130 | }
131 |
132 | /* Light */
133 | .cm-s-solarized.cm-s-light .CodeMirror-gutters {
134 | background-color: #eee8d5;
135 | }
136 |
137 | .cm-s-solarized.cm-s-light .CodeMirror-linenumber {
138 | color: #839496;
139 | }
140 |
141 | /* Common */
142 | .cm-s-solarized .CodeMirror-linenumber {
143 | padding: 0 5px;
144 | }
145 | .cm-s-solarized .CodeMirror-guttermarker-subtle { color: #586e75; }
146 | .cm-s-solarized.cm-s-dark .CodeMirror-guttermarker { color: #ddd; }
147 | .cm-s-solarized.cm-s-light .CodeMirror-guttermarker { color: #cb4b16; }
148 |
149 | .cm-s-solarized .CodeMirror-gutter .CodeMirror-gutter-text {
150 | color: #586e75;
151 | }
152 |
153 | /* Cursor */
154 | .cm-s-solarized .CodeMirror-cursor { border-left: 1px solid #819090; }
155 |
156 | /* Fat cursor */
157 | .cm-s-solarized.cm-s-light.cm-fat-cursor .CodeMirror-cursor { background: #77ee77; }
158 | .cm-s-solarized.cm-s-light .cm-animate-fat-cursor { background-color: #77ee77; }
159 | .cm-s-solarized.cm-s-dark.cm-fat-cursor .CodeMirror-cursor { background: #586e75; }
160 | .cm-s-solarized.cm-s-dark .cm-animate-fat-cursor { background-color: #586e75; }
161 |
162 | /* Active line */
163 | .cm-s-solarized.cm-s-dark .CodeMirror-activeline-background {
164 | background: rgba(255, 255, 255, 0.06);
165 | }
166 | .cm-s-solarized.cm-s-light .CodeMirror-activeline-background {
167 | background: rgba(0, 0, 0, 0.06);
168 | }
169 |
--------------------------------------------------------------------------------
/app/styles/theme/ssms.css:
--------------------------------------------------------------------------------
1 | .cm-s-ssms span.cm-keyword { color: blue; }
2 | .cm-s-ssms span.cm-comment { color: darkgreen; }
3 | .cm-s-ssms span.cm-string { color: red; }
4 | .cm-s-ssms span.cm-def { color: black; }
5 | .cm-s-ssms span.cm-variable { color: black; }
6 | .cm-s-ssms span.cm-variable-2 { color: black; }
7 | .cm-s-ssms span.cm-atom { color: darkgray; }
8 | .cm-s-ssms .CodeMirror-linenumber { color: teal; }
9 | .cm-s-ssms .CodeMirror-activeline-background { background: #ffffff; }
10 | .cm-s-ssms span.cm-string-2 { color: #FF00FF; }
11 | .cm-s-ssms span.cm-operator,
12 | .cm-s-ssms span.cm-bracket,
13 | .cm-s-ssms span.cm-punctuation { color: darkgray; }
14 | .cm-s-ssms .CodeMirror-gutters { border-right: 3px solid #ffee62; background-color: #ffffff; }
15 | .cm-s-ssms div.CodeMirror-selected { background: #ADD6FF; }
16 |
17 |
--------------------------------------------------------------------------------
/app/styles/theme/the-matrix.css:
--------------------------------------------------------------------------------
1 | .cm-s-the-matrix.CodeMirror { background: #000000; color: #00FF00; }
2 | .cm-s-the-matrix div.CodeMirror-selected { background: #2D2D2D; }
3 | .cm-s-the-matrix .CodeMirror-line::selection, .cm-s-the-matrix .CodeMirror-line > span::selection, .cm-s-the-matrix .CodeMirror-line > span > span::selection { background: rgba(45, 45, 45, 0.99); }
4 | .cm-s-the-matrix .CodeMirror-line::-moz-selection, .cm-s-the-matrix .CodeMirror-line > span::-moz-selection, .cm-s-the-matrix .CodeMirror-line > span > span::-moz-selection { background: rgba(45, 45, 45, 0.99); }
5 | .cm-s-the-matrix .CodeMirror-gutters { background: #060; border-right: 2px solid #00FF00; }
6 | .cm-s-the-matrix .CodeMirror-guttermarker { color: #0f0; }
7 | .cm-s-the-matrix .CodeMirror-guttermarker-subtle { color: white; }
8 | .cm-s-the-matrix .CodeMirror-linenumber { color: #FFFFFF; }
9 | .cm-s-the-matrix .CodeMirror-cursor { border-left: 1px solid #00FF00; }
10 |
11 | .cm-s-the-matrix span.cm-keyword { color: #008803; font-weight: bold; }
12 | .cm-s-the-matrix span.cm-atom { color: #3FF; }
13 | .cm-s-the-matrix span.cm-number { color: #FFB94F; }
14 | .cm-s-the-matrix span.cm-def { color: #99C; }
15 | .cm-s-the-matrix span.cm-variable { color: #F6C; }
16 | .cm-s-the-matrix span.cm-variable-2 { color: #C6F; }
17 | .cm-s-the-matrix span.cm-variable-3, .cm-s-the-matrix span.cm-type { color: #96F; }
18 | .cm-s-the-matrix span.cm-property { color: #62FFA0; }
19 | .cm-s-the-matrix span.cm-operator { color: #999; }
20 | .cm-s-the-matrix span.cm-comment { color: #CCCCCC; }
21 | .cm-s-the-matrix span.cm-string { color: #39C; }
22 | .cm-s-the-matrix span.cm-meta { color: #C9F; }
23 | .cm-s-the-matrix span.cm-qualifier { color: #FFF700; }
24 | .cm-s-the-matrix span.cm-builtin { color: #30a; }
25 | .cm-s-the-matrix span.cm-bracket { color: #cc7; }
26 | .cm-s-the-matrix span.cm-tag { color: #FFBD40; }
27 | .cm-s-the-matrix span.cm-attribute { color: #FFF700; }
28 | .cm-s-the-matrix span.cm-error { color: #FF0000; }
29 |
30 | .cm-s-the-matrix .CodeMirror-activeline-background { background: #040; }
31 |
--------------------------------------------------------------------------------
/app/styles/theme/tomorrow-night-bright.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: Tomorrow Night - Bright
4 | Author: Chris Kempson
5 |
6 | Port done by Gerard Braad
7 |
8 | */
9 |
10 | .cm-s-tomorrow-night-bright.CodeMirror { background: #000000; color: #eaeaea; }
11 | .cm-s-tomorrow-night-bright div.CodeMirror-selected { background: #424242; }
12 | .cm-s-tomorrow-night-bright .CodeMirror-gutters { background: #000000; border-right: 0px; }
13 | .cm-s-tomorrow-night-bright .CodeMirror-guttermarker { color: #e78c45; }
14 | .cm-s-tomorrow-night-bright .CodeMirror-guttermarker-subtle { color: #777; }
15 | .cm-s-tomorrow-night-bright .CodeMirror-linenumber { color: #424242; }
16 | .cm-s-tomorrow-night-bright .CodeMirror-cursor { border-left: 1px solid #6A6A6A; }
17 |
18 | .cm-s-tomorrow-night-bright span.cm-comment { color: #d27b53; }
19 | .cm-s-tomorrow-night-bright span.cm-atom { color: #a16a94; }
20 | .cm-s-tomorrow-night-bright span.cm-number { color: #a16a94; }
21 |
22 | .cm-s-tomorrow-night-bright span.cm-property, .cm-s-tomorrow-night-bright span.cm-attribute { color: #99cc99; }
23 | .cm-s-tomorrow-night-bright span.cm-keyword { color: #d54e53; }
24 | .cm-s-tomorrow-night-bright span.cm-string { color: #e7c547; }
25 |
26 | .cm-s-tomorrow-night-bright span.cm-variable { color: #b9ca4a; }
27 | .cm-s-tomorrow-night-bright span.cm-variable-2 { color: #7aa6da; }
28 | .cm-s-tomorrow-night-bright span.cm-def { color: #e78c45; }
29 | .cm-s-tomorrow-night-bright span.cm-bracket { color: #eaeaea; }
30 | .cm-s-tomorrow-night-bright span.cm-tag { color: #d54e53; }
31 | .cm-s-tomorrow-night-bright span.cm-link { color: #a16a94; }
32 | .cm-s-tomorrow-night-bright span.cm-error { background: #d54e53; color: #6A6A6A; }
33 |
34 | .cm-s-tomorrow-night-bright .CodeMirror-activeline-background { background: #2a2a2a; }
35 | .cm-s-tomorrow-night-bright .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
36 |
--------------------------------------------------------------------------------
/app/styles/theme/tomorrow-night-eighties.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: Tomorrow Night - Eighties
4 | Author: Chris Kempson
5 |
6 | CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
8 |
9 | */
10 |
11 | .cm-s-tomorrow-night-eighties.CodeMirror { background: #000000; color: #CCCCCC; }
12 | .cm-s-tomorrow-night-eighties div.CodeMirror-selected { background: #2D2D2D; }
13 | .cm-s-tomorrow-night-eighties .CodeMirror-line::selection, .cm-s-tomorrow-night-eighties .CodeMirror-line > span::selection, .cm-s-tomorrow-night-eighties .CodeMirror-line > span > span::selection { background: rgba(45, 45, 45, 0.99); }
14 | .cm-s-tomorrow-night-eighties .CodeMirror-line::-moz-selection, .cm-s-tomorrow-night-eighties .CodeMirror-line > span::-moz-selection, .cm-s-tomorrow-night-eighties .CodeMirror-line > span > span::-moz-selection { background: rgba(45, 45, 45, 0.99); }
15 | .cm-s-tomorrow-night-eighties .CodeMirror-gutters { background: #000000; border-right: 0px; }
16 | .cm-s-tomorrow-night-eighties .CodeMirror-guttermarker { color: #f2777a; }
17 | .cm-s-tomorrow-night-eighties .CodeMirror-guttermarker-subtle { color: #777; }
18 | .cm-s-tomorrow-night-eighties .CodeMirror-linenumber { color: #515151; }
19 | .cm-s-tomorrow-night-eighties .CodeMirror-cursor { border-left: 1px solid #6A6A6A; }
20 |
21 | .cm-s-tomorrow-night-eighties span.cm-comment { color: #d27b53; }
22 | .cm-s-tomorrow-night-eighties span.cm-atom { color: #a16a94; }
23 | .cm-s-tomorrow-night-eighties span.cm-number { color: #a16a94; }
24 |
25 | .cm-s-tomorrow-night-eighties span.cm-property, .cm-s-tomorrow-night-eighties span.cm-attribute { color: #99cc99; }
26 | .cm-s-tomorrow-night-eighties span.cm-keyword { color: #f2777a; }
27 | .cm-s-tomorrow-night-eighties span.cm-string { color: #ffcc66; }
28 |
29 | .cm-s-tomorrow-night-eighties span.cm-variable { color: #99cc99; }
30 | .cm-s-tomorrow-night-eighties span.cm-variable-2 { color: #6699cc; }
31 | .cm-s-tomorrow-night-eighties span.cm-def { color: #f99157; }
32 | .cm-s-tomorrow-night-eighties span.cm-bracket { color: #CCCCCC; }
33 | .cm-s-tomorrow-night-eighties span.cm-tag { color: #f2777a; }
34 | .cm-s-tomorrow-night-eighties span.cm-link { color: #a16a94; }
35 | .cm-s-tomorrow-night-eighties span.cm-error { background: #f2777a; color: #6A6A6A; }
36 |
37 | .cm-s-tomorrow-night-eighties .CodeMirror-activeline-background { background: #343600; }
38 | .cm-s-tomorrow-night-eighties .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
39 |
--------------------------------------------------------------------------------
/app/styles/theme/ttcn.css:
--------------------------------------------------------------------------------
1 | .cm-s-ttcn .cm-quote { color: #090; }
2 | .cm-s-ttcn .cm-negative { color: #d44; }
3 | .cm-s-ttcn .cm-positive { color: #292; }
4 | .cm-s-ttcn .cm-header, .cm-strong { font-weight: bold; }
5 | .cm-s-ttcn .cm-em { font-style: italic; }
6 | .cm-s-ttcn .cm-link { text-decoration: underline; }
7 | .cm-s-ttcn .cm-strikethrough { text-decoration: line-through; }
8 | .cm-s-ttcn .cm-header { color: #00f; font-weight: bold; }
9 |
10 | .cm-s-ttcn .cm-atom { color: #219; }
11 | .cm-s-ttcn .cm-attribute { color: #00c; }
12 | .cm-s-ttcn .cm-bracket { color: #997; }
13 | .cm-s-ttcn .cm-comment { color: #333333; }
14 | .cm-s-ttcn .cm-def { color: #00f; }
15 | .cm-s-ttcn .cm-em { font-style: italic; }
16 | .cm-s-ttcn .cm-error { color: #f00; }
17 | .cm-s-ttcn .cm-hr { color: #999; }
18 | .cm-s-ttcn .cm-invalidchar { color: #f00; }
19 | .cm-s-ttcn .cm-keyword { font-weight:bold; }
20 | .cm-s-ttcn .cm-link { color: #00c; text-decoration: underline; }
21 | .cm-s-ttcn .cm-meta { color: #555; }
22 | .cm-s-ttcn .cm-negative { color: #d44; }
23 | .cm-s-ttcn .cm-positive { color: #292; }
24 | .cm-s-ttcn .cm-qualifier { color: #555; }
25 | .cm-s-ttcn .cm-strikethrough { text-decoration: line-through; }
26 | .cm-s-ttcn .cm-string { color: #006400; }
27 | .cm-s-ttcn .cm-string-2 { color: #f50; }
28 | .cm-s-ttcn .cm-strong { font-weight: bold; }
29 | .cm-s-ttcn .cm-tag { color: #170; }
30 | .cm-s-ttcn .cm-variable { color: #8B2252; }
31 | .cm-s-ttcn .cm-variable-2 { color: #05a; }
32 | .cm-s-ttcn .cm-variable-3, .cm-s-ttcn .cm-type { color: #085; }
33 |
34 | .cm-s-ttcn .cm-invalidchar { color: #f00; }
35 |
36 | /* ASN */
37 | .cm-s-ttcn .cm-accessTypes,
38 | .cm-s-ttcn .cm-compareTypes { color: #27408B; }
39 | .cm-s-ttcn .cm-cmipVerbs { color: #8B2252; }
40 | .cm-s-ttcn .cm-modifier { color:#D2691E; }
41 | .cm-s-ttcn .cm-status { color:#8B4545; }
42 | .cm-s-ttcn .cm-storage { color:#A020F0; }
43 | .cm-s-ttcn .cm-tags { color:#006400; }
44 |
45 | /* CFG */
46 | .cm-s-ttcn .cm-externalCommands { color: #8B4545; font-weight:bold; }
47 | .cm-s-ttcn .cm-fileNCtrlMaskOptions,
48 | .cm-s-ttcn .cm-sectionTitle { color: #2E8B57; font-weight:bold; }
49 |
50 | /* TTCN */
51 | .cm-s-ttcn .cm-booleanConsts,
52 | .cm-s-ttcn .cm-otherConsts,
53 | .cm-s-ttcn .cm-verdictConsts { color: #006400; }
54 | .cm-s-ttcn .cm-configOps,
55 | .cm-s-ttcn .cm-functionOps,
56 | .cm-s-ttcn .cm-portOps,
57 | .cm-s-ttcn .cm-sutOps,
58 | .cm-s-ttcn .cm-timerOps,
59 | .cm-s-ttcn .cm-verdictOps { color: #0000FF; }
60 | .cm-s-ttcn .cm-preprocessor,
61 | .cm-s-ttcn .cm-templateMatch,
62 | .cm-s-ttcn .cm-ttcn3Macros { color: #27408B; }
63 | .cm-s-ttcn .cm-types { color: #A52A2A; font-weight:bold; }
64 | .cm-s-ttcn .cm-visibilityModifiers { font-weight:bold; }
65 |
--------------------------------------------------------------------------------
/app/styles/theme/twilight.css:
--------------------------------------------------------------------------------
1 | .cm-s-twilight.CodeMirror { background: #141414; color: #f7f7f7; } /**/
2 | .cm-s-twilight div.CodeMirror-selected { background: #323232; } /**/
3 | .cm-s-twilight .CodeMirror-line::selection, .cm-s-twilight .CodeMirror-line > span::selection, .cm-s-twilight .CodeMirror-line > span > span::selection { background: rgba(50, 50, 50, 0.99); }
4 | .cm-s-twilight .CodeMirror-line::-moz-selection, .cm-s-twilight .CodeMirror-line > span::-moz-selection, .cm-s-twilight .CodeMirror-line > span > span::-moz-selection { background: rgba(50, 50, 50, 0.99); }
5 |
6 | .cm-s-twilight .CodeMirror-gutters { background: #222; border-right: 1px solid #aaa; }
7 | .cm-s-twilight .CodeMirror-guttermarker { color: white; }
8 | .cm-s-twilight .CodeMirror-guttermarker-subtle { color: #aaa; }
9 | .cm-s-twilight .CodeMirror-linenumber { color: #aaa; }
10 | .cm-s-twilight .CodeMirror-cursor { border-left: 1px solid white; }
11 |
12 | .cm-s-twilight .cm-keyword { color: #f9ee98; } /**/
13 | .cm-s-twilight .cm-atom { color: #FC0; }
14 | .cm-s-twilight .cm-number { color: #ca7841; } /**/
15 | .cm-s-twilight .cm-def { color: #8DA6CE; }
16 | .cm-s-twilight span.cm-variable-2, .cm-s-twilight span.cm-tag { color: #607392; } /**/
17 | .cm-s-twilight span.cm-variable-3, .cm-s-twilight span.cm-def, .cm-s-twilight span.cm-type { color: #607392; } /**/
18 | .cm-s-twilight .cm-operator { color: #cda869; } /**/
19 | .cm-s-twilight .cm-comment { color:#777; font-style:italic; font-weight:normal; } /**/
20 | .cm-s-twilight .cm-string { color:#8f9d6a; font-style:italic; } /**/
21 | .cm-s-twilight .cm-string-2 { color:#bd6b18; } /*?*/
22 | .cm-s-twilight .cm-meta { background-color:#141414; color:#f7f7f7; } /*?*/
23 | .cm-s-twilight .cm-builtin { color: #cda869; } /*?*/
24 | .cm-s-twilight .cm-tag { color: #997643; } /**/
25 | .cm-s-twilight .cm-attribute { color: #d6bb6d; } /*?*/
26 | .cm-s-twilight .cm-header { color: #FF6400; }
27 | .cm-s-twilight .cm-hr { color: #AEAEAE; }
28 | .cm-s-twilight .cm-link { color:#ad9361; font-style:italic; text-decoration:none; } /**/
29 | .cm-s-twilight .cm-error { border-bottom: 1px solid red; }
30 |
31 | .cm-s-twilight .CodeMirror-activeline-background { background: #27282E; }
32 | .cm-s-twilight .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; }
33 |
--------------------------------------------------------------------------------
/app/styles/theme/vibrant-ink.css:
--------------------------------------------------------------------------------
1 | /* Taken from the popular Visual Studio Vibrant Ink Schema */
2 |
3 | .cm-s-vibrant-ink.CodeMirror { background: black; color: white; }
4 | .cm-s-vibrant-ink div.CodeMirror-selected { background: #35493c; }
5 | .cm-s-vibrant-ink .CodeMirror-line::selection, .cm-s-vibrant-ink .CodeMirror-line > span::selection, .cm-s-vibrant-ink .CodeMirror-line > span > span::selection { background: rgba(53, 73, 60, 0.99); }
6 | .cm-s-vibrant-ink .CodeMirror-line::-moz-selection, .cm-s-vibrant-ink .CodeMirror-line > span::-moz-selection, .cm-s-vibrant-ink .CodeMirror-line > span > span::-moz-selection { background: rgba(53, 73, 60, 0.99); }
7 |
8 | .cm-s-vibrant-ink .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
9 | .cm-s-vibrant-ink .CodeMirror-guttermarker { color: white; }
10 | .cm-s-vibrant-ink .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
11 | .cm-s-vibrant-ink .CodeMirror-linenumber { color: #d0d0d0; }
12 | .cm-s-vibrant-ink .CodeMirror-cursor { border-left: 1px solid white; }
13 |
14 | .cm-s-vibrant-ink .cm-keyword { color: #CC7832; }
15 | .cm-s-vibrant-ink .cm-atom { color: #FC0; }
16 | .cm-s-vibrant-ink .cm-number { color: #FFEE98; }
17 | .cm-s-vibrant-ink .cm-def { color: #8DA6CE; }
18 | .cm-s-vibrant-ink span.cm-variable-2, .cm-s-vibrant span.cm-tag { color: #FFC66D; }
19 | .cm-s-vibrant-ink span.cm-variable-3, .cm-s-vibrant span.cm-def, .cm-s-vibrant span.cm-type { color: #FFC66D; }
20 | .cm-s-vibrant-ink .cm-operator { color: #888; }
21 | .cm-s-vibrant-ink .cm-comment { color: gray; font-weight: bold; }
22 | .cm-s-vibrant-ink .cm-string { color: #A5C25C; }
23 | .cm-s-vibrant-ink .cm-string-2 { color: red; }
24 | .cm-s-vibrant-ink .cm-meta { color: #D8FA3C; }
25 | .cm-s-vibrant-ink .cm-builtin { color: #8DA6CE; }
26 | .cm-s-vibrant-ink .cm-tag { color: #8DA6CE; }
27 | .cm-s-vibrant-ink .cm-attribute { color: #8DA6CE; }
28 | .cm-s-vibrant-ink .cm-header { color: #FF6400; }
29 | .cm-s-vibrant-ink .cm-hr { color: #AEAEAE; }
30 | .cm-s-vibrant-ink .cm-link { color: #5656F3; }
31 | .cm-s-vibrant-ink .cm-error { border-bottom: 1px solid red; }
32 |
33 | .cm-s-vibrant-ink .CodeMirror-activeline-background { background: #27282E; }
34 | .cm-s-vibrant-ink .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; }
35 |
--------------------------------------------------------------------------------
/app/styles/theme/xq-dark.css:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 by MarkLogic Corporation
3 | Author: Mike Brevoort
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 | */
23 | .cm-s-xq-dark.CodeMirror { background: #0a001f; color: #f8f8f8; }
24 | .cm-s-xq-dark div.CodeMirror-selected { background: #27007A; }
25 | .cm-s-xq-dark .CodeMirror-line::selection, .cm-s-xq-dark .CodeMirror-line > span::selection, .cm-s-xq-dark .CodeMirror-line > span > span::selection { background: rgba(39, 0, 122, 0.99); }
26 | .cm-s-xq-dark .CodeMirror-line::-moz-selection, .cm-s-xq-dark .CodeMirror-line > span::-moz-selection, .cm-s-xq-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(39, 0, 122, 0.99); }
27 | .cm-s-xq-dark .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
28 | .cm-s-xq-dark .CodeMirror-guttermarker { color: #FFBD40; }
29 | .cm-s-xq-dark .CodeMirror-guttermarker-subtle { color: #f8f8f8; }
30 | .cm-s-xq-dark .CodeMirror-linenumber { color: #f8f8f8; }
31 | .cm-s-xq-dark .CodeMirror-cursor { border-left: 1px solid white; }
32 |
33 | .cm-s-xq-dark span.cm-keyword { color: #FFBD40; }
34 | .cm-s-xq-dark span.cm-atom { color: #6C8CD5; }
35 | .cm-s-xq-dark span.cm-number { color: #164; }
36 | .cm-s-xq-dark span.cm-def { color: #FFF; text-decoration:underline; }
37 | .cm-s-xq-dark span.cm-variable { color: #FFF; }
38 | .cm-s-xq-dark span.cm-variable-2 { color: #EEE; }
39 | .cm-s-xq-dark span.cm-variable-3, .cm-s-xq-dark span.cm-type { color: #DDD; }
40 | .cm-s-xq-dark span.cm-property {}
41 | .cm-s-xq-dark span.cm-operator {}
42 | .cm-s-xq-dark span.cm-comment { color: gray; }
43 | .cm-s-xq-dark span.cm-string { color: #9FEE00; }
44 | .cm-s-xq-dark span.cm-meta { color: yellow; }
45 | .cm-s-xq-dark span.cm-qualifier { color: #FFF700; }
46 | .cm-s-xq-dark span.cm-builtin { color: #30a; }
47 | .cm-s-xq-dark span.cm-bracket { color: #cc7; }
48 | .cm-s-xq-dark span.cm-tag { color: #FFBD40; }
49 | .cm-s-xq-dark span.cm-attribute { color: #FFF700; }
50 | .cm-s-xq-dark span.cm-error { color: #f00; }
51 |
52 | .cm-s-xq-dark .CodeMirror-activeline-background { background: #27282E; }
53 | .cm-s-xq-dark .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; }
54 |
--------------------------------------------------------------------------------
/app/styles/theme/xq-light.css:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 by MarkLogic Corporation
3 | Author: Mike Brevoort
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 | */
23 | .cm-s-xq-light span.cm-keyword { line-height: 1em; font-weight: bold; color: #5A5CAD; }
24 | .cm-s-xq-light span.cm-atom { color: #6C8CD5; }
25 | .cm-s-xq-light span.cm-number { color: #164; }
26 | .cm-s-xq-light span.cm-def { text-decoration:underline; }
27 | .cm-s-xq-light span.cm-variable { color: black; }
28 | .cm-s-xq-light span.cm-variable-2 { color:black; }
29 | .cm-s-xq-light span.cm-variable-3, .cm-s-xq-light span.cm-type { color: black; }
30 | .cm-s-xq-light span.cm-property {}
31 | .cm-s-xq-light span.cm-operator {}
32 | .cm-s-xq-light span.cm-comment { color: #0080FF; font-style: italic; }
33 | .cm-s-xq-light span.cm-string { color: red; }
34 | .cm-s-xq-light span.cm-meta { color: yellow; }
35 | .cm-s-xq-light span.cm-qualifier { color: grey; }
36 | .cm-s-xq-light span.cm-builtin { color: #7EA656; }
37 | .cm-s-xq-light span.cm-bracket { color: #cc7; }
38 | .cm-s-xq-light span.cm-tag { color: #3F7F7F; }
39 | .cm-s-xq-light span.cm-attribute { color: #7F007F; }
40 | .cm-s-xq-light span.cm-error { color: #f00; }
41 |
42 | .cm-s-xq-light .CodeMirror-activeline-background { background: #e8f2ff; }
43 | .cm-s-xq-light .CodeMirror-matchingbracket { outline:1px solid grey;color:black !important;background:yellow; }
44 |
--------------------------------------------------------------------------------
/app/styles/theme/yeti.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: yeti
4 | Author: Michael Kaminsky (http://github.com/mkaminsky11)
5 |
6 | Original yeti color scheme by Jesse Weed (https://github.com/jesseweed/yeti-syntax)
7 |
8 | */
9 |
10 |
11 | .cm-s-yeti.CodeMirror {
12 | background-color: #ECEAE8 !important;
13 | color: #d1c9c0 !important;
14 | border: none;
15 | }
16 |
17 | .cm-s-yeti .CodeMirror-gutters {
18 | color: #adaba6;
19 | background-color: #E5E1DB;
20 | border: none;
21 | }
22 | .cm-s-yeti .CodeMirror-cursor { border-left: solid thin #d1c9c0; }
23 | .cm-s-yeti .CodeMirror-linenumber { color: #adaba6; }
24 | .cm-s-yeti.CodeMirror-focused div.CodeMirror-selected { background: #DCD8D2; }
25 | .cm-s-yeti .CodeMirror-line::selection, .cm-s-yeti .CodeMirror-line > span::selection, .cm-s-yeti .CodeMirror-line > span > span::selection { background: #DCD8D2; }
26 | .cm-s-yeti .CodeMirror-line::-moz-selection, .cm-s-yeti .CodeMirror-line > span::-moz-selection, .cm-s-yeti .CodeMirror-line > span > span::-moz-selection { background: #DCD8D2; }
27 | .cm-s-yeti span.cm-comment { color: #d4c8be; }
28 | .cm-s-yeti span.cm-string, .cm-s-yeti span.cm-string-2 { color: #96c0d8; }
29 | .cm-s-yeti span.cm-number { color: #a074c4; }
30 | .cm-s-yeti span.cm-variable { color: #55b5db; }
31 | .cm-s-yeti span.cm-variable-2 { color: #a074c4; }
32 | .cm-s-yeti span.cm-def { color: #55b5db; }
33 | .cm-s-yeti span.cm-operator { color: #9fb96e; }
34 | .cm-s-yeti span.cm-keyword { color: #9fb96e; }
35 | .cm-s-yeti span.cm-atom { color: #a074c4; }
36 | .cm-s-yeti span.cm-meta { color: #96c0d8; }
37 | .cm-s-yeti span.cm-tag { color: #96c0d8; }
38 | .cm-s-yeti span.cm-attribute { color: #9fb96e; }
39 | .cm-s-yeti span.cm-qualifier { color: #96c0d8; }
40 | .cm-s-yeti span.cm-property { color: #a074c4; }
41 | .cm-s-yeti span.cm-builtin { color: #a074c4; }
42 | .cm-s-yeti span.cm-variable-3, .cm-s-yeti span.cm-type { color: #96c0d8; }
43 | .cm-s-yeti .CodeMirror-activeline-background { background: #E7E4E0; }
44 | .cm-s-yeti .CodeMirror-matchingbracket { text-decoration: underline; }
45 |
--------------------------------------------------------------------------------
/app/styles/theme/yonce.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: yoncé
4 | Author: Thomas MacLean (http://github.com/thomasmaclean)
5 |
6 | Original yoncé color scheme by Mina Markham (https://github.com/minamarkham)
7 |
8 | */
9 |
10 | .cm-s-yonce.CodeMirror { background: #1C1C1C; color: #d4d4d4; } /**/
11 | .cm-s-yonce div.CodeMirror-selected { background: rgba(252, 69, 133, 0.478); } /**/
12 | .cm-s-yonce .CodeMirror-selectedtext,
13 | .cm-s-yonce .CodeMirror-selected,
14 | .cm-s-yonce .CodeMirror-line::selection,
15 | .cm-s-yonce .CodeMirror-line > span::selection,
16 | .cm-s-yonce .CodeMirror-line > span > span::selection,
17 | .cm-s-yonce .CodeMirror-line::-moz-selection,
18 | .cm-s-yonce .CodeMirror-line > span::-moz-selection,
19 | .cm-s-yonce .CodeMirror-line > span > span::-moz-selection { background: rgba(252, 67, 132, 0.47); }
20 |
21 | .cm-s-yonce.CodeMirror pre { padding-left: 0px; }
22 | .cm-s-yonce .CodeMirror-gutters {background: #1C1C1C; border-right: 0px;}
23 | .cm-s-yonce .CodeMirror-linenumber {color: #777777; padding-right: 10px; }
24 | .cm-s-yonce .CodeMirror-activeline .CodeMirror-linenumber.CodeMirror-gutter-elt { background: #1C1C1C; color: #fc4384; }
25 | .cm-s-yonce .CodeMirror-linenumber { color: #777; }
26 | .cm-s-yonce .CodeMirror-cursor { border-left: 2px solid #FC4384; }
27 | .cm-s-yonce .cm-searching { background: rgba(243, 155, 53, .3) !important; outline: 1px solid #F39B35; }
28 | .cm-s-yonce .cm-searching.CodeMirror-selectedtext { background: rgba(243, 155, 53, .7) !important; color: white; }
29 |
30 | .cm-s-yonce .cm-keyword { color: #00A7AA; } /**/
31 | .cm-s-yonce .cm-atom { color: #F39B35; }
32 | .cm-s-yonce .cm-number, .cm-s-yonce span.cm-type { color: #A06FCA; } /**/
33 | .cm-s-yonce .cm-def { color: #98E342; }
34 | .cm-s-yonce .cm-property,
35 | .cm-s-yonce span.cm-variable { color: #D4D4D4; font-style: italic; }
36 | .cm-s-yonce span.cm-variable-2 { color: #da7dae; font-style: italic; }
37 | .cm-s-yonce span.cm-variable-3 { color: #A06FCA; }
38 | .cm-s-yonce .cm-type.cm-def { color: #FC4384; font-style: normal; text-decoration: underline; }
39 | .cm-s-yonce .cm-property.cm-def { color: #FC4384; font-style: normal; }
40 | .cm-s-yonce .cm-callee { color: #FC4384; font-style: normal; }
41 | .cm-s-yonce .cm-operator { color: #FC4384; } /**/
42 | .cm-s-yonce .cm-qualifier,
43 | .cm-s-yonce .cm-tag { color: #FC4384; }
44 | .cm-s-yonce .cm-tag.cm-bracket { color: #D4D4D4; }
45 | .cm-s-yonce .cm-attribute { color: #A06FCA; }
46 | .cm-s-yonce .cm-comment { color:#696d70; font-style:italic; font-weight:normal; } /**/
47 | .cm-s-yonce .cm-comment.cm-tag { color: #FC4384 }
48 | .cm-s-yonce .cm-comment.cm-attribute { color: #D4D4D4; }
49 | .cm-s-yonce .cm-string { color:#E6DB74; } /**/
50 | .cm-s-yonce .cm-string-2 { color:#F39B35; } /*?*/
51 | .cm-s-yonce .cm-meta { color: #D4D4D4; background: inherit; }
52 | .cm-s-yonce .cm-builtin { color: #FC4384; } /*?*/
53 | .cm-s-yonce .cm-header { color: #da7dae; }
54 | .cm-s-yonce .cm-hr { color: #98E342; }
55 | .cm-s-yonce .cm-link { color:#696d70; font-style:italic; text-decoration:none; } /**/
56 | .cm-s-yonce .cm-error { border-bottom: 1px solid #C42412; }
57 |
58 | .cm-s-yonce .CodeMirror-activeline-background { background: #272727; }
59 | .cm-s-yonce .CodeMirror-matchingbracket { outline:1px solid grey; color:#D4D4D4 !important; }
60 |
--------------------------------------------------------------------------------
/app/styles/theme/zenburn.css:
--------------------------------------------------------------------------------
1 | /**
2 | * "
3 | * Using Zenburn color palette from the Emacs Zenburn Theme
4 | * https://github.com/bbatsov/zenburn-emacs/blob/master/zenburn-theme.el
5 | *
6 | * Also using parts of https://github.com/xavi/coderay-lighttable-theme
7 | * "
8 | * From: https://github.com/wisenomad/zenburn-lighttable-theme/blob/master/zenburn.css
9 | */
10 |
11 | .cm-s-zenburn .CodeMirror-gutters { background: #3f3f3f !important; }
12 | .cm-s-zenburn .CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded { color: #999; }
13 | .cm-s-zenburn .CodeMirror-cursor { border-left: 1px solid white; }
14 | .cm-s-zenburn { background-color: #3f3f3f; color: #dcdccc; }
15 | .cm-s-zenburn span.cm-builtin { color: #dcdccc; font-weight: bold; }
16 | .cm-s-zenburn span.cm-comment { color: #7f9f7f; }
17 | .cm-s-zenburn span.cm-keyword { color: #f0dfaf; font-weight: bold; }
18 | .cm-s-zenburn span.cm-atom { color: #bfebbf; }
19 | .cm-s-zenburn span.cm-def { color: #dcdccc; }
20 | .cm-s-zenburn span.cm-variable { color: #dfaf8f; }
21 | .cm-s-zenburn span.cm-variable-2 { color: #dcdccc; }
22 | .cm-s-zenburn span.cm-string { color: #cc9393; }
23 | .cm-s-zenburn span.cm-string-2 { color: #cc9393; }
24 | .cm-s-zenburn span.cm-number { color: #dcdccc; }
25 | .cm-s-zenburn span.cm-tag { color: #93e0e3; }
26 | .cm-s-zenburn span.cm-property { color: #dfaf8f; }
27 | .cm-s-zenburn span.cm-attribute { color: #dfaf8f; }
28 | .cm-s-zenburn span.cm-qualifier { color: #7cb8bb; }
29 | .cm-s-zenburn span.cm-meta { color: #f0dfaf; }
30 | .cm-s-zenburn span.cm-header { color: #f0efd0; }
31 | .cm-s-zenburn span.cm-operator { color: #f0efd0; }
32 | .cm-s-zenburn span.CodeMirror-matchingbracket { box-sizing: border-box; background: transparent; border-bottom: 1px solid; }
33 | .cm-s-zenburn span.CodeMirror-nonmatchingbracket { border-bottom: 1px solid; background: none; }
34 | .cm-s-zenburn .CodeMirror-activeline { background: #000000; }
35 | .cm-s-zenburn .CodeMirror-activeline-background { background: #000000; }
36 | .cm-s-zenburn div.CodeMirror-selected { background: #545454; }
37 | .cm-s-zenburn .CodeMirror-focused div.CodeMirror-selected { background: #4f4f4f; }
38 |
--------------------------------------------------------------------------------
/app/test/index.js:
--------------------------------------------------------------------------------
1 | var fs = require('fs');
2 | var md = fs.readFileSync('./test.md', 'utf8');
3 |
4 | var generateToc = require('./toc.js');
5 |
6 | var newMd = generateToc(md);
7 |
8 | fs.writeFileSync('./newMd.md', newMd, 'utf8')
9 |
--------------------------------------------------------------------------------
/app/test/newMd.md:
--------------------------------------------------------------------------------
1 | #### 目录
2 |
3 | - [clone mpvue-quickstart模板](#clone mpvue-quickstart模板)
4 | - [注意⚠️](#注意⚠️)
5 | - [提示](#提示)
6 | - [分包体验](#分包体验)
7 | - [初始化之后](#初始化之后)
8 | - [现有项目的分包改造](#现有项目的分包改造)
9 |
10 | "这个功能可以说是让我们这些用mpvue的等的很焦灼,眼看着项目的大小一天天地逼近2M,mpvue还不能很好地支持分包加载,这可咋整?好消息是最近mpvue要支持分包加载了,不过目前在develop分支下面。下面我们一步步来看看怎么初始化一个支持分包加载的mpvue项目,以及不平滑的完成对老项目的改造。
11 | clone mpvue-quickstart模板
12 |
13 | 初始化一个mpvue项目是基于mpvue-quickstart项目模板的,使用的是下面的命令:
14 |
15 |
16 |
17 | 但是这样是基于quickstart的master分支创建的项目,所以我们可以把这个模板clone下来,然后切换到develop分支上,再基于本地的模板创建一个新的mpvue项目,以下是一通(猛如虎的)操作:
18 |
19 |
20 |
21 | 这时,在项目的template/src目录下会有一个app.json文件,表明你现在在开发分支上。
22 | 注意⚠️
23 |
24 | datdattt
25 | 提示
26 |
27 | 66666666666
28 | 分包体验
29 |
30 | 首先用本地分mpvue模板初始化一个项目,参考vue-cli使用本地模板的[文档](https://github.com/vuejs/vue-cli/tree/v2#local-templates):
31 |
32 |
33 | 可以看到我们将模板替换成了本地的模板,后面的操作就熟悉了。
34 | 初始化之后
35 |
36 | 初始化好项目之后,我们来写一个分包加载的demo。进入项目目录,我们可以看到一个json文件,就是上面提到的app.json。然后参考小程序文档,加入subpackages的相关配置:
37 |
38 |
39 | 然后在pages/下,新建pA/a目录,在目录下再新建两个文件,`main.js`和`index.vue`,最终目录结构如下图所示:
40 |
41 |
42 |
43 | 后面的操作就跟之前的mpvue开发过程一致了,这里不再赘述。直接贴上相关代码:
44 |
45 |
46 | 当点击上面的链接时,手机上会首先出现正在加载模块,然后跳转到build出来的`pages/pA/a/mian`页面,表示分包生效。
47 | 现有项目的分包改造
48 |
49 | 对于想将现有项目改造成支持分包的朋友,可能要麻烦一点,还要踩一点坑。下面我就详细说一下我们的改造过程以及遇到的坑。下面内容主要参考[issue 672](https://github.com/Meituan-Dianping/mpvue/issues/672)
50 |
51 | - 将项目备份一份,包括依赖
52 |
53 | 没有人希望分包改造不成功,还把原来能跑的搞的不能跑了,所以,先将整个项目复制一份,然后在副本里搞
54 |
55 | - 升级依赖
56 |
57 |
58 |
59 | - 修改webpack配置
60 |
61 | 在这一步,会修改build目录下的`webpack.base.conf.js`,`webpack.prod.conf.js`,`webpack.dev.conf.js`三个文件,具体细节参考[这里](https://github.com/mpvue/mpvue-quickstart/pull/39/files)
62 |
63 | - 修改config目录下的配置
64 |
65 | 打开 config/index.js,将`assetsSubDirectory`字段的值由static改成''
66 |
67 |
68 |
69 | - 将app.json的配置从main.js中移出来,命名为main.json
70 |
71 | 之前mpvue将app.json写到main.js的export中,现在把它拿到同级目录下,新建一个main.json文件(注意是main.json,不是app.json),按小程序文档的格式粘贴进去。
72 |
73 | 
74 | 
75 | 最后 `npm run dev`看看有没有跑起来(完)
76 | 
77 | 最近写东西越来越水了。。。"
78 |
--------------------------------------------------------------------------------
/app/test/test.md:
--------------------------------------------------------------------------------
1 | "这个功能可以说是让我们这些用mpvue的等的很焦灼,眼看着项目的大小一天天地逼近2M,mpvue还不能很好地支持分包加载,这可咋整?好消息是最近mpvue要支持分包加载了,不过目前在develop分支下面。下面我们一步步来看看怎么初始化一个支持分包加载的mpvue项目,以及不平滑的完成对老项目的改造。
2 |
3 | ### clone mpvue-quickstart模板
4 |
5 | 初始化一个mpvue项目是基于mpvue-quickstart项目模板的,使用的是下面的命令:
6 |
7 | ```bash
8 | # 123
9 | vue init mpvue/mpvue-quickstart my-project
10 | ```
11 |
12 | 但是这样是基于quickstart的master分支创建的项目,所以我们可以把这个模板clone下来,然后切换到develop分支上,再基于本地的模板创建一个新的mpvue项目,以下是一通(猛如虎的)操作:
13 |
14 | ```bash
15 | git clone https://github.com/mpvue/mpvue-quickstart.git
16 | cd mpvue-quickstart
17 | git branch develop #切换到开发分支
18 | ```
19 |
20 | 这时,在项目的template/src目录下会有一个app.json文件,表明你现在在开发分支上。
21 |
22 | #### 注意⚠️
23 |
24 | datdattt
25 | ##### 提示
26 |
27 | 66666666666
28 |
29 | ## 分包体验
30 |
31 | 首先用本地分mpvue模板初始化一个项目,参考vue-cli使用本地模板的[文档](https://github.com/vuejs/vue-cli/tree/v2#local-templates):
32 |
33 | ```bash
34 | vue init ../mpvue-quickstart demo # 替换模板路径为相对于你项目的相对路径
35 | ```
36 | 可以看到我们将模板替换成了本地的模板,后面的操作就熟悉了。
37 |
38 | ### 初始化之后
39 |
40 | 初始化好项目之后,我们来写一个分包加载的demo。进入项目目录,我们可以看到一个json文件,就是上面提到的app.json。然后参考小程序文档,加入subpackages的相关配置:
41 |
42 | ```js
43 |
44 | {
45 | "pages": [
46 | "pages/index/main",
47 | "pages/logs/main" ],
48 | "window": {
49 | "backgroundTextStyle": "light",
50 | "navigationBarBackgroundColor": "#fff",
51 | "navigationBarTitleText": "WeChat",
52 | "navigationBarTextStyle": "black"
53 | },
54 | "subPackages": [
55 | {
56 | "root": "pages/pA",
57 | "pages": [
58 | "a/main"
59 | ]
60 | }
61 | ]
62 | }
63 |
64 | ```
65 | 然后在pages/下,新建pA/a目录,在目录下再新建两个文件,`main.js`和`index.vue`,最终目录结构如下图所示:
66 |
67 |
68 |
69 | 后面的操作就跟之前的mpvue开发过程一致了,这里不再赘述。直接贴上相关代码:
70 |
71 | ```html
72 |
73 | index/index.vue 主包
74 |
75 | ...
76 |
77 | 分包 跳转到分包
78 | ...
79 |
80 | ```
81 | 当点击上面的链接时,手机上会首先出现正在加载模块,然后跳转到build出来的`pages/pA/a/mian`页面,表示分包生效。
82 |
83 | ### 现有项目的分包改造
84 |
85 | 对于想将现有项目改造成支持分包的朋友,可能要麻烦一点,还要踩一点坑。下面我就详细说一下我们的改造过程以及遇到的坑。下面内容主要参考[issue 672](https://github.com/Meituan-Dianping/mpvue/issues/672)
86 |
87 | - 将项目备份一份,包括依赖
88 |
89 | 没有人希望分包改造不成功,还把原来能跑的搞的不能跑了,所以,先将整个项目复制一份,然后在副本里搞
90 |
91 | - 升级依赖
92 |
93 | ```bash
94 |
95 | cnpm i mpvue-loader@1.1.0-rc.1 --save
96 |
97 | cnpm i webpack-mpvue-asset-plugin@0.1.0-rc.1 --save
98 |
99 | ```
100 |
101 | - 修改webpack配置
102 |
103 | 在这一步,会修改build目录下的`webpack.base.conf.js`,`webpack.prod.conf.js`,`webpack.dev.conf.js`三个文件,具体细节参考[这里](https://github.com/mpvue/mpvue-quickstart/pull/39/files)
104 |
105 | - 修改config目录下的配置
106 |
107 | 打开 config/index.js,将`assetsSubDirectory`字段的值由static改成''
108 |
109 | ```js
110 | ...
111 | assetsSubDirectory: ''// 去掉static
112 | ...
113 | ```
114 |
115 | - 将app.json的配置从main.js中移出来,命名为main.json
116 |
117 | 之前mpvue将app.json写到main.js的export中,现在把它拿到同级目录下,新建一个main.json文件(注意是main.json,不是app.json),按小程序文档的格式粘贴进去。
118 |
119 | 
120 | 
121 | 最后 `npm run dev`看看有没有跑起来(完)
122 | 
123 | 最近写东西越来越水了。。。"
--------------------------------------------------------------------------------
/app/test/toc.js:
--------------------------------------------------------------------------------
1 | module.exports = function generateToc(md){
2 | md = md.replace(/```[\s\S]*?```/g, '');
3 | console.log(/#\s123/.test(md));
4 | var re = /^\s*(#{1,6})\s+(.+)$/mg;
5 | var tocList = [];
6 |
7 | while(true){
8 | var match = re.exec(md);
9 | if(!match) break;
10 | console.log(match[0], match[1], match[2]);
11 | tocList.push({
12 | level: match[1].length,
13 | content: match[2].replace('\n', ''),
14 | all: match[0]
15 | });
16 | }
17 |
18 | // 找出最大是几级标题
19 | var minLevel = Math.min(...tocList.map(t => t.level));
20 |
21 | // - [提示](#提示)
22 | var tocStr = tocList
23 | .map(item => ' '.repeat(item.level - minLevel) + '- ' + `[${item.content}](#${item.content})` )
24 | .join('\n');
25 |
26 | //
27 | for(let t of tocList){
28 | md = md.replace(t.all, `${t.content}`);
29 | }
30 |
31 | newMd = `#### 目录
32 |
33 | ${tocStr}
34 |
35 | ${md}
36 | `;
37 | return newMd;
38 | };
--------------------------------------------------------------------------------
/images/css.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imgss/cnblogs-mdEditor/617fe1251a1281cbcae2fa92245dce08cddc0c2f/images/css.png
--------------------------------------------------------------------------------
/images/dest-0.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imgss/cnblogs-mdEditor/617fe1251a1281cbcae2fa92245dce08cddc0c2f/images/dest-0.jpg
--------------------------------------------------------------------------------
/images/doutu.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imgss/cnblogs-mdEditor/617fe1251a1281cbcae2fa92245dce08cddc0c2f/images/doutu.gif
--------------------------------------------------------------------------------
/images/emoji.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imgss/cnblogs-mdEditor/617fe1251a1281cbcae2fa92245dce08cddc0c2f/images/emoji.png
--------------------------------------------------------------------------------
/images/mdeditor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imgss/cnblogs-mdEditor/617fe1251a1281cbcae2fa92245dce08cddc0c2f/images/mdeditor.png
--------------------------------------------------------------------------------
/images/shatter1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imgss/cnblogs-mdEditor/617fe1251a1281cbcae2fa92245dce08cddc0c2f/images/shatter1.gif
--------------------------------------------------------------------------------
/images/shatter2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imgss/cnblogs-mdEditor/617fe1251a1281cbcae2fa92245dce08cddc0c2f/images/shatter2.gif
--------------------------------------------------------------------------------
/images/sort.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imgss/cnblogs-mdEditor/617fe1251a1281cbcae2fa92245dce08cddc0c2f/images/sort.png
--------------------------------------------------------------------------------