storytime 2.1.6 → 2.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.github/workflows/test.yml +54 -0
- data/.gitignore +2 -1
- data/.ruby-version +1 -1
- data/.tool-versions +1 -0
- data/Gemfile +5 -3
- data/Gemfile.lock +414 -425
- data/Guardfile +1 -1
- data/app/assets/fonts/storytime-icons.eot +0 -0
- data/app/assets/fonts/storytime-icons.svg +23 -0
- data/app/assets/fonts/storytime-icons.ttf +0 -0
- data/app/assets/fonts/storytime-icons.woff +0 -0
- data/app/assets/javascripts/storytime/application.js +1 -8
- data/app/assets/javascripts/storytime/off_canvas.coffee +16 -0
- data/app/assets/javascripts/storytime/wysiwyg.js.coffee +9 -7
- data/app/assets/stylesheets/storytime/_buttons.scss +33 -0
- data/app/assets/stylesheets/storytime/_list-group.scss +1 -1
- data/app/assets/stylesheets/storytime/application.scss +14 -2
- data/app/assets/stylesheets/storytime/icons.scss +5 -5
- data/app/assets/stylesheets/storytime/leather/_buttons.scss +31 -0
- data/app/assets/stylesheets/storytime/leather/_devise.scss +72 -0
- data/app/assets/stylesheets/storytime/leather/_grid.scss +19 -0
- data/app/assets/stylesheets/storytime/leather/_list_groups.scss +33 -0
- data/app/assets/stylesheets/storytime/leather/_nav_menus.scss +125 -0
- data/app/assets/stylesheets/storytime/leather/_navbar_transparent.scss +23 -0
- data/app/assets/stylesheets/storytime/leather/_off_canvas.scss +109 -0
- data/app/assets/stylesheets/storytime/leather/_scroll_panels.scss +85 -0
- data/app/assets/stylesheets/storytime/leather/_toggle_columns.scss +23 -0
- data/app/assets/stylesheets/storytime/leather/_typography.scss +12 -0
- data/app/assets/stylesheets/storytime/leather/_utilities.scss +54 -0
- data/app/assets/stylesheets/storytime/leather/_variables.scss +8 -0
- data/app/assets/stylesheets/storytime/posts.scss +9 -1
- data/app/controllers/storytime/application_controller.rb +1 -1
- data/app/controllers/storytime/dashboard/blog_posts_controller.rb +5 -3
- data/app/controllers/storytime/dashboard/blogs_controller.rb +1 -1
- data/app/controllers/storytime/dashboard/media_controller.rb +4 -4
- data/app/controllers/storytime/dashboard/memberships_controller.rb +1 -1
- data/app/controllers/storytime/dashboard/pages_controller.rb +26 -6
- data/app/controllers/storytime/dashboard/posts_controller.rb +30 -5
- data/app/controllers/storytime/dashboard/subscriptions_controller.rb +1 -1
- data/app/controllers/storytime/pages_controller.rb +31 -1
- data/app/controllers/storytime/posts_controller.rb +1 -1
- data/app/controllers/storytime/subscriptions_controller.rb +5 -1
- data/app/helpers/storytime/application_helper.rb +0 -4
- data/app/models/concerns/storytime/post_featured_images.rb +2 -2
- data/app/models/concerns/storytime/post_partial_inheritance.rb +2 -2
- data/app/models/storytime/autosave.rb +1 -1
- data/app/models/storytime/comment.rb +1 -1
- data/app/models/storytime/media.rb +1 -1
- data/app/models/storytime/membership.rb +2 -2
- data/app/models/storytime/post.rb +7 -3
- data/app/models/storytime/site.rb +4 -6
- data/app/models/storytime/snippet.rb +12 -1
- data/app/models/storytime/subscription.rb +2 -2
- data/app/models/storytime/version.rb +1 -1
- data/app/policies/storytime/post_policy.rb +1 -1
- data/app/views/storytime/dashboard/_navigation.html.erb +0 -9
- data/app/views/storytime/dashboard/blog_posts/_form.html.erb +5 -1
- data/app/views/storytime/dashboard/blogs/edit.json.jbuilder +1 -1
- data/app/views/storytime/dashboard/blogs/index.json.jbuilder +1 -1
- data/app/views/storytime/dashboard/blogs/new.json.jbuilder +1 -1
- data/app/views/storytime/dashboard/media/_gallery.html.erb +1 -1
- data/app/views/storytime/dashboard/media/_modal.html.erb +2 -2
- data/app/views/storytime/dashboard/media/show.json.jbuilder +1 -1
- data/app/views/storytime/dashboard/memberships/_edit.html.erb +1 -1
- data/app/views/storytime/dashboard/memberships/_index.html.erb +3 -3
- data/app/views/storytime/dashboard/memberships/_new.html.erb +1 -1
- data/app/views/storytime/dashboard/memberships/edit.json.jbuilder +1 -1
- data/app/views/storytime/dashboard/memberships/index.json.jbuilder +1 -1
- data/app/views/storytime/dashboard/memberships/new.json.jbuilder +1 -1
- data/app/views/storytime/dashboard/memberships/save.json.jbuilder +1 -1
- data/app/views/storytime/dashboard/pages/_form.html.erb +1 -1
- data/app/views/storytime/dashboard/posts/_directory.html.erb +18 -0
- data/app/views/storytime/dashboard/posts/_form.html.erb +1 -1
- data/app/views/storytime/dashboard/posts/_list.html.erb +2 -26
- data/app/views/storytime/dashboard/posts/_new_button.html.erb +1 -1
- data/app/views/storytime/dashboard/posts/_post.html.erb +28 -0
- data/app/views/storytime/dashboard/posts/_sorts.html.erb +21 -0
- data/app/views/storytime/dashboard/posts/index.html.erb +5 -3
- data/app/views/storytime/dashboard/roles/_form.html.erb +1 -1
- data/app/views/storytime/dashboard/roles/edit.json.jbuilder +1 -1
- data/app/views/storytime/dashboard/sites/_form.html.erb +1 -1
- data/app/views/storytime/dashboard/sites/site.json.jbuilder +1 -1
- data/app/views/storytime/dashboard/snippets/_index.html.erb +1 -1
- data/app/views/storytime/dashboard/snippets/edit.json.jbuilder +1 -1
- data/app/views/storytime/dashboard/snippets/index.json.jbuilder +1 -1
- data/app/views/storytime/dashboard/snippets/new.json.jbuilder +1 -1
- data/app/views/storytime/dashboard/subscriptions/_form.html.erb +1 -1
- data/app/views/storytime/dashboard/subscriptions/_index.html.erb +2 -2
- data/app/views/storytime/dashboard/subscriptions/form.json.jbuilder +1 -1
- data/app/views/storytime/dashboard/subscriptions/index.json.jbuilder +1 -1
- data/app/views/storytime/dashboard/versions/_versions_info.html.erb +1 -1
- data/app/views/storytime/posts/show.html.erb +6 -0
- data/app/views/storytime/sites/_google_analytics_code.html.erb +5 -8
- data/config/initializers/assets.rb +2 -1
- data/config/initializers/friendly_id.rb +1 -1
- data/config/initializers/url_for_patch.rb +19 -8
- data/config/locales/devise.zh-CN.yml +59 -0
- data/config/locales/kaminari.zh-CN.yml +17 -0
- data/config/locales/simple_form.zh-CN.yml +26 -0
- data/config/locales/zh-CN.yml +141 -0
- data/config/routes.rb +2 -4
- data/db/migrate/20140501174341_create_storytime_posts.rb +1 -1
- data/db/migrate/20140509191309_create_friendly_id_slugs.rb +1 -1
- data/db/migrate/20140511200849_create_storytime_media.rb +1 -1
- data/db/migrate/20140513161233_create_storytime_sites.rb +1 -1
- data/db/migrate/20140514200234_create_storytime_tags.rb +1 -1
- data/db/migrate/20140514200304_create_storytime_taggings.rb +1 -1
- data/db/migrate/20140516141252_create_storytime_versions.rb +1 -1
- data/db/migrate/20140521190606_create_storytime_roles.rb +1 -1
- data/db/migrate/20140521191048_add_storytime_role_id_to_users.rb +1 -1
- data/db/migrate/20140521191728_create_storytime_permissions.rb +1 -1
- data/db/migrate/20140521191744_create_storytime_actions.rb +1 -1
- data/db/migrate/20140813014447_create_storytime_comments.rb +1 -1
- data/db/migrate/20140813130534_add_storytime_name_to_users.rb +1 -1
- data/db/migrate/20140916183056_create_storytime_autosaves.rb +1 -1
- data/db/migrate/20141020213343_add_secondary_media_id_to_storytime_post.rb +1 -1
- data/db/migrate/20141021073356_create_storytime_snippets.rb +1 -1
- data/db/migrate/20141111164439_create_storytime_subscriptions.rb +1 -1
- data/db/migrate/20150122200805_add_title_and_content_index_to_storytime_post.rb +1 -1
- data/db/migrate/20150128185746_seed_new_actions_and_permissions.rb +1 -1
- data/db/migrate/20150129215308_add_site_id_to_storytime_subscription.rb +1 -1
- data/db/migrate/20150206201847_add_site_id_to_storytime_post.rb +1 -1
- data/db/migrate/20150206201919_add_site_id_to_storytime_snippet.rb +1 -1
- data/db/migrate/20150206201931_add_site_id_to_storytime_tag.rb +1 -1
- data/db/migrate/20150206205256_add_notification_fields_to_storytime_post.rb +1 -1
- data/db/migrate/20150216211257_add_subdomain_to_storytime_sites.rb +1 -1
- data/db/migrate/20150216225045_add_site_to_storytime_media.rb +1 -1
- data/db/migrate/20150219210528_remove_root_page_content_from_storytime_sites.rb +1 -1
- data/db/migrate/20150220184902_add_blog_id_to_posts.rb +1 -1
- data/db/migrate/20150224192138_add_homepage_path_to_storytime_sites.rb +1 -1
- data/db/migrate/20150224193151_add_subscription_email_from_to_storytime_sites.rb +1 -1
- data/db/migrate/20150224193551_add_layout_to_storytime_sites.rb +1 -1
- data/db/migrate/20150224194559_add_disqus_forum_shortname_to_storytime_sites.rb +1 -1
- data/db/migrate/20150224212453_remove_homepage_path_from_storytime_sites.rb +1 -1
- data/db/migrate/20150225143516_add_site_id_to_storytime_autosaves.rb +1 -1
- data/db/migrate/20150225143826_add_site_id_to_storytime_comments.rb +1 -1
- data/db/migrate/20150225145119_add_site_id_to_storytime_versions.rb +1 -1
- data/db/migrate/20150225145316_add_site_id_to_storytime_taggings.rb +1 -1
- data/db/migrate/20150225145608_update_storytime_site_id_columns.rb +1 -1
- data/db/migrate/20150225164232_add_site_id_to_storytime_permissions.rb +1 -1
- data/db/migrate/20150225212917_create_storytime_memberships.rb +1 -1
- data/db/migrate/20150225213535_create_memberships_for_storytime_users.rb +1 -1
- data/db/migrate/20150226201739_add_custom_domain_to_storytime_sites.rb +1 -1
- data/db/migrate/20150302171500_add_site_id_to_storytime_media.rb +1 -1
- data/db/migrate/20150302171722_set_site_layout.rb +1 -1
- data/db/migrate/20150302185138_remove_storytime_role_id_from_users.rb +1 -1
- data/db/migrate/20150302192525_transfer_posts_to_blogs.rb +1 -1
- data/db/migrate/20150302192759_seed_permissions.rb +1 -1
- data/db/migrate/20150331162329_add_discourse_name_to_storytime_sites.rb +1 -1
- data/db/migrate/20150402161427_remove_subdomain_from_storytime_site.rb +1 -1
- data/db/migrate/20150520181115_create_storytime_navigations.rb +1 -1
- data/db/migrate/20150520185227_create_storytime_links.rb +1 -1
- data/db/migrate/20150520190700_add_position_to_storytime_links.rb +1 -1
- data/db/migrate/20150529192058_add_url_to_storytime_links.rb +1 -1
- data/db/migrate/20260408001637_add_canonical_url_to_storytime_posts.rb +5 -0
- data/db/migrate/20260701000000_sanitize_existing_storytime_snippets.rb +22 -0
- data/lib/storytime/cli/install.rb +2 -20
- data/lib/storytime/concerns/action_controller_extension.rb +36 -0
- data/lib/storytime/constraints/page_constraint.rb +8 -2
- data/lib/storytime/engine.rb +3 -5
- data/lib/storytime/migrators/v1.rb +3 -3
- data/lib/storytime/post_notifier.rb +1 -1
- data/lib/storytime/post_url_handler.rb +18 -5
- data/lib/storytime/storytime_helpers.rb +4 -0
- data/lib/storytime/version.rb +1 -1
- data/lib/storytime.rb +1 -1
- data/spec/controllers/dashboard_controller_spec.rb +5 -6
- data/spec/dummy/app/assets/config/manifest.js +3 -0
- data/spec/dummy/config/database.yml +3 -3
- data/spec/dummy/config/initializers/devise.rb +1 -1
- data/spec/dummy/db/migrate/20140530185250_devise_create_users.rb +1 -1
- data/spec/dummy/db/migrate/20150127172846_create_widgets.rb +1 -1
- data/spec/dummy/db/migrate/20150206203824_add_video_url_to_storytime_posts.rb +1 -1
- data/spec/dummy/db/schema.rb +226 -244
- data/spec/factories/action_factories.rb +3 -3
- data/spec/factories/comment_factories.rb +1 -1
- data/spec/factories/media_factories.rb +1 -1
- data/spec/factories/membership_factories.rb +1 -1
- data/spec/factories/navigation_factories.rb +3 -3
- data/spec/factories/permission_factories.rb +1 -1
- data/spec/factories/post_factories.rb +2 -2
- data/spec/factories/role_factories.rb +11 -11
- data/spec/factories/site_factories.rb +3 -3
- data/spec/factories/snippet_factories.rb +1 -1
- data/spec/factories/subscription_factories.rb +1 -1
- data/spec/factories/user_factories.rb +2 -2
- data/spec/factories/widget_factories.rb +2 -2
- data/spec/features/blogs_spec.rb +7 -7
- data/spec/features/comments_spec.rb +11 -11
- data/spec/features/dashboard/media_spec.rb +17 -11
- data/spec/features/dashboard/memberships_spec.rb +13 -19
- data/spec/features/dashboard/navigations_spec.rb +1 -1
- data/spec/features/dashboard/pages_spec.rb +8 -8
- data/spec/features/dashboard/posts_spec.rb +19 -19
- data/spec/features/dashboard/sites_spec.rb +1 -1
- data/spec/features/dashboard/snippets_spec.rb +3 -3
- data/spec/features/dashboard/subscription_spec.rb +2 -2
- data/spec/features/pages_spec.rb +3 -3
- data/spec/features/posts_spec.rb +2 -2
- data/spec/features/subscription_spec.rb +3 -3
- data/spec/importers/wordpress_spec.rb +1 -1
- data/spec/lib/mysql_fulltext_search_adapter_spec.rb +3 -3
- data/spec/lib/mysql_search_adapter_spec.rb +3 -3
- data/spec/lib/postgres_search_adapter_spec.rb +3 -3
- data/spec/lib/sqlite3_search_adapter_spec.rb +3 -3
- data/spec/lib/storytime/constraints/page_constraint_spec.rb +40 -0
- data/spec/lib/storytime_helpers_spec.rb +2 -2
- data/spec/models/navigation_spec.rb +3 -3
- data/spec/models/post_spec.rb +29 -29
- data/spec/models/snippet_spec.rb +31 -0
- data/spec/models/subscription_spec.rb +4 -4
- data/spec/models/tagging_spec.rb +14 -14
- data/spec/models/version_spec.rb +29 -29
- data/spec/policies/comment_policy_spec.rb +11 -11
- data/spec/policies/post_policy_spec.rb +13 -13
- data/spec/requests/pages_spec.rb +37 -0
- data/spec/requests/routings_spec.rb +14 -15
- data/spec/spec_helper.rb +8 -15
- data/spec/support/domains.rb +2 -2
- data/spec/support/feature_macros.rb +5 -5
- data/spec/support/pundit_matcher.rb +3 -3
- data/storytime.gemspec +15 -20
- data/vendor/assets/javascripts/codemirror/addons/edit/closebrackets.js +195 -0
- data/vendor/assets/javascripts/codemirror/addons/edit/closetag.js +169 -0
- data/vendor/assets/javascripts/codemirror/addons/fold/xml-fold.js +182 -0
- data/vendor/assets/javascripts/codemirror.js +8922 -0
- data/vendor/assets/javascripts/medium-editor.min.js +3 -3
- data/vendor/assets/stylesheets/codemirror/themes/solarized.css +169 -0
- data/vendor/assets/stylesheets/codemirror.css +347 -0
- metadata +94 -134
- data/config/initializers/storytime_admin.rb +0 -5
- data/config/spring.rb +0 -1
- data/spec/dummy/app/controllers/storytime_admin/widgets_controller.rb +0 -5
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
|
@@ -204,7 +204,7 @@ if (typeof module === 'object') {
|
|
|
204
204
|
tagNames: function (options) {
|
|
205
205
|
return [options.firstHeader];
|
|
206
206
|
},
|
|
207
|
-
contentDefault: '<b>
|
|
207
|
+
contentDefault: '<b>H2</b>'
|
|
208
208
|
},
|
|
209
209
|
'header2': {
|
|
210
210
|
name: 'header2',
|
|
@@ -217,7 +217,7 @@ if (typeof module === 'object') {
|
|
|
217
217
|
tagNames: function (options) {
|
|
218
218
|
return [options.secondHeader];
|
|
219
219
|
},
|
|
220
|
-
contentDefault: '<b>
|
|
220
|
+
contentDefault: '<b>H3</b>'
|
|
221
221
|
}
|
|
222
222
|
};
|
|
223
223
|
|
|
@@ -2447,4 +2447,4 @@ if (typeof module === 'object') {
|
|
|
2447
2447
|
|
|
2448
2448
|
};
|
|
2449
2449
|
|
|
2450
|
-
}(window, document));
|
|
2450
|
+
}(window, document));
|
|
@@ -0,0 +1,169 @@
|
|
|
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 { 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-strong { color: #eee; }
|
|
91
|
+
.cm-s-solarized .cm-error,
|
|
92
|
+
.cm-s-solarized .cm-invalidchar {
|
|
93
|
+
color: #586e75;
|
|
94
|
+
border-bottom: 1px dotted #dc322f;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.cm-s-solarized.cm-s-dark div.CodeMirror-selected { background: #073642; }
|
|
98
|
+
.cm-s-solarized.cm-s-dark.CodeMirror ::selection { background: rgba(7, 54, 66, 0.99); }
|
|
99
|
+
.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); }
|
|
100
|
+
|
|
101
|
+
.cm-s-solarized.cm-s-light div.CodeMirror-selected { background: #eee8d5; }
|
|
102
|
+
.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; }
|
|
103
|
+
.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; }
|
|
104
|
+
|
|
105
|
+
/* Editor styling */
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
/* Little shadow on the view-port of the buffer view */
|
|
110
|
+
.cm-s-solarized.CodeMirror {
|
|
111
|
+
-moz-box-shadow: inset 7px 0 12px -6px #000;
|
|
112
|
+
-webkit-box-shadow: inset 7px 0 12px -6px #000;
|
|
113
|
+
box-shadow: inset 7px 0 12px -6px #000;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Remove gutter border */
|
|
117
|
+
.cm-s-solarized .CodeMirror-gutters {
|
|
118
|
+
border-right: 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* Gutter colors and line number styling based of color scheme (dark / light) */
|
|
122
|
+
|
|
123
|
+
/* Dark */
|
|
124
|
+
.cm-s-solarized.cm-s-dark .CodeMirror-gutters {
|
|
125
|
+
background-color: #073642;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.cm-s-solarized.cm-s-dark .CodeMirror-linenumber {
|
|
129
|
+
color: #586e75;
|
|
130
|
+
text-shadow: #021014 0 -1px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Light */
|
|
134
|
+
.cm-s-solarized.cm-s-light .CodeMirror-gutters {
|
|
135
|
+
background-color: #eee8d5;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.cm-s-solarized.cm-s-light .CodeMirror-linenumber {
|
|
139
|
+
color: #839496;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* Common */
|
|
143
|
+
.cm-s-solarized .CodeMirror-linenumber {
|
|
144
|
+
padding: 0 5px;
|
|
145
|
+
}
|
|
146
|
+
.cm-s-solarized .CodeMirror-guttermarker-subtle { color: #586e75; }
|
|
147
|
+
.cm-s-solarized.cm-s-dark .CodeMirror-guttermarker { color: #ddd; }
|
|
148
|
+
.cm-s-solarized.cm-s-light .CodeMirror-guttermarker { color: #cb4b16; }
|
|
149
|
+
|
|
150
|
+
.cm-s-solarized .CodeMirror-gutter .CodeMirror-gutter-text {
|
|
151
|
+
color: #586e75;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* Cursor */
|
|
155
|
+
.cm-s-solarized .CodeMirror-cursor { border-left: 1px solid #819090; }
|
|
156
|
+
|
|
157
|
+
/* Fat cursor */
|
|
158
|
+
.cm-s-solarized.cm-s-light.cm-fat-cursor .CodeMirror-cursor { background: #fdf6e3; }
|
|
159
|
+
.cm-s-solarized.cm-s-light .cm-animate-fat-cursor { background-color: #fdf6e3; }
|
|
160
|
+
.cm-s-solarized.cm-s-dark.cm-fat-cursor .CodeMirror-cursor { background: #586e75; }
|
|
161
|
+
.cm-s-solarized.cm-s-dark .cm-animate-fat-cursor { background-color: #586e75; }
|
|
162
|
+
|
|
163
|
+
/* Active line */
|
|
164
|
+
.cm-s-solarized.cm-s-dark .CodeMirror-activeline-background {
|
|
165
|
+
background: rgba(255, 255, 255, 0.06);
|
|
166
|
+
}
|
|
167
|
+
.cm-s-solarized.cm-s-light .CodeMirror-activeline-background {
|
|
168
|
+
background: rgba(0, 0, 0, 0.06);
|
|
169
|
+
}
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
/* BASICS */
|
|
2
|
+
|
|
3
|
+
.CodeMirror {
|
|
4
|
+
/* Set height, width, borders, and global font properties here */
|
|
5
|
+
font-family: monospace;
|
|
6
|
+
height: 300px;
|
|
7
|
+
color: black;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* PADDING */
|
|
11
|
+
|
|
12
|
+
.CodeMirror-lines {
|
|
13
|
+
padding: 4px 0; /* Vertical padding around content */
|
|
14
|
+
}
|
|
15
|
+
.CodeMirror pre {
|
|
16
|
+
padding: 0 4px; /* Horizontal padding of content */
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
|
20
|
+
background-color: white; /* The little square between H and V scrollbars */
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* GUTTER */
|
|
24
|
+
|
|
25
|
+
.CodeMirror-gutters {
|
|
26
|
+
border-right: 1px solid #ddd;
|
|
27
|
+
background-color: #f7f7f7;
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
}
|
|
30
|
+
.CodeMirror-linenumbers {}
|
|
31
|
+
.CodeMirror-linenumber {
|
|
32
|
+
padding: 0 3px 0 5px;
|
|
33
|
+
min-width: 20px;
|
|
34
|
+
text-align: right;
|
|
35
|
+
color: #999;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.CodeMirror-guttermarker { color: black; }
|
|
40
|
+
.CodeMirror-guttermarker-subtle { color: #999; }
|
|
41
|
+
|
|
42
|
+
/* CURSOR */
|
|
43
|
+
|
|
44
|
+
.CodeMirror-cursor {
|
|
45
|
+
border-left: 1px solid black;
|
|
46
|
+
border-right: none;
|
|
47
|
+
width: 0;
|
|
48
|
+
}
|
|
49
|
+
/* Shown when moving in bi-directional text */
|
|
50
|
+
.CodeMirror div.CodeMirror-secondarycursor {
|
|
51
|
+
border-left: 1px solid silver;
|
|
52
|
+
}
|
|
53
|
+
.cm-fat-cursor .CodeMirror-cursor {
|
|
54
|
+
width: auto;
|
|
55
|
+
border: 0 !important;
|
|
56
|
+
background: #7e7;
|
|
57
|
+
}
|
|
58
|
+
.cm-fat-cursor div.CodeMirror-cursors {
|
|
59
|
+
z-index: 1;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.cm-animate-fat-cursor {
|
|
63
|
+
width: auto;
|
|
64
|
+
border: 0;
|
|
65
|
+
-webkit-animation: blink 1.06s steps(1) infinite;
|
|
66
|
+
-moz-animation: blink 1.06s steps(1) infinite;
|
|
67
|
+
animation: blink 1.06s steps(1) infinite;
|
|
68
|
+
background-color: #7e7;
|
|
69
|
+
}
|
|
70
|
+
@-moz-keyframes blink {
|
|
71
|
+
0% {}
|
|
72
|
+
50% { background-color: transparent; }
|
|
73
|
+
100% {}
|
|
74
|
+
}
|
|
75
|
+
@-webkit-keyframes blink {
|
|
76
|
+
0% {}
|
|
77
|
+
50% { background-color: transparent; }
|
|
78
|
+
100% {}
|
|
79
|
+
}
|
|
80
|
+
@keyframes blink {
|
|
81
|
+
0% {}
|
|
82
|
+
50% { background-color: transparent; }
|
|
83
|
+
100% {}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Can style cursor different in overwrite (non-insert) mode */
|
|
87
|
+
.CodeMirror-overwrite .CodeMirror-cursor {}
|
|
88
|
+
|
|
89
|
+
.cm-tab { display: inline-block; text-decoration: inherit; }
|
|
90
|
+
|
|
91
|
+
.CodeMirror-rulers {
|
|
92
|
+
position: absolute;
|
|
93
|
+
left: 0; right: 0; top: -50px; bottom: -20px;
|
|
94
|
+
overflow: hidden;
|
|
95
|
+
}
|
|
96
|
+
.CodeMirror-ruler {
|
|
97
|
+
border-left: 1px solid #ccc;
|
|
98
|
+
top: 0; bottom: 0;
|
|
99
|
+
position: absolute;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* DEFAULT THEME */
|
|
103
|
+
|
|
104
|
+
.cm-s-default .cm-header {color: blue;}
|
|
105
|
+
.cm-s-default .cm-quote {color: #090;}
|
|
106
|
+
.cm-negative {color: #d44;}
|
|
107
|
+
.cm-positive {color: #292;}
|
|
108
|
+
.cm-header, .cm-strong {font-weight: bold;}
|
|
109
|
+
.cm-em {font-style: italic;}
|
|
110
|
+
.cm-link {text-decoration: underline;}
|
|
111
|
+
.cm-strikethrough {text-decoration: line-through;}
|
|
112
|
+
|
|
113
|
+
.cm-s-default .cm-keyword {color: #708;}
|
|
114
|
+
.cm-s-default .cm-atom {color: #219;}
|
|
115
|
+
.cm-s-default .cm-number {color: #164;}
|
|
116
|
+
.cm-s-default .cm-def {color: #00f;}
|
|
117
|
+
.cm-s-default .cm-variable,
|
|
118
|
+
.cm-s-default .cm-punctuation,
|
|
119
|
+
.cm-s-default .cm-property,
|
|
120
|
+
.cm-s-default .cm-operator {}
|
|
121
|
+
.cm-s-default .cm-variable-2 {color: #05a;}
|
|
122
|
+
.cm-s-default .cm-variable-3 {color: #085;}
|
|
123
|
+
.cm-s-default .cm-comment {color: #a50;}
|
|
124
|
+
.cm-s-default .cm-string {color: #a11;}
|
|
125
|
+
.cm-s-default .cm-string-2 {color: #f50;}
|
|
126
|
+
.cm-s-default .cm-meta {color: #555;}
|
|
127
|
+
.cm-s-default .cm-qualifier {color: #555;}
|
|
128
|
+
.cm-s-default .cm-builtin {color: #30a;}
|
|
129
|
+
.cm-s-default .cm-bracket {color: #997;}
|
|
130
|
+
.cm-s-default .cm-tag {color: #170;}
|
|
131
|
+
.cm-s-default .cm-attribute {color: #00c;}
|
|
132
|
+
.cm-s-default .cm-hr {color: #999;}
|
|
133
|
+
.cm-s-default .cm-link {color: #00c;}
|
|
134
|
+
|
|
135
|
+
.cm-s-default .cm-error {color: #f00;}
|
|
136
|
+
.cm-invalidchar {color: #f00;}
|
|
137
|
+
|
|
138
|
+
.CodeMirror-composing { border-bottom: 2px solid; }
|
|
139
|
+
|
|
140
|
+
/* Default styles for common addons */
|
|
141
|
+
|
|
142
|
+
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
|
|
143
|
+
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
|
144
|
+
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
|
|
145
|
+
.CodeMirror-activeline-background {background: #e8f2ff;}
|
|
146
|
+
|
|
147
|
+
/* STOP */
|
|
148
|
+
|
|
149
|
+
/* The rest of this file contains styles related to the mechanics of
|
|
150
|
+
the editor. You probably shouldn't touch them. */
|
|
151
|
+
|
|
152
|
+
.CodeMirror {
|
|
153
|
+
position: relative;
|
|
154
|
+
overflow: hidden;
|
|
155
|
+
background: white;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.CodeMirror-scroll {
|
|
159
|
+
overflow: scroll !important; /* Things will break if this is overridden */
|
|
160
|
+
/* 30px is the magic margin used to hide the element's real scrollbars */
|
|
161
|
+
/* See overflow: hidden in .CodeMirror */
|
|
162
|
+
margin-bottom: -30px; margin-right: -30px;
|
|
163
|
+
padding-bottom: 30px;
|
|
164
|
+
height: 100%;
|
|
165
|
+
outline: none; /* Prevent dragging from highlighting the element */
|
|
166
|
+
position: relative;
|
|
167
|
+
}
|
|
168
|
+
.CodeMirror-sizer {
|
|
169
|
+
position: relative;
|
|
170
|
+
border-right: 30px solid transparent;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
|
174
|
+
before actual scrolling happens, thus preventing shaking and
|
|
175
|
+
flickering artifacts. */
|
|
176
|
+
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
|
177
|
+
position: absolute;
|
|
178
|
+
z-index: 6;
|
|
179
|
+
display: none;
|
|
180
|
+
}
|
|
181
|
+
.CodeMirror-vscrollbar {
|
|
182
|
+
right: 0; top: 0;
|
|
183
|
+
overflow-x: hidden;
|
|
184
|
+
overflow-y: scroll;
|
|
185
|
+
}
|
|
186
|
+
.CodeMirror-hscrollbar {
|
|
187
|
+
bottom: 0; left: 0;
|
|
188
|
+
overflow-y: hidden;
|
|
189
|
+
overflow-x: scroll;
|
|
190
|
+
}
|
|
191
|
+
.CodeMirror-scrollbar-filler {
|
|
192
|
+
right: 0; bottom: 0;
|
|
193
|
+
}
|
|
194
|
+
.CodeMirror-gutter-filler {
|
|
195
|
+
left: 0; bottom: 0;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.CodeMirror-gutters {
|
|
199
|
+
position: absolute; left: 0; top: 0;
|
|
200
|
+
min-height: 100%;
|
|
201
|
+
z-index: 3;
|
|
202
|
+
}
|
|
203
|
+
.CodeMirror-gutter {
|
|
204
|
+
white-space: normal;
|
|
205
|
+
height: 100%;
|
|
206
|
+
display: inline-block;
|
|
207
|
+
vertical-align: top;
|
|
208
|
+
margin-bottom: -30px;
|
|
209
|
+
/* Hack to make IE7 behave */
|
|
210
|
+
*zoom:1;
|
|
211
|
+
*display:inline;
|
|
212
|
+
}
|
|
213
|
+
.CodeMirror-gutter-wrapper {
|
|
214
|
+
position: absolute;
|
|
215
|
+
z-index: 4;
|
|
216
|
+
background: none !important;
|
|
217
|
+
border: none !important;
|
|
218
|
+
}
|
|
219
|
+
.CodeMirror-gutter-background {
|
|
220
|
+
position: absolute;
|
|
221
|
+
top: 0; bottom: 0;
|
|
222
|
+
z-index: 4;
|
|
223
|
+
}
|
|
224
|
+
.CodeMirror-gutter-elt {
|
|
225
|
+
position: absolute;
|
|
226
|
+
cursor: default;
|
|
227
|
+
z-index: 4;
|
|
228
|
+
}
|
|
229
|
+
.CodeMirror-gutter-wrapper {
|
|
230
|
+
-webkit-user-select: none;
|
|
231
|
+
-moz-user-select: none;
|
|
232
|
+
user-select: none;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.CodeMirror-lines {
|
|
236
|
+
cursor: text;
|
|
237
|
+
min-height: 1px; /* prevents collapsing before first draw */
|
|
238
|
+
}
|
|
239
|
+
.CodeMirror pre {
|
|
240
|
+
/* Reset some styles that the rest of the page might have set */
|
|
241
|
+
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
|
|
242
|
+
border-width: 0;
|
|
243
|
+
background: transparent;
|
|
244
|
+
font-family: inherit;
|
|
245
|
+
font-size: inherit;
|
|
246
|
+
margin: 0;
|
|
247
|
+
white-space: pre;
|
|
248
|
+
word-wrap: normal;
|
|
249
|
+
line-height: inherit;
|
|
250
|
+
color: inherit;
|
|
251
|
+
z-index: 2;
|
|
252
|
+
position: relative;
|
|
253
|
+
overflow: visible;
|
|
254
|
+
-webkit-tap-highlight-color: transparent;
|
|
255
|
+
-webkit-font-variant-ligatures: none;
|
|
256
|
+
font-variant-ligatures: none;
|
|
257
|
+
}
|
|
258
|
+
.CodeMirror-wrap pre {
|
|
259
|
+
word-wrap: break-word;
|
|
260
|
+
white-space: pre-wrap;
|
|
261
|
+
word-break: normal;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.CodeMirror-linebackground {
|
|
265
|
+
position: absolute;
|
|
266
|
+
left: 0; right: 0; top: 0; bottom: 0;
|
|
267
|
+
z-index: 0;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.CodeMirror-linewidget {
|
|
271
|
+
position: relative;
|
|
272
|
+
z-index: 2;
|
|
273
|
+
overflow: auto;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.CodeMirror-widget {}
|
|
277
|
+
|
|
278
|
+
.CodeMirror-code {
|
|
279
|
+
outline: none;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/* Force content-box sizing for the elements where we expect it */
|
|
283
|
+
.CodeMirror-scroll,
|
|
284
|
+
.CodeMirror-sizer,
|
|
285
|
+
.CodeMirror-gutter,
|
|
286
|
+
.CodeMirror-gutters,
|
|
287
|
+
.CodeMirror-linenumber {
|
|
288
|
+
-moz-box-sizing: content-box;
|
|
289
|
+
box-sizing: content-box;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.CodeMirror-measure {
|
|
293
|
+
position: absolute;
|
|
294
|
+
width: 100%;
|
|
295
|
+
height: 0;
|
|
296
|
+
overflow: hidden;
|
|
297
|
+
visibility: hidden;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.CodeMirror-cursor {
|
|
301
|
+
position: absolute;
|
|
302
|
+
pointer-events: none;
|
|
303
|
+
}
|
|
304
|
+
.CodeMirror-measure pre { position: static; }
|
|
305
|
+
|
|
306
|
+
div.CodeMirror-cursors {
|
|
307
|
+
visibility: hidden;
|
|
308
|
+
position: relative;
|
|
309
|
+
z-index: 3;
|
|
310
|
+
}
|
|
311
|
+
div.CodeMirror-dragcursors {
|
|
312
|
+
visibility: visible;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.CodeMirror-focused div.CodeMirror-cursors {
|
|
316
|
+
visibility: visible;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.CodeMirror-selected { background: #d9d9d9; }
|
|
320
|
+
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
|
321
|
+
.CodeMirror-crosshair { cursor: crosshair; }
|
|
322
|
+
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
|
|
323
|
+
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
|
|
324
|
+
|
|
325
|
+
.cm-searching {
|
|
326
|
+
background: #ffa;
|
|
327
|
+
background: rgba(255, 255, 0, .4);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
|
|
331
|
+
.CodeMirror span { *vertical-align: text-bottom; }
|
|
332
|
+
|
|
333
|
+
/* Used to force a border model for a node */
|
|
334
|
+
.cm-force-border { padding-right: .1px; }
|
|
335
|
+
|
|
336
|
+
@media print {
|
|
337
|
+
/* Hide the cursor when printing */
|
|
338
|
+
.CodeMirror div.CodeMirror-cursors {
|
|
339
|
+
visibility: hidden;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/* See issue #2901 */
|
|
344
|
+
.cm-tab-wrap-hack:after { content: ''; }
|
|
345
|
+
|
|
346
|
+
/* Help users use markselection to safely style text background */
|
|
347
|
+
span.CodeMirror-selectedtext { background: none; }
|