Version Notes
https://github.com/SchumacherFM/Magento-Markdown
Tons of new features! See the github pages for the version history.
- Enable/Disable markdown rendering in email template. (by Paul Hachmang)
- Update marked.js
- Bug fix: HTML Preview code markup
- Bug fix: HTML preview button should be removed
- Bug fix: When there is no content, the Preview and Live Preview tabs show incorrect request
- Feature: Feedback and ideas after being used in the wild.
- Feature: Settings to enable/disable Preview, Live Preview and - - HTML Preview tabs (See Permissions -> Roles)
- Merged Pull Request More native-like styling
- Add new option for styling of the backend textarea field
- Major changes in the backend Github Issue #18
- Renaming of buttons
- EpicEditor disabled by default
- Better style for the textarea field with outer glow
- Besides image Drag'n'Drop added file upload and copy and paste for images
- Enhanced preview mode
Release Info
Developer | Cyrill Schumacher |
Extension | markdown |
Version | 2.1.0 |
Comparing to | |
See all releases |
Code changes from version 2.0.0 to 2.1.0
- app/code/community/SchumacherFM/Markdown/.DS_Store +0 -0
- app/code/community/SchumacherFM/Markdown/Block/Adminhtml/Form/Renderer/Fieldset/Element/Textarea.php +116 -0
- app/code/community/SchumacherFM/Markdown/Helper/Data.php +96 -5
- app/code/community/SchumacherFM/Markdown/Model/Markdown/Abstract.php +39 -3
- app/code/community/SchumacherFM/Markdown/Model/Markdown/Observer.php +2 -2
- app/code/community/SchumacherFM/Markdown/Model/Observer/Adminhtml/Block.php +185 -121
- app/code/community/SchumacherFM/Markdown/Model/Observer/Adminhtml/EpicEditor.php +0 -1
- app/code/community/SchumacherFM/Markdown/Model/Options/Styles/AbstractStyles.php +45 -0
- app/code/community/SchumacherFM/Markdown/Model/Options/Styles/HighLightStyles.php +19 -0
- app/code/community/SchumacherFM/Markdown/Model/Options/Styles/MarkdownStyles.php +19 -0
- app/code/community/SchumacherFM/Markdown/Model/Options/Styles/TextareaStyles.php +36 -0
- app/code/community/SchumacherFM/Markdown/controllers/Adminhtml/MarkdownController.php +4 -9
- app/code/community/SchumacherFM/Markdown/etc/adminhtml.xml +42 -21
- app/code/community/SchumacherFM/Markdown/etc/config.xml +24 -1
- app/code/community/SchumacherFM/Markdown/etc/system.xml +60 -2
- app/design/adminhtml/default/default/layout/markdown.xml +6 -0
- js/markdown/adminhtml/beautify-html.js +840 -0
- js/markdown/adminhtml/filereader.js +34 -48
- js/markdown/adminhtml/highlight.pack.js +1 -2
- js/markdown/adminhtml/markdown.js +545 -69
- js/markdown/adminhtml/marked.js +221 -135
- js/markdown/adminhtml/reMarked.js +52 -23
- package.xml +21 -5
- skin/adminhtml/default/default/markdown/highlight/styles/arta.css +160 -0
- skin/adminhtml/default/default/markdown/highlight/styles/ascetic.css +50 -0
- skin/adminhtml/default/default/markdown/highlight/styles/brown_paper.css +105 -0
- skin/adminhtml/default/default/markdown/highlight/styles/dark.css +105 -0
- skin/adminhtml/default/default/{epiceditor → markdown}/highlight/styles/default.css +21 -3
- skin/adminhtml/default/default/markdown/highlight/styles/docco.css +132 -0
- skin/adminhtml/default/default/markdown/highlight/styles/far.css +113 -0
- skin/adminhtml/default/default/markdown/highlight/styles/foundation.css +133 -0
- skin/adminhtml/default/default/{epiceditor → markdown}/highlight/styles/github.css +4 -1
- skin/adminhtml/default/default/{epiceditor → markdown}/highlight/styles/googlecode.css +4 -2
- skin/adminhtml/default/default/markdown/highlight/styles/idea.css +122 -0
- skin/adminhtml/default/default/markdown/highlight/styles/ir_black.css +105 -0
- skin/adminhtml/default/default/markdown/highlight/styles/magula.css +123 -0
- skin/adminhtml/default/default/markdown/highlight/styles/mono-blue.css +62 -0
- skin/adminhtml/default/default/markdown/highlight/styles/monokai.css +127 -0
- skin/adminhtml/default/default/markdown/highlight/styles/monokai_sublime.css +102 -0
- skin/adminhtml/default/default/markdown/highlight/styles/obsidian.css +154 -0
- skin/adminhtml/default/default/markdown/highlight/styles/pojoaque.css +105 -0
- skin/adminhtml/default/default/markdown/highlight/styles/railscasts.css +182 -0
- skin/adminhtml/default/default/markdown/highlight/styles/rainbow.css +115 -0
- skin/adminhtml/default/default/markdown/highlight/styles/school_book.css +113 -0
- skin/adminhtml/default/default/markdown/highlight/styles/solarized_dark.css +92 -0
- skin/adminhtml/default/default/markdown/highlight/styles/solarized_light.css +92 -0
- skin/adminhtml/default/default/markdown/highlight/styles/sunburst.css +160 -0
- skin/adminhtml/default/default/markdown/highlight/styles/tomorrow-night-blue.css +52 -0
- skin/adminhtml/default/default/markdown/highlight/styles/tomorrow-night-bright.css +51 -0
- skin/adminhtml/default/default/markdown/highlight/styles/tomorrow-night-eighties.css +51 -0
- skin/adminhtml/default/default/markdown/highlight/styles/tomorrow-night.css +52 -0
- skin/adminhtml/default/default/markdown/highlight/styles/tomorrow.css +49 -0
- skin/adminhtml/default/default/markdown/highlight/styles/vs.css +89 -0
- {js/markdown/adminhtml → skin/adminhtml/default/default/markdown}/highlight/styles/xcode.css +5 -2
- skin/adminhtml/default/default/markdown/highlight/styles/zenburn.css +117 -0
- skin/adminhtml/default/default/markdown/mdm.css +131 -3
- skin/adminhtml/default/default/markdown/styles/github.css +389 -0
- skin/adminhtml/default/default/markdown/styles/jasonm23-dark.css +258 -0
- skin/adminhtml/default/default/markdown/styles/jasonm23-foghorn.css +142 -0
- skin/adminhtml/default/default/markdown/styles/jasonm23-markdown.css +102 -0
- skin/adminhtml/default/default/markdown/styles/jasonm23-swiss.css +112 -0
- skin/adminhtml/default/default/markdown/styles/kevinburke.css +298 -0
- skin/adminhtml/default/default/markdown/styles/markedapp-byword.css +314 -0
- skin/adminhtml/default/default/markdown/styles/thomasf-solarizedcssdark.css +296 -0
- skin/adminhtml/default/default/markdown/styles/thomasf-solarizedcsslight.css +296 -0
Binary file
|
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @category SchumacherFM_Markdown
|
5 |
+
* @package Block
|
6 |
+
* @author Cyrill at Schumacher dot fm / @SchumacherFM
|
7 |
+
* @copyright Copyright (c)
|
8 |
+
*
|
9 |
+
* @method SchumacherFM_Markdown_Block_Adminhtml_Form_Renderer_Fieldset_Element_Textarea setElementId($id)
|
10 |
+
* @method string getElementId()
|
11 |
+
*/
|
12 |
+
class SchumacherFM_Markdown_Block_Adminhtml_Form_Renderer_Fieldset_Element_Textarea extends Mage_Adminhtml_Block_Template
|
13 |
+
{
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @var SchumacherFM_Markdown_Helper_Data
|
17 |
+
*/
|
18 |
+
protected $_helper = NULL;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Class constructor
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
public function _construct()
|
25 |
+
{
|
26 |
+
parent::_construct();
|
27 |
+
$this->setTemplate('markdown/edit/form/renderer/textarea.phtml');
|
28 |
+
$this->_helper = Mage::helper('markdown');
|
29 |
+
}
|
30 |
+
|
31 |
+
protected function _toHtml()
|
32 |
+
{
|
33 |
+
if ($this->isEditorAllowed()) {
|
34 |
+
return parent::_toHtml();
|
35 |
+
}
|
36 |
+
return '<!-- Markdown Editor Disabled. See System -> Permission -> Roles -->';
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* @param $translation
|
41 |
+
*
|
42 |
+
* @return string
|
43 |
+
*/
|
44 |
+
public function ___($translation)
|
45 |
+
{
|
46 |
+
return $this->_helper->__($translation);
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* @return string
|
51 |
+
*/
|
52 |
+
public function getFileReaderInputId()
|
53 |
+
{
|
54 |
+
return 'man_chooser_' . $this->getElementId();
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* @param $name
|
59 |
+
*
|
60 |
+
* @return string
|
61 |
+
*/
|
62 |
+
public function getIframe($name)
|
63 |
+
{
|
64 |
+
// $sandBox = $useSandBox === TRUE ? ' sandbox' : ''; // ="allow-same-origin"
|
65 |
+
return '<iframe class="iframePreview" name="' . $name . '" src="" style="' .
|
66 |
+
$this->_helper->getPreviewIframeCSS() . '"></iframe>';
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* @return string
|
71 |
+
*/
|
72 |
+
public function getDocsLinks()
|
73 |
+
{
|
74 |
+
$template = '<a target="_blank" href="%s">%s</a>';
|
75 |
+
$markdownLink = sprintf($template, $this->_helper->getCheatSheetUrl(), 'Markdown');
|
76 |
+
|
77 |
+
if (FALSE === $this->_helper->isMarkdownExtra()) {
|
78 |
+
return $this->__('Content is parsed with %s', $markdownLink);
|
79 |
+
} else {
|
80 |
+
$markdownExtraLink = sprintf($template, $this->_helper->getMdExtraDocUrl(), 'Markdown Extra');
|
81 |
+
return $this->__('Content is parsed with %s and %s', $markdownLink, $markdownExtraLink);
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* @return bool
|
87 |
+
*/
|
88 |
+
public function isEditorAllowed()
|
89 |
+
{
|
90 |
+
return (boolean)Mage::getSingleton('admin/session')->isAllowed('admin/markdown_editor');
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* @return bool
|
95 |
+
*/
|
96 |
+
public function isPreviewAllowed()
|
97 |
+
{
|
98 |
+
return $this->isEditorAllowed() && (boolean)Mage::getSingleton('admin/session')->isAllowed('admin/markdown_editor/preview');
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* @return bool
|
103 |
+
*/
|
104 |
+
public function isLivePreviewAllowed()
|
105 |
+
{
|
106 |
+
return $this->isEditorAllowed() && (boolean)Mage::getSingleton('admin/session')->isAllowed('admin/markdown_editor/livepreview');
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* @return bool
|
111 |
+
*/
|
112 |
+
public function isHtmlPreviewAllowed()
|
113 |
+
{
|
114 |
+
return $this->isEditorAllowed() && (boolean)Mage::getSingleton('admin/session')->isAllowed('admin/markdown_editor/htmlpreview');
|
115 |
+
}
|
116 |
+
}
|
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* @category SchumacherFM_Markdown
|
4 |
* @package Helper
|
@@ -27,13 +28,71 @@ class SchumacherFM_Markdown_Helper_Data extends Mage_Core_Helper_Abstract
|
|
27 |
}
|
28 |
|
29 |
/**
|
30 |
-
* @return
|
31 |
*/
|
32 |
public function getCheatSheetUrl()
|
33 |
{
|
34 |
return Mage::getStoreConfig('markdown/markdown/cheatsheet');
|
35 |
}
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
/**
|
38 |
* @param bool $encoded
|
39 |
*
|
@@ -57,7 +116,17 @@ class SchumacherFM_Markdown_Helper_Data extends Mage_Core_Helper_Abstract
|
|
57 |
*/
|
58 |
public function isDisabled()
|
59 |
{
|
60 |
-
return !
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
}
|
62 |
|
63 |
/**
|
@@ -67,7 +136,15 @@ class SchumacherFM_Markdown_Helper_Data extends Mage_Core_Helper_Abstract
|
|
67 |
*/
|
68 |
public function isMarkdownExtra($type = NULL)
|
69 |
{
|
70 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
|
73 |
/**
|
@@ -147,8 +224,8 @@ class SchumacherFM_Markdown_Helper_Data extends Mage_Core_Helper_Abstract
|
|
147 |
*/
|
148 |
public function getEpicEditorConfig()
|
149 |
{
|
150 |
-
$config
|
151 |
-
$config
|
152 |
$config['basePath'] = Mage::getBaseUrl('skin') . 'adminhtml/default/default/epiceditor/';
|
153 |
return json_encode($config);
|
154 |
}
|
@@ -230,4 +307,18 @@ class SchumacherFM_Markdown_Helper_Data extends Mage_Core_Helper_Abstract
|
|
230 |
}
|
231 |
return $handles;
|
232 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
}
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* @category SchumacherFM_Markdown
|
5 |
* @package Helper
|
28 |
}
|
29 |
|
30 |
/**
|
31 |
+
* @return string
|
32 |
*/
|
33 |
public function getCheatSheetUrl()
|
34 |
{
|
35 |
return Mage::getStoreConfig('markdown/markdown/cheatsheet');
|
36 |
}
|
37 |
|
38 |
+
/**
|
39 |
+
* not DRY ;-)
|
40 |
+
*
|
41 |
+
* @param bool $fullPath
|
42 |
+
*
|
43 |
+
* @return string
|
44 |
+
*/
|
45 |
+
public function getHighLightStyleCss($fullPath = FALSE)
|
46 |
+
{
|
47 |
+
$styleFile = Mage::getStoreConfig('markdown/markdown/highlight_style');
|
48 |
+
$return = 'markdown' . DS . 'highlight' . DS . 'styles' . DS . $styleFile;
|
49 |
+
if (TRUE === $fullPath) {
|
50 |
+
return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) . DS . 'adminhtml' . DS . 'default' . DS . 'default' . DS . $return;
|
51 |
+
}
|
52 |
+
return $return;
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* not DRY ;-)
|
57 |
+
*
|
58 |
+
* @param bool $fullPath
|
59 |
+
*
|
60 |
+
* @return string
|
61 |
+
*/
|
62 |
+
public function getMarkdownStyleCss($fullPath = FALSE)
|
63 |
+
{
|
64 |
+
$styleFile = Mage::getStoreConfig('markdown/markdown/preview_style');
|
65 |
+
$return = 'markdown' . DS . 'styles' . DS . $styleFile;
|
66 |
+
if (TRUE === $fullPath) {
|
67 |
+
return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) . DS . 'adminhtml' . DS . 'default' . DS . 'default' . DS . $return;
|
68 |
+
}
|
69 |
+
return $return;
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* @return string
|
74 |
+
*/
|
75 |
+
public function getPreviewIframeCSS()
|
76 |
+
{
|
77 |
+
return trim(Mage::getStoreConfig('markdown/markdown/preview_iframe_css'));
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* @return string
|
82 |
+
*/
|
83 |
+
public function getTextareaStyle()
|
84 |
+
{
|
85 |
+
return trim(Mage::getStoreConfig('markdown/markdown/textarea_style'));
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* @return string
|
90 |
+
*/
|
91 |
+
public function getMdExtraDocUrl()
|
92 |
+
{
|
93 |
+
return self::URL_MD_EXTRA_SYNTAX;
|
94 |
+
}
|
95 |
+
|
96 |
/**
|
97 |
* @param bool $encoded
|
98 |
*
|
116 |
*/
|
117 |
public function isDisabled()
|
118 |
{
|
119 |
+
return !Mage::getStoreConfigFlag('markdown/markdown/enable');
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Check if Markdown is enabled for emails
|
124 |
+
*
|
125 |
+
* @return bool
|
126 |
+
*/
|
127 |
+
public function isEmailDisabled()
|
128 |
+
{
|
129 |
+
return !Mage::getStoreConfigFlag('markdown/markdown/enable_email');
|
130 |
}
|
131 |
|
132 |
/**
|
136 |
*/
|
137 |
public function isMarkdownExtra($type = NULL)
|
138 |
{
|
139 |
+
return Mage::getStoreConfigFlag('markdown/markdown_extra/enable' . (!empty($type) ? '_' . $type : ''));
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* @return bool
|
144 |
+
*/
|
145 |
+
public function isHiddenInsertImageButton()
|
146 |
+
{
|
147 |
+
return Mage::getStoreConfigFlag('markdown/markdown/hide_insert_image_button');
|
148 |
}
|
149 |
|
150 |
/**
|
224 |
*/
|
225 |
public function getEpicEditorConfig()
|
226 |
{
|
227 |
+
$config = $this->_getJsonConfig('epiceditor');
|
228 |
+
$config = FALSE !== $config ? json_decode($config, TRUE) : array();
|
229 |
$config['basePath'] = Mage::getBaseUrl('skin') . 'adminhtml/default/default/epiceditor/';
|
230 |
return json_encode($config);
|
231 |
}
|
307 |
}
|
308 |
return $handles;
|
309 |
}
|
310 |
+
|
311 |
+
/**
|
312 |
+
* @return array
|
313 |
+
*/
|
314 |
+
public function getStoreCodes()
|
315 |
+
{
|
316 |
+
$stores = array();
|
317 |
+
$appStores = Mage::app()->getStores(TRUE, FALSE);
|
318 |
+
foreach ($appStores as $store) {
|
319 |
+
/** @var $store Mage_Core_Model_Store */
|
320 |
+
$stores[] = $store->getCode();
|
321 |
+
}
|
322 |
+
return $stores;
|
323 |
+
}
|
324 |
}
|
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* @category SchumacherFM_Markdown
|
4 |
* @package Model
|
@@ -9,6 +10,7 @@ abstract class SchumacherFM_Markdown_Model_Markdown_Abstract
|
|
9 |
{
|
10 |
protected $_tag = '';
|
11 |
protected $_isDisabled = FALSE;
|
|
|
12 |
|
13 |
/**
|
14 |
* @var string
|
@@ -36,8 +38,9 @@ abstract class SchumacherFM_Markdown_Model_Markdown_Abstract
|
|
36 |
/**
|
37 |
* due to some weired parsings ... every text field which should contain MD must start with this tag
|
38 |
*/
|
39 |
-
$this->_tag
|
40 |
-
$this->_isDisabled
|
|
|
41 |
}
|
42 |
|
43 |
/**
|
@@ -83,7 +86,9 @@ abstract class SchumacherFM_Markdown_Model_Markdown_Abstract
|
|
83 |
*/
|
84 |
public function setOptions(array $options = NULL)
|
85 |
{
|
86 |
-
|
|
|
|
|
87 |
return $this;
|
88 |
}
|
89 |
|
@@ -110,6 +115,16 @@ abstract class SchumacherFM_Markdown_Model_Markdown_Abstract
|
|
110 |
$force = isset($this->_options['force']) && $this->_options['force'] === TRUE;
|
111 |
$protectMagento = isset($this->_options['protectMagento']) && $this->_options['protectMagento'] === TRUE;
|
112 |
$this->_currentRenderedText = $text;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
|
114 |
if (!$this->_isMarkdown() && $force === FALSE) {
|
115 |
return $this->_currentRenderedText;
|
@@ -125,6 +140,11 @@ abstract class SchumacherFM_Markdown_Model_Markdown_Abstract
|
|
125 |
if ($protectMagento === TRUE) {
|
126 |
$this->_preserveMagentoVariablesDecode();
|
127 |
}
|
|
|
|
|
|
|
|
|
|
|
128 |
Varien_Profiler::stop('renderMarkdown');
|
129 |
return $this->_currentRenderedText;
|
130 |
}
|
@@ -206,4 +226,20 @@ abstract class SchumacherFM_Markdown_Model_Markdown_Abstract
|
|
206 |
{
|
207 |
return strpos($text, $this->_tag) !== FALSE;
|
208 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
}
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* @category SchumacherFM_Markdown
|
5 |
* @package Model
|
10 |
{
|
11 |
protected $_tag = '';
|
12 |
protected $_isDisabled = FALSE;
|
13 |
+
protected $_isEmailDisabled = FALSE;
|
14 |
|
15 |
/**
|
16 |
* @var string
|
38 |
/**
|
39 |
* due to some weired parsings ... every text field which should contain MD must start with this tag
|
40 |
*/
|
41 |
+
$this->_tag = Mage::helper('markdown')->getDetectionTag();
|
42 |
+
$this->_isDisabled = Mage::helper('markdown')->isDisabled();
|
43 |
+
$this->_isEmailDisabled = Mage::helper('markdown')->isEmailDisabled();
|
44 |
}
|
45 |
|
46 |
/**
|
86 |
*/
|
87 |
public function setOptions(array $options = NULL)
|
88 |
{
|
89 |
+
if (FALSE === empty($options)) {
|
90 |
+
$this->_options = array_merge($this->_options, $options);
|
91 |
+
}
|
92 |
return $this;
|
93 |
}
|
94 |
|
115 |
$force = isset($this->_options['force']) && $this->_options['force'] === TRUE;
|
116 |
$protectMagento = isset($this->_options['protectMagento']) && $this->_options['protectMagento'] === TRUE;
|
117 |
$this->_currentRenderedText = $text;
|
118 |
+
$cacheKey = $this->getCacheKey();
|
119 |
+
$useCache = Mage::app()->useCache('markdown') && FALSE !== $cacheKey;
|
120 |
+
|
121 |
+
if (TRUE === $useCache) {
|
122 |
+
$renderedCachedText = Mage::app()->loadCache($cacheKey);
|
123 |
+
if (FALSE === empty($renderedCachedText)) {
|
124 |
+
Varien_Profiler::stop('renderMarkdown');
|
125 |
+
return $renderedCachedText;
|
126 |
+
}
|
127 |
+
}
|
128 |
|
129 |
if (!$this->_isMarkdown() && $force === FALSE) {
|
130 |
return $this->_currentRenderedText;
|
140 |
if ($protectMagento === TRUE) {
|
141 |
$this->_preserveMagentoVariablesDecode();
|
142 |
}
|
143 |
+
|
144 |
+
if (TRUE === $useCache) {
|
145 |
+
Mage::app()->saveCache($this->_currentRenderedText, $cacheKey, array('markdown'), (int)Mage::getStoreConfig('markdown/markdown/cache_lifetime'));
|
146 |
+
}
|
147 |
+
|
148 |
Varien_Profiler::stop('renderMarkdown');
|
149 |
return $this->_currentRenderedText;
|
150 |
}
|
226 |
{
|
227 |
return strpos($text, $this->_tag) !== FALSE;
|
228 |
}
|
229 |
+
|
230 |
+
/**
|
231 |
+
* @return string|boolean
|
232 |
+
*/
|
233 |
+
public function getCacheKey()
|
234 |
+
{
|
235 |
+
//Checking if we are in secure area
|
236 |
+
$store = Mage::app()->getStore();
|
237 |
+
if ($store->isAdmin()) {
|
238 |
+
return FALSE; // don't cache in the backend
|
239 |
+
} else {
|
240 |
+
$secure = $store->isFrontUrlSecure() && Mage::app()->getRequest()->isSecure();
|
241 |
+
}
|
242 |
+
$cacheKeyInfo = $store->getId() . DS . $secure . DS . $this->_currentRenderedText;
|
243 |
+
return sha1($cacheKeyInfo);
|
244 |
+
}
|
245 |
}
|
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* @category SchumacherFM_Markdown
|
4 |
* @package Model
|
@@ -54,7 +55,7 @@ class SchumacherFM_Markdown_Model_Markdown_Observer extends SchumacherFM_Markdow
|
|
54 |
public function renderEmailTemplate(Varien_Event_Observer $observer)
|
55 |
{
|
56 |
$this->_currentObserverMethod = __FUNCTION__;
|
57 |
-
if ($this->_isDisabled) {
|
58 |
return NULL;
|
59 |
}
|
60 |
|
@@ -66,7 +67,6 @@ class SchumacherFM_Markdown_Model_Markdown_Observer extends SchumacherFM_Markdow
|
|
66 |
$template = $object->getData('template_text');
|
67 |
|
68 |
if ($this->isMarkdown($template)) {
|
69 |
-
|
70 |
$this->setOptions(array(
|
71 |
'extra' => Mage::helper('markdown')->isMarkdownExtra('email')
|
72 |
));
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* @category SchumacherFM_Markdown
|
5 |
* @package Model
|
55 |
public function renderEmailTemplate(Varien_Event_Observer $observer)
|
56 |
{
|
57 |
$this->_currentObserverMethod = __FUNCTION__;
|
58 |
+
if ($this->_isDisabled || $this->_isEmailDisabled) {
|
59 |
return NULL;
|
60 |
}
|
61 |
|
67 |
$template = $object->getData('template_text');
|
68 |
|
69 |
if ($this->isMarkdown($template)) {
|
|
|
70 |
$this->setOptions(array(
|
71 |
'extra' => Mage::helper('markdown')->isMarkdownExtra('email')
|
72 |
));
|
@@ -18,6 +18,23 @@ class SchumacherFM_Markdown_Model_Observer_Adminhtml_Block
|
|
18 |
*/
|
19 |
protected $_afterElementHtml = array();
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
/**
|
22 |
* adminhtml_block_html_before
|
23 |
*
|
@@ -27,13 +44,13 @@ class SchumacherFM_Markdown_Model_Observer_Adminhtml_Block
|
|
27 |
*/
|
28 |
public function alterTextareaBlockTemplate(Varien_Event_Observer $observer)
|
29 |
{
|
30 |
-
|
|
|
31 |
return NULL;
|
32 |
}
|
33 |
|
34 |
/** @var $block Mage_Adminhtml_Block_Template */
|
35 |
-
$block
|
36 |
-
|
37 |
$isWidgetElement = $block instanceof Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element;
|
38 |
$isCatalogElement = $block instanceof Mage_Adminhtml_Block_Catalog_Form_Renderer_Fieldset_Element;
|
39 |
|
@@ -43,71 +60,132 @@ class SchumacherFM_Markdown_Model_Observer_Adminhtml_Block
|
|
43 |
$isLayoutHandleAllowed = Mage::getSingleton('markdown/observer_adminhtml_layoutUpdate')->isAllowed();
|
44 |
|
45 |
if ($isWidgetElement || $isCatalogElement) {
|
46 |
-
/** @var Varien_Data_Form_Element_Abstract
|
47 |
-
$
|
48 |
|
49 |
-
$_isElementEditor = $this->_isElementEditor(
|
50 |
-
$_isCatalogElementAllowed = $this->_isCatalogElementAllowed(
|
51 |
-
$_isEmailTemplateElementAllowed = $this->_isEmailTemplateElementAllowed(
|
52 |
|
53 |
if ($_isElementEditor || $_isCatalogElementAllowed || $_isEmailTemplateElementAllowed) {
|
|
|
54 |
$method = $isLayoutHandleAllowed ? '_integrate' : '_addMarkdownHint';
|
55 |
-
$this->$method(
|
56 |
}
|
57 |
}
|
58 |
}
|
59 |
|
60 |
/**
|
61 |
-
* @
|
|
|
|
|
62 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
* @return $this
|
64 |
*/
|
65 |
-
protected function _addMarkdownHint(
|
66 |
{
|
67 |
-
$
|
68 |
-
|
69 |
-
. '</small>' . $
|
70 |
-
|
71 |
-
/* not sure if useful ...
|
72 |
-
$params = array(
|
73 |
-
'layoutHandle' => '@todo',
|
74 |
-
'returnUrl' => Mage::app()->getRequest()->getRequestUri(),
|
75 |
-
);
|
76 |
-
$url = Mage::helper('markdown')->getAdminEnableUrl($params);
|
77 |
-
$element->setData('after_element_html', '<small><a href="' . $url . '">' .
|
78 |
-
Mage::helper('markdown')->__('Click to add Markdown feature!')
|
79 |
-
. '</a></small>');
|
80 |
-
*/
|
81 |
return $this;
|
82 |
}
|
83 |
|
84 |
/**
|
85 |
-
* @param Varien_Data_Form_Element_Abstract $element
|
86 |
-
*
|
87 |
* @return $this
|
88 |
*/
|
89 |
-
protected function _integrate(
|
90 |
{
|
91 |
-
$uniqueEntityId = $this->_getUniqueEntityId($
|
92 |
-
$idPrefix = $
|
93 |
-
$
|
94 |
|
95 |
// adds to every Element the MD buttons at the bottom of the textarea
|
96 |
-
return $this
|
|
|
|
|
|
|
97 |
}
|
98 |
|
99 |
/**
|
100 |
-
* @param Varien_Data_Form_Element_Abstract $element
|
101 |
-
*
|
102 |
* @return $this
|
103 |
*/
|
104 |
-
protected function _mergeAfterElementHtml(
|
105 |
{
|
106 |
-
$this->_afterElementHtml[90] = $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
|
108 |
$config = array();
|
109 |
-
$config['dt'] =
|
110 |
-
$config['fuu'] =
|
111 |
|
112 |
/**
|
113 |
* when rendering via marked.js include that place holder ... if rendere via PHP replace {{media url...}}
|
@@ -115,59 +193,66 @@ class SchumacherFM_Markdown_Model_Observer_Adminhtml_Block
|
|
115 |
*/
|
116 |
$config['phi'] = Mage::getBaseUrl('media');
|
117 |
|
118 |
-
if ($this->_isMarkdownExtra(
|
119 |
-
$config['eru'] =
|
120 |
}
|
121 |
|
122 |
-
$config['
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
|
124 |
-
if (
|
125 |
-
$config['rmc'] =
|
126 |
}
|
127 |
|
128 |
-
|
129 |
-
$
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
|
|
|
|
|
|
|
|
|
|
140 |
}
|
141 |
|
142 |
/**
|
143 |
-
* @param Varien_Data_Form_Element_Abstract $element
|
144 |
-
*
|
145 |
* @return $this
|
146 |
*/
|
147 |
-
protected function _addEpicEditorHtml(
|
148 |
{
|
149 |
-
if (
|
150 |
return $this;
|
151 |
}
|
152 |
|
153 |
-
$id = $
|
154 |
|
155 |
-
$
|
156 |
-
$this->_afterElementHtml[100] = '<div id="epiceditor_EE_' . $id . '"' . $this->_getEpicEditorHtmlConfig(
|
157 |
return $this;
|
158 |
}
|
159 |
|
160 |
/**
|
161 |
-
* @param Varien_Data_Form_Element_Abstract $element
|
162 |
-
*
|
163 |
* @return string
|
164 |
*/
|
165 |
-
protected function _getEpicEditorHtmlConfig(
|
166 |
{
|
167 |
-
$config =
|
168 |
$dataConfig = '';
|
169 |
if ($config) {
|
170 |
-
$dataConfig = ' data-config
|
171 |
}
|
172 |
return $dataConfig;
|
173 |
}
|
@@ -208,111 +293,90 @@ class SchumacherFM_Markdown_Model_Observer_Adminhtml_Block
|
|
208 |
}
|
209 |
|
210 |
/**
|
211 |
-
* @param Varien_Data_Form_Element_Abstract $element
|
212 |
-
*
|
213 |
* @return bool
|
214 |
*/
|
215 |
-
protected function _isEmailTemplateElementAllowed(
|
216 |
{
|
217 |
-
$trueOne = $
|
218 |
-
$trueTwo = stristr($
|
219 |
return $trueOne && $trueTwo;
|
220 |
}
|
221 |
|
222 |
/**
|
223 |
-
* @param Varien_Data_Form_Element_Abstract $element
|
224 |
-
*
|
225 |
* @return bool
|
226 |
*/
|
227 |
-
protected function _isCatalogElementAllowed(
|
228 |
{
|
229 |
-
$isTextArea = $
|
230 |
-
$isDescription = stristr($
|
231 |
return $isDescription && $isTextArea;
|
232 |
}
|
233 |
|
234 |
/**
|
235 |
-
* @param Varien_Data_Form_Element_Abstract $element
|
236 |
-
*
|
237 |
* @return bool
|
238 |
*/
|
239 |
-
protected function _isElementEditor(
|
240 |
{
|
241 |
-
return $
|
242 |
}
|
243 |
|
244 |
/**
|
245 |
-
* checks if md extra is enabled
|
246 |
-
*
|
247 |
-
* @param Varien_Data_Form_Element_Abstract $element
|
248 |
-
*
|
249 |
* @return bool
|
250 |
*/
|
251 |
-
protected function _isMarkdownExtra(
|
252 |
{
|
253 |
-
$_isEmailTemplateElementAllowed = $this->_isEmailTemplateElementAllowed(
|
254 |
|
255 |
-
return
|
256 |
-
(
|
257 |
}
|
258 |
|
259 |
/**
|
260 |
-
* @
|
261 |
*/
|
262 |
-
protected function _getMarkdownButtons(
|
263 |
{
|
264 |
-
$htmlId = $
|
265 |
|
266 |
-
if (
|
267 |
$this->_afterElementHtml[200] = Mage::getSingleton('core/layout')
|
268 |
->createBlock('adminhtml/widget_button', '', array(
|
269 |
-
'label' =>
|
270 |
'type' => 'button',
|
|
|
271 |
'onclick' => 'toggleMarkdown(\'' . $htmlId . '\');'
|
272 |
))->toHtml();
|
273 |
}
|
274 |
|
275 |
-
$this->
|
276 |
-
->createBlock('adminhtml/widget_button', '', array(
|
277 |
-
'label' => Mage::helper('markdown')->__('[M↓] Source'),
|
278 |
-
'type' => 'button',
|
279 |
-
'title' => Mage::helper('markdown')->__('View generated HTML source code'),
|
280 |
-
'onclick' => 'toggleMarkdownSource(this,\'' . $htmlId . '\');'
|
281 |
-
))->toHtml();
|
282 |
-
|
283 |
-
$this->_afterElementHtml[300] = Mage::getSingleton('core/layout')
|
284 |
-
->createBlock('adminhtml/widget_button', '', array(
|
285 |
-
'label' => Mage::helper('markdown')->__('[M↓] Syntax'),
|
286 |
-
'type' => 'button',
|
287 |
-
'onclick' => 'mdExternalUrl(\'' . Mage::helper('markdown')->getCheatSheetUrl() . '\');'
|
288 |
-
))->toHtml();
|
289 |
-
|
290 |
-
if ($this->_isMarkdownExtra($element)) {
|
291 |
-
$this->_afterElementHtml[400] = Mage::getSingleton('core/layout')
|
292 |
-
->createBlock('adminhtml/widget_button', '', array(
|
293 |
-
'label' => Mage::helper('markdown')->__('[M↓] Extra Syntax'),
|
294 |
-
'type' => 'button',
|
295 |
-
'onclick' => 'mdExternalUrl(\'' . SchumacherFM_Markdown_Helper_Data::URL_MD_EXTRA_SYNTAX . '\');'
|
296 |
-
))->toHtml();
|
297 |
-
}
|
298 |
-
|
299 |
-
if (Mage::helper('markdown')->isEpicEditorEnabled()) {
|
300 |
$this->_afterElementHtml[500] = Mage::getSingleton('core/layout')
|
301 |
->createBlock('adminhtml/widget_button', '', array(
|
302 |
-
'label' =>
|
|
|
303 |
'type' => 'button',
|
304 |
'onclick' => 'toggleEpicEditor(this,\'' . $htmlId . '\');'
|
305 |
))->toHtml();
|
306 |
}
|
307 |
|
308 |
-
if (
|
309 |
$this->_afterElementHtml[600] = Mage::getSingleton('core/layout')
|
310 |
->createBlock('adminhtml/widget_button', '', array(
|
311 |
-
'label' =>
|
|
|
312 |
'type' => 'button',
|
313 |
'onclick' => 'htmlToMarkDown(this,\'' . $htmlId . '\');'
|
314 |
))->toHtml();
|
315 |
}
|
316 |
return $this;
|
317 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
}
|
18 |
*/
|
19 |
protected $_afterElementHtml = array();
|
20 |
|
21 |
+
/**
|
22 |
+
* @var SchumacherFM_Markdown_Helper_Data
|
23 |
+
*/
|
24 |
+
protected $_helper = NULL;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @var Varien_Data_Form_Element_Abstract
|
28 |
+
*/
|
29 |
+
protected $_currentElement = NULL;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* contains the base live preview URL
|
33 |
+
*
|
34 |
+
* @var array
|
35 |
+
*/
|
36 |
+
protected $_livePreviewUrl = NULL;
|
37 |
+
|
38 |
/**
|
39 |
* adminhtml_block_html_before
|
40 |
*
|
44 |
*/
|
45 |
public function alterTextareaBlockTemplate(Varien_Event_Observer $observer)
|
46 |
{
|
47 |
+
$this->_helper = Mage::helper('markdown');
|
48 |
+
if ($this->_helper->isDisabled()) {
|
49 |
return NULL;
|
50 |
}
|
51 |
|
52 |
/** @var $block Mage_Adminhtml_Block_Template */
|
53 |
+
$block = $observer->getEvent()->getBlock();
|
|
|
54 |
$isWidgetElement = $block instanceof Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element;
|
55 |
$isCatalogElement = $block instanceof Mage_Adminhtml_Block_Catalog_Form_Renderer_Fieldset_Element;
|
56 |
|
60 |
$isLayoutHandleAllowed = Mage::getSingleton('markdown/observer_adminhtml_layoutUpdate')->isAllowed();
|
61 |
|
62 |
if ($isWidgetElement || $isCatalogElement) {
|
63 |
+
/** @var Varien_Data_Form_Element_Abstract _currentElement */
|
64 |
+
$this->_currentElement = $block->getElement();
|
65 |
|
66 |
+
$_isElementEditor = $this->_isElementEditor();
|
67 |
+
$_isCatalogElementAllowed = $this->_isCatalogElementAllowed();
|
68 |
+
$_isEmailTemplateElementAllowed = $this->_isEmailTemplateElementAllowed();
|
69 |
|
70 |
if ($_isElementEditor || $_isCatalogElementAllowed || $_isEmailTemplateElementAllowed) {
|
71 |
+
$this->_tryToGetPreviewUrl($block);
|
72 |
$method = $isLayoutHandleAllowed ? '_integrate' : '_addMarkdownHint';
|
73 |
+
$this->$method();
|
74 |
}
|
75 |
}
|
76 |
}
|
77 |
|
78 |
/**
|
79 |
+
* @todo this needs to be extended for each block on which markdown can occur.
|
80 |
+
*
|
81 |
+
* @param Mage_Core_Block_Abstract $block
|
82 |
*
|
83 |
+
* @return null
|
84 |
+
*/
|
85 |
+
protected function _tryToGetPreviewUrl(Mage_Core_Block_Abstract $block)
|
86 |
+
{
|
87 |
+
if (NULL !== $this->_livePreviewUrl) {
|
88 |
+
return NULL;
|
89 |
+
}
|
90 |
+
|
91 |
+
// cms page edit
|
92 |
+
if (TRUE === $this->_isElementEditor()) {
|
93 |
+
|
94 |
+
/* @var $model Mage_Cms_Model_Page */
|
95 |
+
$model = Mage::registry('cms_page');
|
96 |
+
if (empty($model)) {
|
97 |
+
return NULL;
|
98 |
+
}
|
99 |
+
$coreUrl = Mage::getModel('core/url');
|
100 |
+
|
101 |
+
$identifier = $model->getIdentifier();
|
102 |
+
if (!empty($identifier)) {
|
103 |
+
$this->_livePreviewUrl = $coreUrl->getUrl(
|
104 |
+
$identifier, array(
|
105 |
+
'_current' => FALSE
|
106 |
+
)
|
107 |
+
);
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
// catalog
|
112 |
+
if (TRUE === $this->_isCatalogElementAllowed()) {
|
113 |
+
/** @var Mage_Catalog_Model_Product $product */
|
114 |
+
$product = Mage::registry('current_product');
|
115 |
+
/** @var Mage_Catalog_Model_Category $category */
|
116 |
+
$category = Mage::registry('current_category');
|
117 |
+
|
118 |
+
if ($product) {
|
119 |
+
$this->_livePreviewUrl = $product->getUrlInStore();
|
120 |
+
}
|
121 |
+
if ($category) {
|
122 |
+
$this->_livePreviewUrl = $category->getCategoryIdUrl();
|
123 |
+
}
|
124 |
+
$this->_livePreviewUrl = preg_replace('~\?___store=[^\&]+~i', '', $this->_livePreviewUrl);
|
125 |
+
}
|
126 |
+
return NULL;
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
* @return $this
|
131 |
*/
|
132 |
+
protected function _addMarkdownHint()
|
133 |
{
|
134 |
+
$this->_currentElement->setData('after_element_html', '<small>' .
|
135 |
+
$this->___('Markdown feature may be available here!')
|
136 |
+
. '</small>' . $this->_currentElement->getData('after_element_html'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
return $this;
|
138 |
}
|
139 |
|
140 |
/**
|
|
|
|
|
141 |
* @return $this
|
142 |
*/
|
143 |
+
protected function _integrate()
|
144 |
{
|
145 |
+
$uniqueEntityId = $this->_getUniqueEntityId($this->_currentElement);
|
146 |
+
$idPrefix = $this->_currentElement->getForm()->getHtmlIdPrefix();
|
147 |
+
$this->_currentElement->setId(str_replace($idPrefix, '', $this->_currentElement->getHtmlId()) . $uniqueEntityId);
|
148 |
|
149 |
// adds to every Element the MD buttons at the bottom of the textarea
|
150 |
+
return $this
|
151 |
+
->_getMarkdownButtons()
|
152 |
+
->_addEpicEditorHtml()
|
153 |
+
->_mergeAfterElementHtml();
|
154 |
}
|
155 |
|
156 |
/**
|
|
|
|
|
157 |
* @return $this
|
158 |
*/
|
159 |
+
protected function _mergeAfterElementHtml()
|
160 |
{
|
161 |
+
$this->_afterElementHtml[90] = $this->_currentElement->getData('after_element_html');
|
162 |
+
|
163 |
+
$this->_addMarkDownConfig();
|
164 |
+
|
165 |
+
Mage::dispatchEvent('markdown_merge_after_element_html', array(
|
166 |
+
'instance' => $this,
|
167 |
+
));
|
168 |
+
|
169 |
+
ksort($this->_afterElementHtml);
|
170 |
+
$this->_currentElement->setData('after_element_html', $this->_generateTabs());
|
171 |
+
$this->_afterElementHtml = array();
|
172 |
+
$this->_currentElement->addClass('initMarkdown ' . $this->_helper->getTextareaStyle());
|
173 |
+
return $this;
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* singleton to add markdown config
|
178 |
+
* @return bool
|
179 |
+
*/
|
180 |
+
protected function _addMarkDownConfig()
|
181 |
+
{
|
182 |
+
if ($this->_configInserted === TRUE) {
|
183 |
+
return $this->_configInserted;
|
184 |
+
}
|
185 |
|
186 |
$config = array();
|
187 |
+
$config['dt'] = $this->_helper->getDetectionTag(TRUE);
|
188 |
+
$config['fuu'] = $this->_helper->getAdminFileUploadUrl(); // file upload url
|
189 |
|
190 |
/**
|
191 |
* when rendering via marked.js include that place holder ... if rendere via PHP replace {{media url...}}
|
193 |
*/
|
194 |
$config['phi'] = Mage::getBaseUrl('media');
|
195 |
|
196 |
+
if ($this->_isMarkdownExtra()) {
|
197 |
+
$config['eru'] = $this->_helper->getAdminRenderUrl(array('markdownExtra' => 1)); // extra renderer url
|
198 |
}
|
199 |
|
200 |
+
$config['stores'] = $this->_helper->getStoreCodes();
|
201 |
+
$config['eeloc'] = $this->_helper->isEpicEditorLoadOnClick();
|
202 |
+
$config['hideIIB'] = $this->_helper->isHiddenInsertImageButton();
|
203 |
+
$config['mdCss'] = $this->_helper->getMarkdownStyleCss(TRUE);
|
204 |
+
$config['hlCss'] = $this->_helper->getHighLightStyleCss(TRUE);
|
205 |
+
$config['lpUrl'] = $this->_livePreviewUrl;
|
206 |
+
$config['feaBUrl'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) . 'markdown/adminhtml/feature/'; // feature base url (raptor)
|
207 |
|
208 |
+
if ($this->_helper->isReMarkedEnabled() === TRUE) {
|
209 |
+
$config['rmc'] = $this->_helper->getReMarkedConfig();
|
210 |
}
|
211 |
|
212 |
+
$this->_afterElementHtml[1000] = '<div id="markdownGlobalConfig" data-config=\'' .
|
213 |
+
Zend_Json_Encoder::encode($config)
|
214 |
+
. '\' style="display:none;"></div>';
|
215 |
+
$this->_configInserted = TRUE;
|
216 |
+
return $this->_configInserted;
|
217 |
+
}
|
218 |
|
219 |
+
/**
|
220 |
+
* @return string
|
221 |
+
*/
|
222 |
+
protected function _generateTabs()
|
223 |
+
{
|
224 |
+
$block = Mage::getSingleton('core/layout')->createBlock('markdown/adminhtml_form_renderer_fieldset_element_textarea');
|
225 |
+
$block
|
226 |
+
->setElementId($this->_currentElement->getHtmlId())
|
227 |
+
->setAfterElementHtml(implode(' ', $this->_afterElementHtml));
|
228 |
+
return $block->toHtml();
|
229 |
}
|
230 |
|
231 |
/**
|
|
|
|
|
232 |
* @return $this
|
233 |
*/
|
234 |
+
protected function _addEpicEditorHtml()
|
235 |
{
|
236 |
+
if (!$this->_helper->isEpicEditorEnabled()) {
|
237 |
return $this;
|
238 |
}
|
239 |
|
240 |
+
$id = $this->_currentElement->getHtmlId();
|
241 |
|
242 |
+
$this->_currentElement->addClass('initEpicEditor');
|
243 |
+
$this->_afterElementHtml[100] = ' <div id="epiceditor_EE_' . $id . '"' . $this->_getEpicEditorHtmlConfig() . '></div>';
|
244 |
return $this;
|
245 |
}
|
246 |
|
247 |
/**
|
|
|
|
|
248 |
* @return string
|
249 |
*/
|
250 |
+
protected function _getEpicEditorHtmlConfig()
|
251 |
{
|
252 |
+
$config = $this->_helper->getEpicEditorConfig();
|
253 |
$dataConfig = '';
|
254 |
if ($config) {
|
255 |
+
$dataConfig = ' data-config = \'' . $config . '\'';
|
256 |
}
|
257 |
return $dataConfig;
|
258 |
}
|
293 |
}
|
294 |
|
295 |
/**
|
|
|
|
|
296 |
* @return bool
|
297 |
*/
|
298 |
+
protected function _isEmailTemplateElementAllowed()
|
299 |
{
|
300 |
+
$trueOne = $this->_currentElement instanceof Varien_Data_Form_Element_Textarea;
|
301 |
+
$trueTwo = stristr($this->_currentElement->getHtmlId(), 'template_text') !== FALSE;
|
302 |
return $trueOne && $trueTwo;
|
303 |
}
|
304 |
|
305 |
/**
|
|
|
|
|
306 |
* @return bool
|
307 |
*/
|
308 |
+
protected function _isCatalogElementAllowed()
|
309 |
{
|
310 |
+
$isTextArea = $this->_currentElement instanceof Mage_Adminhtml_Block_Catalog_Helper_Form_Wysiwyg;
|
311 |
+
$isDescription = stristr($this->_currentElement->getName(), 'description') !== FALSE && stristr($this->_currentElement->getName(), 'meta') === FALSE;
|
312 |
return $isDescription && $isTextArea;
|
313 |
}
|
314 |
|
315 |
/**
|
|
|
|
|
316 |
* @return bool
|
317 |
*/
|
318 |
+
protected function _isElementEditor()
|
319 |
{
|
320 |
+
return $this->_currentElement instanceof Varien_Data_Form_Element_Editor;
|
321 |
}
|
322 |
|
323 |
/**
|
|
|
|
|
|
|
|
|
324 |
* @return bool
|
325 |
*/
|
326 |
+
protected function _isMarkdownExtra()
|
327 |
{
|
328 |
+
$_isEmailTemplateElementAllowed = $this->_isEmailTemplateElementAllowed();
|
329 |
|
330 |
+
return $this->_helper->isMarkdownExtra() ||
|
331 |
+
($this->_helper->isMarkdownExtra('email') && $_isEmailTemplateElementAllowed);
|
332 |
}
|
333 |
|
334 |
/**
|
335 |
+
* @return $this
|
336 |
*/
|
337 |
+
protected function _getMarkdownButtons()
|
338 |
{
|
339 |
+
$htmlId = $this->_currentElement->getHtmlId();
|
340 |
|
341 |
+
if ($this->_helper->getDetectionTag() !== '') {
|
342 |
$this->_afterElementHtml[200] = Mage::getSingleton('core/layout')
|
343 |
->createBlock('adminhtml/widget_button', '', array(
|
344 |
+
'label' => $this->___('Markdown enable'),
|
345 |
'type' => 'button',
|
346 |
+
'class' => 'mdButton',
|
347 |
'onclick' => 'toggleMarkdown(\'' . $htmlId . '\');'
|
348 |
))->toHtml();
|
349 |
}
|
350 |
|
351 |
+
if ($this->_helper->isEpicEditorEnabled()) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
352 |
$this->_afterElementHtml[500] = Mage::getSingleton('core/layout')
|
353 |
->createBlock('adminhtml/widget_button', '', array(
|
354 |
+
'label' => $this->___('EpicEditor'),
|
355 |
+
'class' => 'mdButton',
|
356 |
'type' => 'button',
|
357 |
'onclick' => 'toggleEpicEditor(this,\'' . $htmlId . '\');'
|
358 |
))->toHtml();
|
359 |
}
|
360 |
|
361 |
+
if ($this->_helper->isReMarkedEnabled() === TRUE) {
|
362 |
$this->_afterElementHtml[600] = Mage::getSingleton('core/layout')
|
363 |
->createBlock('adminhtml/widget_button', '', array(
|
364 |
+
'label' => $this->___('Convert HTML to Markdown'),
|
365 |
+
'class' => 'mdButton',
|
366 |
'type' => 'button',
|
367 |
'onclick' => 'htmlToMarkDown(this,\'' . $htmlId . '\');'
|
368 |
))->toHtml();
|
369 |
}
|
370 |
return $this;
|
371 |
}
|
372 |
+
|
373 |
+
/**
|
374 |
+
* @param $translation
|
375 |
+
*
|
376 |
+
* @return string
|
377 |
+
*/
|
378 |
+
protected function ___($translation)
|
379 |
+
{
|
380 |
+
return $this->_helper->__($translation);
|
381 |
+
}
|
382 |
}
|
@@ -16,7 +16,6 @@ class SchumacherFM_Markdown_Model_Observer_Adminhtml_EpicEditor
|
|
16 |
protected $_epicEditorFiles = array(
|
17 |
'js' => array(
|
18 |
'markdown/adminhtml/epiceditor.js',
|
19 |
-
'markdown/adminhtml/highlight.pack.js',
|
20 |
),
|
21 |
);
|
22 |
|
16 |
protected $_epicEditorFiles = array(
|
17 |
'js' => array(
|
18 |
'markdown/adminhtml/epiceditor.js',
|
|
|
19 |
),
|
20 |
);
|
21 |
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @category SchumacherFM_Markdown
|
4 |
+
* @package Observer
|
5 |
+
* @author Cyrill at Schumacher dot fm / @SchumacherFM
|
6 |
+
* @copyright Copyright (c)
|
7 |
+
*/
|
8 |
+
abstract class SchumacherFM_Markdown_Model_Options_Styles_AbstractStyles
|
9 |
+
{
|
10 |
+
protected $_path = [];
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Options getter
|
14 |
+
*
|
15 |
+
* @return array
|
16 |
+
*/
|
17 |
+
public function toOptionArray()
|
18 |
+
{
|
19 |
+
$path = implode(DS, $this->_path) . DS . '*.css';
|
20 |
+
$content = glob($path);
|
21 |
+
|
22 |
+
$return = array();
|
23 |
+
|
24 |
+
foreach ($content as $css) {
|
25 |
+
$file = basename($css);
|
26 |
+
$return[] = array('value' => $file, 'label' => Mage::helper('markdown')->__($file));
|
27 |
+
}
|
28 |
+
return $return;
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Get options in "key-value" format
|
33 |
+
*
|
34 |
+
* @return array
|
35 |
+
*/
|
36 |
+
public function toArray()
|
37 |
+
{
|
38 |
+
$return = array();
|
39 |
+
$options = $this->toOptionArray();
|
40 |
+
foreach ($options as $option) {
|
41 |
+
$return[$option['value']] = $option['label'];
|
42 |
+
}
|
43 |
+
return $return;
|
44 |
+
}
|
45 |
+
}
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @category SchumacherFM_Markdown
|
4 |
+
* @package Observer
|
5 |
+
* @author Cyrill at Schumacher dot fm / @SchumacherFM
|
6 |
+
* @copyright Copyright (c)
|
7 |
+
*/
|
8 |
+
class SchumacherFM_Markdown_Model_Options_Styles_HighLightStyles extends SchumacherFM_Markdown_Model_Options_Styles_AbstractStyles
|
9 |
+
{
|
10 |
+
public function __construct()
|
11 |
+
{
|
12 |
+
/** @var Mage_Core_Model_Layout $layout */
|
13 |
+
$layout = Mage::app()->getLayout();
|
14 |
+
|
15 |
+
$this->_path = array(
|
16 |
+
Mage::getBaseDir('skin'), $layout->getArea(), 'default', 'default', 'markdown', 'highlight', 'styles'
|
17 |
+
);
|
18 |
+
}
|
19 |
+
}
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @category SchumacherFM_Markdown
|
4 |
+
* @package Observer
|
5 |
+
* @author Cyrill at Schumacher dot fm / @SchumacherFM
|
6 |
+
* @copyright Copyright (c)
|
7 |
+
*/
|
8 |
+
class SchumacherFM_Markdown_Model_Options_Styles_MarkdownStyles extends SchumacherFM_Markdown_Model_Options_Styles_AbstractStyles
|
9 |
+
{
|
10 |
+
public function __construct()
|
11 |
+
{
|
12 |
+
/** @var Mage_Core_Model_Layout $layout */
|
13 |
+
$layout = Mage::app()->getLayout();
|
14 |
+
|
15 |
+
$this->_path = array(
|
16 |
+
Mage::getBaseDir('skin'), $layout->getArea(), 'default', 'default', 'markdown', 'styles'
|
17 |
+
);
|
18 |
+
}
|
19 |
+
}
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @category SchumacherFM_Markdown
|
4 |
+
* @package Observer
|
5 |
+
* @author Cyrill at Schumacher dot fm / @SchumacherFM
|
6 |
+
* @copyright Copyright (c)
|
7 |
+
*/
|
8 |
+
class SchumacherFM_Markdown_Model_Options_Styles_TextareaStyles
|
9 |
+
{
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Options getter
|
13 |
+
*
|
14 |
+
* @return array
|
15 |
+
*/
|
16 |
+
public function toOptionArray()
|
17 |
+
{
|
18 |
+
return array(
|
19 |
+
array('value' => '', 'label' => Mage::helper('markdown')->__('Default')),
|
20 |
+
array('value' => 'lucida', 'label' => Mage::helper('markdown')->__('Lucida Sans')),
|
21 |
+
);
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Get options in "key-value" format
|
26 |
+
*
|
27 |
+
* @return array
|
28 |
+
*/
|
29 |
+
public function toArray()
|
30 |
+
{
|
31 |
+
return array(
|
32 |
+
'lucida' => Mage::helper('markdown')->__('Lucida Sans'),
|
33 |
+
'' => Mage::helper('markdown')->__('Yes'),
|
34 |
+
);
|
35 |
+
}
|
36 |
+
}
|
@@ -7,15 +7,6 @@
|
|
7 |
*/
|
8 |
class SchumacherFM_Markdown_Adminhtml_MarkdownController extends Mage_Adminhtml_Controller_Action
|
9 |
{
|
10 |
-
|
11 |
-
/**
|
12 |
-
* @see Adminhtml/Block.php --> _addMarkdownHint()
|
13 |
-
* not sure if useful
|
14 |
-
*/
|
15 |
-
public function enableAction(){
|
16 |
-
|
17 |
-
}
|
18 |
-
|
19 |
/**
|
20 |
* @return void
|
21 |
*/
|
@@ -70,6 +61,10 @@ class SchumacherFM_Markdown_Adminhtml_MarkdownController extends Mage_Adminhtml_
|
|
70 |
$file = json_decode($this->getRequest()->getParam('file', '[]'), TRUE);
|
71 |
$fileName = preg_replace('~[^\w\.]+~i', '', isset($file['name']) ? $file['name'] : '');
|
72 |
|
|
|
|
|
|
|
|
|
73 |
if (empty($fileName) || empty($binaryData) || empty($file)) {
|
74 |
$return['msg'] = 'Either fileName or binaryData or file is empty ...';
|
75 |
return $this->_setReturn($return, TRUE);
|
7 |
*/
|
8 |
class SchumacherFM_Markdown_Adminhtml_MarkdownController extends Mage_Adminhtml_Controller_Action
|
9 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
/**
|
11 |
* @return void
|
12 |
*/
|
61 |
$file = json_decode($this->getRequest()->getParam('file', '[]'), TRUE);
|
62 |
$fileName = preg_replace('~[^\w\.]+~i', '', isset($file['name']) ? $file['name'] : '');
|
63 |
|
64 |
+
if (strpos(strtolower($fileName), 'clipboard') !== FALSE) {
|
65 |
+
$fileName = 'clipboard_' . date('Ymd-His') . '_' . str_replace('clipboard', '', strtolower($fileName));
|
66 |
+
}
|
67 |
+
|
68 |
if (empty($fileName) || empty($binaryData) || empty($file)) {
|
69 |
$return['msg'] = 'Either fileName or binaryData or file is empty ...';
|
70 |
return $this->_setReturn($return, TRUE);
|
@@ -1,6 +1,5 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"
|
2 |
-
|
3 |
-
/**
|
4 |
* @category SchumacherFM
|
5 |
* @package SchumacherFM_Markdown
|
6 |
* @copyright Copyright (c) http://www.schumacher.fm
|
@@ -9,22 +8,44 @@
|
|
9 |
-->
|
10 |
<config>
|
11 |
<acl>
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
</config>
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?><!--
|
2 |
+
/**
|
|
|
3 |
* @category SchumacherFM
|
4 |
* @package SchumacherFM_Markdown
|
5 |
* @copyright Copyright (c) http://www.schumacher.fm
|
8 |
-->
|
9 |
<config>
|
10 |
<acl>
|
11 |
+
<resources>
|
12 |
+
<admin>
|
13 |
+
<children>
|
14 |
+
<system>
|
15 |
+
<children>
|
16 |
+
<config>
|
17 |
+
<children>
|
18 |
+
<markdown translate="title" module="markdown">
|
19 |
+
<title>Markdown [M↓]</title>
|
20 |
+
</markdown>
|
21 |
+
</children>
|
22 |
+
</config>
|
23 |
+
</children>
|
24 |
+
</system>
|
25 |
+
|
26 |
+
<markdown_editor translate="title" module="markdown">
|
27 |
+
<title>Markdown Editor</title>
|
28 |
+
<sort_order>700</sort_order>
|
29 |
+
<children>
|
30 |
+
|
31 |
+
<preview translate="title">
|
32 |
+
<title>Show Preview Tab</title>
|
33 |
+
<sort_order>0</sort_order>
|
34 |
+
</preview>
|
35 |
+
<livepreview translate="title">
|
36 |
+
<title>Show Live Preview Tab</title>
|
37 |
+
<sort_order>10</sort_order>
|
38 |
+
</livepreview>
|
39 |
+
<htmlpreview translate="title">
|
40 |
+
<title>Show HTML Preview Tab</title>
|
41 |
+
<sort_order>10</sort_order>
|
42 |
+
</htmlpreview>
|
43 |
+
|
44 |
+
</children>
|
45 |
+
</markdown_editor>
|
46 |
+
|
47 |
+
</children>
|
48 |
+
</admin>
|
49 |
+
</resources>
|
50 |
+
</acl>
|
51 |
</config>
|
@@ -1,4 +1,12 @@
|
|
1 |
-
<?xml version="1.0"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<SchumacherFM_Markdown>
|
@@ -7,6 +15,15 @@
|
|
7 |
</modules>
|
8 |
|
9 |
<global>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
<models>
|
11 |
<markdown>
|
12 |
<class>SchumacherFM_Markdown_Model</class>
|
@@ -104,6 +121,7 @@
|
|
104 |
<adminhtml_block_html_before>
|
105 |
<observers>
|
106 |
<markdown_adminhtml_block_html_before_textarea>
|
|
|
107 |
<class>markdown/observer_adminhtml_block</class>
|
108 |
<method>alterTextareaBlockTemplate</method>
|
109 |
</markdown_adminhtml_block_html_before_textarea>
|
@@ -127,8 +145,13 @@
|
|
127 |
<markdown>
|
128 |
<markdown>
|
129 |
<enable>1</enable>
|
|
|
130 |
<cheatsheet>https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet</cheatsheet>
|
131 |
<detection_tag>!#markdown</detection_tag>
|
|
|
|
|
|
|
|
|
132 |
</markdown>
|
133 |
<markdown_extra>
|
134 |
<enable>0</enable>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* @category SchumacherFM
|
5 |
+
* @package SchumacherFM_Markdown
|
6 |
+
* @copyright Copyright (c) http://www.schumacher.fm
|
7 |
+
* @author Cyrill at Schumacher dot fm @SchumacherFM
|
8 |
+
*/
|
9 |
+
-->
|
10 |
<config>
|
11 |
<modules>
|
12 |
<SchumacherFM_Markdown>
|
15 |
</modules>
|
16 |
|
17 |
<global>
|
18 |
+
<cache>
|
19 |
+
<types>
|
20 |
+
<markdown translate="label,description" module="markdown">
|
21 |
+
<label>Markdown</label>
|
22 |
+
<description>Compiled Markdown files</description>
|
23 |
+
<tags>MARKDOWN</tags>
|
24 |
+
</markdown>
|
25 |
+
</types>
|
26 |
+
</cache>
|
27 |
<models>
|
28 |
<markdown>
|
29 |
<class>SchumacherFM_Markdown_Model</class>
|
121 |
<adminhtml_block_html_before>
|
122 |
<observers>
|
123 |
<markdown_adminhtml_block_html_before_textarea>
|
124 |
+
<type>singleton</type>
|
125 |
<class>markdown/observer_adminhtml_block</class>
|
126 |
<method>alterTextareaBlockTemplate</method>
|
127 |
</markdown_adminhtml_block_html_before_textarea>
|
145 |
<markdown>
|
146 |
<markdown>
|
147 |
<enable>1</enable>
|
148 |
+
<enable_email>0</enable_email>
|
149 |
<cheatsheet>https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet</cheatsheet>
|
150 |
<detection_tag>!#markdown</detection_tag>
|
151 |
+
<hide_insert_image_button>1</hide_insert_image_button>
|
152 |
+
<highlight_style>github.css</highlight_style>
|
153 |
+
<preview_style>github.css</preview_style>
|
154 |
+
<cache_lifetime>86400</cache_lifetime>
|
155 |
</markdown>
|
156 |
<markdown_extra>
|
157 |
<enable>0</enable>
|
@@ -35,6 +35,15 @@
|
|
35 |
<show_in_website>1</show_in_website>
|
36 |
<show_in_store>1</show_in_store>
|
37 |
</enable>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
<cheatsheet translate="label">
|
39 |
<label>Markdown Cheat Sheet URL</label>
|
40 |
<frontend_type>text</frontend_type>
|
@@ -58,6 +67,56 @@
|
|
58 |
Only transactional emails which have the detection tag somewhere integrated will be rendered with markdown.
|
59 |
</comment>
|
60 |
</detection_tag>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
<custom_layout_handles translate="label">
|
62 |
<label>Additional Layout Handles</label>
|
63 |
<frontend_type>textarea</frontend_type>
|
@@ -66,11 +125,10 @@
|
|
66 |
<show_in_website>1</show_in_website>
|
67 |
<show_in_store>1</show_in_store>
|
68 |
<comment>Expert Mode: Load Markdown feature and EpicEditor also via these custom layout handles.
|
69 |
-
|
70 |
on the body tag. Most handles starts with adminhtml-... Replace the - with _. Full string is required.
|
71 |
</comment>
|
72 |
</custom_layout_handles>
|
73 |
-
|
74 |
</fields>
|
75 |
</markdown>
|
76 |
|
35 |
<show_in_website>1</show_in_website>
|
36 |
<show_in_store>1</show_in_store>
|
37 |
</enable>
|
38 |
+
<enable_email translate="label">
|
39 |
+
<label>Enable Markdown for e-mail</label>
|
40 |
+
<frontend_type>select</frontend_type>
|
41 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
42 |
+
<sort_order>11</sort_order>
|
43 |
+
<show_in_default>1</show_in_default>
|
44 |
+
<show_in_website>1</show_in_website>
|
45 |
+
<show_in_store>1</show_in_store>
|
46 |
+
</enable_email>
|
47 |
<cheatsheet translate="label">
|
48 |
<label>Markdown Cheat Sheet URL</label>
|
49 |
<frontend_type>text</frontend_type>
|
67 |
Only transactional emails which have the detection tag somewhere integrated will be rendered with markdown.
|
68 |
</comment>
|
69 |
</detection_tag>
|
70 |
+
<hide_insert_image_button translate="label">
|
71 |
+
<label>Hide Insert Image ... button</label>
|
72 |
+
<frontend_type>select</frontend_type>
|
73 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
74 |
+
<sort_order>40</sort_order>
|
75 |
+
<show_in_default>1</show_in_default>
|
76 |
+
<show_in_website>1</show_in_website>
|
77 |
+
<show_in_store>1</show_in_store>
|
78 |
+
</hide_insert_image_button>
|
79 |
+
<highlight_style translate="label">
|
80 |
+
<label>HTML Source Preview Style</label>
|
81 |
+
<frontend_type>select</frontend_type>
|
82 |
+
<source_model>markdown/options_styles_highLightStyles</source_model>
|
83 |
+
<sort_order>50</sort_order>
|
84 |
+
<show_in_default>1</show_in_default>
|
85 |
+
<show_in_website>1</show_in_website>
|
86 |
+
<show_in_store>1</show_in_store>
|
87 |
+
</highlight_style>
|
88 |
+
|
89 |
+
<preview_style translate="label">
|
90 |
+
<label>Markdown Preview Style</label>
|
91 |
+
<frontend_type>select</frontend_type>
|
92 |
+
<source_model>markdown/options_styles_MarkdownStyles</source_model>
|
93 |
+
<sort_order>60</sort_order>
|
94 |
+
<show_in_default>1</show_in_default>
|
95 |
+
<show_in_website>1</show_in_website>
|
96 |
+
<show_in_store>1</show_in_store>
|
97 |
+
</preview_style>
|
98 |
+
|
99 |
+
<preview_iframe_css translate="label">
|
100 |
+
<label>CSS Style for all three preview iFrames</label>
|
101 |
+
<frontend_type>text</frontend_type>
|
102 |
+
<sort_order>70</sort_order>
|
103 |
+
<show_in_default>1</show_in_default>
|
104 |
+
<show_in_website>1</show_in_website>
|
105 |
+
<show_in_store>1</show_in_store>
|
106 |
+
<comment><![CDATA[This values will be inserted into the style="" tag.]]></comment>
|
107 |
+
</preview_iframe_css>
|
108 |
+
|
109 |
+
<textarea_style translate="label">
|
110 |
+
<label>Textarea Style</label>
|
111 |
+
<frontend_type>select</frontend_type>
|
112 |
+
<source_model>markdown/options_styles_TextareaStyles</source_model>
|
113 |
+
<sort_order>60</sort_order>
|
114 |
+
<show_in_default>1</show_in_default>
|
115 |
+
<show_in_website>1</show_in_website>
|
116 |
+
<show_in_store>1</show_in_store>
|
117 |
+
<comment><![CDATA[How the textarea field in the backend should look like.]]></comment>
|
118 |
+
</textarea_style>
|
119 |
+
|
120 |
<custom_layout_handles translate="label">
|
121 |
<label>Additional Layout Handles</label>
|
122 |
<frontend_type>textarea</frontend_type>
|
125 |
<show_in_website>1</show_in_website>
|
126 |
<show_in_store>1</show_in_store>
|
127 |
<comment>Expert Mode: Load Markdown feature and EpicEditor also via these custom layout handles.
|
128 |
+
A whitespace separated list. Q: Where can I find the name of a Layout Handle? A: View the class attribute
|
129 |
on the body tag. Most handles starts with adminhtml-... Replace the - with _. Full string is required.
|
130 |
</comment>
|
131 |
</custom_layout_handles>
|
|
|
132 |
</fields>
|
133 |
</markdown>
|
134 |
|
@@ -3,6 +3,12 @@
|
|
3 |
<!--@see SchumacherFM_Markdown_Model_Observer_Adminhtml_LayoutUpdate-->
|
4 |
<MARKDOWN_HEADER>
|
5 |
<reference name="head">
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
<action method="addJs">
|
7 |
<script>markdown/adminhtml/reMarked.js</script>
|
8 |
</action>
|
3 |
<!--@see SchumacherFM_Markdown_Model_Observer_Adminhtml_LayoutUpdate-->
|
4 |
<MARKDOWN_HEADER>
|
5 |
<reference name="head">
|
6 |
+
<action method="addJs">
|
7 |
+
<script>markdown/adminhtml/beautify-html.js</script>
|
8 |
+
</action>
|
9 |
+
<action method="addJs">
|
10 |
+
<script>markdown/adminhtml/highlight.pack.js</script>
|
11 |
+
</action>
|
12 |
<action method="addJs">
|
13 |
<script>markdown/adminhtml/reMarked.js</script>
|
14 |
</action>
|
@@ -0,0 +1,840 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */
|
2 |
+
/*
|
3 |
+
https://github.com/einars/js-beautify/blob/master/js/lib/beautify-html.js
|
4 |
+
The MIT License (MIT)
|
5 |
+
|
6 |
+
Copyright (c) 2007-2013 Einar Lielmanis and contributors.
|
7 |
+
|
8 |
+
Permission is hereby granted, free of charge, to any person
|
9 |
+
obtaining a copy of this software and associated documentation files
|
10 |
+
(the "Software"), to deal in the Software without restriction,
|
11 |
+
including without limitation the rights to use, copy, modify, merge,
|
12 |
+
publish, distribute, sublicense, and/or sell copies of the Software,
|
13 |
+
and to permit persons to whom the Software is furnished to do so,
|
14 |
+
subject to the following conditions:
|
15 |
+
|
16 |
+
The above copyright notice and this permission notice shall be
|
17 |
+
included in all copies or substantial portions of the Software.
|
18 |
+
|
19 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
20 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
21 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
22 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
23 |
+
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
24 |
+
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
25 |
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26 |
+
SOFTWARE.
|
27 |
+
|
28 |
+
|
29 |
+
Style HTML
|
30 |
+
---------------
|
31 |
+
|
32 |
+
Written by Nochum Sossonko, (nsossonko@hotmail.com)
|
33 |
+
|
34 |
+
Based on code initially developed by: Einar Lielmanis, <elfz@laacz.lv>
|
35 |
+
http://jsbeautifier.org/
|
36 |
+
|
37 |
+
Usage:
|
38 |
+
style_html(html_source);
|
39 |
+
|
40 |
+
style_html(html_source, options);
|
41 |
+
|
42 |
+
The options are:
|
43 |
+
indent_inner_html (default false) — indent <head> and <body> sections,
|
44 |
+
indent_size (default 4) — indentation size,
|
45 |
+
indent_char (default space) — character to indent with,
|
46 |
+
wrap_line_length (default 250) - maximum amount of characters per line (0 = disable)
|
47 |
+
brace_style (default "collapse") - "collapse" | "expand" | "end-expand"
|
48 |
+
put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line.
|
49 |
+
unformatted (defaults to inline tags) - list of tags, that shouldn't be reformatted
|
50 |
+
indent_scripts (default normal) - "keep"|"separate"|"normal"
|
51 |
+
preserve_newlines (default true) - whether existing line breaks before elements should be preserved
|
52 |
+
Only works before elements, not inside tags or for text.
|
53 |
+
max_preserve_newlines (default unlimited) - maximum number of line breaks to be preserved in one chunk
|
54 |
+
indent_handlebars (default false) - format and indent {{#foo}} and {{/foo}}
|
55 |
+
|
56 |
+
e.g.
|
57 |
+
|
58 |
+
style_html(html_source, {
|
59 |
+
'indent_inner_html': false,
|
60 |
+
'indent_size': 2,
|
61 |
+
'indent_char': ' ',
|
62 |
+
'wrap_line_length': 78,
|
63 |
+
'brace_style': 'expand',
|
64 |
+
'unformatted': ['a', 'sub', 'sup', 'b', 'i', 'u'],
|
65 |
+
'preserve_newlines': true,
|
66 |
+
'max_preserve_newlines': 5,
|
67 |
+
'indent_handlebars': false
|
68 |
+
});
|
69 |
+
*/
|
70 |
+
|
71 |
+
(function () {
|
72 |
+
|
73 |
+
function trim(s) {
|
74 |
+
return s.replace(/^\s+|\s+$/g, '');
|
75 |
+
}
|
76 |
+
|
77 |
+
function ltrim(s) {
|
78 |
+
return s.replace(/^\s+/g, '');
|
79 |
+
}
|
80 |
+
|
81 |
+
function style_html(html_source, options, js_beautify, css_beautify) {
|
82 |
+
//Wrapper function to invoke all the necessary constructors and deal with the output.
|
83 |
+
|
84 |
+
var multi_parser,
|
85 |
+
indent_inner_html,
|
86 |
+
indent_size,
|
87 |
+
indent_character,
|
88 |
+
wrap_line_length,
|
89 |
+
brace_style,
|
90 |
+
unformatted,
|
91 |
+
preserve_newlines,
|
92 |
+
max_preserve_newlines,
|
93 |
+
indent_handlebars;
|
94 |
+
|
95 |
+
options = options || {};
|
96 |
+
|
97 |
+
// backwards compatibility to 1.3.4
|
98 |
+
if ((options.wrap_line_length === undefined || parseInt(options.wrap_line_length, 10) === 0) &&
|
99 |
+
(options.max_char === undefined || parseInt(options.max_char, 10) === 0)) {
|
100 |
+
options.wrap_line_length = options.max_char;
|
101 |
+
}
|
102 |
+
|
103 |
+
indent_inner_html = options.indent_inner_html || false;
|
104 |
+
indent_size = parseInt(options.indent_size || 4, 10);
|
105 |
+
indent_character = options.indent_char || ' ';
|
106 |
+
brace_style = options.brace_style || 'collapse';
|
107 |
+
wrap_line_length = parseInt(options.wrap_line_length, 10) === 0 ? 32786 : parseInt(options.wrap_line_length || 250, 10);
|
108 |
+
unformatted = options.unformatted || ['a', 'span', 'bdo', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'sub', 'sup', 'tt', 'i', 'b', 'big', 'small', 'u', 's', 'strike', 'font', 'ins', 'del', 'pre', 'address', 'dt', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
109 |
+
preserve_newlines = options.preserve_newlines || true;
|
110 |
+
max_preserve_newlines = preserve_newlines ? parseInt(options.max_preserve_newlines || 32786, 10) : 0;
|
111 |
+
indent_handlebars = options.indent_handlebars || false;
|
112 |
+
|
113 |
+
function Parser() {
|
114 |
+
|
115 |
+
this.pos = 0; //Parser position
|
116 |
+
this.token = '';
|
117 |
+
this.current_mode = 'CONTENT'; //reflects the current Parser mode: TAG/CONTENT
|
118 |
+
this.tags = { //An object to hold tags, their position, and their parent-tags, initiated with default values
|
119 |
+
parent: 'parent1',
|
120 |
+
parentcount: 1,
|
121 |
+
parent1: ''
|
122 |
+
};
|
123 |
+
this.tag_type = '';
|
124 |
+
this.token_text = this.last_token = this.last_text = this.token_type = '';
|
125 |
+
this.newlines = 0;
|
126 |
+
this.indent_content = indent_inner_html;
|
127 |
+
|
128 |
+
this.Utils = { //Uilities made available to the various functions
|
129 |
+
whitespace: "\n\r\t ".split(''),
|
130 |
+
single_token: 'br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?='.split(','), //all the single tags for HTML
|
131 |
+
extra_liners: 'head,body,/html'.split(','), //for tags that need a line of whitespace before them
|
132 |
+
in_array: function (what, arr) {
|
133 |
+
for (var i = 0; i < arr.length; i++) {
|
134 |
+
if (what === arr[i]) {
|
135 |
+
return true;
|
136 |
+
}
|
137 |
+
}
|
138 |
+
return false;
|
139 |
+
}
|
140 |
+
};
|
141 |
+
|
142 |
+
this.traverse_whitespace = function () {
|
143 |
+
var input_char = '';
|
144 |
+
|
145 |
+
input_char = this.input.charAt(this.pos);
|
146 |
+
if (this.Utils.in_array(input_char, this.Utils.whitespace)) {
|
147 |
+
this.newlines = 0;
|
148 |
+
while (this.Utils.in_array(input_char, this.Utils.whitespace)) {
|
149 |
+
if (preserve_newlines && input_char === '\n' && this.newlines <= max_preserve_newlines) {
|
150 |
+
this.newlines += 1;
|
151 |
+
}
|
152 |
+
|
153 |
+
this.pos++;
|
154 |
+
input_char = this.input.charAt(this.pos);
|
155 |
+
}
|
156 |
+
return true;
|
157 |
+
}
|
158 |
+
return false;
|
159 |
+
};
|
160 |
+
|
161 |
+
this.get_content = function () { //function to capture regular content between tags
|
162 |
+
|
163 |
+
var input_char = '',
|
164 |
+
content = [],
|
165 |
+
space = false; //if a space is needed
|
166 |
+
|
167 |
+
while (this.input.charAt(this.pos) !== '<') {
|
168 |
+
if (this.pos >= this.input.length) {
|
169 |
+
return content.length ? content.join('') : ['', 'TK_EOF'];
|
170 |
+
}
|
171 |
+
|
172 |
+
if (this.traverse_whitespace()) {
|
173 |
+
if (content.length) {
|
174 |
+
space = true;
|
175 |
+
}
|
176 |
+
continue; //don't want to insert unnecessary space
|
177 |
+
}
|
178 |
+
|
179 |
+
if (indent_handlebars) {
|
180 |
+
// Handlebars parsing is complicated.
|
181 |
+
// {{#foo}} and {{/foo}} are formatted tags.
|
182 |
+
// {{something}} should get treated as content, except:
|
183 |
+
// {{else}} specifically behaves like {{#if}} and {{/if}}
|
184 |
+
var peek3 = this.input.substr(this.pos, 3);
|
185 |
+
if (peek3 === '{{#' || peek3 === '{{/') {
|
186 |
+
// These are tags and not content.
|
187 |
+
break;
|
188 |
+
} else if (this.input.substr(this.pos, 2) === '{{') {
|
189 |
+
if (this.get_tag(true) === '{{else}}') {
|
190 |
+
break;
|
191 |
+
}
|
192 |
+
}
|
193 |
+
}
|
194 |
+
|
195 |
+
input_char = this.input.charAt(this.pos);
|
196 |
+
this.pos++;
|
197 |
+
|
198 |
+
if (space) {
|
199 |
+
if (this.line_char_count >= this.wrap_line_length) { //insert a line when the wrap_line_length is reached
|
200 |
+
this.print_newline(false, content);
|
201 |
+
this.print_indentation(content);
|
202 |
+
} else {
|
203 |
+
this.line_char_count++;
|
204 |
+
content.push(' ');
|
205 |
+
}
|
206 |
+
space = false;
|
207 |
+
}
|
208 |
+
this.line_char_count++;
|
209 |
+
content.push(input_char); //letter at-a-time (or string) inserted to an array
|
210 |
+
}
|
211 |
+
return content.length ? content.join('') : '';
|
212 |
+
};
|
213 |
+
|
214 |
+
this.get_contents_to = function (name) { //get the full content of a script or style to pass to js_beautify
|
215 |
+
if (this.pos === this.input.length) {
|
216 |
+
return ['', 'TK_EOF'];
|
217 |
+
}
|
218 |
+
var input_char = '';
|
219 |
+
var content = '';
|
220 |
+
var reg_match = new RegExp('</' + name + '\\s*>', 'igm');
|
221 |
+
reg_match.lastIndex = this.pos;
|
222 |
+
var reg_array = reg_match.exec(this.input);
|
223 |
+
var end_script = reg_array ? reg_array.index : this.input.length; //absolute end of script
|
224 |
+
if (this.pos < end_script) { //get everything in between the script tags
|
225 |
+
content = this.input.substring(this.pos, end_script);
|
226 |
+
this.pos = end_script;
|
227 |
+
}
|
228 |
+
return content;
|
229 |
+
};
|
230 |
+
|
231 |
+
this.record_tag = function (tag) { //function to record a tag and its parent in this.tags Object
|
232 |
+
if (this.tags[tag + 'count']) { //check for the existence of this tag type
|
233 |
+
this.tags[tag + 'count']++;
|
234 |
+
this.tags[tag + this.tags[tag + 'count']] = this.indent_level; //and record the present indent level
|
235 |
+
} else { //otherwise initialize this tag type
|
236 |
+
this.tags[tag + 'count'] = 1;
|
237 |
+
this.tags[tag + this.tags[tag + 'count']] = this.indent_level; //and record the present indent level
|
238 |
+
}
|
239 |
+
this.tags[tag + this.tags[tag + 'count'] + 'parent'] = this.tags.parent; //set the parent (i.e. in the case of a div this.tags.div1parent)
|
240 |
+
this.tags.parent = tag + this.tags[tag + 'count']; //and make this the current parent (i.e. in the case of a div 'div1')
|
241 |
+
};
|
242 |
+
|
243 |
+
this.retrieve_tag = function (tag) { //function to retrieve the opening tag to the corresponding closer
|
244 |
+
if (this.tags[tag + 'count']) { //if the openener is not in the Object we ignore it
|
245 |
+
var temp_parent = this.tags.parent; //check to see if it's a closable tag.
|
246 |
+
while (temp_parent) { //till we reach '' (the initial value);
|
247 |
+
if (tag + this.tags[tag + 'count'] === temp_parent) { //if this is it use it
|
248 |
+
break;
|
249 |
+
}
|
250 |
+
temp_parent = this.tags[temp_parent + 'parent']; //otherwise keep on climbing up the DOM Tree
|
251 |
+
}
|
252 |
+
if (temp_parent) { //if we caught something
|
253 |
+
this.indent_level = this.tags[tag + this.tags[tag + 'count']]; //set the indent_level accordingly
|
254 |
+
this.tags.parent = this.tags[temp_parent + 'parent']; //and set the current parent
|
255 |
+
}
|
256 |
+
delete this.tags[tag + this.tags[tag + 'count'] + 'parent']; //delete the closed tags parent reference...
|
257 |
+
delete this.tags[tag + this.tags[tag + 'count']]; //...and the tag itself
|
258 |
+
if (this.tags[tag + 'count'] === 1) {
|
259 |
+
delete this.tags[tag + 'count'];
|
260 |
+
} else {
|
261 |
+
this.tags[tag + 'count']--;
|
262 |
+
}
|
263 |
+
}
|
264 |
+
};
|
265 |
+
|
266 |
+
this.indent_to_tag = function (tag) {
|
267 |
+
// Match the indentation level to the last use of this tag, but don't remove it.
|
268 |
+
if (!this.tags[tag + 'count']) {
|
269 |
+
return;
|
270 |
+
}
|
271 |
+
var temp_parent = this.tags.parent;
|
272 |
+
while (temp_parent) {
|
273 |
+
if (tag + this.tags[tag + 'count'] === temp_parent) {
|
274 |
+
break;
|
275 |
+
}
|
276 |
+
temp_parent = this.tags[temp_parent + 'parent'];
|
277 |
+
}
|
278 |
+
if (temp_parent) {
|
279 |
+
this.indent_level = this.tags[tag + this.tags[tag + 'count']];
|
280 |
+
}
|
281 |
+
};
|
282 |
+
|
283 |
+
this.get_tag = function (peek) { //function to get a full tag and parse its type
|
284 |
+
var input_char = '',
|
285 |
+
content = [],
|
286 |
+
comment = '',
|
287 |
+
space = false,
|
288 |
+
tag_start, tag_end,
|
289 |
+
tag_start_char,
|
290 |
+
orig_pos = this.pos,
|
291 |
+
orig_line_char_count = this.line_char_count;
|
292 |
+
|
293 |
+
peek = peek !== undefined ? peek : false;
|
294 |
+
|
295 |
+
do {
|
296 |
+
if (this.pos >= this.input.length) {
|
297 |
+
if (peek) {
|
298 |
+
this.pos = orig_pos;
|
299 |
+
this.line_char_count = orig_line_char_count;
|
300 |
+
}
|
301 |
+
return content.length ? content.join('') : ['', 'TK_EOF'];
|
302 |
+
}
|
303 |
+
|
304 |
+
input_char = this.input.charAt(this.pos);
|
305 |
+
this.pos++;
|
306 |
+
|
307 |
+
if (this.Utils.in_array(input_char, this.Utils.whitespace)) { //don't want to insert unnecessary space
|
308 |
+
space = true;
|
309 |
+
continue;
|
310 |
+
}
|
311 |
+
|
312 |
+
if (input_char === "'" || input_char === '"') {
|
313 |
+
input_char += this.get_unformatted(input_char);
|
314 |
+
space = true;
|
315 |
+
|
316 |
+
}
|
317 |
+
|
318 |
+
if (input_char === '=') { //no space before =
|
319 |
+
space = false;
|
320 |
+
}
|
321 |
+
|
322 |
+
if (content.length && content[content.length - 1] !== '=' && input_char !== '>' && space) {
|
323 |
+
//no space after = or before >
|
324 |
+
if (this.line_char_count >= this.wrap_line_length) {
|
325 |
+
this.print_newline(false, content);
|
326 |
+
this.print_indentation(content);
|
327 |
+
} else {
|
328 |
+
content.push(' ');
|
329 |
+
this.line_char_count++;
|
330 |
+
}
|
331 |
+
space = false;
|
332 |
+
}
|
333 |
+
|
334 |
+
if (indent_handlebars && tag_start_char === '<') {
|
335 |
+
// When inside an angle-bracket tag, put spaces around
|
336 |
+
// handlebars not inside of strings.
|
337 |
+
if ((input_char + this.input.charAt(this.pos)) === '{{') {
|
338 |
+
input_char += this.get_unformatted('}}');
|
339 |
+
if (content.length && content[content.length - 1] !== ' ' && content[content.length - 1] !== '<') {
|
340 |
+
input_char = ' ' + input_char;
|
341 |
+
}
|
342 |
+
space = true;
|
343 |
+
}
|
344 |
+
}
|
345 |
+
|
346 |
+
if (input_char === '<' && !tag_start_char) {
|
347 |
+
tag_start = this.pos - 1;
|
348 |
+
tag_start_char = '<';
|
349 |
+
}
|
350 |
+
|
351 |
+
if (indent_handlebars && !tag_start_char) {
|
352 |
+
if (content.length >= 2 && content[content.length - 1] === '{' && content[content.length - 2] == '{') {
|
353 |
+
if (input_char === '#' || input_char === '/') {
|
354 |
+
tag_start = this.pos - 3;
|
355 |
+
} else {
|
356 |
+
tag_start = this.pos - 2;
|
357 |
+
}
|
358 |
+
tag_start_char = '{';
|
359 |
+
}
|
360 |
+
}
|
361 |
+
|
362 |
+
this.line_char_count++;
|
363 |
+
content.push(input_char); //inserts character at-a-time (or string)
|
364 |
+
|
365 |
+
if (content[1] && content[1] === '!') { //if we're in a comment, do something special
|
366 |
+
// We treat all comments as literals, even more than preformatted tags
|
367 |
+
// we just look for the appropriate close tag
|
368 |
+
content = [this.get_comment(tag_start)];
|
369 |
+
break;
|
370 |
+
}
|
371 |
+
|
372 |
+
if (indent_handlebars && tag_start_char === '{' && content.length > 2 && content[content.length - 2] === '}' && content[content.length - 1] === '}') {
|
373 |
+
break;
|
374 |
+
}
|
375 |
+
} while (input_char !== '>');
|
376 |
+
|
377 |
+
var tag_complete = content.join('');
|
378 |
+
var tag_index;
|
379 |
+
var tag_offset;
|
380 |
+
|
381 |
+
if (tag_complete.indexOf(' ') !== -1) { //if there's whitespace, thats where the tag name ends
|
382 |
+
tag_index = tag_complete.indexOf(' ');
|
383 |
+
} else if (tag_complete[0] === '{') {
|
384 |
+
tag_index = tag_complete.indexOf('}');
|
385 |
+
} else { //otherwise go with the tag ending
|
386 |
+
tag_index = tag_complete.indexOf('>');
|
387 |
+
}
|
388 |
+
if (tag_complete[0] === '<' || !indent_handlebars) {
|
389 |
+
tag_offset = 1;
|
390 |
+
} else {
|
391 |
+
tag_offset = tag_complete[2] === '#' ? 3 : 2;
|
392 |
+
}
|
393 |
+
var tag_check = tag_complete.substring(tag_offset, tag_index).toLowerCase();
|
394 |
+
if (tag_complete.charAt(tag_complete.length - 2) === '/' ||
|
395 |
+
this.Utils.in_array(tag_check, this.Utils.single_token)) { //if this tag name is a single tag type (either in the list or has a closing /)
|
396 |
+
if (!peek) {
|
397 |
+
this.tag_type = 'SINGLE';
|
398 |
+
}
|
399 |
+
} else if (indent_handlebars && tag_complete[0] === '{' && tag_check === 'else') {
|
400 |
+
if (!peek) {
|
401 |
+
this.indent_to_tag('if');
|
402 |
+
this.tag_type = 'HANDLEBARS_ELSE';
|
403 |
+
this.indent_content = true;
|
404 |
+
this.traverse_whitespace();
|
405 |
+
}
|
406 |
+
} else if (tag_check === 'script') { //for later script handling
|
407 |
+
if (!peek) {
|
408 |
+
this.record_tag(tag_check);
|
409 |
+
this.tag_type = 'SCRIPT';
|
410 |
+
}
|
411 |
+
} else if (tag_check === 'style') { //for future style handling (for now it justs uses get_content)
|
412 |
+
if (!peek) {
|
413 |
+
this.record_tag(tag_check);
|
414 |
+
this.tag_type = 'STYLE';
|
415 |
+
}
|
416 |
+
} else if (this.is_unformatted(tag_check, unformatted)) { // do not reformat the "unformatted" tags
|
417 |
+
comment = this.get_unformatted('</' + tag_check + '>', tag_complete); //...delegate to get_unformatted function
|
418 |
+
content.push(comment);
|
419 |
+
// Preserve collapsed whitespace either before or after this tag.
|
420 |
+
if (tag_start > 0 && this.Utils.in_array(this.input.charAt(tag_start - 1), this.Utils.whitespace)) {
|
421 |
+
content.splice(0, 0, this.input.charAt(tag_start - 1));
|
422 |
+
}
|
423 |
+
tag_end = this.pos - 1;
|
424 |
+
if (this.Utils.in_array(this.input.charAt(tag_end + 1), this.Utils.whitespace)) {
|
425 |
+
content.push(this.input.charAt(tag_end + 1));
|
426 |
+
}
|
427 |
+
this.tag_type = 'SINGLE';
|
428 |
+
} else if (tag_check.charAt(0) === '!') { //peek for <! comment
|
429 |
+
// for comments content is already correct.
|
430 |
+
if (!peek) {
|
431 |
+
this.tag_type = 'SINGLE';
|
432 |
+
this.traverse_whitespace();
|
433 |
+
}
|
434 |
+
} else if (!peek) {
|
435 |
+
if (tag_check.charAt(0) === '/') { //this tag is a double tag so check for tag-ending
|
436 |
+
this.retrieve_tag(tag_check.substring(1)); //remove it and all ancestors
|
437 |
+
this.tag_type = 'END';
|
438 |
+
this.traverse_whitespace();
|
439 |
+
} else { //otherwise it's a start-tag
|
440 |
+
this.record_tag(tag_check); //push it on the tag stack
|
441 |
+
if (tag_check.toLowerCase() !== 'html') {
|
442 |
+
this.indent_content = true;
|
443 |
+
}
|
444 |
+
this.tag_type = 'START';
|
445 |
+
|
446 |
+
// Allow preserving of newlines after a start tag
|
447 |
+
this.traverse_whitespace();
|
448 |
+
}
|
449 |
+
if (this.Utils.in_array(tag_check, this.Utils.extra_liners)) { //check if this double needs an extra line
|
450 |
+
this.print_newline(false, this.output);
|
451 |
+
if (this.output.length && this.output[this.output.length - 2] !== '\n') {
|
452 |
+
this.print_newline(true, this.output);
|
453 |
+
}
|
454 |
+
}
|
455 |
+
}
|
456 |
+
|
457 |
+
if (peek) {
|
458 |
+
this.pos = orig_pos;
|
459 |
+
this.line_char_count = orig_line_char_count;
|
460 |
+
}
|
461 |
+
|
462 |
+
return content.join(''); //returns fully formatted tag
|
463 |
+
};
|
464 |
+
|
465 |
+
this.get_comment = function (start_pos) { //function to return comment content in its entirety
|
466 |
+
// this is will have very poor perf, but will work for now.
|
467 |
+
var comment = '',
|
468 |
+
delimiter = '>',
|
469 |
+
matched = false;
|
470 |
+
|
471 |
+
this.pos = start_pos;
|
472 |
+
input_char = this.input.charAt(this.pos);
|
473 |
+
this.pos++;
|
474 |
+
|
475 |
+
while (this.pos <= this.input.length) {
|
476 |
+
comment += input_char;
|
477 |
+
|
478 |
+
// only need to check for the delimiter if the last chars match
|
479 |
+
if (comment[comment.length - 1] === delimiter[delimiter.length - 1] &&
|
480 |
+
comment.indexOf(delimiter) !== -1) {
|
481 |
+
break;
|
482 |
+
}
|
483 |
+
|
484 |
+
// only need to search for custom delimiter for the first few characters
|
485 |
+
if (!matched && comment.length < 10) {
|
486 |
+
if (comment.indexOf('<![if') === 0) { //peek for <![if conditional comment
|
487 |
+
delimiter = '<![endif]>';
|
488 |
+
matched = true;
|
489 |
+
} else if (comment.indexOf('<![cdata[') === 0) { //if it's a <[cdata[ comment...
|
490 |
+
delimiter = ']]>';
|
491 |
+
matched = true;
|
492 |
+
} else if (comment.indexOf('<![') === 0) { // some other ![ comment? ...
|
493 |
+
delimiter = ']>';
|
494 |
+
matched = true;
|
495 |
+
} else if (comment.indexOf('<!--') === 0) { // <!-- comment ...
|
496 |
+
delimiter = '-->';
|
497 |
+
matched = true;
|
498 |
+
}
|
499 |
+
}
|
500 |
+
|
501 |
+
input_char = this.input.charAt(this.pos);
|
502 |
+
this.pos++;
|
503 |
+
}
|
504 |
+
|
505 |
+
return comment;
|
506 |
+
};
|
507 |
+
|
508 |
+
this.get_unformatted = function (delimiter, orig_tag) { //function to return unformatted content in its entirety
|
509 |
+
|
510 |
+
if (orig_tag && orig_tag.toLowerCase().indexOf(delimiter) !== -1) {
|
511 |
+
return '';
|
512 |
+
}
|
513 |
+
var input_char = '';
|
514 |
+
var content = '';
|
515 |
+
var min_index = 0;
|
516 |
+
var space = true;
|
517 |
+
do {
|
518 |
+
|
519 |
+
if (this.pos >= this.input.length) {
|
520 |
+
return content;
|
521 |
+
}
|
522 |
+
|
523 |
+
input_char = this.input.charAt(this.pos);
|
524 |
+
this.pos++;
|
525 |
+
|
526 |
+
if (this.Utils.in_array(input_char, this.Utils.whitespace)) {
|
527 |
+
if (!space) {
|
528 |
+
this.line_char_count--;
|
529 |
+
continue;
|
530 |
+
}
|
531 |
+
if (input_char === '\n' || input_char === '\r') {
|
532 |
+
content += '\n';
|
533 |
+
/* Don't change tab indention for unformatted blocks. If using code for html editing, this will greatly affect <pre> tags if they are specified in the 'unformatted array'
|
534 |
+
for (var i=0; i<this.indent_level; i++) {
|
535 |
+
content += this.indent_string;
|
536 |
+
}
|
537 |
+
space = false; //...and make sure other indentation is erased
|
538 |
+
*/
|
539 |
+
this.line_char_count = 0;
|
540 |
+
continue;
|
541 |
+
}
|
542 |
+
}
|
543 |
+
content += input_char;
|
544 |
+
this.line_char_count++;
|
545 |
+
space = true;
|
546 |
+
|
547 |
+
if (indent_handlebars && input_char === '{' && content.length && content[content.length - 2] === '{') {
|
548 |
+
// Handlebars expressions in strings should also be unformatted.
|
549 |
+
content += this.get_unformatted('}}');
|
550 |
+
// These expressions are opaque. Ignore delimiters found in them.
|
551 |
+
min_index = content.length;
|
552 |
+
}
|
553 |
+
} while (content.toLowerCase().indexOf(delimiter, min_index) === -1);
|
554 |
+
return content;
|
555 |
+
};
|
556 |
+
|
557 |
+
this.get_token = function () { //initial handler for token-retrieval
|
558 |
+
var token;
|
559 |
+
|
560 |
+
if (this.last_token === 'TK_TAG_SCRIPT' || this.last_token === 'TK_TAG_STYLE') { //check if we need to format javascript
|
561 |
+
var type = this.last_token.substr(7);
|
562 |
+
token = this.get_contents_to(type);
|
563 |
+
if (typeof token !== 'string') {
|
564 |
+
return token;
|
565 |
+
}
|
566 |
+
return [token, 'TK_' + type];
|
567 |
+
}
|
568 |
+
if (this.current_mode === 'CONTENT') {
|
569 |
+
token = this.get_content();
|
570 |
+
if (typeof token !== 'string') {
|
571 |
+
return token;
|
572 |
+
} else {
|
573 |
+
return [token, 'TK_CONTENT'];
|
574 |
+
}
|
575 |
+
}
|
576 |
+
|
577 |
+
if (this.current_mode === 'TAG') {
|
578 |
+
token = this.get_tag();
|
579 |
+
if (typeof token !== 'string') {
|
580 |
+
return token;
|
581 |
+
} else {
|
582 |
+
var tag_name_type = 'TK_TAG_' + this.tag_type;
|
583 |
+
return [token, tag_name_type];
|
584 |
+
}
|
585 |
+
}
|
586 |
+
};
|
587 |
+
|
588 |
+
this.get_full_indent = function (level) {
|
589 |
+
level = this.indent_level + level || 0;
|
590 |
+
if (level < 1) {
|
591 |
+
return '';
|
592 |
+
}
|
593 |
+
|
594 |
+
return Array(level + 1).join(this.indent_string);
|
595 |
+
};
|
596 |
+
|
597 |
+
this.is_unformatted = function (tag_check, unformatted) {
|
598 |
+
//is this an HTML5 block-level link?
|
599 |
+
if (!this.Utils.in_array(tag_check, unformatted)) {
|
600 |
+
return false;
|
601 |
+
}
|
602 |
+
|
603 |
+
if (tag_check.toLowerCase() !== 'a' || !this.Utils.in_array('a', unformatted)) {
|
604 |
+
return true;
|
605 |
+
}
|
606 |
+
|
607 |
+
//at this point we have an tag; is its first child something we want to remain
|
608 |
+
//unformatted?
|
609 |
+
var next_tag = this.get_tag(true /* peek. */);
|
610 |
+
|
611 |
+
// test next_tag to see if it is just html tag (no external content)
|
612 |
+
var tag = (next_tag || "").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);
|
613 |
+
|
614 |
+
// if next_tag comes back but is not an isolated tag, then
|
615 |
+
// let's treat the 'a' tag as having content
|
616 |
+
// and respect the unformatted option
|
617 |
+
if (!tag || this.Utils.in_array(tag, unformatted)) {
|
618 |
+
return true;
|
619 |
+
} else {
|
620 |
+
return false;
|
621 |
+
}
|
622 |
+
};
|
623 |
+
|
624 |
+
this.printer = function (js_source, indent_character, indent_size, wrap_line_length, brace_style) { //handles input/output and some other printing functions
|
625 |
+
|
626 |
+
this.input = js_source || ''; //gets the input for the Parser
|
627 |
+
this.output = [];
|
628 |
+
this.indent_character = indent_character;
|
629 |
+
this.indent_string = '';
|
630 |
+
this.indent_size = indent_size;
|
631 |
+
this.brace_style = brace_style;
|
632 |
+
this.indent_level = 0;
|
633 |
+
this.wrap_line_length = wrap_line_length;
|
634 |
+
this.line_char_count = 0; //count to see if wrap_line_length was exceeded
|
635 |
+
|
636 |
+
for (var i = 0; i < this.indent_size; i++) {
|
637 |
+
this.indent_string += this.indent_character;
|
638 |
+
}
|
639 |
+
|
640 |
+
this.print_newline = function (force, arr) {
|
641 |
+
this.line_char_count = 0;
|
642 |
+
if (!arr || !arr.length) {
|
643 |
+
return;
|
644 |
+
}
|
645 |
+
if (force || (arr[arr.length - 1] !== '\n')) { //we might want the extra line
|
646 |
+
arr.push('\n');
|
647 |
+
}
|
648 |
+
};
|
649 |
+
|
650 |
+
this.print_indentation = function (arr) {
|
651 |
+
for (var i = 0; i < this.indent_level; i++) {
|
652 |
+
arr.push(this.indent_string);
|
653 |
+
this.line_char_count += this.indent_string.length;
|
654 |
+
}
|
655 |
+
};
|
656 |
+
|
657 |
+
this.print_token = function (text) {
|
658 |
+
if (text || text !== '') {
|
659 |
+
if (this.output.length && this.output[this.output.length - 1] === '\n') {
|
660 |
+
this.print_indentation(this.output);
|
661 |
+
text = ltrim(text);
|
662 |
+
}
|
663 |
+
}
|
664 |
+
this.print_token_raw(text);
|
665 |
+
};
|
666 |
+
|
667 |
+
this.print_token_raw = function (text) {
|
668 |
+
if (text && text !== '') {
|
669 |
+
if (text.length > 1 && text[text.length - 1] === '\n') {
|
670 |
+
// unformatted tags can grab newlines as their last character
|
671 |
+
this.output.push(text.slice(0, -1));
|
672 |
+
this.print_newline(false, this.output);
|
673 |
+
} else {
|
674 |
+
this.output.push(text);
|
675 |
+
}
|
676 |
+
}
|
677 |
+
|
678 |
+
for (var n = 0; n < this.newlines; n++) {
|
679 |
+
this.print_newline(n > 0, this.output);
|
680 |
+
}
|
681 |
+
this.newlines = 0;
|
682 |
+
};
|
683 |
+
|
684 |
+
this.indent = function () {
|
685 |
+
this.indent_level++;
|
686 |
+
};
|
687 |
+
|
688 |
+
this.unindent = function () {
|
689 |
+
if (this.indent_level > 0) {
|
690 |
+
this.indent_level--;
|
691 |
+
}
|
692 |
+
};
|
693 |
+
};
|
694 |
+
return this;
|
695 |
+
}
|
696 |
+
|
697 |
+
/*_____________________--------------------_____________________*/
|
698 |
+
|
699 |
+
multi_parser = new Parser(); //wrapping functions Parser
|
700 |
+
multi_parser.printer(html_source, indent_character, indent_size, wrap_line_length, brace_style); //initialize starting values
|
701 |
+
|
702 |
+
while (true) {
|
703 |
+
var t = multi_parser.get_token();
|
704 |
+
multi_parser.token_text = t[0];
|
705 |
+
multi_parser.token_type = t[1];
|
706 |
+
|
707 |
+
if (multi_parser.token_type === 'TK_EOF') {
|
708 |
+
break;
|
709 |
+
}
|
710 |
+
|
711 |
+
switch (multi_parser.token_type) {
|
712 |
+
case 'TK_TAG_START':
|
713 |
+
multi_parser.print_newline(false, multi_parser.output);
|
714 |
+
multi_parser.print_token(multi_parser.token_text);
|
715 |
+
if (multi_parser.indent_content) {
|
716 |
+
multi_parser.indent();
|
717 |
+
multi_parser.indent_content = false;
|
718 |
+
}
|
719 |
+
multi_parser.current_mode = 'CONTENT';
|
720 |
+
break;
|
721 |
+
case 'TK_TAG_STYLE':
|
722 |
+
case 'TK_TAG_SCRIPT':
|
723 |
+
multi_parser.print_newline(false, multi_parser.output);
|
724 |
+
multi_parser.print_token(multi_parser.token_text);
|
725 |
+
multi_parser.current_mode = 'CONTENT';
|
726 |
+
break;
|
727 |
+
case 'TK_TAG_END':
|
728 |
+
//Print new line only if the tag has no content and has child
|
729 |
+
if (multi_parser.last_token === 'TK_CONTENT' && multi_parser.last_text === '') {
|
730 |
+
var tag_name = multi_parser.token_text.match(/\w+/)[0];
|
731 |
+
var tag_extracted_from_last_output = null;
|
732 |
+
if (multi_parser.output.length) {
|
733 |
+
tag_extracted_from_last_output = multi_parser.output[multi_parser.output.length - 1].match(/(?:<|{{#)\s*(\w+)/);
|
734 |
+
}
|
735 |
+
if (tag_extracted_from_last_output === null ||
|
736 |
+
tag_extracted_from_last_output[1] !== tag_name) {
|
737 |
+
multi_parser.print_newline(false, multi_parser.output);
|
738 |
+
}
|
739 |
+
}
|
740 |
+
multi_parser.print_token(multi_parser.token_text);
|
741 |
+
multi_parser.current_mode = 'CONTENT';
|
742 |
+
break;
|
743 |
+
case 'TK_TAG_SINGLE':
|
744 |
+
// Don't add a newline before elements that should remain unformatted.
|
745 |
+
var tag_check = multi_parser.token_text.match(/^\s*<([a-z]+)/i);
|
746 |
+
if (!tag_check || !multi_parser.Utils.in_array(tag_check[1], unformatted)) {
|
747 |
+
multi_parser.print_newline(false, multi_parser.output);
|
748 |
+
}
|
749 |
+
multi_parser.print_token(multi_parser.token_text);
|
750 |
+
multi_parser.current_mode = 'CONTENT';
|
751 |
+
break;
|
752 |
+
case 'TK_TAG_HANDLEBARS_ELSE':
|
753 |
+
multi_parser.print_token(multi_parser.token_text);
|
754 |
+
if (multi_parser.indent_content) {
|
755 |
+
multi_parser.indent();
|
756 |
+
multi_parser.indent_content = false;
|
757 |
+
}
|
758 |
+
multi_parser.current_mode = 'CONTENT';
|
759 |
+
break;
|
760 |
+
case 'TK_CONTENT':
|
761 |
+
multi_parser.print_token(multi_parser.token_text);
|
762 |
+
multi_parser.current_mode = 'TAG';
|
763 |
+
break;
|
764 |
+
case 'TK_STYLE':
|
765 |
+
case 'TK_SCRIPT':
|
766 |
+
if (multi_parser.token_text !== '') {
|
767 |
+
multi_parser.print_newline(false, multi_parser.output);
|
768 |
+
var text = multi_parser.token_text,
|
769 |
+
_beautifier,
|
770 |
+
script_indent_level = 1;
|
771 |
+
if (multi_parser.token_type === 'TK_SCRIPT') {
|
772 |
+
_beautifier = typeof js_beautify === 'function' && js_beautify;
|
773 |
+
} else if (multi_parser.token_type === 'TK_STYLE') {
|
774 |
+
_beautifier = typeof css_beautify === 'function' && css_beautify;
|
775 |
+
}
|
776 |
+
|
777 |
+
if (options.indent_scripts === "keep") {
|
778 |
+
script_indent_level = 0;
|
779 |
+
} else if (options.indent_scripts === "separate") {
|
780 |
+
script_indent_level = -multi_parser.indent_level;
|
781 |
+
}
|
782 |
+
|
783 |
+
var indentation = multi_parser.get_full_indent(script_indent_level);
|
784 |
+
if (_beautifier) {
|
785 |
+
// call the Beautifier if avaliable
|
786 |
+
text = _beautifier(text.replace(/^\s*/, indentation), options);
|
787 |
+
} else {
|
788 |
+
// simply indent the string otherwise
|
789 |
+
var white = text.match(/^\s*/)[0];
|
790 |
+
var _level = white.match(/[^\n\r]*$/)[0].split(multi_parser.indent_string).length - 1;
|
791 |
+
var reindent = multi_parser.get_full_indent(script_indent_level - _level);
|
792 |
+
text = text.replace(/^\s*/, indentation)
|
793 |
+
.replace(/\r\n|\r|\n/g, '\n' + reindent)
|
794 |
+
.replace(/\s+$/, '');
|
795 |
+
}
|
796 |
+
if (text) {
|
797 |
+
multi_parser.print_token_raw(indentation + trim(text));
|
798 |
+
multi_parser.print_newline(false, multi_parser.output);
|
799 |
+
}
|
800 |
+
}
|
801 |
+
multi_parser.current_mode = 'TAG';
|
802 |
+
break;
|
803 |
+
}
|
804 |
+
multi_parser.last_token = multi_parser.token_type;
|
805 |
+
multi_parser.last_text = multi_parser.token_text;
|
806 |
+
}
|
807 |
+
return multi_parser.output.join('');
|
808 |
+
}
|
809 |
+
|
810 |
+
if (typeof define === "function") {
|
811 |
+
// Add support for require.js
|
812 |
+
define(["./beautify.js", "./beautify-css.js"], function (js_beautify, css_beautify) {
|
813 |
+
return {
|
814 |
+
html_beautify: function (html_source, options) {
|
815 |
+
return style_html(html_source, options, js_beautify, css_beautify);
|
816 |
+
}
|
817 |
+
};
|
818 |
+
});
|
819 |
+
} else if (typeof exports !== "undefined") {
|
820 |
+
// Add support for CommonJS. Just put this file somewhere on your require.paths
|
821 |
+
// and you will be able to `var html_beautify = require("beautify").html_beautify`.
|
822 |
+
var js_beautify = require('./beautify.js').js_beautify;
|
823 |
+
var css_beautify = require('./beautify-css.js').css_beautify;
|
824 |
+
|
825 |
+
exports.html_beautify = function (html_source, options) {
|
826 |
+
return style_html(html_source, options, js_beautify, css_beautify);
|
827 |
+
};
|
828 |
+
} else if (typeof window !== "undefined") {
|
829 |
+
// If we're running a web page and don't have either of the above, add our one global
|
830 |
+
window.html_beautify = function (html_source, options) {
|
831 |
+
return style_html(html_source, options, window.js_beautify, window.css_beautify);
|
832 |
+
};
|
833 |
+
} else if (typeof global !== "undefined") {
|
834 |
+
// If we don't even have window, try global.
|
835 |
+
global.html_beautify = function (html_source, options) {
|
836 |
+
return style_html(html_source, options, global.js_beautify, global.css_beautify);
|
837 |
+
};
|
838 |
+
}
|
839 |
+
|
840 |
+
}());
|
@@ -1,5 +1,5 @@
|
|
1 |
/*!
|
2 |
-
FileReader.js - v0.
|
3 |
A lightweight wrapper for common FileReader usage.
|
4 |
Copyright 2012 Brian Grinstead - MIT License.
|
5 |
See http://github.com/bgrins/filereader.js for documentation.
|
@@ -10,23 +10,30 @@
|
|
10 |
var FileReader = window.FileReader;
|
11 |
var FileReaderSyncSupport = false;
|
12 |
var workerScript = "self.addEventListener('message', function(e) { var data=e.data; try { var reader = new FileReaderSync; postMessage({ result: reader[data.readAs](data.file), extra: data.extra, file: data.file})} catch(e){ postMessage({ result:'error', extra:data.extra, file:data.file}); } }, false);";
|
13 |
-
var syncDetectionScript = "
|
14 |
var fileReaderEvents = ['loadstart', 'progress', 'load', 'abort', 'error', 'loadend'];
|
15 |
-
|
16 |
var FileReaderJS = window.FileReaderJS = {
|
17 |
enabled: false,
|
18 |
setupInput: setupInput,
|
19 |
setupDrop: setupDrop,
|
20 |
setupClipboard: setupClipboard,
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
output: [],
|
23 |
opts: {
|
24 |
dragClass: "drag",
|
25 |
accept: false,
|
26 |
readAsDefault: 'BinaryString',
|
27 |
readAsMap: {
|
28 |
-
'image/*': 'DataURL',
|
29 |
-
'text/*': 'Text'
|
30 |
},
|
31 |
on: {
|
32 |
loadstart: noop,
|
@@ -47,7 +54,7 @@
|
|
47 |
if (typeof(jQuery) !== "undefined") {
|
48 |
jQuery.fn.fileReaderJS = function (opts) {
|
49 |
return this.each(function () {
|
50 |
-
if (
|
51 |
setupInput(this, opts);
|
52 |
}
|
53 |
else {
|
@@ -63,46 +70,26 @@
|
|
63 |
};
|
64 |
}
|
65 |
|
66 |
-
// Not all browsers support the FileReader interface.
|
67 |
if (!FileReader) {
|
68 |
return;
|
69 |
}
|
70 |
|
71 |
-
// WorkerHelper is a little wrapper for generating web workers from strings
|
72 |
-
var WorkerHelper = (function () {
|
73 |
|
|
|
|
|
74 |
var URL = window.URL || window.webkitURL;
|
75 |
-
var
|
76 |
-
|
77 |
-
// May need to get just the URL in case it is needed for things beyond just creating a worker.
|
78 |
-
function getURL(script) {
|
79 |
-
if (window.Worker && BlobBuilder && URL) {
|
80 |
-
var bb = new BlobBuilder();
|
81 |
-
bb.append(script);
|
82 |
-
return URL.createObjectURL(bb.getBlob());
|
83 |
-
}
|
84 |
-
|
85 |
-
return null;
|
86 |
-
}
|
87 |
-
|
88 |
-
// If there is no need to revoke a URL later, or do anything fancy then just return the worker.
|
89 |
-
function getWorker(script, onmessage) {
|
90 |
-
var url = getURL(script);
|
91 |
-
if (url) {
|
92 |
-
var worker = new Worker(url);
|
93 |
-
worker.onmessage = onmessage;
|
94 |
-
return worker;
|
95 |
-
}
|
96 |
|
|
|
97 |
return null;
|
98 |
}
|
99 |
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
})();
|
106 |
|
107 |
// setupClipboard: bind to clipboard events (intended for document.body)
|
108 |
function setupClipboard(element, opts) {
|
@@ -298,12 +285,13 @@
|
|
298 |
return;
|
299 |
}
|
300 |
|
301 |
-
var
|
302 |
var syncWorker;
|
303 |
|
304 |
// Only initialize the synchronous worker if the option is enabled - to prevent the overhead
|
305 |
-
if (
|
306 |
-
syncWorker =
|
|
|
307 |
var file = e.data.file;
|
308 |
var result = e.data.result;
|
309 |
|
@@ -317,8 +305,7 @@
|
|
317 |
// Call error or load event depending on success of the read from the worker.
|
318 |
opts.on[result === "error" ? "error" : "load"]({ target: { result: result } }, file);
|
319 |
groupFileDone();
|
320 |
-
|
321 |
-
});
|
322 |
}
|
323 |
|
324 |
Array.prototype.forEach.call(files, function (file) {
|
@@ -339,7 +326,7 @@
|
|
339 |
|
340 |
var readAs = getReadAsMethod(file.type, opts.readAsMap, opts.readAsDefault);
|
341 |
|
342 |
-
if (
|
343 |
syncWorker.postMessage({
|
344 |
file: file,
|
345 |
extra: file.extra,
|
@@ -362,7 +349,6 @@
|
|
362 |
}
|
363 |
};
|
364 |
});
|
365 |
-
|
366 |
reader[readAs](file);
|
367 |
}
|
368 |
});
|
@@ -370,11 +356,11 @@
|
|
370 |
|
371 |
// checkFileReaderSyncSupport: Create a temporary worker and see if FileReaderSync exists
|
372 |
function checkFileReaderSyncSupport() {
|
373 |
-
var worker =
|
374 |
-
FileReaderSyncSupport = e.data;
|
375 |
-
});
|
376 |
-
|
377 |
if (worker) {
|
|
|
|
|
|
|
378 |
worker.postMessage({});
|
379 |
}
|
380 |
}
|
1 |
/*!
|
2 |
+
FileReader.js - v0.99
|
3 |
A lightweight wrapper for common FileReader usage.
|
4 |
Copyright 2012 Brian Grinstead - MIT License.
|
5 |
See http://github.com/bgrins/filereader.js for documentation.
|
10 |
var FileReader = window.FileReader;
|
11 |
var FileReaderSyncSupport = false;
|
12 |
var workerScript = "self.addEventListener('message', function(e) { var data=e.data; try { var reader = new FileReaderSync; postMessage({ result: reader[data.readAs](data.file), extra: data.extra, file: data.file})} catch(e){ postMessage({ result:'error', extra:data.extra, file:data.file}); } }, false);";
|
13 |
+
var syncDetectionScript = "onmessage = function(e) { postMessage(!!FileReaderSync); };";
|
14 |
var fileReaderEvents = ['loadstart', 'progress', 'load', 'abort', 'error', 'loadend'];
|
15 |
+
var sync = false;
|
16 |
var FileReaderJS = window.FileReaderJS = {
|
17 |
enabled: false,
|
18 |
setupInput: setupInput,
|
19 |
setupDrop: setupDrop,
|
20 |
setupClipboard: setupClipboard,
|
21 |
+
setSync: function (value) {
|
22 |
+
sync = value;
|
23 |
+
|
24 |
+
if (sync && !FileReaderSyncSupport) {
|
25 |
+
checkFileReaderSyncSupport();
|
26 |
+
}
|
27 |
+
},
|
28 |
+
getSync: function () {
|
29 |
+
return sync && FileReaderSyncSupport;
|
30 |
+
},
|
31 |
output: [],
|
32 |
opts: {
|
33 |
dragClass: "drag",
|
34 |
accept: false,
|
35 |
readAsDefault: 'BinaryString',
|
36 |
readAsMap: {
|
|
|
|
|
37 |
},
|
38 |
on: {
|
39 |
loadstart: noop,
|
54 |
if (typeof(jQuery) !== "undefined") {
|
55 |
jQuery.fn.fileReaderJS = function (opts) {
|
56 |
return this.each(function () {
|
57 |
+
if (jQuery(this).is("input")) {
|
58 |
setupInput(this, opts);
|
59 |
}
|
60 |
else {
|
70 |
};
|
71 |
}
|
72 |
|
73 |
+
// Not all browsers support the FileReader interface. Return with the enabled bit = false.
|
74 |
if (!FileReader) {
|
75 |
return;
|
76 |
}
|
77 |
|
|
|
|
|
78 |
|
79 |
+
// makeWorker is a little wrapper for generating web workers from strings
|
80 |
+
function makeWorker(script) {
|
81 |
var URL = window.URL || window.webkitURL;
|
82 |
+
var Blob = window.Blob;
|
83 |
+
var Worker = window.Worker;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
+
if (!URL || !Blob || !Worker || !script) {
|
86 |
return null;
|
87 |
}
|
88 |
|
89 |
+
var blob = new Blob([script]);
|
90 |
+
var worker = new Worker(URL.createObjectURL(blob));
|
91 |
+
return worker;
|
92 |
+
}
|
|
|
|
|
93 |
|
94 |
// setupClipboard: bind to clipboard events (intended for document.body)
|
95 |
function setupClipboard(element, opts) {
|
285 |
return;
|
286 |
}
|
287 |
|
288 |
+
var supportsSync = sync && FileReaderSyncSupport;
|
289 |
var syncWorker;
|
290 |
|
291 |
// Only initialize the synchronous worker if the option is enabled - to prevent the overhead
|
292 |
+
if (supportsSync) {
|
293 |
+
syncWorker = makeWorker(workerScript);
|
294 |
+
syncWorker.onmessage = function (e) {
|
295 |
var file = e.data.file;
|
296 |
var result = e.data.result;
|
297 |
|
305 |
// Call error or load event depending on success of the read from the worker.
|
306 |
opts.on[result === "error" ? "error" : "load"]({ target: { result: result } }, file);
|
307 |
groupFileDone();
|
308 |
+
};
|
|
|
309 |
}
|
310 |
|
311 |
Array.prototype.forEach.call(files, function (file) {
|
326 |
|
327 |
var readAs = getReadAsMethod(file.type, opts.readAsMap, opts.readAsDefault);
|
328 |
|
329 |
+
if (syncWorker) {
|
330 |
syncWorker.postMessage({
|
331 |
file: file,
|
332 |
extra: file.extra,
|
349 |
}
|
350 |
};
|
351 |
});
|
|
|
352 |
reader[readAs](file);
|
353 |
}
|
354 |
});
|
356 |
|
357 |
// checkFileReaderSyncSupport: Create a temporary worker and see if FileReaderSync exists
|
358 |
function checkFileReaderSyncSupport() {
|
359 |
+
var worker = makeWorker(syncDetectionScript);
|
|
|
|
|
|
|
360 |
if (worker) {
|
361 |
+
worker.onmessage = function (e) {
|
362 |
+
FileReaderSyncSupport = e.data;
|
363 |
+
};
|
364 |
worker.postMessage({});
|
365 |
}
|
366 |
}
|
@@ -1,2 +1 @@
|
|
1 |
-
/* https://github.com/isagalaev/highlight.js */
|
2 |
-
var hljs=new function(){function l(o){return o.replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+q.parentNode.className).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o<p.length;o++){if(e[p[o]]||p[o]=="no-highlight"){return p[o]}}}function c(q){var o=[];(function p(r,s){for(var t=r.firstChild;t;t=t.nextSibling){if(t.nodeType==3){s+=t.nodeValue.length}else{if(t.nodeName=="BR"){s+=1}else{if(t.nodeType==1){o.push({event:"start",offset:s,node:t});s=p(t,s);o.push({event:"stop",offset:s,node:t})}}}}return s})(q,0);return o}function j(x,v,w){var p=0;var y="";var r=[];function t(){if(x.length&&v.length){if(x[0].offset!=v[0].offset){return(x[0].offset<v[0].offset)?x:v}else{return v[0].event=="start"?x:v}}else{return x.length?x:v}}function s(A){function z(B){return" "+B.nodeName+'="'+l(B.value)+'"'}return"<"+A.nodeName+Array.prototype.map.call(A.attributes,z).join("")+">"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=("</"+o.nodeName.toLowerCase()+">")}while(o!=u.node);r.splice(q,1);while(q<r.length){y+=s(r[q]);q++}}}}return y+l(w.substr(p))}function f(q){function o(s,r){return RegExp(s,"m"+(q.cI?"i":"")+(r?"g":""))}function p(y,w){if(y.compiled){return}y.compiled=true;var s=[];if(y.k){var r={};function z(A,t){t.split(" ").forEach(function(B){var C=B.split("|");r[C[0]]=[A,C[1]?Number(C[1]):1];s.push(C[0])})}y.lR=o(y.l||hljs.IR,true);if(typeof y.k=="string"){z("keyword",y.k)}else{for(var x in y.k){if(!y.k.hasOwnProperty(x)){continue}z(x,y.k[x])}}y.k=r}if(w){if(y.bWK){y.b="\\b("+s.join("|")+")\\s"}y.bR=o(y.b?y.b:"\\B|\\b");if(!y.e&&!y.eW){y.e="\\B|\\b"}if(y.e){y.eR=o(y.e)}y.tE=y.e||"";if(y.eW&&w.tE){y.tE+=(y.e?"|":"")+w.tE}}if(y.i){y.iR=o(y.i)}if(y.r===undefined){y.r=1}if(!y.c){y.c=[]}for(var v=0;v<y.c.length;v++){if(y.c[v]=="self"){y.c[v]=y}p(y.c[v],y)}if(y.starts){p(y.starts,w)}var u=[];for(var v=0;v<y.c.length;v++){u.push(y.c[v].b)}if(y.tE){u.push(y.tE)}if(y.i){u.push(y.i)}y.t=u.length?o(u.join("|"),true):{exec:function(t){return null}}}p(q)}function d(D,E){function o(r,M){for(var L=0;L<M.c.length;L++){var K=M.c[L].bR.exec(r);if(K&&K.index==0){return M.c[L]}}}function s(K,r){if(K.e&&K.eR.test(r)){return K}if(K.eW){return s(K.parent,r)}}function t(r,K){return K.i&&K.iR.test(r)}function y(L,r){var K=F.cI?r[0].toLowerCase():r[0];return L.k.hasOwnProperty(K)&&L.k[K]}function G(){var K=l(w);if(!A.k){return K}var r="";var N=0;A.lR.lastIndex=0;var L=A.lR.exec(K);while(L){r+=K.substr(N,L.index-N);var M=y(A,L);if(M){v+=M[1];r+='<span class="'+M[0]+'">'+L[0]+"</span>"}else{r+=L[0]}N=A.lR.lastIndex;L=A.lR.exec(K)}return r+K.substr(N)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return'<span class="'+r.language+'">'+r.value+"</span>"}function J(){return A.sL!==undefined?z():G()}function I(L,r){var K=L.cN?'<span class="'+L.cN+'">':"";if(L.rB){x+=K;w=""}else{if(L.eB){x+=l(r)+K;w=""}else{x+=K;w=r}}A=Object.create(L,{parent:{value:A}});B+=L.r}function C(K,r){w+=K;if(r===undefined){x+=J();return 0}var L=o(r,A);if(L){x+=J();I(L,r);return L.rB?0:r.length}var M=s(A,r);if(M){if(!(M.rE||M.eE)){w+=r}x+=J();do{if(A.cN){x+="</span>"}A=A.parent}while(A!=M.parent);if(M.eE){x+=l(r)}w="";if(M.starts){I(M.starts,"")}return M.rE?0:r.length}if(t(r,A)){throw"Illegal"}w+=r;return r.length||1}var F=e[D];f(F);var A=F;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(E);if(!u){break}q=C(E.substr(p,u.index-p),u[0]);p=u.index+q}C(E.substr(p));return{r:B,keyword_count:v,value:x,language:D}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:l(E)}}else{throw H}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"<br>")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ />]+"},b]}]}}(hljs);hljs.LANGUAGES.markdown=function(a){return{c:[{cN:"header",b:"^#{1,3}",e:"$"},{cN:"header",b:"^.+?\\n[=-]{2,}$"},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",b:"\\*.+?\\*"},{cN:"emphasis",b:"_.+?_",r:0},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",b:"`.+?`"},{cN:"code",b:"^ ",e:"$",r:0},{cN:"horizontal_rule",b:"^-{3,}",e:"$"},{b:"\\[.+?\\]\\(.+?\\)",rB:true,c:[{cN:"link_label",b:"\\[.+\\]"},{cN:"link_url",b:"\\(",e:"\\)",eB:true,eE:true}]}]}}(hljs);
|
1 |
+
var hljs=new function(){function l(o){return o.replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName.toUpperCase()=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName.toUpperCase()=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+(q.parentNode?q.parentNode.className:"")).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o<p.length;o++){if(e[p[o]]||p[o]=="no-highlight"){return p[o]}}}function c(q){var o=[];(function p(r,s){for(var t=r.firstChild;t;t=t.nextSibling){if(t.nodeType==3){s+=t.nodeValue.length}else{if(t.nodeName.toUpperCase()=="BR"){s+=1}else{if(t.nodeType==1){o.push({event:"start",offset:s,node:t});s=p(t,s);o.push({event:"stop",offset:s,node:t})}}}}return s})(q,0);return o}function j(p,r,v){var q=0;var y="";var s=[];function u(){if(!p.length||!r.length){return p.length?p:r}if(p[0].offset!=r[0].offset){return(p[0].offset<r[0].offset)?p:r}return r[0].event=="start"?p:r}function t(A){function z(B){return" "+B.nodeName+'="'+l(B.value)+'"'}y+="<"+A.nodeName.toLowerCase()+Array.prototype.map.call(A.attributes,z).join("")+">"}function x(z){y+="</"+z.nodeName.toLowerCase()+">"}function o(z){(z.event=="start"?t:x)(z.node)}while(p.length||r.length){var w=u();y+=l(v.substr(q,w[0].offset-q));q=w[0].offset;if(w==p){s.reverse().forEach(x);do{o(w.splice(0,1)[0]);w=u()}while(w==p&&w.length&&w[0].offset==q);s.reverse().forEach(t)}else{if(w[0].event=="start"){s.push(w[0].node)}else{s.pop()}o(w.splice(0,1)[0])}}return y+l(v.substr(q))}function f(r){function o(s){return(s&&s.source)||s}function p(t,s){return RegExp(o(t),"m"+(r.cI?"i":"")+(s?"g":""))}function q(z,x){if(z.compiled){return}z.compiled=true;var u=[];if(z.k){var s={};function A(B,t){if(r.cI){t=t.toLowerCase()}t.split(" ").forEach(function(C){var D=C.split("|");s[D[0]]=[B,D[1]?Number(D[1]):1];u.push(D[0])})}z.lR=p(z.l||"\\b"+hljs.IR+"\\b(?!\\.)",true);if(typeof z.k=="string"){A("keyword",z.k)}else{for(var y in z.k){if(!z.k.hasOwnProperty(y)){continue}A(y,z.k[y])}}z.k=s}if(x){if(z.bWK){z.b="\\b("+u.join("|")+")\\b(?!\\.)\\s*"}z.bR=p(z.b?z.b:"\\B|\\b");if(!z.e&&!z.eW){z.e="\\B|\\b"}if(z.e){z.eR=p(z.e)}z.tE=o(z.e)||"";if(z.eW&&x.tE){z.tE+=(z.e?"|":"")+x.tE}}if(z.i){z.iR=p(z.i)}if(z.r===undefined){z.r=1}if(!z.c){z.c=[]}for(var w=0;w<z.c.length;w++){if(z.c[w]=="self"){z.c[w]=z}q(z.c[w],z)}if(z.starts){q(z.starts,x)}var v=[];for(var w=0;w<z.c.length;w++){v.push(o(z.c[w].b))}if(z.tE){v.push(o(z.tE))}if(z.i){v.push(o(z.i))}z.t=v.length?p(v.join("|"),true):{exec:function(t){return null}}}q(r)}function d(E,G,C,M){function o(r,P){for(var O=0;O<P.c.length;O++){var N=P.c[O].bR.exec(r);if(N&&N.index==0){return P.c[O]}}}function s(N,r){if(N.e&&N.eR.test(r)){return N}if(N.eW){return s(N.parent,r)}}function t(r,N){return !C&&N.i&&N.iR.test(r)}function y(O,r){var N=H.cI?r[0].toLowerCase():r[0];return O.k.hasOwnProperty(N)&&O.k[N]}function I(){var N=l(w);if(!B.k){return N}var r="";var Q=0;B.lR.lastIndex=0;var O=B.lR.exec(N);while(O){r+=N.substr(Q,O.index-Q);var P=y(B,O);if(P){v+=P[1];r+='<span class="'+P[0]+'">'+O[0]+"</span>"}else{r+=O[0]}Q=B.lR.lastIndex;O=B.lR.exec(N)}return r+N.substr(Q)}function z(){if(B.sL&&!e[B.sL]){return l(w)}var N=B.subLanguageMode=="continuous"?B.top:undefined;var r=B.sL?d(B.sL,w,true,N):g(w);if(B.r>0){v+=r.keyword_count;A+=r.r}B.top=r.top;return'<span class="'+r.language+'">'+r.value+"</span>"}function L(){return B.sL!==undefined?z():I()}function K(O,r){var N=O.cN?'<span class="'+O.cN+'">':"";if(O.rB){x+=N;w=""}else{if(O.eB){x+=l(r)+N;w=""}else{x+=N;w=r}}B=Object.create(O,{parent:{value:B}})}function D(N,r){w+=N;if(r===undefined){x+=L();return 0}var P=o(r,B);if(P){x+=L();K(P,r);return P.rB?0:r.length}var Q=s(B,r);if(Q){var O=B;if(!(O.rE||O.eE)){w+=r}x+=L();do{if(B.cN){x+="</span>"}A+=B.r;B=B.parent}while(B!=Q.parent);if(O.eE){x+=l(r)}w="";if(Q.starts){K(Q.starts,"")}return O.rE?0:r.length}if(t(r,B)){throw new Error('Illegal lexem "'+r+'" for mode "'+(B.cN||"<unnamed>")+'"')}w+=r;return r.length||1}var H=e[E];if(!H){throw new Error('Unknown language: "'+E+'"')}f(H);var B=M||H;var x="";for(var F=B;F!=H;F=F.parent){if(F.cN){x='<span class="'+F.cN+'">'+x}}var w="";var A=0;var v=0;try{var u,q,p=0;while(true){B.t.lastIndex=p;u=B.t.exec(G);if(!u){break}q=D(G.substr(p,u.index-p),u[0]);p=u.index+q}D(G.substr(p));for(var F=B;F.parent;F=F.parent){if(F.cN){x+="</span>"}}return{r:A,keyword_count:v,value:x,language:E,top:B}}catch(J){if(J.message.indexOf("Illegal")!=-1){return{r:0,keyword_count:0,value:l(G)}}else{throw J}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s,false);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"<br>")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v,true):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElementNS("http://www.w3.org/1999/xhtml","pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagNameNS("http://www.w3.org/1999/xhtml","pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.REGEXP_MODE={cN:"regexp",b:/\//,e:/\/[gim]*/,i:/\n/,c:[this.BE,{b:/\[/,e:/\]/,r:0,c:[this.BE]}]};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.javascript=function(a){return{k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const",literal:"true false null undefined NaN Infinity"},c:[a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,a.REGEXP_MODE,{b:/</,e:/>;/,sL:"xml"}],r:0},{cN:"function",bWK:true,e:/{/,k:"function",c:[{cN:"title",b:/[A-Za-z$_][0-9A-Za-z$_]*/},{cN:"params",b:/\(/,e:/\)/,c:[a.CLCM,a.CBLCLM],i:/["'\(]/}],i:/\[|%/}]}}(hljs);hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,r:0,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"</?",e:"/?>",r:0,c:[{cN:"title",b:"[^ /><]+"},b]}]}}(hljs);hljs.LANGUAGES.markdown=function(a){return{c:[{cN:"header",b:"^#{1,3}",e:"$"},{cN:"header",b:"^.+?\\n[=-]{2,}$"},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",b:"\\*.+?\\*"},{cN:"emphasis",b:"_.+?_",r:0},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",b:"`.+?`"},{cN:"code",b:"^ ",e:"$",r:0},{cN:"horizontal_rule",b:"^-{3,}",e:"$"},{b:"\\[.+?\\]\\(.+?\\)",rB:true,c:[{cN:"link_label",b:"\\[.+\\]"},{cN:"link_url",b:"\\(",e:"\\)",eB:true,eE:true}]}]}}(hljs);hljs.LANGUAGES.css=function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*";var c={cN:"function",b:b+"\\(",e:"\\)",c:["self",a.NM,a.ASM,a.QSM]};return{cI:true,i:"[=/|']",c:[a.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:true,eE:true,r:0,c:[c,a.ASM,a.QSM,a.NM]}]},{cN:"tag",b:b,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[c,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}}(hljs);hljs.LANGUAGES.json=function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}}(hljs);
|
|
@@ -4,7 +4,8 @@
|
|
4 |
* @author Cyrill at Schumacher dot fm / @SchumacherFM
|
5 |
* @copyright Copyright (c)
|
6 |
*/
|
7 |
-
/*global
|
|
|
8 |
;
|
9 |
(function () {
|
10 |
'use strict';
|
@@ -15,7 +16,9 @@
|
|
15 |
isViewMarkdownSourceHtml = false,
|
16 |
_initializedFileReaderContainer = {},
|
17 |
_textAreaCurrentCaretObject = {}, // set by the onClick event
|
18 |
-
_toggleMarkdownSourceOriginalMarkdown = ''
|
|
|
|
|
19 |
|
20 |
/**
|
21 |
*
|
@@ -49,6 +52,12 @@
|
|
49 |
mediaBaseUrl: _checkHttp(config.phi || false),
|
50 |
extraRendererUrl: _checkHttp(config.eru || false),
|
51 |
eeLoadOnClick: config.eeloc || false,
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
reMarkedCfg: decodeURIComponent(config.rmc || '{}').evalJSON(true)
|
53 |
};
|
54 |
return true;
|
@@ -92,10 +101,6 @@
|
|
92 |
return window.FileReader !== undefined;
|
93 |
}
|
94 |
|
95 |
-
function mdExternalUrl(url) {
|
96 |
-
window.open(url);
|
97 |
-
}
|
98 |
-
|
99 |
/**
|
100 |
*
|
101 |
* @param textareaId
|
@@ -124,7 +129,27 @@
|
|
124 |
function toggleMarkdownSource(element, textAreaId) {
|
125 |
var _loadEpic = false,
|
126 |
_instance,
|
127 |
-
$textAreaId = $(textAreaId)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
|
129 |
if (true === isViewMarkdownSourceHtml) {
|
130 |
isViewMarkdownSourceHtml = false;
|
@@ -207,24 +232,26 @@
|
|
207 |
|
208 |
/**
|
209 |
*
|
210 |
-
* @param
|
211 |
-
* @
|
|
|
212 |
* @private
|
213 |
*/
|
214 |
-
function
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
return htmlString;
|
219 |
}
|
220 |
|
221 |
/**
|
|
|
222 |
*
|
223 |
* @param content string
|
224 |
* @returns string
|
225 |
* @private
|
226 |
*/
|
227 |
-
function
|
228 |
var imgUrl = '',
|
229 |
mediaRegex = /\{\{media\s+url="([^"]+)"\s*\}\}/i,
|
230 |
matches = null;
|
@@ -247,24 +274,22 @@
|
|
247 |
|
248 |
/**
|
249 |
*
|
250 |
-
*
|
251 |
-
*
|
252 |
-
* @param string content
|
253 |
-
* @param object $textArea
|
254 |
-
* @returns string
|
255 |
* @private
|
256 |
*/
|
257 |
-
function
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
|
|
268 |
}
|
269 |
|
270 |
/**
|
@@ -277,7 +302,13 @@
|
|
277 |
*/
|
278 |
function _parserEpicEditor(content, $textArea) {
|
279 |
var currentActiveInstance = _getEpicEditorActiveInstance(),
|
280 |
-
pContent = {}
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
|
282 |
if (content.length > 10 && _markDownGlobalConfig.extraRendererUrl) {
|
283 |
pContent = _mdExtraRender(content);
|
@@ -285,13 +316,13 @@
|
|
285 |
if (currentActiveInstance && currentActiveInstance.is('loaded')) {
|
286 |
currentActiveInstance.getElement('previewer').body.innerHTML = _highlight(html);
|
287 |
} else {
|
288 |
-
$textArea.value = html;
|
289 |
}
|
290 |
});
|
291 |
return _highlight('<h3>Preview will be available shortly ...</h3>');
|
292 |
}
|
293 |
|
294 |
-
return _highlight(marked(
|
295 |
}
|
296 |
|
297 |
/**
|
@@ -458,7 +489,7 @@
|
|
458 |
dragClass: 'fReaderDrag',
|
459 |
accept: 'image/*',
|
460 |
readAsMap: {
|
461 |
-
'image/*': 'BinaryString'
|
462 |
},
|
463 |
readAsDefault: 'BinaryString',
|
464 |
on: {
|
@@ -481,7 +512,7 @@
|
|
481 |
},
|
482 |
method: 'post',
|
483 |
parameters: {
|
484 |
-
'binaryData': encode_base64(e.target.result),
|
485 |
'file': JSON.stringify(file)
|
486 |
}
|
487 |
});
|
@@ -499,25 +530,11 @@
|
|
499 |
};
|
500 |
|
501 |
FileReaderJS.setupDrop(target, opts);
|
|
|
|
|
502 |
_initializedFileReaderContainer[target.id] = true;
|
503 |
}
|
504 |
|
505 |
-
/**
|
506 |
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/FileReader
|
507 |
-
* @param _epicEditorInstance window.EpicEditor loaded
|
508 |
-
* @private
|
509 |
-
*/
|
510 |
-
function _createFileReader(event) {
|
511 |
-
var target = event.target || event.srcElement;
|
512 |
-
|
513 |
-
_textAreaCurrentCaretObject = target;
|
514 |
-
|
515 |
-
// check if already initialized
|
516 |
-
if (_initializedFileReaderContainer[target.id] === undefined) {
|
517 |
-
_createFileReaderInstance(target);
|
518 |
-
}
|
519 |
-
}
|
520 |
-
|
521 |
/**
|
522 |
*
|
523 |
* @returns {reMarked}
|
@@ -536,7 +553,7 @@
|
|
536 |
bold_char: "*", // char used for strong
|
537 |
emph_char: "_", // char used for em
|
538 |
gfm_del: true, // ~~strikeout~~ for <del>strikeout</del>
|
539 |
-
gfm_tbls:
|
540 |
tbl_edges: false, // show side edges on tables
|
541 |
hash_lnks: false, // anchors w/hash hrefs as links
|
542 |
br_only: false // avoid using " " as line break indicator
|
@@ -545,57 +562,521 @@
|
|
545 |
return new reMarked(options);
|
546 |
}
|
547 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
548 |
/**
|
549 |
* renders html to markdown
|
550 |
* @param textAreaId string
|
551 |
*/
|
552 |
function htmlToMarkDown(element, textAreaId) {
|
553 |
-
var html =
|
|
|
|
|
|
|
|
|
554 |
|
555 |
-
var _instance = epicEditorInstances[textAreaId] || false;
|
556 |
-
var _loadedEpic = _isEpicEditorEnabled() && false !== _instance && _instance.is('loaded');
|
557 |
if (true === _loadedEpic) {
|
558 |
toggleEpicEditor(element, textAreaId);
|
559 |
}
|
560 |
|
561 |
-
|
562 |
if (_markDownGlobalConfig.tag !== '' && html.indexOf(_markDownGlobalConfig.tag) === -1) {
|
563 |
-
|
564 |
}
|
565 |
-
|
566 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
567 |
}
|
568 |
}
|
569 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
570 |
/**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
571 |
* loads the filereader, epiceditor
|
572 |
*/
|
573 |
function _mdInitialize() {
|
574 |
_initGlobalConfig();
|
|
|
575 |
var parentElementIds = ['product_edit_form', 'edit_form', 'category-edit-container', 'email_template_edit_form'];
|
|
|
576 |
if (varienGlobalEvents) {
|
577 |
varienGlobalEvents.fireEvent('mdLoadForms', parentElementIds);
|
578 |
}
|
579 |
|
580 |
// loading multiple instances on one page
|
581 |
-
// only works with event delegation due category edit page ...
|
582 |
// fire event for customization varienGlobalEvents.attachEventHandler('showTab', function (e) {...}
|
583 |
parentElementIds.forEach(function (elementId) {
|
584 |
var $elementId = $(elementId);
|
585 |
if ($elementId) {
|
|
|
|
|
|
|
586 |
// some things are only possible with event delegation ...
|
587 |
if (true === _isEpicEditorEnabled() && true === _markDownGlobalConfig.eeLoadOnClick) {
|
588 |
$elementId.on('click', 'textarea.initEpicEditor', _createEpicEditorInstances);
|
589 |
}
|
590 |
if (true === _isFileReaderEnabled()) {
|
591 |
-
$elementId.on('click', 'textarea.
|
592 |
}
|
593 |
-
|
594 |
}
|
595 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
596 |
}
|
597 |
|
598 |
-
this.mdExternalUrl = mdExternalUrl;
|
599 |
this.toggleMarkdown = toggleMarkdown;
|
600 |
this.toggleEpicEditor = toggleEpicEditor;
|
601 |
this.toggleMarkdownSource = toggleMarkdownSource;
|
@@ -696,11 +1177,6 @@
|
|
696 |
Promise: Promise,
|
697 |
join: join,
|
698 |
chain: chain,
|
699 |
-
|
700 |
-
/* Error codes */
|
701 |
-
ENOXHR: 1,
|
702 |
-
ETIMEOUT: 2
|
703 |
-
|
704 |
};
|
705 |
|
706 |
if (typeof define === 'function' && define.amd) {
|
4 |
* @author Cyrill at Schumacher dot fm / @SchumacherFM
|
5 |
* @copyright Copyright (c)
|
6 |
*/
|
7 |
+
/*global $,$$,marked,varienGlobalEvents,Ajax,hljs,FileReaderJS,Event,encode_base64,reMarked,Effect,Element*/
|
8 |
+
/*jshint bitwise:true, curly:true, eqeqeq:true, forin:true, noarg:true, noempty:true, nonew:true, undef:true, strict:false, browser:true, prototypejs:true */
|
9 |
;
|
10 |
(function () {
|
11 |
'use strict';
|
16 |
isViewMarkdownSourceHtml = false,
|
17 |
_initializedFileReaderContainer = {},
|
18 |
_textAreaCurrentCaretObject = {}, // set by the onClick event
|
19 |
+
_toggleMarkdownSourceOriginalMarkdown = '',
|
20 |
+
tempIframeJSSource = '',
|
21 |
+
iFrameScrollPositions = {};
|
22 |
|
23 |
/**
|
24 |
*
|
52 |
mediaBaseUrl: _checkHttp(config.phi || false),
|
53 |
extraRendererUrl: _checkHttp(config.eru || false),
|
54 |
eeLoadOnClick: config.eeloc || false,
|
55 |
+
isHiddenInsertImageButton: config.hideIIB || true,
|
56 |
+
previewCSS: config.mdCss || false,
|
57 |
+
previewUrl: config.lpUrl || '',
|
58 |
+
stores: config.stores || [],
|
59 |
+
featureBaseUrl: config.feaBUrl || '',
|
60 |
+
highLightCSS: config.hlCss || false,
|
61 |
reMarkedCfg: decodeURIComponent(config.rmc || '{}').evalJSON(true)
|
62 |
};
|
63 |
return true;
|
101 |
return window.FileReader !== undefined;
|
102 |
}
|
103 |
|
|
|
|
|
|
|
|
|
104 |
/**
|
105 |
*
|
106 |
* @param textareaId
|
129 |
function toggleMarkdownSource(element, textAreaId) {
|
130 |
var _loadEpic = false,
|
131 |
_instance,
|
132 |
+
$textAreaId = $(textAreaId),
|
133 |
+
|
134 |
+
/**
|
135 |
+
*
|
136 |
+
* @param content
|
137 |
+
* @param $textArea
|
138 |
+
* @returns {*}
|
139 |
+
* @private
|
140 |
+
*/
|
141 |
+
_parserDefault = function (content, $textArea) {
|
142 |
+
var pContent = {}, renderedMarkDown = '';
|
143 |
+
|
144 |
+
if (content.length > 10 && _markDownGlobalConfig.extraRendererUrl) {
|
145 |
+
pContent = _mdExtraRender(content);
|
146 |
+
pContent.then(function (error, html) {
|
147 |
+
$textArea.value = html;
|
148 |
+
});
|
149 |
+
return '<h3>Preview will be available shortly ...</h3>';
|
150 |
+
}
|
151 |
+
return marked(_handleMagentoMediaUrl(content));
|
152 |
+
};
|
153 |
|
154 |
if (true === isViewMarkdownSourceHtml) {
|
155 |
isViewMarkdownSourceHtml = false;
|
232 |
|
233 |
/**
|
234 |
*
|
235 |
+
* @param htmlString
|
236 |
+
* @param options
|
237 |
+
* @returns {string}
|
238 |
* @private
|
239 |
*/
|
240 |
+
function _highlightOpt(htmlString, options) {
|
241 |
+
options = options || {};
|
242 |
+
var _hlPre = options.hlPre || '<pre><code>',
|
243 |
+
_hlPost = options.hlPost || '</code></pre>';
|
244 |
+
return _hlPre + hljs.highlight('xml', htmlString).value + _hlPost;
|
245 |
}
|
246 |
|
247 |
/**
|
248 |
+
* handles magento special tag {{media url=""}}
|
249 |
*
|
250 |
* @param content string
|
251 |
* @returns string
|
252 |
* @private
|
253 |
*/
|
254 |
+
function _handleMagentoMediaUrl(content) {
|
255 |
var imgUrl = '',
|
256 |
mediaRegex = /\{\{media\s+url="([^"]+)"\s*\}\}/i,
|
257 |
matches = null;
|
274 |
|
275 |
/**
|
276 |
*
|
277 |
+
* @param htmlString
|
278 |
+
* @returns {*}
|
|
|
|
|
|
|
279 |
* @private
|
280 |
*/
|
281 |
+
function _htmlBeautify(htmlString) {
|
282 |
+
return window.html_beautify(htmlString, {
|
283 |
+
'indent_inner_html': false,
|
284 |
+
'indent_size': 2,
|
285 |
+
'indent_char': ' ',
|
286 |
+
'wrap_line_length': 78,
|
287 |
+
'brace_style': 'expand',
|
288 |
+
'unformatted': ['a', 'sub', 'sup', 'b', 'i', 'u'],
|
289 |
+
'preserve_newlines': true,
|
290 |
+
'max_preserve_newlines': 5,
|
291 |
+
'indent_handlebars': false
|
292 |
+
});
|
293 |
}
|
294 |
|
295 |
/**
|
302 |
*/
|
303 |
function _parserEpicEditor(content, $textArea) {
|
304 |
var currentActiveInstance = _getEpicEditorActiveInstance(),
|
305 |
+
pContent = {},
|
306 |
+
_highlight = function (htmlString) {
|
307 |
+
if (true === isViewMarkdownSourceHtml) {
|
308 |
+
htmlString = _highlightOpt(htmlString, {'hlPre': '<pre class="hljs">'});
|
309 |
+
}
|
310 |
+
return htmlString;
|
311 |
+
};
|
312 |
|
313 |
if (content.length > 10 && _markDownGlobalConfig.extraRendererUrl) {
|
314 |
pContent = _mdExtraRender(content);
|
316 |
if (currentActiveInstance && currentActiveInstance.is('loaded')) {
|
317 |
currentActiveInstance.getElement('previewer').body.innerHTML = _highlight(html);
|
318 |
} else {
|
319 |
+
$textArea.value = html; // @todo bug if epicEditor is disabled an extra enabled
|
320 |
}
|
321 |
});
|
322 |
return _highlight('<h3>Preview will be available shortly ...</h3>');
|
323 |
}
|
324 |
|
325 |
+
return _highlight(marked(_handleMagentoMediaUrl(content)));
|
326 |
}
|
327 |
|
328 |
/**
|
489 |
dragClass: 'fReaderDrag',
|
490 |
accept: 'image/*',
|
491 |
readAsMap: {
|
492 |
+
'image/*': 'BinaryString' // @todo refactor for using: ArrayBuffer
|
493 |
},
|
494 |
readAsDefault: 'BinaryString',
|
495 |
on: {
|
512 |
},
|
513 |
method: 'post',
|
514 |
parameters: {
|
515 |
+
'binaryData': encode_base64(e.target.result), // @todo refactor use real file uploads -> ArrayBuffer
|
516 |
'file': JSON.stringify(file)
|
517 |
}
|
518 |
});
|
530 |
};
|
531 |
|
532 |
FileReaderJS.setupDrop(target, opts);
|
533 |
+
FileReaderJS.setupInput($('man_chooser_' + target.id), opts);
|
534 |
+
FileReaderJS.setupClipboard(target, opts);
|
535 |
_initializedFileReaderContainer[target.id] = true;
|
536 |
}
|
537 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
538 |
/**
|
539 |
*
|
540 |
* @returns {reMarked}
|
553 |
bold_char: "*", // char used for strong
|
554 |
emph_char: "_", // char used for em
|
555 |
gfm_del: true, // ~~strikeout~~ for <del>strikeout</del>
|
556 |
+
gfm_tbls: true, // markdown-extra tables
|
557 |
tbl_edges: false, // show side edges on tables
|
558 |
hash_lnks: false, // anchors w/hash hrefs as links
|
559 |
br_only: false // avoid using " " as line break indicator
|
562 |
return new reMarked(options);
|
563 |
}
|
564 |
|
565 |
+
/**
|
566 |
+
*
|
567 |
+
* @param text
|
568 |
+
* @constructor
|
569 |
+
*/
|
570 |
+
function MagentoTagPreserver(text) {
|
571 |
+
this.text = text;
|
572 |
+
this.container = {};
|
573 |
+
}
|
574 |
+
|
575 |
+
MagentoTagPreserver.prototype = {
|
576 |
+
getPreserved: function () {
|
577 |
+
var
|
578 |
+
tagRegex = /(\{\{[^\}]+\}\})/, // e.g.: {{store direct_url="about-us"}}
|
579 |
+
matches = null,
|
580 |
+
key = '',
|
581 |
+
i = 0;
|
582 |
+
|
583 |
+
while (tagRegex.test(this.text)) {
|
584 |
+
matches = tagRegex.exec(this.text);
|
585 |
+
if (null !== matches && matches[1] !== undefined) {
|
586 |
+
key = Math.random() + '_' + i;
|
587 |
+
this.text = this.text.replace(matches[1], key);
|
588 |
+
this.container[key] = matches[1];
|
589 |
+
i = i + 1;
|
590 |
+
}
|
591 |
+
}
|
592 |
+
|
593 |
+
return this.text;
|
594 |
+
},
|
595 |
+
restore: function (transformedString) {
|
596 |
+
var key = '';
|
597 |
+
this.text = '';
|
598 |
+
|
599 |
+
for (key in this.container) {
|
600 |
+
if (this.container.hasOwnProperty(key)) {
|
601 |
+
transformedString = transformedString.replace(key, this.container[key]);
|
602 |
+
}
|
603 |
+
}
|
604 |
+
this.container = {};
|
605 |
+
return transformedString;
|
606 |
+
}
|
607 |
+
|
608 |
+
};
|
609 |
+
|
610 |
/**
|
611 |
* renders html to markdown
|
612 |
* @param textAreaId string
|
613 |
*/
|
614 |
function htmlToMarkDown(element, textAreaId) {
|
615 |
+
var html = '',
|
616 |
+
thePreserver = new MagentoTagPreserver($(textAreaId).value || ''),
|
617 |
+
markDownGlobalConfigTag = '',
|
618 |
+
_instance = epicEditorInstances[textAreaId] || false,
|
619 |
+
_loadedEpic = _isEpicEditorEnabled() && false !== _instance && _instance.is('loaded');
|
620 |
|
|
|
|
|
621 |
if (true === _loadedEpic) {
|
622 |
toggleEpicEditor(element, textAreaId);
|
623 |
}
|
624 |
|
625 |
+
html = thePreserver.getPreserved();
|
626 |
if (_markDownGlobalConfig.tag !== '' && html.indexOf(_markDownGlobalConfig.tag) === -1) {
|
627 |
+
markDownGlobalConfigTag = _markDownGlobalConfig.tag;
|
628 |
}
|
629 |
+
|
630 |
+
$(textAreaId).value = thePreserver.restore(markDownGlobalConfigTag + '\n' + _getReMarked().render(html));
|
631 |
+
}
|
632 |
+
|
633 |
+
/**
|
634 |
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/FileReader
|
635 |
+
* @param _epicEditorInstance window.EpicEditor loaded
|
636 |
+
* @private
|
637 |
+
*/
|
638 |
+
function _createFileReaderFactory(event) {
|
639 |
+
var target = event.target || event.srcElement;
|
640 |
+
_textAreaCurrentCaretObject = target;
|
641 |
+
|
642 |
+
// check if already initialized
|
643 |
+
if (_initializedFileReaderContainer[target.id] === undefined) {
|
644 |
+
_createFileReaderInstance(target);
|
645 |
}
|
646 |
}
|
647 |
|
648 |
+
/******************************************************************************************************
|
649 |
+
*
|
650 |
+
* @constructor
|
651 |
+
*/
|
652 |
+
function TabPreviewHandler() {
|
653 |
+
this.data = {};
|
654 |
+
this._isHtmlPreview = false;
|
655 |
+
this._livePreviewSetUpDone = false;
|
656 |
+
this._reloadCounter = 0;
|
657 |
+
this.lpInputElement = new Element('input', {
|
658 |
+
'type': 'text',
|
659 |
+
'class': 'input-text',
|
660 |
+
'value': ''
|
661 |
+
});
|
662 |
+
this._reloadAnswers = [
|
663 |
+
'Cannot find a URL ...',
|
664 |
+
'As I\'ve said before: Cannot find a URL ...',
|
665 |
+
'Would you please stop clicking on me?',
|
666 |
+
'Again ... you have to put in a valid URL!',
|
667 |
+
'One more click ...'
|
668 |
+
];
|
669 |
+
this._lockedRaptor = false;
|
670 |
+
}
|
671 |
+
|
672 |
+
/**
|
673 |
+
*
|
674 |
+
*
|
675 |
+
*/
|
676 |
+
TabPreviewHandler.prototype = {
|
677 |
+
_localStorageGet: function (key) {
|
678 |
+
return window.localStorage.getItem('schumacherfm_markdown_' + this.data.textAreaId + '_' + key);
|
679 |
+
},
|
680 |
+
_localStorageSet: function (key, value) {
|
681 |
+
return window.localStorage.setItem('schumacherfm_markdown_' + this.data.textAreaId + '_' + key, value);
|
682 |
+
},
|
683 |
+
setData: function (data) {
|
684 |
+
this._isHtmlPreview = false;
|
685 |
+
this.data = data;
|
686 |
+
this._reloadCounter = 0;
|
687 |
+
return this;
|
688 |
+
},
|
689 |
+
_preview: function () {
|
690 |
+
var pContent = new promise.Promise(),
|
691 |
+
self = this,
|
692 |
+
content = $(this.data.textAreaId).value;
|
693 |
+
|
694 |
+
if (content.replace(/\s*/g, '') === '') {
|
695 |
+
self._setIframe('');
|
696 |
+
return false;
|
697 |
+
}
|
698 |
+
|
699 |
+
if (_markDownGlobalConfig.extraRendererUrl) {
|
700 |
+
pContent = _mdExtraRender(content);
|
701 |
+
pContent.then(function (error, html) {
|
702 |
+
self._setIframe(html);
|
703 |
+
});
|
704 |
+
} else {
|
705 |
+
pContent.then(function (error, markdownContent) {
|
706 |
+
markdownContent = marked(_handleMagentoMediaUrl(markdownContent));
|
707 |
+
this._setIframe(markdownContent);
|
708 |
+
}, this);
|
709 |
+
pContent.done(null, content);
|
710 |
+
}
|
711 |
+
},
|
712 |
+
_getHtmlStyleSheet: function (styleUrl) {
|
713 |
+
return '<link href="' + styleUrl + '" rel="stylesheet" type="text/css" />';
|
714 |
+
},
|
715 |
+
_getStyleSheets: function () {
|
716 |
+
return _markDownGlobalConfig.highLightCSS && this._isHtmlPreview
|
717 |
+
? this._getHtmlStyleSheet(_markDownGlobalConfig.highLightCSS)
|
718 |
+
: this._getHtmlStyleSheet(_markDownGlobalConfig.previewCSS);
|
719 |
+
},
|
720 |
+
_setIframeSrc: function (theSrc) {
|
721 |
+
var theIframe = this.data.tabBody.select('.iframePreview')[0];
|
722 |
+
theIframe.src = theSrc;
|
723 |
+
return this;
|
724 |
+
},
|
725 |
+
_getJavaScript: function () {
|
726 |
+
var insertJS = tempIframeJSSource.replace('~~id~~', this.data.tabBody.id);
|
727 |
+
insertJS = insertJS.replace('~~scrollto~~', iFrameScrollPositions[this.data.tabBody.id] || 0);
|
728 |
+
return '<script type="text/javascript">' + insertJS + '</script>';
|
729 |
+
},
|
730 |
+
_setIframe: function (htmlString) {
|
731 |
+
if (_markDownGlobalConfig.previewCSS === false) {
|
732 |
+
alert('Markdown Preview Style Sheet not available!');
|
733 |
+
console.log(_markDownGlobalConfig);
|
734 |
+
return false;
|
735 |
+
}
|
736 |
+
|
737 |
+
var bodyStyle = 'pointer-events:none;';
|
738 |
+
if (true === this._isHtmlPreview) {
|
739 |
+
htmlString = _highlightOpt(_htmlBeautify(htmlString));
|
740 |
+
bodyStyle += 'padding:0; margin:0;';
|
741 |
+
}
|
742 |
+
|
743 |
+
// http://www.thecssninja.com/javascript/pointer-events-60fps
|
744 |
+
this._setIframeSrc('data:text/html;charset=utf-8,' +
|
745 |
+
encodeURIComponent('<html><head>' + this._getStyleSheets() +
|
746 |
+
'</head><body style="' + bodyStyle + '">' +
|
747 |
+
this._getJavaScript()
|
748 |
+
+
|
749 |
+
htmlString
|
750 |
+
+ '</body></html>'));
|
751 |
+
return true;
|
752 |
+
},
|
753 |
+
preview: function () {
|
754 |
+
this._preview();
|
755 |
+
},
|
756 |
+
htmlPreview: function () {
|
757 |
+
this._isHtmlPreview = true;
|
758 |
+
this._preview();
|
759 |
+
},
|
760 |
+
_setUpLivePreview: function () {
|
761 |
+
if (true === this._livePreviewSetUpDone) {
|
762 |
+
return null;
|
763 |
+
}
|
764 |
+
|
765 |
+
var self = this,
|
766 |
+
ul = self.data.tabBody.select('.previewStores')[0],
|
767 |
+
liElement = new Element('li'),
|
768 |
+
reload = new Element('a', {'href': '#'}),
|
769 |
+
url = _markDownGlobalConfig.previewUrl + '?___store=';
|
770 |
+
|
771 |
+
if (_markDownGlobalConfig.previewUrl !== '') {
|
772 |
+
_markDownGlobalConfig.stores.forEach(function (storeCode) {
|
773 |
+
ul.insert('<li><a href="' + url + storeCode + '" target="' + self.data.textAreaId + '__livePreviewB">' + storeCode + '</a></li>');
|
774 |
+
});
|
775 |
+
}
|
776 |
+
|
777 |
+
if (true === _markDownGlobalConfig.previewUrl.empty()) {
|
778 |
+
|
779 |
+
this.lpInputElement.value = self._localStorageGet('lpUrl');
|
780 |
+
this.lpInputElement.observe('change', this._observeUserLivePreviewUrl.bind(this));
|
781 |
+
reload.update('Reload?');
|
782 |
+
reload.observe('click', self._observeUserLivePreviewUrlReload.bind(this));
|
783 |
+
liElement.update('Please enter live preview URL. (Cannot be detected automatically) ');
|
784 |
+
liElement.insert(reload);
|
785 |
+
liElement.insert(self.lpInputElement);
|
786 |
+
ul.insert(liElement);
|
787 |
+
}
|
788 |
+
|
789 |
+
this._livePreviewSetUpDone = true;
|
790 |
+
return _markDownGlobalConfig.previewUrl !== '' ? url + (_markDownGlobalConfig.stores[0] || 'default') : null;
|
791 |
+
},
|
792 |
+
_isUrl: function (url) {
|
793 |
+
return url.search(/^htt(p|ps):\/\/[a-z0-9]+/) !== -1;
|
794 |
+
},
|
795 |
+
_observeUserLivePreviewSetiFrame: function (url) {
|
796 |
+
if (true === this._isUrl(url)) {
|
797 |
+
this._setIframeSrc(url);
|
798 |
+
} else {
|
799 |
+
if (this._lockedRaptor === false) { // only load once the raptor
|
800 |
+
this.lpInputElement.value = (this._reloadAnswers[this._reloadCounter] || this._reloadAnswers[0]);
|
801 |
+
this._reloadCounter = this._reloadCounter + 1;
|
802 |
+
if (this._reloadCounter === this._reloadAnswers.length) {
|
803 |
+
this._raptorize();
|
804 |
+
this._reloadCounter = 0;
|
805 |
+
}
|
806 |
+
} else {
|
807 |
+
this.lpInputElement.value = this._reloadAnswers[0];
|
808 |
+
}
|
809 |
+
}
|
810 |
+
},
|
811 |
+
_observeUserLivePreviewUrl: function (event) {
|
812 |
+
var value = (event.srcElement || event.target).value.toLowerCase();
|
813 |
+
if (true === this._isUrl(value)) {
|
814 |
+
this._localStorageSet('lpUrl', value);
|
815 |
+
}
|
816 |
+
this._observeUserLivePreviewSetiFrame(value);
|
817 |
+
},
|
818 |
+
_observeUserLivePreviewUrlReload: function (event) {
|
819 |
+
event.preventDefault();
|
820 |
+
var value = this.lpInputElement.value.toLowerCase(),
|
821 |
+
rand = 'rand=' + Math.random(),
|
822 |
+
randPos = value.indexOf('rand=');
|
823 |
+
|
824 |
+
if (randPos !== -1) {
|
825 |
+
value = value.substr(randPos - 1, 20);
|
826 |
+
}
|
827 |
+
if (true === this._isUrl(value)) {
|
828 |
+
this._localStorageSet('lpUrl', value);
|
829 |
+
}
|
830 |
+
if (value.indexOf('?') !== -1) {
|
831 |
+
value = value + '&' + rand;
|
832 |
+
} else {
|
833 |
+
value = value + '?' + rand;
|
834 |
+
}
|
835 |
+
this._observeUserLivePreviewSetiFrame(value);
|
836 |
+
},
|
837 |
+
livePreview: function () {
|
838 |
+
var firstUrl = this._setUpLivePreview();
|
839 |
+
|
840 |
+
if (null !== firstUrl) {
|
841 |
+
this._setIframeSrc(firstUrl);
|
842 |
+
}
|
843 |
+
},
|
844 |
+
_raptorize: function (options) {
|
845 |
+
// based on http://zurb.com/playground/jquery-raptorize
|
846 |
+
//the defaults
|
847 |
+
var self = this,
|
848 |
+
myOptions = options || {}, // make sure options object is valid
|
849 |
+
enterOn = myOptions.appearOn || 'time', //time, konami-code, click, code
|
850 |
+
delayTime = myOptions.delayTime || 2000, //time before raptor attacks on timer mode
|
851 |
+
|
852 |
+
sound = false,
|
853 |
+
canPlayMp3 = false,
|
854 |
+
canPlayOgg = false,
|
855 |
+
|
856 |
+
viewport = document.viewport.getDimensions(),
|
857 |
+
type = '',
|
858 |
+
src = '',
|
859 |
+
raptorAudioMarkup = {},
|
860 |
+
html5 = {},
|
861 |
+
|
862 |
+
myAudio = document.createElement('audio');
|
863 |
+
|
864 |
+
if (myAudio.canPlayType) {
|
865 |
+
canPlayMp3 = !!myAudio.canPlayType && '' !== myAudio.canPlayType('audio/mpeg');
|
866 |
+
canPlayOgg = !!myAudio.canPlayType && '' !== myAudio.canPlayType('audio/ogg; codecs="vorbis"');
|
867 |
+
}
|
868 |
+
if (canPlayMp3) {
|
869 |
+
type = 'audio/mp3';
|
870 |
+
src = _markDownGlobalConfig.featureBaseUrl + 'rs.mp3';
|
871 |
+
sound = true;
|
872 |
+
}
|
873 |
+
if (canPlayOgg) {
|
874 |
+
type = 'audio/ogg';
|
875 |
+
src = _markDownGlobalConfig.featureBaseUrl + 'rs.ogg';
|
876 |
+
sound = true;
|
877 |
+
}
|
878 |
+
|
879 |
+
//Raptor Sound
|
880 |
+
if (sound) {
|
881 |
+
raptorAudioMarkup = new Element('audio', {id: "elRaptorShriek", "preload": "auto"});
|
882 |
+
document.body.appendChild(raptorAudioMarkup);
|
883 |
+
|
884 |
+
html5 = new Element('source');
|
885 |
+
html5.type = type;
|
886 |
+
html5.src = src;
|
887 |
+
raptorAudioMarkup.appendChild(html5);
|
888 |
+
}
|
889 |
+
//Append Raptor and Style
|
890 |
+
var raptorImageMarkup = new Element('img', {
|
891 |
+
id: 'elRaptor',
|
892 |
+
src: _markDownGlobalConfig.featureBaseUrl + 'r.png'
|
893 |
+
}),
|
894 |
+
imgSize = {
|
895 |
+
width: 400,
|
896 |
+
height: 600
|
897 |
+
},
|
898 |
+
raptorPosition = {
|
899 |
+
width: viewport.width - imgSize.width,
|
900 |
+
height: viewport.height - imgSize.height
|
901 |
+
};
|
902 |
+
|
903 |
+
raptorImageMarkup.setStyle({
|
904 |
+
'position': 'fixed',
|
905 |
+
'opacity': 0,
|
906 |
+
'top': viewport.height + 'px',
|
907 |
+
'left': raptorPosition.width + 'px',
|
908 |
+
'zIndex': '10001',
|
909 |
+
'display': 'none'
|
910 |
+
});
|
911 |
+
document.body.insert(raptorImageMarkup);
|
912 |
+
|
913 |
+
function go() {
|
914 |
+
self.lpInputElement.value = ''; // clear input field where the hilarious ;-) text appears
|
915 |
+
self._lockedRaptor = true;
|
916 |
+
|
917 |
+
if (sound) {
|
918 |
+
document.getElementById('elRaptorShriek').play();
|
919 |
+
}
|
920 |
+
|
921 |
+
var raptor = $('elRaptor').setStyle({
|
922 |
+
"display": "block"
|
923 |
+
}), ep1, ep2;
|
924 |
+
|
925 |
+
function removeRaptor() {
|
926 |
+
raptor.remove();
|
927 |
+
$('elRaptorShriek').remove();
|
928 |
+
}
|
929 |
+
|
930 |
+
ep1 = new Effect.Parallel([
|
931 |
+
new Effect.Opacity(raptor, { sync: true, from: 0, to: 1 }),
|
932 |
+
new Effect.Move(raptor, {
|
933 |
+
sync: true,
|
934 |
+
x: raptorPosition.width,
|
935 |
+
y: raptorPosition.height,
|
936 |
+
mode: 'absolute',
|
937 |
+
transition: Effect.Transitions.spring
|
938 |
+
})
|
939 |
+
], {duration: 1});
|
940 |
+
|
941 |
+
ep2 = new Effect.Move(raptor, {
|
942 |
+
xsync: true,
|
943 |
+
x: -1 * imgSize.width,
|
944 |
+
y: viewport.height - 100,
|
945 |
+
mode: 'absolute',
|
946 |
+
transition: Effect.Transitions.spring,
|
947 |
+
duration: 15,
|
948 |
+
delay: 1.1
|
949 |
+
});
|
950 |
+
removeRaptor.delay(5);
|
951 |
+
}
|
952 |
+
|
953 |
+
//Determine Entrance
|
954 |
+
if (enterOn === 'time' && this._lockedRaptor === false) {
|
955 |
+
setTimeout(go, delayTime);
|
956 |
+
}
|
957 |
+
|
958 |
+
} // end func raptorize
|
959 |
+
};
|
960 |
+
|
961 |
/**
|
962 |
+
* event on click at textarea.initMarkdown
|
963 |
+
* @param event
|
964 |
+
* @private
|
965 |
+
*/
|
966 |
+
function _onClickBuildTabsFactory(event) {
|
967 |
+
var target = event.target || event.srcElement,
|
968 |
+
$mdTextArea = {},
|
969 |
+
mageButtons = [],
|
970 |
+
$parentTd = target.parentNode,
|
971 |
+
$mageButtons = $('buttons' + target.id),
|
972 |
+
iFrameJs = null,
|
973 |
+
tabPreview = new TabPreviewHandler();
|
974 |
+
|
975 |
+
if (target.readAttribute('data-tabsBuilt')) {
|
976 |
+
return;
|
977 |
+
}
|
978 |
+
|
979 |
+
if ($mageButtons) {
|
980 |
+
mageButtons = $mageButtons.select('button');
|
981 |
+
mageButtons.each(function (buttonElement) {
|
982 |
+
$(target.id + '__writeB').insert({
|
983 |
+
top: buttonElement
|
984 |
+
});
|
985 |
+
});
|
986 |
+
}
|
987 |
+
|
988 |
+
$mdTextArea = $parentTd.select('.mdTextArea')[0];
|
989 |
+
$mdTextArea.insert(target);
|
990 |
+
|
991 |
+
$parentTd.select('.mdTabContainer')[0].show();
|
992 |
+
target.writeAttribute('data-tabsBuilt', 1);
|
993 |
+
|
994 |
+
if (false === _isFileReaderEnabled()) {
|
995 |
+
$parentTd.select('.md-filereader-text')[0].remove();
|
996 |
+
}
|
997 |
+
|
998 |
+
iFrameJs = $(target.id + '__iFrameJS'); // in category edit the security of prototype strips out the script template
|
999 |
+
if (iFrameJs) { // so this is null in category edit
|
1000 |
+
tempIframeJSSource = iFrameJs.innerHTML.replace('~~origin~~', document.location.origin);
|
1001 |
+
|
1002 |
+
// window.addEventListener("message", receiveMessage, false);
|
1003 |
+
Event.observe(window, 'message', function (event) {
|
1004 |
+
var data = event.data.split('=');
|
1005 |
+
iFrameScrollPositions[data[0]] = ~~data[1]; // convert to int via ~~
|
1006 |
+
});
|
1007 |
+
}
|
1008 |
+
/**
|
1009 |
+
* creating clickable tabs
|
1010 |
+
*/
|
1011 |
+
$$('.mdTabs ul li a').each(function (aElement) {
|
1012 |
+
aElement.observe('click', function (event) {
|
1013 |
+
Event.stop(event);
|
1014 |
+
var grandParentsNode = this.parentNode.parentNode,
|
1015 |
+
current = grandParentsNode.getAttribute('data-current'),
|
1016 |
+
idSplit = this.id.split('__'),
|
1017 |
+
taId = idSplit[0],
|
1018 |
+
ident = idSplit[idSplit.length - 1],
|
1019 |
+
$tabBody = document.getElementById(taId + '__' + ident + 'B');
|
1020 |
+
|
1021 |
+
// hide
|
1022 |
+
document.getElementById(taId + '__' + current).removeClassName('active'); // header
|
1023 |
+
document.getElementById(taId + '__' + current + 'B').removeClassName('active'); // page
|
1024 |
+
|
1025 |
+
// show
|
1026 |
+
this.setAttribute('class', 'active'); // header
|
1027 |
+
|
1028 |
+
$tabBody.addClassName('active'); // page
|
1029 |
+
grandParentsNode.setAttribute('data-current', ident);
|
1030 |
+
|
1031 |
+
if (typeof tabPreview[ident] === 'function') {
|
1032 |
+
tabPreview.setData({
|
1033 |
+
tabBody: $tabBody,
|
1034 |
+
textAreaId: taId
|
1035 |
+
});
|
1036 |
+
tabPreview[ident]();
|
1037 |
+
}
|
1038 |
+
});
|
1039 |
+
});
|
1040 |
+
} // end _onClickBuildTabsFactory
|
1041 |
+
|
1042 |
+
/*************************************************************************************************************
|
1043 |
* loads the filereader, epiceditor
|
1044 |
*/
|
1045 |
function _mdInitialize() {
|
1046 |
_initGlobalConfig();
|
1047 |
+
|
1048 |
var parentElementIds = ['product_edit_form', 'edit_form', 'category-edit-container', 'email_template_edit_form'];
|
1049 |
+
|
1050 |
if (varienGlobalEvents) {
|
1051 |
varienGlobalEvents.fireEvent('mdLoadForms', parentElementIds);
|
1052 |
}
|
1053 |
|
1054 |
// loading multiple instances on one page
|
1055 |
+
// only works with event delegation due category edit page ... and the varientabs js class ...
|
1056 |
// fire event for customization varienGlobalEvents.attachEventHandler('showTab', function (e) {...}
|
1057 |
parentElementIds.forEach(function (elementId) {
|
1058 |
var $elementId = $(elementId);
|
1059 |
if ($elementId) {
|
1060 |
+
|
1061 |
+
$elementId.on('click', 'textarea.initMarkdown', _onClickBuildTabsFactory);
|
1062 |
+
|
1063 |
// some things are only possible with event delegation ...
|
1064 |
if (true === _isEpicEditorEnabled() && true === _markDownGlobalConfig.eeLoadOnClick) {
|
1065 |
$elementId.on('click', 'textarea.initEpicEditor', _createEpicEditorInstances);
|
1066 |
}
|
1067 |
if (true === _isFileReaderEnabled()) {
|
1068 |
+
$elementId.on('click', 'textarea.initMarkdown', _createFileReaderFactory);
|
1069 |
}
|
|
|
1070 |
}
|
1071 |
});
|
1072 |
+
|
1073 |
+
if (_markDownGlobalConfig.isHiddenInsertImageButton === true) {
|
1074 |
+
$$('button.add-image').each(function (element) {
|
1075 |
+
element.remove();
|
1076 |
+
});
|
1077 |
+
}
|
1078 |
}
|
1079 |
|
|
|
1080 |
this.toggleMarkdown = toggleMarkdown;
|
1081 |
this.toggleEpicEditor = toggleEpicEditor;
|
1082 |
this.toggleMarkdownSource = toggleMarkdownSource;
|
1177 |
Promise: Promise,
|
1178 |
join: join,
|
1179 |
chain: chain,
|
|
|
|
|
|
|
|
|
|
|
1180 |
};
|
1181 |
|
1182 |
if (typeof define === 'function' && define.amd) {
|
@@ -41,7 +41,7 @@ block.list = replace(block.list)
|
|
41 |
block._tag = '(?!(?:'
|
42 |
+ 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code'
|
43 |
+ '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo'
|
44 |
-
+ '|span|br|wbr|ins|del|img)\\b)\\w+(
|
45 |
|
46 |
block.html = replace(block.html)
|
47 |
('comment', /<!--[\s\S]*?-->/)
|
@@ -514,6 +514,8 @@ function InlineLexer(links, options) {
|
|
514 |
this.options = options || marked.defaults;
|
515 |
this.links = links;
|
516 |
this.rules = inline.normal;
|
|
|
|
|
517 |
|
518 |
if (!this.links) {
|
519 |
throw new
|
@@ -577,11 +579,7 @@ InlineLexer.prototype.output = function(src) {
|
|
577 |
text = escape(cap[1]);
|
578 |
href = text;
|
579 |
}
|
580 |
-
out +=
|
581 |
-
+ href
|
582 |
-
+ '">'
|
583 |
-
+ text
|
584 |
-
+ '</a>';
|
585 |
continue;
|
586 |
}
|
587 |
|
@@ -590,11 +588,7 @@ InlineLexer.prototype.output = function(src) {
|
|
590 |
src = src.substring(cap[0].length);
|
591 |
text = escape(cap[1]);
|
592 |
href = text;
|
593 |
-
out +=
|
594 |
-
+ href
|
595 |
-
+ '">'
|
596 |
-
+ text
|
597 |
-
+ '</a>';
|
598 |
continue;
|
599 |
}
|
600 |
|
@@ -635,43 +629,35 @@ InlineLexer.prototype.output = function(src) {
|
|
635 |
// strong
|
636 |
if (cap = this.rules.strong.exec(src)) {
|
637 |
src = src.substring(cap[0].length);
|
638 |
-
out +=
|
639 |
-
+ this.output(cap[2] || cap[1])
|
640 |
-
+ '</strong>';
|
641 |
continue;
|
642 |
}
|
643 |
|
644 |
// em
|
645 |
if (cap = this.rules.em.exec(src)) {
|
646 |
src = src.substring(cap[0].length);
|
647 |
-
out +=
|
648 |
-
+ this.output(cap[2] || cap[1])
|
649 |
-
+ '</em>';
|
650 |
continue;
|
651 |
}
|
652 |
|
653 |
// code
|
654 |
if (cap = this.rules.code.exec(src)) {
|
655 |
src = src.substring(cap[0].length);
|
656 |
-
out +=
|
657 |
-
+ escape(cap[2], true)
|
658 |
-
+ '</code>';
|
659 |
continue;
|
660 |
}
|
661 |
|
662 |
// br
|
663 |
if (cap = this.rules.br.exec(src)) {
|
664 |
src = src.substring(cap[0].length);
|
665 |
-
out +=
|
666 |
continue;
|
667 |
}
|
668 |
|
669 |
// del (gfm)
|
670 |
if (cap = this.rules.del.exec(src)) {
|
671 |
src = src.substring(cap[0].length);
|
672 |
-
out +=
|
673 |
-
+ this.output(cap[1])
|
674 |
-
+ '</del>';
|
675 |
continue;
|
676 |
}
|
677 |
|
@@ -696,31 +682,12 @@ InlineLexer.prototype.output = function(src) {
|
|
696 |
*/
|
697 |
|
698 |
InlineLexer.prototype.outputLink = function(cap, link) {
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
+ escape(link.title)
|
706 |
-
+ '"'
|
707 |
-
: '')
|
708 |
-
+ '>'
|
709 |
-
+ this.output(cap[1])
|
710 |
-
+ '</a>';
|
711 |
-
} else {
|
712 |
-
return '<img src="'
|
713 |
-
+ escape(link.href)
|
714 |
-
+ '" alt="'
|
715 |
-
+ escape(cap[1])
|
716 |
-
+ '"'
|
717 |
-
+ (link.title
|
718 |
-
? ' title="'
|
719 |
-
+ escape(link.title)
|
720 |
-
+ '"'
|
721 |
-
: '')
|
722 |
-
+ '>';
|
723 |
-
}
|
724 |
};
|
725 |
|
726 |
/**
|
@@ -765,6 +732,149 @@ InlineLexer.prototype.mangle = function(text) {
|
|
765 |
return out;
|
766 |
};
|
767 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
768 |
/**
|
769 |
* Parsing & Compiling
|
770 |
*/
|
@@ -773,14 +883,17 @@ function Parser(options) {
|
|
773 |
this.tokens = [];
|
774 |
this.token = null;
|
775 |
this.options = options || marked.defaults;
|
|
|
|
|
|
|
776 |
}
|
777 |
|
778 |
/**
|
779 |
* Static Parse Method
|
780 |
*/
|
781 |
|
782 |
-
Parser.parse = function(src, options) {
|
783 |
-
var parser = new Parser(options);
|
784 |
return parser.parse(src);
|
785 |
};
|
786 |
|
@@ -789,7 +902,7 @@ Parser.parse = function(src, options) {
|
|
789 |
*/
|
790 |
|
791 |
Parser.prototype.parse = function(src) {
|
792 |
-
this.inline = new InlineLexer(src.links, this.options);
|
793 |
this.tokens = src.reverse();
|
794 |
|
795 |
var out = '';
|
@@ -840,83 +953,53 @@ Parser.prototype.tok = function() {
|
|
840 |
return '';
|
841 |
}
|
842 |
case 'hr': {
|
843 |
-
return
|
844 |
}
|
845 |
case 'heading': {
|
846 |
-
return
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
+ '">'
|
851 |
-
+ this.inline.output(this.token.text)
|
852 |
-
+ '</h'
|
853 |
-
+ this.token.depth
|
854 |
-
+ '>\n';
|
855 |
}
|
856 |
case 'code': {
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
this.token.escaped = true;
|
861 |
-
this.token.text = code;
|
862 |
-
}
|
863 |
-
}
|
864 |
-
|
865 |
-
if (!this.token.escaped) {
|
866 |
-
this.token.text = escape(this.token.text, true);
|
867 |
-
}
|
868 |
-
|
869 |
-
return '<pre><code'
|
870 |
-
+ (this.token.lang
|
871 |
-
? ' class="'
|
872 |
-
+ this.options.langPrefix
|
873 |
-
+ this.token.lang
|
874 |
-
+ '"'
|
875 |
-
: '')
|
876 |
-
+ '>'
|
877 |
-
+ this.token.text
|
878 |
-
+ '</code></pre>\n';
|
879 |
}
|
880 |
case 'table': {
|
881 |
-
var
|
882 |
-
,
|
883 |
, i
|
884 |
, row
|
885 |
, cell
|
|
|
886 |
, j;
|
887 |
|
888 |
// header
|
889 |
-
|
890 |
for (i = 0; i < this.token.header.length; i++) {
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
body += '>' + heading + '</th>\n';
|
897 |
}
|
898 |
-
|
899 |
|
900 |
-
// body
|
901 |
-
body += '<tbody>\n'
|
902 |
for (i = 0; i < this.token.cells.length; i++) {
|
903 |
row = this.token.cells[i];
|
904 |
-
|
|
|
905 |
for (j = 0; j < row.length; j++) {
|
906 |
-
cell
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
}
|
911 |
-
body += '>' + cell + '</td>\n';
|
912 |
}
|
913 |
-
body += '</tr>\n';
|
914 |
-
}
|
915 |
-
body += '</tbody>\n';
|
916 |
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
}
|
921 |
case 'blockquote_start': {
|
922 |
var body = '';
|
@@ -925,25 +1008,17 @@ Parser.prototype.tok = function() {
|
|
925 |
body += this.tok();
|
926 |
}
|
927 |
|
928 |
-
return
|
929 |
-
+ body
|
930 |
-
+ '</blockquote>\n';
|
931 |
}
|
932 |
case 'list_start': {
|
933 |
-
var
|
934 |
-
,
|
935 |
|
936 |
while (this.next().type !== 'list_end') {
|
937 |
body += this.tok();
|
938 |
}
|
939 |
|
940 |
-
return
|
941 |
-
+ type
|
942 |
-
+ '>\n'
|
943 |
-
+ body
|
944 |
-
+ '</'
|
945 |
-
+ type
|
946 |
-
+ '>\n';
|
947 |
}
|
948 |
case 'list_item_start': {
|
949 |
var body = '';
|
@@ -954,9 +1029,7 @@ Parser.prototype.tok = function() {
|
|
954 |
: this.tok();
|
955 |
}
|
956 |
|
957 |
-
return
|
958 |
-
+ body
|
959 |
-
+ '</li>\n';
|
960 |
}
|
961 |
case 'loose_item_start': {
|
962 |
var body = '';
|
@@ -965,24 +1038,19 @@ Parser.prototype.tok = function() {
|
|
965 |
body += this.tok();
|
966 |
}
|
967 |
|
968 |
-
return
|
969 |
-
+ body
|
970 |
-
+ '</li>\n';
|
971 |
}
|
972 |
case 'html': {
|
973 |
-
|
974 |
? this.inline.output(this.token.text)
|
975 |
: this.token.text;
|
|
|
976 |
}
|
977 |
case 'paragraph': {
|
978 |
-
return
|
979 |
-
+ this.inline.output(this.token.text)
|
980 |
-
+ '</p>\n';
|
981 |
}
|
982 |
case 'text': {
|
983 |
-
return
|
984 |
-
+ this.parseText()
|
985 |
-
+ '</p>\n';
|
986 |
}
|
987 |
}
|
988 |
};
|
@@ -1000,6 +1068,19 @@ function escape(html, encode) {
|
|
1000 |
.replace(/'/g, ''');
|
1001 |
}
|
1002 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1003 |
function replace(regex, opt) {
|
1004 |
regex = regex.source;
|
1005 |
opt = opt || '';
|
@@ -1032,6 +1113,7 @@ function merge(obj) {
|
|
1032 |
return obj;
|
1033 |
}
|
1034 |
|
|
|
1035 |
/**
|
1036 |
* Marked
|
1037 |
*/
|
@@ -1134,7 +1216,9 @@ marked.defaults = {
|
|
1134 |
silent: false,
|
1135 |
highlight: null,
|
1136 |
langPrefix: 'lang-',
|
1137 |
-
smartypants: false
|
|
|
|
|
1138 |
};
|
1139 |
|
1140 |
/**
|
@@ -1144,6 +1228,8 @@ marked.defaults = {
|
|
1144 |
marked.Parser = Parser;
|
1145 |
marked.parser = Parser.parse;
|
1146 |
|
|
|
|
|
1147 |
marked.Lexer = Lexer;
|
1148 |
marked.lexer = Lexer.lex;
|
1149 |
|
41 |
block._tag = '(?!(?:'
|
42 |
+ 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code'
|
43 |
+ '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo'
|
44 |
+
+ '|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b';
|
45 |
|
46 |
block.html = replace(block.html)
|
47 |
('comment', /<!--[\s\S]*?-->/)
|
514 |
this.options = options || marked.defaults;
|
515 |
this.links = links;
|
516 |
this.rules = inline.normal;
|
517 |
+
this.renderer = this.options.renderer || new Renderer;
|
518 |
+
this.renderer.options = this.options;
|
519 |
|
520 |
if (!this.links) {
|
521 |
throw new
|
579 |
text = escape(cap[1]);
|
580 |
href = text;
|
581 |
}
|
582 |
+
out += this.renderer.link(href, null, text);
|
|
|
|
|
|
|
|
|
583 |
continue;
|
584 |
}
|
585 |
|
588 |
src = src.substring(cap[0].length);
|
589 |
text = escape(cap[1]);
|
590 |
href = text;
|
591 |
+
out += this.renderer.link(href, null, text);
|
|
|
|
|
|
|
|
|
592 |
continue;
|
593 |
}
|
594 |
|
629 |
// strong
|
630 |
if (cap = this.rules.strong.exec(src)) {
|
631 |
src = src.substring(cap[0].length);
|
632 |
+
out += this.renderer.strong(this.output(cap[2] || cap[1]));
|
|
|
|
|
633 |
continue;
|
634 |
}
|
635 |
|
636 |
// em
|
637 |
if (cap = this.rules.em.exec(src)) {
|
638 |
src = src.substring(cap[0].length);
|
639 |
+
out += this.renderer.em(this.output(cap[2] || cap[1]));
|
|
|
|
|
640 |
continue;
|
641 |
}
|
642 |
|
643 |
// code
|
644 |
if (cap = this.rules.code.exec(src)) {
|
645 |
src = src.substring(cap[0].length);
|
646 |
+
out += this.renderer.codespan(escape(cap[2], true));
|
|
|
|
|
647 |
continue;
|
648 |
}
|
649 |
|
650 |
// br
|
651 |
if (cap = this.rules.br.exec(src)) {
|
652 |
src = src.substring(cap[0].length);
|
653 |
+
out += this.renderer.br();
|
654 |
continue;
|
655 |
}
|
656 |
|
657 |
// del (gfm)
|
658 |
if (cap = this.rules.del.exec(src)) {
|
659 |
src = src.substring(cap[0].length);
|
660 |
+
out += this.renderer.del(this.output(cap[1]));
|
|
|
|
|
661 |
continue;
|
662 |
}
|
663 |
|
682 |
*/
|
683 |
|
684 |
InlineLexer.prototype.outputLink = function(cap, link) {
|
685 |
+
var href = escape(link.href)
|
686 |
+
, title = link.title ? escape(link.title) : null;
|
687 |
+
|
688 |
+
return cap[0].charAt(0) !== '!'
|
689 |
+
? this.renderer.link(href, title, this.output(cap[1]))
|
690 |
+
: this.renderer.image(href, title, escape(cap[1]));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
691 |
};
|
692 |
|
693 |
/**
|
732 |
return out;
|
733 |
};
|
734 |
|
735 |
+
/**
|
736 |
+
* Renderer
|
737 |
+
*/
|
738 |
+
|
739 |
+
function Renderer(options) {
|
740 |
+
this.options = options || {};
|
741 |
+
}
|
742 |
+
|
743 |
+
Renderer.prototype.code = function(code, lang, escaped) {
|
744 |
+
if (this.options.highlight) {
|
745 |
+
var out = this.options.highlight(code, lang);
|
746 |
+
if (out != null && out !== code) {
|
747 |
+
escaped = true;
|
748 |
+
code = out;
|
749 |
+
}
|
750 |
+
}
|
751 |
+
|
752 |
+
if (!lang) {
|
753 |
+
return '<pre><code>'
|
754 |
+
+ (escaped ? code : escape(code, true))
|
755 |
+
+ '\n</code></pre>';
|
756 |
+
}
|
757 |
+
|
758 |
+
return '<pre><code class="'
|
759 |
+
+ this.options.langPrefix
|
760 |
+
+ escape(lang, true)
|
761 |
+
+ '">'
|
762 |
+
+ (escaped ? code : escape(code, true))
|
763 |
+
+ '\n</code></pre>\n';
|
764 |
+
};
|
765 |
+
|
766 |
+
Renderer.prototype.blockquote = function(quote) {
|
767 |
+
return '<blockquote>\n' + quote + '</blockquote>\n';
|
768 |
+
};
|
769 |
+
|
770 |
+
Renderer.prototype.html = function(html) {
|
771 |
+
return html;
|
772 |
+
};
|
773 |
+
|
774 |
+
Renderer.prototype.heading = function(text, level, raw) {
|
775 |
+
return '<h'
|
776 |
+
+ level
|
777 |
+
+ ' id="'
|
778 |
+
+ this.options.headerPrefix
|
779 |
+
+ raw.toLowerCase().replace(/[^\w]+/g, '-')
|
780 |
+
+ '">'
|
781 |
+
+ text
|
782 |
+
+ '</h'
|
783 |
+
+ level
|
784 |
+
+ '>\n';
|
785 |
+
};
|
786 |
+
|
787 |
+
Renderer.prototype.hr = function() {
|
788 |
+
return '<hr>\n';
|
789 |
+
};
|
790 |
+
|
791 |
+
Renderer.prototype.list = function(body, ordered) {
|
792 |
+
var type = ordered ? 'ol' : 'ul';
|
793 |
+
return '<' + type + '>\n' + body + '</' + type + '>\n';
|
794 |
+
};
|
795 |
+
|
796 |
+
Renderer.prototype.listitem = function(text) {
|
797 |
+
return '<li>' + text + '</li>\n';
|
798 |
+
};
|
799 |
+
|
800 |
+
Renderer.prototype.paragraph = function(text) {
|
801 |
+
return '<p>' + text + '</p>\n';
|
802 |
+
};
|
803 |
+
|
804 |
+
Renderer.prototype.table = function(header, body) {
|
805 |
+
return '<table>\n'
|
806 |
+
+ '<thead>\n'
|
807 |
+
+ header
|
808 |
+
+ '</thead>\n'
|
809 |
+
+ '<tbody>\n'
|
810 |
+
+ body
|
811 |
+
+ '</tbody>\n'
|
812 |
+
+ '</table>\n';
|
813 |
+
};
|
814 |
+
|
815 |
+
Renderer.prototype.tablerow = function(content) {
|
816 |
+
return '<tr>\n' + content + '</tr>\n';
|
817 |
+
};
|
818 |
+
|
819 |
+
Renderer.prototype.tablecell = function(content, flags) {
|
820 |
+
var type = flags.header ? 'th' : 'td';
|
821 |
+
var tag = flags.align
|
822 |
+
? '<' + type + ' style="text-align:' + flags.align + '">'
|
823 |
+
: '<' + type + '>';
|
824 |
+
return tag + content + '</' + type + '>\n';
|
825 |
+
};
|
826 |
+
|
827 |
+
// span level renderer
|
828 |
+
Renderer.prototype.strong = function(text) {
|
829 |
+
return '<strong>' + text + '</strong>';
|
830 |
+
};
|
831 |
+
|
832 |
+
Renderer.prototype.em = function(text) {
|
833 |
+
return '<em>' + text + '</em>';
|
834 |
+
};
|
835 |
+
|
836 |
+
Renderer.prototype.codespan = function(text) {
|
837 |
+
return '<code>' + text + '</code>';
|
838 |
+
};
|
839 |
+
|
840 |
+
Renderer.prototype.br = function() {
|
841 |
+
return '<br>';
|
842 |
+
};
|
843 |
+
|
844 |
+
Renderer.prototype.del = function(text) {
|
845 |
+
return '<del>' + text + '</del>';
|
846 |
+
};
|
847 |
+
|
848 |
+
Renderer.prototype.link = function(href, title, text) {
|
849 |
+
if (this.options.sanitize) {
|
850 |
+
try {
|
851 |
+
var prot = decodeURIComponent(unescape(href))
|
852 |
+
.replace(/[^\w:]/g, '')
|
853 |
+
.toLowerCase();
|
854 |
+
} catch (e) {
|
855 |
+
return '';
|
856 |
+
}
|
857 |
+
if (prot.indexOf('javascript:') === 0) {
|
858 |
+
return '';
|
859 |
+
}
|
860 |
+
}
|
861 |
+
var out = '<a href="' + href + '"';
|
862 |
+
if (title) {
|
863 |
+
out += ' title="' + title + '"';
|
864 |
+
}
|
865 |
+
out += '>' + text + '</a>';
|
866 |
+
return out;
|
867 |
+
};
|
868 |
+
|
869 |
+
Renderer.prototype.image = function(href, title, text) {
|
870 |
+
var out = '<img src="' + href + '" alt="' + text + '"';
|
871 |
+
if (title) {
|
872 |
+
out += ' title="' + title + '"';
|
873 |
+
}
|
874 |
+
out += '>';
|
875 |
+
return out;
|
876 |
+
};
|
877 |
+
|
878 |
/**
|
879 |
* Parsing & Compiling
|
880 |
*/
|
883 |
this.tokens = [];
|
884 |
this.token = null;
|
885 |
this.options = options || marked.defaults;
|
886 |
+
this.options.renderer = this.options.renderer || new Renderer;
|
887 |
+
this.renderer = this.options.renderer;
|
888 |
+
this.renderer.options = this.options;
|
889 |
}
|
890 |
|
891 |
/**
|
892 |
* Static Parse Method
|
893 |
*/
|
894 |
|
895 |
+
Parser.parse = function(src, options, renderer) {
|
896 |
+
var parser = new Parser(options, renderer);
|
897 |
return parser.parse(src);
|
898 |
};
|
899 |
|
902 |
*/
|
903 |
|
904 |
Parser.prototype.parse = function(src) {
|
905 |
+
this.inline = new InlineLexer(src.links, this.options, this.renderer);
|
906 |
this.tokens = src.reverse();
|
907 |
|
908 |
var out = '';
|
953 |
return '';
|
954 |
}
|
955 |
case 'hr': {
|
956 |
+
return this.renderer.hr();
|
957 |
}
|
958 |
case 'heading': {
|
959 |
+
return this.renderer.heading(
|
960 |
+
this.inline.output(this.token.text),
|
961 |
+
this.token.depth,
|
962 |
+
this.token.text);
|
|
|
|
|
|
|
|
|
|
|
963 |
}
|
964 |
case 'code': {
|
965 |
+
return this.renderer.code(this.token.text,
|
966 |
+
this.token.lang,
|
967 |
+
this.token.escaped);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
968 |
}
|
969 |
case 'table': {
|
970 |
+
var header = ''
|
971 |
+
, body = ''
|
972 |
, i
|
973 |
, row
|
974 |
, cell
|
975 |
+
, flags
|
976 |
, j;
|
977 |
|
978 |
// header
|
979 |
+
cell = '';
|
980 |
for (i = 0; i < this.token.header.length; i++) {
|
981 |
+
flags = { header: true, align: this.token.align[i] };
|
982 |
+
cell += this.renderer.tablecell(
|
983 |
+
this.inline.output(this.token.header[i]),
|
984 |
+
{ header: true, align: this.token.align[i] }
|
985 |
+
);
|
|
|
986 |
}
|
987 |
+
header += this.renderer.tablerow(cell);
|
988 |
|
|
|
|
|
989 |
for (i = 0; i < this.token.cells.length; i++) {
|
990 |
row = this.token.cells[i];
|
991 |
+
|
992 |
+
cell = '';
|
993 |
for (j = 0; j < row.length; j++) {
|
994 |
+
cell += this.renderer.tablecell(
|
995 |
+
this.inline.output(row[j]),
|
996 |
+
{ header: false, align: this.token.align[j] }
|
997 |
+
);
|
|
|
|
|
998 |
}
|
|
|
|
|
|
|
999 |
|
1000 |
+
body += this.renderer.tablerow(cell);
|
1001 |
+
}
|
1002 |
+
return this.renderer.table(header, body);
|
1003 |
}
|
1004 |
case 'blockquote_start': {
|
1005 |
var body = '';
|
1008 |
body += this.tok();
|
1009 |
}
|
1010 |
|
1011 |
+
return this.renderer.blockquote(body);
|
|
|
|
|
1012 |
}
|
1013 |
case 'list_start': {
|
1014 |
+
var body = ''
|
1015 |
+
, ordered = this.token.ordered;
|
1016 |
|
1017 |
while (this.next().type !== 'list_end') {
|
1018 |
body += this.tok();
|
1019 |
}
|
1020 |
|
1021 |
+
return this.renderer.list(body, ordered);
|
|
|
|
|
|
|
|
|
|
|
|
|
1022 |
}
|
1023 |
case 'list_item_start': {
|
1024 |
var body = '';
|
1029 |
: this.tok();
|
1030 |
}
|
1031 |
|
1032 |
+
return this.renderer.listitem(body);
|
|
|
|
|
1033 |
}
|
1034 |
case 'loose_item_start': {
|
1035 |
var body = '';
|
1038 |
body += this.tok();
|
1039 |
}
|
1040 |
|
1041 |
+
return this.renderer.listitem(body);
|
|
|
|
|
1042 |
}
|
1043 |
case 'html': {
|
1044 |
+
var html = !this.token.pre && !this.options.pedantic
|
1045 |
? this.inline.output(this.token.text)
|
1046 |
: this.token.text;
|
1047 |
+
return this.renderer.html(html);
|
1048 |
}
|
1049 |
case 'paragraph': {
|
1050 |
+
return this.renderer.paragraph(this.inline.output(this.token.text));
|
|
|
|
|
1051 |
}
|
1052 |
case 'text': {
|
1053 |
+
return this.renderer.paragraph(this.parseText());
|
|
|
|
|
1054 |
}
|
1055 |
}
|
1056 |
};
|
1068 |
.replace(/'/g, ''');
|
1069 |
}
|
1070 |
|
1071 |
+
function unescape(html) {
|
1072 |
+
return html.replace(/&([#\w]+);/g, function(_, n) {
|
1073 |
+
n = n.toLowerCase();
|
1074 |
+
if (n === 'colon') return ':';
|
1075 |
+
if (n.charAt(0) === '#') {
|
1076 |
+
return n.charAt(1) === 'x'
|
1077 |
+
? String.fromCharCode(parseInt(n.substring(2), 16))
|
1078 |
+
: String.fromCharCode(+n.substring(1));
|
1079 |
+
}
|
1080 |
+
return '';
|
1081 |
+
});
|
1082 |
+
}
|
1083 |
+
|
1084 |
function replace(regex, opt) {
|
1085 |
regex = regex.source;
|
1086 |
opt = opt || '';
|
1113 |
return obj;
|
1114 |
}
|
1115 |
|
1116 |
+
|
1117 |
/**
|
1118 |
* Marked
|
1119 |
*/
|
1216 |
silent: false,
|
1217 |
highlight: null,
|
1218 |
langPrefix: 'lang-',
|
1219 |
+
smartypants: false,
|
1220 |
+
headerPrefix: '',
|
1221 |
+
renderer: new Renderer
|
1222 |
};
|
1223 |
|
1224 |
/**
|
1228 |
marked.Parser = Parser;
|
1229 |
marked.parser = Parser.parse;
|
1230 |
|
1231 |
+
marked.Renderer = Renderer;
|
1232 |
+
|
1233 |
marked.Lexer = Lexer;
|
1234 |
marked.lexer = Lexer.lex;
|
1235 |
|
@@ -2,7 +2,7 @@
|
|
2 |
* Copyright (c) 2013, Leon Sorokin
|
3 |
* All rights reserved. (MIT Licensed)
|
4 |
*
|
5 |
-
* reMarked.js -
|
6 |
*/
|
7 |
|
8 |
reMarked = function(opts) {
|
@@ -13,9 +13,9 @@ reMarked = function(opts) {
|
|
13 |
// link_near: // cite links immediately after blocks
|
14 |
h1_setext: true, // underline h1 headers
|
15 |
h2_setext: true, // underline h2 headers
|
16 |
-
h_atx_suf: false, // header
|
17 |
// h_compact: true, // compact headers (except h1)
|
18 |
-
gfm_code: false, //
|
19 |
li_bullet: "*-+"[0], // list item bullet style
|
20 |
// list_indnt: // indent top-level lists
|
21 |
hr_char: "-_*"[0], // hr style
|
@@ -27,6 +27,7 @@ reMarked = function(opts) {
|
|
27 |
tbl_edges: false, // show side edges on tables
|
28 |
hash_lnks: false, // anchors w/hash hrefs as links
|
29 |
br_only: false, // avoid using " " as line break indicator
|
|
|
30 |
// comp_style: false, // use getComputedStyle instead of hardcoded tag list to discern block/inline
|
31 |
unsup_tags: { // handling of unsupported tags, defined in terms of desired output style. if not listed, output = outerHTML
|
32 |
// no output
|
@@ -41,12 +42,10 @@ reMarked = function(opts) {
|
|
41 |
block1c: "dt dd caption legend figcaption output",
|
42 |
// eg: "\n\n<tag>some content</tag>"
|
43 |
block2c: "canvas audio video iframe",
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
}
|
49 |
-
*/
|
50 |
}
|
51 |
};
|
52 |
|
@@ -94,8 +93,8 @@ reMarked = function(opts) {
|
|
94 |
|
95 |
var buf = "<" + tag;
|
96 |
|
97 |
-
for (var attr, i=0
|
98 |
-
attr =
|
99 |
buf += " " + attr.nodeName + '="' + attr.nodeValue + '"';
|
100 |
}
|
101 |
|
@@ -159,14 +158,14 @@ reMarked = function(opts) {
|
|
159 |
re += "\n\n";
|
160 |
var maxlen = 0;
|
161 |
// get longest link href with title, TODO: use getAttribute?
|
162 |
-
for (var y
|
163 |
if (!links[y].e.title) continue;
|
164 |
var len = links[y].e.href.length;
|
165 |
if (len && len > maxlen)
|
166 |
maxlen = len;
|
167 |
}
|
168 |
|
169 |
-
for (var k
|
170 |
var title = links[k].e.title ? rep(" ", (maxlen + 2) - links[k].e.href.length) + '"' + links[k].e.title + '"' : "";
|
171 |
re += " [" + (+k+1) + "]: " + (nodeName(links[k].e) == "a" ? links[k].e.href : links[k].e.src) + title + "\n";
|
172 |
}
|
@@ -199,12 +198,44 @@ reMarked = function(opts) {
|
|
199 |
// inline elems allowing adjacent whitespace text nodes to be rendered
|
200 |
var inlRe = cfg.unsup_tags.inline, n, name;
|
201 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
for (i in this.e.childNodes) {
|
203 |
if (!/\d+/.test(i)) continue;
|
204 |
|
205 |
n = this.e.childNodes[i];
|
206 |
name = nodeName(n);
|
207 |
|
|
|
|
|
|
|
|
|
208 |
// ignored tags
|
209 |
if (cfg.unsup_tags.ignore.test(name))
|
210 |
continue;
|
@@ -264,11 +295,9 @@ reMarked = function(opts) {
|
|
264 |
rendK: function()
|
265 |
{
|
266 |
var n, buf = "";
|
267 |
-
for (var i
|
268 |
n = this.c[i];
|
269 |
-
|
270 |
-
// @SchumacherFM: added typeof n.rend
|
271 |
-
buf += (n.bef || "") +( typeof n.rend === 'function' ? n.rend() : '' ) + (n.aft || "");
|
272 |
}
|
273 |
return buf.replace(/^\n+|\n+$/, "");
|
274 |
}
|
@@ -311,7 +340,7 @@ reMarked = function(opts) {
|
|
311 |
if (this.p instanceof lib.li) {
|
312 |
var repl = null, spcs = kids.match(/^[\t ]+/gm);
|
313 |
if (!spcs) return kids;
|
314 |
-
for (var i
|
315 |
if (repl === null || spcs[i][0].length < repl.length)
|
316 |
repl = spcs[i][0];
|
317 |
}
|
@@ -512,9 +541,9 @@ reMarked = function(opts) {
|
|
512 |
},
|
513 |
rend: function() {
|
514 |
// run prep on all cells to get max col widths
|
515 |
-
for (var tsec
|
516 |
-
for (var row
|
517 |
-
for (var cell
|
518 |
this.c[tsec].c[row].c[cell].prep();
|
519 |
|
520 |
return this.supr();
|
@@ -524,7 +553,7 @@ reMarked = function(opts) {
|
|
524 |
lib.thead = cfg.gfm_tbls ? lib.cblk.extend({
|
525 |
wrap: ["\n", function(kids) {
|
526 |
var buf = "";
|
527 |
-
for (var i
|
528 |
var col = this.p.cols[i],
|
529 |
al = col.a[0] == "c" ? ":" : " ",
|
530 |
ar = col.a[0] == "r" || col.a[0] == "c" ? ":" : " ";
|
@@ -582,7 +611,7 @@ reMarked = function(opts) {
|
|
582 |
col.w = Math.max(col.w || 0, this.guts.length);
|
583 |
if (this.e.align)
|
584 |
col.a = this.e.align;
|
585 |
-
}
|
586 |
}) : lib.ctblk.extend();
|
587 |
|
588 |
lib.td = lib.th.extend();
|
2 |
* Copyright (c) 2013, Leon Sorokin
|
3 |
* All rights reserved. (MIT Licensed)
|
4 |
*
|
5 |
+
* reMarked.js - HTML > markdown
|
6 |
*/
|
7 |
|
8 |
reMarked = function(opts) {
|
13 |
// link_near: // cite links immediately after blocks
|
14 |
h1_setext: true, // underline h1 headers
|
15 |
h2_setext: true, // underline h2 headers
|
16 |
+
h_atx_suf: false, // header suffixes (###)
|
17 |
// h_compact: true, // compact headers (except h1)
|
18 |
+
gfm_code: false, // gfm code blocks (```)
|
19 |
li_bullet: "*-+"[0], // list item bullet style
|
20 |
// list_indnt: // indent top-level lists
|
21 |
hr_char: "-_*"[0], // hr style
|
27 |
tbl_edges: false, // show side edges on tables
|
28 |
hash_lnks: false, // anchors w/hash hrefs as links
|
29 |
br_only: false, // avoid using " " as line break indicator
|
30 |
+
col_pre: "col ", // column prefix to use when creating missing headers for tables
|
31 |
// comp_style: false, // use getComputedStyle instead of hardcoded tag list to discern block/inline
|
32 |
unsup_tags: { // handling of unsupported tags, defined in terms of desired output style. if not listed, output = outerHTML
|
33 |
// no output
|
42 |
block1c: "dt dd caption legend figcaption output",
|
43 |
// eg: "\n\n<tag>some content</tag>"
|
44 |
block2c: "canvas audio video iframe",
|
45 |
+
},
|
46 |
+
tag_remap: { // remap of variants or deprecated tags to internal classes
|
47 |
+
"i": "em",
|
48 |
+
"b": "strong"
|
|
|
|
|
49 |
}
|
50 |
};
|
51 |
|
93 |
|
94 |
var buf = "<" + tag;
|
95 |
|
96 |
+
for (var attr, i = 0; i < e.attributes.length; i++) {
|
97 |
+
attr = e.attributes.item(i);
|
98 |
buf += " " + attr.nodeName + '="' + attr.nodeValue + '"';
|
99 |
}
|
100 |
|
158 |
re += "\n\n";
|
159 |
var maxlen = 0;
|
160 |
// get longest link href with title, TODO: use getAttribute?
|
161 |
+
for (var y = 0; y < links.length; y++) {
|
162 |
if (!links[y].e.title) continue;
|
163 |
var len = links[y].e.href.length;
|
164 |
if (len && len > maxlen)
|
165 |
maxlen = len;
|
166 |
}
|
167 |
|
168 |
+
for (var k = 0; k < links.length; k++) {
|
169 |
var title = links[k].e.title ? rep(" ", (maxlen + 2) - links[k].e.href.length) + '"' + links[k].e.title + '"' : "";
|
170 |
re += " [" + (+k+1) + "]: " + (nodeName(links[k].e) == "a" ? links[k].e.href : links[k].e.src) + title + "\n";
|
171 |
}
|
198 |
// inline elems allowing adjacent whitespace text nodes to be rendered
|
199 |
var inlRe = cfg.unsup_tags.inline, n, name;
|
200 |
|
201 |
+
// if no thead exists, detect header rows or make fake cols
|
202 |
+
if (nodeName(this.e) == "table") {
|
203 |
+
if (this.e.hasChildNodes() && !this.e.tHead) {
|
204 |
+
var thead = document.createElement("thead");
|
205 |
+
|
206 |
+
var tbody0 = this.e.tBodies[0],
|
207 |
+
row0 = tbody0.rows[0],
|
208 |
+
cell0 = row0.cells[0];
|
209 |
+
|
210 |
+
if (nodeName(cell0) == "th")
|
211 |
+
thead.appendChild(row0);
|
212 |
+
else {
|
213 |
+
var hcell,
|
214 |
+
i = 0,
|
215 |
+
len = row0.cells.length,
|
216 |
+
hrow = thead.insertRow();
|
217 |
+
|
218 |
+
while (i++ < len) {
|
219 |
+
hcell = document.createElement("th");
|
220 |
+
hcell.textContent = cfg.col_pre + i;
|
221 |
+
hrow.appendChild(hcell);
|
222 |
+
}
|
223 |
+
}
|
224 |
+
|
225 |
+
this.e.insertBefore(thead, tbody0);
|
226 |
+
}
|
227 |
+
}
|
228 |
+
|
229 |
for (i in this.e.childNodes) {
|
230 |
if (!/\d+/.test(i)) continue;
|
231 |
|
232 |
n = this.e.childNodes[i];
|
233 |
name = nodeName(n);
|
234 |
|
235 |
+
// remap of variants
|
236 |
+
if (name in cfg.tag_remap)
|
237 |
+
name = cfg.tag_remap[name];
|
238 |
+
|
239 |
// ignored tags
|
240 |
if (cfg.unsup_tags.ignore.test(name))
|
241 |
continue;
|
295 |
rendK: function()
|
296 |
{
|
297 |
var n, buf = "";
|
298 |
+
for (var i = 0; i < this.c.length; i++) {
|
299 |
n = this.c[i];
|
300 |
+
buf += (n.bef || "") + n.rend() + (n.aft || "");
|
|
|
|
|
301 |
}
|
302 |
return buf.replace(/^\n+|\n+$/, "");
|
303 |
}
|
340 |
if (this.p instanceof lib.li) {
|
341 |
var repl = null, spcs = kids.match(/^[\t ]+/gm);
|
342 |
if (!spcs) return kids;
|
343 |
+
for (var i = 0; i < spcs.length; i++) {
|
344 |
if (repl === null || spcs[i][0].length < repl.length)
|
345 |
repl = spcs[i][0];
|
346 |
}
|
541 |
},
|
542 |
rend: function() {
|
543 |
// run prep on all cells to get max col widths
|
544 |
+
for (var tsec = 0; tsec < this.c.length; tsec++)
|
545 |
+
for (var row = 0; row < this.c[tsec].c.length; row++)
|
546 |
+
for (var cell = 0; cell < this.c[tsec].c[row].c.length; cell++)
|
547 |
this.c[tsec].c[row].c[cell].prep();
|
548 |
|
549 |
return this.supr();
|
553 |
lib.thead = cfg.gfm_tbls ? lib.cblk.extend({
|
554 |
wrap: ["\n", function(kids) {
|
555 |
var buf = "";
|
556 |
+
for (var i = 0; i < this.p.cols.length; i++) {
|
557 |
var col = this.p.cols[i],
|
558 |
al = col.a[0] == "c" ? ":" : " ",
|
559 |
ar = col.a[0] == "r" || col.a[0] == "c" ? ":" : " ";
|
611 |
col.w = Math.max(col.w || 0, this.guts.length);
|
612 |
if (this.e.align)
|
613 |
col.a = this.e.align;
|
614 |
+
},
|
615 |
}) : lib.ctblk.extend();
|
616 |
|
617 |
lib.td = lib.th.extend();
|
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>markdown</name>
|
4 |
-
<version>2.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://github.com/SchumacherFM/Magento-Markdown">BSD-3-Clause</license>
|
7 |
<channel>community</channel>
|
@@ -23,11 +23,27 @@ format, then convert it to structurally valid XHTML (or HTML).
|
|
23 |
For further information please see the github repository: https://github.com/SchumacherFM/Magento-Markdown</description>
|
24 |
<notes>https://github.com/SchumacherFM/Magento-Markdown
|
25 |

|
26 |
-
Tons of new features! See the github pages for the version history
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
<authors><author><name>Cyrill Schumacher</name><user>cyrills</user><email>cyrill@schumacher.fm</email></author></authors>
|
28 |
-
<date>
|
29 |
-
<time>
|
30 |
-
<contents><target name="magecommunity"><dir name="SchumacherFM"><dir name="Markdown"><dir><dir name="Helper"><file name="Data.php" hash="
|
31 |
<compatible/>
|
32 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
33 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>markdown</name>
|
4 |
+
<version>2.1.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://github.com/SchumacherFM/Magento-Markdown">BSD-3-Clause</license>
|
7 |
<channel>community</channel>
|
23 |
For further information please see the github repository: https://github.com/SchumacherFM/Magento-Markdown</description>
|
24 |
<notes>https://github.com/SchumacherFM/Magento-Markdown
|
25 |

|
26 |
+
Tons of new features! See the github pages for the version history.
|
27 |
+

|
28 |
+
- Enable/Disable markdown rendering in email template. (by Paul Hachmang)
|
29 |
+
- Update marked.js
|
30 |
+
- Bug fix: HTML Preview code markup
|
31 |
+
- Bug fix: HTML preview button should be removed
|
32 |
+
- Bug fix: When there is no content, the Preview and Live Preview tabs show incorrect request
|
33 |
+
- Feature: Feedback and ideas after being used in the wild.
|
34 |
+
- Feature: Settings to enable/disable Preview, Live Preview and - - HTML Preview tabs (See Permissions -> Roles)
|
35 |
+
- Merged Pull Request More native-like styling
|
36 |
+
- Add new option for styling of the backend textarea field
|
37 |
+
- Major changes in the backend Github Issue #18
|
38 |
+
- Renaming of buttons
|
39 |
+
- EpicEditor disabled by default
|
40 |
+
- Better style for the textarea field with outer glow
|
41 |
+
- Besides image Drag'n'Drop added file upload and copy and paste for images
|
42 |
+
- Enhanced preview mode</notes>
|
43 |
<authors><author><name>Cyrill Schumacher</name><user>cyrills</user><email>cyrill@schumacher.fm</email></author></authors>
|
44 |
+
<date>2014-01-20</date>
|
45 |
+
<time>10:15:16</time>
|
46 |
+
<contents><target name="magecommunity"><dir name="SchumacherFM"><dir name="Markdown"><dir><dir name="Block"><dir name="Adminhtml"><dir name="Form"><dir name="Renderer"><dir name="Fieldset"><dir name="Element"><file name="Textarea.php" hash="c79e09389749905c52ca2374fcf1d213"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="503c6a4a6853ddd2eace0fce09e27599"/></dir><dir name="Model"><dir name="Editor"><file name="Observer.php" hash="0683e4ed2e97c9efbabea6aad92c1f44"/></dir><dir name="Markdown"><file name="Abstract.php" hash="da5de08b7bf3361b345ad1f84ab728d3"/><file name="Interface.php" hash="05df0ecf7a7c6bc09481f213cdc98255"/><file name="Observer.php" hash="0bb81d4be39ec4184f76585672c34f60"/><file name="Render.php" hash="df0addc5cfbd8d805c0b8a1661bbd496"/></dir><dir name="Michelf"><dir name="Markdown"><file name="Extra.php" hash="aaee7a66298007f8c003ba96d53deab9"/><file name="TmpImpl.php" hash="5ec68c28519d8ecb4a43324f5f197a80"/></dir><file name="Markdown.php" hash="76219ba32f37cad14755c8613b390c83"/></dir><dir name="Observer"><dir name="Adminhtml"><file name="Block.php" hash="a48a2b1e784f889666cad03fbd5f5d09"/><file name="EpicEditor.php" hash="f67f8e07be8bb8a403411432eb142ad7"/><file name="LayoutUpdate.php" hash="a01b599ebed057f9a99266cb91441a99"/></dir></dir><dir name="Options"><dir name="Styles"><file name="AbstractStyles.php" hash="225140811534132c8d39878e6fe3f4b1"/><file name="HighLightStyles.php" hash="62c9e1fb6e9a979957683d83047a5253"/><file name="MarkdownStyles.php" hash="ee0d8d1385c5bac1b3f0c23f9b11eeef"/><file name="TextareaStyles.php" hash="dab854923f1782b0fe2be2fc4e5fe6e9"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="MarkdownController.php" hash="e4a2c270b391a9ea62674862ccbbe43f"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="26a4e5e7c1ce03bdf2157b53cecc647a"/><file name="config.xml" hash="6c563b8c393eb5d7ed349af0fd4c36a1"/><file name="system.xml" hash="8700e0eeba776a24a6b174936c5c5f05"/></dir><dir name="sql"><dir name="markdown_setup"><file name="install-1.0.0.php" hash="0fe5a9650dd224f691caf585a34c52e6"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="markdown.xml" hash="a57113191d75eb358a377c5f3308cb8f"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="SchumacherFM_Markdown.xml" hash="db8742448ef30a5af1bd60865f429c26"/></dir></target><target name="magelocale"><dir><dir name="de_DE"><file name="SchumacherFM_Markdown.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="en_US"><file name="SchumacherFM_Markdown.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></target><target name="mage"><dir name="js"><dir name="markdown"><dir><dir name="adminhtml"><file name="beautify-html.js" hash="5890ac48ec4f2155535e9efb8cbd87b8"/><file name="epiceditor.js" hash="5c29b9d4d25d897ba63e9109ba6e3564"/><file name="filereader.js" hash="52655dadec0f8660c761c61c6af93192"/><file name="highlight.pack.js" hash="8bb5ed52b512c8e76fcd929e388dda9e"/><file name="markdown.js" hash="5fa9439fa6cdaa2a71972488c73d843a"/><file name="marked.js" hash="418a990721a4fee11a87224c360385b9"/><file name="reMarked.js" hash="1b30fdb506ab82fb9ea30c1f28415603"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="markdown"><dir><dir name="highlight"><dir name="styles"><file name="arta.css" hash="beb43641c62b1e3445356a5325e8f347"/><file name="ascetic.css" hash="bb82a488454ab59ce09f87e37697eab6"/><file name="brown_paper.css" hash="20a30e6e72a0b0c8acb58a0b15523a18"/><file name="dark.css" hash="e67d201e74c39d665da5664d34f1db6b"/><file name="default.css" hash="1f0e251735747f01ff67f19bb5bb7827"/><file name="docco.css" hash="2017983407b0a64300761bebb17b136d"/><file name="far.css" hash="122a2f779ce770e21ed2ce622c7faadc"/><file name="foundation.css" hash="4a2e6ec32a44043f27ae50412dc297a2"/><file name="github.css" hash="a80e55756ce38aab87f54799ca6d23fc"/><file name="googlecode.css" hash="a692819d8384a019dd6b85d45099e39f"/><file name="idea.css" hash="cad5036ff7da4f7009278b0ddc18dc05"/><file name="ir_black.css" hash="52c475b3950fec315bff3a1e7c80762b"/><file name="magula.css" hash="5423c79d91364aec7879eaf9c5117a4c"/><file name="mono-blue.css" hash="3b1df3173738c43737f195d20efe782d"/><file name="monokai.css" hash="d072e03d256f572a13f0658502dc0539"/><file name="monokai_sublime.css" hash="513121ca0ea4439dd8da671d258f7f6d"/><file name="obsidian.css" hash="880d6adf366e109c81a485ff095e30b1"/><file name="pojoaque.css" hash="c384dc304230dced8bd94e5e7afd5d78"/><file name="railscasts.css" hash="d88f7026d20d32c84bb1aa527f77852f"/><file name="rainbow.css" hash="d394d934b0bb7908db78f0e08f268ade"/><file name="school_book.css" hash="c716a7d7609f08b4c07a5cbee107a10b"/><file name="solarized_dark.css" hash="845eb33f2a4001645b340642c8cd386f"/><file name="solarized_light.css" hash="bb3f05eb8a3a3d4b6b2cfeb89352dadf"/><file name="sunburst.css" hash="0f85672ebff47a8b9201accf75da86d5"/><file name="tomorrow-night-blue.css" hash="bd717c6881d1fc4eabcd3591482761ae"/><file name="tomorrow-night-bright.css" hash="f4c2a42e479b65f616edcc39ea6f8f6e"/><file name="tomorrow-night-eighties.css" hash="d95cf4207791e84a97ffae83638f1e45"/><file name="tomorrow-night.css" hash="4067182039737bed4dfed1be396cdb68"/><file name="tomorrow.css" hash="bd04363ff97befcf2b0587f6fa4e3498"/><file name="vs.css" hash="54d3a346139a9f45bc0459ec4d1f571c"/><file name="xcode.css" hash="d93e64c1764043da5f372684c60fb2eb"/><file name="zenburn.css" hash="1603fc204a60dcb428f2c535fb6299ad"/></dir></dir><dir name="styles"><file name="github.css" hash="5641b80d5428d7e9294cb558038a00c9"/><file name="jasonm23-dark.css" hash="e5de83b1b46f743d43d0f9c85a5adbe3"/><file name="jasonm23-foghorn.css" hash="beda4802db758a6fbbf7ff8bdae4d784"/><file name="jasonm23-markdown.css" hash="e1c8a2ccd835d3d5a324ca37b3ea0bc6"/><file name="jasonm23-swiss.css" hash="80a7984e5f9421acf06dd4417f13945e"/><file name="kevinburke.css" hash="5270f06fbb5038563f58594d992b64aa"/><file name="markedapp-byword.css" hash="7bd9de1e004ef39d6cf3290848615227"/><file name="thomasf-solarizedcssdark.css" hash="e84d2edb9d84b3ce179bba087bf15418"/><file name="thomasf-solarizedcsslight.css" hash="19833766330728741c7a8047445a23ff"/></dir></dir><file name="mdm.css" hash="cf5084a6c25bb4eb11962a29eacf209b"/></dir><dir name="epiceditor"><dir><dir name="themes"><dir name="base"><file name="epiceditor.css" hash="72d9ff0a1296bf28b815d696129bb086"/></dir><dir name="editor"><file name="epic-dark.css" hash="872c9540cedbf5cdf69ca2b0accb3cef"/><file name="epic-light.css" hash="68d9441f297c73180dd83545ee70117a"/></dir><dir name="preview"><file name="bartik.css" hash="a8a3efffd02c3acf6e3dc62ee5e92936"/><file name="github.css" hash="6085b7303f9a3c3cc3d2d8039487bf5d"/><file name="githubNxcode.css" hash="c5639fe4cd88f0416c15892f2f9b90b2"/><file name="preview-dark.css" hash="660b85886b844d592e2c722937b438e1"/></dir></dir></dir></dir></dir></dir></dir></target></contents>
|
47 |
<compatible/>
|
48 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
49 |
</package>
|
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Date: 17.V.2011
|
3 |
+
Author: pumbur <pumbur@pumbur.net>
|
4 |
+
*/
|
5 |
+
|
6 |
+
pre code
|
7 |
+
{
|
8 |
+
display: block; padding: 0.5em;
|
9 |
+
background: #222;
|
10 |
+
}
|
11 |
+
|
12 |
+
pre .profile .header *,
|
13 |
+
pre .ini .title,
|
14 |
+
pre .nginx .title
|
15 |
+
{
|
16 |
+
color: #fff;
|
17 |
+
}
|
18 |
+
|
19 |
+
pre .comment,
|
20 |
+
pre .javadoc,
|
21 |
+
pre .preprocessor,
|
22 |
+
pre .preprocessor .title,
|
23 |
+
pre .pragma,
|
24 |
+
pre .shebang,
|
25 |
+
pre .profile .summary,
|
26 |
+
pre .diff,
|
27 |
+
pre .pi,
|
28 |
+
pre .doctype,
|
29 |
+
pre .tag,
|
30 |
+
pre .template_comment,
|
31 |
+
pre .css .rules,
|
32 |
+
pre .tex .special
|
33 |
+
{
|
34 |
+
color: #444;
|
35 |
+
}
|
36 |
+
|
37 |
+
pre .string,
|
38 |
+
pre .symbol,
|
39 |
+
pre .diff .change,
|
40 |
+
pre .regexp,
|
41 |
+
pre .xml .attribute,
|
42 |
+
pre .smalltalk .char,
|
43 |
+
pre .xml .value,
|
44 |
+
pre .ini .value,
|
45 |
+
pre .clojure .attribute,
|
46 |
+
pre .coffeescript .attribute
|
47 |
+
{
|
48 |
+
color: #ffcc33;
|
49 |
+
}
|
50 |
+
|
51 |
+
pre .number,
|
52 |
+
pre .addition
|
53 |
+
{
|
54 |
+
color: #00cc66;
|
55 |
+
}
|
56 |
+
|
57 |
+
pre .built_in,
|
58 |
+
pre .literal,
|
59 |
+
pre .vhdl .typename,
|
60 |
+
pre .go .constant,
|
61 |
+
pre .go .typename,
|
62 |
+
pre .ini .keyword,
|
63 |
+
pre .lua .title,
|
64 |
+
pre .perl .variable,
|
65 |
+
pre .php .variable,
|
66 |
+
pre .mel .variable,
|
67 |
+
pre .django .variable,
|
68 |
+
pre .css .funtion,
|
69 |
+
pre .smalltalk .method,
|
70 |
+
pre .hexcolor,
|
71 |
+
pre .important,
|
72 |
+
pre .flow,
|
73 |
+
pre .inheritance,
|
74 |
+
pre .parser3 .variable
|
75 |
+
{
|
76 |
+
color: #32AAEE;
|
77 |
+
}
|
78 |
+
|
79 |
+
pre .keyword,
|
80 |
+
pre .tag .title,
|
81 |
+
pre .css .tag,
|
82 |
+
pre .css .class,
|
83 |
+
pre .css .id,
|
84 |
+
pre .css .pseudo,
|
85 |
+
pre .css .attr_selector,
|
86 |
+
pre .lisp .title,
|
87 |
+
pre .clojure .built_in,
|
88 |
+
pre .winutils,
|
89 |
+
pre .tex .command,
|
90 |
+
pre .request,
|
91 |
+
pre .status
|
92 |
+
{
|
93 |
+
color: #6644aa;
|
94 |
+
}
|
95 |
+
|
96 |
+
pre .title,
|
97 |
+
pre .ruby .constant,
|
98 |
+
pre .vala .constant,
|
99 |
+
pre .parent,
|
100 |
+
pre .deletion,
|
101 |
+
pre .template_tag,
|
102 |
+
pre .css .keyword,
|
103 |
+
pre .objectivec .class .id,
|
104 |
+
pre .smalltalk .class,
|
105 |
+
pre .lisp .keyword,
|
106 |
+
pre .apache .tag,
|
107 |
+
pre .nginx .variable,
|
108 |
+
pre .envvar,
|
109 |
+
pre .bash .variable,
|
110 |
+
pre .go .built_in,
|
111 |
+
pre .vbscript .built_in,
|
112 |
+
pre .lua .built_in,
|
113 |
+
pre .rsl .built_in,
|
114 |
+
pre .tail,
|
115 |
+
pre .avrasm .label,
|
116 |
+
pre .tex .formula,
|
117 |
+
pre .tex .formula *
|
118 |
+
{
|
119 |
+
color: #bb1166;
|
120 |
+
}
|
121 |
+
|
122 |
+
pre .yardoctag,
|
123 |
+
pre .phpdoc,
|
124 |
+
pre .profile .header,
|
125 |
+
pre .ini .title,
|
126 |
+
pre .apache .tag,
|
127 |
+
pre .parser3 .title
|
128 |
+
{
|
129 |
+
font-weight: bold;
|
130 |
+
}
|
131 |
+
|
132 |
+
pre .coffeescript .javascript,
|
133 |
+
pre .javascript .xml,
|
134 |
+
pre .tex .formula,
|
135 |
+
pre .xml .javascript,
|
136 |
+
pre .xml .vbscript,
|
137 |
+
pre .xml .css,
|
138 |
+
pre .xml .cdata
|
139 |
+
{
|
140 |
+
opacity: 0.6;
|
141 |
+
}
|
142 |
+
|
143 |
+
pre code,
|
144 |
+
pre .javascript,
|
145 |
+
pre .css,
|
146 |
+
pre .xml,
|
147 |
+
pre .subst,
|
148 |
+
pre .diff .chunk,
|
149 |
+
pre .css .value,
|
150 |
+
pre .css .attribute,
|
151 |
+
pre .lisp .string,
|
152 |
+
pre .lisp .number,
|
153 |
+
pre .tail .params,
|
154 |
+
pre .container,
|
155 |
+
pre .haskell *,
|
156 |
+
pre .erlang *,
|
157 |
+
pre .erlang_repl *
|
158 |
+
{
|
159 |
+
color: #aaa;
|
160 |
+
}
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
|
3 |
+
Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
|
4 |
+
|
5 |
+
*/
|
6 |
+
|
7 |
+
pre code {
|
8 |
+
display: block; padding: 0.5em;
|
9 |
+
background: white; color: black;
|
10 |
+
}
|
11 |
+
|
12 |
+
pre .string,
|
13 |
+
pre .tag .value,
|
14 |
+
pre .filter .argument,
|
15 |
+
pre .addition,
|
16 |
+
pre .change,
|
17 |
+
pre .apache .tag,
|
18 |
+
pre .apache .cbracket,
|
19 |
+
pre .nginx .built_in,
|
20 |
+
pre .tex .formula {
|
21 |
+
color: #888;
|
22 |
+
}
|
23 |
+
|
24 |
+
pre .comment,
|
25 |
+
pre .template_comment,
|
26 |
+
pre .shebang,
|
27 |
+
pre .doctype,
|
28 |
+
pre .pi,
|
29 |
+
pre .javadoc,
|
30 |
+
pre .deletion,
|
31 |
+
pre .apache .sqbracket {
|
32 |
+
color: #CCC;
|
33 |
+
}
|
34 |
+
|
35 |
+
pre .keyword,
|
36 |
+
pre .tag .title,
|
37 |
+
pre .ini .title,
|
38 |
+
pre .lisp .title,
|
39 |
+
pre .clojure .title,
|
40 |
+
pre .http .title,
|
41 |
+
pre .nginx .title,
|
42 |
+
pre .css .tag,
|
43 |
+
pre .winutils,
|
44 |
+
pre .flow,
|
45 |
+
pre .apache .tag,
|
46 |
+
pre .tex .command,
|
47 |
+
pre .request,
|
48 |
+
pre .status {
|
49 |
+
font-weight: bold;
|
50 |
+
}
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
|
3 |
+
Brown Paper style from goldblog.com.ua (c) Zaripov Yura <yur4ik7@ukr.net>
|
4 |
+
|
5 |
+
*/
|
6 |
+
|
7 |
+
pre code {
|
8 |
+
display: block; padding: 0.5em;
|
9 |
+
background:#b7a68e url(./brown_papersq.png);
|
10 |
+
}
|
11 |
+
|
12 |
+
pre .keyword,
|
13 |
+
pre .literal,
|
14 |
+
pre .change,
|
15 |
+
pre .winutils,
|
16 |
+
pre .flow,
|
17 |
+
pre .lisp .title,
|
18 |
+
pre .clojure .built_in,
|
19 |
+
pre .nginx .title,
|
20 |
+
pre .tex .special,
|
21 |
+
pre .request,
|
22 |
+
pre .status {
|
23 |
+
color:#005599;
|
24 |
+
font-weight:bold;
|
25 |
+
}
|
26 |
+
|
27 |
+
pre code,
|
28 |
+
pre .subst,
|
29 |
+
pre .tag .keyword {
|
30 |
+
color: #363C69;
|
31 |
+
}
|
32 |
+
|
33 |
+
pre .string,
|
34 |
+
pre .title,
|
35 |
+
pre .haskell .type,
|
36 |
+
pre .tag .value,
|
37 |
+
pre .css .rules .value,
|
38 |
+
pre .preprocessor,
|
39 |
+
pre .pragma,
|
40 |
+
pre .ruby .symbol,
|
41 |
+
pre .ruby .symbol .string,
|
42 |
+
pre .ruby .class .parent,
|
43 |
+
pre .built_in,
|
44 |
+
pre .sql .aggregate,
|
45 |
+
pre .django .template_tag,
|
46 |
+
pre .django .variable,
|
47 |
+
pre .smalltalk .class,
|
48 |
+
pre .javadoc,
|
49 |
+
pre .ruby .string,
|
50 |
+
pre .django .filter .argument,
|
51 |
+
pre .smalltalk .localvars,
|
52 |
+
pre .smalltalk .array,
|
53 |
+
pre .attr_selector,
|
54 |
+
pre .pseudo,
|
55 |
+
pre .addition,
|
56 |
+
pre .stream,
|
57 |
+
pre .envvar,
|
58 |
+
pre .apache .tag,
|
59 |
+
pre .apache .cbracket,
|
60 |
+
pre .tex .number {
|
61 |
+
color: #2C009F;
|
62 |
+
}
|
63 |
+
|
64 |
+
pre .comment,
|
65 |
+
pre .java .annotation,
|
66 |
+
pre .python .decorator,
|
67 |
+
pre .template_comment,
|
68 |
+
pre .pi,
|
69 |
+
pre .doctype,
|
70 |
+
pre .deletion,
|
71 |
+
pre .shebang,
|
72 |
+
pre .apache .sqbracket,
|
73 |
+
pre .nginx .built_in,
|
74 |
+
pre .tex .formula {
|
75 |
+
color: #802022;
|
76 |
+
}
|
77 |
+
|
78 |
+
pre .keyword,
|
79 |
+
pre .literal,
|
80 |
+
pre .css .id,
|
81 |
+
pre .phpdoc,
|
82 |
+
pre .title,
|
83 |
+
pre .haskell .type,
|
84 |
+
pre .vbscript .built_in,
|
85 |
+
pre .sql .aggregate,
|
86 |
+
pre .rsl .built_in,
|
87 |
+
pre .smalltalk .class,
|
88 |
+
pre .diff .header,
|
89 |
+
pre .chunk,
|
90 |
+
pre .winutils,
|
91 |
+
pre .bash .variable,
|
92 |
+
pre .apache .tag,
|
93 |
+
pre .tex .command {
|
94 |
+
font-weight: bold;
|
95 |
+
}
|
96 |
+
|
97 |
+
pre .coffeescript .javascript,
|
98 |
+
pre .javascript .xml,
|
99 |
+
pre .tex .formula,
|
100 |
+
pre .xml .javascript,
|
101 |
+
pre .xml .vbscript,
|
102 |
+
pre .xml .css,
|
103 |
+
pre .xml .cdata {
|
104 |
+
opacity: 0.8;
|
105 |
+
}
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
|
3 |
+
Dark style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
|
4 |
+
|
5 |
+
*/
|
6 |
+
|
7 |
+
pre code {
|
8 |
+
display: block; padding: 0.5em;
|
9 |
+
background: #444;
|
10 |
+
}
|
11 |
+
|
12 |
+
pre .keyword,
|
13 |
+
pre .literal,
|
14 |
+
pre .change,
|
15 |
+
pre .winutils,
|
16 |
+
pre .flow,
|
17 |
+
pre .lisp .title,
|
18 |
+
pre .clojure .built_in,
|
19 |
+
pre .nginx .title,
|
20 |
+
pre .tex .special {
|
21 |
+
color: white;
|
22 |
+
}
|
23 |
+
|
24 |
+
pre code,
|
25 |
+
pre .subst {
|
26 |
+
color: #DDD;
|
27 |
+
}
|
28 |
+
|
29 |
+
pre .string,
|
30 |
+
pre .title,
|
31 |
+
pre .haskell .type,
|
32 |
+
pre .ini .title,
|
33 |
+
pre .tag .value,
|
34 |
+
pre .css .rules .value,
|
35 |
+
pre .preprocessor,
|
36 |
+
pre .pragma,
|
37 |
+
pre .ruby .symbol,
|
38 |
+
pre .ruby .symbol .string,
|
39 |
+
pre .ruby .class .parent,
|
40 |
+
pre .built_in,
|
41 |
+
pre .sql .aggregate,
|
42 |
+
pre .django .template_tag,
|
43 |
+
pre .django .variable,
|
44 |
+
pre .smalltalk .class,
|
45 |
+
pre .javadoc,
|
46 |
+
pre .ruby .string,
|
47 |
+
pre .django .filter .argument,
|
48 |
+
pre .smalltalk .localvars,
|
49 |
+
pre .smalltalk .array,
|
50 |
+
pre .attr_selector,
|
51 |
+
pre .pseudo,
|
52 |
+
pre .addition,
|
53 |
+
pre .stream,
|
54 |
+
pre .envvar,
|
55 |
+
pre .apache .tag,
|
56 |
+
pre .apache .cbracket,
|
57 |
+
pre .tex .command,
|
58 |
+
pre .prompt,
|
59 |
+
pre .coffeescript .attribute {
|
60 |
+
color: #D88;
|
61 |
+
}
|
62 |
+
|
63 |
+
pre .comment,
|
64 |
+
pre .java .annotation,
|
65 |
+
pre .python .decorator,
|
66 |
+
pre .template_comment,
|
67 |
+
pre .pi,
|
68 |
+
pre .doctype,
|
69 |
+
pre .deletion,
|
70 |
+
pre .shebang,
|
71 |
+
pre .apache .sqbracket,
|
72 |
+
pre .tex .formula {
|
73 |
+
color: #777;
|
74 |
+
}
|
75 |
+
|
76 |
+
pre .keyword,
|
77 |
+
pre .literal,
|
78 |
+
pre .title,
|
79 |
+
pre .css .id,
|
80 |
+
pre .phpdoc,
|
81 |
+
pre .haskell .type,
|
82 |
+
pre .vbscript .built_in,
|
83 |
+
pre .sql .aggregate,
|
84 |
+
pre .rsl .built_in,
|
85 |
+
pre .smalltalk .class,
|
86 |
+
pre .diff .header,
|
87 |
+
pre .chunk,
|
88 |
+
pre .winutils,
|
89 |
+
pre .bash .variable,
|
90 |
+
pre .apache .tag,
|
91 |
+
pre .tex .special,
|
92 |
+
pre .request,
|
93 |
+
pre .status {
|
94 |
+
font-weight: bold;
|
95 |
+
}
|
96 |
+
|
97 |
+
pre .coffeescript .javascript,
|
98 |
+
pre .javascript .xml,
|
99 |
+
pre .tex .formula,
|
100 |
+
pre .xml .javascript,
|
101 |
+
pre .xml .vbscript,
|
102 |
+
pre .xml .css,
|
103 |
+
pre .xml .cdata {
|
104 |
+
opacity: 0.5;
|
105 |
+
}
|
@@ -26,6 +26,8 @@ pre .tag .value,
|
|
26 |
pre .rules .value,
|
27 |
pre .rules .value .number,
|
28 |
pre .preprocessor,
|
|
|
|
|
29 |
pre .ruby .symbol,
|
30 |
pre .ruby .symbol .string,
|
31 |
pre .aggregate,
|
@@ -41,15 +43,19 @@ pre .apache .cbracket,
|
|
41 |
pre .tex .command,
|
42 |
pre .tex .special,
|
43 |
pre .erlang_repl .function_or_atom,
|
44 |
-
pre .
|
|
|
|
|
45 |
color: #800;
|
46 |
}
|
47 |
|
|
|
48 |
pre .comment,
|
49 |
pre .annotation,
|
50 |
pre .template_comment,
|
51 |
pre .diff .header,
|
52 |
pre .chunk,
|
|
|
53 |
pre .markdown .blockquote {
|
54 |
color: #888;
|
55 |
}
|
@@ -58,11 +64,16 @@ pre .number,
|
|
58 |
pre .date,
|
59 |
pre .regexp,
|
60 |
pre .literal,
|
|
|
61 |
pre .smalltalk .symbol,
|
62 |
pre .smalltalk .char,
|
63 |
pre .go .constant,
|
64 |
pre .change,
|
|
|
|
|
|
|
65 |
pre .markdown .bullet,
|
|
|
66 |
pre .markdown .link_url {
|
67 |
color: #080;
|
68 |
}
|
@@ -78,6 +89,7 @@ pre .attr_selector,
|
|
78 |
pre .important,
|
79 |
pre .pseudo,
|
80 |
pre .pi,
|
|
|
81 |
pre .doctype,
|
82 |
pre .deletion,
|
83 |
pre .envvar,
|
@@ -87,16 +99,19 @@ pre .nginx .built_in,
|
|
87 |
pre .tex .formula,
|
88 |
pre .erlang_repl .reserved,
|
89 |
pre .prompt,
|
|
|
90 |
pre .markdown .link_label,
|
91 |
pre .vhdl .attribute,
|
92 |
pre .clojure .attribute,
|
93 |
-
pre .
|
|
|
|
|
|
|
94 |
color: #88F
|
95 |
}
|
96 |
|
97 |
pre .keyword,
|
98 |
pre .id,
|
99 |
-
pre .phpdoc,
|
100 |
pre .title,
|
101 |
pre .built_in,
|
102 |
pre .aggregate,
|
@@ -110,12 +125,14 @@ pre .bash .variable,
|
|
110 |
pre .apache .tag,
|
111 |
pre .go .typename,
|
112 |
pre .tex .command,
|
|
|
113 |
pre .markdown .strong,
|
114 |
pre .request,
|
115 |
pre .status {
|
116 |
font-weight: bold;
|
117 |
}
|
118 |
|
|
|
119 |
pre .markdown .emphasis {
|
120 |
font-style: italic;
|
121 |
}
|
@@ -126,6 +143,7 @@ pre .nginx .built_in {
|
|
126 |
|
127 |
pre .coffeescript .javascript,
|
128 |
pre .javascript .xml,
|
|
|
129 |
pre .tex .formula,
|
130 |
pre .xml .javascript,
|
131 |
pre .xml .vbscript,
|
26 |
pre .rules .value,
|
27 |
pre .rules .value .number,
|
28 |
pre .preprocessor,
|
29 |
+
pre .pragma,
|
30 |
+
pre .haml .symbol,
|
31 |
pre .ruby .symbol,
|
32 |
pre .ruby .symbol .string,
|
33 |
pre .aggregate,
|
43 |
pre .tex .command,
|
44 |
pre .tex .special,
|
45 |
pre .erlang_repl .function_or_atom,
|
46 |
+
pre .asciidoc .header,
|
47 |
+
pre .markdown .header,
|
48 |
+
pre .coffeescript .attribute {
|
49 |
color: #800;
|
50 |
}
|
51 |
|
52 |
+
pre .smartquote,
|
53 |
pre .comment,
|
54 |
pre .annotation,
|
55 |
pre .template_comment,
|
56 |
pre .diff .header,
|
57 |
pre .chunk,
|
58 |
+
pre .asciidoc .blockquote,
|
59 |
pre .markdown .blockquote {
|
60 |
color: #888;
|
61 |
}
|
64 |
pre .date,
|
65 |
pre .regexp,
|
66 |
pre .literal,
|
67 |
+
pre .hexcolor,
|
68 |
pre .smalltalk .symbol,
|
69 |
pre .smalltalk .char,
|
70 |
pre .go .constant,
|
71 |
pre .change,
|
72 |
+
pre .lasso .variable,
|
73 |
+
pre .makefile .variable,
|
74 |
+
pre .asciidoc .bullet,
|
75 |
pre .markdown .bullet,
|
76 |
+
pre .asciidoc .link_url,
|
77 |
pre .markdown .link_url {
|
78 |
color: #080;
|
79 |
}
|
89 |
pre .important,
|
90 |
pre .pseudo,
|
91 |
pre .pi,
|
92 |
+
pre .haml .bullet,
|
93 |
pre .doctype,
|
94 |
pre .deletion,
|
95 |
pre .envvar,
|
99 |
pre .tex .formula,
|
100 |
pre .erlang_repl .reserved,
|
101 |
pre .prompt,
|
102 |
+
pre .asciidoc .link_label,
|
103 |
pre .markdown .link_label,
|
104 |
pre .vhdl .attribute,
|
105 |
pre .clojure .attribute,
|
106 |
+
pre .asciidoc .attribute,
|
107 |
+
pre .lasso .attribute,
|
108 |
+
pre .coffeescript .property,
|
109 |
+
pre .makefile .phony {
|
110 |
color: #88F
|
111 |
}
|
112 |
|
113 |
pre .keyword,
|
114 |
pre .id,
|
|
|
115 |
pre .title,
|
116 |
pre .built_in,
|
117 |
pre .aggregate,
|
125 |
pre .apache .tag,
|
126 |
pre .go .typename,
|
127 |
pre .tex .command,
|
128 |
+
pre .asciidoc .strong,
|
129 |
pre .markdown .strong,
|
130 |
pre .request,
|
131 |
pre .status {
|
132 |
font-weight: bold;
|
133 |
}
|
134 |
|
135 |
+
pre .asciidoc .emphasis,
|
136 |
pre .markdown .emphasis {
|
137 |
font-style: italic;
|
138 |
}
|
143 |
|
144 |
pre .coffeescript .javascript,
|
145 |
pre .javascript .xml,
|
146 |
+
pre .lasso .markup,
|
147 |
pre .tex .formula,
|
148 |
pre .xml .javascript,
|
149 |
pre .xml .vbscript,
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine (@thingsinjars)
|
3 |
+
*/
|
4 |
+
|
5 |
+
pre code {
|
6 |
+
display: block; padding: 0.5em;
|
7 |
+
color: #000;
|
8 |
+
background: #f8f8ff
|
9 |
+
}
|
10 |
+
|
11 |
+
pre .comment,
|
12 |
+
pre .template_comment,
|
13 |
+
pre .diff .header,
|
14 |
+
pre .javadoc {
|
15 |
+
color: #408080;
|
16 |
+
font-style: italic
|
17 |
+
}
|
18 |
+
|
19 |
+
pre .keyword,
|
20 |
+
pre .assignment,
|
21 |
+
pre .literal,
|
22 |
+
pre .css .rule .keyword,
|
23 |
+
pre .winutils,
|
24 |
+
pre .javascript .title,
|
25 |
+
pre .lisp .title,
|
26 |
+
pre .subst {
|
27 |
+
color: #954121;
|
28 |
+
}
|
29 |
+
|
30 |
+
pre .number,
|
31 |
+
pre .hexcolor {
|
32 |
+
color: #40a070
|
33 |
+
}
|
34 |
+
|
35 |
+
pre .string,
|
36 |
+
pre .tag .value,
|
37 |
+
pre .phpdoc,
|
38 |
+
pre .tex .formula {
|
39 |
+
color: #219161;
|
40 |
+
}
|
41 |
+
|
42 |
+
pre .title,
|
43 |
+
pre .id {
|
44 |
+
color: #19469D;
|
45 |
+
}
|
46 |
+
pre .params {
|
47 |
+
color: #00F;
|
48 |
+
}
|
49 |
+
|
50 |
+
pre .javascript .title,
|
51 |
+
pre .lisp .title,
|
52 |
+
pre .subst {
|
53 |
+
font-weight: normal
|
54 |
+
}
|
55 |
+
|
56 |
+
pre .class .title,
|
57 |
+
pre .haskell .label,
|
58 |
+
pre .tex .command {
|
59 |
+
color: #458;
|
60 |
+
font-weight: bold
|
61 |
+
}
|
62 |
+
|
63 |
+
pre .tag,
|
64 |
+
pre .tag .title,
|
65 |
+
pre .rules .property,
|
66 |
+
pre .django .tag .keyword {
|
67 |
+
color: #000080;
|
68 |
+
font-weight: normal
|
69 |
+
}
|
70 |
+
|
71 |
+
pre .attribute,
|
72 |
+
pre .variable,
|
73 |
+
pre .instancevar,
|
74 |
+
pre .lisp .body {
|
75 |
+
color: #008080
|
76 |
+
}
|
77 |
+
|
78 |
+
pre .regexp {
|
79 |
+
color: #B68
|
80 |
+
}
|
81 |
+
|
82 |
+
pre .class {
|
83 |
+
color: #458;
|
84 |
+
font-weight: bold
|
85 |
+
}
|
86 |
+
|
87 |
+
pre .symbol,
|
88 |
+
pre .ruby .symbol .string,
|
89 |
+
pre .ruby .symbol .keyword,
|
90 |
+
pre .ruby .symbol .keymethods,
|
91 |
+
pre .lisp .keyword,
|
92 |
+
pre .tex .special,
|
93 |
+
pre .input_number {
|
94 |
+
color: #990073
|
95 |
+
}
|
96 |
+
|
97 |
+
pre .builtin,
|
98 |
+
pre .constructor,
|
99 |
+
pre .built_in,
|
100 |
+
pre .lisp .title {
|
101 |
+
color: #0086b3
|
102 |
+
}
|
103 |
+
|
104 |
+
pre .preprocessor,
|
105 |
+
pre .pragma,
|
106 |
+
pre .pi,
|
107 |
+
pre .doctype,
|
108 |
+
pre .shebang,
|
109 |
+
pre .cdata {
|
110 |
+
color: #999;
|
111 |
+
font-weight: bold
|
112 |
+
}
|
113 |
+
|
114 |
+
pre .deletion {
|
115 |
+
background: #fdd
|
116 |
+
}
|
117 |
+
|
118 |
+
pre .addition {
|
119 |
+
background: #dfd
|
120 |
+
}
|
121 |
+
|
122 |
+
pre .diff .change {
|
123 |
+
background: #0086b3
|
124 |
+
}
|
125 |
+
|
126 |
+
pre .chunk {
|
127 |
+
color: #aaa
|
128 |
+
}
|
129 |
+
|
130 |
+
pre .tex .formula {
|
131 |
+
opacity: 0.5;
|
132 |
+
}
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
|
3 |
+
FAR Style (c) MajestiC <majestic2k@gmail.com>
|
4 |
+
|
5 |
+
*/
|
6 |
+
|
7 |
+
pre code {
|
8 |
+
display: block; padding: 0.5em;
|
9 |
+
background: #000080;
|
10 |
+
}
|
11 |
+
|
12 |
+
pre code,
|
13 |
+
pre .subst {
|
14 |
+
color: #0FF;
|
15 |
+
}
|
16 |
+
|
17 |
+
pre .string,
|
18 |
+
pre .ruby .string,
|
19 |
+
pre .haskell .type,
|
20 |
+
pre .tag .value,
|
21 |
+
pre .css .rules .value,
|
22 |
+
pre .css .rules .value .number,
|
23 |
+
pre .preprocessor,
|
24 |
+
pre .pragma,
|
25 |
+
pre .ruby .symbol,
|
26 |
+
pre .ruby .symbol .string,
|
27 |
+
pre .built_in,
|
28 |
+
pre .sql .aggregate,
|
29 |
+
pre .django .template_tag,
|
30 |
+
pre .django .variable,
|
31 |
+
pre .smalltalk .class,
|
32 |
+
pre .addition,
|
33 |
+
pre .apache .tag,
|
34 |
+
pre .apache .cbracket,
|
35 |
+
pre .tex .command,
|
36 |
+
pre .clojure .title,
|
37 |
+
pre .coffeescript .attribute {
|
38 |
+
color: #FF0;
|
39 |
+
}
|
40 |
+
|
41 |
+
pre .keyword,
|
42 |
+
pre .css .id,
|
43 |
+
pre .title,
|
44 |
+
pre .haskell .type,
|
45 |
+
pre .vbscript .built_in,
|
46 |
+
pre .sql .aggregate,
|
47 |
+
pre .rsl .built_in,
|
48 |
+
pre .smalltalk .class,
|
49 |
+
pre .xml .tag .title,
|
50 |
+
pre .winutils,
|
51 |
+
pre .flow,
|
52 |
+
pre .change,
|
53 |
+
pre .envvar,
|
54 |
+
pre .bash .variable,
|
55 |
+
pre .tex .special,
|
56 |
+
pre .clojure .built_in {
|
57 |
+
color: #FFF;
|
58 |
+
}
|
59 |
+
|
60 |
+
pre .comment,
|
61 |
+
pre .phpdoc,
|
62 |
+
pre .javadoc,
|
63 |
+
pre .java .annotation,
|
64 |
+
pre .template_comment,
|
65 |
+
pre .deletion,
|
66 |
+
pre .apache .sqbracket,
|
67 |
+
pre .tex .formula {
|
68 |
+
color: #888;
|
69 |
+
}
|
70 |
+
|
71 |
+
pre .number,
|
72 |
+
pre .date,
|
73 |
+
pre .regexp,
|
74 |
+
pre .literal,
|
75 |
+
pre .smalltalk .symbol,
|
76 |
+
pre .smalltalk .char,
|
77 |
+
pre .clojure .attribute {
|
78 |
+
color: #0F0;
|
79 |
+
}
|
80 |
+
|
81 |
+
pre .python .decorator,
|
82 |
+
pre .django .filter .argument,
|
83 |
+
pre .smalltalk .localvars,
|
84 |
+
pre .smalltalk .array,
|
85 |
+
pre .attr_selector,
|
86 |
+
pre .pseudo,
|
87 |
+
pre .xml .pi,
|
88 |
+
pre .diff .header,
|
89 |
+
pre .chunk,
|
90 |
+
pre .shebang,
|
91 |
+
pre .nginx .built_in,
|
92 |
+
pre .prompt {
|
93 |
+
color: #008080;
|
94 |
+
}
|
95 |
+
|
96 |
+
pre .keyword,
|
97 |
+
pre .css .id,
|
98 |
+
pre .title,
|
99 |
+
pre .haskell .type,
|
100 |
+
pre .vbscript .built_in,
|
101 |
+
pre .sql .aggregate,
|
102 |
+
pre .rsl .built_in,
|
103 |
+
pre .smalltalk .class,
|
104 |
+
pre .winutils,
|
105 |
+
pre .flow,
|
106 |
+
pre .apache .tag,
|
107 |
+
pre .nginx .built_in,
|
108 |
+
pre .tex .command,
|
109 |
+
pre .tex .special,
|
110 |
+
pre .request,
|
111 |
+
pre .status {
|
112 |
+
font-weight: bold;
|
113 |
+
}
|
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Description: Foundation 4 docs style for highlight.js
|
3 |
+
Author: Dan Allen <dan.j.allen@gmail.com>
|
4 |
+
Website: http://foundation.zurb.com/docs/
|
5 |
+
Version: 1.0
|
6 |
+
Date: 2013-04-02
|
7 |
+
*/
|
8 |
+
|
9 |
+
pre code {
|
10 |
+
display: block; padding: 0.5em;
|
11 |
+
background: #eee;
|
12 |
+
}
|
13 |
+
|
14 |
+
pre .header,
|
15 |
+
pre .decorator,
|
16 |
+
pre .annotation {
|
17 |
+
color: #000077;
|
18 |
+
}
|
19 |
+
|
20 |
+
pre .horizontal_rule,
|
21 |
+
pre .link_url,
|
22 |
+
pre .emphasis,
|
23 |
+
pre .attribute {
|
24 |
+
color: #070;
|
25 |
+
}
|
26 |
+
|
27 |
+
pre .emphasis {
|
28 |
+
font-style: italic;
|
29 |
+
}
|
30 |
+
|
31 |
+
pre .link_label,
|
32 |
+
pre .strong,
|
33 |
+
pre .value,
|
34 |
+
pre .string,
|
35 |
+
pre .scss .value .string {
|
36 |
+
color: #d14;
|
37 |
+
}
|
38 |
+
|
39 |
+
pre .strong {
|
40 |
+
font-weight: bold;
|
41 |
+
}
|
42 |
+
|
43 |
+
pre .blockquote,
|
44 |
+
pre .comment {
|
45 |
+
color: #998;
|
46 |
+
font-style: italic;
|
47 |
+
}
|
48 |
+
|
49 |
+
pre .asciidoc .title,
|
50 |
+
pre .function .title {
|
51 |
+
color: #900;
|
52 |
+
}
|
53 |
+
|
54 |
+
pre .class {
|
55 |
+
color: #458;
|
56 |
+
}
|
57 |
+
|
58 |
+
pre .id,
|
59 |
+
pre .pseudo,
|
60 |
+
pre .constant,
|
61 |
+
pre .hexcolor {
|
62 |
+
color: teal;
|
63 |
+
}
|
64 |
+
|
65 |
+
pre .variable {
|
66 |
+
color: #336699;
|
67 |
+
}
|
68 |
+
|
69 |
+
pre .bullet,
|
70 |
+
pre .javadoc {
|
71 |
+
color: #997700;
|
72 |
+
}
|
73 |
+
|
74 |
+
pre .pi,
|
75 |
+
pre .doctype {
|
76 |
+
color: #3344bb;
|
77 |
+
}
|
78 |
+
|
79 |
+
pre .code,
|
80 |
+
pre .number {
|
81 |
+
color: #099;
|
82 |
+
}
|
83 |
+
|
84 |
+
pre .important {
|
85 |
+
color: #f00;
|
86 |
+
}
|
87 |
+
|
88 |
+
pre .smartquote,
|
89 |
+
pre .label {
|
90 |
+
color: #970;
|
91 |
+
}
|
92 |
+
|
93 |
+
pre .preprocessor,
|
94 |
+
pre .pragma {
|
95 |
+
color: #579;
|
96 |
+
}
|
97 |
+
|
98 |
+
pre .reserved,
|
99 |
+
pre .keyword,
|
100 |
+
pre .scss .value {
|
101 |
+
color: #000;
|
102 |
+
}
|
103 |
+
|
104 |
+
pre .regexp {
|
105 |
+
background-color: #fff0ff;
|
106 |
+
color: #880088;
|
107 |
+
}
|
108 |
+
|
109 |
+
pre .symbol {
|
110 |
+
color: #990073;
|
111 |
+
}
|
112 |
+
|
113 |
+
pre .symbol .string {
|
114 |
+
color: #a60;
|
115 |
+
}
|
116 |
+
|
117 |
+
pre .tag {
|
118 |
+
color: #007700;
|
119 |
+
}
|
120 |
+
|
121 |
+
pre .at_rule,
|
122 |
+
pre .at_rule .keyword {
|
123 |
+
color: #088;
|
124 |
+
}
|
125 |
+
|
126 |
+
pre .at_rule .preprocessor {
|
127 |
+
color: #808;
|
128 |
+
}
|
129 |
+
|
130 |
+
pre .scss .tag,
|
131 |
+
pre .scss .attribute {
|
132 |
+
color: #339;
|
133 |
+
}
|
@@ -44,7 +44,9 @@ pre .tex .formula {
|
|
44 |
}
|
45 |
|
46 |
pre .title,
|
47 |
-
pre .id
|
|
|
|
|
48 |
color: #900;
|
49 |
font-weight: bold
|
50 |
}
|
@@ -102,6 +104,7 @@ pre .clojure .built_in {
|
|
102 |
}
|
103 |
|
104 |
pre .preprocessor,
|
|
|
105 |
pre .pi,
|
106 |
pre .doctype,
|
107 |
pre .shebang,
|
44 |
}
|
45 |
|
46 |
pre .title,
|
47 |
+
pre .id,
|
48 |
+
pre .coffeescript .params,
|
49 |
+
pre .scss .preprocessor {
|
50 |
color: #900;
|
51 |
font-weight: bold
|
52 |
}
|
104 |
}
|
105 |
|
106 |
pre .preprocessor,
|
107 |
+
pre .pragma,
|
108 |
pre .pi,
|
109 |
pre .doctype,
|
110 |
pre .shebang,
|
@@ -43,7 +43,8 @@ pre .filter .argument,
|
|
43 |
pre .attr_selector,
|
44 |
pre .apache .cbracket,
|
45 |
pre .date,
|
46 |
-
pre .regexp
|
|
|
47 |
color: #080;
|
48 |
}
|
49 |
|
@@ -112,7 +113,8 @@ pre .nginx .built_in {
|
|
112 |
}
|
113 |
|
114 |
pre .preprocessor,
|
115 |
-
pre .preprocessor
|
|
|
116 |
color: #444;
|
117 |
}
|
118 |
|
43 |
pre .attr_selector,
|
44 |
pre .apache .cbracket,
|
45 |
pre .date,
|
46 |
+
pre .regexp,
|
47 |
+
pre .coffeescript .attribute {
|
48 |
color: #080;
|
49 |
}
|
50 |
|
113 |
}
|
114 |
|
115 |
pre .preprocessor,
|
116 |
+
pre .preprocessor *,
|
117 |
+
pre .pragma {
|
118 |
color: #444;
|
119 |
}
|
120 |
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
|
3 |
+
Intellij Idea-like styling (c) Vasily Polovnyov <vast@whiteants.net>
|
4 |
+
|
5 |
+
*/
|
6 |
+
|
7 |
+
pre code {
|
8 |
+
display: block; padding: 0.5em;
|
9 |
+
color: #000;
|
10 |
+
background: #fff;
|
11 |
+
}
|
12 |
+
|
13 |
+
pre .subst,
|
14 |
+
pre .title {
|
15 |
+
font-weight: normal;
|
16 |
+
color: #000;
|
17 |
+
}
|
18 |
+
|
19 |
+
pre .comment,
|
20 |
+
pre .template_comment,
|
21 |
+
pre .javadoc,
|
22 |
+
pre .diff .header {
|
23 |
+
color: #808080;
|
24 |
+
font-style: italic;
|
25 |
+
}
|
26 |
+
|
27 |
+
pre .annotation,
|
28 |
+
pre .decorator,
|
29 |
+
pre .preprocessor,
|
30 |
+
pre .pragma,
|
31 |
+
pre .doctype,
|
32 |
+
pre .pi,
|
33 |
+
pre .chunk,
|
34 |
+
pre .shebang,
|
35 |
+
pre .apache .cbracket,
|
36 |
+
pre .prompt,
|
37 |
+
pre .http .title {
|
38 |
+
color: #808000;
|
39 |
+
}
|
40 |
+
|
41 |
+
pre .tag,
|
42 |
+
pre .pi {
|
43 |
+
background: #efefef;
|
44 |
+
}
|
45 |
+
|
46 |
+
pre .tag .title,
|
47 |
+
pre .id,
|
48 |
+
pre .attr_selector,
|
49 |
+
pre .pseudo,
|
50 |
+
pre .literal,
|
51 |
+
pre .keyword,
|
52 |
+
pre .hexcolor,
|
53 |
+
pre .css .function,
|
54 |
+
pre .ini .title,
|
55 |
+
pre .css .class,
|
56 |
+
pre .list .title,
|
57 |
+
pre .clojure .title,
|
58 |
+
pre .nginx .title,
|
59 |
+
pre .tex .command,
|
60 |
+
pre .request,
|
61 |
+
pre .status {
|
62 |
+
font-weight: bold;
|
63 |
+
color: #000080;
|
64 |
+
}
|
65 |
+
|
66 |
+
pre .attribute,
|
67 |
+
pre .rules .keyword,
|
68 |
+
pre .number,
|
69 |
+
pre .date,
|
70 |
+
pre .regexp,
|
71 |
+
pre .tex .special {
|
72 |
+
font-weight: bold;
|
73 |
+
color: #0000ff;
|
74 |
+
}
|
75 |
+
|
76 |
+
pre .number,
|
77 |
+
pre .regexp {
|
78 |
+
font-weight: normal;
|
79 |
+
}
|
80 |
+
|
81 |
+
pre .string,
|
82 |
+
pre .value,
|
83 |
+
pre .filter .argument,
|
84 |
+
pre .css .function .params,
|
85 |
+
pre .apache .tag {
|
86 |
+
color: #008000;
|
87 |
+
font-weight: bold;
|
88 |
+
}
|
89 |
+
|
90 |
+
pre .symbol,
|
91 |
+
pre .ruby .symbol .string,
|
92 |
+
pre .char,
|
93 |
+
pre .tex .formula {
|
94 |
+
color: #000;
|
95 |
+
background: #d0eded;
|
96 |
+
font-style: italic;
|
97 |
+
}
|
98 |
+
|
99 |
+
pre .phpdoc,
|
100 |
+
pre .yardoctag,
|
101 |
+
pre .javadoctag {
|
102 |
+
text-decoration: underline;
|
103 |
+
}
|
104 |
+
|
105 |
+
pre .variable,
|
106 |
+
pre .envvar,
|
107 |
+
pre .apache .sqbracket,
|
108 |
+
pre .nginx .built_in {
|
109 |
+
color: #660e7a;
|
110 |
+
}
|
111 |
+
|
112 |
+
pre .addition {
|
113 |
+
background: #baeeba;
|
114 |
+
}
|
115 |
+
|
116 |
+
pre .deletion {
|
117 |
+
background: #ffc8bd;
|
118 |
+
}
|
119 |
+
|
120 |
+
pre .diff .change {
|
121 |
+
background: #bccff9;
|
122 |
+
}
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
IR_Black style (c) Vasily Mikhailitchenko <vaskas@programica.ru>
|
3 |
+
*/
|
4 |
+
|
5 |
+
pre code {
|
6 |
+
display: block; padding: 0.5em;
|
7 |
+
background: #000; color: #f8f8f8;
|
8 |
+
}
|
9 |
+
|
10 |
+
pre .shebang,
|
11 |
+
pre .comment,
|
12 |
+
pre .template_comment,
|
13 |
+
pre .javadoc {
|
14 |
+
color: #7c7c7c;
|
15 |
+
}
|
16 |
+
|
17 |
+
pre .keyword,
|
18 |
+
pre .tag,
|
19 |
+
pre .tex .command,
|
20 |
+
pre .request,
|
21 |
+
pre .status,
|
22 |
+
pre .clojure .attribute {
|
23 |
+
color: #96CBFE;
|
24 |
+
}
|
25 |
+
|
26 |
+
pre .sub .keyword,
|
27 |
+
pre .method,
|
28 |
+
pre .list .title,
|
29 |
+
pre .nginx .title {
|
30 |
+
color: #FFFFB6;
|
31 |
+
}
|
32 |
+
|
33 |
+
pre .string,
|
34 |
+
pre .tag .value,
|
35 |
+
pre .cdata,
|
36 |
+
pre .filter .argument,
|
37 |
+
pre .attr_selector,
|
38 |
+
pre .apache .cbracket,
|
39 |
+
pre .date,
|
40 |
+
pre .coffeescript .attribute {
|
41 |
+
color: #A8FF60;
|
42 |
+
}
|
43 |
+
|
44 |
+
pre .subst {
|
45 |
+
color: #DAEFA3;
|
46 |
+
}
|
47 |
+
|
48 |
+
pre .regexp {
|
49 |
+
color: #E9C062;
|
50 |
+
}
|
51 |
+
|
52 |
+
pre .title,
|
53 |
+
pre .sub .identifier,
|
54 |
+
pre .pi,
|
55 |
+
pre .decorator,
|
56 |
+
pre .tex .special,
|
57 |
+
pre .haskell .type,
|
58 |
+
pre .constant,
|
59 |
+
pre .smalltalk .class,
|
60 |
+
pre .javadoctag,
|
61 |
+
pre .yardoctag,
|
62 |
+
pre .phpdoc,
|
63 |
+
pre .nginx .built_in {
|
64 |
+
color: #FFFFB6;
|
65 |
+
}
|
66 |
+
|
67 |
+
pre .symbol,
|
68 |
+
pre .ruby .symbol .string,
|
69 |
+
pre .number,
|
70 |
+
pre .variable,
|
71 |
+
pre .vbscript,
|
72 |
+
pre .literal {
|
73 |
+
color: #C6C5FE;
|
74 |
+
}
|
75 |
+
|
76 |
+
pre .css .tag {
|
77 |
+
color: #96CBFE;
|
78 |
+
}
|
79 |
+
|
80 |
+
pre .css .rules .property,
|
81 |
+
pre .css .id {
|
82 |
+
color: #FFFFB6;
|
83 |
+
}
|
84 |
+
|
85 |
+
pre .css .class {
|
86 |
+
color: #FFF;
|
87 |
+
}
|
88 |
+
|
89 |
+
pre .hexcolor {
|
90 |
+
color: #C6C5FE;
|
91 |
+
}
|
92 |
+
|
93 |
+
pre .number {
|
94 |
+
color:#FF73FD;
|
95 |
+
}
|
96 |
+
|
97 |
+
pre .coffeescript .javascript,
|
98 |
+
pre .javascript .xml,
|
99 |
+
pre .tex .formula,
|
100 |
+
pre .xml .javascript,
|
101 |
+
pre .xml .vbscript,
|
102 |
+
pre .xml .css,
|
103 |
+
pre .xml .cdata {
|
104 |
+
opacity: 0.7;
|
105 |
+
}
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Description: Magula style for highligh.js
|
3 |
+
Author: Ruslan Keba <rukeba@gmail.com>
|
4 |
+
Website: http://rukeba.com/
|
5 |
+
Version: 1.0
|
6 |
+
Date: 2009-01-03
|
7 |
+
Music: Aphex Twin / Xtal
|
8 |
+
*/
|
9 |
+
|
10 |
+
pre code {
|
11 |
+
display: block; padding: 0.5em;
|
12 |
+
background-color: #f4f4f4;
|
13 |
+
}
|
14 |
+
|
15 |
+
pre code,
|
16 |
+
pre .subst,
|
17 |
+
pre .lisp .title,
|
18 |
+
pre .clojure .built_in {
|
19 |
+
color: black;
|
20 |
+
}
|
21 |
+
|
22 |
+
pre .string,
|
23 |
+
pre .title,
|
24 |
+
pre .parent,
|
25 |
+
pre .tag .value,
|
26 |
+
pre .rules .value,
|
27 |
+
pre .rules .value .number,
|
28 |
+
pre .preprocessor,
|
29 |
+
pre .pragma,
|
30 |
+
pre .ruby .symbol,
|
31 |
+
pre .ruby .symbol .string,
|
32 |
+
pre .aggregate,
|
33 |
+
pre .template_tag,
|
34 |
+
pre .django .variable,
|
35 |
+
pre .smalltalk .class,
|
36 |
+
pre .addition,
|
37 |
+
pre .flow,
|
38 |
+
pre .stream,
|
39 |
+
pre .bash .variable,
|
40 |
+
pre .apache .cbracket,
|
41 |
+
pre .coffeescript .attribute {
|
42 |
+
color: #050;
|
43 |
+
}
|
44 |
+
|
45 |
+
pre .comment,
|
46 |
+
pre .annotation,
|
47 |
+
pre .template_comment,
|
48 |
+
pre .diff .header,
|
49 |
+
pre .chunk {
|
50 |
+
color: #777;
|
51 |
+
}
|
52 |
+
|
53 |
+
pre .number,
|
54 |
+
pre .date,
|
55 |
+
pre .regexp,
|
56 |
+
pre .literal,
|
57 |
+
pre .smalltalk .symbol,
|
58 |
+
pre .smalltalk .char,
|
59 |
+
pre .change,
|
60 |
+
pre .tex .special {
|
61 |
+
color: #800;
|
62 |
+
}
|
63 |
+
|
64 |
+
pre .label,
|
65 |
+
pre .javadoc,
|
66 |
+
pre .ruby .string,
|
67 |
+
pre .decorator,
|
68 |
+
pre .filter .argument,
|
69 |
+
pre .localvars,
|
70 |
+
pre .array,
|
71 |
+
pre .attr_selector,
|
72 |
+
pre .pseudo,
|
73 |
+
pre .pi,
|
74 |
+
pre .doctype,
|
75 |
+
pre .deletion,
|
76 |
+
pre .envvar,
|
77 |
+
pre .shebang,
|
78 |
+
pre .apache .sqbracket,
|
79 |
+
pre .nginx .built_in,
|
80 |
+
pre .tex .formula,
|
81 |
+
pre .prompt,
|
82 |
+
pre .clojure .attribute {
|
83 |
+
color: #00e;
|
84 |
+
}
|
85 |
+
|
86 |
+
pre .keyword,
|
87 |
+
pre .id,
|
88 |
+
pre .phpdoc,
|
89 |
+
pre .title,
|
90 |
+
pre .built_in,
|
91 |
+
pre .aggregate,
|
92 |
+
pre .smalltalk .class,
|
93 |
+
pre .winutils,
|
94 |
+
pre .bash .variable,
|
95 |
+
pre .apache .tag,
|
96 |
+
pre .xml .tag,
|
97 |
+
pre .tex .command,
|
98 |
+
pre .request,
|
99 |
+
pre .status {
|
100 |
+
font-weight: bold;
|
101 |
+
color: navy;
|
102 |
+
}
|
103 |
+
|
104 |
+
pre .nginx .built_in {
|
105 |
+
font-weight: normal;
|
106 |
+
}
|
107 |
+
|
108 |
+
pre .coffeescript .javascript,
|
109 |
+
pre .javascript .xml,
|
110 |
+
pre .tex .formula,
|
111 |
+
pre .xml .javascript,
|
112 |
+
pre .xml .vbscript,
|
113 |
+
pre .xml .css,
|
114 |
+
pre .xml .cdata {
|
115 |
+
opacity: 0.5;
|
116 |
+
}
|
117 |
+
|
118 |
+
/* --- */
|
119 |
+
pre .apache .tag {
|
120 |
+
font-weight: bold;
|
121 |
+
color: blue;
|
122 |
+
}
|
123 |
+
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Five-color theme from a single blue hue.
|
3 |
+
*/
|
4 |
+
pre code {
|
5 |
+
display: block; padding: 0.5em;
|
6 |
+
background: #EAEEF3; color: #00193A;
|
7 |
+
}
|
8 |
+
|
9 |
+
pre .keyword,
|
10 |
+
pre .title,
|
11 |
+
pre .important,
|
12 |
+
pre .request,
|
13 |
+
pre .header,
|
14 |
+
pre .javadoctag {
|
15 |
+
font-weight: bold;
|
16 |
+
}
|
17 |
+
|
18 |
+
pre .comment,
|
19 |
+
pre .chunk,
|
20 |
+
pre .template_comment {
|
21 |
+
color: #738191;
|
22 |
+
}
|
23 |
+
|
24 |
+
pre .string,
|
25 |
+
pre .title,
|
26 |
+
pre .parent,
|
27 |
+
pre .built_in,
|
28 |
+
pre .literal,
|
29 |
+
pre .filename,
|
30 |
+
pre .value,
|
31 |
+
pre .addition,
|
32 |
+
pre .tag,
|
33 |
+
pre .argument,
|
34 |
+
pre .link_label,
|
35 |
+
pre .blockquote,
|
36 |
+
pre .header {
|
37 |
+
color: #0048AB;
|
38 |
+
}
|
39 |
+
|
40 |
+
pre .decorator,
|
41 |
+
pre .prompt,
|
42 |
+
pre .yardoctag,
|
43 |
+
pre .subst,
|
44 |
+
pre .symbol,
|
45 |
+
pre .doctype,
|
46 |
+
pre .regexp,
|
47 |
+
pre .preprocessor,
|
48 |
+
pre .pragma,
|
49 |
+
pre .pi,
|
50 |
+
pre .attribute,
|
51 |
+
pre .attr_selector,
|
52 |
+
pre .javadoc,
|
53 |
+
pre .xmlDocTag,
|
54 |
+
pre .deletion,
|
55 |
+
pre .shebang,
|
56 |
+
pre .string .variable,
|
57 |
+
pre .link_url,
|
58 |
+
pre .bullet,
|
59 |
+
pre .sqbracket,
|
60 |
+
pre .phony {
|
61 |
+
color: #4C81C9;
|
62 |
+
}
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Monokai style - ported by Luigi Maselli - http://grigio.org
|
3 |
+
*/
|
4 |
+
|
5 |
+
pre code {
|
6 |
+
display: block; padding: 0.5em;
|
7 |
+
background: #272822;
|
8 |
+
}
|
9 |
+
|
10 |
+
pre .tag,
|
11 |
+
pre .tag .title,
|
12 |
+
pre .keyword,
|
13 |
+
pre .literal,
|
14 |
+
pre .strong,
|
15 |
+
pre .change,
|
16 |
+
pre .winutils,
|
17 |
+
pre .flow,
|
18 |
+
pre .lisp .title,
|
19 |
+
pre .clojure .built_in,
|
20 |
+
pre .nginx .title,
|
21 |
+
pre .tex .special {
|
22 |
+
color: #F92672;
|
23 |
+
}
|
24 |
+
|
25 |
+
pre code {
|
26 |
+
color: #DDD;
|
27 |
+
}
|
28 |
+
|
29 |
+
pre code .constant,
|
30 |
+
pre .asciidoc .code {
|
31 |
+
color: #66D9EF;
|
32 |
+
}
|
33 |
+
|
34 |
+
pre .code,
|
35 |
+
pre .class .title,
|
36 |
+
pre .header {
|
37 |
+
color: white;
|
38 |
+
}
|
39 |
+
|
40 |
+
pre .link_label,
|
41 |
+
pre .attribute,
|
42 |
+
pre .symbol,
|
43 |
+
pre .symbol .string,
|
44 |
+
pre .value,
|
45 |
+
pre .regexp {
|
46 |
+
color: #BF79DB;
|
47 |
+
}
|
48 |
+
|
49 |
+
pre .link_url,
|
50 |
+
pre .tag .value,
|
51 |
+
pre .string,
|
52 |
+
pre .bullet,
|
53 |
+
pre .subst,
|
54 |
+
pre .title,
|
55 |
+
pre .emphasis,
|
56 |
+
pre .haskell .type,
|
57 |
+
pre .preprocessor,
|
58 |
+
pre .pragma,
|
59 |
+
pre .ruby .class .parent,
|
60 |
+
pre .built_in,
|
61 |
+
pre .sql .aggregate,
|
62 |
+
pre .django .template_tag,
|
63 |
+
pre .django .variable,
|
64 |
+
pre .smalltalk .class,
|
65 |
+
pre .javadoc,
|
66 |
+
pre .django .filter .argument,
|
67 |
+
pre .smalltalk .localvars,
|
68 |
+
pre .smalltalk .array,
|
69 |
+
pre .attr_selector,
|
70 |
+
pre .pseudo,
|
71 |
+
pre .addition,
|
72 |
+
pre .stream,
|
73 |
+
pre .envvar,
|
74 |
+
pre .apache .tag,
|
75 |
+
pre .apache .cbracket,
|
76 |
+
pre .tex .command,
|
77 |
+
pre .prompt {
|
78 |
+
color: #A6E22E;
|
79 |
+
}
|
80 |
+
|
81 |
+
pre .comment,
|
82 |
+
pre .java .annotation,
|
83 |
+
pre .smartquote,
|
84 |
+
pre .blockquote,
|
85 |
+
pre .horizontal_rule,
|
86 |
+
pre .python .decorator,
|
87 |
+
pre .template_comment,
|
88 |
+
pre .pi,
|
89 |
+
pre .doctype,
|
90 |
+
pre .deletion,
|
91 |
+
pre .shebang,
|
92 |
+
pre .apache .sqbracket,
|
93 |
+
pre .tex .formula {
|
94 |
+
color: #75715E;
|
95 |
+
}
|
96 |
+
|
97 |
+
pre .keyword,
|
98 |
+
pre .literal,
|
99 |
+
pre .css .id,
|
100 |
+
pre .phpdoc,
|
101 |
+
pre .title,
|
102 |
+
pre .header,
|
103 |
+
pre .haskell .type,
|
104 |
+
pre .vbscript .built_in,
|
105 |
+
pre .sql .aggregate,
|
106 |
+
pre .rsl .built_in,
|
107 |
+
pre .smalltalk .class,
|
108 |
+
pre .diff .header,
|
109 |
+
pre .chunk,
|
110 |
+
pre .winutils,
|
111 |
+
pre .bash .variable,
|
112 |
+
pre .apache .tag,
|
113 |
+
pre .tex .special,
|
114 |
+
pre .request,
|
115 |
+
pre .status {
|
116 |
+
font-weight: bold;
|
117 |
+
}
|
118 |
+
|
119 |
+
pre .coffeescript .javascript,
|
120 |
+
pre .javascript .xml,
|
121 |
+
pre .tex .formula,
|
122 |
+
pre .xml .javascript,
|
123 |
+
pre .xml .vbscript,
|
124 |
+
pre .xml .css,
|
125 |
+
pre .xml .cdata {
|
126 |
+
opacity: 0.5;
|
127 |
+
}
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
|
3 |
+
Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/
|
4 |
+
|
5 |
+
*/
|
6 |
+
|
7 |
+
pre code {
|
8 |
+
display: block;
|
9 |
+
padding: 0.5em;
|
10 |
+
background: #23241f;
|
11 |
+
}
|
12 |
+
pre .tag,
|
13 |
+
pre code {
|
14 |
+
color: #f8f8f2;
|
15 |
+
}
|
16 |
+
pre .keyword,
|
17 |
+
pre .function,
|
18 |
+
pre .literal,
|
19 |
+
pre .change,
|
20 |
+
pre .winutils,
|
21 |
+
pre .flow,
|
22 |
+
pre .lisp .title,
|
23 |
+
pre .clojure .built_in,
|
24 |
+
pre .nginx .title,
|
25 |
+
pre .tex .special {
|
26 |
+
color: #66d9ef;
|
27 |
+
}
|
28 |
+
pre .variable,
|
29 |
+
pre .params {
|
30 |
+
color: #fd9720;
|
31 |
+
}
|
32 |
+
pre .constant {
|
33 |
+
color: #66d9ef;
|
34 |
+
}
|
35 |
+
pre .title,
|
36 |
+
pre .class .title,
|
37 |
+
pre .css .class {
|
38 |
+
color: #a6e22e;
|
39 |
+
}
|
40 |
+
pre .attribute,
|
41 |
+
pre .symbol,
|
42 |
+
pre .symbol .string,
|
43 |
+
pre .tag .title,
|
44 |
+
pre .value,
|
45 |
+
pre .css .tag {
|
46 |
+
color: #f92672;
|
47 |
+
}
|
48 |
+
pre .number,
|
49 |
+
pre .preprocessor,
|
50 |
+
pre .pragma,
|
51 |
+
pre .regexp {
|
52 |
+
color: #ae81ff;
|
53 |
+
}
|
54 |
+
pre .tag .value,
|
55 |
+
pre .string,
|
56 |
+
pre .css .id,
|
57 |
+
pre .subst,
|
58 |
+
pre .haskell .type,
|
59 |
+
pre .ruby .class .parent,
|
60 |
+
pre .built_in,
|
61 |
+
pre .sql .aggregate,
|
62 |
+
pre .django .template_tag,
|
63 |
+
pre .django .variable,
|
64 |
+
pre .smalltalk .class,
|
65 |
+
pre .django .filter .argument,
|
66 |
+
pre .smalltalk .localvars,
|
67 |
+
pre .smalltalk .array,
|
68 |
+
pre .attr_selector,
|
69 |
+
pre .pseudo,
|
70 |
+
pre .addition,
|
71 |
+
pre .stream,
|
72 |
+
pre .envvar,
|
73 |
+
pre .apache .tag,
|
74 |
+
pre .apache .cbracket,
|
75 |
+
pre .tex .command,
|
76 |
+
pre .prompt {
|
77 |
+
color: #e6db74;
|
78 |
+
}
|
79 |
+
pre .comment,
|
80 |
+
pre .javadoc,
|
81 |
+
pre .java .annotation,
|
82 |
+
pre .python .decorator,
|
83 |
+
pre .template_comment,
|
84 |
+
pre .pi,
|
85 |
+
pre .doctype,
|
86 |
+
pre .deletion,
|
87 |
+
pre .shebang,
|
88 |
+
pre .apache .sqbracket,
|
89 |
+
pre .tex .formula {
|
90 |
+
color: #75715e;
|
91 |
+
}
|
92 |
+
pre .coffeescript .javascript,
|
93 |
+
pre .javascript .xml,
|
94 |
+
pre .tex .formula {
|
95 |
+
opacity: 0.5;
|
96 |
+
}
|
97 |
+
pre .xml .javascript,
|
98 |
+
pre .xml .vbscript,
|
99 |
+
pre .xml .css,
|
100 |
+
pre .xml .cdata {
|
101 |
+
opacity: 0.5;
|
102 |
+
}
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Obsidian style
|
3 |
+
* ported by Alexander Marenin (http://github.com/ioncreature)
|
4 |
+
*/
|
5 |
+
|
6 |
+
pre code {
|
7 |
+
display: block; padding: 0.5em;
|
8 |
+
background: #282B2E;
|
9 |
+
}
|
10 |
+
|
11 |
+
pre .keyword,
|
12 |
+
pre .literal,
|
13 |
+
pre .change,
|
14 |
+
pre .winutils,
|
15 |
+
pre .flow,
|
16 |
+
pre .lisp .title,
|
17 |
+
pre .clojure .built_in,
|
18 |
+
pre .nginx .title,
|
19 |
+
pre .css .id,
|
20 |
+
pre .tex .special {
|
21 |
+
color: #93C763;
|
22 |
+
}
|
23 |
+
|
24 |
+
pre .number {
|
25 |
+
color: #FFCD22;
|
26 |
+
}
|
27 |
+
|
28 |
+
pre code {
|
29 |
+
color: #E0E2E4;
|
30 |
+
}
|
31 |
+
|
32 |
+
pre .css .tag,
|
33 |
+
pre .css .pseudo {
|
34 |
+
color: #D0D2B5;
|
35 |
+
}
|
36 |
+
|
37 |
+
pre .attribute,
|
38 |
+
pre code .constant {
|
39 |
+
color: #668BB0;
|
40 |
+
}
|
41 |
+
|
42 |
+
pre .xml .attribute {
|
43 |
+
color: #B3B689;
|
44 |
+
}
|
45 |
+
|
46 |
+
pre .xml .tag .value {
|
47 |
+
color: #E8E2B7;
|
48 |
+
}
|
49 |
+
|
50 |
+
pre .code,
|
51 |
+
pre .class .title,
|
52 |
+
pre .header {
|
53 |
+
color: white;
|
54 |
+
}
|
55 |
+
|
56 |
+
pre .class,
|
57 |
+
pre .hexcolor {
|
58 |
+
color: #93C763;
|
59 |
+
}
|
60 |
+
|
61 |
+
pre .regexp {
|
62 |
+
color: #D39745;
|
63 |
+
}
|
64 |
+
|
65 |
+
pre .at_rule,
|
66 |
+
pre .at_rule .keyword {
|
67 |
+
color: #A082BD;
|
68 |
+
}
|
69 |
+
|
70 |
+
pre .doctype {
|
71 |
+
color: #557182;
|
72 |
+
}
|
73 |
+
|
74 |
+
pre .link_url,
|
75 |
+
pre .tag,
|
76 |
+
pre .tag .title,
|
77 |
+
pre .bullet,
|
78 |
+
pre .subst,
|
79 |
+
pre .emphasis,
|
80 |
+
pre .haskell .type,
|
81 |
+
pre .preprocessor,
|
82 |
+
pre .pragma,
|
83 |
+
pre .ruby .class .parent,
|
84 |
+
pre .built_in,
|
85 |
+
pre .sql .aggregate,
|
86 |
+
pre .django .template_tag,
|
87 |
+
pre .django .variable,
|
88 |
+
pre .smalltalk .class,
|
89 |
+
pre .javadoc,
|
90 |
+
pre .django .filter .argument,
|
91 |
+
pre .smalltalk .localvars,
|
92 |
+
pre .smalltalk .array,
|
93 |
+
pre .attr_selector,
|
94 |
+
pre .pseudo,
|
95 |
+
pre .addition,
|
96 |
+
pre .stream,
|
97 |
+
pre .envvar,
|
98 |
+
pre .apache .tag,
|
99 |
+
pre .apache .cbracket,
|
100 |
+
pre .tex .command,
|
101 |
+
pre .prompt {
|
102 |
+
color: #8CBBAD;
|
103 |
+
}
|
104 |
+
|
105 |
+
pre .string {
|
106 |
+
color: #EC7600;
|
107 |
+
}
|
108 |
+
|
109 |
+
pre .comment,
|
110 |
+
pre .java .annotation,
|
111 |
+
pre .blockquote,
|
112 |
+
pre .horizontal_rule,
|
113 |
+
pre .python .decorator,
|
114 |
+
pre .template_comment,
|
115 |
+
pre .pi,
|
116 |
+
pre .deletion,
|
117 |
+
pre .shebang,
|
118 |
+
pre .apache .sqbracket,
|
119 |
+
pre .tex .formula {
|
120 |
+
color: #818E96;
|
121 |
+
}
|
122 |
+
|
123 |
+
pre .keyword,
|
124 |
+
pre .literal,
|
125 |
+
pre .css .id,
|
126 |
+
pre .phpdoc,
|
127 |
+
pre .title,
|
128 |
+
pre .header,
|
129 |
+
pre .haskell .type,
|
130 |
+
pre .vbscript .built_in,
|
131 |
+
pre .sql .aggregate,
|
132 |
+
pre .rsl .built_in,
|
133 |
+
pre .smalltalk .class,
|
134 |
+
pre .diff .header,
|
135 |
+
pre .chunk,
|
136 |
+
pre .winutils,
|
137 |
+
pre .bash .variable,
|
138 |
+
pre .apache .tag,
|
139 |
+
pre .tex .special,
|
140 |
+
pre .request,
|
141 |
+
pre .at_rule .keyword,
|
142 |
+
pre .status {
|
143 |
+
font-weight: bold;
|
144 |
+
}
|
145 |
+
|
146 |
+
pre .coffeescript .javascript,
|
147 |
+
pre .javascript .xml,
|
148 |
+
pre .tex .formula,
|
149 |
+
pre .xml .javascript,
|
150 |
+
pre .xml .vbscript,
|
151 |
+
pre .xml .css,
|
152 |
+
pre .xml .cdata {
|
153 |
+
opacity: 0.5;
|
154 |
+
}
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
|
3 |
+
Pojoaque Style by Jason Tate
|
4 |
+
http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html
|
5 |
+
Based on Solarized Style from http://ethanschoonover.com/solarized
|
6 |
+
|
7 |
+
*/
|
8 |
+
|
9 |
+
pre code {
|
10 |
+
display: block; padding: 0.5em;
|
11 |
+
color: #DCCF8F;
|
12 |
+
background: url(./pojoaque.jpg) repeat scroll left top #181914;
|
13 |
+
}
|
14 |
+
|
15 |
+
pre .comment,
|
16 |
+
pre .template_comment,
|
17 |
+
pre .diff .header,
|
18 |
+
pre .doctype,
|
19 |
+
pre .lisp .string,
|
20 |
+
pre .javadoc {
|
21 |
+
color: #586e75;
|
22 |
+
font-style: italic;
|
23 |
+
}
|
24 |
+
|
25 |
+
pre .keyword,
|
26 |
+
pre .css .rule .keyword,
|
27 |
+
pre .winutils,
|
28 |
+
pre .javascript .title,
|
29 |
+
pre .method,
|
30 |
+
pre .addition,
|
31 |
+
pre .css .tag,
|
32 |
+
pre .clojure .title,
|
33 |
+
pre .nginx .title {
|
34 |
+
color: #B64926;
|
35 |
+
}
|
36 |
+
|
37 |
+
pre .number,
|
38 |
+
pre .command,
|
39 |
+
pre .string,
|
40 |
+
pre .tag .value,
|
41 |
+
pre .phpdoc,
|
42 |
+
pre .tex .formula,
|
43 |
+
pre .regexp,
|
44 |
+
pre .hexcolor {
|
45 |
+
color: #468966;
|
46 |
+
}
|
47 |
+
|
48 |
+
pre .title,
|
49 |
+
pre .localvars,
|
50 |
+
pre .function .title,
|
51 |
+
pre .chunk,
|
52 |
+
pre .decorator,
|
53 |
+
pre .built_in,
|
54 |
+
pre .lisp .title,
|
55 |
+
pre .clojure .built_in,
|
56 |
+
pre .identifier,
|
57 |
+
pre .id {
|
58 |
+
color: #FFB03B;
|
59 |
+
}
|
60 |
+
|
61 |
+
pre .attribute,
|
62 |
+
pre .variable,
|
63 |
+
pre .lisp .body,
|
64 |
+
pre .smalltalk .number,
|
65 |
+
pre .constant,
|
66 |
+
pre .class .title,
|
67 |
+
pre .parent,
|
68 |
+
pre .haskell .type {
|
69 |
+
color: #b58900;
|
70 |
+
}
|
71 |
+
|
72 |
+
pre .css .attribute {
|
73 |
+
color: #b89859;
|
74 |
+
}
|
75 |
+
|
76 |
+
pre .css .number,pre .css .hexcolor{
|
77 |
+
color: #DCCF8F;
|
78 |
+
}
|
79 |
+
|
80 |
+
pre .css .class {
|
81 |
+
color: #d3a60c;
|
82 |
+
}
|
83 |
+
|
84 |
+
pre .preprocessor,
|
85 |
+
pre .pragma,
|
86 |
+
pre .pi,
|
87 |
+
pre .shebang,
|
88 |
+
pre .symbol,
|
89 |
+
pre .symbol .string,
|
90 |
+
pre .diff .change,
|
91 |
+
pre .special,
|
92 |
+
pre .attr_selector,
|
93 |
+
pre .important,
|
94 |
+
pre .subst,
|
95 |
+
pre .cdata {
|
96 |
+
color: #cb4b16;
|
97 |
+
}
|
98 |
+
|
99 |
+
pre .deletion {
|
100 |
+
color: #dc322f;
|
101 |
+
}
|
102 |
+
|
103 |
+
pre .tex .formula {
|
104 |
+
background: #073642;
|
105 |
+
}
|
@@ -0,0 +1,182 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
|
3 |
+
Railscasts-like style (c) Visoft, Inc. (Damien White)
|
4 |
+
|
5 |
+
*/
|
6 |
+
|
7 |
+
pre code {
|
8 |
+
display: block;
|
9 |
+
padding: 0.5em;
|
10 |
+
background: #232323;
|
11 |
+
color: #E6E1DC;
|
12 |
+
}
|
13 |
+
|
14 |
+
pre .comment,
|
15 |
+
pre .template_comment,
|
16 |
+
pre .javadoc,
|
17 |
+
pre .shebang {
|
18 |
+
color: #BC9458;
|
19 |
+
font-style: italic;
|
20 |
+
}
|
21 |
+
|
22 |
+
pre .keyword,
|
23 |
+
pre .ruby .function .keyword,
|
24 |
+
pre .request,
|
25 |
+
pre .status,
|
26 |
+
pre .nginx .title,
|
27 |
+
pre .method,
|
28 |
+
pre .list .title {
|
29 |
+
color: #C26230;
|
30 |
+
}
|
31 |
+
|
32 |
+
pre .string,
|
33 |
+
pre .number,
|
34 |
+
pre .regexp,
|
35 |
+
pre .tag .value,
|
36 |
+
pre .cdata,
|
37 |
+
pre .filter .argument,
|
38 |
+
pre .attr_selector,
|
39 |
+
pre .apache .cbracket,
|
40 |
+
pre .date,
|
41 |
+
pre .tex .command,
|
42 |
+
pre .markdown .link_label {
|
43 |
+
color: #A5C261;
|
44 |
+
}
|
45 |
+
|
46 |
+
pre .subst {
|
47 |
+
color: #519F50;
|
48 |
+
}
|
49 |
+
|
50 |
+
pre .tag,
|
51 |
+
pre .tag .keyword,
|
52 |
+
pre .tag .title,
|
53 |
+
pre .doctype,
|
54 |
+
pre .sub .identifier,
|
55 |
+
pre .pi,
|
56 |
+
pre .input_number {
|
57 |
+
color: #E8BF6A;
|
58 |
+
}
|
59 |
+
|
60 |
+
pre .identifier {
|
61 |
+
color: #D0D0FF;
|
62 |
+
}
|
63 |
+
|
64 |
+
pre .class .title,
|
65 |
+
pre .haskell .type,
|
66 |
+
pre .smalltalk .class,
|
67 |
+
pre .javadoctag,
|
68 |
+
pre .yardoctag,
|
69 |
+
pre .phpdoc {
|
70 |
+
text-decoration: none;
|
71 |
+
}
|
72 |
+
|
73 |
+
pre .constant {
|
74 |
+
color: #DA4939;
|
75 |
+
}
|
76 |
+
|
77 |
+
|
78 |
+
pre .symbol,
|
79 |
+
pre .built_in,
|
80 |
+
pre .ruby .symbol .string,
|
81 |
+
pre .ruby .symbol .identifier,
|
82 |
+
pre .markdown .link_url,
|
83 |
+
pre .attribute {
|
84 |
+
color: #6D9CBE;
|
85 |
+
}
|
86 |
+
|
87 |
+
pre .markdown .link_url {
|
88 |
+
text-decoration: underline;
|
89 |
+
}
|
90 |
+
|
91 |
+
|
92 |
+
|
93 |
+
pre .params,
|
94 |
+
pre .variable,
|
95 |
+
pre .clojure .attribute {
|
96 |
+
color: #D0D0FF;
|
97 |
+
}
|
98 |
+
|
99 |
+
pre .css .tag,
|
100 |
+
pre .rules .property,
|
101 |
+
pre .pseudo,
|
102 |
+
pre .tex .special {
|
103 |
+
color: #CDA869;
|
104 |
+
}
|
105 |
+
|
106 |
+
pre .css .class {
|
107 |
+
color: #9B703F;
|
108 |
+
}
|
109 |
+
|
110 |
+
pre .rules .keyword {
|
111 |
+
color: #C5AF75;
|
112 |
+
}
|
113 |
+
|
114 |
+
pre .rules .value {
|
115 |
+
color: #CF6A4C;
|
116 |
+
}
|
117 |
+
|
118 |
+
pre .css .id {
|
119 |
+
color: #8B98AB;
|
120 |
+
}
|
121 |
+
|
122 |
+
pre .annotation,
|
123 |
+
pre .apache .sqbracket,
|
124 |
+
pre .nginx .built_in {
|
125 |
+
color: #9B859D;
|
126 |
+
}
|
127 |
+
|
128 |
+
pre .preprocessor,
|
129 |
+
pre .preprocessor *
|
130 |
+
pre .pragma {
|
131 |
+
color: #8996A8 !important;
|
132 |
+
}
|
133 |
+
|
134 |
+
pre .hexcolor,
|
135 |
+
pre .css .value .number {
|
136 |
+
color: #A5C261;
|
137 |
+
}
|
138 |
+
|
139 |
+
pre .title,
|
140 |
+
pre .decorator,
|
141 |
+
pre .css .function {
|
142 |
+
color: #FFC66D;
|
143 |
+
}
|
144 |
+
|
145 |
+
pre .diff .header,
|
146 |
+
pre .chunk {
|
147 |
+
background-color: #2F33AB;
|
148 |
+
color: #E6E1DC;
|
149 |
+
display: inline-block;
|
150 |
+
width: 100%;
|
151 |
+
}
|
152 |
+
|
153 |
+
pre .diff .change {
|
154 |
+
background-color: #4A410D;
|
155 |
+
color: #F8F8F8;
|
156 |
+
display: inline-block;
|
157 |
+
width: 100%;
|
158 |
+
}
|
159 |
+
|
160 |
+
pre .addition {
|
161 |
+
background-color: #144212;
|
162 |
+
color: #E6E1DC;
|
163 |
+
display: inline-block;
|
164 |
+
width: 100%;
|
165 |
+
}
|
166 |
+
|
167 |
+
pre .deletion {
|
168 |
+
background-color: #600;
|
169 |
+
color: #E6E1DC;
|
170 |
+
display: inline-block;
|
171 |
+
width: 100%;
|
172 |
+
}
|
173 |
+
|
174 |
+
pre .coffeescript .javascript,
|
175 |
+
pre .javascript .xml,
|
176 |
+
pre .tex .formula,
|
177 |
+
pre .xml .javascript,
|
178 |
+
pre .xml .vbscript,
|
179 |
+
pre .xml .css,
|
180 |
+
pre .xml .cdata {
|
181 |
+
opacity: 0.7;
|
182 |
+
}
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
|
3 |
+
Style with support for rainbow parens
|
4 |
+
|
5 |
+
*/
|
6 |
+
|
7 |
+
pre ::-moz-selection{ background: #FF5E99; color:#fff; text-shadow: none; }
|
8 |
+
pre ::selection { background:#FF5E99; color:#fff; text-shadow: none; }
|
9 |
+
|
10 |
+
pre code {
|
11 |
+
display: block; padding: 0.5em;
|
12 |
+
background: #474949; color: #D1D9E1;
|
13 |
+
}
|
14 |
+
|
15 |
+
|
16 |
+
pre .body,
|
17 |
+
pre .collection {
|
18 |
+
color: #D1D9E1;
|
19 |
+
}
|
20 |
+
|
21 |
+
pre .comment,
|
22 |
+
pre .template_comment,
|
23 |
+
pre .diff .header,
|
24 |
+
pre .doctype,
|
25 |
+
pre .lisp .string,
|
26 |
+
pre .javadoc {
|
27 |
+
color: #969896;
|
28 |
+
font-style: italic;
|
29 |
+
}
|
30 |
+
|
31 |
+
pre .keyword,
|
32 |
+
pre .clojure .attribute,
|
33 |
+
pre .winutils,
|
34 |
+
pre .javascript .title,
|
35 |
+
pre .addition,
|
36 |
+
pre .css .tag {
|
37 |
+
color: #cc99cc;
|
38 |
+
}
|
39 |
+
|
40 |
+
pre .number { color: #f99157; }
|
41 |
+
|
42 |
+
pre .command,
|
43 |
+
pre .string,
|
44 |
+
pre .tag .value,
|
45 |
+
pre .phpdoc,
|
46 |
+
pre .tex .formula,
|
47 |
+
pre .regexp,
|
48 |
+
pre .hexcolor {
|
49 |
+
color: #8abeb7;
|
50 |
+
}
|
51 |
+
|
52 |
+
pre .title,
|
53 |
+
pre .localvars,
|
54 |
+
pre .function .title,
|
55 |
+
pre .chunk,
|
56 |
+
pre .decorator,
|
57 |
+
pre .built_in,
|
58 |
+
pre .lisp .title,
|
59 |
+
pre .identifier
|
60 |
+
{
|
61 |
+
color: #b5bd68;
|
62 |
+
}
|
63 |
+
|
64 |
+
pre .class .keyword
|
65 |
+
{
|
66 |
+
color: #f2777a;
|
67 |
+
}
|
68 |
+
|
69 |
+
pre .variable,
|
70 |
+
pre .lisp .body,
|
71 |
+
pre .smalltalk .number,
|
72 |
+
pre .constant,
|
73 |
+
pre .class .title,
|
74 |
+
pre .parent,
|
75 |
+
pre .haskell .label,
|
76 |
+
pre .id,
|
77 |
+
pre .lisp .title,
|
78 |
+
pre .clojure .title .built_in {
|
79 |
+
color: #ffcc66;
|
80 |
+
}
|
81 |
+
|
82 |
+
pre .tag .title,
|
83 |
+
pre .rules .property,
|
84 |
+
pre .django .tag .keyword,
|
85 |
+
pre .clojure .title .built_in {
|
86 |
+
font-weight: bold;
|
87 |
+
}
|
88 |
+
|
89 |
+
pre .attribute,
|
90 |
+
pre .clojure .title {
|
91 |
+
color: #81a2be;
|
92 |
+
}
|
93 |
+
|
94 |
+
pre .preprocessor,
|
95 |
+
pre .pragma,
|
96 |
+
pre .pi,
|
97 |
+
pre .shebang,
|
98 |
+
pre .symbol,
|
99 |
+
pre .symbol .string,
|
100 |
+
pre .diff .change,
|
101 |
+
pre .special,
|
102 |
+
pre .attr_selector,
|
103 |
+
pre .important,
|
104 |
+
pre .subst,
|
105 |
+
pre .cdata {
|
106 |
+
color: #f99157;
|
107 |
+
}
|
108 |
+
|
109 |
+
pre .deletion {
|
110 |
+
color: #dc322f;
|
111 |
+
}
|
112 |
+
|
113 |
+
pre .tex .formula {
|
114 |
+
background: #eee8d5;
|
115 |
+
}
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
|
3 |
+
School Book style from goldblog.com.ua (c) Zaripov Yura <yur4ik7@ukr.net>
|
4 |
+
|
5 |
+
*/
|
6 |
+
|
7 |
+
pre code {
|
8 |
+
display: block; padding: 15px 0.5em 0.5em 30px;
|
9 |
+
font-size: 11px !important;
|
10 |
+
line-height:16px !important;
|
11 |
+
}
|
12 |
+
|
13 |
+
pre{
|
14 |
+
background:#f6f6ae url(./school_book.png);
|
15 |
+
border-top: solid 2px #d2e8b9;
|
16 |
+
border-bottom: solid 1px #d2e8b9;
|
17 |
+
}
|
18 |
+
|
19 |
+
pre .keyword,
|
20 |
+
pre .literal,
|
21 |
+
pre .change,
|
22 |
+
pre .winutils,
|
23 |
+
pre .flow,
|
24 |
+
pre .lisp .title,
|
25 |
+
pre .clojure .built_in,
|
26 |
+
pre .nginx .title,
|
27 |
+
pre .tex .special {
|
28 |
+
color:#005599;
|
29 |
+
font-weight:bold;
|
30 |
+
}
|
31 |
+
|
32 |
+
pre code,
|
33 |
+
pre .subst,
|
34 |
+
pre .tag .keyword {
|
35 |
+
color: #3E5915;
|
36 |
+
}
|
37 |
+
|
38 |
+
pre .string,
|
39 |
+
pre .title,
|
40 |
+
pre .haskell .type,
|
41 |
+
pre .tag .value,
|
42 |
+
pre .css .rules .value,
|
43 |
+
pre .preprocessor,
|
44 |
+
pre .pragma,
|
45 |
+
pre .ruby .symbol,
|
46 |
+
pre .ruby .symbol .string,
|
47 |
+
pre .ruby .class .parent,
|
48 |
+
pre .built_in,
|
49 |
+
pre .sql .aggregate,
|
50 |
+
pre .django .template_tag,
|
51 |
+
pre .django .variable,
|
52 |
+
pre .smalltalk .class,
|
53 |
+
pre .javadoc,
|
54 |
+
pre .ruby .string,
|
55 |
+
pre .django .filter .argument,
|
56 |
+
pre .smalltalk .localvars,
|
57 |
+
pre .smalltalk .array,
|
58 |
+
pre .attr_selector,
|
59 |
+
pre .pseudo,
|
60 |
+
pre .addition,
|
61 |
+
pre .stream,
|
62 |
+
pre .envvar,
|
63 |
+
pre .apache .tag,
|
64 |
+
pre .apache .cbracket,
|
65 |
+
pre .nginx .built_in,
|
66 |
+
pre .tex .command,
|
67 |
+
pre .coffeescript .attribute {
|
68 |
+
color: #2C009F;
|
69 |
+
}
|
70 |
+
|
71 |
+
pre .comment,
|
72 |
+
pre .java .annotation,
|
73 |
+
pre .python .decorator,
|
74 |
+
pre .template_comment,
|
75 |
+
pre .pi,
|
76 |
+
pre .doctype,
|
77 |
+
pre .deletion,
|
78 |
+
pre .shebang,
|
79 |
+
pre .apache .sqbracket {
|
80 |
+
color: #E60415;
|
81 |
+
}
|
82 |
+
|
83 |
+
pre .keyword,
|
84 |
+
pre .literal,
|
85 |
+
pre .css .id,
|
86 |
+
pre .phpdoc,
|
87 |
+
pre .title,
|
88 |
+
pre .haskell .type,
|
89 |
+
pre .vbscript .built_in,
|
90 |
+
pre .sql .aggregate,
|
91 |
+
pre .rsl .built_in,
|
92 |
+
pre .smalltalk .class,
|
93 |
+
pre .xml .tag .title,
|
94 |
+
pre .diff .header,
|
95 |
+
pre .chunk,
|
96 |
+
pre .winutils,
|
97 |
+
pre .bash .variable,
|
98 |
+
pre .apache .tag,
|
99 |
+
pre .tex .command,
|
100 |
+
pre .request,
|
101 |
+
pre .status {
|
102 |
+
font-weight: bold;
|
103 |
+
}
|
104 |
+
|
105 |
+
pre .coffeescript .javascript,
|
106 |
+
pre .javascript .xml,
|
107 |
+
pre .tex .formula,
|
108 |
+
pre .xml .javascript,
|
109 |
+
pre .xml .vbscript,
|
110 |
+
pre .xml .css,
|
111 |
+
pre .xml .cdata {
|
112 |
+
opacity: 0.5;
|
113 |
+
}
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
|
3 |
+
Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com>
|
4 |
+
|
5 |
+
*/
|
6 |
+
|
7 |
+
pre code {
|
8 |
+
display: block; padding: 0.5em;
|
9 |
+
background: #002b36; color: #839496;
|
10 |
+
}
|
11 |
+
|
12 |
+
pre .comment,
|
13 |
+
pre .template_comment,
|
14 |
+
pre .diff .header,
|
15 |
+
pre .doctype,
|
16 |
+
pre .pi,
|
17 |
+
pre .lisp .string,
|
18 |
+
pre .javadoc {
|
19 |
+
color: #586e75;
|
20 |
+
font-style: italic;
|
21 |
+
}
|
22 |
+
|
23 |
+
pre .keyword,
|
24 |
+
pre .winutils,
|
25 |
+
pre .method,
|
26 |
+
pre .addition,
|
27 |
+
pre .css .tag,
|
28 |
+
pre .request,
|
29 |
+
pre .status,
|
30 |
+
pre .nginx .title {
|
31 |
+
color: #859900;
|
32 |
+
}
|
33 |
+
|
34 |
+
pre .number,
|
35 |
+
pre .command,
|
36 |
+
pre .string,
|
37 |
+
pre .tag .value,
|
38 |
+
pre .rules .value,
|
39 |
+
pre .phpdoc,
|
40 |
+
pre .tex .formula,
|
41 |
+
pre .regexp,
|
42 |
+
pre .hexcolor {
|
43 |
+
color: #2aa198;
|
44 |
+
}
|
45 |
+
|
46 |
+
pre .title,
|
47 |
+
pre .localvars,
|
48 |
+
pre .chunk,
|
49 |
+
pre .decorator,
|
50 |
+
pre .built_in,
|
51 |
+
pre .identifier,
|
52 |
+
pre .vhdl .literal,
|
53 |
+
pre .id,
|
54 |
+
pre .css .function {
|
55 |
+
color: #268bd2;
|
56 |
+
}
|
57 |
+
|
58 |
+
pre .attribute,
|
59 |
+
pre .variable,
|
60 |
+
pre .lisp .body,
|
61 |
+
pre .smalltalk .number,
|
62 |
+
pre .constant,
|
63 |
+
pre .class .title,
|
64 |
+
pre .parent,
|
65 |
+
pre .haskell .type {
|
66 |
+
color: #b58900;
|
67 |
+
}
|
68 |
+
|
69 |
+
pre .preprocessor,
|
70 |
+
pre .preprocessor .keyword,
|
71 |
+
pre .pragma,
|
72 |
+
pre .shebang,
|
73 |
+
pre .symbol,
|
74 |
+
pre .symbol .string,
|
75 |
+
pre .diff .change,
|
76 |
+
pre .special,
|
77 |
+
pre .attr_selector,
|
78 |
+
pre .important,
|
79 |
+
pre .subst,
|
80 |
+
pre .cdata,
|
81 |
+
pre .clojure .title,
|
82 |
+
pre .css .pseudo {
|
83 |
+
color: #cb4b16;
|
84 |
+
}
|
85 |
+
|
86 |
+
pre .deletion {
|
87 |
+
color: #dc322f;
|
88 |
+
}
|
89 |
+
|
90 |
+
pre .tex .formula {
|
91 |
+
background: #073642;
|
92 |
+
}
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
|
3 |
+
Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com>
|
4 |
+
|
5 |
+
*/
|
6 |
+
|
7 |
+
pre code {
|
8 |
+
display: block; padding: 0.5em;
|
9 |
+
background: #fdf6e3; color: #657b83;
|
10 |
+
}
|
11 |
+
|
12 |
+
pre .comment,
|
13 |
+
pre .template_comment,
|
14 |
+
pre .diff .header,
|
15 |
+
pre .doctype,
|
16 |
+
pre .pi,
|
17 |
+
pre .lisp .string,
|
18 |
+
pre .javadoc {
|
19 |
+
color: #93a1a1;
|
20 |
+
font-style: italic;
|
21 |
+
}
|
22 |
+
|
23 |
+
pre .keyword,
|
24 |
+
pre .winutils,
|
25 |
+
pre .method,
|
26 |
+
pre .addition,
|
27 |
+
pre .css .tag,
|
28 |
+
pre .request,
|
29 |
+
pre .status,
|
30 |
+
pre .nginx .title {
|
31 |
+
color: #859900;
|
32 |
+
}
|
33 |
+
|
34 |
+
pre .number,
|
35 |
+
pre .command,
|
36 |
+
pre .string,
|
37 |
+
pre .tag .value,
|
38 |
+
pre .rules .value,
|
39 |
+
pre .phpdoc,
|
40 |
+
pre .tex .formula,
|
41 |
+
pre .regexp,
|
42 |
+
pre .hexcolor {
|
43 |
+
color: #2aa198;
|
44 |
+
}
|
45 |
+
|
46 |
+
pre .title,
|
47 |
+
pre .localvars,
|
48 |
+
pre .chunk,
|
49 |
+
pre .decorator,
|
50 |
+
pre .built_in,
|
51 |
+
pre .identifier,
|
52 |
+
pre .vhdl .literal,
|
53 |
+
pre .id,
|
54 |
+
pre .css .function {
|
55 |
+
color: #268bd2;
|
56 |
+
}
|
57 |
+
|
58 |
+
pre .attribute,
|
59 |
+
pre .variable,
|
60 |
+
pre .lisp .body,
|
61 |
+
pre .smalltalk .number,
|
62 |
+
pre .constant,
|
63 |
+
pre .class .title,
|
64 |
+
pre .parent,
|
65 |
+
pre .haskell .type {
|
66 |
+
color: #b58900;
|
67 |
+
}
|
68 |
+
|
69 |
+
pre .preprocessor,
|
70 |
+
pre .preprocessor .keyword,
|
71 |
+
pre .pragma,
|
72 |
+
pre .shebang,
|
73 |
+
pre .symbol,
|
74 |
+
pre .symbol .string,
|
75 |
+
pre .diff .change,
|
76 |
+
pre .special,
|
77 |
+
pre .attr_selector,
|
78 |
+
pre .important,
|
79 |
+
pre .subst,
|
80 |
+
pre .cdata,
|
81 |
+
pre .clojure .title,
|
82 |
+
pre .css .pseudo {
|
83 |
+
color: #cb4b16;
|
84 |
+
}
|
85 |
+
|
86 |
+
pre .deletion {
|
87 |
+
color: #dc322f;
|
88 |
+
}
|
89 |
+
|
90 |
+
pre .tex .formula {
|
91 |
+
background: #eee8d5;
|
92 |
+
}
|
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
|
3 |
+
Sunburst-like style (c) Vasily Polovnyov <vast@whiteants.net>
|
4 |
+
|
5 |
+
*/
|
6 |
+
|
7 |
+
pre code {
|
8 |
+
display: block; padding: 0.5em;
|
9 |
+
background: #000; color: #f8f8f8;
|
10 |
+
}
|
11 |
+
|
12 |
+
pre .comment,
|
13 |
+
pre .template_comment,
|
14 |
+
pre .javadoc {
|
15 |
+
color: #aeaeae;
|
16 |
+
font-style: italic;
|
17 |
+
}
|
18 |
+
|
19 |
+
pre .keyword,
|
20 |
+
pre .ruby .function .keyword,
|
21 |
+
pre .request,
|
22 |
+
pre .status,
|
23 |
+
pre .nginx .title {
|
24 |
+
color: #E28964;
|
25 |
+
}
|
26 |
+
|
27 |
+
pre .function .keyword,
|
28 |
+
pre .sub .keyword,
|
29 |
+
pre .method,
|
30 |
+
pre .list .title {
|
31 |
+
color: #99CF50;
|
32 |
+
}
|
33 |
+
|
34 |
+
pre .string,
|
35 |
+
pre .tag .value,
|
36 |
+
pre .cdata,
|
37 |
+
pre .filter .argument,
|
38 |
+
pre .attr_selector,
|
39 |
+
pre .apache .cbracket,
|
40 |
+
pre .date,
|
41 |
+
pre .tex .command,
|
42 |
+
pre .coffeescript .attribute {
|
43 |
+
color: #65B042;
|
44 |
+
}
|
45 |
+
|
46 |
+
pre .subst {
|
47 |
+
color: #DAEFA3;
|
48 |
+
}
|
49 |
+
|
50 |
+
pre .regexp {
|
51 |
+
color: #E9C062;
|
52 |
+
}
|
53 |
+
|
54 |
+
pre .title,
|
55 |
+
pre .sub .identifier,
|
56 |
+
pre .pi,
|
57 |
+
pre .tag,
|
58 |
+
pre .tag .keyword,
|
59 |
+
pre .decorator,
|
60 |
+
pre .shebang,
|
61 |
+
pre .prompt {
|
62 |
+
color: #89BDFF;
|
63 |
+
}
|
64 |
+
|
65 |
+
pre .class .title,
|
66 |
+
pre .haskell .type,
|
67 |
+
pre .smalltalk .class,
|
68 |
+
pre .javadoctag,
|
69 |
+
pre .yardoctag,
|
70 |
+
pre .phpdoc {
|
71 |
+
text-decoration: underline;
|
72 |
+
}
|
73 |
+
|
74 |
+
pre .symbol,
|
75 |
+
pre .ruby .symbol .string,
|
76 |
+
pre .number {
|
77 |
+
color: #3387CC;
|
78 |
+
}
|
79 |
+
|
80 |
+
pre .params,
|
81 |
+
pre .variable,
|
82 |
+
pre .clojure .attribute {
|
83 |
+
color: #3E87E3;
|
84 |
+
}
|
85 |
+
|
86 |
+
pre .css .tag,
|
87 |
+
pre .rules .property,
|
88 |
+
pre .pseudo,
|
89 |
+
pre .tex .special {
|
90 |
+
color: #CDA869;
|
91 |
+
}
|
92 |
+
|
93 |
+
pre .css .class {
|
94 |
+
color: #9B703F;
|
95 |
+
}
|
96 |
+
|
97 |
+
pre .rules .keyword {
|
98 |
+
color: #C5AF75;
|
99 |
+
}
|
100 |
+
|
101 |
+
pre .rules .value {
|
102 |
+
color: #CF6A4C;
|
103 |
+
}
|
104 |
+
|
105 |
+
pre .css .id {
|
106 |
+
color: #8B98AB;
|
107 |
+
}
|
108 |
+
|
109 |
+
pre .annotation,
|
110 |
+
pre .apache .sqbracket,
|
111 |
+
pre .nginx .built_in {
|
112 |
+
color: #9B859D;
|
113 |
+
}
|
114 |
+
|
115 |
+
pre .preprocessor,
|
116 |
+
pre .pragma {
|
117 |
+
color: #8996A8;
|
118 |
+
}
|
119 |
+
|
120 |
+
pre .hexcolor,
|
121 |
+
pre .css .value .number {
|
122 |
+
color: #DD7B3B;
|
123 |
+
}
|
124 |
+
|
125 |
+
pre .css .function {
|
126 |
+
color: #DAD085;
|
127 |
+
}
|
128 |
+
|
129 |
+
pre .diff .header,
|
130 |
+
pre .chunk,
|
131 |
+
pre .tex .formula {
|
132 |
+
background-color: #0E2231;
|
133 |
+
color: #F8F8F8;
|
134 |
+
font-style: italic;
|
135 |
+
}
|
136 |
+
|
137 |
+
pre .diff .change {
|
138 |
+
background-color: #4A410D;
|
139 |
+
color: #F8F8F8;
|
140 |
+
}
|
141 |
+
|
142 |
+
pre .addition {
|
143 |
+
background-color: #253B22;
|
144 |
+
color: #F8F8F8;
|
145 |
+
}
|
146 |
+
|
147 |
+
pre .deletion {
|
148 |
+
background-color: #420E09;
|
149 |
+
color: #F8F8F8;
|
150 |
+
}
|
151 |
+
|
152 |
+
pre .coffeescript .javascript,
|
153 |
+
pre .javascript .xml,
|
154 |
+
pre .tex .formula,
|
155 |
+
pre .xml .javascript,
|
156 |
+
pre .xml .vbscript,
|
157 |
+
pre .xml .css,
|
158 |
+
pre .xml .cdata {
|
159 |
+
opacity: 0.5;
|
160 |
+
}
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Tomorrow Night Blue Theme */
|
2 |
+
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
|
3 |
+
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
|
4 |
+
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
|
5 |
+
.tomorrow-comment, pre .comment, pre .title {
|
6 |
+
color: #7285b7;
|
7 |
+
}
|
8 |
+
|
9 |
+
.tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo {
|
10 |
+
color: #ff9da4;
|
11 |
+
}
|
12 |
+
|
13 |
+
.tomorrow-orange, pre .number, pre .preprocessor, pre .pragma, pre .built_in, pre .literal, pre .params, pre .constant {
|
14 |
+
color: #ffc58f;
|
15 |
+
}
|
16 |
+
|
17 |
+
.tomorrow-yellow, pre .ruby .class .title, pre .css .rules .attribute {
|
18 |
+
color: #ffeead;
|
19 |
+
}
|
20 |
+
|
21 |
+
.tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata {
|
22 |
+
color: #d1f1a9;
|
23 |
+
}
|
24 |
+
|
25 |
+
.tomorrow-aqua, pre .css .hexcolor {
|
26 |
+
color: #99ffff;
|
27 |
+
}
|
28 |
+
|
29 |
+
.tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title {
|
30 |
+
color: #bbdaff;
|
31 |
+
}
|
32 |
+
|
33 |
+
.tomorrow-purple, pre .keyword, pre .javascript .function {
|
34 |
+
color: #ebbbff;
|
35 |
+
}
|
36 |
+
|
37 |
+
pre code {
|
38 |
+
display: block;
|
39 |
+
background: #002451;
|
40 |
+
color: white;
|
41 |
+
padding: 0.5em;
|
42 |
+
}
|
43 |
+
|
44 |
+
pre .coffeescript .javascript,
|
45 |
+
pre .javascript .xml,
|
46 |
+
pre .tex .formula,
|
47 |
+
pre .xml .javascript,
|
48 |
+
pre .xml .vbscript,
|
49 |
+
pre .xml .css,
|
50 |
+
pre .xml .cdata {
|
51 |
+
opacity: 0.5;
|
52 |
+
}
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Tomorrow Night Bright Theme */
|
2 |
+
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
|
3 |
+
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
|
4 |
+
.tomorrow-comment, pre .comment, pre .title {
|
5 |
+
color: #969896;
|
6 |
+
}
|
7 |
+
|
8 |
+
.tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo {
|
9 |
+
color: #d54e53;
|
10 |
+
}
|
11 |
+
|
12 |
+
.tomorrow-orange, pre .number, pre .preprocessor, pre .pragma, pre .built_in, pre .literal, pre .params, pre .constant {
|
13 |
+
color: #e78c45;
|
14 |
+
}
|
15 |
+
|
16 |
+
.tomorrow-yellow, pre .ruby .class .title, pre .css .rules .attribute {
|
17 |
+
color: #e7c547;
|
18 |
+
}
|
19 |
+
|
20 |
+
.tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata {
|
21 |
+
color: #b9ca4a;
|
22 |
+
}
|
23 |
+
|
24 |
+
.tomorrow-aqua, pre .css .hexcolor {
|
25 |
+
color: #70c0b1;
|
26 |
+
}
|
27 |
+
|
28 |
+
.tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title {
|
29 |
+
color: #7aa6da;
|
30 |
+
}
|
31 |
+
|
32 |
+
.tomorrow-purple, pre .keyword, pre .javascript .function {
|
33 |
+
color: #c397d8;
|
34 |
+
}
|
35 |
+
|
36 |
+
pre code {
|
37 |
+
display: block;
|
38 |
+
background: black;
|
39 |
+
color: #eaeaea;
|
40 |
+
padding: 0.5em;
|
41 |
+
}
|
42 |
+
|
43 |
+
pre .coffeescript .javascript,
|
44 |
+
pre .javascript .xml,
|
45 |
+
pre .tex .formula,
|
46 |
+
pre .xml .javascript,
|
47 |
+
pre .xml .vbscript,
|
48 |
+
pre .xml .css,
|
49 |
+
pre .xml .cdata {
|
50 |
+
opacity: 0.5;
|
51 |
+
}
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Tomorrow Night Eighties Theme */
|
2 |
+
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
|
3 |
+
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
|
4 |
+
.tomorrow-comment, pre .comment, pre .title {
|
5 |
+
color: #999999;
|
6 |
+
}
|
7 |
+
|
8 |
+
.tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo {
|
9 |
+
color: #f2777a;
|
10 |
+
}
|
11 |
+
|
12 |
+
.tomorrow-orange, pre .number, pre .preprocessor, pre .pragma, pre .built_in, pre .literal, pre .params, pre .constant {
|
13 |
+
color: #f99157;
|
14 |
+
}
|
15 |
+
|
16 |
+
.tomorrow-yellow, pre .ruby .class .title, pre .css .rules .attribute {
|
17 |
+
color: #ffcc66;
|
18 |
+
}
|
19 |
+
|
20 |
+
.tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata {
|
21 |
+
color: #99cc99;
|
22 |
+
}
|
23 |
+
|
24 |
+
.tomorrow-aqua, pre .css .hexcolor {
|
25 |
+
color: #66cccc;
|
26 |
+
}
|
27 |
+
|
28 |
+
.tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title {
|
29 |
+
color: #6699cc;
|
30 |
+
}
|
31 |
+
|
32 |
+
.tomorrow-purple, pre .keyword, pre .javascript .function {
|
33 |
+
color: #cc99cc;
|
34 |
+
}
|
35 |
+
|
36 |
+
pre code {
|
37 |
+
display: block;
|
38 |
+
background: #2d2d2d;
|
39 |
+
color: #cccccc;
|
40 |
+
padding: 0.5em;
|
41 |
+
}
|
42 |
+
|
43 |
+
pre .coffeescript .javascript,
|
44 |
+
pre .javascript .xml,
|
45 |
+
pre .tex .formula,
|
46 |
+
pre .xml .javascript,
|
47 |
+
pre .xml .vbscript,
|
48 |
+
pre .xml .css,
|
49 |
+
pre .xml .cdata {
|
50 |
+
opacity: 0.5;
|
51 |
+
}
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Tomorrow Night Theme */
|
2 |
+
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
|
3 |
+
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
|
4 |
+
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
|
5 |
+
.tomorrow-comment, pre .comment, pre .title {
|
6 |
+
color: #969896;
|
7 |
+
}
|
8 |
+
|
9 |
+
.tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo {
|
10 |
+
color: #cc6666;
|
11 |
+
}
|
12 |
+
|
13 |
+
.tomorrow-orange, pre .number, pre .preprocessor, pre .pragma, pre .built_in, pre .literal, pre .params, pre .constant {
|
14 |
+
color: #de935f;
|
15 |
+
}
|
16 |
+
|
17 |
+
.tomorrow-yellow, pre .ruby .class .title, pre .css .rules .attribute {
|
18 |
+
color: #f0c674;
|
19 |
+
}
|
20 |
+
|
21 |
+
.tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata {
|
22 |
+
color: #b5bd68;
|
23 |
+
}
|
24 |
+
|
25 |
+
.tomorrow-aqua, pre .css .hexcolor {
|
26 |
+
color: #8abeb7;
|
27 |
+
}
|
28 |
+
|
29 |
+
.tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title {
|
30 |
+
color: #81a2be;
|
31 |
+
}
|
32 |
+
|
33 |
+
.tomorrow-purple, pre .keyword, pre .javascript .function {
|
34 |
+
color: #b294bb;
|
35 |
+
}
|
36 |
+
|
37 |
+
pre code {
|
38 |
+
display: block;
|
39 |
+
background: #1d1f21;
|
40 |
+
color: #c5c8c6;
|
41 |
+
padding: 0.5em;
|
42 |
+
}
|
43 |
+
|
44 |
+
pre .coffeescript .javascript,
|
45 |
+
pre .javascript .xml,
|
46 |
+
pre .tex .formula,
|
47 |
+
pre .xml .javascript,
|
48 |
+
pre .xml .vbscript,
|
49 |
+
pre .xml .css,
|
50 |
+
pre .xml .cdata {
|
51 |
+
opacity: 0.5;
|
52 |
+
}
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
|
2 |
+
.tomorrow-comment, pre .comment, pre .title {
|
3 |
+
color: #8e908c;
|
4 |
+
}
|
5 |
+
|
6 |
+
.tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo {
|
7 |
+
color: #c82829;
|
8 |
+
}
|
9 |
+
|
10 |
+
.tomorrow-orange, pre .number, pre .preprocessor, pre .pragma, pre .built_in, pre .literal, pre .params, pre .constant {
|
11 |
+
color: #f5871f;
|
12 |
+
}
|
13 |
+
|
14 |
+
.tomorrow-yellow, pre .ruby .class .title, pre .css .rules .attribute {
|
15 |
+
color: #eab700;
|
16 |
+
}
|
17 |
+
|
18 |
+
.tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata {
|
19 |
+
color: #718c00;
|
20 |
+
}
|
21 |
+
|
22 |
+
.tomorrow-aqua, pre .css .hexcolor {
|
23 |
+
color: #3e999f;
|
24 |
+
}
|
25 |
+
|
26 |
+
.tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title {
|
27 |
+
color: #4271ae;
|
28 |
+
}
|
29 |
+
|
30 |
+
.tomorrow-purple, pre .keyword, pre .javascript .function {
|
31 |
+
color: #8959a8;
|
32 |
+
}
|
33 |
+
|
34 |
+
pre code {
|
35 |
+
display: block;
|
36 |
+
background: white;
|
37 |
+
color: #4d4d4c;
|
38 |
+
padding: 0.5em;
|
39 |
+
}
|
40 |
+
|
41 |
+
pre .coffeescript .javascript,
|
42 |
+
pre .javascript .xml,
|
43 |
+
pre .tex .formula,
|
44 |
+
pre .xml .javascript,
|
45 |
+
pre .xml .vbscript,
|
46 |
+
pre .xml .css,
|
47 |
+
pre .xml .cdata {
|
48 |
+
opacity: 0.5;
|
49 |
+
}
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
|
3 |
+
Visual Studio-like style based on original C# coloring by Jason Diamond <jason@diamond.name>
|
4 |
+
|
5 |
+
*/
|
6 |
+
pre code {
|
7 |
+
display: block; padding: 0.5em;
|
8 |
+
background: white; color: black;
|
9 |
+
}
|
10 |
+
|
11 |
+
pre .comment,
|
12 |
+
pre .annotation,
|
13 |
+
pre .template_comment,
|
14 |
+
pre .diff .header,
|
15 |
+
pre .chunk,
|
16 |
+
pre .apache .cbracket {
|
17 |
+
color: rgb(0, 128, 0);
|
18 |
+
}
|
19 |
+
|
20 |
+
pre .keyword,
|
21 |
+
pre .id,
|
22 |
+
pre .built_in,
|
23 |
+
pre .smalltalk .class,
|
24 |
+
pre .winutils,
|
25 |
+
pre .bash .variable,
|
26 |
+
pre .tex .command,
|
27 |
+
pre .request,
|
28 |
+
pre .status,
|
29 |
+
pre .nginx .title,
|
30 |
+
pre .xml .tag,
|
31 |
+
pre .xml .tag .value {
|
32 |
+
color: rgb(0, 0, 255);
|
33 |
+
}
|
34 |
+
|
35 |
+
pre .string,
|
36 |
+
pre .title,
|
37 |
+
pre .parent,
|
38 |
+
pre .tag .value,
|
39 |
+
pre .rules .value,
|
40 |
+
pre .rules .value .number,
|
41 |
+
pre .ruby .symbol,
|
42 |
+
pre .ruby .symbol .string,
|
43 |
+
pre .aggregate,
|
44 |
+
pre .template_tag,
|
45 |
+
pre .django .variable,
|
46 |
+
pre .addition,
|
47 |
+
pre .flow,
|
48 |
+
pre .stream,
|
49 |
+
pre .apache .tag,
|
50 |
+
pre .date,
|
51 |
+
pre .tex .formula,
|
52 |
+
pre .coffeescript .attribute {
|
53 |
+
color: rgb(163, 21, 21);
|
54 |
+
}
|
55 |
+
|
56 |
+
pre .ruby .string,
|
57 |
+
pre .decorator,
|
58 |
+
pre .filter .argument,
|
59 |
+
pre .localvars,
|
60 |
+
pre .array,
|
61 |
+
pre .attr_selector,
|
62 |
+
pre .pseudo,
|
63 |
+
pre .pi,
|
64 |
+
pre .doctype,
|
65 |
+
pre .deletion,
|
66 |
+
pre .envvar,
|
67 |
+
pre .shebang,
|
68 |
+
pre .preprocessor,
|
69 |
+
pre .pragma,
|
70 |
+
pre .userType,
|
71 |
+
pre .apache .sqbracket,
|
72 |
+
pre .nginx .built_in,
|
73 |
+
pre .tex .special,
|
74 |
+
pre .prompt {
|
75 |
+
color: rgb(43, 145, 175);
|
76 |
+
}
|
77 |
+
|
78 |
+
pre .phpdoc,
|
79 |
+
pre .javadoc,
|
80 |
+
pre .xmlDocTag {
|
81 |
+
color: rgb(128, 128, 128);
|
82 |
+
}
|
83 |
+
|
84 |
+
pre .vhdl .typename { font-weight: bold; }
|
85 |
+
pre .vhdl .string { color: #666666; }
|
86 |
+
pre .vhdl .literal { color: rgb(163, 21, 21); }
|
87 |
+
pre .vhdl .attribute { color: #00B0E8; }
|
88 |
+
|
89 |
+
pre .xml .attribute { color: rgb(255, 0, 0); }
|
@@ -67,7 +67,9 @@ pre .symbol .string,
|
|
67 |
pre .number,
|
68 |
pre .css .function,
|
69 |
pre .clojure .title,
|
70 |
-
pre .clojure .built_in
|
|
|
|
|
71 |
color: rgb(28,0,207);
|
72 |
}
|
73 |
|
@@ -118,7 +120,8 @@ pre .nginx .built_in {
|
|
118 |
}
|
119 |
|
120 |
pre .preprocessor,
|
121 |
-
pre .preprocessor
|
|
|
122 |
color: rgb(100,56,32);
|
123 |
}
|
124 |
|
67 |
pre .number,
|
68 |
pre .css .function,
|
69 |
pre .clojure .title,
|
70 |
+
pre .clojure .built_in,
|
71 |
+
pre .function .title,
|
72 |
+
pre .coffeescript .attribute {
|
73 |
color: rgb(28,0,207);
|
74 |
}
|
75 |
|
120 |
}
|
121 |
|
122 |
pre .preprocessor,
|
123 |
+
pre .preprocessor *,
|
124 |
+
pre .pragma {
|
125 |
color: rgb(100,56,32);
|
126 |
}
|
127 |
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
|
3 |
+
Zenburn style from voldmar.ru (c) Vladimir Epifanov <voldmar@voldmar.ru>
|
4 |
+
based on dark.css by Ivan Sagalaev
|
5 |
+
|
6 |
+
*/
|
7 |
+
|
8 |
+
pre code {
|
9 |
+
display: block; padding: 0.5em;
|
10 |
+
background: #3F3F3F;
|
11 |
+
color: #DCDCDC;
|
12 |
+
}
|
13 |
+
|
14 |
+
pre .keyword,
|
15 |
+
pre .tag,
|
16 |
+
pre .css .class,
|
17 |
+
pre .css .id,
|
18 |
+
pre .lisp .title,
|
19 |
+
pre .nginx .title,
|
20 |
+
pre .request,
|
21 |
+
pre .status,
|
22 |
+
pre .clojure .attribute {
|
23 |
+
color: #E3CEAB;
|
24 |
+
}
|
25 |
+
|
26 |
+
pre .django .template_tag,
|
27 |
+
pre .django .variable,
|
28 |
+
pre .django .filter .argument {
|
29 |
+
color: #DCDCDC;
|
30 |
+
}
|
31 |
+
|
32 |
+
pre .number,
|
33 |
+
pre .date {
|
34 |
+
color: #8CD0D3;
|
35 |
+
}
|
36 |
+
|
37 |
+
pre .dos .envvar,
|
38 |
+
pre .dos .stream,
|
39 |
+
pre .variable,
|
40 |
+
pre .apache .sqbracket {
|
41 |
+
color: #EFDCBC;
|
42 |
+
}
|
43 |
+
|
44 |
+
pre .dos .flow,
|
45 |
+
pre .diff .change,
|
46 |
+
pre .python .exception,
|
47 |
+
pre .python .built_in,
|
48 |
+
pre .literal,
|
49 |
+
pre .tex .special {
|
50 |
+
color: #EFEFAF;
|
51 |
+
}
|
52 |
+
|
53 |
+
pre .diff .chunk,
|
54 |
+
pre .subst {
|
55 |
+
color: #8F8F8F;
|
56 |
+
}
|
57 |
+
|
58 |
+
pre .dos .keyword,
|
59 |
+
pre .python .decorator,
|
60 |
+
pre .title,
|
61 |
+
pre .haskell .type,
|
62 |
+
pre .diff .header,
|
63 |
+
pre .ruby .class .parent,
|
64 |
+
pre .apache .tag,
|
65 |
+
pre .nginx .built_in,
|
66 |
+
pre .tex .command,
|
67 |
+
pre .prompt {
|
68 |
+
color: #efef8f;
|
69 |
+
}
|
70 |
+
|
71 |
+
pre .dos .winutils,
|
72 |
+
pre .ruby .symbol,
|
73 |
+
pre .ruby .symbol .string,
|
74 |
+
pre .ruby .string {
|
75 |
+
color: #DCA3A3;
|
76 |
+
}
|
77 |
+
|
78 |
+
pre .diff .deletion,
|
79 |
+
pre .string,
|
80 |
+
pre .tag .value,
|
81 |
+
pre .preprocessor,
|
82 |
+
pre .pragma,
|
83 |
+
pre .built_in,
|
84 |
+
pre .sql .aggregate,
|
85 |
+
pre .javadoc,
|
86 |
+
pre .smalltalk .class,
|
87 |
+
pre .smalltalk .localvars,
|
88 |
+
pre .smalltalk .array,
|
89 |
+
pre .css .rules .value,
|
90 |
+
pre .attr_selector,
|
91 |
+
pre .pseudo,
|
92 |
+
pre .apache .cbracket,
|
93 |
+
pre .tex .formula,
|
94 |
+
pre .coffeescript .attribute {
|
95 |
+
color: #CC9393;
|
96 |
+
}
|
97 |
+
|
98 |
+
pre .shebang,
|
99 |
+
pre .diff .addition,
|
100 |
+
pre .comment,
|
101 |
+
pre .java .annotation,
|
102 |
+
pre .template_comment,
|
103 |
+
pre .pi,
|
104 |
+
pre .doctype {
|
105 |
+
color: #7F9F7F;
|
106 |
+
}
|
107 |
+
|
108 |
+
pre .coffeescript .javascript,
|
109 |
+
pre .javascript .xml,
|
110 |
+
pre .tex .formula,
|
111 |
+
pre .xml .javascript,
|
112 |
+
pre .xml .vbscript,
|
113 |
+
pre .xml .css,
|
114 |
+
pre .xml .cdata {
|
115 |
+
opacity: 0.5;
|
116 |
+
}
|
117 |
+
|
@@ -1,6 +1,134 @@
|
|
1 |
/**
|
2 |
Magento Markdown Module CSS
|
3 |
*/
|
4 |
-
.
|
5 |
-
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/**
|
2 |
Magento Markdown Module CSS
|
3 |
*/
|
4 |
+
textarea.initMarkdown {
|
5 |
+
resize : vertical;
|
6 |
+
padding : 5px;
|
7 |
+
display : block;
|
8 |
+
}
|
9 |
+
|
10 |
+
textarea.initMarkdown:focus {
|
11 |
+
border-color : #51a7e8;
|
12 |
+
box-shadow : inset 0 1px 2px rgba(0, 0, 0, 0.075), 0 0 5px rgba(81, 167, 232, 0.5);
|
13 |
+
}
|
14 |
+
|
15 |
+
textarea.initMarkdown.fReaderDrag {
|
16 |
+
box-shadow : #c9ff00 0 0 3px;
|
17 |
+
}
|
18 |
+
|
19 |
+
/*<second design of the textarea>*/
|
20 |
+
textarea.initMarkdown.lucida {
|
21 |
+
color : #666;
|
22 |
+
font-size : 14px;
|
23 |
+
border-radius : 8px;
|
24 |
+
-moz-border-radius : 8px;
|
25 |
+
-webkit-border-radius : 8px;
|
26 |
+
margin : 5px 0px 10px 0px;
|
27 |
+
padding : 10px;
|
28 |
+
border : #999 1px solid;
|
29 |
+
font-family : "Lucida Sans Unicode", "Lucida Grande", sans-serif;
|
30 |
+
transition : all 0.25s ease-in-out;
|
31 |
+
-moz-transition : all 0.25s ease-in-out;
|
32 |
+
-webkit-transition : all 0.25s ease-in-out;
|
33 |
+
box-shadow : 0 0 5px rgba(81, 203, 238, 0);
|
34 |
+
-moz-box-shadow : 0 0 5px rgba(81, 203, 238, 0);
|
35 |
+
-webkit-box-shadow : 0 0 5px rgba(81, 203, 238, 0);
|
36 |
+
resize : vertical;
|
37 |
+
display : block;
|
38 |
+
}
|
39 |
+
|
40 |
+
textarea.initMarkdown.lucida:focus {
|
41 |
+
color : #000;
|
42 |
+
outline : none;
|
43 |
+
border : #35a5e5 1px solid;
|
44 |
+
font-family : "Lucida Sans Unicode", "Lucida Grande", sans-serif;
|
45 |
+
box-shadow : 0 0 5px rgba(81, 203, 238, 1);
|
46 |
+
-moz-box-shadow : 0 0 5px rgba(81, 203, 238, 1);
|
47 |
+
-webkit-box-shadow : 0 0 5px rgba(81, 203, 238, 1);
|
48 |
+
}
|
49 |
+
|
50 |
+
textarea.initMarkdown.lucida.fReaderDrag {
|
51 |
+
color : #000;
|
52 |
+
outline : none;
|
53 |
+
border : #228b22 1px solid;
|
54 |
+
font-family : "Lucida Sans Unicode", "Lucida Grande", sans-serif;
|
55 |
+
box-shadow : 0 0 5px rgb(34, 139, 34) !important;
|
56 |
+
-moz-box-shadow : 0 0 5px rgb(34, 139, 34) !important;
|
57 |
+
-webkit-box-shadow : 0 0 5px rgb(34, 139, 34) !important;
|
58 |
+
}
|
59 |
+
/*</second design of the textarea>*/
|
60 |
+
|
61 |
+
.md-manual-file-chooser {
|
62 |
+
position : absolute;
|
63 |
+
width : 154px;
|
64 |
+
margin-left : -70px;
|
65 |
+
opacity : 0.0001;
|
66 |
+
cursor : pointer;
|
67 |
+
}
|
68 |
+
|
69 |
+
.mdTabContainer {
|
70 |
+
}
|
71 |
+
|
72 |
+
.mdTabContainer .tabs-horiz {
|
73 |
+
margin-bottom : 10px;
|
74 |
+
}
|
75 |
+
|
76 |
+
.mdTabContainer .tabs-horiz li {
|
77 |
+
margin : 0 4px;
|
78 |
+
}
|
79 |
+
|
80 |
+
.mdTabContainer .mdTextArea {
|
81 |
+
margin-top : 10px;
|
82 |
+
margin-bottom : 5px;
|
83 |
+
}
|
84 |
+
|
85 |
+
.md-filereader-text {
|
86 |
+
margin-top : 2px;
|
87 |
+
width : inherit !important;
|
88 |
+
}
|
89 |
+
|
90 |
+
.mdTabscontent {
|
91 |
+
}
|
92 |
+
|
93 |
+
.mdTabpage {
|
94 |
+
display : none;
|
95 |
+
}
|
96 |
+
|
97 |
+
.mdTabpage.active {
|
98 |
+
display : block;
|
99 |
+
}
|
100 |
+
|
101 |
+
.mdTabpage button {
|
102 |
+
margin-right : 5px;
|
103 |
+
}
|
104 |
+
|
105 |
+
.mdTabs > ul > li.active {
|
106 |
+
background : white; /* old browsers */
|
107 |
+
cursor : pointer;
|
108 |
+
color : #333;
|
109 |
+
font-weight : bold;
|
110 |
+
border-bottom-color : rgb(250, 250, 250);
|
111 |
+
}
|
112 |
+
|
113 |
+
.mdTabpage .iframePreview {
|
114 |
+
background-color : white;
|
115 |
+
width : 100%;
|
116 |
+
height : 40em;
|
117 |
+
border : 1px solid #ddd;
|
118 |
+
}
|
119 |
+
|
120 |
+
.mdTabpage .previewStores li {
|
121 |
+
display : inline;
|
122 |
+
padding-right : 1em;
|
123 |
+
}
|
124 |
+
|
125 |
+
.mdParserInfo {
|
126 |
+
float : right;
|
127 |
+
margin-top : 1px;
|
128 |
+
font-size : 11px;
|
129 |
+
margin-right : 6px;
|
130 |
+
}
|
131 |
+
|
132 |
+
.md-parser-info a {
|
133 |
+
cursor : help;
|
134 |
+
}
|
@@ -0,0 +1,389 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*https://gist.github.com/tuzz/3331384*/
|
2 |
+
body {
|
3 |
+
font-family : Helvetica, arial, sans-serif;
|
4 |
+
font-size : 14px;
|
5 |
+
line-height : 1.6;
|
6 |
+
padding-top : 10px;
|
7 |
+
padding-bottom : 10px;
|
8 |
+
background-color : white;
|
9 |
+
padding : 30px;
|
10 |
+
color : #333;
|
11 |
+
}
|
12 |
+
|
13 |
+
body > *:first-child {
|
14 |
+
margin-top : 0 !important;
|
15 |
+
}
|
16 |
+
|
17 |
+
body > *:last-child {
|
18 |
+
margin-bottom : 0 !important;
|
19 |
+
}
|
20 |
+
|
21 |
+
a {
|
22 |
+
color : #4183C4;
|
23 |
+
text-decoration : none;
|
24 |
+
}
|
25 |
+
|
26 |
+
a.absent {
|
27 |
+
color : #cc0000;
|
28 |
+
}
|
29 |
+
|
30 |
+
a.anchor {
|
31 |
+
display : block;
|
32 |
+
padding-left : 30px;
|
33 |
+
margin-left : -30px;
|
34 |
+
cursor : pointer;
|
35 |
+
position : absolute;
|
36 |
+
top : 0;
|
37 |
+
left : 0;
|
38 |
+
bottom : 0;
|
39 |
+
}
|
40 |
+
|
41 |
+
h1, h2, h3, h4, h5, h6 {
|
42 |
+
margin : 20px 0 10px;
|
43 |
+
padding : 0;
|
44 |
+
font-weight : bold;
|
45 |
+
-webkit-font-smoothing : antialiased;
|
46 |
+
cursor : text;
|
47 |
+
position : relative;
|
48 |
+
}
|
49 |
+
|
50 |
+
h2:first-child, h1:first-child, h1:first-child + h2, h3:first-child, h4:first-child, h5:first-child, h6:first-child {
|
51 |
+
margin-top : 0;
|
52 |
+
padding-top : 0;
|
53 |
+
}
|
54 |
+
|
55 |
+
h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor {
|
56 |
+
text-decoration : none;
|
57 |
+
}
|
58 |
+
|
59 |
+
h1 tt, h1 code {
|
60 |
+
font-size : inherit;
|
61 |
+
}
|
62 |
+
|
63 |
+
h2 tt, h2 code {
|
64 |
+
font-size : inherit;
|
65 |
+
}
|
66 |
+
|
67 |
+
h3 tt, h3 code {
|
68 |
+
font-size : inherit;
|
69 |
+
}
|
70 |
+
|
71 |
+
h4 tt, h4 code {
|
72 |
+
font-size : inherit;
|
73 |
+
}
|
74 |
+
|
75 |
+
h5 tt, h5 code {
|
76 |
+
font-size : inherit;
|
77 |
+
}
|
78 |
+
|
79 |
+
h6 tt, h6 code {
|
80 |
+
font-size : inherit;
|
81 |
+
}
|
82 |
+
|
83 |
+
h1 {
|
84 |
+
font-size : 28px;
|
85 |
+
color : black;
|
86 |
+
}
|
87 |
+
|
88 |
+
h2 {
|
89 |
+
font-size : 24px;
|
90 |
+
border-bottom : 1px solid #cccccc;
|
91 |
+
color : black;
|
92 |
+
}
|
93 |
+
|
94 |
+
h3 {
|
95 |
+
font-size : 18px;
|
96 |
+
}
|
97 |
+
|
98 |
+
h4 {
|
99 |
+
font-size : 16px;
|
100 |
+
}
|
101 |
+
|
102 |
+
h5 {
|
103 |
+
font-size : 14px;
|
104 |
+
}
|
105 |
+
|
106 |
+
h6 {
|
107 |
+
color : #777777;
|
108 |
+
font-size : 14px;
|
109 |
+
}
|
110 |
+
|
111 |
+
p, blockquote, ul, ol, dl, li, table, pre {
|
112 |
+
margin : 15px 0;
|
113 |
+
}
|
114 |
+
|
115 |
+
hr {
|
116 |
+
/*background : transparent url("http://tinyurl.com/bq5kskr") repeat-x 0 0;*/
|
117 |
+
border : 0 none;
|
118 |
+
color : #cccccc;
|
119 |
+
height : 4px;
|
120 |
+
padding : 0;
|
121 |
+
}
|
122 |
+
|
123 |
+
body > h2:first-child {
|
124 |
+
margin-top : 0;
|
125 |
+
padding-top : 0;
|
126 |
+
}
|
127 |
+
|
128 |
+
body > h1:first-child {
|
129 |
+
margin-top : 0;
|
130 |
+
padding-top : 0;
|
131 |
+
}
|
132 |
+
|
133 |
+
body > h1:first-child + h2 {
|
134 |
+
margin-top : 0;
|
135 |
+
padding-top : 0;
|
136 |
+
}
|
137 |
+
|
138 |
+
body > h3:first-child, body > h4:first-child, body > h5:first-child, body > h6:first-child {
|
139 |
+
margin-top : 0;
|
140 |
+
padding-top : 0;
|
141 |
+
}
|
142 |
+
|
143 |
+
a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
|
144 |
+
margin-top : 0;
|
145 |
+
padding-top : 0;
|
146 |
+
}
|
147 |
+
|
148 |
+
h1 p, h2 p, h3 p, h4 p, h5 p, h6 p {
|
149 |
+
margin-top : 0;
|
150 |
+
}
|
151 |
+
|
152 |
+
li p.first {
|
153 |
+
display : inline-block;
|
154 |
+
}
|
155 |
+
|
156 |
+
ul, ol {
|
157 |
+
padding-left : 30px;
|
158 |
+
}
|
159 |
+
|
160 |
+
ul :first-child, ol :first-child {
|
161 |
+
margin-top : 0;
|
162 |
+
}
|
163 |
+
|
164 |
+
ul :last-child, ol :last-child {
|
165 |
+
margin-bottom : 0;
|
166 |
+
}
|
167 |
+
|
168 |
+
dl {
|
169 |
+
padding : 0;
|
170 |
+
}
|
171 |
+
|
172 |
+
dl dt {
|
173 |
+
font-size : 14px;
|
174 |
+
font-weight : bold;
|
175 |
+
font-style : italic;
|
176 |
+
padding : 0;
|
177 |
+
margin : 15px 0 5px;
|
178 |
+
}
|
179 |
+
|
180 |
+
dl dt:first-child {
|
181 |
+
padding : 0;
|
182 |
+
}
|
183 |
+
|
184 |
+
dl dt > :first-child {
|
185 |
+
margin-top : 0;
|
186 |
+
}
|
187 |
+
|
188 |
+
dl dt > :last-child {
|
189 |
+
margin-bottom : 0;
|
190 |
+
}
|
191 |
+
|
192 |
+
dl dd {
|
193 |
+
margin : 0 0 15px;
|
194 |
+
padding : 0 15px;
|
195 |
+
}
|
196 |
+
|
197 |
+
dl dd > :first-child {
|
198 |
+
margin-top : 0;
|
199 |
+
}
|
200 |
+
|
201 |
+
dl dd > :last-child {
|
202 |
+
margin-bottom : 0;
|
203 |
+
}
|
204 |
+
|
205 |
+
blockquote {
|
206 |
+
border-left : 4px solid #dddddd;
|
207 |
+
padding : 0 15px;
|
208 |
+
color : #777777;
|
209 |
+
}
|
210 |
+
|
211 |
+
blockquote > :first-child {
|
212 |
+
margin-top : 0;
|
213 |
+
}
|
214 |
+
|
215 |
+
blockquote > :last-child {
|
216 |
+
margin-bottom : 0;
|
217 |
+
}
|
218 |
+
|
219 |
+
table {
|
220 |
+
padding : 0;
|
221 |
+
}
|
222 |
+
|
223 |
+
table tr {
|
224 |
+
border-top : 1px solid #cccccc;
|
225 |
+
background-color : white;
|
226 |
+
margin : 0;
|
227 |
+
padding : 0;
|
228 |
+
}
|
229 |
+
|
230 |
+
table tr:nth-child(2n) {
|
231 |
+
background-color : #f8f8f8;
|
232 |
+
}
|
233 |
+
|
234 |
+
table tr th {
|
235 |
+
font-weight : bold;
|
236 |
+
border : 1px solid #cccccc;
|
237 |
+
text-align : left;
|
238 |
+
margin : 0;
|
239 |
+
padding : 6px 13px;
|
240 |
+
}
|
241 |
+
|
242 |
+
table tr td {
|
243 |
+
border : 1px solid #cccccc;
|
244 |
+
text-align : left;
|
245 |
+
margin : 0;
|
246 |
+
padding : 6px 13px;
|
247 |
+
}
|
248 |
+
|
249 |
+
table tr th :first-child, table tr td :first-child {
|
250 |
+
margin-top : 0;
|
251 |
+
}
|
252 |
+
|
253 |
+
table tr th :last-child, table tr td :last-child {
|
254 |
+
margin-bottom : 0;
|
255 |
+
}
|
256 |
+
|
257 |
+
img {
|
258 |
+
max-width : 100%;
|
259 |
+
}
|
260 |
+
|
261 |
+
span.frame {
|
262 |
+
display : block;
|
263 |
+
overflow : hidden;
|
264 |
+
}
|
265 |
+
|
266 |
+
span.frame > span {
|
267 |
+
border : 1px solid #dddddd;
|
268 |
+
display : block;
|
269 |
+
float : left;
|
270 |
+
overflow : hidden;
|
271 |
+
margin : 13px 0 0;
|
272 |
+
padding : 7px;
|
273 |
+
width : auto;
|
274 |
+
}
|
275 |
+
|
276 |
+
span.frame span img {
|
277 |
+
display : block;
|
278 |
+
float : left;
|
279 |
+
}
|
280 |
+
|
281 |
+
span.frame span span {
|
282 |
+
clear : both;
|
283 |
+
color : #333333;
|
284 |
+
display : block;
|
285 |
+
padding : 5px 0 0;
|
286 |
+
}
|
287 |
+
|
288 |
+
span.align-center {
|
289 |
+
display : block;
|
290 |
+
overflow : hidden;
|
291 |
+
clear : both;
|
292 |
+
}
|
293 |
+
|
294 |
+
span.align-center > span {
|
295 |
+
display : block;
|
296 |
+
overflow : hidden;
|
297 |
+
margin : 13px auto 0;
|
298 |
+
text-align : center;
|
299 |
+
}
|
300 |
+
|
301 |
+
span.align-center span img {
|
302 |
+
margin : 0 auto;
|
303 |
+
text-align : center;
|
304 |
+
}
|
305 |
+
|
306 |
+
span.align-right {
|
307 |
+
display : block;
|
308 |
+
overflow : hidden;
|
309 |
+
clear : both;
|
310 |
+
}
|
311 |
+
|
312 |
+
span.align-right > span {
|
313 |
+
display : block;
|
314 |
+
overflow : hidden;
|
315 |
+
margin : 13px 0 0;
|
316 |
+
text-align : right;
|
317 |
+
}
|
318 |
+
|
319 |
+
span.align-right span img {
|
320 |
+
margin : 0;
|
321 |
+
text-align : right;
|
322 |
+
}
|
323 |
+
|
324 |
+
span.float-left {
|
325 |
+
display : block;
|
326 |
+
margin-right : 13px;
|
327 |
+
overflow : hidden;
|
328 |
+
float : left;
|
329 |
+
}
|
330 |
+
|
331 |
+
span.float-left span {
|
332 |
+
margin : 13px 0 0;
|
333 |
+
}
|
334 |
+
|
335 |
+
span.float-right {
|
336 |
+
display : block;
|
337 |
+
margin-left : 13px;
|
338 |
+
overflow : hidden;
|
339 |
+
float : right;
|
340 |
+
}
|
341 |
+
|
342 |
+
span.float-right > span {
|
343 |
+
display : block;
|
344 |
+
overflow : hidden;
|
345 |
+
margin : 13px auto 0;
|
346 |
+
text-align : right;
|
347 |
+
}
|
348 |
+
|
349 |
+
code, tt {
|
350 |
+
margin : 0 2px;
|
351 |
+
padding : 0 5px;
|
352 |
+
white-space : nowrap;
|
353 |
+
border : 1px solid #eaeaea;
|
354 |
+
background-color : #f8f8f8;
|
355 |
+
border-radius : 3px;
|
356 |
+
}
|
357 |
+
|
358 |
+
pre code {
|
359 |
+
margin : 0;
|
360 |
+
padding : 0;
|
361 |
+
white-space : pre;
|
362 |
+
border : none;
|
363 |
+
background : transparent;
|
364 |
+
}
|
365 |
+
|
366 |
+
.highlight pre {
|
367 |
+
background-color : #f8f8f8;
|
368 |
+
border : 1px solid #cccccc;
|
369 |
+
font-size : 13px;
|
370 |
+
line-height : 19px;
|
371 |
+
overflow : auto;
|
372 |
+
padding : 6px 10px;
|
373 |
+
border-radius : 3px;
|
374 |
+
}
|
375 |
+
|
376 |
+
pre {
|
377 |
+
background-color : #f8f8f8;
|
378 |
+
border : 1px solid #cccccc;
|
379 |
+
font-size : 13px;
|
380 |
+
line-height : 19px;
|
381 |
+
overflow : auto;
|
382 |
+
padding : 6px 10px;
|
383 |
+
border-radius : 3px;
|
384 |
+
}
|
385 |
+
|
386 |
+
pre code, pre tt {
|
387 |
+
background-color : transparent;
|
388 |
+
border : none;
|
389 |
+
}
|
@@ -0,0 +1,258 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
body{
|
2 |
+
background: #000;
|
3 |
+
font-family: Georgia, Palatino, serif;
|
4 |
+
color: #EEE;
|
5 |
+
line-height: 1;
|
6 |
+
padding: 30px;
|
7 |
+
margin:auto;
|
8 |
+
max-width:42em;
|
9 |
+
}
|
10 |
+
h1, h2, h3, h4 {
|
11 |
+
font-weight: 400;
|
12 |
+
}
|
13 |
+
h1, h2, h3, h4, h5, p {
|
14 |
+
margin-bottom: 24px;
|
15 |
+
padding: 0;
|
16 |
+
}
|
17 |
+
h1 {
|
18 |
+
font-size: 48px;
|
19 |
+
}
|
20 |
+
h2 {
|
21 |
+
font-size: 36px;
|
22 |
+
margin: 24px 0 6px;
|
23 |
+
}
|
24 |
+
h3 {
|
25 |
+
font-size: 24px;
|
26 |
+
}
|
27 |
+
h4 {
|
28 |
+
font-size: 21px;
|
29 |
+
}
|
30 |
+
h5 {
|
31 |
+
font-size: 18px;
|
32 |
+
}
|
33 |
+
a {
|
34 |
+
color: #61BFC1;
|
35 |
+
margin: 0;
|
36 |
+
padding: 0;
|
37 |
+
text-decoration: none;
|
38 |
+
vertical-align: baseline;
|
39 |
+
}
|
40 |
+
a:hover {
|
41 |
+
text-decoration: underline;
|
42 |
+
}
|
43 |
+
a:visited {
|
44 |
+
color: #466B6C;
|
45 |
+
}
|
46 |
+
ul, ol {
|
47 |
+
padding: 0;
|
48 |
+
margin: 0;
|
49 |
+
}
|
50 |
+
li {
|
51 |
+
line-height: 24px;
|
52 |
+
}
|
53 |
+
li ul, li ul {
|
54 |
+
margin-left: 24px;
|
55 |
+
}
|
56 |
+
p, ul, ol {
|
57 |
+
font-size: 16px;
|
58 |
+
line-height: 24px;
|
59 |
+
max-width: 540px;
|
60 |
+
}
|
61 |
+
pre {
|
62 |
+
padding: 0px 24px;
|
63 |
+
max-width: 800px;
|
64 |
+
white-space: pre-wrap;
|
65 |
+
}
|
66 |
+
code {
|
67 |
+
font-family: Consolas, Monaco, Andale Mono, monospace;
|
68 |
+
line-height: 1.5;
|
69 |
+
font-size: 13px;
|
70 |
+
}
|
71 |
+
aside {
|
72 |
+
display: block;
|
73 |
+
float: right;
|
74 |
+
width: 390px;
|
75 |
+
}
|
76 |
+
blockquote {
|
77 |
+
border-left:.5em solid #eee;
|
78 |
+
padding: 0 2em;
|
79 |
+
margin-left:0;
|
80 |
+
max-width: 476px;
|
81 |
+
}
|
82 |
+
blockquote cite {
|
83 |
+
font-size:14px;
|
84 |
+
line-height:20px;
|
85 |
+
color:#bfbfbf;
|
86 |
+
}
|
87 |
+
blockquote cite:before {
|
88 |
+
content: '\2014 \00A0';
|
89 |
+
}
|
90 |
+
|
91 |
+
blockquote p {
|
92 |
+
color: #666;
|
93 |
+
max-width: 460px;
|
94 |
+
}
|
95 |
+
hr {
|
96 |
+
width: 540px;
|
97 |
+
text-align: left;
|
98 |
+
margin: 0 auto 0 0;
|
99 |
+
color: #999;
|
100 |
+
}
|
101 |
+
|
102 |
+
/* Code below this line is copyright Twitter Inc. */
|
103 |
+
|
104 |
+
button,
|
105 |
+
input,
|
106 |
+
select,
|
107 |
+
textarea {
|
108 |
+
font-size: 100%;
|
109 |
+
margin: 0;
|
110 |
+
vertical-align: baseline;
|
111 |
+
*vertical-align: middle;
|
112 |
+
}
|
113 |
+
button, input {
|
114 |
+
line-height: normal;
|
115 |
+
*overflow: visible;
|
116 |
+
}
|
117 |
+
button::-moz-focus-inner, input::-moz-focus-inner {
|
118 |
+
border: 0;
|
119 |
+
padding: 0;
|
120 |
+
}
|
121 |
+
button,
|
122 |
+
input[type="button"],
|
123 |
+
input[type="reset"],
|
124 |
+
input[type="submit"] {
|
125 |
+
cursor: pointer;
|
126 |
+
-webkit-appearance: button;
|
127 |
+
}
|
128 |
+
input[type=checkbox], input[type=radio] {
|
129 |
+
cursor: pointer;
|
130 |
+
}
|
131 |
+
/* override default chrome & firefox settings */
|
132 |
+
input:not([type="image"]), textarea {
|
133 |
+
-webkit-box-sizing: content-box;
|
134 |
+
-moz-box-sizing: content-box;
|
135 |
+
box-sizing: content-box;
|
136 |
+
}
|
137 |
+
|
138 |
+
input[type="search"] {
|
139 |
+
-webkit-appearance: textfield;
|
140 |
+
-webkit-box-sizing: content-box;
|
141 |
+
-moz-box-sizing: content-box;
|
142 |
+
box-sizing: content-box;
|
143 |
+
}
|
144 |
+
input[type="search"]::-webkit-search-decoration {
|
145 |
+
-webkit-appearance: none;
|
146 |
+
}
|
147 |
+
label,
|
148 |
+
input,
|
149 |
+
select,
|
150 |
+
textarea {
|
151 |
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
152 |
+
font-size: 13px;
|
153 |
+
font-weight: normal;
|
154 |
+
line-height: normal;
|
155 |
+
margin-bottom: 18px;
|
156 |
+
}
|
157 |
+
input[type=checkbox], input[type=radio] {
|
158 |
+
cursor: pointer;
|
159 |
+
margin-bottom: 0;
|
160 |
+
}
|
161 |
+
input[type=text],
|
162 |
+
input[type=password],
|
163 |
+
textarea,
|
164 |
+
select {
|
165 |
+
display: inline-block;
|
166 |
+
width: 210px;
|
167 |
+
padding: 4px;
|
168 |
+
font-size: 13px;
|
169 |
+
font-weight: normal;
|
170 |
+
line-height: 18px;
|
171 |
+
height: 18px;
|
172 |
+
color: #808080;
|
173 |
+
border: 1px solid #ccc;
|
174 |
+
-webkit-border-radius: 3px;
|
175 |
+
-moz-border-radius: 3px;
|
176 |
+
border-radius: 3px;
|
177 |
+
}
|
178 |
+
select, input[type=file] {
|
179 |
+
height: 27px;
|
180 |
+
line-height: 27px;
|
181 |
+
}
|
182 |
+
textarea {
|
183 |
+
height: auto;
|
184 |
+
}
|
185 |
+
|
186 |
+
/* grey out placeholders */
|
187 |
+
:-moz-placeholder {
|
188 |
+
color: #bfbfbf;
|
189 |
+
}
|
190 |
+
::-webkit-input-placeholder {
|
191 |
+
color: #bfbfbf;
|
192 |
+
}
|
193 |
+
|
194 |
+
input[type=text],
|
195 |
+
input[type=password],
|
196 |
+
select,
|
197 |
+
textarea {
|
198 |
+
-webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
|
199 |
+
-moz-transition: border linear 0.2s, box-shadow linear 0.2s;
|
200 |
+
transition: border linear 0.2s, box-shadow linear 0.2s;
|
201 |
+
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
|
202 |
+
-moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
|
203 |
+
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
|
204 |
+
}
|
205 |
+
input[type=text]:focus, input[type=password]:focus, textarea:focus {
|
206 |
+
outline: none;
|
207 |
+
border-color: rgba(82, 168, 236, 0.8);
|
208 |
+
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
|
209 |
+
-moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
|
210 |
+
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
|
211 |
+
}
|
212 |
+
|
213 |
+
/* buttons */
|
214 |
+
button {
|
215 |
+
display: inline-block;
|
216 |
+
padding: 4px 14px;
|
217 |
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
218 |
+
font-size: 13px;
|
219 |
+
line-height: 18px;
|
220 |
+
-webkit-border-radius: 4px;
|
221 |
+
-moz-border-radius: 4px;
|
222 |
+
border-radius: 4px;
|
223 |
+
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
224 |
+
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
225 |
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
226 |
+
background-color: #0064cd;
|
227 |
+
background-repeat: repeat-x;
|
228 |
+
background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
|
229 |
+
background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
|
230 |
+
background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
|
231 |
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
|
232 |
+
background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
|
233 |
+
background-image: -o-linear-gradient(top, #049cdb, #0064cd);
|
234 |
+
background-image: linear-gradient(top, #049cdb, #0064cd);
|
235 |
+
color: #fff;
|
236 |
+
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
237 |
+
border: 1px solid #004b9a;
|
238 |
+
border-bottom-color: #003f81;
|
239 |
+
-webkit-transition: 0.1s linear all;
|
240 |
+
-moz-transition: 0.1s linear all;
|
241 |
+
transition: 0.1s linear all;
|
242 |
+
border-color: #0064cd #0064cd #003f81;
|
243 |
+
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
244 |
+
}
|
245 |
+
button:hover {
|
246 |
+
color: #fff;
|
247 |
+
background-position: 0 -15px;
|
248 |
+
text-decoration: none;
|
249 |
+
}
|
250 |
+
button:active {
|
251 |
+
-webkit-box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
|
252 |
+
-moz-box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
|
253 |
+
box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
|
254 |
+
}
|
255 |
+
button::-moz-focus-inner {
|
256 |
+
padding: 0;
|
257 |
+
border: 0;
|
258 |
+
}
|
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@import url(//fonts.googleapis.com/css?family=Vollkorn:400,400italic,700,700italic&subset=latin);
|
2 |
+
|
3 |
+
html, body {
|
4 |
+
padding:1em;
|
5 |
+
margin:auto;
|
6 |
+
max-width:42em;
|
7 |
+
background:#fefefe;
|
8 |
+
}
|
9 |
+
body {
|
10 |
+
font: 1.3em "Vollkorn", Palatino, Times;
|
11 |
+
color: #333;
|
12 |
+
line-height: 1.4;
|
13 |
+
text-align: justify;
|
14 |
+
}
|
15 |
+
header, nav, article, footer {
|
16 |
+
width: 700px;
|
17 |
+
margin:0 auto;
|
18 |
+
}
|
19 |
+
article {
|
20 |
+
margin-top: 4em;
|
21 |
+
margin-bottom: 4em;
|
22 |
+
min-height: 400px;
|
23 |
+
}
|
24 |
+
footer {
|
25 |
+
margin-bottom:50px;
|
26 |
+
}
|
27 |
+
video {
|
28 |
+
margin: 2em 0;
|
29 |
+
border:1px solid #ddd;
|
30 |
+
}
|
31 |
+
|
32 |
+
nav {
|
33 |
+
font-size: .9em;
|
34 |
+
font-style: italic;
|
35 |
+
border-bottom: 1px solid #ddd;
|
36 |
+
padding: 1em 0;
|
37 |
+
}
|
38 |
+
nav p {
|
39 |
+
margin: 0;
|
40 |
+
}
|
41 |
+
|
42 |
+
/* Typography
|
43 |
+
-------------------------------------------------------- */
|
44 |
+
|
45 |
+
h1 {
|
46 |
+
margin-top: 0;
|
47 |
+
font-weight: normal;
|
48 |
+
}
|
49 |
+
h2 {
|
50 |
+
font-weight: normal;
|
51 |
+
}
|
52 |
+
h3 {
|
53 |
+
font-weight: normal;
|
54 |
+
font-style: italic;
|
55 |
+
margin-top:3em;
|
56 |
+
}
|
57 |
+
p {
|
58 |
+
margin-top:0;
|
59 |
+
-webkit-hypens:auto;
|
60 |
+
-moz-hypens:auto;
|
61 |
+
hyphens:auto;
|
62 |
+
}
|
63 |
+
ul {
|
64 |
+
list-style: square;
|
65 |
+
padding-left:1.2em;
|
66 |
+
}
|
67 |
+
ol {
|
68 |
+
padding-left:1.2em;
|
69 |
+
}
|
70 |
+
blockquote {
|
71 |
+
margin-left: 1em;
|
72 |
+
padding-left: 1em;
|
73 |
+
border-left: 1px solid #ddd;
|
74 |
+
}
|
75 |
+
code {
|
76 |
+
font-family: "Consolas", "Menlo", "Monaco", monospace, serif;
|
77 |
+
font-size: .9em;
|
78 |
+
background: white;
|
79 |
+
}
|
80 |
+
a {
|
81 |
+
color: #2484c1;
|
82 |
+
text-decoration: none;
|
83 |
+
}
|
84 |
+
a:hover {
|
85 |
+
text-decoration: underline;
|
86 |
+
}
|
87 |
+
a img {
|
88 |
+
border:none;
|
89 |
+
}
|
90 |
+
h1 a, h1 a:hover {
|
91 |
+
color: #333;
|
92 |
+
text-decoration: none;
|
93 |
+
}
|
94 |
+
hr {
|
95 |
+
color : #ddd;
|
96 |
+
height : 1px;
|
97 |
+
margin: 2em 0;
|
98 |
+
border-top : solid 1px #ddd;
|
99 |
+
border-bottom : none;
|
100 |
+
border-left: 0;
|
101 |
+
border-right: 0;
|
102 |
+
}
|
103 |
+
p#heart{
|
104 |
+
font-size: 2em;
|
105 |
+
line-height: 1;
|
106 |
+
text-align: center;
|
107 |
+
color: #ccc;
|
108 |
+
}
|
109 |
+
.red {
|
110 |
+
color:#B50000;
|
111 |
+
}
|
112 |
+
|
113 |
+
/* Home Page
|
114 |
+
--------------------------- */
|
115 |
+
|
116 |
+
body#index li {
|
117 |
+
margin-bottom: 1em;
|
118 |
+
}
|
119 |
+
|
120 |
+
|
121 |
+
/* iPad
|
122 |
+
-------------------------------------------------------- */
|
123 |
+
@media only screen and (max-device-width: 1024px) {
|
124 |
+
body {
|
125 |
+
font-size: 120%;
|
126 |
+
line-height: 1.4;
|
127 |
+
}
|
128 |
+
} /* @iPad */
|
129 |
+
|
130 |
+
/* iPhone
|
131 |
+
-------------------------------------------------------- */
|
132 |
+
@media only screen and (max-device-width: 480px) {
|
133 |
+
body {
|
134 |
+
text-align: left;
|
135 |
+
}
|
136 |
+
article, footer {
|
137 |
+
width: auto;
|
138 |
+
}
|
139 |
+
article {
|
140 |
+
padding: 0 10px;
|
141 |
+
}
|
142 |
+
} /* @iPhone */
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
|
2 |
+
|
3 |
+
body{
|
4 |
+
color:#444;
|
5 |
+
font-family:Georgia, Palatino, 'Palatino Linotype', Times, 'Times New Roman', serif;
|
6 |
+
font-size:12px;
|
7 |
+
line-height:1.5em;
|
8 |
+
padding:1em;
|
9 |
+
margin:auto;
|
10 |
+
max-width:42em;
|
11 |
+
background:#fefefe;
|
12 |
+
}
|
13 |
+
|
14 |
+
a{ color: #0645ad; text-decoration:none;}
|
15 |
+
a:visited{ color: #0b0080; }
|
16 |
+
a:hover{ color: #06e; }
|
17 |
+
a:active{ color:#faa700; }
|
18 |
+
a:focus{ outline: thin dotted; }
|
19 |
+
a:hover, a:active{ outline: 0; }
|
20 |
+
|
21 |
+
::-moz-selection{background:rgba(255,255,0,0.3);color:#000}
|
22 |
+
::selection{background:rgba(255,255,0,0.3);color:#000}
|
23 |
+
|
24 |
+
a::-moz-selection{background:rgba(255,255,0,0.3);color:#0645ad}
|
25 |
+
a::selection{background:rgba(255,255,0,0.3);color:#0645ad}
|
26 |
+
|
27 |
+
p{
|
28 |
+
margin:1em 0;
|
29 |
+
}
|
30 |
+
|
31 |
+
img{
|
32 |
+
max-width:100%;
|
33 |
+
}
|
34 |
+
|
35 |
+
h1,h2,h3,h4,h5,h6{
|
36 |
+
font-weight:normal;
|
37 |
+
color:#111;
|
38 |
+
line-height:1em;
|
39 |
+
}
|
40 |
+
h4,h5,h6{ font-weight: bold; }
|
41 |
+
h1{ font-size:2.5em; }
|
42 |
+
h2{ font-size:2em; }
|
43 |
+
h3{ font-size:1.5em; }
|
44 |
+
h4{ font-size:1.2em; }
|
45 |
+
h5{ font-size:1em; }
|
46 |
+
h6{ font-size:0.9em; }
|
47 |
+
|
48 |
+
blockquote{
|
49 |
+
color:#666666;
|
50 |
+
margin:0;
|
51 |
+
padding-left: 3em;
|
52 |
+
border-left: 0.5em #EEE solid;
|
53 |
+
}
|
54 |
+
hr { display: block; height: 2px; border: 0; border-top: 1px solid #aaa;border-bottom: 1px solid #eee; margin: 1em 0; padding: 0; }
|
55 |
+
pre, code, kbd, samp { color: #000; font-family: monospace, monospace; _font-family: 'courier new', monospace; font-size: 0.98em; }
|
56 |
+
pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; }
|
57 |
+
|
58 |
+
b, strong { font-weight: bold; }
|
59 |
+
|
60 |
+
dfn { font-style: italic; }
|
61 |
+
|
62 |
+
ins { background: #ff9; color: #000; text-decoration: none; }
|
63 |
+
|
64 |
+
mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }
|
65 |
+
|
66 |
+
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
|
67 |
+
sup { top: -0.5em; }
|
68 |
+
sub { bottom: -0.25em; }
|
69 |
+
|
70 |
+
ul, ol { margin: 1em 0; padding: 0 0 0 2em; }
|
71 |
+
li p:last-child { margin:0 }
|
72 |
+
dd { margin: 0 0 0 2em; }
|
73 |
+
|
74 |
+
img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; }
|
75 |
+
|
76 |
+
table { border-collapse: collapse; border-spacing: 0; }
|
77 |
+
td { vertical-align: top; }
|
78 |
+
|
79 |
+
@media only screen and (min-width: 480px) {
|
80 |
+
body{font-size:14px;}
|
81 |
+
}
|
82 |
+
|
83 |
+
@media only screen and (min-width: 768px) {
|
84 |
+
body{font-size:16px;}
|
85 |
+
}
|
86 |
+
|
87 |
+
@media print {
|
88 |
+
* { background: transparent !important; color: black !important; filter:none !important; -ms-filter: none !important; }
|
89 |
+
body{font-size:12pt; max-width:100%;}
|
90 |
+
a, a:visited { text-decoration: underline; }
|
91 |
+
hr { height: 1px; border:0; border-bottom:1px solid black; }
|
92 |
+
a[href]:after { content: " (" attr(href) ")"; }
|
93 |
+
abbr[title]:after { content: " (" attr(title) ")"; }
|
94 |
+
.ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }
|
95 |
+
pre, blockquote { border: 1px solid #999; padding-right: 1em; page-break-inside: avoid; }
|
96 |
+
tr, img { page-break-inside: avoid; }
|
97 |
+
img { max-width: 100% !important; }
|
98 |
+
@page :left { margin: 15mm 20mm 15mm 10mm; }
|
99 |
+
@page :right { margin: 15mm 10mm 15mm 20mm; }
|
100 |
+
p, h2, h3 { orphans: 3; widows: 3; }
|
101 |
+
h2, h3 { page-break-after: avoid; }
|
102 |
+
}
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@charset "utf-8";
|
2 |
+
|
3 |
+
/**
|
4 |
+
* markdown.css
|
5 |
+
*
|
6 |
+
* This program is free software: you can redistribute it and/or modify it under
|
7 |
+
* the terms of the GNU Lesser General Public License as published by the Free
|
8 |
+
* Software Foundation, either version 3 of the License, or (at your option) any
|
9 |
+
* later version.
|
10 |
+
*
|
11 |
+
* This program is distributed in the hope that it will be useful, but WITHOUT
|
12 |
+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
13 |
+
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
14 |
+
* details.
|
15 |
+
*
|
16 |
+
* You should have received a copy of the GNU Lesser General Public License
|
17 |
+
* along with this program. If not, see http://gnu.org/licenses/lgpl.txt.
|
18 |
+
*
|
19 |
+
* @project Weblog and Open Source Projects of Florian Wolters
|
20 |
+
* @version GIT: $Id$
|
21 |
+
* @package xhtml-css
|
22 |
+
* @author Florian Wolters <florian.wolters.85@googlemail.com>
|
23 |
+
* @copyright 2012 Florian Wolters
|
24 |
+
* @cssdoc version 1.0-pre
|
25 |
+
* @license http://gnu.org/licenses/lgpl.txt GNU Lesser General Public License
|
26 |
+
* @link http://github.com/FlorianWolters/jekyll-bootstrap-theme
|
27 |
+
* @media all
|
28 |
+
* @valid true
|
29 |
+
*/
|
30 |
+
|
31 |
+
body {
|
32 |
+
font-family: Helvetica, Arial, Freesans, clean, sans-serif;
|
33 |
+
padding:1em;
|
34 |
+
margin:auto;
|
35 |
+
max-width:42em;
|
36 |
+
background:#fefefe;
|
37 |
+
}
|
38 |
+
|
39 |
+
h1, h2, h3, h4, h5, h6 {
|
40 |
+
font-weight: bold;
|
41 |
+
}
|
42 |
+
|
43 |
+
h1 {
|
44 |
+
color: #000000;
|
45 |
+
font-size: 28px;
|
46 |
+
}
|
47 |
+
|
48 |
+
h2 {
|
49 |
+
border-bottom: 1px solid #CCCCCC;
|
50 |
+
color: #000000;
|
51 |
+
font-size: 24px;
|
52 |
+
}
|
53 |
+
|
54 |
+
h3 {
|
55 |
+
font-size: 18px;
|
56 |
+
}
|
57 |
+
|
58 |
+
h4 {
|
59 |
+
font-size: 16px;
|
60 |
+
}
|
61 |
+
|
62 |
+
h5 {
|
63 |
+
font-size: 14px;
|
64 |
+
}
|
65 |
+
|
66 |
+
h6 {
|
67 |
+
color: #777777;
|
68 |
+
background-color: inherit;
|
69 |
+
font-size: 14px;
|
70 |
+
}
|
71 |
+
|
72 |
+
hr {
|
73 |
+
height: 0.2em;
|
74 |
+
border: 0;
|
75 |
+
color: #CCCCCC;
|
76 |
+
background-color: #CCCCCC;
|
77 |
+
}
|
78 |
+
|
79 |
+
p, blockquote, ul, ol, dl, li, table, pre {
|
80 |
+
margin: 15px 0;
|
81 |
+
}
|
82 |
+
|
83 |
+
code, pre {
|
84 |
+
border-radius: 3px;
|
85 |
+
background-color: #F8F8F8;
|
86 |
+
color: inherit;
|
87 |
+
}
|
88 |
+
|
89 |
+
code {
|
90 |
+
border: 1px solid #EAEAEA;
|
91 |
+
margin: 0 2px;
|
92 |
+
padding: 0 5px;
|
93 |
+
}
|
94 |
+
|
95 |
+
pre {
|
96 |
+
border: 1px solid #CCCCCC;
|
97 |
+
line-height: 1.25em;
|
98 |
+
overflow: auto;
|
99 |
+
padding: 6px 10px;
|
100 |
+
}
|
101 |
+
|
102 |
+
pre > code {
|
103 |
+
border: 0;
|
104 |
+
margin: 0;
|
105 |
+
padding: 0;
|
106 |
+
}
|
107 |
+
|
108 |
+
a, a:visited {
|
109 |
+
color: #4183C4;
|
110 |
+
background-color: inherit;
|
111 |
+
text-decoration: none;
|
112 |
+
}
|
@@ -0,0 +1,298 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*http://kevinburke.bitbucket.org/markdowncss/*/
|
2 |
+
body {
|
3 |
+
margin : 0 auto;
|
4 |
+
font-family : Georgia, Palatino, serif;
|
5 |
+
color : #444444;
|
6 |
+
line-height : 1;
|
7 |
+
max-width : 960px;
|
8 |
+
padding : 30px;
|
9 |
+
}
|
10 |
+
|
11 |
+
h1, h2, h3, h4 {
|
12 |
+
color : #111111;
|
13 |
+
font-weight : 400;
|
14 |
+
}
|
15 |
+
|
16 |
+
h1, h2, h3, h4, h5, p {
|
17 |
+
margin-bottom : 24px;
|
18 |
+
padding : 0;
|
19 |
+
}
|
20 |
+
|
21 |
+
h1 {
|
22 |
+
font-size : 48px;
|
23 |
+
}
|
24 |
+
|
25 |
+
h2 {
|
26 |
+
font-size : 36px;
|
27 |
+
/* The bottom margin is small. It's designed to be used with gray meta text
|
28 |
+
* below a post title. */
|
29 |
+
margin : 24px 0 6px;
|
30 |
+
}
|
31 |
+
|
32 |
+
h3 {
|
33 |
+
font-size : 24px;
|
34 |
+
}
|
35 |
+
|
36 |
+
h4 {
|
37 |
+
font-size : 21px;
|
38 |
+
}
|
39 |
+
|
40 |
+
h5 {
|
41 |
+
font-size : 18px;
|
42 |
+
}
|
43 |
+
|
44 |
+
a {
|
45 |
+
color : #0099ff;
|
46 |
+
margin : 0;
|
47 |
+
padding : 0;
|
48 |
+
vertical-align : baseline;
|
49 |
+
}
|
50 |
+
|
51 |
+
a:hover {
|
52 |
+
text-decoration : none;
|
53 |
+
color : #ff6600;
|
54 |
+
}
|
55 |
+
|
56 |
+
a:visited {
|
57 |
+
color : purple;
|
58 |
+
}
|
59 |
+
|
60 |
+
ul, ol {
|
61 |
+
padding : 0;
|
62 |
+
margin : 0;
|
63 |
+
}
|
64 |
+
|
65 |
+
li {
|
66 |
+
line-height : 24px;
|
67 |
+
}
|
68 |
+
|
69 |
+
li ul, li ul {
|
70 |
+
margin-left : 24px;
|
71 |
+
}
|
72 |
+
|
73 |
+
p, ul, ol {
|
74 |
+
font-size : 16px;
|
75 |
+
line-height : 24px;
|
76 |
+
max-width : 540px;
|
77 |
+
}
|
78 |
+
|
79 |
+
pre {
|
80 |
+
padding : 0px 24px;
|
81 |
+
max-width : 800px;
|
82 |
+
white-space : pre-wrap;
|
83 |
+
}
|
84 |
+
|
85 |
+
code {
|
86 |
+
font-family : Consolas, Monaco, Andale Mono, monospace;
|
87 |
+
line-height : 1.5;
|
88 |
+
font-size : 13px;
|
89 |
+
}
|
90 |
+
|
91 |
+
aside {
|
92 |
+
display : block;
|
93 |
+
float : right;
|
94 |
+
width : 390px;
|
95 |
+
}
|
96 |
+
|
97 |
+
blockquote {
|
98 |
+
border-left : .5em solid #eee;
|
99 |
+
padding : 0 2em;
|
100 |
+
margin-left : 0;
|
101 |
+
max-width : 476px;
|
102 |
+
}
|
103 |
+
|
104 |
+
blockquote cite {
|
105 |
+
font-size : 14px;
|
106 |
+
line-height : 20px;
|
107 |
+
color : #bfbfbf;
|
108 |
+
}
|
109 |
+
|
110 |
+
blockquote cite:before {
|
111 |
+
content : '\2014 \00A0';
|
112 |
+
}
|
113 |
+
|
114 |
+
blockquote p {
|
115 |
+
color : #666;
|
116 |
+
max-width : 460px;
|
117 |
+
}
|
118 |
+
|
119 |
+
hr {
|
120 |
+
width : 540px;
|
121 |
+
text-align : left;
|
122 |
+
margin : 0 auto 0 0;
|
123 |
+
color : #999;
|
124 |
+
}
|
125 |
+
|
126 |
+
/* Code below this line is copyright Twitter Inc. */
|
127 |
+
|
128 |
+
button,
|
129 |
+
input,
|
130 |
+
select,
|
131 |
+
textarea {
|
132 |
+
font-size : 100%;
|
133 |
+
margin : 0;
|
134 |
+
vertical-align : baseline;
|
135 |
+
*vertical-align : middle;
|
136 |
+
}
|
137 |
+
|
138 |
+
button, input {
|
139 |
+
line-height : normal;
|
140 |
+
*overflow : visible;
|
141 |
+
}
|
142 |
+
|
143 |
+
button::-moz-focus-inner, input::-moz-focus-inner {
|
144 |
+
border : 0;
|
145 |
+
padding : 0;
|
146 |
+
}
|
147 |
+
|
148 |
+
button,
|
149 |
+
input[type="button"],
|
150 |
+
input[type="reset"],
|
151 |
+
input[type="submit"] {
|
152 |
+
cursor : pointer;
|
153 |
+
-webkit-appearance : button;
|
154 |
+
}
|
155 |
+
|
156 |
+
input[type=checkbox], input[type=radio] {
|
157 |
+
cursor : pointer;
|
158 |
+
}
|
159 |
+
|
160 |
+
/* override default chrome & firefox settings */
|
161 |
+
input:not([type="image"]), textarea {
|
162 |
+
-webkit-box-sizing : content-box;
|
163 |
+
-moz-box-sizing : content-box;
|
164 |
+
box-sizing : content-box;
|
165 |
+
}
|
166 |
+
|
167 |
+
input[type="search"] {
|
168 |
+
-webkit-appearance : textfield;
|
169 |
+
-webkit-box-sizing : content-box;
|
170 |
+
-moz-box-sizing : content-box;
|
171 |
+
box-sizing : content-box;
|
172 |
+
}
|
173 |
+
|
174 |
+
input[type="search"]::-webkit-search-decoration {
|
175 |
+
-webkit-appearance : none;
|
176 |
+
}
|
177 |
+
|
178 |
+
label,
|
179 |
+
input,
|
180 |
+
select,
|
181 |
+
textarea {
|
182 |
+
font-family : "Helvetica Neue", Helvetica, Arial, sans-serif;
|
183 |
+
font-size : 13px;
|
184 |
+
font-weight : normal;
|
185 |
+
line-height : normal;
|
186 |
+
margin-bottom : 18px;
|
187 |
+
}
|
188 |
+
|
189 |
+
input[type=checkbox], input[type=radio] {
|
190 |
+
cursor : pointer;
|
191 |
+
margin-bottom : 0;
|
192 |
+
}
|
193 |
+
|
194 |
+
input[type=text],
|
195 |
+
input[type=password],
|
196 |
+
textarea,
|
197 |
+
select {
|
198 |
+
display : inline-block;
|
199 |
+
width : 210px;
|
200 |
+
padding : 4px;
|
201 |
+
font-size : 13px;
|
202 |
+
font-weight : normal;
|
203 |
+
line-height : 18px;
|
204 |
+
height : 18px;
|
205 |
+
color : #808080;
|
206 |
+
border : 1px solid #ccc;
|
207 |
+
-webkit-border-radius : 3px;
|
208 |
+
-moz-border-radius : 3px;
|
209 |
+
border-radius : 3px;
|
210 |
+
}
|
211 |
+
|
212 |
+
select, input[type=file] {
|
213 |
+
height : 27px;
|
214 |
+
line-height : 27px;
|
215 |
+
}
|
216 |
+
|
217 |
+
textarea {
|
218 |
+
height : auto;
|
219 |
+
}
|
220 |
+
|
221 |
+
/* grey out placeholders */
|
222 |
+
:-moz-placeholder {
|
223 |
+
color : #bfbfbf;
|
224 |
+
}
|
225 |
+
|
226 |
+
::-webkit-input-placeholder {
|
227 |
+
color : #bfbfbf;
|
228 |
+
}
|
229 |
+
|
230 |
+
input[type=text],
|
231 |
+
input[type=password],
|
232 |
+
select,
|
233 |
+
textarea {
|
234 |
+
-webkit-transition : border linear 0.2s, box-shadow linear 0.2s;
|
235 |
+
-moz-transition : border linear 0.2s, box-shadow linear 0.2s;
|
236 |
+
transition : border linear 0.2s, box-shadow linear 0.2s;
|
237 |
+
-webkit-box-shadow : inset 0 1px 3px rgba(0, 0, 0, 0.1);
|
238 |
+
-moz-box-shadow : inset 0 1px 3px rgba(0, 0, 0, 0.1);
|
239 |
+
box-shadow : inset 0 1px 3px rgba(0, 0, 0, 0.1);
|
240 |
+
}
|
241 |
+
|
242 |
+
input[type=text]:focus, input[type=password]:focus, textarea:focus {
|
243 |
+
outline : none;
|
244 |
+
border-color : rgba(82, 168, 236, 0.8);
|
245 |
+
-webkit-box-shadow : inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
|
246 |
+
-moz-box-shadow : inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
|
247 |
+
box-shadow : inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
|
248 |
+
}
|
249 |
+
|
250 |
+
/* buttons */
|
251 |
+
button {
|
252 |
+
display : inline-block;
|
253 |
+
padding : 4px 14px;
|
254 |
+
font-family : "Helvetica Neue", Helvetica, Arial, sans-serif;
|
255 |
+
font-size : 13px;
|
256 |
+
line-height : 18px;
|
257 |
+
-webkit-border-radius : 4px;
|
258 |
+
-moz-border-radius : 4px;
|
259 |
+
border-radius : 4px;
|
260 |
+
-webkit-box-shadow : inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
261 |
+
-moz-box-shadow : inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
262 |
+
box-shadow : inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
263 |
+
background-color : #0064cd;
|
264 |
+
background-repeat : repeat-x;
|
265 |
+
background-image : -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
|
266 |
+
background-image : -moz-linear-gradient(top, #049cdb, #0064cd);
|
267 |
+
background-image : -ms-linear-gradient(top, #049cdb, #0064cd);
|
268 |
+
background-image : -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
|
269 |
+
background-image : -webkit-linear-gradient(top, #049cdb, #0064cd);
|
270 |
+
background-image : -o-linear-gradient(top, #049cdb, #0064cd);
|
271 |
+
background-image : linear-gradient(top, #049cdb, #0064cd);
|
272 |
+
color : #fff;
|
273 |
+
text-shadow : 0 -1px 0 rgba(0, 0, 0, 0.25);
|
274 |
+
border : 1px solid #004b9a;
|
275 |
+
border-bottom-color : #003f81;
|
276 |
+
-webkit-transition : 0.1s linear all;
|
277 |
+
-moz-transition : 0.1s linear all;
|
278 |
+
transition : 0.1s linear all;
|
279 |
+
border-color : #0064cd #0064cd #003f81;
|
280 |
+
border-color : rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
281 |
+
}
|
282 |
+
|
283 |
+
button:hover {
|
284 |
+
color : #fff;
|
285 |
+
background-position : 0 -15px;
|
286 |
+
text-decoration : none;
|
287 |
+
}
|
288 |
+
|
289 |
+
button:active {
|
290 |
+
-webkit-box-shadow : inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
|
291 |
+
-moz-box-shadow : inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
|
292 |
+
box-shadow : inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
|
293 |
+
}
|
294 |
+
|
295 |
+
button::-moz-focus-inner {
|
296 |
+
padding : 0;
|
297 |
+
border : 0;
|
298 |
+
}
|
@@ -0,0 +1,314 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* This document has been created with Marked.app <http://markedapp.com>.
|
3 |
+
* Copyright 2011 Brett Terpstra
|
4 |
+
* ---------------------------------------------------------------------------
|
5 |
+
* Please leave this notice in place, along with any additional credits below.
|
6 |
+
*
|
7 |
+
* Byword.css theme is based on Byword.app <http://bywordapp.com>
|
8 |
+
* Authors: @brunodecarvalho, @jpedroso, @rcabaco
|
9 |
+
* Copyright 2011 Metaclassy, Lda. <http://metaclassy.com>
|
10 |
+
*/
|
11 |
+
|
12 |
+
html {
|
13 |
+
font-size: 62.5%; /* base font-size: 10px */
|
14 |
+
}
|
15 |
+
|
16 |
+
body {
|
17 |
+
background-color: #f2f2f2;
|
18 |
+
color: #3c3c3c;
|
19 |
+
|
20 |
+
/* Change font size below */
|
21 |
+
font-size: 1.7em;
|
22 |
+
line-height: 1.4em;
|
23 |
+
|
24 |
+
/* Change font below */
|
25 |
+
|
26 |
+
/* Sans-serif fonts */
|
27 |
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
28 |
+
-webkit-font-smoothing: antialiased;
|
29 |
+
|
30 |
+
/* Serif fonts */
|
31 |
+
/*
|
32 |
+
font-family: "Cochin", "Baskerville", "Georgia", serif;
|
33 |
+
-webkit-font-smoothing: subpixel-antialiased;
|
34 |
+
*/
|
35 |
+
|
36 |
+
/* Monospaced fonts */
|
37 |
+
/*
|
38 |
+
font-family: "Courier New", Menlo, Monaco, mono;
|
39 |
+
-webkit-font-smoothing: antialiased;
|
40 |
+
*/
|
41 |
+
|
42 |
+
margin: auto;
|
43 |
+
max-width: 42em;
|
44 |
+
}
|
45 |
+
a {
|
46 |
+
color: #308bd8;
|
47 |
+
text-decoration:none;
|
48 |
+
}
|
49 |
+
a:hover {
|
50 |
+
text-decoration: underline;
|
51 |
+
}
|
52 |
+
/* headings */
|
53 |
+
h1, h2 {
|
54 |
+
line-height:1.2em;
|
55 |
+
margin-top:32px;
|
56 |
+
margin-bottom:12px;
|
57 |
+
}
|
58 |
+
h1:first-child {
|
59 |
+
margin-top:0;
|
60 |
+
}
|
61 |
+
h3, h4, h5, h6 {
|
62 |
+
margin-top:12px;
|
63 |
+
margin-bottom:0;
|
64 |
+
}
|
65 |
+
h5, h6 {
|
66 |
+
font-size:0.9em;
|
67 |
+
line-height:1.0em;
|
68 |
+
}
|
69 |
+
/* end of headings */
|
70 |
+
p {
|
71 |
+
margin:0 0 24px 0;
|
72 |
+
}
|
73 |
+
p:last-child {
|
74 |
+
margin:0;
|
75 |
+
}
|
76 |
+
#wrapper hr {
|
77 |
+
width: 100%;
|
78 |
+
margin: 3em auto;
|
79 |
+
border: 0;
|
80 |
+
color: #eee;
|
81 |
+
background-color: #ccc;
|
82 |
+
height: 1px;
|
83 |
+
-webkit-box-shadow:0px 1px 0px rgba(255, 255, 255, 0.75);
|
84 |
+
}
|
85 |
+
/* lists */
|
86 |
+
ol {
|
87 |
+
list-style: outside decimal;
|
88 |
+
}
|
89 |
+
ul {
|
90 |
+
list-style: outside disc;
|
91 |
+
}
|
92 |
+
ol, ul {
|
93 |
+
padding-left:0;
|
94 |
+
margin-bottom:24px;
|
95 |
+
}
|
96 |
+
ol li {
|
97 |
+
margin-left:28px;
|
98 |
+
}
|
99 |
+
ul li {
|
100 |
+
margin-bottom:8px;
|
101 |
+
margin-left:16px;
|
102 |
+
}
|
103 |
+
ol:last-child, ul:last-child {
|
104 |
+
margin:0;
|
105 |
+
}
|
106 |
+
li > ol, li > ul {
|
107 |
+
padding-left:12px;
|
108 |
+
}
|
109 |
+
dl {
|
110 |
+
margin-bottom:24px;
|
111 |
+
}
|
112 |
+
dl dt {
|
113 |
+
font-weight:bold;
|
114 |
+
margin-bottom:8px;
|
115 |
+
}
|
116 |
+
dl dd {
|
117 |
+
margin-left:0;
|
118 |
+
margin-bottom:12px;
|
119 |
+
}
|
120 |
+
dl dd:last-child, dl:last-child {
|
121 |
+
margin-bottom:0;
|
122 |
+
}
|
123 |
+
/* end of lists */
|
124 |
+
pre {
|
125 |
+
white-space: pre-wrap;
|
126 |
+
width: 96%;
|
127 |
+
margin-bottom: 24px;
|
128 |
+
overflow: hidden;
|
129 |
+
padding: 3px 10px;
|
130 |
+
-webkit-border-radius: 3px;
|
131 |
+
background-color: #eee;
|
132 |
+
border: 1px solid #ddd;
|
133 |
+
}
|
134 |
+
code {
|
135 |
+
white-space: nowrap;
|
136 |
+
font-size: 1.1em;
|
137 |
+
padding: 2px;
|
138 |
+
-webkit-border-radius: 3px;
|
139 |
+
background-color: #eee;
|
140 |
+
border: 1px solid #ddd;
|
141 |
+
}
|
142 |
+
pre code {
|
143 |
+
white-space: pre-wrap;
|
144 |
+
border: none;
|
145 |
+
padding: 0;
|
146 |
+
background-color: transparent;
|
147 |
+
-webkit-border-radius: 0;
|
148 |
+
}
|
149 |
+
blockquote {
|
150 |
+
margin-left: 0;
|
151 |
+
margin-right: 0;
|
152 |
+
width: 96%;
|
153 |
+
padding: 0 10px;
|
154 |
+
border-left: 3px solid #ddd;
|
155 |
+
color: #777;
|
156 |
+
}
|
157 |
+
table {
|
158 |
+
margin-left: auto;
|
159 |
+
margin-right: auto;
|
160 |
+
margin-bottom: 24px;
|
161 |
+
border-bottom: 1px solid #ddd;
|
162 |
+
border-right: 1px solid #ddd;
|
163 |
+
border-spacing: 0;
|
164 |
+
}
|
165 |
+
table th {
|
166 |
+
padding: 3px 10px;
|
167 |
+
background-color: #eee;
|
168 |
+
border-top: 1px solid #ddd;
|
169 |
+
border-left: 1px solid #ddd;
|
170 |
+
}
|
171 |
+
table tr {
|
172 |
+
}
|
173 |
+
table td {
|
174 |
+
padding: 3px 10px;
|
175 |
+
border-top: 1px solid #ddd;
|
176 |
+
border-left: 1px solid #ddd;
|
177 |
+
}
|
178 |
+
caption {
|
179 |
+
font-size: 1.2em;
|
180 |
+
font-weight: bold;
|
181 |
+
margin-bottom: 5px;
|
182 |
+
}
|
183 |
+
figure {
|
184 |
+
display: block;
|
185 |
+
text-align: center;
|
186 |
+
}
|
187 |
+
#wrapper img {
|
188 |
+
border: none;
|
189 |
+
display: block;
|
190 |
+
margin: 1em auto;
|
191 |
+
max-width: 100%;
|
192 |
+
}
|
193 |
+
figcaption {
|
194 |
+
font-size: 0.8em;
|
195 |
+
font-style: italic;
|
196 |
+
}
|
197 |
+
mark {
|
198 |
+
background: #fefec0;
|
199 |
+
padding:1px 3px;
|
200 |
+
}
|
201 |
+
|
202 |
+
|
203 |
+
/* classes */
|
204 |
+
|
205 |
+
.markdowncitation {
|
206 |
+
}
|
207 |
+
.footnote {
|
208 |
+
font-size: 0.8em;
|
209 |
+
vertical-align: super;
|
210 |
+
}
|
211 |
+
.footnotes ol {
|
212 |
+
font-weight: bold;
|
213 |
+
}
|
214 |
+
.footnotes ol li p {
|
215 |
+
font-weight: normal;
|
216 |
+
}
|
217 |
+
|
218 |
+
/* custom formatting classes */
|
219 |
+
|
220 |
+
.shadow {
|
221 |
+
-webkit-box-shadow: 0 2px 4px #999;
|
222 |
+
}
|
223 |
+
|
224 |
+
.source {
|
225 |
+
text-align: center;
|
226 |
+
font-size: 0.8em;
|
227 |
+
color: #777;
|
228 |
+
margin: -40px;
|
229 |
+
}
|
230 |
+
|
231 |
+
@media screen {
|
232 |
+
.inverted, .inverted #wrapper {
|
233 |
+
background-color: #1a1a1a !important;
|
234 |
+
color: #bebebe !important;
|
235 |
+
|
236 |
+
/* SANS-SERIF */
|
237 |
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
|
238 |
+
-webkit-font-smoothing: antialiased !important;
|
239 |
+
|
240 |
+
/* SERIF */
|
241 |
+
/*
|
242 |
+
font-family: "Cochin", "Baskerville", "Georgia", serif !important;
|
243 |
+
-webkit-font-smoothing: subpixel-antialiased !important;
|
244 |
+
*/
|
245 |
+
/* MONO */
|
246 |
+
/*
|
247 |
+
font-family: "Courier", mono !important;
|
248 |
+
-webkit-font-smoothing: antialiased !important;
|
249 |
+
*/
|
250 |
+
}
|
251 |
+
.inverted a {
|
252 |
+
color: #308bd8 !important;
|
253 |
+
}
|
254 |
+
.inverted hr {
|
255 |
+
color: #666 !important;
|
256 |
+
border: 0;
|
257 |
+
background-color: #666 !important;
|
258 |
+
-webkit-box-shadow: none !important;
|
259 |
+
}
|
260 |
+
.inverted pre {
|
261 |
+
background-color: #222 !important;
|
262 |
+
border-color: #3c3c3c !important;
|
263 |
+
}
|
264 |
+
.inverted code {
|
265 |
+
background-color: #222 !important;
|
266 |
+
border-color: #3c3c3c !important;
|
267 |
+
}
|
268 |
+
.inverted blockquote {
|
269 |
+
border-color: #333 !important;
|
270 |
+
color: #999 !important;
|
271 |
+
}
|
272 |
+
.inverted table {
|
273 |
+
border-color: #3c3c3c !important;
|
274 |
+
}
|
275 |
+
.inverted table th {
|
276 |
+
background-color: #222 !important;
|
277 |
+
border-color: #3c3c3c !important;
|
278 |
+
}
|
279 |
+
.inverted table td {
|
280 |
+
border-color: #3c3c3c !important;
|
281 |
+
}
|
282 |
+
.inverted mark {
|
283 |
+
background: #bc990b !important;
|
284 |
+
color:#000 !important;
|
285 |
+
}
|
286 |
+
.inverted .shadow { -webkit-box-shadow: 0 2px 4px #000 !important; }
|
287 |
+
#wrapper {
|
288 |
+
background: transparent;
|
289 |
+
margin: 40px;
|
290 |
+
}
|
291 |
+
}
|
292 |
+
|
293 |
+
/* Printing support */
|
294 |
+
@media print {
|
295 |
+
body {
|
296 |
+
overflow: auto;
|
297 |
+
}
|
298 |
+
img, pre, blockquote, table, figure {
|
299 |
+
page-break-inside: avoid;
|
300 |
+
}
|
301 |
+
pre, code {
|
302 |
+
border: none !important;
|
303 |
+
}
|
304 |
+
#wrapper {
|
305 |
+
background: #fff;
|
306 |
+
position: relative;
|
307 |
+
text-indent: 0px;
|
308 |
+
padding: 10px;
|
309 |
+
font-size:85%;
|
310 |
+
}
|
311 |
+
.footnotes {
|
312 |
+
page-break-before: always;
|
313 |
+
}
|
314 |
+
}
|
@@ -0,0 +1,296 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
article,
|
2 |
+
aside,
|
3 |
+
details,
|
4 |
+
figcaption,
|
5 |
+
figure,
|
6 |
+
footer,
|
7 |
+
header,
|
8 |
+
hgroup,
|
9 |
+
nav,
|
10 |
+
section,
|
11 |
+
summary {
|
12 |
+
display: block;
|
13 |
+
}
|
14 |
+
audio,
|
15 |
+
canvas,
|
16 |
+
video {
|
17 |
+
display: inline-block;
|
18 |
+
}
|
19 |
+
audio:not([controls]) {
|
20 |
+
display: none;
|
21 |
+
height: 0;
|
22 |
+
}
|
23 |
+
[hidden] {
|
24 |
+
display: none;
|
25 |
+
}
|
26 |
+
html {
|
27 |
+
font-family: sans-serif;
|
28 |
+
-webkit-text-size-adjust: 100%;
|
29 |
+
-ms-text-size-adjust: 100%;
|
30 |
+
}
|
31 |
+
body {
|
32 |
+
margin: 0;
|
33 |
+
}
|
34 |
+
a:focus {
|
35 |
+
outline: thin dotted;
|
36 |
+
}
|
37 |
+
a:active,
|
38 |
+
a:hover {
|
39 |
+
outline: 0;
|
40 |
+
}
|
41 |
+
h1 {
|
42 |
+
font-size: 2em;
|
43 |
+
}
|
44 |
+
abbr[title] {
|
45 |
+
border-bottom: 1px dotted;
|
46 |
+
}
|
47 |
+
b,
|
48 |
+
strong {
|
49 |
+
font-weight: bold;
|
50 |
+
}
|
51 |
+
dfn {
|
52 |
+
font-style: italic;
|
53 |
+
}
|
54 |
+
mark {
|
55 |
+
background: #ff0;
|
56 |
+
color: #000;
|
57 |
+
}
|
58 |
+
code,
|
59 |
+
kbd,
|
60 |
+
pre,
|
61 |
+
samp {
|
62 |
+
font-family: monospace, serif;
|
63 |
+
font-size: 1em;
|
64 |
+
}
|
65 |
+
pre {
|
66 |
+
white-space: pre-wrap;
|
67 |
+
word-wrap: break-word;
|
68 |
+
}
|
69 |
+
q {
|
70 |
+
quotes: "\201C" "\201D" "\2018" "\2019";
|
71 |
+
}
|
72 |
+
small {
|
73 |
+
font-size: 80%;
|
74 |
+
}
|
75 |
+
sub,
|
76 |
+
sup {
|
77 |
+
font-size: 75%;
|
78 |
+
line-height: 0;
|
79 |
+
position: relative;
|
80 |
+
vertical-align: baseline;
|
81 |
+
}
|
82 |
+
sup {
|
83 |
+
top: -0.5em;
|
84 |
+
}
|
85 |
+
sub {
|
86 |
+
bottom: -0.25em;
|
87 |
+
}
|
88 |
+
img {
|
89 |
+
border: 0;
|
90 |
+
}
|
91 |
+
svg:not(:root) {
|
92 |
+
overflow: hidden;
|
93 |
+
}
|
94 |
+
figure {
|
95 |
+
margin: 0;
|
96 |
+
}
|
97 |
+
fieldset {
|
98 |
+
border: 1px solid #c0c0c0;
|
99 |
+
margin: 0 2px;
|
100 |
+
padding: 0.35em 0.625em 0.75em;
|
101 |
+
}
|
102 |
+
legend {
|
103 |
+
border: 0;
|
104 |
+
padding: 0;
|
105 |
+
}
|
106 |
+
button,
|
107 |
+
input,
|
108 |
+
select,
|
109 |
+
textarea {
|
110 |
+
font-family: inherit;
|
111 |
+
font-size: 100%;
|
112 |
+
margin: 0;
|
113 |
+
}
|
114 |
+
button,
|
115 |
+
input {
|
116 |
+
line-height: normal;
|
117 |
+
}
|
118 |
+
button,
|
119 |
+
html input[type="button"],
|
120 |
+
input[type="reset"],
|
121 |
+
input[type="submit"] {
|
122 |
+
-webkit-appearance: button;
|
123 |
+
cursor: pointer;
|
124 |
+
}
|
125 |
+
button[disabled],
|
126 |
+
input[disabled] {
|
127 |
+
cursor: default;
|
128 |
+
}
|
129 |
+
input[type="checkbox"],
|
130 |
+
input[type="radio"] {
|
131 |
+
box-sizing: border-box;
|
132 |
+
padding: 0;
|
133 |
+
}
|
134 |
+
input[type="search"] {
|
135 |
+
-webkit-appearance: textfield;
|
136 |
+
-moz-box-sizing: content-box;
|
137 |
+
-webkit-box-sizing: content-box;
|
138 |
+
box-sizing: content-box;
|
139 |
+
}
|
140 |
+
input[type="search"]::-webkit-search-cancel-button,
|
141 |
+
input[type="search"]::-webkit-search-decoration {
|
142 |
+
-webkit-appearance: none;
|
143 |
+
}
|
144 |
+
button::-moz-focus-inner,
|
145 |
+
input::-moz-focus-inner {
|
146 |
+
border: 0;
|
147 |
+
padding: 0;
|
148 |
+
}
|
149 |
+
textarea {
|
150 |
+
overflow: auto;
|
151 |
+
vertical-align: top;
|
152 |
+
}
|
153 |
+
table {
|
154 |
+
border-collapse: collapse;
|
155 |
+
border-spacing: 0;
|
156 |
+
}
|
157 |
+
@import url(//fonts.googleapis.com/css?family=Inconsolata);
|
158 |
+
@import url(//fonts.googleapis.com/css?family=PT+Sans);
|
159 |
+
@import url(//fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700);
|
160 |
+
html {
|
161 |
+
font-family: 'PT Sans', sans-serif;
|
162 |
+
}
|
163 |
+
pre,
|
164 |
+
code {
|
165 |
+
font-family: 'Inconsolata', sans-serif;
|
166 |
+
}
|
167 |
+
h1,
|
168 |
+
h2,
|
169 |
+
h3,
|
170 |
+
h4,
|
171 |
+
h5,
|
172 |
+
h6 {
|
173 |
+
font-family: 'PT Sans Narrow', sans-serif;
|
174 |
+
font-weight: 700;
|
175 |
+
}
|
176 |
+
html {
|
177 |
+
background-color: #002b36;
|
178 |
+
color: #839496;
|
179 |
+
margin: 1em;
|
180 |
+
}
|
181 |
+
code {
|
182 |
+
background-color: #073642;
|
183 |
+
padding: 2px;
|
184 |
+
}
|
185 |
+
a {
|
186 |
+
color: #b58900;
|
187 |
+
}
|
188 |
+
a:visited {
|
189 |
+
color: #cb4b16;
|
190 |
+
}
|
191 |
+
a:hover {
|
192 |
+
color: #cb4b16;
|
193 |
+
}
|
194 |
+
h1 {
|
195 |
+
color: #d33682;
|
196 |
+
}
|
197 |
+
h2,
|
198 |
+
h3,
|
199 |
+
h4,
|
200 |
+
h5,
|
201 |
+
h6 {
|
202 |
+
color: #859900;
|
203 |
+
}
|
204 |
+
pre {
|
205 |
+
background-color: #002b36;
|
206 |
+
color: #839496;
|
207 |
+
border: 1pt solid #586e75;
|
208 |
+
padding: 1em;
|
209 |
+
box-shadow: 5pt 5pt 8pt #073642;
|
210 |
+
}
|
211 |
+
pre code {
|
212 |
+
background-color: #002b36;
|
213 |
+
}
|
214 |
+
h1 {
|
215 |
+
font-size: 2.8em;
|
216 |
+
}
|
217 |
+
h2 {
|
218 |
+
font-size: 2.4em;
|
219 |
+
}
|
220 |
+
h3 {
|
221 |
+
font-size: 1.8em;
|
222 |
+
}
|
223 |
+
h4 {
|
224 |
+
font-size: 1.4em;
|
225 |
+
}
|
226 |
+
h5 {
|
227 |
+
font-size: 1.3em;
|
228 |
+
}
|
229 |
+
h6 {
|
230 |
+
font-size: 1.15em;
|
231 |
+
}
|
232 |
+
.tag {
|
233 |
+
background-color: #073642;
|
234 |
+
color: #d33682;
|
235 |
+
padding: 0 0.2em;
|
236 |
+
}
|
237 |
+
.todo,
|
238 |
+
.next,
|
239 |
+
.done {
|
240 |
+
color: #002b36;
|
241 |
+
background-color: #dc322f;
|
242 |
+
padding: 0 0.2em;
|
243 |
+
}
|
244 |
+
.tag {
|
245 |
+
-webkit-border-radius: 0.35em;
|
246 |
+
-moz-border-radius: 0.35em;
|
247 |
+
border-radius: 0.35em;
|
248 |
+
}
|
249 |
+
.TODO {
|
250 |
+
-webkit-border-radius: 0.2em;
|
251 |
+
-moz-border-radius: 0.2em;
|
252 |
+
border-radius: 0.2em;
|
253 |
+
background-color: #2aa198;
|
254 |
+
}
|
255 |
+
.NEXT {
|
256 |
+
-webkit-border-radius: 0.2em;
|
257 |
+
-moz-border-radius: 0.2em;
|
258 |
+
border-radius: 0.2em;
|
259 |
+
background-color: #268bd2;
|
260 |
+
}
|
261 |
+
.ACTIVE {
|
262 |
+
-webkit-border-radius: 0.2em;
|
263 |
+
-moz-border-radius: 0.2em;
|
264 |
+
border-radius: 0.2em;
|
265 |
+
background-color: #268bd2;
|
266 |
+
}
|
267 |
+
.DONE {
|
268 |
+
-webkit-border-radius: 0.2em;
|
269 |
+
-moz-border-radius: 0.2em;
|
270 |
+
border-radius: 0.2em;
|
271 |
+
background-color: #859900;
|
272 |
+
}
|
273 |
+
.WAITING {
|
274 |
+
-webkit-border-radius: 0.2em;
|
275 |
+
-moz-border-radius: 0.2em;
|
276 |
+
border-radius: 0.2em;
|
277 |
+
foreground-color: #cb4b16;
|
278 |
+
}
|
279 |
+
.HOLD {
|
280 |
+
-webkit-border-radius: 0.2em;
|
281 |
+
-moz-border-radius: 0.2em;
|
282 |
+
border-radius: 0.2em;
|
283 |
+
foreground-color: #d33682;
|
284 |
+
}
|
285 |
+
.NOTE {
|
286 |
+
-webkit-border-radius: 0.2em;
|
287 |
+
-moz-border-radius: 0.2em;
|
288 |
+
border-radius: 0.2em;
|
289 |
+
foreground-color: #d33682;
|
290 |
+
}
|
291 |
+
.CANCELLED {
|
292 |
+
-webkit-border-radius: 0.2em;
|
293 |
+
-moz-border-radius: 0.2em;
|
294 |
+
border-radius: 0.2em;
|
295 |
+
foreground-color: #859900;
|
296 |
+
}
|
@@ -0,0 +1,296 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
article,
|
2 |
+
aside,
|
3 |
+
details,
|
4 |
+
figcaption,
|
5 |
+
figure,
|
6 |
+
footer,
|
7 |
+
header,
|
8 |
+
hgroup,
|
9 |
+
nav,
|
10 |
+
section,
|
11 |
+
summary {
|
12 |
+
display: block;
|
13 |
+
}
|
14 |
+
audio,
|
15 |
+
canvas,
|
16 |
+
video {
|
17 |
+
display: inline-block;
|
18 |
+
}
|
19 |
+
audio:not([controls]) {
|
20 |
+
display: none;
|
21 |
+
height: 0;
|
22 |
+
}
|
23 |
+
[hidden] {
|
24 |
+
display: none;
|
25 |
+
}
|
26 |
+
html {
|
27 |
+
font-family: sans-serif;
|
28 |
+
-webkit-text-size-adjust: 100%;
|
29 |
+
-ms-text-size-adjust: 100%;
|
30 |
+
}
|
31 |
+
body {
|
32 |
+
margin: 0;
|
33 |
+
}
|
34 |
+
a:focus {
|
35 |
+
outline: thin dotted;
|
36 |
+
}
|
37 |
+
a:active,
|
38 |
+
a:hover {
|
39 |
+
outline: 0;
|
40 |
+
}
|
41 |
+
h1 {
|
42 |
+
font-size: 2em;
|
43 |
+
}
|
44 |
+
abbr[title] {
|
45 |
+
border-bottom: 1px dotted;
|
46 |
+
}
|
47 |
+
b,
|
48 |
+
strong {
|
49 |
+
font-weight: bold;
|
50 |
+
}
|
51 |
+
dfn {
|
52 |
+
font-style: italic;
|
53 |
+
}
|
54 |
+
mark {
|
55 |
+
background: #ff0;
|
56 |
+
color: #000;
|
57 |
+
}
|
58 |
+
code,
|
59 |
+
kbd,
|
60 |
+
pre,
|
61 |
+
samp {
|
62 |
+
font-family: monospace, serif;
|
63 |
+
font-size: 1em;
|
64 |
+
}
|
65 |
+
pre {
|
66 |
+
white-space: pre-wrap;
|
67 |
+
word-wrap: break-word;
|
68 |
+
}
|
69 |
+
q {
|
70 |
+
quotes: "\201C" "\201D" "\2018" "\2019";
|
71 |
+
}
|
72 |
+
small {
|
73 |
+
font-size: 80%;
|
74 |
+
}
|
75 |
+
sub,
|
76 |
+
sup {
|
77 |
+
font-size: 75%;
|
78 |
+
line-height: 0;
|
79 |
+
position: relative;
|
80 |
+
vertical-align: baseline;
|
81 |
+
}
|
82 |
+
sup {
|
83 |
+
top: -0.5em;
|
84 |
+
}
|
85 |
+
sub {
|
86 |
+
bottom: -0.25em;
|
87 |
+
}
|
88 |
+
img {
|
89 |
+
border: 0;
|
90 |
+
}
|
91 |
+
svg:not(:root) {
|
92 |
+
overflow: hidden;
|
93 |
+
}
|
94 |
+
figure {
|
95 |
+
margin: 0;
|
96 |
+
}
|
97 |
+
fieldset {
|
98 |
+
border: 1px solid #c0c0c0;
|
99 |
+
margin: 0 2px;
|
100 |
+
padding: 0.35em 0.625em 0.75em;
|
101 |
+
}
|
102 |
+
legend {
|
103 |
+
border: 0;
|
104 |
+
padding: 0;
|
105 |
+
}
|
106 |
+
button,
|
107 |
+
input,
|
108 |
+
select,
|
109 |
+
textarea {
|
110 |
+
font-family: inherit;
|
111 |
+
font-size: 100%;
|
112 |
+
margin: 0;
|
113 |
+
}
|
114 |
+
button,
|
115 |
+
input {
|
116 |
+
line-height: normal;
|
117 |
+
}
|
118 |
+
button,
|
119 |
+
html input[type="button"],
|
120 |
+
input[type="reset"],
|
121 |
+
input[type="submit"] {
|
122 |
+
-webkit-appearance: button;
|
123 |
+
cursor: pointer;
|
124 |
+
}
|
125 |
+
button[disabled],
|
126 |
+
input[disabled] {
|
127 |
+
cursor: default;
|
128 |
+
}
|
129 |
+
input[type="checkbox"],
|
130 |
+
input[type="radio"] {
|
131 |
+
box-sizing: border-box;
|
132 |
+
padding: 0;
|
133 |
+
}
|
134 |
+
input[type="search"] {
|
135 |
+
-webkit-appearance: textfield;
|
136 |
+
-moz-box-sizing: content-box;
|
137 |
+
-webkit-box-sizing: content-box;
|
138 |
+
box-sizing: content-box;
|
139 |
+
}
|
140 |
+
input[type="search"]::-webkit-search-cancel-button,
|
141 |
+
input[type="search"]::-webkit-search-decoration {
|
142 |
+
-webkit-appearance: none;
|
143 |
+
}
|
144 |
+
button::-moz-focus-inner,
|
145 |
+
input::-moz-focus-inner {
|
146 |
+
border: 0;
|
147 |
+
padding: 0;
|
148 |
+
}
|
149 |
+
textarea {
|
150 |
+
overflow: auto;
|
151 |
+
vertical-align: top;
|
152 |
+
}
|
153 |
+
table {
|
154 |
+
border-collapse: collapse;
|
155 |
+
border-spacing: 0;
|
156 |
+
}
|
157 |
+
@import url(//fonts.googleapis.com/css?family=Inconsolata);
|
158 |
+
@import url(//fonts.googleapis.com/css?family=PT+Sans);
|
159 |
+
@import url(//fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700);
|
160 |
+
html {
|
161 |
+
font-family: 'PT Sans', sans-serif;
|
162 |
+
}
|
163 |
+
pre,
|
164 |
+
code {
|
165 |
+
font-family: 'Inconsolata', sans-serif;
|
166 |
+
}
|
167 |
+
h1,
|
168 |
+
h2,
|
169 |
+
h3,
|
170 |
+
h4,
|
171 |
+
h5,
|
172 |
+
h6 {
|
173 |
+
font-family: 'PT Sans Narrow', sans-serif;
|
174 |
+
font-weight: 700;
|
175 |
+
}
|
176 |
+
html {
|
177 |
+
background-color: #fdf6e3;
|
178 |
+
color: #657b83;
|
179 |
+
margin: 1em;
|
180 |
+
}
|
181 |
+
code {
|
182 |
+
background-color: #eee8d5;
|
183 |
+
padding: 2px;
|
184 |
+
}
|
185 |
+
a {
|
186 |
+
color: #b58900;
|
187 |
+
}
|
188 |
+
a:visited {
|
189 |
+
color: #cb4b16;
|
190 |
+
}
|
191 |
+
a:hover {
|
192 |
+
color: #cb4b16;
|
193 |
+
}
|
194 |
+
h1 {
|
195 |
+
color: #d33682;
|
196 |
+
}
|
197 |
+
h2,
|
198 |
+
h3,
|
199 |
+
h4,
|
200 |
+
h5,
|
201 |
+
h6 {
|
202 |
+
color: #859900;
|
203 |
+
}
|
204 |
+
pre {
|
205 |
+
background-color: #fdf6e3;
|
206 |
+
color: #657b83;
|
207 |
+
border: 1pt solid #93a1a1;
|
208 |
+
padding: 1em;
|
209 |
+
box-shadow: 5pt 5pt 8pt #eee8d5;
|
210 |
+
}
|
211 |
+
pre code {
|
212 |
+
background-color: #fdf6e3;
|
213 |
+
}
|
214 |
+
h1 {
|
215 |
+
font-size: 2.8em;
|
216 |
+
}
|
217 |
+
h2 {
|
218 |
+
font-size: 2.4em;
|
219 |
+
}
|
220 |
+
h3 {
|
221 |
+
font-size: 1.8em;
|
222 |
+
}
|
223 |
+
h4 {
|
224 |
+
font-size: 1.4em;
|
225 |
+
}
|
226 |
+
h5 {
|
227 |
+
font-size: 1.3em;
|
228 |
+
}
|
229 |
+
h6 {
|
230 |
+
font-size: 1.15em;
|
231 |
+
}
|
232 |
+
.tag {
|
233 |
+
background-color: #eee8d5;
|
234 |
+
color: #d33682;
|
235 |
+
padding: 0 0.2em;
|
236 |
+
}
|
237 |
+
.todo,
|
238 |
+
.next,
|
239 |
+
.done {
|
240 |
+
color: #fdf6e3;
|
241 |
+
background-color: #dc322f;
|
242 |
+
padding: 0 0.2em;
|
243 |
+
}
|
244 |
+
.tag {
|
245 |
+
-webkit-border-radius: 0.35em;
|
246 |
+
-moz-border-radius: 0.35em;
|
247 |
+
border-radius: 0.35em;
|
248 |
+
}
|
249 |
+
.TODO {
|
250 |
+
-webkit-border-radius: 0.2em;
|
251 |
+
-moz-border-radius: 0.2em;
|
252 |
+
border-radius: 0.2em;
|
253 |
+
background-color: #2aa198;
|
254 |
+
}
|
255 |
+
.NEXT {
|
256 |
+
-webkit-border-radius: 0.2em;
|
257 |
+
-moz-border-radius: 0.2em;
|
258 |
+
border-radius: 0.2em;
|
259 |
+
background-color: #268bd2;
|
260 |
+
}
|
261 |
+
.ACTIVE {
|
262 |
+
-webkit-border-radius: 0.2em;
|
263 |
+
-moz-border-radius: 0.2em;
|
264 |
+
border-radius: 0.2em;
|
265 |
+
background-color: #268bd2;
|
266 |
+
}
|
267 |
+
.DONE {
|
268 |
+
-webkit-border-radius: 0.2em;
|
269 |
+
-moz-border-radius: 0.2em;
|
270 |
+
border-radius: 0.2em;
|
271 |
+
background-color: #859900;
|
272 |
+
}
|
273 |
+
.WAITING {
|
274 |
+
-webkit-border-radius: 0.2em;
|
275 |
+
-moz-border-radius: 0.2em;
|
276 |
+
border-radius: 0.2em;
|
277 |
+
foreground-color: #cb4b16;
|
278 |
+
}
|
279 |
+
.HOLD {
|
280 |
+
-webkit-border-radius: 0.2em;
|
281 |
+
-moz-border-radius: 0.2em;
|
282 |
+
border-radius: 0.2em;
|
283 |
+
foreground-color: #d33682;
|
284 |
+
}
|
285 |
+
.NOTE {
|
286 |
+
-webkit-border-radius: 0.2em;
|
287 |
+
-moz-border-radius: 0.2em;
|
288 |
+
border-radius: 0.2em;
|
289 |
+
foreground-color: #d33682;
|
290 |
+
}
|
291 |
+
.CANCELLED {
|
292 |
+
-webkit-border-radius: 0.2em;
|
293 |
+
-moz-border-radius: 0.2em;
|
294 |
+
border-radius: 0.2em;
|
295 |
+
foreground-color: #859900;
|
296 |
+
}
|