##// END OF EJS Templates
markdown: improved styling, and fixed nl2br extensions to only do br on new elements not inline....
milka -
r4533:74d334b4 default
parent child Browse files
Show More
@@ -1,408 +1,408 b''
1 1 all_tags = [
2 2 "a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio",
3 3 "b", "base", "basefont", "bdi", "bdo", "bgsound", "big", "blink", "blockquote", "body", "br", "button",
4 4 "canvas", "caption", "center", "cite", "code", "col", "colgroup", "command", "content",
5 5 "data", "datalist", "dd", "del", "detals", "dfn", "dialog", "dir", "div", "dl", "dt",
6 6 "element", "em", "embed",
7 7 "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "frameset",
8 8 "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html",
9 9 "i", "iframe", "image", "img", "input", "ins", "isindex",
10 10 "kbd", "keygen",
11 11 "label", "legend", "li", "link", "listing",
12 12 "main", "map", "mark", "marquee", "menu", "menuitem", "meta", "meter", "multicol",
13 13 "nav", "nobr", "noembed", "noframes", "noscript",
14 14 "object", "ol", "optgroup", "option", "output",
15 15 "p", "param", "picture", "plaintext", "pre", "progress",
16 16 "q",
17 17 "rp", "rt", "ruby",
18 18 "s", "samp", "script", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup",
19 19 "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "tt",
20 20 "u", "ul",
21 21 "var", "video",
22 22 "wbr",
23 23 "xmp",
24 24 ]
25 25
26 26 # List tags that, if included in a page, could break markup or open XSS.
27 27 generally_xss_unsafe = [
28 28 "applet", "audio",
29 29 "bgsound", "body",
30 30 "canvas",
31 31 "embed",
32 32 "frame", "frameset",
33 33 "head", "html",
34 34 "iframe",
35 35 "link",
36 36 "meta",
37 37 "object",
38 38 "param",
39 39 "source", "script",
40 40 "ruby", "rt",
41 41 "title", "track",
42 42 "video",
43 43 "xmp"
44 44 ]
45 45
46 46 # Tags that, if included on the page, will probably not break markup or open
47 47 # XSS. Note that these must be combined with attribute whitelisting, or things
48 48 # like <img> and <style> could still be unsafe.
49 49 generally_xss_safe = list(set(all_tags) - set(generally_xss_unsafe))
50 50 generally_xss_safe.sort()
51 51
52 52 # Tags suitable for rendering markdown
53 53 markdown_tags = [
54 54 "h1", "h2", "h3", "h4", "h5", "h6",
55 55 "b", "i", "strong", "em", "tt",
56 56 "p", "br",
57 57 "span", "div", "blockquote", "code", "hr", "pre", "del",
58 58 "ul", "ol", "li",
59 59 "dl", "dd", "dt",
60 60 "table", "thead", "tbody", "tfoot", "tr", "th", "td",
61 61 "img",
62 62 "a",
63 63 "input",
64 64 "details",
65 65 "summary"
66 66 ]
67 67
68 68 markdown_attrs = {
69 69 "*": ["class", "style", "align"],
70 "img": ["src", "alt", "title"],
70 "img": ["src", "alt", "title", "width", "height", "hspace", "align"],
71 71 "a": ["href", "alt", "title", "name", "data-hovercard-alt", "data-hovercard-url"],
72 72 "abbr": ["title"],
73 73 "acronym": ["title"],
74 74 "pre": ["lang"],
75 75 "input": ["type", "disabled", "checked"],
76 76 "strong": ["title", "data-hovercard-alt", "data-hovercard-url"],
77 77 }
78 78
79 79 standard_styles = [
80 80 # Taken from https://developer.mozilla.org/en-US/docs/Web/CSS/Reference
81 81 # This includes pseudo-classes, pseudo-elements, @-rules, units, and
82 82 # selectors in addition to properties, but it doesn't matter for our
83 83 # purposes -- we don't need to filter styles..
84 84 ":active", "::after (:after)", "align-content", "align-items", "align-self",
85 85 "all", "<angle>", "animation", "animation-delay", "animation-direction",
86 86 "animation-duration", "animation-fill-mode", "animation-iteration-count",
87 87 "animation-name", "animation-play-state", "animation-timing-function",
88 88 "@annotation", "annotation()", "attr()", "::backdrop", "backface-visibility",
89 89 "background", "background-attachment", "background-blend-mode",
90 90 "background-clip", "background-color", "background-image", "background-origin",
91 91 "background-position", "background-repeat", "background-size", "<basic-shape>",
92 92 "::before (:before)", "<blend-mode>", "blur()", "border", "border-bottom",
93 93 "border-bottom-color", "border-bottom-left-radius",
94 94 "border-bottom-right-radius", "border-bottom-style", "border-bottom-width",
95 95 "border-collapse", "border-color", "border-image", "border-image-outset",
96 96 "border-image-repeat", "border-image-slice", "border-image-source",
97 97 "border-image-width", "border-left", "border-left-color", "border-left-style",
98 98 "border-left-width", "border-radius", "border-right", "border-right-color",
99 99 "border-right-style", "border-right-width", "border-spacing", "border-style",
100 100 "border-top", "border-top-color", "border-top-left-radius",
101 101 "border-top-right-radius", "border-top-style", "border-top-width",
102 102 "border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing",
103 103 "break-after", "break-before", "break-inside", "brightness()", "calc()",
104 104 "caption-side", "ch", "@character-variant", "character-variant()", "@charset",
105 105 ":checked", "circle()", "clear", "clip", "clip-path", "cm", "color", "<color>",
106 106 "columns", "column-count", "column-fill", "column-gap", "column-rule",
107 107 "column-rule-color", "column-rule-style", "column-rule-width", "column-span",
108 108 "column-width", "content", "contrast()", "<counter>", "counter-increment",
109 109 "counter-reset", "@counter-style", "cubic-bezier()", "cursor",
110 110 "<custom-ident>", ":default", "deg", ":dir()", "direction", ":disabled",
111 111 "display", "@document", "dpcm", "dpi", "dppx", "drop-shadow()", "element()",
112 112 "ellipse()", "em", ":empty", "empty-cells", ":enabled", "ex", "filter",
113 113 ":first", ":first-child", "::first-letter", "::first-line",
114 114 ":first-of-type", "flex", "flex-basis", "flex-direction",
115 115 "flex-flow", "flex-grow", "flex-shrink", "flex-wrap", "float", ":focus",
116 116 "font", "@font-face", "font-family", "font-feature-settings",
117 117 "@font-feature-values", "font-kerning", "font-language-override", "font-size",
118 118 "font-size-adjust", "font-stretch", "font-style", "font-synthesis",
119 119 "font-variant", "font-variant-alternates", "font-variant-caps",
120 120 "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric",
121 121 "font-variant-position", "font-weight", "<frequency>", ":fullscreen", "grad",
122 122 "<gradient>", "grayscale()", "grid", "grid-area", "grid-auto-columns",
123 123 "grid-auto-flow", "grid-auto-position", "grid-auto-rows", "grid-column",
124 124 "grid-column-start", "grid-column-end", "grid-row", "grid-row-start",
125 125 "grid-row-end", "grid-template", "grid-template-areas", "grid-template-rows",
126 126 "grid-template-columns", "height", ":hover", "hsl()", "hsla()", "hue-rotate()",
127 127 "hyphens", "hz", "<image>", "image()", "image-rendering", "image-resolution",
128 128 "image-orientation", "ime-mode", "@import", "in", ":indeterminate", "inherit",
129 129 "initial", ":in-range", "inset()", "<integer>", ":invalid", "invert()",
130 130 "isolation", "justify-content", "@keyframes", "khz", ":lang()", ":last-child",
131 131 ":last-of-type", "left", ":left", "<length>", "letter-spacing",
132 132 "linear-gradient()", "line-break", "line-height", ":link", "list-style",
133 133 "list-style-image", "list-style-position", "list-style-type", "margin",
134 134 "margin-bottom", "margin-left", "margin-right", "margin-top", "marks", "mask",
135 135 "mask-type", "matrix()", "matrix3d()", "max-height", "max-width", "@media",
136 136 "min-height", "minmax()", "min-width", "mix-blend-mode", "mm", "ms",
137 137 "@namespace", ":not()", ":nth-child()", ":nth-last-child()",
138 138 ":nth-last-of-type()", ":nth-of-type()", "<number>", "object-fit",
139 139 "object-position", ":only-child", ":only-of-type", "opacity", "opacity()",
140 140 ":optional", "order", "@ornaments", "ornaments()", "orphans", "outline",
141 141 "outline-color", "outline-offset", "outline-style", "outline-width",
142 142 ":out-of-range", "overflow", "overflow-wrap", "overflow-x", "overflow-y",
143 143 "padding", "padding-bottom", "padding-left", "padding-right", "padding-top",
144 144 "@page", "page-break-after", "page-break-before", "page-break-inside", "pc",
145 145 "<percentage>", "perspective", "perspective()", "perspective-origin",
146 146 "pointer-events", "polygon()", "position", "<position>", "pt", "px", "quotes",
147 147 "rad", "radial-gradient()", "<ratio>", ":read-only", ":read-write", "rect()",
148 148 "rem", "repeat()", "::repeat-index", "::repeat-item",
149 149 "repeating-linear-gradient()", "repeating-radial-gradient()", ":required",
150 150 "resize", "<resolution>", "rgb()", "rgba()", "right", ":right", ":root",
151 151 "rotate()", "rotatex()", "rotatey()", "rotatez()", "rotate3d()", "ruby-align",
152 152 "ruby-merge", "ruby-position", "s", "saturate()", "scale()", "scalex()",
153 153 "scaley()", "scalez()", "scale3d()", ":scope", "scroll-behavior",
154 154 "::selection", "sepia()", "<shape>", "shape-image-threshold", "shape-margin",
155 155 "shape-outside", "skew()", "skewx()", "skewy()", "steps()", "<string>",
156 156 "@styleset", "styleset()", "@stylistic", "stylistic()", "@supports", "@swash",
157 157 "swash()", "symbol()", "table-layout", "tab-size", ":target", "text-align",
158 158 "text-align-last", "text-combine-upright", "text-decoration",
159 159 "text-decoration-color", "text-decoration-line", "text-decoration-style",
160 160 "text-indent", "text-orientation", "text-overflow", "text-rendering",
161 161 "text-shadow", "text-transform", "text-underline-position", "<time>",
162 162 "<timing-function>", "top", "touch-action", "transform", "transform-origin",
163 163 "transform-style", "transition", "transition-delay", "transition-duration",
164 164 "transition-property", "transition-timing-function", "translate()",
165 165 "translatex()", "translatey()", "translatez()", "translate3d()", "turn",
166 166 "unicode-bidi", "unicode-range", "unset", "<uri>", "url()", "<user-ident>",
167 167 ":valid", "::value", "var()", "vertical-align", "vh", "@viewport",
168 168 "visibility", ":visited", "vmax", "vmin", "vw", "white-space", "widows",
169 169 "width", "will-change", "word-break", "word-spacing", "word-wrap",
170 170 "writing-mode", "z-index",
171 171
172 172 ]
173 173
174 174 webkit_prefixed_styles = [
175 175 # Webkit-prefixed styles
176 176 # https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Webkit_Extensions
177 177 "-webkit-animation", "-webkit-animation-delay", "-webkit-animation-direction",
178 178 "-webkit-animation-duration", "-webkit-animation-fill-mode",
179 179 "-webkit-animation-iteration-count", "-webkit-animation-name",
180 180 "-webkit-animation-play-state", "-webkit-animation-timing-function",
181 181 "-webkit-backface-visibility", "-webkit-border-image", "-webkit-column-count",
182 182 "-webkit-column-gap", "-webkit-column-width", "-webkit-column-rule",
183 183 "-webkit-column-rule-width", "-webkit-column-rule-style",
184 184 "-webkit-column-rule-color", "-webkit-columns", "-webkit-column-span",
185 185 "-webkit-font-feature-settings", "-webkit-font-kerning",
186 186 "-webkit-font-size-delta", "-webkit-font-variant-ligatures",
187 187 "-webkit-grid-column", "-webkit-grid-row", "-webkit-hyphens", "-webkit-mask",
188 188 "-webkit-mask-clip", "-webkit-mask-composite", "-webkit-mask-image",
189 189 "-webkit-mask-origin", "-webkit-mask-position", "-webkit-mask-repeat",
190 190 "-webkit-mask-size", "-webkit-perspective", "-webkit-perspective-origin",
191 191 "-webkit-region-fragment", "-webkit-shape-outside", "-webkit-text-emphasis",
192 192 "-webkit-text-emphasis-color", "-webkit-text-emphasis-position",
193 193 "-webkit-text-emphasis-style", "-webkit-transform", "-webkit-transform-origin",
194 194 "-webkit-transform-style", "-webkit-transition", "-webkit-transition-delay",
195 195 "-webkit-transition-duration", "-webkit-transition-property",
196 196 "-webkit-transition-timing-function", "-epub-word-break", "-epub-writing-mode",
197 197 # WebKit-prefixed properties with an unprefixed counterpart
198 198 "-webkit-background-clip", "-webkit-background-origin",
199 199 "-webkit-background-size", "-webkit-border-bottom-left-radius",
200 200 "-webkit-border-bottom-right-radius", "-webkit-border-radius",
201 201 "-webkit-border-top-left-radius", "-webkit-border-top-right-radius",
202 202 "-webkit-box-sizing", "-epub-caption-side", "-webkit-opacity",
203 203 "-epub-text-transform",
204 204 ]
205 205
206 206 mozilla_prefixed_styles = [
207 207 "-moz-column-count", "-moz-column-fill", "-moz-column-gap",
208 208 "-moz-column-width", "-moz-column-rule", "-moz-column-rule-width",
209 209 "-moz-column-rule-style", "-moz-column-rule-color",
210 210 "-moz-font-feature-settings", "-moz-font-language-override", "-moz-hyphens",
211 211 "-moz-text-align-last", "-moz-text-decoration-color",
212 212 "-moz-text-decoration-line", "-moz-text-decoration-style",
213 213 ]
214 214
215 215 all_prefixed_styles = [
216 216 # From http://peter.sh/experiments/vendor-prefixed-css-property-overview/
217 217 "-ms-accelerator", "-webkit-app-region", "-webkit-appearance",
218 218 "-webkit-appearance", "-moz-appearance", "-webkit-aspect-ratio",
219 219 "-webkit-backdrop-filter", "backface-visibility",
220 220 "-webkit-backface-visibility", "backface-visibility", "backface-visibility",
221 221 "-webkit-background-composite", "-webkit-background-composite", "-moz-binding",
222 222 "-ms-block-progression", "-webkit-border-after", "-webkit-border-after",
223 223 "-webkit-border-after-color", "-webkit-border-after-color",
224 224 "-webkit-border-after-style", "-webkit-border-after-style",
225 225 "-webkit-border-after-width", "-webkit-border-after-width",
226 226 "-webkit-border-before", "-webkit-border-before",
227 227 "-webkit-border-before-color", "-webkit-border-before-color",
228 228 "-webkit-border-before-style", "-webkit-border-before-style",
229 229 "-webkit-border-before-width", "-webkit-border-before-width",
230 230 "-moz-border-bottom-colors", "-webkit-border-end", "-webkit-border-end",
231 231 "-moz-border-end", "-webkit-border-end-color", "-webkit-border-end-color",
232 232 "-moz-border-end-color", "-webkit-border-end-style",
233 233 "-webkit-border-end-style", "-moz-border-end-style",
234 234 "-webkit-border-end-width", "-webkit-border-end-width",
235 235 "-moz-border-end-width", "-webkit-border-fit",
236 236 "-webkit-border-horizontal-spacing", "-webkit-border-horizontal-spacing",
237 237 "-moz-border-left-colors", "-moz-border-right-colors", "-webkit-border-start",
238 238 "-webkit-border-start", "-moz-border-start", "-webkit-border-start-color",
239 239 "-webkit-border-start-color", "-moz-border-start-color",
240 240 "-webkit-border-start-style", "-webkit-border-start-style",
241 241 "-moz-border-start-style", "-webkit-border-start-width",
242 242 "-webkit-border-start-width", "-moz-border-start-width",
243 243 "-moz-border-top-colors", "-webkit-border-vertical-spacing",
244 244 "-webkit-border-vertical-spacing", "-webkit-box-align", "-webkit-box-align",
245 245 "-moz-box-align", "-webkit-box-decoration-break",
246 246 "-webkit-box-decoration-break", "box-decoration-break",
247 247 "-webkit-box-direction", "-webkit-box-direction", "-moz-box-direction",
248 248 "-webkit-box-flex", "-webkit-box-flex", "-moz-box-flex",
249 249 "-webkit-box-flex-group", "-webkit-box-flex-group", "-webkit-box-lines",
250 250 "-webkit-box-lines", "-webkit-box-ordinal-group", "-webkit-box-ordinal-group",
251 251 "-moz-box-ordinal-group", "-webkit-box-orient", "-webkit-box-orient",
252 252 "-moz-box-orient", "-webkit-box-pack", "-webkit-box-pack", "-moz-box-pack",
253 253 "-webkit-box-reflect", "-webkit-box-reflect", "clip-path", "-webkit-clip-path",
254 254 "clip-path", "clip-path", "-webkit-color-correction", "-webkit-column-axis",
255 255 "-webkit-column-break-after", "-webkit-column-break-after",
256 256 "-webkit-column-break-before", "-webkit-column-break-before",
257 257 "-webkit-column-break-inside", "-webkit-column-break-inside",
258 258 "-webkit-column-count", "column-count", "-moz-column-count", "column-count",
259 259 "column-fill", "column-fill", "-moz-column-fill", "column-fill",
260 260 "-webkit-column-gap", "column-gap", "-moz-column-gap", "column-gap",
261 261 "-webkit-column-rule", "column-rule", "-moz-column-rule", "column-rule",
262 262 "-webkit-column-rule-color", "column-rule-color", "-moz-column-rule-color",
263 263 "column-rule-color", "-webkit-column-rule-style", "column-rule-style",
264 264 "-moz-column-rule-style", "column-rule-style", "-webkit-column-rule-width",
265 265 "column-rule-width", "-moz-column-rule-width", "column-rule-width",
266 266 "-webkit-column-span", "column-span", "column-span", "-webkit-column-width",
267 267 "column-width", "-moz-column-width", "column-width", "-webkit-columns",
268 268 "columns", "-moz-columns", "columns", "-ms-content-zoom-chaining",
269 269 "-ms-content-zoom-limit", "-ms-content-zoom-limit-max",
270 270 "-ms-content-zoom-limit-min", "-ms-content-zoom-snap",
271 271 "-ms-content-zoom-snap-points", "-ms-content-zoom-snap-type",
272 272 "-ms-content-zooming", "-moz-control-character-visibility",
273 273 "-webkit-cursor-visibility", "-webkit-dashboard-region", "filter",
274 274 "-webkit-filter", "filter", "filter", "-ms-flex-align", "-ms-flex-item-align",
275 275 "-ms-flex-line-pack", "-ms-flex-negative", "-ms-flex-order", "-ms-flex-pack",
276 276 "-ms-flex-positive", "-ms-flex-preferred-size", "-moz-float-edge",
277 277 "-webkit-flow-from", "-ms-flow-from", "-webkit-flow-into", "-ms-flow-into",
278 278 "-webkit-font-feature-settings", "-webkit-font-feature-settings",
279 279 "font-feature-settings", "font-feature-settings", "font-kerning",
280 280 "-webkit-font-kerning", "font-kerning", "-webkit-font-size-delta",
281 281 "-webkit-font-size-delta", "-webkit-font-smoothing", "-webkit-font-smoothing",
282 282 "font-variant-ligatures", "-webkit-font-variant-ligatures",
283 283 "font-variant-ligatures", "-moz-force-broken-image-icon", "grid",
284 284 "-webkit-grid", "grid", "grid-area", "-webkit-grid-area", "grid-area",
285 285 "grid-auto-columns", "-webkit-grid-auto-columns", "grid-auto-columns",
286 286 "grid-auto-flow", "-webkit-grid-auto-flow", "grid-auto-flow", "grid-auto-rows",
287 287 "-webkit-grid-auto-rows", "grid-auto-rows", "grid-column",
288 288 "-webkit-grid-column", "grid-column", "-ms-grid-column",
289 289 "-ms-grid-column-align", "grid-column-end", "-webkit-grid-column-end",
290 290 "grid-column-end", "-ms-grid-column-span", "grid-column-start",
291 291 "-webkit-grid-column-start", "grid-column-start", "-ms-grid-columns",
292 292 "grid-row", "-webkit-grid-row", "grid-row", "-ms-grid-row",
293 293 "-ms-grid-row-align", "grid-row-end", "-webkit-grid-row-end", "grid-row-end",
294 294 "-ms-grid-row-span", "grid-row-start", "-webkit-grid-row-start",
295 295 "grid-row-start", "-ms-grid-rows", "grid-template", "-webkit-grid-template",
296 296 "grid-template", "grid-template-areas", "-webkit-grid-template-areas",
297 297 "grid-template-areas", "grid-template-columns",
298 298 "-webkit-grid-template-columns", "grid-template-columns", "grid-template-rows",
299 299 "-webkit-grid-template-rows", "grid-template-rows", "-ms-high-contrast-adjust",
300 300 "-webkit-highlight", "-webkit-hyphenate-character",
301 301 "-webkit-hyphenate-character", "-webkit-hyphenate-limit-after",
302 302 "-webkit-hyphenate-limit-before", "-ms-hyphenate-limit-chars",
303 303 "-webkit-hyphenate-limit-lines", "-ms-hyphenate-limit-lines",
304 304 "-ms-hyphenate-limit-zone", "-webkit-hyphens", "-moz-hyphens", "-ms-hyphens",
305 305 "-moz-image-region", "-ms-ime-align", "-webkit-initial-letter",
306 306 "-ms-interpolation-mode", "justify-self", "-webkit-justify-self",
307 307 "-webkit-line-align", "-webkit-line-box-contain", "-webkit-line-box-contain",
308 308 "-webkit-line-break", "-webkit-line-break", "line-break", "-webkit-line-clamp",
309 309 "-webkit-line-clamp", "-webkit-line-grid", "-webkit-line-snap",
310 310 "-webkit-locale", "-webkit-locale", "-webkit-logical-height",
311 311 "-webkit-logical-height", "-webkit-logical-width", "-webkit-logical-width",
312 312 "-webkit-margin-after", "-webkit-margin-after",
313 313 "-webkit-margin-after-collapse", "-webkit-margin-after-collapse",
314 314 "-webkit-margin-before", "-webkit-margin-before",
315 315 "-webkit-margin-before-collapse", "-webkit-margin-before-collapse",
316 316 "-webkit-margin-bottom-collapse", "-webkit-margin-bottom-collapse",
317 317 "-webkit-margin-collapse", "-webkit-margin-collapse", "-webkit-margin-end",
318 318 "-webkit-margin-end", "-moz-margin-end", "-webkit-margin-start",
319 319 "-webkit-margin-start", "-moz-margin-start", "-webkit-margin-top-collapse",
320 320 "-webkit-margin-top-collapse", "-webkit-marquee", "-webkit-marquee-direction",
321 321 "-webkit-marquee-increment", "-webkit-marquee-repetition",
322 322 "-webkit-marquee-speed", "-webkit-marquee-style", "mask", "-webkit-mask",
323 323 "mask", "-webkit-mask-box-image", "-webkit-mask-box-image",
324 324 "-webkit-mask-box-image-outset", "-webkit-mask-box-image-outset",
325 325 "-webkit-mask-box-image-repeat", "-webkit-mask-box-image-repeat",
326 326 "-webkit-mask-box-image-slice", "-webkit-mask-box-image-slice",
327 327 "-webkit-mask-box-image-source", "-webkit-mask-box-image-source",
328 328 "-webkit-mask-box-image-width", "-webkit-mask-box-image-width",
329 329 "-webkit-mask-clip", "-webkit-mask-clip", "-webkit-mask-composite",
330 330 "-webkit-mask-composite", "-webkit-mask-image", "-webkit-mask-image",
331 331 "-webkit-mask-origin", "-webkit-mask-origin", "-webkit-mask-position",
332 332 "-webkit-mask-position", "-webkit-mask-position-x", "-webkit-mask-position-x",
333 333 "-webkit-mask-position-y", "-webkit-mask-position-y", "-webkit-mask-repeat",
334 334 "-webkit-mask-repeat", "-webkit-mask-repeat-x", "-webkit-mask-repeat-x",
335 335 "-webkit-mask-repeat-y", "-webkit-mask-repeat-y", "-webkit-mask-size",
336 336 "-webkit-mask-size", "mask-source-type", "-webkit-mask-source-type",
337 337 "-moz-math-display", "-moz-math-variant", "-webkit-max-logical-height",
338 338 "-webkit-max-logical-height", "-webkit-max-logical-width",
339 339 "-webkit-max-logical-width", "-webkit-min-logical-height",
340 340 "-webkit-min-logical-height", "-webkit-min-logical-width",
341 341 "-webkit-min-logical-width", "-webkit-nbsp-mode", "-moz-orient",
342 342 "-moz-osx-font-smoothing", "-moz-outline-radius",
343 343 "-moz-outline-radius-bottomleft", "-moz-outline-radius-bottomright",
344 344 "-moz-outline-radius-topleft", "-moz-outline-radius-topright",
345 345 "-webkit-overflow-scrolling", "-ms-overflow-style", "-webkit-padding-after",
346 346 "-webkit-padding-after", "-webkit-padding-before", "-webkit-padding-before",
347 347 "-webkit-padding-end", "-webkit-padding-end", "-moz-padding-end",
348 348 "-webkit-padding-start", "-webkit-padding-start", "-moz-padding-start",
349 349 "perspective", "-webkit-perspective", "perspective", "perspective",
350 350 "perspective-origin", "-webkit-perspective-origin", "perspective-origin",
351 351 "perspective-origin", "-webkit-perspective-origin-x",
352 352 "-webkit-perspective-origin-x", "perspective-origin-x",
353 353 "-webkit-perspective-origin-y", "-webkit-perspective-origin-y",
354 354 "perspective-origin-y", "-webkit-print-color-adjust",
355 355 "-webkit-print-color-adjust", "-webkit-region-break-after",
356 356 "-webkit-region-break-before", "-webkit-region-break-inside",
357 357 "-webkit-region-fragment", "-webkit-rtl-ordering", "-webkit-rtl-ordering",
358 358 "-webkit-ruby-position", "-webkit-ruby-position", "ruby-position",
359 359 "-moz-script-level", "-moz-script-min-size", "-moz-script-size-multiplier",
360 360 "-ms-scroll-chaining", "-ms-scroll-limit", "-ms-scroll-limit-x-max",
361 361 "-ms-scroll-limit-x-min", "-ms-scroll-limit-y-max", "-ms-scroll-limit-y-min",
362 362 "-ms-scroll-rails", "-webkit-scroll-snap-coordinate",
363 363 "-webkit-scroll-snap-destination", "-webkit-scroll-snap-points-x",
364 364 "-ms-scroll-snap-points-x", "-webkit-scroll-snap-points-y",
365 365 "-ms-scroll-snap-points-y", "-webkit-scroll-snap-type", "-ms-scroll-snap-type",
366 366 "-ms-scroll-snap-x", "-ms-scroll-snap-y", "-ms-scroll-translation",
367 367 "-ms-scrollbar-3dlight-color", "shape-image-threshold",
368 368 "-webkit-shape-image-threshold", "shape-margin", "-webkit-shape-margin",
369 369 "shape-outside", "-webkit-shape-outside", "-moz-stack-sizing", "tab-size",
370 370 "tab-size", "-moz-tab-size", "-webkit-tap-highlight-color",
371 371 "-webkit-tap-highlight-color", "text-align-last", "-webkit-text-align-last",
372 372 "-moz-text-align-last", "text-align-last", "-webkit-text-combine",
373 373 "-webkit-text-combine", "-ms-text-combine-horizontal", "text-decoration-color",
374 374 "-webkit-text-decoration-color", "text-decoration-color",
375 375 "text-decoration-color", "text-decoration-line",
376 376 "-webkit-text-decoration-line", "text-decoration-line",
377 377 "-webkit-text-decoration-skip", "text-decoration-style",
378 378 "-webkit-text-decoration-style", "text-decoration-style",
379 379 "-webkit-text-decorations-in-effect", "-webkit-text-decorations-in-effect",
380 380 "-webkit-text-emphasis", "text-emphasis", "-webkit-text-emphasis-color",
381 381 "text-emphasis-color", "-webkit-text-emphasis-position",
382 382 "text-emphasis-position", "-webkit-text-emphasis-style", "text-emphasis-style",
383 383 "-webkit-text-fill-color", "-webkit-text-fill-color", "text-justify",
384 384 "-webkit-text-justify", "text-justify", "-webkit-text-orientation",
385 385 "-webkit-text-orientation", "text-orientation", "-webkit-text-security",
386 386 "-webkit-text-security", "-webkit-text-size-adjust", "-moz-text-size-adjust",
387 387 "-ms-text-size-adjust", "-webkit-text-stroke", "-webkit-text-stroke",
388 388 "-webkit-text-stroke-color", "-webkit-text-stroke-color",
389 389 "-webkit-text-stroke-width", "-webkit-text-stroke-width",
390 390 "text-underline-position", "-webkit-text-underline-position",
391 391 "text-underline-position", "-webkit-touch-callout", "-ms-touch-select",
392 392 "transform", "-webkit-transform", "transform", "transform", "transform-origin",
393 393 "-webkit-transform-origin", "transform-origin", "transform-origin",
394 394 "-webkit-transform-origin-x", "-webkit-transform-origin-x",
395 395 "transform-origin-x", "-webkit-transform-origin-y",
396 396 "-webkit-transform-origin-y", "transform-origin-y",
397 397 "-webkit-transform-origin-z", "-webkit-transform-origin-z",
398 398 "transform-origin-z", "transform-style", "-webkit-transform-style",
399 399 "transform-style", "transform-style", "-webkit-user-drag", "-webkit-user-drag",
400 400 "-moz-user-focus", "-moz-user-input", "-webkit-user-modify",
401 401 "-webkit-user-modify", "-moz-user-modify", "-webkit-user-select",
402 402 "-webkit-user-select", "-moz-user-select", "-ms-user-select",
403 403 "-moz-window-dragging", "-moz-window-shadow", "-ms-wrap-flow",
404 404 "-ms-wrap-margin", "-ms-wrap-through", "writing-mode", "-webkit-writing-mode",
405 405 "writing-mode", "writing-mode",
406 406 ]
407 407
408 408 all_styles = standard_styles + all_prefixed_styles No newline at end of file
@@ -1,110 +1,178 b''
1 1 # -*- coding: utf-8 -*-
2 2
3 3 # Copyright (C) 2010-2020 RhodeCode GmbH
4 4 #
5 5 # This program is free software: you can redistribute it and/or modify
6 6 # it under the terms of the GNU Affero General Public License, version 3
7 7 # (only), as published by the Free Software Foundation.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU Affero General Public License
15 15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16 #
17 17 # This program is dual-licensed. If you wish to learn more about the
18 18 # RhodeCode Enterprise Edition, including its added features, Support services,
19 19 # and proprietary license terms, please see https://rhodecode.com/licenses/
20 20
21 import re
21 22 import markdown
23 import xml.etree.ElementTree as etree
22 24
23 25 from markdown.extensions import Extension
24 26 from markdown.extensions.fenced_code import FencedCodeExtension
25 27 from markdown.extensions.smart_strong import SmartEmphasisExtension
26 28 from markdown.extensions.tables import TableExtension
27 from markdown.extensions.nl2br import Nl2BrExtension
29 from markdown.inlinepatterns import Pattern
28 30
29 31 import gfm
30 32
31 33
34 class InlineProcessor(Pattern):
35 """
36 Base class that inline patterns subclass.
37 This is the newer style inline processor that uses a more
38 efficient and flexible search approach.
39 """
40
41 def __init__(self, pattern, md=None):
42 """
43 Create an instant of an inline pattern.
44 Keyword arguments:
45 * pattern: A regular expression that matches a pattern
46 """
47 self.pattern = pattern
48 self.compiled_re = re.compile(pattern, re.DOTALL | re.UNICODE)
49
50 # Api for Markdown to pass safe_mode into instance
51 self.safe_mode = False
52 self.md = md
53
54 def handleMatch(self, m, data):
55 """Return a ElementTree element from the given match and the
56 start and end index of the matched text.
57 If `start` and/or `end` are returned as `None`, it will be
58 assumed that the processor did not find a valid region of text.
59 Subclasses should override this method.
60 Keyword arguments:
61 * m: A re match object containing a match of the pattern.
62 * data: The buffer current under analysis
63 Returns:
64 * el: The ElementTree element, text or None.
65 * start: The start of the region that has been matched or None.
66 * end: The end of the region that has been matched or None.
67 """
68 pass # pragma: no cover
69
70
71 class SimpleTagInlineProcessor(InlineProcessor):
72 """
73 Return element of type `tag` with a text attribute of group(2)
74 of a Pattern.
75 """
76 def __init__(self, pattern, tag):
77 InlineProcessor.__init__(self, pattern)
78 self.tag = tag
79
80 def handleMatch(self, m, data): # pragma: no cover
81 el = etree.Element(self.tag)
82 el.text = m.group(2)
83 return el, m.start(0), m.end(0)
84
85
86 class SubstituteTagInlineProcessor(SimpleTagInlineProcessor):
87 """ Return an element of type `tag` with no children. """
88 def handleMatch(self, m, data):
89 return etree.Element(self.tag), m.start(0), m.end(0)
90
91
92 class Nl2BrExtension(Extension):
93 BR_RE = r'\n'
94
95 def extendMarkdown(self, md, md_globals):
96 br_tag = SubstituteTagInlineProcessor(self.BR_RE, 'br')
97 md.inlinePatterns.add('nl', br_tag, '_end')
98
99
32 100 class GithubFlavoredMarkdownExtension(Extension):
33 101 """
34 102 An extension that is as compatible as possible with GitHub-flavored
35 103 Markdown (GFM).
36 104
37 105 This extension aims to be compatible with the variant of GFM that GitHub
38 106 uses for Markdown-formatted gists and files (including READMEs). This
39 107 variant seems to have all the extensions described in the `GFM
40 108 documentation`_, except:
41 109
42 110 - Newlines in paragraphs are not transformed into ``br`` tags.
43 111 - Intra-GitHub links to commits, repositories, and issues are not
44 112 supported.
45 113
46 114 If you need support for features specific to GitHub comments and issues,
47 115 please use :class:`mdx_gfm.GithubFlavoredMarkdownExtension`.
48 116
49 117 .. _GFM documentation: https://guides.github.com/features/mastering-markdown/
50 118 """
51 119
52 120 def extendMarkdown(self, md, md_globals):
53 121 # Built-in extensions
122 Nl2BrExtension().extendMarkdown(md, md_globals)
54 123 FencedCodeExtension().extendMarkdown(md, md_globals)
55 124 SmartEmphasisExtension().extendMarkdown(md, md_globals)
56 125 TableExtension().extendMarkdown(md, md_globals)
57 126
58 127 # Custom extensions
59 128 gfm.AutolinkExtension().extendMarkdown(md, md_globals)
60 129 gfm.AutomailExtension().extendMarkdown(md, md_globals)
61 130 gfm.HiddenHiliteExtension([
62 131 ('guess_lang', 'False'),
63 132 ('css_class', 'highlight')
64 133 ]).extendMarkdown(md, md_globals)
65 134 gfm.SemiSaneListExtension().extendMarkdown(md, md_globals)
66 135 gfm.SpacedLinkExtension().extendMarkdown(md, md_globals)
67 136 gfm.StrikethroughExtension().extendMarkdown(md, md_globals)
68 137 gfm.TaskListExtension([
69 138 ('list_attrs', {'class': 'checkbox'})
70 139 ]).extendMarkdown(md, md_globals)
71 Nl2BrExtension().extendMarkdown(md, md_globals)
72 140
73 141
74 142 # Global Vars
75 143 URLIZE_RE = '(%s)' % '|'.join([
76 144 r'<(?:f|ht)tps?://[^>]*>',
77 145 r'\b(?:f|ht)tps?://[^)<>\s]+[^.,)<>\s]',
78 146 r'\bwww\.[^)<>\s]+[^.,)<>\s]',
79 147 r'[^(<\s]+\.(?:com|net|org)\b',
80 148 ])
81 149
82 150
83 151 class UrlizePattern(markdown.inlinepatterns.Pattern):
84 152 """ Return a link Element given an autolink (`http://example/com`). """
85 153 def handleMatch(self, m):
86 154 url = m.group(2)
87 155
88 156 if url.startswith('<'):
89 157 url = url[1:-1]
90 158
91 159 text = url
92 160
93 161 if not url.split('://')[0] in ('http','https','ftp'):
94 162 if '@' in url and not '/' in url:
95 163 url = 'mailto:' + url
96 164 else:
97 165 url = 'http://' + url
98 166
99 167 el = markdown.util.etree.Element("a")
100 168 el.set('href', url)
101 169 el.text = markdown.util.AtomicString(text)
102 170 return el
103 171
104 172
105 173 class UrlizeExtension(markdown.Extension):
106 174 """ Urlize Extension for Python-Markdown. """
107 175
108 176 def extendMarkdown(self, md, md_globals):
109 177 """ Replace autolink with UrlizePattern """
110 178 md.inlinePatterns['autolink'] = UrlizePattern(URLIZE_RE, md)
@@ -1,400 +1,406 b''
1 1
2 2 /** MODAL **/
3 3 .modal-open {
4 4 overflow:hidden;
5 5 }
6 6 body.modal-open, .modal-open .navbar-fixed-top, .modal-open .navbar-fixed-bottom {
7 7 margin-right:15px;
8 8 }
9 9 .modal {
10 10 position:fixed;
11 11 top:0;
12 12 right:0;
13 13 bottom:0;
14 14 left:0;
15 15 z-index:1040;
16 16 display:none;
17 17 overflow-y:scroll;
18 18 &.fade .modal-dialog {
19 19 -webkit-transform:translate(0,-25%);
20 20 -ms-transform:translate(0,-25%);
21 21 transform:translate(0,-25%);
22 22 -webkit-transition:-webkit-transform 0.3s ease-out;
23 23 -moz-transition:-moz-transform 0.3s ease-out;
24 24 -o-transition:-o-transform 0.3s ease-out;
25 25 transition:transform 0.3s ease-out;
26 26 }
27 27 &.in .modal-dialog {
28 28 -webkit-transform:translate(0,0);
29 29 -ms-transform:translate(0,0);
30 30 transform:translate(0,0);
31 31 }
32 32 }
33 33 .modal-dialog {
34 34 z-index:1050;
35 35 width:auto;
36 36 padding:10px;
37 37 margin-right:auto;
38 38 margin-left:auto;
39 39 }
40 40 .modal-content {
41 41 position:relative;
42 42 background-color:#ffffff;
43 43 border: @border-thickness solid rgba(0,0,0,0.2);
44 44 .border-radius(@border-radius);
45 45 outline:none;
46 46 -webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5);
47 47 box-shadow:0 3px 9px rgba(0,0,0,0.5);
48 48 background-clip:padding-box;
49 49 }
50 50 .modal-backdrop {
51 51 position:fixed;
52 52 top:0;
53 53 right:0;
54 54 bottom:0;
55 55 left:0;
56 56 z-index:1030;
57 57 background-color:#000000;
58 58
59 59 &.modal-backdrop.fade {
60 60 opacity:0;
61 61 filter:alpha(opacity=0);
62 62 }
63 63 &.in {
64 64 opacity:0.5;
65 65 filter:alpha(opacity=50);
66 66 }
67 67 }
68 68 .modal-header {
69 69 min-height:16.428571429px;
70 70 padding:15px;
71 71 border-bottom: @border-thickness solid @grey6;
72 72 .close {
73 73 margin-top:-2px;
74 74 }
75 75 }
76 76 .modal-title {
77 77 margin:0;
78 78 line-height:1.428571429;
79 79 }
80 80 .modal-body {
81 81 position:relative;
82 82 padding:20px;
83 83 }
84 84 .modal-footer {
85 85 padding:19px 20px 20px;
86 86 margin-top:15px;
87 87 text-align:right;
88 88 border-top:1px solid #e5e5e5;
89 89 .btn + .btn {
90 90 margin-bottom:0;
91 91 margin-left:5px;
92 92 }
93 93 .btn-group .btn + .btn {
94 94 margin-left:-1px;
95 95 }
96 96 .btn-block + .btn-block {
97 97 margin-left:0;
98 98 }
99 99 &:before {
100 100 display:table;
101 101 content:" ";
102 102 }
103 103 &:after {
104 104 display:table;
105 105 content:" ";
106 106 clear:both;
107 107 }
108 108 }
109 109
110 110 /** MARKDOWN styling **/
111 111 div.markdown-block {
112 112 clear: both;
113 113 overflow: hidden;
114 114 margin: 0;
115 115 padding: 3px 15px 3px;
116 116 }
117 117
118 118 div.markdown-block h1,
119 119 div.markdown-block h2,
120 120 div.markdown-block h3,
121 121 div.markdown-block h4,
122 122 div.markdown-block h5,
123 123 div.markdown-block h6 {
124 124 border-bottom: none !important;
125 125 padding: 0 !important;
126 126 overflow: visible !important;
127 127 }
128 128
129 129 div.markdown-block h1,
130 130 div.markdown-block h2 {
131 131 border-bottom: 1px #e6e5e5 solid !important;
132 132 }
133 133
134 134 div.markdown-block h1 {
135 135 font-size: 32px;
136 136 margin: 15px 0 15px 0 !important;
137 137 }
138 138
139 139 div.markdown-block h2 {
140 140 font-size: 24px !important;
141 141 margin: 34px 0 10px 0 !important;
142 142 }
143 143
144 144 div.markdown-block h3 {
145 145 font-size: 18px !important;
146 146 margin: 30px 0 8px 0 !important;
147 147 padding-bottom: 2px !important;
148 148 }
149 149
150 150 div.markdown-block h4 {
151 151 font-size: 13px !important;
152 152 margin: 18px 0 3px 0 !important;
153 153 }
154 154
155 155 div.markdown-block h5 {
156 156 font-size: 12px !important;
157 157 margin: 15px 0 3px 0 !important;
158 158 }
159 159
160 160 div.markdown-block h6 {
161 161 font-size: 12px;
162 162 color: #777777;
163 163 margin: 15px 0 3px 0 !important;
164 164 }
165 165
166 166 div.markdown-block hr {
167 167 border: 0;
168 168 color: #e6e5e5;
169 169 background-color: #e6e5e5;
170 170 height: 3px;
171 171 margin-bottom: 13px;
172 172 }
173 173
174 174 div.markdown-block blockquote {
175 175 color: #424242 !important;
176 176 padding: 8px 21px;
177 177 margin: 12px 0;
178 178 border-left: 4px solid @grey6;
179 179 }
180 180
181 181 div.markdown-block blockquote p {
182 182 color: #424242 !important;
183 183 padding: 0 !important;
184 184 margin: 0 !important;
185 185 line-height: 1.5;
186 186 }
187 187
188 188
189 189 div.markdown-block ol,
190 190 div.markdown-block ul,
191 191 div.markdown-block p,
192 192 div.markdown-block blockquote,
193 193 div.markdown-block dl,
194 194 div.markdown-block li,
195 195 div.markdown-block table {
196 196 color: #424242 !important;
197 197 font-size: 13px !important;
198 198 font-family: @text-regular;
199 199 font-weight: normal !important;
200 200 overflow: visible !important;
201 201 }
202 202
203 203 div.markdown-block pre {
204 204 margin: 3px 0px 13px 0px !important;
205 205 padding: .5em;
206 206 color: #424242 !important;
207 207 font-size: 13px !important;
208 208 overflow: visible !important;
209 209 line-height: 140% !important;
210 210 background-color: @grey7;
211 211 }
212 212
213 213 div.markdown-block img {
214 214 border-style: none;
215 215 background-color: #fff;
216 padding-right: 20px;
217 216 max-width: 100%;
218 217 }
219 218
220 219
221 220 div.markdown-block strong {
222 221 font-weight: 600;
223 222 margin: 0;
224 223 }
225 224
226 225 div.markdown-block ul.checkbox,
227 226 div.markdown-block ol.checkbox {
228 227 padding-left: 20px !important;
229 228 margin-top: 0px !important;
230 229 margin-bottom: 18px !important;
231 230 }
232 231
233 232 div.markdown-block ul,
234 233 div.markdown-block ol {
235 234 padding-left: 30px !important;
236 235 margin-top: 0px !important;
237 236 margin-bottom: 18px !important;
238 237 }
239 238
240 239 div.markdown-block ul.checkbox li,
241 240 div.markdown-block ol.checkbox li {
242 241 list-style: none !important;
243 242 margin: 0px !important;
244 243 padding: 0 !important;
245 244 }
246 245
247 246 div.markdown-block ul li,
248 247 div.markdown-block ol li {
249 248 list-style: disc !important;
250 249 margin: 0px !important;
251 250 padding: 0 !important;
252 251 }
253 252
254 253 div.markdown-block ol li {
255 254 list-style: decimal !important;
256 255 }
257 256
258 257
259 258 div.markdown-block #message {
260 259 .border-radius(@border-radius);
261 260 border: @border-thickness solid @grey5;
262 261 display: block;
263 262 width: 100%;
264 263 height: 60px;
265 264 margin: 6px 0px;
266 265 }
267 266
268 267 div.markdown-block button,
269 268 div.markdown-block #ws {
270 269 font-size: @basefontsize;
271 270 padding: 4px 6px;
272 271 .border-radius(@border-radius);
273 272 border: @border-thickness solid @grey5;
274 273 background-color: @grey6;
275 274 }
276 275
276 div.markdown-block p {
277 margin-top: 0;
278 margin-bottom: 16px;
279 padding: 0;
280 line-height: unset;
281 }
282
277 283 div.markdown-block code,
278 284 div.markdown-block pre,
279 285 div.markdown-block #ws,
280 286 div.markdown-block #message {
281 287 font-family: @text-monospace;
282 288 font-size: 11px;
283 289 .border-radius(@border-radius);
284 290 background-color: white;
285 291 color: @grey3;
286 292 }
287 293
288 294
289 295 div.markdown-block code {
290 296 border: @border-thickness solid @grey6;
291 297 margin: 0 2px;
292 298 padding: 0 5px;
293 299 }
294 300
295 301 div.markdown-block pre {
296 302 border: @border-thickness solid @grey5;
297 303 overflow: auto;
298 304 padding: .5em;
299 305 background-color: @grey7;
300 306 }
301 307
302 308 div.markdown-block pre > code {
303 309 border: 0;
304 310 margin: 0;
305 311 padding: 0;
306 312 }
307 313
308 314 /** RST STYLE **/
309 315 div.rst-block {
310 316 clear: both;
311 317 overflow: hidden;
312 318 margin: 0;
313 319 padding: 3px 15px 3px;
314 320 }
315 321
316 322 div.rst-block h2 {
317 323 font-weight: normal;
318 324 }
319 325
320 326 div.rst-block h1,
321 327 div.rst-block h2,
322 328 div.rst-block h3,
323 329 div.rst-block h4,
324 330 div.rst-block h5,
325 331 div.rst-block h6 {
326 332 border-bottom: 0 !important;
327 333 margin: 0 !important;
328 334 padding: 0 !important;
329 335 line-height: 1.5em !important;
330 336 }
331 337
332 338
333 339 div.rst-block h1:first-child {
334 340 padding-top: .25em !important;
335 341 }
336 342
337 343 div.rst-block h2,
338 344 div.rst-block h3 {
339 345 margin: 1em 0 !important;
340 346 }
341 347
342 348 div.rst-block h1,
343 349 div.rst-block h2 {
344 350 border-bottom: 1px #e6e5e5 solid !important;
345 351 }
346 352
347 353 div.rst-block h2 {
348 354 margin-top: 1.5em !important;
349 355 padding-top: .5em !important;
350 356 }
351 357
352 358 div.rst-block p {
353 359 color: black !important;
354 360 margin: 1em 0 !important;
355 361 line-height: 1.5em !important;
356 362 }
357 363
358 364 div.rst-block ul {
359 365 list-style: disc !important;
360 366 margin: 1em 0 1em 2em !important;
361 367 clear: both;
362 368 }
363 369
364 370 div.rst-block ol {
365 371 list-style: decimal;
366 372 margin: 1em 0 1em 2em !important;
367 373 }
368 374
369 375 div.rst-block pre,
370 376 div.rst-block code {
371 377 font: 12px "Bitstream Vera Sans Mono","Courier",monospace;
372 378 }
373 379
374 380 div.rst-block code {
375 381 font-size: 12px !important;
376 382 background-color: ghostWhite !important;
377 383 color: #444 !important;
378 384 padding: 0 .2em !important;
379 385 border: 1px solid #dedede !important;
380 386 }
381 387
382 388 div.rst-block pre code {
383 389 padding: 0 !important;
384 390 font-size: 12px !important;
385 391 background-color: #eee !important;
386 392 border: none !important;
387 393 }
388 394
389 395 div.rst-block pre {
390 396 margin: 1em 0;
391 397 padding: @padding;
392 398 border: 1px solid @grey6;
393 399 .border-radius(@border-radius);
394 400 overflow: auto;
395 401 font-size: 12px;
396 402 color: #444;
397 403 background-color: @grey7;
398 404 }
399 405
400 406
@@ -1,279 +1,284 b''
1 1 /** README styling **/
2 2
3 3 .readme-title {
4 4 border: 1px solid @grey6;
5 5 padding: 10px 5px;
6 6 margin-top: 30px;
7 7 margin-bottom: -1px;
8 8
9 9 a {
10 10 font-weight: 600;
11 11 font-size: 13px
12 12 }
13 13 }
14 14
15 15 div.readme_box {
16 16 clear: both;
17 17 overflow: hidden;
18 18 margin: 0;
19 19 padding: 3px 15px 3px;
20 20 }
21 21
22 22 div.readme_box h1,
23 23 div.readme_box h2,
24 24 div.readme_box h3,
25 25 div.readme_box h4,
26 26 div.readme_box h5,
27 27 div.readme_box h6 {
28 28 border-bottom: none !important;
29 29 padding: 0 !important;
30 30 overflow: visible !important;
31 31 }
32 32
33 33 div.readme_box h1,
34 34 div.readme_box h2 {
35 35 border-bottom: 1px #e6e5e5 solid !important;
36 36 }
37 37
38 38 div.readme_box h1 {
39 39 font-size: 32px;
40 40 margin: 15px 0 15px 0 !important;
41 41 }
42 42
43 43 div.readme_box h2 {
44 44 font-size: 24px !important;
45 45 margin: 34px 0 10px 0 !important;
46 46 }
47 47
48 48 div.readme_box h3 {
49 49 font-size: 18px !important;
50 50 margin: 30px 0 8px 0 !important;
51 51 padding-bottom: 2px !important;
52 52 }
53 53
54 54 div.readme_box h4 {
55 55 font-size: 13px !important;
56 56 margin: 18px 0 3px 0 !important;
57 57 }
58 58
59 59 div.readme_box h5 {
60 60 font-size: 12px !important;
61 61 margin: 15px 0 3px 0 !important;
62 62 }
63 63
64 64 div.readme_box h6 {
65 65 font-size: 12px;
66 66 color: #777777;
67 67 margin: 15px 0 3px 0 !important;
68 68 }
69 69
70 70 div.readme_box hr {
71 71 border: 0;
72 72 color: #e6e5e5;
73 73 background-color: #e6e5e5;
74 74 height: 3px;
75 75 margin-bottom: 13px;
76 76 }
77 77
78 78 div.readme_box blockquote {
79 79 color: #424242 !important;
80 80 padding: 8px 21px;
81 81 margin: 12px 0;
82 82 border-left: 4px solid @grey6;
83 83 }
84 84
85 85 div.readme_box blockquote p {
86 86 color: #424242 !important;
87 87 padding: 0 !important;
88 88 margin: 0 !important;
89 89 line-height: 1.5;
90 90 }
91 91
92 92 div.readme_box ol,
93 93 div.readme_box ul,
94 94 div.readme_box p,
95 95 div.readme_box blockquote,
96 96 div.readme_box dl,
97 97 div.readme_box li,
98 98 div.readme_box table {
99 99 color: #424242 !important;
100 100 font-size: 13px !important;
101 101 font-family: @text-regular;
102 102 font-weight: normal !important;
103 103 overflow: visible !important;
104 104 }
105 105
106 106 div.readme_box pre {
107 107 margin: 3px 0px 13px 0px !important;
108 108 padding: .5em;
109 109 color: #424242 !important;
110 110 font-size: 13px !important;
111 111 overflow: visible !important;
112 112 line-height: 140% !important;
113 113 }
114 114
115 115 div.readme_box img {
116 116 border-style: none;
117 117 background-color: #fff;
118 padding-right: 20px;
119 118 max-width: 100%;
120 119 }
121 120
122
123 121 div.readme_box strong {
124 122 font-weight: 600;
125 123 margin: 0;
126 124 }
127 125
128 126 div.readme_box ul,
129 127 div.readme_box ol {
130 128 padding-left: 30px !important;
131 129 margin-top: 0px !important;
132 130 margin-bottom: 18px !important;
133 131 }
134 132
135 133 div.readme_box ul li,
136 134 div.readme_box ol li {
137 135 list-style: disc !important;
138 136 margin: 6px !important;
139 137 padding: 0 !important;
140 138 }
141 139
142 140 div.readme_box ol li {
143 141 list-style: decimal !important;
144 142 }
145 143
146 144 /*
147 145 div.readme_box a,
148 146 div.readme_box a:visited {
149 147 color: #4183C4 !important;
150 148 background-color: inherit;
151 149 text-decoration: none;
152 150 }
153 151 */
154 152
153 div.readme_box p {
154 margin-top: 0;
155 margin-bottom: 16px;
156 padding: 0;
157 line-height: unset;
158 }
159
155 160
156 161 div.readme_box button {
157 162 font-size: @basefontsize;
158 163 padding: 4px 6px;
159 164 .border-radius(@border-radius);
160 165 border: @border-thickness solid @grey5;
161 166 background-color: @grey6;
162 167 }
163 168
164 169 div.readme_box code,
165 170 div.readme_box pre {
166 171 font-family: @text-monospace;
167 172 font-size: 11px;
168 173 .border-radius(@border-radius);
169 174 background-color: white;
170 175 color: @grey3;
171 176 }
172 177
173 178
174 179 div.readme_box code {
175 180 border: @border-thickness solid @grey6;
176 181 margin: 0 2px;
177 182 padding: 0 5px;
178 183 }
179 184
180 185 div.readme_box pre {
181 186 border: @border-thickness solid #CBDBEB;
182 187 overflow: auto;
183 188 padding: .5em;
184 189 background-color: #FCFEFF;
185 190 }
186 191
187 192 div.readme_box pre > code {
188 193 border: 0;
189 194 margin: 0;
190 195 padding: 0;
191 196 }
192 197
193 198 /** RST STYLE **/
194 199 div.rst-block {
195 200 clear: both;
196 201 overflow: hidden;
197 202 margin: 0;
198 203 padding: 3px 15px 3px;
199 204 }
200 205
201 206 div.rst-block h2 {
202 207 font-weight: normal;
203 208 }
204 209
205 210 div.rst-block h1,
206 211 div.rst-block h2,
207 212 div.rst-block h3,
208 213 div.rst-block h4,
209 214 div.rst-block h5,
210 215 div.rst-block h6 {
211 216 border-bottom: 0 !important;
212 217 margin: 0 !important;
213 218 padding: 0 !important;
214 219 line-height: 1.5em !important;
215 220 }
216 221
217 222
218 223 div.rst-block h1:first-child {
219 224 padding-top: .25em !important;
220 225 }
221 226
222 227 div.rst-block h2,
223 228 div.rst-block h3 {
224 229 margin: 1em 0 !important;
225 230 }
226 231
227 232 div.rst-block h2 {
228 233 margin-top: 1.5em !important;
229 234 border-top: 4px solid #e0e0e0 !important;
230 235 padding-top: .5em !important;
231 236 }
232 237
233 238 div.rst-block p {
234 239 color: black !important;
235 240 margin: 1em 0 !important;
236 241 line-height: 1.5em !important;
237 242 }
238 243
239 244 div.rst-block ul {
240 245 list-style: disc !important;
241 246 margin: 1em 0 1em 2em !important;
242 247 clear: both;
243 248 }
244 249
245 250 div.rst-block ol {
246 251 list-style: decimal;
247 252 margin: 1em 0 1em 2em !important;
248 253 }
249 254
250 255 div.rst-block pre,
251 256 div.rst-block code {
252 257 font: 12px "Bitstream Vera Sans Mono","Courier",monospace;
253 258 }
254 259
255 260 div.rst-block code {
256 261 font-size: 12px !important;
257 262 background-color: ghostWhite !important;
258 263 color: #444 !important;
259 264 padding: 0 .2em !important;
260 265 border: 1px solid #dedede !important;
261 266 }
262 267
263 268 div.rst-block pre code {
264 269 padding: 0 !important;
265 270 font-size: 12px !important;
266 271 background-color: #eee !important;
267 272 border: none !important;
268 273 }
269 274
270 275 div.rst-block pre {
271 276 margin: 1em 0;
272 277 padding: @padding;
273 278 border: 1px solid @grey6;
274 279 .border-radius(@border-radius);
275 280 overflow: auto;
276 281 font-size: 12px;
277 282 color: #444;
278 283 background-color: @grey7;
279 284 } No newline at end of file
@@ -1,639 +1,645 b''
1 1 ## -*- coding: utf-8 -*-
2 2
3 3 ## helpers
4 4 <%def name="tag_button(text, tag_type=None)">
5 5 <%
6 6 color_scheme = {
7 7 'default': 'border:1px solid #979797;color:#666666;background-color:#f9f9f9',
8 8 'approved': 'border:1px solid #0ac878;color:#0ac878;background-color:#f9f9f9',
9 9 'rejected': 'border:1px solid #e85e4d;color:#e85e4d;background-color:#f9f9f9',
10 10 'under_review': 'border:1px solid #ffc854;color:#ffc854;background-color:#f9f9f9',
11 11 }
12 12
13 13 css_style = ';'.join([
14 14 'display:inline',
15 15 'border-radius:2px',
16 16 'font-size:12px',
17 17 'padding:.2em',
18 18 ])
19 19
20 20 %>
21 21 <pre style="${css_style}; ${color_scheme.get(tag_type, color_scheme['default'])}">${text}</pre>
22 22 </%def>
23 23
24 24 <%def name="status_text(text, tag_type=None)">
25 25 <%
26 26 color_scheme = {
27 27 'default': 'color:#666666',
28 28 'approved': 'color:#0ac878',
29 29 'rejected': 'color:#e85e4d',
30 30 'under_review': 'color:#ffc854',
31 31 }
32 32 %>
33 33 <span style="font-weight:bold;font-size:12px;padding:.2em;${color_scheme.get(tag_type, color_scheme['default'])}">${text}</span>
34 34 </%def>
35 35
36 36 <%def name="gravatar_img(email, size=16)">
37 37 <%
38 38 css_style = ';'.join([
39 39 'padding: 0',
40 40 'margin: -4px 0',
41 41 'border-radius: 50%',
42 42 'box-sizing: content-box',
43 43 'display: inline',
44 44 'line-height: 1em',
45 45 'min-width: 16px',
46 46 'min-height: 16px',
47 47 ])
48 48 %>
49 49
50 50 <img alt="gravatar" style="${css_style}" src="${h.gravatar_url(email, size)}" height="${size}" width="${size}">
51 51 </%def>
52 52
53 53 <%def name="link_css()">\
54 54 <%
55 55 css_style = ';'.join([
56 56 'color:#427cc9',
57 57 'text-decoration:none',
58 58 'cursor:pointer'
59 59 ])
60 60 %>\
61 61 ${css_style}\
62 62 </%def>
63 63
64 64 ## Constants
65 65 <%
66 66 text_regular = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Helvetica, sans-serif"
67 67 text_monospace = "'Menlo', 'Liberation Mono', 'Consolas', 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace"
68 68
69 69 %>
70 70
71 71 <%def name="plaintext_footer()" filter="trim">
72 72 ${_('This is a notification from RhodeCode.')} ${instance_url}
73 73 </%def>
74 74
75 75 <%def name="body_plaintext()" filter="n,trim">
76 76 ## this example is not called itself but overridden in each template
77 77 ## the plaintext_footer should be at the bottom of both html and text emails
78 78 ${self.plaintext_footer()}
79 79 </%def>
80 80
81 81 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
82 82 <html xmlns="http://www.w3.org/1999/xhtml">
83 83 <head>
84 84 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
85 85 <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
86 86 <title>${self.subject()}</title>
87 87 <style type="text/css">
88 88 /* Based on The MailChimp Reset INLINE: Yes. */
89 89 #outlook a {
90 90 padding: 0;
91 91 }
92 92
93 93 /* Force Outlook to provide a "view in browser" menu link. */
94 94 body {
95 95 width: 100% !important;
96 96 -webkit-text-size-adjust: 100%;
97 97 -ms-text-size-adjust: 100%;
98 98 margin: 0;
99 99 padding: 0;
100 100 font-family: ${text_regular|n};
101 101 color: #000000;
102 102 }
103 103
104 104 /* Prevent Webkit and Windows Mobile platforms from changing default font sizes.*/
105 105 .ExternalClass {
106 106 width: 100%;
107 107 }
108 108
109 109 /* Force Hotmail to display emails at full width */
110 110 .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {
111 111 line-height: 100%;
112 112 }
113 113
114 114 /* Forces Hotmail to display normal line spacing. More on that: http://www.emailonacid.com/forum/viewthread/43/ */
115 115 #backgroundTable {
116 116 margin: 0;
117 117 padding: 0;
118 118 line-height: 100% !important;
119 119 }
120 120
121 121 /* End reset */
122 122
123 123 /* defaults for images*/
124 124 img {
125 125 outline: none;
126 126 text-decoration: none;
127 127 -ms-interpolation-mode: bicubic;
128 128 }
129 129
130 130 a img {
131 131 border: none;
132 132 }
133 133
134 134 .image_fix {
135 135 display: block;
136 136 }
137 137
138 138 body {
139 139 line-height: 1.2em;
140 140 }
141 141
142 142 p {
143 143 margin: 0 0 20px;
144 144 }
145 145
146 146 h1, h2, h3, h4, h5, h6 {
147 147 color: #323232 !important;
148 148 }
149 149
150 150 a {
151 151 color: #427cc9;
152 152 text-decoration: none;
153 153 outline: none;
154 154 cursor: pointer;
155 155 }
156 156
157 157 a:focus {
158 158 outline: none;
159 159 }
160 160
161 161 a:hover {
162 162 color: #305b91;
163 163 }
164 164
165 165 h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
166 166 color: #427cc9 !important;
167 167 text-decoration: none !important;
168 168 }
169 169
170 170 h1 a:active, h2 a:active, h3 a:active, h4 a:active, h5 a:active, h6 a:active {
171 171 color: #305b91 !important;
172 172 }
173 173
174 174 h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited {
175 175 color: #305b91 !important;
176 176 }
177 177
178 178 table {
179 179 font-size: 13px;
180 180 border-collapse: collapse;
181 181 mso-table-lspace: 0pt;
182 182 mso-table-rspace: 0pt;
183 183 }
184 184
185 185 table tr {
186 186 display: table-row;
187 187 vertical-align: inherit;
188 188 border-color: inherit;
189 189 border-spacing: 0 3px;
190 190 }
191 191
192 192 table td {
193 193 padding: .65em 1em .65em 0;
194 194 border-collapse: collapse;
195 195 vertical-align: top;
196 196 text-align: left;
197 197 }
198 198
199 199 input {
200 200 display: inline;
201 201 border-radius: 2px;
202 202 border: 1px solid #dbd9da;
203 203 padding: .5em;
204 204 }
205 205
206 206 input:focus {
207 207 outline: 1px solid #979797
208 208 }
209 209
210 210 code {
211 211 font-family: ${text_monospace|n};
212 212 white-space: pre-line !important;
213 213 color: #000000;
214 214 }
215 215
216 216 ul.changes-ul {
217 217 list-style: none;
218 218 list-style-type: none;
219 219 padding: 0;
220 220 margin: 10px 0;
221 221 }
222 222 ul.changes-ul li {
223 223 list-style: none;
224 224 list-style-type: none;
225 225 margin: 2px 0;
226 226 }
227 227
228 228 @media only screen and (-webkit-min-device-pixel-ratio: 2) {
229 229 /* Put your iPhone 4g styles in here */
230 230 }
231 231
232 232 /* Android targeting */
233 233 @media only screen and (-webkit-device-pixel-ratio:.75){
234 234 /* Put CSS for low density (ldpi) Android layouts in here */
235 235 }
236 236 @media only screen and (-webkit-device-pixel-ratio:1){
237 237 /* Put CSS for medium density (mdpi) Android layouts in here */
238 238 }
239 239 @media only screen and (-webkit-device-pixel-ratio:1.5){
240 240 /* Put CSS for high density (hdpi) Android layouts in here */
241 241 }
242 242 /* end Android targeting */
243 243
244 244 /** MARKDOWN styling **/
245 245 div.markdown-block {
246 246 clear: both;
247 247 overflow: hidden;
248 248 margin: 0;
249 249 padding: 3px 5px 3px
250 250 }
251 251
252 252 div.markdown-block h1,
253 253 div.markdown-block h2,
254 254 div.markdown-block h3,
255 255 div.markdown-block h4,
256 256 div.markdown-block h5,
257 257 div.markdown-block h6 {
258 258 border-bottom: none !important;
259 259 padding: 0 !important;
260 260 overflow: visible !important
261 261 }
262 262
263 263 div.markdown-block h1,
264 264 div.markdown-block h2 {
265 265 border-bottom: 1px #e6e5e5 solid !important
266 266 }
267 267
268 268 div.markdown-block h1 {
269 269 font-size: 32px;
270 270 margin: 15px 0 15px 0 !important;
271 271 padding-bottom: 5px !important
272 272 }
273 273
274 274 div.markdown-block h2 {
275 275 font-size: 24px !important;
276 276 margin: 34px 0 10px 0 !important;
277 277 padding-top: 15px !important;
278 278 padding-bottom: 8px !important
279 279 }
280 280
281 281 div.markdown-block h3 {
282 282 font-size: 18px !important;
283 283 margin: 30px 0 8px 0 !important;
284 284 padding-bottom: 2px !important
285 285 }
286 286
287 287 div.markdown-block h4 {
288 288 font-size: 13px !important;
289 289 margin: 18px 0 3px 0 !important
290 290 }
291 291
292 292 div.markdown-block h5 {
293 293 font-size: 12px !important;
294 294 margin: 15px 0 3px 0 !important
295 295 }
296 296
297 297 div.markdown-block h6 {
298 298 font-size: 12px;
299 299 color: #777777;
300 300 margin: 15px 0 3px 0 !important
301 301 }
302 302
303 303 div.markdown-block hr {
304 304 border: 0;
305 305 color: #e6e5e5;
306 306 background-color: #e6e5e5;
307 307 height: 3px;
308 308 margin-bottom: 13px
309 309 }
310 310
311 311 div.markdown-block ol,
312 312 div.markdown-block ul,
313 313 div.markdown-block p,
314 314 div.markdown-block blockquote,
315 315 div.markdown-block dl,
316 316 div.markdown-block li,
317 317 div.markdown-block table {
318 318 margin: 3px 0 13px 0 !important;
319 319 color: #424242 !important;
320 320 font-size: 13px !important;
321 321 font-family: ${text_regular|n};
322 322 font-weight: normal !important;
323 323 overflow: visible !important;
324 324 line-height: 140% !important
325 325 }
326 326
327 327 div.markdown-block pre {
328 328 margin: 3px 0 13px 0 !important;
329 329 padding: .5em;
330 330 color: #424242 !important;
331 331 font-size: 13px !important;
332 332 overflow: visible !important;
333 333 line-height: 140% !important;
334 334 background-color: #F5F5F5
335 335 }
336 336
337 337 div.markdown-block img {
338 338 border-style: none;
339 339 background-color: #fff;
340 padding-right: 20px;
341 340 max-width: 100%
342 341 }
343 342
344 343 div.markdown-block strong {
345 344 font-weight: 600;
346 345 margin: 0
347 346 }
348 347
349 348 div.markdown-block ul.checkbox, div.markdown-block ol.checkbox {
350 349 padding-left: 20px !important;
351 350 margin-top: 0 !important;
352 351 margin-bottom: 18px !important
353 352 }
354 353
355 354 div.markdown-block ul, div.markdown-block ol {
356 355 padding-left: 30px !important;
357 356 margin-top: 0 !important;
358 357 margin-bottom: 18px !important
359 358 }
360 359
361 360 div.markdown-block ul.checkbox li, div.markdown-block ol.checkbox li {
362 361 list-style: none !important;
363 362 margin: 0px !important;
364 363 padding: 0 !important
365 364 }
366 365
367 366 div.markdown-block ul li, div.markdown-block ol li {
368 367 list-style: disc !important;
369 368 margin: 0px !important;
370 369 padding: 0 !important
371 370 }
372 371
373 372 div.markdown-block ol li {
374 373 list-style: decimal !important
375 374 }
376 375
377 376 div.markdown-block #message {
378 377 -webkit-border-radius: 2px;
379 378 -moz-border-radius: 2px;
380 379 border-radius: 2px;
381 380 border: 1px solid #dbd9da;
382 381 display: block;
383 382 width: 100%;
384 383 height: 60px;
385 384 margin: 6px 0
386 385 }
387 386
388 387 div.markdown-block button, div.markdown-block #ws {
389 388 font-size: 13px;
390 389 padding: 4px 6px;
391 390 -webkit-border-radius: 2px;
392 391 -moz-border-radius: 2px;
393 392 border-radius: 2px;
394 393 border: 1px solid #dbd9da;
395 394 background-color: #eeeeee
396 395 }
397 396
397 div.markdown-block p {
398 margin-top: 0;
399 margin-bottom: 16px;
400 padding: 0;
401 line-height: unset;
402 }
403
398 404 div.markdown-block code,
399 405 div.markdown-block pre,
400 406 div.markdown-block #ws,
401 407 div.markdown-block #message {
402 408 font-family: ${text_monospace|n};
403 409 font-size: 11px;
404 410 -webkit-border-radius: 2px;
405 411 -moz-border-radius: 2px;
406 412 border-radius: 2px;
407 413 background-color: #FFFFFF;
408 414 color: #7E7F7F
409 415 }
410 416
411 417 div.markdown-block code {
412 418 border: 1px solid #7E7F7F;
413 419 margin: 0 2px;
414 420 padding: 0 5px
415 421 }
416 422
417 423 div.markdown-block pre {
418 424 border: 1px solid #7E7F7F;
419 425 overflow: auto;
420 426 padding: .5em;
421 427 background-color: #FFFFFF;
422 428 }
423 429
424 430 div.markdown-block pre > code {
425 431 border: 0;
426 432 margin: 0;
427 433 padding: 0
428 434 }
429 435
430 436 div.rst-block {
431 437 clear: both;
432 438 overflow: hidden;
433 439 margin: 0;
434 440 padding: 3px 5px 3px
435 441 }
436 442
437 443 div.rst-block h2 {
438 444 font-weight: normal
439 445 }
440 446
441 447 div.rst-block h1,
442 448 div.rst-block h2,
443 449 div.rst-block h3,
444 450 div.rst-block h4,
445 451 div.rst-block h5,
446 452 div.rst-block h6 {
447 453 border-bottom: 0 !important;
448 454 margin: 0 !important;
449 455 padding: 0 !important;
450 456 line-height: 1.5em !important
451 457 }
452 458
453 459 div.rst-block h1:first-child {
454 460 padding-top: .25em !important
455 461 }
456 462
457 463 div.rst-block h2, div.rst-block h3 {
458 464 margin: 1em 0 !important
459 465 }
460 466
461 467 div.rst-block h1, div.rst-block h2 {
462 468 border-bottom: 1px #e6e5e5 solid !important
463 469 }
464 470
465 471 div.rst-block h2 {
466 472 margin-top: 1.5em !important;
467 473 padding-top: .5em !important
468 474 }
469 475
470 476 div.rst-block p {
471 477 color: black !important;
472 478 margin: 1em 0 !important;
473 479 line-height: 1.5em !important
474 480 }
475 481
476 482 div.rst-block ul {
477 483 list-style: disc !important;
478 484 margin: 1em 0 1em 2em !important;
479 485 clear: both
480 486 }
481 487
482 488 div.rst-block ol {
483 489 list-style: decimal;
484 490 margin: 1em 0 1em 2em !important
485 491 }
486 492
487 493 div.rst-block pre, div.rst-block code {
488 494 font: 12px "Bitstream Vera Sans Mono", "Courier", monospace
489 495 }
490 496
491 497 div.rst-block code {
492 498 font-size: 12px !important;
493 499 background-color: ghostWhite !important;
494 500 color: #444 !important;
495 501 padding: 0 .2em !important;
496 502 border: 1px solid #7E7F7F !important
497 503 }
498 504
499 505 div.rst-block pre code {
500 506 padding: 0 !important;
501 507 font-size: 12px !important;
502 508 background-color: #eee !important;
503 509 border: none !important
504 510 }
505 511
506 512 div.rst-block pre {
507 513 margin: 1em 0;
508 514 padding: 15px;
509 515 border: 1px solid #7E7F7F;
510 516 -webkit-border-radius: 2px;
511 517 -moz-border-radius: 2px;
512 518 border-radius: 2px;
513 519 overflow: auto;
514 520 font-size: 12px;
515 521 color: #444;
516 522 background-color: #FFFFFF;
517 523 }
518 524
519 525 .clear-both {
520 526 clear:both;
521 527 }
522 528
523 529 /*elasticmatch is custom rhodecode tag*/
524 530 .codehilite .c-ElasticMatch {
525 531 background-color: #faffa6;
526 532 padding: 0.2em;
527 533 }
528 534
529 535 .codehilite .c-ElasticMatch { background-color: #faffa6; padding: 0.2em;}
530 536 .codehilite .hll { background-color: #ffffcc }
531 537 .codehilite .c { color: #408080; font-style: italic } /* Comment */
532 538 .codehilite .err { border: none } /* Error */
533 539 .codehilite .k { color: #008000; font-weight: bold } /* Keyword */
534 540 .codehilite .o { color: #666666 } /* Operator */
535 541 .codehilite .ch { color: #408080; font-style: italic } /* Comment.Hashbang */
536 542 .codehilite .cm { color: #408080; font-style: italic } /* Comment.Multiline */
537 543 .codehilite .cp { color: #BC7A00 } /* Comment.Preproc */
538 544 .codehilite .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
539 545 .codehilite .c1 { color: #408080; font-style: italic } /* Comment.Single */
540 546 .codehilite .cs { color: #408080; font-style: italic } /* Comment.Special */
541 547 .codehilite .gd { color: #A00000 } /* Generic.Deleted */
542 548 .codehilite .ge { font-style: italic } /* Generic.Emph */
543 549 .codehilite .gr { color: #FF0000 } /* Generic.Error */
544 550 .codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
545 551 .codehilite .gi { color: #00A000 } /* Generic.Inserted */
546 552 .codehilite .go { color: #888888 } /* Generic.Output */
547 553 .codehilite .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
548 554 .codehilite .gs { font-weight: bold } /* Generic.Strong */
549 555 .codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
550 556 .codehilite .gt { color: #0044DD } /* Generic.Traceback */
551 557 .codehilite .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
552 558 .codehilite .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
553 559 .codehilite .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
554 560 .codehilite .kp { color: #008000 } /* Keyword.Pseudo */
555 561 .codehilite .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
556 562 .codehilite .kt { color: #B00040 } /* Keyword.Type */
557 563 .codehilite .m { color: #666666 } /* Literal.Number */
558 564 .codehilite .s { color: #BA2121 } /* Literal.String */
559 565 .codehilite .na { color: #7D9029 } /* Name.Attribute */
560 566 .codehilite .nb { color: #008000 } /* Name.Builtin */
561 567 .codehilite .nc { color: #0000FF; font-weight: bold } /* Name.Class */
562 568 .codehilite .no { color: #880000 } /* Name.Constant */
563 569 .codehilite .nd { color: #AA22FF } /* Name.Decorator */
564 570 .codehilite .ni { color: #999999; font-weight: bold } /* Name.Entity */
565 571 .codehilite .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
566 572 .codehilite .nf { color: #0000FF } /* Name.Function */
567 573 .codehilite .nl { color: #A0A000 } /* Name.Label */
568 574 .codehilite .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
569 575 .codehilite .nt { color: #008000; font-weight: bold } /* Name.Tag */
570 576 .codehilite .nv { color: #19177C } /* Name.Variable */
571 577 .codehilite .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
572 578 .codehilite .w { color: #bbbbbb } /* Text.Whitespace */
573 579 .codehilite .mb { color: #666666 } /* Literal.Number.Bin */
574 580 .codehilite .mf { color: #666666 } /* Literal.Number.Float */
575 581 .codehilite .mh { color: #666666 } /* Literal.Number.Hex */
576 582 .codehilite .mi { color: #666666 } /* Literal.Number.Integer */
577 583 .codehilite .mo { color: #666666 } /* Literal.Number.Oct */
578 584 .codehilite .sa { color: #BA2121 } /* Literal.String.Affix */
579 585 .codehilite .sb { color: #BA2121 } /* Literal.String.Backtick */
580 586 .codehilite .sc { color: #BA2121 } /* Literal.String.Char */
581 587 .codehilite .dl { color: #BA2121 } /* Literal.String.Delimiter */
582 588 .codehilite .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
583 589 .codehilite .s2 { color: #BA2121 } /* Literal.String.Double */
584 590 .codehilite .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
585 591 .codehilite .sh { color: #BA2121 } /* Literal.String.Heredoc */
586 592 .codehilite .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
587 593 .codehilite .sx { color: #008000 } /* Literal.String.Other */
588 594 .codehilite .sr { color: #BB6688 } /* Literal.String.Regex */
589 595 .codehilite .s1 { color: #BA2121 } /* Literal.String.Single */
590 596 .codehilite .ss { color: #19177C } /* Literal.String.Symbol */
591 597 .codehilite .bp { color: #008000 } /* Name.Builtin.Pseudo */
592 598 .codehilite .fm { color: #0000FF } /* Name.Function.Magic */
593 599 .codehilite .vc { color: #19177C } /* Name.Variable.Class */
594 600 .codehilite .vg { color: #19177C } /* Name.Variable.Global */
595 601 .codehilite .vi { color: #19177C } /* Name.Variable.Instance */
596 602 .codehilite .vm { color: #19177C } /* Name.Variable.Magic */
597 603 .codehilite .il { color: #666666 } /* Literal.Number.Integer.Long */
598 604
599 605 </style>
600 606
601 607 </head>
602 608 <body>
603 609
604 610 <div>
605 611 <!-- Wrapper/Container Table: Use a wrapper table to control the width and the background color consistently of your email. Use this approach instead of setting attributes on the body tag. -->
606 612 <table cellpadding="0" cellspacing="0" border="0" id="backgroundTable" align="left" style="margin:1%;width:97%;padding:0;font-family:${text_regular|n};font-weight:100;border:1px solid #dbd9da">
607 613 <tr>
608 614 <td valign="top" style="padding:0;">
609 615 <table cellpadding="0" cellspacing="0" border="0" align="left" width="100%">
610 616 <tr>
611 617 <td style="width:100%;padding:10px 15px;background-color:#202020" valign="top">
612 618 <a style="color:#eeeeee;text-decoration:none;" href="${instance_url}">
613 619 ${_('RhodeCode')}
614 620 % if rhodecode_instance_name:
615 621 - ${rhodecode_instance_name}
616 622 % endif
617 623 </a>
618 624 </td>
619 625 </tr>
620 626 <tr style="background-color: #fff">
621 627 <td style="padding:15px;" valign="top">${self.body()}</td>
622 628 </tr>
623 629 </table>
624 630 </td>
625 631 </tr>
626 632 </table>
627 633 <!-- End of wrapper table -->
628 634 </div>
629 635
630 636 <div style="width:100%; clear: both; height: 1px">&nbsp;</div>
631 637
632 638 <div style="margin-left:1%;font-weight:100;font-size:11px;color:#666666;text-decoration:none;font-family:${text_monospace};">
633 639 ${_('This is a notification from RhodeCode.')}
634 640 <a style="font-weight:100;font-size:11px;color:#666666;text-decoration:none;font-family:${text_monospace};" href="${instance_url}">
635 641 ${instance_url}
636 642 </a>
637 643 </div>
638 644 </body>
639 645 </html>
General Comments 0
You need to be logged in to leave comments. Login now