locomotivecms 3.0.0.pre.beta.1 → 3.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -3
- data/app/api/locomotive/api.rb +1 -0
- data/app/api/locomotive/api/entities/page_entity.rb +1 -1
- data/app/api/locomotive/api/entities/site_entity.rb +9 -1
- data/app/api/locomotive/api/exception_rescuers.rb +3 -5
- data/app/api/locomotive/api/forms/page_form.rb +1 -1
- data/app/api/locomotive/api/forms/site_form.rb +1 -2
- data/app/api/locomotive/api/helpers/authentication_helper.rb +6 -1
- data/app/api/locomotive/api/helpers/locales_helper.rb +15 -0
- data/app/api/locomotive/api/helpers/params_helper.rb +13 -0
- data/app/api/locomotive/api/middlewares/locale_middleware.rb +6 -1
- data/app/api/locomotive/api/resources/content_entry_resource.rb +2 -0
- data/app/api/locomotive/api/resources/content_type_resource.rb +2 -2
- data/app/api/locomotive/api/resources/current_site_resource.rb +2 -1
- data/app/api/locomotive/api/resources/membership_resource.rb +0 -4
- data/app/api/locomotive/api/resources/page_resource.rb +6 -1
- data/app/api/locomotive/api/resources/site_resource.rb +4 -2
- data/app/assets/javascripts/locomotive.js +1 -0
- data/app/assets/javascripts/locomotive/utils/nprogress.js.coffee +3 -1
- data/app/assets/javascripts/locomotive/views/editable_elements/index_view.js.coffee +10 -3
- data/app/assets/javascripts/locomotive/views/inputs/markdown_view.js.coffee +82 -0
- data/app/assets/javascripts/locomotive/views/inputs/rte/file_view.js.coffee +1 -1
- data/app/assets/javascripts/locomotive/views/inputs/rte/link_view.js.coffee +1 -1
- data/app/assets/javascripts/locomotive/views/inputs/rte_view.js.coffee.erb +1 -1
- data/app/assets/javascripts/locomotive/views/inputs/text_view.js.coffee +4 -1
- data/app/assets/javascripts/locomotive/views/pages/list_view.js.coffee +3 -0
- data/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee +22 -1
- data/app/assets/javascripts/locomotive/views/shared/header_view.js.coffee +2 -2
- data/app/assets/stylesheets/locomotive/application.scss +2 -0
- data/app/assets/stylesheets/locomotive/base/_form.scss +2 -0
- data/app/assets/stylesheets/locomotive/base/form/_api_key.scss +0 -1
- data/app/assets/stylesheets/locomotive/base/form/_array_input.scss +2 -0
- data/app/assets/stylesheets/locomotive/base/form/_base.scss +13 -2
- data/app/assets/stylesheets/locomotive/base/form/_color_input.scss +12 -0
- data/app/assets/stylesheets/locomotive/base/form/_markdown.scss +292 -0
- data/app/assets/stylesheets/locomotive/base/form/_popover.scss +22 -0
- data/app/assets/stylesheets/locomotive/base/form/_rte.scss +2 -1
- data/app/assets/stylesheets/locomotive/components/_activity_feed.scss +1 -0
- data/app/assets/stylesheets/locomotive/components/_dashboard.scss +29 -0
- data/app/assets/stylesheets/locomotive/components/_live_editing.scss +13 -1
- data/app/assets/stylesheets/locomotive/components/_main.scss +1 -1
- data/app/assets/stylesheets/locomotive/components/_transitions.scss +24 -3
- data/app/assets/stylesheets/locomotive/components/sidebar/_base.scss +1 -0
- data/app/assets/stylesheets/locomotive/globals/_bootstrap.scss +2 -2
- data/app/assets/stylesheets/locomotive/globals/_variables.scss +4 -3
- data/app/assets/stylesheets/locomotive/layouts/_live_editing.scss +4 -0
- data/app/controllers/locomotive/concerns/locale_helpers_controller.rb +1 -0
- data/app/controllers/locomotive/content_entries_controller.rb +10 -2
- data/app/controllers/locomotive/pages_controller.rb +2 -1
- data/app/controllers/locomotive/passwords_controller.rb +17 -1
- data/app/helpers/locomotive/base_helper.rb +19 -0
- data/app/helpers/locomotive/content_types_helper.rb +2 -1
- data/app/helpers/locomotive/custom_fields_helper.rb +14 -1
- data/app/helpers/locomotive/dashboard_helper.rb +12 -0
- data/app/helpers/locomotive/editable_elements_helper.rb +9 -4
- data/app/helpers/locomotive/pages_helper.rb +1 -14
- data/app/helpers/locomotive/shared/pages_helper.rb +17 -0
- data/app/helpers/locomotive/translations_helper.rb +0 -14
- data/app/inputs/locomotive/color_input.rb +18 -0
- data/app/inputs/locomotive/markdown_input.rb +19 -0
- data/app/models/locomotive/account.rb +2 -1
- data/app/models/locomotive/concerns/content_entry/file_size.rb +27 -0
- data/app/models/locomotive/concerns/content_type/group_by.rb +3 -1
- data/app/models/locomotive/concerns/page/layout.rb +63 -19
- data/app/models/locomotive/concerns/shared/site_scope.rb +37 -0
- data/app/models/locomotive/concerns/site/cache.rb +32 -0
- data/app/models/locomotive/concerns/theme_asset/plain_text.rb +85 -0
- data/app/models/locomotive/content_entry.rb +7 -7
- data/app/models/locomotive/content_type.rb +12 -6
- data/app/models/locomotive/page.rb +12 -14
- data/app/models/locomotive/site.rb +9 -3
- data/app/models/locomotive/snippet.rb +6 -4
- data/app/models/locomotive/theme_asset.rb +8 -73
- data/app/models/locomotive/translation.rb +6 -5
- data/app/policies/locomotive/site_policy.rb +2 -2
- data/app/services/locomotive/content_entry_service.rb +7 -6
- data/app/services/locomotive/site_service.rb +1 -0
- data/app/views/locomotive/content_entries/_entry.html.slim +1 -0
- data/app/views/locomotive/content_entries/edit.html.slim +1 -1
- data/app/views/locomotive/content_entries/new.html.slim +1 -1
- data/app/views/locomotive/current_site/_membership.html.slim +1 -0
- data/app/views/locomotive/current_site/edit.html.slim +1 -1
- data/app/views/locomotive/current_site/form/_access_points.html.slim +1 -1
- data/app/views/locomotive/current_site/form/_advanced.html.slim +2 -0
- data/app/views/locomotive/dashboard/_activity.html.slim +26 -0
- data/app/views/locomotive/dashboard/_url.html.slim +9 -0
- data/app/views/locomotive/dashboard/show.html.slim +3 -21
- data/app/views/locomotive/devise_mailer/reset_password_instructions.html.slim +1 -1
- data/app/views/locomotive/editable_elements/_edit.html.slim +8 -1
- data/app/views/locomotive/editable_elements/_form.html.slim +1 -1
- data/app/views/locomotive/editable_elements/index_without_preview.html.slim +24 -17
- data/app/views/locomotive/layouts/application.html.slim +6 -4
- data/app/views/locomotive/layouts/live_editing.html.slim +9 -0
- data/app/views/locomotive/layouts/not_logged_in.html.slim +1 -1
- data/app/views/locomotive/layouts/without_site.html.slim +2 -0
- data/app/views/locomotive/memberships/edit.html.slim +1 -1
- data/app/views/locomotive/memberships/new.html.slim +1 -1
- data/app/views/locomotive/my_account/edit.html.slim +7 -5
- data/app/views/locomotive/pages/_header.html.slim +7 -0
- data/app/views/locomotive/pages/edit.html.slim +2 -4
- data/app/views/locomotive/pages/form/_main.html.slim +4 -1
- data/app/views/locomotive/pages/form/_tabs.html.slim +4 -3
- data/app/views/locomotive/public_submission_accounts/_account.html.slim +1 -1
- data/app/views/locomotive/public_submission_accounts/edit.html.slim +1 -1
- data/app/views/locomotive/shared/_header.html.slim +25 -22
- data/app/views/locomotive/shared/_locale_picker_link.html.slim +3 -0
- data/app/views/locomotive/shared/_main_app_header.html.slim +1 -1
- data/app/views/locomotive/shared/_sidebar.html.slim +15 -11
- data/app/views/locomotive/shared/rte/_markdown_toolbar.html.slim +42 -0
- data/config/locales/admin_ui.en.yml +9 -4
- data/config/locales/default.en.yml +4 -0
- data/config/locales/devise.en.yml +1 -0
- data/config/locales/simple_form.en.yml +6 -2
- data/lib/locomotive/action_controller/responder.rb +5 -0
- data/lib/locomotive/engine.rb +5 -0
- data/lib/locomotive/middlewares/site.rb +39 -21
- data/lib/locomotive/simple_form.rb +3 -31
- data/lib/locomotive/steam/middlewares/cache.rb +62 -0
- data/lib/locomotive/steam/middlewares/page_editing.rb +9 -3
- data/lib/locomotive/steam/services/api_entry_submission_service.rb +6 -3
- data/lib/locomotive/steam/services/liquid_parser_with_cache_service.rb +74 -0
- data/lib/locomotive/steam_adaptor.rb +7 -1
- data/lib/locomotive/version.rb +1 -1
- data/lib/tasks/development.rake +4 -0
- data/lib/tasks/locomotive.rake +14 -0
- data/spec/lib/locomotive/steam/services/api_entry_submission_service_spec.rb +10 -1
- data/spec/lib/locomotive/steam/services/liquid_parser_with_cache_service_spec.rb +53 -0
- data/spec/models/locomotive/concerns/content_entry/file_size_spec.rb +40 -0
- data/spec/models/locomotive/concerns/page/layout_spec.rb +122 -17
- data/spec/models/locomotive/concerns/site/cache_spec.rb +60 -0
- data/spec/models/locomotive/content_entry_spec.rb +7 -0
- data/spec/models/locomotive/content_type_spec.rb +18 -11
- data/spec/models/locomotive/page_spec.rb +32 -8
- data/spec/models/locomotive/snippet_spec.rb +13 -4
- data/spec/models/locomotive/theme_asset_spec.rb +10 -3
- data/spec/models/locomotive/translation_spec.rb +28 -0
- data/spec/requests/locomotive/steam/cache_spec.rb +83 -0
- data/spec/requests/site_spec.rb +24 -0
- data/spec/support/capybara.rb +5 -13
- data/spec/support/factories.rb +9 -0
- data/spec/support/features/session_helpers.rb +19 -3
- data/spec/support/features/site_helpers.rb +27 -0
- data/spec/support/shared_examples/site_scope_examples.rb +27 -0
- data/vendor/assets/images/locomotive/bootstrap-colorpicker/alpha-horizontal.png +0 -0
- data/vendor/assets/images/locomotive/bootstrap-colorpicker/alpha.png +0 -0
- data/vendor/assets/images/locomotive/bootstrap-colorpicker/hue-horizontal.png +0 -0
- data/vendor/assets/images/locomotive/bootstrap-colorpicker/hue.png +0 -0
- data/vendor/assets/images/locomotive/bootstrap-colorpicker/saturation.png +0 -0
- data/vendor/assets/javascripts/locomotive/bootstrap-colorpicker.js +1 -0
- data/vendor/assets/javascripts/locomotive/datepicker_i18n.js.erb +6 -6
- data/vendor/assets/javascripts/locomotive/kramed.min.js +11 -0
- data/vendor/assets/stylesheets/locomotive/bootstrap-colorpicker.scss +9 -0
- metadata +59 -44
- data/app/controllers/locomotive/api/accounts_controller.rb +0 -60
- data/app/controllers/locomotive/api/base_controller.rb +0 -35
- data/app/controllers/locomotive/api/content_assets_controller.rb +0 -51
- data/app/controllers/locomotive/api/content_entries_controller.rb +0 -71
- data/app/controllers/locomotive/api/content_types_controller.rb +0 -52
- data/app/controllers/locomotive/api/current_site_controller.rb +0 -34
- data/app/controllers/locomotive/api/memberships_controller.rb +0 -52
- data/app/controllers/locomotive/api/my_account_controller.rb +0 -46
- data/app/controllers/locomotive/api/pages_controller.rb +0 -53
- data/app/controllers/locomotive/api/sites_controller.rb +0 -58
- data/app/controllers/locomotive/api/snippets_controller.rb +0 -52
- data/app/controllers/locomotive/api/theme_assets_controller.rb +0 -51
- data/app/controllers/locomotive/api/tokens_controller.rb +0 -36
- data/app/controllers/locomotive/api/translations_controller.rb +0 -51
- data/app/controllers/locomotive/api/version_controller.rb +0 -11
- data/spec/models/locomotive/editable_control_spec.rb +0 -79
- data/spec/models/locomotive/editable_file_spec.rb +0 -94
- data/spec/models/locomotive/editable_text_spec.rb +0 -219
- data/vendor/assets/images/select2-spinner.gif +0 -0
- data/vendor/assets/images/select2.png +0 -0
- data/vendor/assets/images/select2x2.png +0 -0
@@ -25,7 +25,7 @@ class Locomotive.Views.Inputs.Rte.FileView extends Backbone.View
|
|
25
25
|
command = @editor.toolbar.commandMapping['insertFile:null']
|
26
26
|
command.dialog = @
|
27
27
|
|
28
|
-
console.log "[insertFileView] attach_editor"
|
28
|
+
# console.log "[insertFileView] attach_editor"
|
29
29
|
|
30
30
|
create_popover: ->
|
31
31
|
@$popover.show()
|
@@ -21,7 +21,7 @@ class Locomotive.Views.Inputs.Rte.LinkView extends Backbone.View
|
|
21
21
|
@$content.show()
|
22
22
|
@$link.popover
|
23
23
|
container: '.main'
|
24
|
-
placement: '
|
24
|
+
placement: 'top'
|
25
25
|
content: @$content
|
26
26
|
html: true
|
27
27
|
template: '<div class="popover" role="tooltip"><div class="arrow"></div><form class="simple_form"><div class="popover-content"></div></form></div>'
|
@@ -33,7 +33,7 @@ class Locomotive.Views.Inputs.RteView extends Backbone.View
|
|
33
33
|
open_styles_dialog: (event) ->
|
34
34
|
$button = $(event.target).closest('a')
|
35
35
|
@$style_popover = @$style_popover || ($button.popover
|
36
|
-
placement: '
|
36
|
+
placement: 'top'
|
37
37
|
content: $button.next('.style-dialog-content').html()
|
38
38
|
html: true
|
39
39
|
title: undefined).popover('show')
|
@@ -13,4 +13,7 @@ class Locomotive.Views.Inputs.TextView extends Backbone.View
|
|
13
13
|
content_change: (event) ->
|
14
14
|
PubSub.publish 'inputs.text_changed',
|
15
15
|
view: @
|
16
|
-
content: $(event.target)
|
16
|
+
content: @text_value($(event.target))
|
17
|
+
|
18
|
+
text_value: (textarea) ->
|
19
|
+
textarea.val()
|
@@ -72,6 +72,9 @@ class Locomotive.Views.Pages.ListView extends Backbone.View
|
|
72
72
|
on_successful_sort: (data, status, xhr) ->
|
73
73
|
Locomotive.notify decodeURIComponent($.parseJSON(xhr.getResponseHeader('X-Message'))), 'success'
|
74
74
|
|
75
|
+
# maybe some components depends on it (ex: refreshing a menu if live editing is on)
|
76
|
+
PubSub.publish 'pages.sorted'
|
77
|
+
|
75
78
|
on_failed_sort: (data, status, xhr) ->
|
76
79
|
Locomotive.notify decodeURIComponent($.parseJSON(xhr.getResponseHeader('X-Message'))), 'error'
|
77
80
|
|
@@ -7,7 +7,8 @@ class Locomotive.Views.Shared.FormView extends Backbone.View
|
|
7
7
|
namespace: null
|
8
8
|
|
9
9
|
events:
|
10
|
-
'submit form':
|
10
|
+
'submit form': 'save'
|
11
|
+
'ajax:aborted:required': 'show_empty_form_message'
|
11
12
|
|
12
13
|
render: ->
|
13
14
|
@inputs = []
|
@@ -23,9 +24,11 @@ class Locomotive.Views.Shared.FormView extends Backbone.View
|
|
23
24
|
@enable_datetime_inputs()
|
24
25
|
@enable_text_inputs()
|
25
26
|
@enable_rte_inputs()
|
27
|
+
@enable_markdown_inputs()
|
26
28
|
@enable_tags_inputs()
|
27
29
|
@enable_document_picker_inputs()
|
28
30
|
@enable_select_inputs()
|
31
|
+
@enable_color_inputs()
|
29
32
|
|
30
33
|
return @
|
31
34
|
|
@@ -50,6 +53,13 @@ class Locomotive.Views.Shared.FormView extends Backbone.View
|
|
50
53
|
@change_state()
|
51
54
|
@record_active_tab()
|
52
55
|
|
56
|
+
show_empty_form_message: (event) ->
|
57
|
+
message = @$('form').data('blank-required-fields-message')
|
58
|
+
|
59
|
+
Locomotive.notify message, 'error' if message?
|
60
|
+
|
61
|
+
@reset_state()
|
62
|
+
|
53
63
|
enable_hover: ->
|
54
64
|
$('.form-group.input').hover ->
|
55
65
|
$(this).addClass('hovered')
|
@@ -110,6 +120,16 @@ class Locomotive.Views.Shared.FormView extends Backbone.View
|
|
110
120
|
view.render()
|
111
121
|
self.inputs.push(view)
|
112
122
|
|
123
|
+
enable_markdown_inputs: ->
|
124
|
+
self = @
|
125
|
+
@$('.input.markdown').each ->
|
126
|
+
view = new Locomotive.Views.Inputs.MarkdownView(el: $(@))
|
127
|
+
view.render()
|
128
|
+
self.inputs.push(view)
|
129
|
+
|
130
|
+
enable_color_inputs: ->
|
131
|
+
@$('.input.color .input-group').colorpicker(container: false, align: 'right')
|
132
|
+
|
113
133
|
enable_tags_inputs: ->
|
114
134
|
@$('.input.tags input[type=text]').tagsinput()
|
115
135
|
|
@@ -127,6 +147,7 @@ class Locomotive.Views.Shared.FormView extends Backbone.View
|
|
127
147
|
_.each @inputs, (view) -> view.remove()
|
128
148
|
@$('.input.tags input[type=text]').tagsinput('destroy')
|
129
149
|
@$('.input.select select').select2('destroy')
|
150
|
+
@$('.input.color .input-group').colorpicker('destroy')
|
130
151
|
|
131
152
|
_stop_event: (event) ->
|
132
153
|
event.stopPropagation() & event.preventDefault()
|
@@ -2,6 +2,7 @@
|
|
2
2
|
//= require select2-bootstrap
|
3
3
|
//= require locomotive/cropper
|
4
4
|
//= require locomotive/bootstrap-switch
|
5
|
+
//= require locomotive/bootstrap-colorpicker
|
5
6
|
//= require locomotive/bootstrap-datetimepicker
|
6
7
|
//= require locomotive/bootstrap-tagsinput
|
7
8
|
//= require locomotive/highlightjs/github
|
@@ -33,6 +34,7 @@
|
|
33
34
|
@import "components/content_assets";
|
34
35
|
@import "components/translations";
|
35
36
|
@import "components/live_editing";
|
37
|
+
@import "components/dashboard";
|
36
38
|
@import "components/activity_feed";
|
37
39
|
@import "components/developers";
|
38
40
|
|
@@ -5,10 +5,12 @@
|
|
5
5
|
@import "./form/toggle";
|
6
6
|
@import "./form/date";
|
7
7
|
@import "./form/rte";
|
8
|
+
@import "./form/markdown";
|
8
9
|
@import "./form/select2";
|
9
10
|
@import "./form/file_input";
|
10
11
|
@import "./form/array_input";
|
11
12
|
@import "./form/api_key";
|
13
|
+
@import "./form/color_input";
|
12
14
|
@import "./form/popover";
|
13
15
|
@import "./form/document_picker";
|
14
16
|
@import "./form/link";
|
@@ -9,7 +9,7 @@
|
|
9
9
|
display: none;
|
10
10
|
}
|
11
11
|
|
12
|
-
|
12
|
+
.input {
|
13
13
|
background: $form_input_background_color;
|
14
14
|
padding: $form_input_padding;
|
15
15
|
@include border-radius($form_input_radius);
|
@@ -48,6 +48,11 @@
|
|
48
48
|
.help-inline {
|
49
49
|
color: $form_input_help_color;
|
50
50
|
font-size: $form_input_help_size;
|
51
|
+
|
52
|
+
b {
|
53
|
+
font-weight: bold;
|
54
|
+
color: #555;
|
55
|
+
}
|
51
56
|
}
|
52
57
|
|
53
58
|
.error-inline {
|
@@ -61,10 +66,16 @@
|
|
61
66
|
border: $form_input_control_border_size solid $form_input_control_border_color;
|
62
67
|
@include border-radius($form_input_control_border_size);
|
63
68
|
|
64
|
-
> input, > select {
|
69
|
+
> input, > select, .input-group > input {
|
65
70
|
border: none;
|
66
71
|
@include border-radius(0px);
|
67
72
|
}
|
73
|
+
|
74
|
+
.input-group {
|
75
|
+
.input-group-addon {
|
76
|
+
border: none;
|
77
|
+
}
|
78
|
+
}
|
68
79
|
}
|
69
80
|
|
70
81
|
&.hovered {
|
@@ -0,0 +1,292 @@
|
|
1
|
+
.input.markdown {
|
2
|
+
.CodeMirror {
|
3
|
+
font-family: 'Noto Sans', sans-serif;
|
4
|
+
border-top: 1px solid rgba(0, 0, 0, 0.07);
|
5
|
+
}
|
6
|
+
.CodeMirror-scroll {
|
7
|
+
overflow: auto
|
8
|
+
}
|
9
|
+
.CodeMirror-lines {
|
10
|
+
padding: 4px 0
|
11
|
+
}
|
12
|
+
.CodeMirror pre {
|
13
|
+
padding: 0 4px;
|
14
|
+
}
|
15
|
+
.CodeMirror-scrollbar-filler {
|
16
|
+
background-color: white
|
17
|
+
}
|
18
|
+
.CodeMirror-gutters {
|
19
|
+
border-right: 1px solid #ddd;
|
20
|
+
background-color: #f7f7f7
|
21
|
+
}
|
22
|
+
.CodeMirror-linenumber {
|
23
|
+
padding: 0 3px 0 5px;
|
24
|
+
min-width: 20px;
|
25
|
+
text-align: right;
|
26
|
+
color: #999
|
27
|
+
}
|
28
|
+
.CodeMirror div.CodeMirror-cursor {
|
29
|
+
border-left: 1px solid black
|
30
|
+
}
|
31
|
+
.CodeMirror div.CodeMirror-secondarycursor {
|
32
|
+
border-left: 1px solid silver
|
33
|
+
}
|
34
|
+
.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
|
35
|
+
width: auto;
|
36
|
+
border: 0;
|
37
|
+
background: transparent;
|
38
|
+
background: rgba(0,200,0,0.4);
|
39
|
+
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800)
|
40
|
+
}
|
41
|
+
.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor:not(#nonsense_id) {
|
42
|
+
filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)
|
43
|
+
}
|
44
|
+
.cm-s-default .cm-keyword {
|
45
|
+
color: #708
|
46
|
+
}
|
47
|
+
.cm-s-default .cm-atom {
|
48
|
+
color: #219
|
49
|
+
}
|
50
|
+
.cm-s-default .cm-number {
|
51
|
+
color: #164
|
52
|
+
}
|
53
|
+
.cm-s-default .cm-def {
|
54
|
+
color: #00f
|
55
|
+
}
|
56
|
+
.cm-s-default .cm-variable {
|
57
|
+
color: black
|
58
|
+
}
|
59
|
+
.cm-s-default .cm-variable-2 {
|
60
|
+
color: #05a
|
61
|
+
}
|
62
|
+
.cm-s-default .cm-variable-3 {
|
63
|
+
color: #085
|
64
|
+
}
|
65
|
+
.cm-s-default .cm-property {
|
66
|
+
color: black
|
67
|
+
}
|
68
|
+
.cm-s-default .cm-operator {
|
69
|
+
color: black
|
70
|
+
}
|
71
|
+
.cm-s-default .cm-comment {
|
72
|
+
color: #a50
|
73
|
+
}
|
74
|
+
.cm-s-default .cm-string {
|
75
|
+
color: #a11
|
76
|
+
}
|
77
|
+
.cm-s-default .cm-string-2 {
|
78
|
+
color: #f50
|
79
|
+
}
|
80
|
+
.cm-s-default .cm-meta {
|
81
|
+
color: #555
|
82
|
+
}
|
83
|
+
.cm-s-default .cm-error {
|
84
|
+
color: #f00
|
85
|
+
}
|
86
|
+
.cm-s-default .cm-qualifier {
|
87
|
+
color: #555
|
88
|
+
}
|
89
|
+
.cm-s-default .cm-builtin {
|
90
|
+
color: #30a
|
91
|
+
}
|
92
|
+
.cm-s-default .cm-bracket {
|
93
|
+
color: #997
|
94
|
+
}
|
95
|
+
.cm-s-default .cm-tag {
|
96
|
+
color: #170
|
97
|
+
}
|
98
|
+
.cm-s-default .cm-attribute {
|
99
|
+
color: #00c
|
100
|
+
}
|
101
|
+
.cm-s-default .cm-header {
|
102
|
+
color: blue
|
103
|
+
}
|
104
|
+
.cm-s-default .cm-quote {
|
105
|
+
color: #090
|
106
|
+
}
|
107
|
+
.cm-s-default .cm-hr {
|
108
|
+
color: #999
|
109
|
+
}
|
110
|
+
.cm-s-default .cm-link {
|
111
|
+
color: #00c
|
112
|
+
}
|
113
|
+
.cm-negative {
|
114
|
+
color: #d44
|
115
|
+
}
|
116
|
+
.cm-positive {
|
117
|
+
color: #292
|
118
|
+
}
|
119
|
+
.cm-header, .cm-strong {
|
120
|
+
font-weight: bold
|
121
|
+
}
|
122
|
+
.cm-em {
|
123
|
+
font-style: italic
|
124
|
+
}
|
125
|
+
.cm-emstrong {
|
126
|
+
font-style: italic;
|
127
|
+
font-weight: bold
|
128
|
+
}
|
129
|
+
.cm-link {
|
130
|
+
text-decoration: underline
|
131
|
+
}
|
132
|
+
.cm-invalidchar {
|
133
|
+
color: #f00
|
134
|
+
}
|
135
|
+
div.CodeMirror span.CodeMirror-matchingbracket {
|
136
|
+
color: #0f0
|
137
|
+
}
|
138
|
+
div.CodeMirror span.CodeMirror-nonmatchingbracket {
|
139
|
+
color: #f22
|
140
|
+
}
|
141
|
+
.CodeMirror {
|
142
|
+
line-height: 1;
|
143
|
+
position: relative;
|
144
|
+
overflow: hidden
|
145
|
+
}
|
146
|
+
.CodeMirror-scroll {
|
147
|
+
margin-bottom: -30px;
|
148
|
+
margin-right: -30px;
|
149
|
+
padding-bottom: 30px;
|
150
|
+
padding-right: 30px;
|
151
|
+
height: 100%;
|
152
|
+
outline: none;
|
153
|
+
position: relative
|
154
|
+
}
|
155
|
+
.CodeMirror-sizer {
|
156
|
+
position: relative
|
157
|
+
}
|
158
|
+
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler {
|
159
|
+
position: absolute;
|
160
|
+
z-index: 6;
|
161
|
+
display: none
|
162
|
+
}
|
163
|
+
.CodeMirror-vscrollbar {
|
164
|
+
right: 0;
|
165
|
+
top: 0;
|
166
|
+
overflow-x: hidden;
|
167
|
+
overflow-y: scroll
|
168
|
+
}
|
169
|
+
.CodeMirror-hscrollbar {
|
170
|
+
bottom: 0;
|
171
|
+
left: 0;
|
172
|
+
overflow-y: hidden;
|
173
|
+
overflow-x: scroll
|
174
|
+
}
|
175
|
+
.CodeMirror-scrollbar-filler {
|
176
|
+
right: 0;
|
177
|
+
bottom: 0;
|
178
|
+
z-index: 6
|
179
|
+
}
|
180
|
+
.CodeMirror-gutters {
|
181
|
+
position: absolute;
|
182
|
+
left: 0;
|
183
|
+
top: 0;
|
184
|
+
height: 100%;
|
185
|
+
padding-bottom: 30px;
|
186
|
+
z-index: 3
|
187
|
+
}
|
188
|
+
.CodeMirror-gutter {
|
189
|
+
height: 100%;
|
190
|
+
display: inline-block;
|
191
|
+
*zoom:1;
|
192
|
+
*display:inline
|
193
|
+
}
|
194
|
+
.CodeMirror-gutter-elt {
|
195
|
+
position: absolute;
|
196
|
+
cursor: default;
|
197
|
+
z-index: 4
|
198
|
+
}
|
199
|
+
.CodeMirror-lines {
|
200
|
+
cursor: text
|
201
|
+
}
|
202
|
+
.CodeMirror pre {
|
203
|
+
-moz-border-radius: 0;
|
204
|
+
-webkit-border-radius: 0;
|
205
|
+
-o-border-radius: 0;
|
206
|
+
border-radius: 0;
|
207
|
+
border-width: 0;
|
208
|
+
background: transparent;
|
209
|
+
font-family: inherit;
|
210
|
+
font-size: inherit;
|
211
|
+
margin: 0;
|
212
|
+
white-space: pre;
|
213
|
+
word-wrap: normal;
|
214
|
+
line-height: inherit;
|
215
|
+
line-height: 20px;
|
216
|
+
color: inherit;
|
217
|
+
z-index: 2;
|
218
|
+
position: relative;
|
219
|
+
overflow: visible
|
220
|
+
}
|
221
|
+
.CodeMirror-wrap pre {
|
222
|
+
word-wrap: break-word;
|
223
|
+
white-space: pre-wrap;
|
224
|
+
word-break: normal
|
225
|
+
}
|
226
|
+
.CodeMirror-linebackground {
|
227
|
+
position: absolute;
|
228
|
+
left: 0;
|
229
|
+
right: 0;
|
230
|
+
top: 0;
|
231
|
+
bottom: 0;
|
232
|
+
z-index: 0
|
233
|
+
}
|
234
|
+
.CodeMirror-linewidget {
|
235
|
+
position: relative;
|
236
|
+
z-index: 2;
|
237
|
+
overflow: auto
|
238
|
+
}
|
239
|
+
.CodeMirror-widget {
|
240
|
+
display: inline-block
|
241
|
+
}
|
242
|
+
.CodeMirror-wrap .CodeMirror-scroll {
|
243
|
+
overflow-x: hidden
|
244
|
+
}
|
245
|
+
.CodeMirror-measure {
|
246
|
+
position: absolute;
|
247
|
+
width: 100%;
|
248
|
+
height: 0px;
|
249
|
+
overflow: hidden;
|
250
|
+
visibility: hidden
|
251
|
+
}
|
252
|
+
.CodeMirror-measure pre {
|
253
|
+
position: static
|
254
|
+
}
|
255
|
+
.CodeMirror div.CodeMirror-cursor {
|
256
|
+
position: absolute;
|
257
|
+
visibility: hidden;
|
258
|
+
border-right: none;
|
259
|
+
width: 0
|
260
|
+
}
|
261
|
+
.CodeMirror-focused div.CodeMirror-cursor {
|
262
|
+
visibility: visible
|
263
|
+
}
|
264
|
+
.CodeMirror-selected {
|
265
|
+
background: #d9d9d9
|
266
|
+
}
|
267
|
+
.CodeMirror-focused .CodeMirror-selected {
|
268
|
+
background: #d7d4f0
|
269
|
+
}
|
270
|
+
.cm-searching {
|
271
|
+
background: #ffa;
|
272
|
+
background: rgba(255,255,0,0.4)
|
273
|
+
}
|
274
|
+
.CodeMirror span {
|
275
|
+
*vertical-align:text-bottom
|
276
|
+
}
|
277
|
+
|
278
|
+
@media print {
|
279
|
+
.CodeMirror div.CodeMirror-cursor {
|
280
|
+
visibility: hidden
|
281
|
+
}
|
282
|
+
}
|
283
|
+
|
284
|
+
.CodeMirror .cm-header {
|
285
|
+
color: rgb(85, 85, 85);
|
286
|
+
font-size: 2rem;
|
287
|
+
line-height: 1.4em
|
288
|
+
}
|
289
|
+
.CodeMirror .cm-string, .CodeMirror .cm-link, .CodeMirror .cm-comment, .CodeMirror .cm-quote {
|
290
|
+
color: rgb(85, 85, 85);
|
291
|
+
}
|
292
|
+
}
|