added site files
This commit is contained in:
parent
a6f70a6c78
commit
329148c253
253 changed files with 30486 additions and 0 deletions
148
EnlighterJS/Resources/ExampleData/ThemeDevelopment.phtml
Normal file
148
EnlighterJS/Resources/ExampleData/ThemeDevelopment.phtml
Normal file
|
@ -0,0 +1,148 @@
|
|||
<?php require('Resources/Templates/ExampleHeader.phtml'); ?>
|
||||
|
||||
<!-- Your Custom Theme -->
|
||||
<link rel="stylesheet" href="../Source/Themes/Template.MyTheme.css" />
|
||||
|
||||
<!-- Initialize EnlighterJS -->
|
||||
<meta name="EnlighterJS" content="Advanced javascript based syntax highlighting" data-language="javascript" data-theme="mytheme" data-indent="2" data-selector-block="pre" data-selector-inline="code" />
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- Begin page content -->
|
||||
<div class="container">
|
||||
<div class="page-header">
|
||||
<h1>
|
||||
<strong>EnlighterJS</strong> <small>Theme Development</small>
|
||||
</h1>
|
||||
</div>
|
||||
<div id="content">
|
||||
<!-- ############################################################# -->
|
||||
<div class="well">Start your Theme-Development by editing the file <strong>Source/Themes/Template.MyTheme.css</strong> - all changes will directly appear into this document without the need of a rebuild!</div>
|
||||
|
||||
|
||||
<h2>Inline Content</h2>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
||||
<code class="special">window.addEvent('domready', function(){});</code>
|
||||
invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.<br /> Lorem ipsum dolor sit amet,
|
||||
<code>not highlighted</code>
|
||||
consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
|
||||
</p>
|
||||
|
||||
<h2>HTML Content</h2>
|
||||
<pre data-enlighter-language="html">
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<!-- Include EnlighterJS Styles -->
|
||||
<link rel="stylesheet" type="text/css" href="../Build/EnlighterJS.yui.css" />
|
||||
|
||||
<!-- Include MooTools Framework -->
|
||||
<script type="text/javascript" src="mootools-core-1.4.5-full-nocompat.js"></script>
|
||||
|
||||
<!-- Include EnlighterJS -->
|
||||
<script type="text/javascript" src="../Build/EnlighterJS.yui.js" ></script>
|
||||
|
||||
<!-- Initialize EnlighterJS -->
|
||||
<script type="text/javascript">
|
||||
window.addEvent('domready', function() {
|
||||
// highlight all pre tags
|
||||
$$('pre').light({
|
||||
altLines : 'hover',
|
||||
indent : 2,
|
||||
editable: false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- Syntax highlight using Languages/Js.js and default theme -->
|
||||
<pre data-enlighter-language="css">var myClass = new Class({})</pre>
|
||||
|
||||
<!-- Syntax highlight using Languages/Php.js and theme from Themes/Twilight.css -->
|
||||
<pre data-enlighter-language="php" data-enlighter-theme="twilight"><?php php_info() ?></pre>
|
||||
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>JS Content</h2>
|
||||
<pre class="special" data-enlighter-group="g1" id="Lightit1" data-enlighter-lineoffset="5" data-enlighter-title="Javascript1" data-enlighter-highlight="10,16-19">
|
||||
window.addEvent('domready', function(){
|
||||
// metadata config available ? -> autoinit
|
||||
var m = document.getElement('meta[name="EnlighterJS"]');
|
||||
|
||||
// check instance
|
||||
if (!m){
|
||||
return;
|
||||
}
|
||||
|
||||
// create new options object
|
||||
var options = {
|
||||
language: m.get('data-language') || 'generic',
|
||||
theme: m.get('data-theme') || 'Enlighter',
|
||||
indent: m.get('data-indent').toInt() || -1,
|
||||
hover: m.get('data-hover') || 'hoverEnabled'
|
||||
};
|
||||
|
||||
// selector available ? if not, match all pre-tags
|
||||
var blockSelector = m.get('data-selector-block') || 'pre';
|
||||
|
||||
// selector available ? if not, match all code-tags
|
||||
var inlineSelector = m.get('data-selector-inline') || 'code';
|
||||
});
|
||||
</pre>
|
||||
|
||||
<pre class="special" data-enlighter-group="g1" data-enlighter-linenums="true" data-enlighter-title="TypeScript ?!" data-enlighter-theme="mootools">
|
||||
|
||||
|
||||
// create output container element
|
||||
var container = new Element(this.options.containerTag);
|
||||
|
||||
// set class and id attributes.
|
||||
container.addClass(theme + 'EnlighterJS');
|
||||
container.addClass('EnlighterJSRendered');
|
||||
container.set('id', 'EnlighterJS_' + String.uniqueID());
|
||||
|
||||
// generate output based on ordered list of tokens
|
||||
language.getTokens().each(function(token, index){
|
||||
// get classname
|
||||
var className = token.type ? (language.aliases[token.type] || token.type) : '';
|
||||
|
||||
|
||||
|
||||
|
||||
// create new inline element which contains the token - htmlspecialchars get escaped by mootools setText !
|
||||
container.grab(new Element('span', {
|
||||
'class': className,
|
||||
'text': token.text
|
||||
}));
|
||||
});
|
||||
|
||||
return container;
|
||||
</pre>
|
||||
<pre class="special" data-enlighter-group="g1" data-enlighter-linenums="true" data-enlighter-theme="mootools">
|
||||
// set class and id attributes.
|
||||
container.addClass(theme + 'EnlighterJS');
|
||||
container.addClass('EnlighterJSRendered');
|
||||
container.set('id', 'EnlighterJS_' + String.uniqueID());
|
||||
</pre>
|
||||
<h2>No-Highlight</h2>
|
||||
<pre data-enlighter-language="no-highlight" data-enlighter-highlight="3,6-9" id="NoLight" class="special">
|
||||
// create output container element
|
||||
var container = new Element(this.options.containerTag);
|
||||
|
||||
// set class and id attributes.
|
||||
container.addClass(theme + 'EnlighterJS');
|
||||
container.addClass('EnlighterJSRendered');
|
||||
container.set('id', 'EnlighterJS_' + String.uniqueID());
|
||||
</pre>
|
||||
|
||||
|
||||
<!-- ############################################################# -->
|
||||
</div>
|
||||
<!-- // content -->
|
||||
|
||||
|
||||
</div>
|
||||
<!-- // container -->
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue