Show More
@@ -1,62 +1,110 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | # Copyright (C) 2010-2019 RhodeCode GmbH |
|
3 | # Copyright (C) 2010-2019 RhodeCode GmbH | |
4 | # |
|
4 | # | |
5 | # This program is free software: you can redistribute it and/or modify |
|
5 | # This program is free software: you can redistribute it and/or modify | |
6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
6 | # it under the terms of the GNU Affero General Public License, version 3 | |
7 | # (only), as published by the Free Software Foundation. |
|
7 | # (only), as published by the Free Software Foundation. | |
8 | # |
|
8 | # | |
9 | # This program is distributed in the hope that it will be useful, |
|
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. |
|
12 | # GNU General Public License for more details. | |
13 | # |
|
13 | # | |
14 | # You should have received a copy of the GNU Affero General Public License |
|
14 | # You should have received a copy of the GNU Affero General Public License | |
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
16 | # |
|
16 | # | |
17 | # This program is dual-licensed. If you wish to learn more about the |
|
17 | # This program is dual-licensed. If you wish to learn more about the | |
18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
18 | # RhodeCode Enterprise Edition, including its added features, Support services, | |
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ | |
20 |
|
20 | |||
21 | import markdown |
|
21 | import markdown | |
22 |
|
22 | |||
23 | from mdx_gfm import GithubFlavoredMarkdownExtension # pragma: no cover |
|
23 | from markdown.extensions import Extension | |
|
24 | from markdown.extensions.fenced_code import FencedCodeExtension | |||
|
25 | from markdown.extensions.smart_strong import SmartEmphasisExtension | |||
|
26 | from markdown.extensions.tables import TableExtension | |||
|
27 | from markdown.extensions.nl2br import Nl2BrExtension | |||
|
28 | ||||
|
29 | import gfm | |||
|
30 | ||||
|
31 | ||||
|
32 | class GithubFlavoredMarkdownExtension(Extension): | |||
|
33 | """ | |||
|
34 | An extension that is as compatible as possible with GitHub-flavored | |||
|
35 | Markdown (GFM). | |||
|
36 | ||||
|
37 | This extension aims to be compatible with the variant of GFM that GitHub | |||
|
38 | uses for Markdown-formatted gists and files (including READMEs). This | |||
|
39 | variant seems to have all the extensions described in the `GFM | |||
|
40 | documentation`_, except: | |||
|
41 | ||||
|
42 | - Newlines in paragraphs are not transformed into ``br`` tags. | |||
|
43 | - Intra-GitHub links to commits, repositories, and issues are not | |||
|
44 | supported. | |||
|
45 | ||||
|
46 | If you need support for features specific to GitHub comments and issues, | |||
|
47 | please use :class:`mdx_gfm.GithubFlavoredMarkdownExtension`. | |||
|
48 | ||||
|
49 | .. _GFM documentation: https://guides.github.com/features/mastering-markdown/ | |||
|
50 | """ | |||
|
51 | ||||
|
52 | def extendMarkdown(self, md, md_globals): | |||
|
53 | # Built-in extensions | |||
|
54 | FencedCodeExtension().extendMarkdown(md, md_globals) | |||
|
55 | SmartEmphasisExtension().extendMarkdown(md, md_globals) | |||
|
56 | TableExtension().extendMarkdown(md, md_globals) | |||
|
57 | ||||
|
58 | # Custom extensions | |||
|
59 | gfm.AutolinkExtension().extendMarkdown(md, md_globals) | |||
|
60 | gfm.AutomailExtension().extendMarkdown(md, md_globals) | |||
|
61 | gfm.HiddenHiliteExtension([ | |||
|
62 | ('guess_lang', 'False'), | |||
|
63 | ('css_class', 'highlight') | |||
|
64 | ]).extendMarkdown(md, md_globals) | |||
|
65 | gfm.SemiSaneListExtension().extendMarkdown(md, md_globals) | |||
|
66 | gfm.SpacedLinkExtension().extendMarkdown(md, md_globals) | |||
|
67 | gfm.StrikethroughExtension().extendMarkdown(md, md_globals) | |||
|
68 | gfm.TaskListExtension([ | |||
|
69 | ('list_attrs', {'class': 'checkbox'}) | |||
|
70 | ]).extendMarkdown(md, md_globals) | |||
|
71 | Nl2BrExtension().extendMarkdown(md, md_globals) | |||
24 |
|
72 | |||
25 |
|
73 | |||
26 | # Global Vars |
|
74 | # Global Vars | |
27 | URLIZE_RE = '(%s)' % '|'.join([ |
|
75 | URLIZE_RE = '(%s)' % '|'.join([ | |
28 | r'<(?:f|ht)tps?://[^>]*>', |
|
76 | r'<(?:f|ht)tps?://[^>]*>', | |
29 | r'\b(?:f|ht)tps?://[^)<>\s]+[^.,)<>\s]', |
|
77 | r'\b(?:f|ht)tps?://[^)<>\s]+[^.,)<>\s]', | |
30 | r'\bwww\.[^)<>\s]+[^.,)<>\s]', |
|
78 | r'\bwww\.[^)<>\s]+[^.,)<>\s]', | |
31 | r'[^(<\s]+\.(?:com|net|org)\b', |
|
79 | r'[^(<\s]+\.(?:com|net|org)\b', | |
32 | ]) |
|
80 | ]) | |
33 |
|
81 | |||
34 |
|
82 | |||
35 | class UrlizePattern(markdown.inlinepatterns.Pattern): |
|
83 | class UrlizePattern(markdown.inlinepatterns.Pattern): | |
36 | """ Return a link Element given an autolink (`http://example/com`). """ |
|
84 | """ Return a link Element given an autolink (`http://example/com`). """ | |
37 | def handleMatch(self, m): |
|
85 | def handleMatch(self, m): | |
38 | url = m.group(2) |
|
86 | url = m.group(2) | |
39 |
|
87 | |||
40 | if url.startswith('<'): |
|
88 | if url.startswith('<'): | |
41 | url = url[1:-1] |
|
89 | url = url[1:-1] | |
42 |
|
90 | |||
43 | text = url |
|
91 | text = url | |
44 |
|
92 | |||
45 | if not url.split('://')[0] in ('http','https','ftp'): |
|
93 | if not url.split('://')[0] in ('http','https','ftp'): | |
46 | if '@' in url and not '/' in url: |
|
94 | if '@' in url and not '/' in url: | |
47 | url = 'mailto:' + url |
|
95 | url = 'mailto:' + url | |
48 | else: |
|
96 | else: | |
49 | url = 'http://' + url |
|
97 | url = 'http://' + url | |
50 |
|
98 | |||
51 | el = markdown.util.etree.Element("a") |
|
99 | el = markdown.util.etree.Element("a") | |
52 | el.set('href', url) |
|
100 | el.set('href', url) | |
53 | el.text = markdown.util.AtomicString(text) |
|
101 | el.text = markdown.util.AtomicString(text) | |
54 | return el |
|
102 | return el | |
55 |
|
103 | |||
56 |
|
104 | |||
57 | class UrlizeExtension(markdown.Extension): |
|
105 | class UrlizeExtension(markdown.Extension): | |
58 | """ Urlize Extension for Python-Markdown. """ |
|
106 | """ Urlize Extension for Python-Markdown. """ | |
59 |
|
107 | |||
60 | def extendMarkdown(self, md, md_globals): |
|
108 | def extendMarkdown(self, md, md_globals): | |
61 | """ Replace autolink with UrlizePattern """ |
|
109 | """ Replace autolink with UrlizePattern """ | |
62 | md.inlinePatterns['autolink'] = UrlizePattern(URLIZE_RE, md) |
|
110 | md.inlinePatterns['autolink'] = UrlizePattern(URLIZE_RE, md) |
@@ -1,383 +1,397 b'' | |||||
1 |
|
1 | |||
2 | /** MODAL **/ |
|
2 | /** MODAL **/ | |
3 | .modal-open { |
|
3 | .modal-open { | |
4 | overflow:hidden; |
|
4 | overflow:hidden; | |
5 | } |
|
5 | } | |
6 | body.modal-open, .modal-open .navbar-fixed-top, .modal-open .navbar-fixed-bottom { |
|
6 | body.modal-open, .modal-open .navbar-fixed-top, .modal-open .navbar-fixed-bottom { | |
7 | margin-right:15px; |
|
7 | margin-right:15px; | |
8 | } |
|
8 | } | |
9 | .modal { |
|
9 | .modal { | |
10 | position:fixed; |
|
10 | position:fixed; | |
11 | top:0; |
|
11 | top:0; | |
12 | right:0; |
|
12 | right:0; | |
13 | bottom:0; |
|
13 | bottom:0; | |
14 | left:0; |
|
14 | left:0; | |
15 | z-index:1040; |
|
15 | z-index:1040; | |
16 | display:none; |
|
16 | display:none; | |
17 | overflow-y:scroll; |
|
17 | overflow-y:scroll; | |
18 | &.fade .modal-dialog { |
|
18 | &.fade .modal-dialog { | |
19 | -webkit-transform:translate(0,-25%); |
|
19 | -webkit-transform:translate(0,-25%); | |
20 | -ms-transform:translate(0,-25%); |
|
20 | -ms-transform:translate(0,-25%); | |
21 | transform:translate(0,-25%); |
|
21 | transform:translate(0,-25%); | |
22 | -webkit-transition:-webkit-transform 0.3s ease-out; |
|
22 | -webkit-transition:-webkit-transform 0.3s ease-out; | |
23 | -moz-transition:-moz-transform 0.3s ease-out; |
|
23 | -moz-transition:-moz-transform 0.3s ease-out; | |
24 | -o-transition:-o-transform 0.3s ease-out; |
|
24 | -o-transition:-o-transform 0.3s ease-out; | |
25 | transition:transform 0.3s ease-out; |
|
25 | transition:transform 0.3s ease-out; | |
26 | } |
|
26 | } | |
27 | &.in .modal-dialog { |
|
27 | &.in .modal-dialog { | |
28 | -webkit-transform:translate(0,0); |
|
28 | -webkit-transform:translate(0,0); | |
29 | -ms-transform:translate(0,0); |
|
29 | -ms-transform:translate(0,0); | |
30 | transform:translate(0,0); |
|
30 | transform:translate(0,0); | |
31 | } |
|
31 | } | |
32 | } |
|
32 | } | |
33 | .modal-dialog { |
|
33 | .modal-dialog { | |
34 | z-index:1050; |
|
34 | z-index:1050; | |
35 | width:auto; |
|
35 | width:auto; | |
36 | padding:10px; |
|
36 | padding:10px; | |
37 | margin-right:auto; |
|
37 | margin-right:auto; | |
38 | margin-left:auto; |
|
38 | margin-left:auto; | |
39 | } |
|
39 | } | |
40 | .modal-content { |
|
40 | .modal-content { | |
41 | position:relative; |
|
41 | position:relative; | |
42 | background-color:#ffffff; |
|
42 | background-color:#ffffff; | |
43 | border: @border-thickness solid rgba(0,0,0,0.2); |
|
43 | border: @border-thickness solid rgba(0,0,0,0.2); | |
44 | .border-radius(@border-radius); |
|
44 | .border-radius(@border-radius); | |
45 | outline:none; |
|
45 | outline:none; | |
46 | -webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5); |
|
46 | -webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5); | |
47 | box-shadow:0 3px 9px rgba(0,0,0,0.5); |
|
47 | box-shadow:0 3px 9px rgba(0,0,0,0.5); | |
48 | background-clip:padding-box; |
|
48 | background-clip:padding-box; | |
49 | } |
|
49 | } | |
50 | .modal-backdrop { |
|
50 | .modal-backdrop { | |
51 | position:fixed; |
|
51 | position:fixed; | |
52 | top:0; |
|
52 | top:0; | |
53 | right:0; |
|
53 | right:0; | |
54 | bottom:0; |
|
54 | bottom:0; | |
55 | left:0; |
|
55 | left:0; | |
56 | z-index:1030; |
|
56 | z-index:1030; | |
57 | background-color:#000000; |
|
57 | background-color:#000000; | |
58 |
|
58 | |||
59 | &.modal-backdrop.fade { |
|
59 | &.modal-backdrop.fade { | |
60 | opacity:0; |
|
60 | opacity:0; | |
61 | filter:alpha(opacity=0); |
|
61 | filter:alpha(opacity=0); | |
62 | } |
|
62 | } | |
63 | &.in { |
|
63 | &.in { | |
64 | opacity:0.5; |
|
64 | opacity:0.5; | |
65 | filter:alpha(opacity=50); |
|
65 | filter:alpha(opacity=50); | |
66 | } |
|
66 | } | |
67 | } |
|
67 | } | |
68 | .modal-header { |
|
68 | .modal-header { | |
69 | min-height:16.428571429px; |
|
69 | min-height:16.428571429px; | |
70 | padding:15px; |
|
70 | padding:15px; | |
71 | border-bottom: @border-thickness solid @grey6; |
|
71 | border-bottom: @border-thickness solid @grey6; | |
72 | .close { |
|
72 | .close { | |
73 | margin-top:-2px; |
|
73 | margin-top:-2px; | |
74 | } |
|
74 | } | |
75 | } |
|
75 | } | |
76 | .modal-title { |
|
76 | .modal-title { | |
77 | margin:0; |
|
77 | margin:0; | |
78 | line-height:1.428571429; |
|
78 | line-height:1.428571429; | |
79 | } |
|
79 | } | |
80 | .modal-body { |
|
80 | .modal-body { | |
81 | position:relative; |
|
81 | position:relative; | |
82 | padding:20px; |
|
82 | padding:20px; | |
83 | } |
|
83 | } | |
84 | .modal-footer { |
|
84 | .modal-footer { | |
85 | padding:19px 20px 20px; |
|
85 | padding:19px 20px 20px; | |
86 | margin-top:15px; |
|
86 | margin-top:15px; | |
87 | text-align:right; |
|
87 | text-align:right; | |
88 | border-top:1px solid #e5e5e5; |
|
88 | border-top:1px solid #e5e5e5; | |
89 | .btn + .btn { |
|
89 | .btn + .btn { | |
90 | margin-bottom:0; |
|
90 | margin-bottom:0; | |
91 | margin-left:5px; |
|
91 | margin-left:5px; | |
92 | } |
|
92 | } | |
93 | .btn-group .btn + .btn { |
|
93 | .btn-group .btn + .btn { | |
94 | margin-left:-1px; |
|
94 | margin-left:-1px; | |
95 | } |
|
95 | } | |
96 | .btn-block + .btn-block { |
|
96 | .btn-block + .btn-block { | |
97 | margin-left:0; |
|
97 | margin-left:0; | |
98 | } |
|
98 | } | |
99 | &:before { |
|
99 | &:before { | |
100 | display:table; |
|
100 | display:table; | |
101 | content:" "; |
|
101 | content:" "; | |
102 | } |
|
102 | } | |
103 | &:after { |
|
103 | &:after { | |
104 | display:table; |
|
104 | display:table; | |
105 | content:" "; |
|
105 | content:" "; | |
106 | clear:both; |
|
106 | clear:both; | |
107 | } |
|
107 | } | |
108 | } |
|
108 | } | |
109 |
|
109 | |||
110 | /** MARKDOWN styling **/ |
|
110 | /** MARKDOWN styling **/ | |
111 | div.markdown-block { |
|
111 | div.markdown-block { | |
112 | clear: both; |
|
112 | clear: both; | |
113 | overflow: hidden; |
|
113 | overflow: hidden; | |
114 | margin: 0; |
|
114 | margin: 0; | |
115 | padding: 3px 15px 3px; |
|
115 | padding: 3px 15px 3px; | |
116 | } |
|
116 | } | |
117 |
|
117 | |||
118 | div.markdown-block h1, |
|
118 | div.markdown-block h1, | |
119 | div.markdown-block h2, |
|
119 | div.markdown-block h2, | |
120 | div.markdown-block h3, |
|
120 | div.markdown-block h3, | |
121 | div.markdown-block h4, |
|
121 | div.markdown-block h4, | |
122 | div.markdown-block h5, |
|
122 | div.markdown-block h5, | |
123 | div.markdown-block h6 { |
|
123 | div.markdown-block h6 { | |
124 | border-bottom: none !important; |
|
124 | border-bottom: none !important; | |
125 | padding: 0 !important; |
|
125 | padding: 0 !important; | |
126 | overflow: visible !important; |
|
126 | overflow: visible !important; | |
127 | } |
|
127 | } | |
128 |
|
128 | |||
129 | div.markdown-block h1, |
|
129 | div.markdown-block h1, | |
130 | div.markdown-block h2 { |
|
130 | div.markdown-block h2 { | |
131 | border-bottom: 1px #e6e5e5 solid !important; |
|
131 | border-bottom: 1px #e6e5e5 solid !important; | |
132 | } |
|
132 | } | |
133 |
|
133 | |||
134 | div.markdown-block h1 { |
|
134 | div.markdown-block h1 { | |
135 | font-size: 32px; |
|
135 | font-size: 32px; | |
136 | margin: 15px 0 15px 0 !important; |
|
136 | margin: 15px 0 15px 0 !important; | |
137 | padding-bottom: 5px !important; |
|
137 | padding-bottom: 5px !important; | |
138 | } |
|
138 | } | |
139 |
|
139 | |||
140 | div.markdown-block h2 { |
|
140 | div.markdown-block h2 { | |
141 | font-size: 24px !important; |
|
141 | font-size: 24px !important; | |
142 | margin: 34px 0 10px 0 !important; |
|
142 | margin: 34px 0 10px 0 !important; | |
143 | padding-top: 15px !important; |
|
143 | padding-top: 15px !important; | |
144 | padding-bottom: 8px !important; |
|
144 | padding-bottom: 8px !important; | |
145 | } |
|
145 | } | |
146 |
|
146 | |||
147 | div.markdown-block h3 { |
|
147 | div.markdown-block h3 { | |
148 | font-size: 18px !important; |
|
148 | font-size: 18px !important; | |
149 | margin: 30px 0 8px 0 !important; |
|
149 | margin: 30px 0 8px 0 !important; | |
150 | padding-bottom: 2px !important; |
|
150 | padding-bottom: 2px !important; | |
151 | } |
|
151 | } | |
152 |
|
152 | |||
153 | div.markdown-block h4 { |
|
153 | div.markdown-block h4 { | |
154 | font-size: 13px !important; |
|
154 | font-size: 13px !important; | |
155 | margin: 18px 0 3px 0 !important; |
|
155 | margin: 18px 0 3px 0 !important; | |
156 | } |
|
156 | } | |
157 |
|
157 | |||
158 | div.markdown-block h5 { |
|
158 | div.markdown-block h5 { | |
159 | font-size: 12px !important; |
|
159 | font-size: 12px !important; | |
160 | margin: 15px 0 3px 0 !important; |
|
160 | margin: 15px 0 3px 0 !important; | |
161 | } |
|
161 | } | |
162 |
|
162 | |||
163 | div.markdown-block h6 { |
|
163 | div.markdown-block h6 { | |
164 | font-size: 12px; |
|
164 | font-size: 12px; | |
165 | color: #777777; |
|
165 | color: #777777; | |
166 | margin: 15px 0 3px 0 !important; |
|
166 | margin: 15px 0 3px 0 !important; | |
167 | } |
|
167 | } | |
168 |
|
168 | |||
169 | div.markdown-block hr { |
|
169 | div.markdown-block hr { | |
170 | border: 0; |
|
170 | border: 0; | |
171 | color: #e6e5e5; |
|
171 | color: #e6e5e5; | |
172 | background-color: #e6e5e5; |
|
172 | background-color: #e6e5e5; | |
173 | height: 3px; |
|
173 | height: 3px; | |
174 | margin-bottom: 13px; |
|
174 | margin-bottom: 13px; | |
175 | } |
|
175 | } | |
176 |
|
176 | |||
177 | div.markdown-block ol, |
|
177 | div.markdown-block ol, | |
178 | div.markdown-block ul, |
|
178 | div.markdown-block ul, | |
179 | div.markdown-block p, |
|
179 | div.markdown-block p, | |
180 | div.markdown-block blockquote, |
|
180 | div.markdown-block blockquote, | |
181 | div.markdown-block dl, |
|
181 | div.markdown-block dl, | |
182 | div.markdown-block li, |
|
182 | div.markdown-block li, | |
183 | div.markdown-block table { |
|
183 | div.markdown-block table { | |
184 | margin: 3px 0px 13px 0px !important; |
|
184 | margin: 3px 0px 13px 0px !important; | |
185 | color: #424242 !important; |
|
185 | color: #424242 !important; | |
186 | font-size: 13px !important; |
|
186 | font-size: 13px !important; | |
187 | font-family: @text-regular; |
|
187 | font-family: @text-regular; | |
188 | font-weight: normal !important; |
|
188 | font-weight: normal !important; | |
189 | overflow: visible !important; |
|
189 | overflow: visible !important; | |
190 | line-height: 140% !important; |
|
190 | line-height: 140% !important; | |
191 | } |
|
191 | } | |
192 |
|
192 | |||
193 | div.markdown-block pre { |
|
193 | div.markdown-block pre { | |
194 | margin: 3px 0px 13px 0px !important; |
|
194 | margin: 3px 0px 13px 0px !important; | |
195 | padding: .5em; |
|
195 | padding: .5em; | |
196 | color: #424242 !important; |
|
196 | color: #424242 !important; | |
197 | font-size: 13px !important; |
|
197 | font-size: 13px !important; | |
198 | overflow: visible !important; |
|
198 | overflow: visible !important; | |
199 | line-height: 140% !important; |
|
199 | line-height: 140% !important; | |
200 | background-color: @grey7; |
|
200 | background-color: @grey7; | |
201 | } |
|
201 | } | |
202 |
|
202 | |||
203 | div.markdown-block img { |
|
203 | div.markdown-block img { | |
204 | border-style: none; |
|
204 | border-style: none; | |
205 | background-color: #fff; |
|
205 | background-color: #fff; | |
206 | padding-right: 20px; |
|
206 | padding-right: 20px; | |
207 | } |
|
207 | } | |
208 |
|
208 | |||
209 |
|
209 | |||
210 | div.markdown-block strong { |
|
210 | div.markdown-block strong { | |
211 | font-weight: 600; |
|
211 | font-weight: 600; | |
212 | margin: 0; |
|
212 | margin: 0; | |
213 | } |
|
213 | } | |
214 |
|
214 | |||
|
215 | div.markdown-block ul.checkbox, | |||
|
216 | div.markdown-block ol.checkbox { | |||
|
217 | padding-left: 20px !important; | |||
|
218 | margin-top: 0px !important; | |||
|
219 | margin-bottom: 18px !important; | |||
|
220 | } | |||
|
221 | ||||
215 | div.markdown-block ul, |
|
222 | div.markdown-block ul, | |
216 | div.markdown-block ol { |
|
223 | div.markdown-block ol { | |
217 | padding-left: 30px !important; |
|
224 | padding-left: 30px !important; | |
218 | margin-top: 0px !important; |
|
225 | margin-top: 0px !important; | |
219 | margin-bottom: 18px !important; |
|
226 | margin-bottom: 18px !important; | |
220 | } |
|
227 | } | |
221 |
|
228 | |||
|
229 | div.markdown-block ul.checkbox li, | |||
|
230 | div.markdown-block ol.checkbox li { | |||
|
231 | list-style: none !important; | |||
|
232 | margin: 6px !important; | |||
|
233 | padding: 0 !important; | |||
|
234 | } | |||
|
235 | ||||
222 | div.markdown-block ul li, |
|
236 | div.markdown-block ul li, | |
223 | div.markdown-block ol li { |
|
237 | div.markdown-block ol li { | |
224 | list-style: disc !important; |
|
238 | list-style: disc !important; | |
225 | margin: 6px !important; |
|
239 | margin: 6px !important; | |
226 | padding: 0 !important; |
|
240 | padding: 0 !important; | |
227 | } |
|
241 | } | |
228 |
|
242 | |||
229 | div.markdown-block ol li { |
|
243 | div.markdown-block ol li { | |
230 | list-style: decimal !important; |
|
244 | list-style: decimal !important; | |
231 | } |
|
245 | } | |
232 |
|
246 | |||
233 | /* |
|
247 | /* | |
234 | div.markdown-block a, |
|
248 | div.markdown-block a, | |
235 | div.markdown-block a:visited { |
|
249 | div.markdown-block a:visited { | |
236 | color: #4183C4 !important; |
|
250 | color: #4183C4 !important; | |
237 | background-color: inherit; |
|
251 | background-color: inherit; | |
238 | text-decoration: none; |
|
252 | text-decoration: none; | |
239 | } |
|
253 | } | |
240 | */ |
|
254 | */ | |
241 |
|
255 | |||
242 | div.markdown-block #message { |
|
256 | div.markdown-block #message { | |
243 | .border-radius(@border-radius); |
|
257 | .border-radius(@border-radius); | |
244 | border: @border-thickness solid @grey5; |
|
258 | border: @border-thickness solid @grey5; | |
245 | display: block; |
|
259 | display: block; | |
246 | width: 100%; |
|
260 | width: 100%; | |
247 | height: 60px; |
|
261 | height: 60px; | |
248 | margin: 6px 0px; |
|
262 | margin: 6px 0px; | |
249 | } |
|
263 | } | |
250 |
|
264 | |||
251 | div.markdown-block button, |
|
265 | div.markdown-block button, | |
252 | div.markdown-block #ws { |
|
266 | div.markdown-block #ws { | |
253 | font-size: @basefontsize; |
|
267 | font-size: @basefontsize; | |
254 | padding: 4px 6px; |
|
268 | padding: 4px 6px; | |
255 | .border-radius(@border-radius); |
|
269 | .border-radius(@border-radius); | |
256 | border: @border-thickness solid @grey5; |
|
270 | border: @border-thickness solid @grey5; | |
257 | background-color: @grey6; |
|
271 | background-color: @grey6; | |
258 | } |
|
272 | } | |
259 |
|
273 | |||
260 | div.markdown-block code, |
|
274 | div.markdown-block code, | |
261 | div.markdown-block pre, |
|
275 | div.markdown-block pre, | |
262 | div.markdown-block #ws, |
|
276 | div.markdown-block #ws, | |
263 | div.markdown-block #message { |
|
277 | div.markdown-block #message { | |
264 | font-family: @text-monospace; |
|
278 | font-family: @text-monospace; | |
265 | font-size: 11px; |
|
279 | font-size: 11px; | |
266 | .border-radius(@border-radius); |
|
280 | .border-radius(@border-radius); | |
267 | background-color: white; |
|
281 | background-color: white; | |
268 | color: @grey3; |
|
282 | color: @grey3; | |
269 | } |
|
283 | } | |
270 |
|
284 | |||
271 |
|
285 | |||
272 | div.markdown-block code { |
|
286 | div.markdown-block code { | |
273 | border: @border-thickness solid @grey6; |
|
287 | border: @border-thickness solid @grey6; | |
274 | margin: 0 2px; |
|
288 | margin: 0 2px; | |
275 | padding: 0 5px; |
|
289 | padding: 0 5px; | |
276 | } |
|
290 | } | |
277 |
|
291 | |||
278 | div.markdown-block pre { |
|
292 | div.markdown-block pre { | |
279 | border: @border-thickness solid @grey5; |
|
293 | border: @border-thickness solid @grey5; | |
280 | overflow: auto; |
|
294 | overflow: auto; | |
281 | padding: .5em; |
|
295 | padding: .5em; | |
282 | background-color: @grey7; |
|
296 | background-color: @grey7; | |
283 | } |
|
297 | } | |
284 |
|
298 | |||
285 | div.markdown-block pre > code { |
|
299 | div.markdown-block pre > code { | |
286 | border: 0; |
|
300 | border: 0; | |
287 | margin: 0; |
|
301 | margin: 0; | |
288 | padding: 0; |
|
302 | padding: 0; | |
289 | } |
|
303 | } | |
290 |
|
304 | |||
291 | /** RST STYLE **/ |
|
305 | /** RST STYLE **/ | |
292 | div.rst-block { |
|
306 | div.rst-block { | |
293 | clear: both; |
|
307 | clear: both; | |
294 | overflow: hidden; |
|
308 | overflow: hidden; | |
295 | margin: 0; |
|
309 | margin: 0; | |
296 | padding: 3px 15px 3px; |
|
310 | padding: 3px 15px 3px; | |
297 | } |
|
311 | } | |
298 |
|
312 | |||
299 | div.rst-block h2 { |
|
313 | div.rst-block h2 { | |
300 | font-weight: normal; |
|
314 | font-weight: normal; | |
301 | } |
|
315 | } | |
302 |
|
316 | |||
303 | div.rst-block h1, |
|
317 | div.rst-block h1, | |
304 | div.rst-block h2, |
|
318 | div.rst-block h2, | |
305 | div.rst-block h3, |
|
319 | div.rst-block h3, | |
306 | div.rst-block h4, |
|
320 | div.rst-block h4, | |
307 | div.rst-block h5, |
|
321 | div.rst-block h5, | |
308 | div.rst-block h6 { |
|
322 | div.rst-block h6 { | |
309 | border-bottom: 0 !important; |
|
323 | border-bottom: 0 !important; | |
310 | margin: 0 !important; |
|
324 | margin: 0 !important; | |
311 | padding: 0 !important; |
|
325 | padding: 0 !important; | |
312 | line-height: 1.5em !important; |
|
326 | line-height: 1.5em !important; | |
313 | } |
|
327 | } | |
314 |
|
328 | |||
315 |
|
329 | |||
316 | div.rst-block h1:first-child { |
|
330 | div.rst-block h1:first-child { | |
317 | padding-top: .25em !important; |
|
331 | padding-top: .25em !important; | |
318 | } |
|
332 | } | |
319 |
|
333 | |||
320 | div.rst-block h2, |
|
334 | div.rst-block h2, | |
321 | div.rst-block h3 { |
|
335 | div.rst-block h3 { | |
322 | margin: 1em 0 !important; |
|
336 | margin: 1em 0 !important; | |
323 | } |
|
337 | } | |
324 |
|
338 | |||
325 | div.rst-block h1, |
|
339 | div.rst-block h1, | |
326 | div.rst-block h2 { |
|
340 | div.rst-block h2 { | |
327 | border-bottom: 1px #e6e5e5 solid !important; |
|
341 | border-bottom: 1px #e6e5e5 solid !important; | |
328 | } |
|
342 | } | |
329 |
|
343 | |||
330 | div.rst-block h2 { |
|
344 | div.rst-block h2 { | |
331 | margin-top: 1.5em !important; |
|
345 | margin-top: 1.5em !important; | |
332 | padding-top: .5em !important; |
|
346 | padding-top: .5em !important; | |
333 | } |
|
347 | } | |
334 |
|
348 | |||
335 | div.rst-block p { |
|
349 | div.rst-block p { | |
336 | color: black !important; |
|
350 | color: black !important; | |
337 | margin: 1em 0 !important; |
|
351 | margin: 1em 0 !important; | |
338 | line-height: 1.5em !important; |
|
352 | line-height: 1.5em !important; | |
339 | } |
|
353 | } | |
340 |
|
354 | |||
341 | div.rst-block ul { |
|
355 | div.rst-block ul { | |
342 | list-style: disc !important; |
|
356 | list-style: disc !important; | |
343 | margin: 1em 0 1em 2em !important; |
|
357 | margin: 1em 0 1em 2em !important; | |
344 | clear: both; |
|
358 | clear: both; | |
345 | } |
|
359 | } | |
346 |
|
360 | |||
347 | div.rst-block ol { |
|
361 | div.rst-block ol { | |
348 | list-style: decimal; |
|
362 | list-style: decimal; | |
349 | margin: 1em 0 1em 2em !important; |
|
363 | margin: 1em 0 1em 2em !important; | |
350 | } |
|
364 | } | |
351 |
|
365 | |||
352 | div.rst-block pre, |
|
366 | div.rst-block pre, | |
353 | div.rst-block code { |
|
367 | div.rst-block code { | |
354 | font: 12px "Bitstream Vera Sans Mono","Courier",monospace; |
|
368 | font: 12px "Bitstream Vera Sans Mono","Courier",monospace; | |
355 | } |
|
369 | } | |
356 |
|
370 | |||
357 | div.rst-block code { |
|
371 | div.rst-block code { | |
358 | font-size: 12px !important; |
|
372 | font-size: 12px !important; | |
359 | background-color: ghostWhite !important; |
|
373 | background-color: ghostWhite !important; | |
360 | color: #444 !important; |
|
374 | color: #444 !important; | |
361 | padding: 0 .2em !important; |
|
375 | padding: 0 .2em !important; | |
362 | border: 1px solid #dedede !important; |
|
376 | border: 1px solid #dedede !important; | |
363 | } |
|
377 | } | |
364 |
|
378 | |||
365 | div.rst-block pre code { |
|
379 | div.rst-block pre code { | |
366 | padding: 0 !important; |
|
380 | padding: 0 !important; | |
367 | font-size: 12px !important; |
|
381 | font-size: 12px !important; | |
368 | background-color: #eee !important; |
|
382 | background-color: #eee !important; | |
369 | border: none !important; |
|
383 | border: none !important; | |
370 | } |
|
384 | } | |
371 |
|
385 | |||
372 | div.rst-block pre { |
|
386 | div.rst-block pre { | |
373 | margin: 1em 0; |
|
387 | margin: 1em 0; | |
374 | padding: @padding; |
|
388 | padding: @padding; | |
375 | border: 1px solid @grey6; |
|
389 | border: 1px solid @grey6; | |
376 | .border-radius(@border-radius); |
|
390 | .border-radius(@border-radius); | |
377 | overflow: auto; |
|
391 | overflow: auto; | |
378 | font-size: 12px; |
|
392 | font-size: 12px; | |
379 | color: #444; |
|
393 | color: #444; | |
380 | background-color: @grey7; |
|
394 | background-color: @grey7; | |
381 | } |
|
395 | } | |
382 |
|
396 | |||
383 |
|
397 |
General Comments 0
You need to be logged in to leave comments.
Login now