theme for docs
This commit is contained in:
parent
549af03c1d
commit
e858f15f47
@ -11,7 +11,7 @@ $pages = array();
|
||||
$allPages = array();
|
||||
|
||||
// Object Page for the page filtered by the user
|
||||
$page = false;
|
||||
$page = $Page = false;
|
||||
|
||||
// Array with all page parents published
|
||||
//$pageParents = array();
|
||||
@ -42,7 +42,7 @@ if( $dbPages->scheduler() ) {
|
||||
if( $Url->whereAmI()==='page' ) {
|
||||
|
||||
// Build the page
|
||||
$page = buildPage( $Url->slug() );
|
||||
$page = $Page = buildPage( $Url->slug() );
|
||||
|
||||
// The page doesn't exist
|
||||
if($page===false) {
|
||||
|
337
bl-themes/docs/css/blog.css
Normal file
337
bl-themes/docs/css/blog.css
Normal file
@ -0,0 +1,337 @@
|
||||
|
||||
/* ------------------------
|
||||
Default tags
|
||||
------------------------ */
|
||||
* {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: #2672ec;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
a:focus
|
||||
{
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 1.4em 0;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
table {
|
||||
empty-cells: show;
|
||||
border: 1px solid #cbcbcb;
|
||||
width: 100%;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
thead {
|
||||
background-color: #e0e0e0;
|
||||
color: #000;
|
||||
text-align: left;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
tr {
|
||||
display: table-row;
|
||||
vertical-align: inherit;
|
||||
border-color: inherit;
|
||||
}
|
||||
|
||||
tr:nth-child(even) {background-color: #f2f2f2}
|
||||
|
||||
tr:hover {background-color: #e7f0ff}
|
||||
|
||||
th, td {
|
||||
padding: 0.5em 1em;
|
||||
}
|
||||
|
||||
pre, code {
|
||||
white-space: pre-wrap !important;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
color: #7e7e7e;
|
||||
font-family: "Helvetica Neue",Arial,sans-serif;
|
||||
font-style: italic;
|
||||
font-weight: 200;
|
||||
margin: 26px 40px;
|
||||
}
|
||||
|
||||
.note {
|
||||
background: #FFB06C;
|
||||
color: #777;
|
||||
font-size: 0.9em;
|
||||
margin: 30px 0;
|
||||
}
|
||||
|
||||
.note-title {
|
||||
color: #fff;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.note p {
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
padding: 12px 10px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* ------------------------
|
||||
Content / Main
|
||||
------------------------ */
|
||||
#layout {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 2em 1em 0;
|
||||
}
|
||||
|
||||
.subhead {
|
||||
text-transform: uppercase;
|
||||
color: #aaa;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 0.4em 0;
|
||||
font-size: 80%;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.1em;
|
||||
}
|
||||
|
||||
.footer {
|
||||
font-size: 0.9em;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
margin: 30px 0;
|
||||
}
|
||||
|
||||
/* ------------------------
|
||||
Paginator
|
||||
------------------------ */
|
||||
#paginator {
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
#paginator a {
|
||||
color: #2672ec;
|
||||
}
|
||||
|
||||
#paginator ul {
|
||||
clear: both;
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
overflow: auto;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#paginator li {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#paginator li.left {
|
||||
float: left !important;
|
||||
}
|
||||
|
||||
#paginator li.list {
|
||||
background: #e0e0e0;
|
||||
color: #747474;
|
||||
padding: 2px 11px;
|
||||
}
|
||||
|
||||
#paginator li.right {
|
||||
float: right !important;
|
||||
}
|
||||
|
||||
/* ------------------------
|
||||
Pages and Posts
|
||||
------------------------ */
|
||||
.page,
|
||||
.post {
|
||||
margin: 0 0 70px 0;
|
||||
}
|
||||
|
||||
.page-title,
|
||||
.post-title
|
||||
{
|
||||
font-size: 2.6em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.page-title a,
|
||||
.post-title a
|
||||
{
|
||||
color: #555;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.page a.read-more,
|
||||
.post a.read-more{
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding: 2px 5px;
|
||||
}
|
||||
|
||||
|
||||
.page-content,
|
||||
.post-content {
|
||||
color: #444;
|
||||
line-height: 1.7em;
|
||||
margin-top: 22px;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
.page-content hr,
|
||||
.post-content hr {
|
||||
display: block;
|
||||
height: 1px;
|
||||
border: 0;
|
||||
border-top: 1px solid #ccc;
|
||||
margin: 30px 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.page-content h2,
|
||||
.post-content h2
|
||||
{
|
||||
color: #555;
|
||||
margin: 30px 0 30px 0;
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
.page-content h3,
|
||||
.post-content h3
|
||||
{
|
||||
color: #555;
|
||||
margin: 35px 0 25px 0;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.page-content h4,
|
||||
.post-content h4
|
||||
{
|
||||
color: #555;
|
||||
margin: 25px 0 15px 0;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.post-meta,
|
||||
.page-meta {
|
||||
font-size: 90%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.post-meta span.date,
|
||||
.page-meta span.date {
|
||||
color: #999;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.post-meta span.author,
|
||||
.page-meta span.author {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
/* ------------------------
|
||||
Sidebar
|
||||
------------------------ */
|
||||
.sidebar {
|
||||
|
||||
}
|
||||
|
||||
.sidebar-content {
|
||||
padding: 30px 10px 0 30px;
|
||||
}
|
||||
|
||||
.sidebar a {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.sidebar a:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.sidebar h1.title {
|
||||
font-size: 1.4em;
|
||||
font-weight: lighter;
|
||||
margin: 0 0 0 20px;
|
||||
padding: 0;
|
||||
color: #333;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* ------------------------
|
||||
Plugins
|
||||
------------------------ */
|
||||
div.plugin {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
div.plugin h2 {
|
||||
border-bottom: 1px solid #ccc;
|
||||
color: #ccc;
|
||||
display: inline-block;
|
||||
font-size: 1em;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
div.plugin-content {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
div.plugin-content li {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
div.plugin-content ul {
|
||||
display: block;
|
||||
list-style-type: none;
|
||||
margin: 5px 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.plugin-content ul > li > ul > li {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
div.plugin-content ul > li > ul > li > a {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
div.plugin-pages span.parent {
|
||||
color: #2672ec;
|
||||
display: inline-block;
|
||||
font-size: 1.2em;
|
||||
margin: 8px 0 2px;
|
||||
padding: 10px 0 4px 10px;
|
||||
}
|
||||
|
||||
div.plugin-pages h2 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* ------------------------
|
||||
Responsive
|
||||
------------------------ */
|
||||
|
||||
@media (min-width: 48em) {
|
||||
.content {
|
||||
padding: 1em 3em 0;
|
||||
margin-left: 25%;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
7
bl-themes/docs/css/grids-responsive-min.css
vendored
Normal file
7
bl-themes/docs/css/grids-responsive-min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
11
bl-themes/docs/css/pure-min.css
vendored
Normal file
11
bl-themes/docs/css/pure-min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
91
bl-themes/docs/css/rainbow.github.css
Normal file
91
bl-themes/docs/css/rainbow.github.css
Normal file
@ -0,0 +1,91 @@
|
||||
/**
|
||||
* GitHub theme
|
||||
*
|
||||
* @author Craig Campbell
|
||||
* @version 1.0.4
|
||||
*/
|
||||
code {
|
||||
border: 1px solid #E7F0FF;
|
||||
margin: 0px 2px;
|
||||
padding: 2px 5px;
|
||||
background: #E7F0FF;
|
||||
color: #2672ec;
|
||||
}
|
||||
|
||||
pre {
|
||||
border: 1px solid #E7E9EE;
|
||||
word-wrap: break-word;
|
||||
padding: 6px 10px;
|
||||
line-height: 19px;
|
||||
margin-bottom: 20px;
|
||||
color: #4d4d4c;
|
||||
background: #F6F6F6 !important;
|
||||
}
|
||||
|
||||
pre code {
|
||||
border: 0px;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
-moz-border-radius: 0px;
|
||||
-webkit-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
background: #F6F6F6 !important;
|
||||
color: #444444;
|
||||
}
|
||||
|
||||
pre, code {
|
||||
font-family: Consolas, 'Liberation Mono', Courier, monospace;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
pre, pre code {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
pre .comment {
|
||||
color: #998;
|
||||
}
|
||||
|
||||
pre .support {
|
||||
color: #0086B3;
|
||||
}
|
||||
|
||||
pre .tag, pre .tag-name {
|
||||
color: navy;
|
||||
}
|
||||
|
||||
pre .keyword, pre .css-property, pre .vendor-prefix, pre .sass, pre .class, pre .id, pre .css-value, pre .entity.function, pre .storage.function {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
pre .css-property, pre .css-value, pre .vendor-prefix, pre .support.namespace {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
pre .constant.numeric, pre .keyword.unit, pre .hex-color {
|
||||
font-weight: normal;
|
||||
color: #099;
|
||||
}
|
||||
|
||||
pre .entity.class {
|
||||
color: #458;
|
||||
}
|
||||
|
||||
pre .entity.id, pre .entity.function {
|
||||
color: #900;
|
||||
}
|
||||
|
||||
pre .attribute, pre .variable {
|
||||
color: teal;
|
||||
}
|
||||
|
||||
pre .string, pre .support.value {
|
||||
font-weight: normal;
|
||||
color: #d14;
|
||||
}
|
||||
|
||||
pre .regexp {
|
||||
color: #009926;
|
||||
}
|
BIN
bl-themes/docs/img/favicon.png
Normal file
BIN
bl-themes/docs/img/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1005 B |
54
bl-themes/docs/index.php
Normal file
54
bl-themes/docs/index.php
Normal file
@ -0,0 +1,54 @@
|
||||
<!doctype html>
|
||||
<html lang="<?php echo $Site->language() ?>">
|
||||
<head>
|
||||
|
||||
<!-- Meta tags -->
|
||||
<?php include('php/head.php') ?>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Plugins Site Body Begin -->
|
||||
<?php Theme::plugins('siteBodyBegin') ?>
|
||||
|
||||
<!-- Layout -->
|
||||
<div id="layout" class="pure-g">
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar pure-u-1 pure-u-md-1-4">
|
||||
<?php include('php/sidebar.php') ?>
|
||||
</div>
|
||||
|
||||
<!-- Main -->
|
||||
<div class="content pure-u-1 pure-u-md-3-4">
|
||||
|
||||
<!-- Content -->
|
||||
<?php
|
||||
if( ($Url->whereAmI()=='home') || ($Url->whereAmI()=='tag') )
|
||||
{
|
||||
include('php/home.php');
|
||||
}
|
||||
elseif($Url->whereAmI()=='post')
|
||||
{
|
||||
include('php/post.php');
|
||||
}
|
||||
elseif($Url->whereAmI()=='page')
|
||||
{
|
||||
include('php/page.php');
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- Footer -->
|
||||
<div class="footer">
|
||||
<p><?php echo $Site->footer(); ?> | <?php echo $Language->get('Powered by') ?> <a target="_blank" href="http://www.bludit.com">Bludit</a></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Plugins Site Body End -->
|
||||
<?php Theme::plugins('siteBodyEnd') ?>
|
||||
|
||||
</body>
|
||||
</html>
|
0
bl-themes/docs/init.php
Normal file
0
bl-themes/docs/init.php
Normal file
44
bl-themes/docs/js/rainbow.min.js
vendored
Normal file
44
bl-themes/docs/js/rainbow.min.js
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/* Rainbow v1.2 rainbowco.de | included languages: c, shell, java, d, coffeescript, generic, scheme, javascript, r, haskell, python, html, smalltalk, csharp, go, php, ruby, lua, css */
|
||||
var k=!0;
|
||||
window.Rainbow=function(){function r(a){var b,c=a.getAttribute&&a.getAttribute("data-language")||0;if(!c){a=a.attributes;for(b=0;b<a.length;++b)if("data-language"===a[b].nodeName)return a[b].nodeValue}return c}function C(a){var b=r(a)||r(a.parentNode);if(!b){var c=/\blang(?:uage)?-(\w+)/;(a=a.className.match(c)||a.parentNode.className.match(c))&&(b=a[1])}return b}function D(a,b){for(var c in f[d]){c=parseInt(c,10);if(a==c&&b==f[d][c]?0:a<=c&&b>=f[d][c])delete f[d][c],delete j[d][c];if(a>=c&&a<f[d][c]||
|
||||
b>c&&b<f[d][c])return k}return!1}function s(a,b){return'<span class="'+a.replace(/\./g," ")+(m?" "+m:"")+'">'+b+"</span>"}function t(a,b,c,i){if("undefined"===typeof a||null===a)i();else{var e=a.exec(c);if(e){++u;!b.name&&"string"==typeof b.matches[0]&&(b.name=b.matches[0],delete b.matches[0]);var l=e[0],g=e.index,v=e[0].length+g,h=function(){function e(){t(a,b,c,i)}u%100>0?e():setTimeout(e,0)};if(D(g,v))h();else{var n=w(b.matches),m=function(a,c,i){if(a>=c.length)i(l);else{var d=e[c[a]];if(d){var g=
|
||||
b.matches[c[a]],f=g.language,h=g.name&&g.matches?g.matches:g,j=function(b,d,g){var f;f=0;var h;for(h=1;h<c[a];++h)e[h]&&(f=f+e[h].length);d=g?s(g,d):d;l=l.substr(0,f)+l.substr(f).replace(b,d);m(++a,c,i)};f?o(d,f,function(a){j(d,a)}):typeof g==="string"?j(d,d,g):x(d,h.length?h:[h],function(a){j(d,a,g.matches?g.name:0)})}else m(++a,c,i)}};m(0,n,function(a){b.name&&(a=s(b.name,a));if(!j[d]){j[d]={};f[d]={}}j[d][g]={replace:e[0],"with":a};f[d][g]=v;h()})}}else i()}}function w(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&
|
||||
b.push(c);return b.sort(function(a,b){return b-a})}function x(a,b,c){function i(b,l){l<b.length?t(b[l].pattern,b[l],a,function(){i(b,++l)}):E(a,function(a){delete j[d];delete f[d];--d;c(a)})}++d;i(b,0)}function E(a,b){function c(a,b,i,f){if(i<b.length){++y;var h=b[i],m=j[d][h],a=a.substr(0,h)+a.substr(h).replace(m.replace,m["with"]),h=function(){c(a,b,++i,f)};0<y%250?h():setTimeout(h,0)}else f(a)}var i=w(j[d]);c(a,i,0,b)}function o(a,b,c){var d=n[b]||[],e=n[z]||[],b=A[b]?d:d.concat(e);x(a.replace(/</g,
|
||||
"<").replace(/>/g,">").replace(/&(?![\w\#]+;)/g,"&"),b,c)}function p(a,b,c){if(b<a.length){var d=a[b],e=C(d);return!(-1<(" "+d.className+" ").indexOf(" rainbow "))&&e?(e=e.toLowerCase(),d.className+=d.className?" rainbow":"rainbow",o(d.innerHTML,e,function(l){d.innerHTML=l;j={};f={};q&&q(d,e);setTimeout(function(){p(a,++b,c)},0)})):p(a,++b,c)}c&&c()}function B(a,b){var a=a&&"function"==typeof a.getElementsByTagName?a:document,c=a.getElementsByTagName("pre"),d=a.getElementsByTagName("code"),
|
||||
e,f=[],g=[];for(e=0;e<c.length;++e)c[e].getElementsByTagName("code").length?c[e].innerHTML=c[e].innerHTML.replace(/^\s+/,"").replace(/\s+$/,""):f.push(c[e]);for(e=0;e<d.length;++e)g.push(d[e]);p(g.concat(f),0,b)}var j={},f={},n={},A={},d=0,z=0,u=0,y=0,m,q;return{extend:function(a,b,c){1==arguments.length&&(b=a,a=z);A[a]=c;n[a]=b.concat(n[a]||[])},c:function(a){q=a},a:function(a){m=a},color:function(a,b,c){if("string"==typeof a)return o(a,b,c);if("function"==typeof a)return B(0,a);B(a,b)}}}();
|
||||
document.addEventListener?document.addEventListener("DOMContentLoaded",Rainbow.color,!1):window.attachEvent("onload",Rainbow.color);Rainbow.onHighlight=Rainbow.c;Rainbow.addClass=Rainbow.a;Rainbow.extend("c",[{name:"meta.preprocessor",matches:{1:[{matches:{1:"keyword.define",2:"entity.name"},pattern:/(\w+)\s(\w+)\b/g},{name:"keyword.define",pattern:/endif/g},{name:"constant.numeric",pattern:/\d+/g},{matches:{1:"keyword.include",2:"string"},pattern:/(include)\s(.*?)$/g}]},pattern:/\#([\S\s]*?)$/gm},{name:"keyword",pattern:/\b(do|goto|typedef)\b/g},{name:"entity.label",pattern:/\w+:/g},{matches:{1:"storage.type",3:"storage.type",4:"entity.name.function"},pattern:/\b((un)?signed|const)? ?(void|char|short|int|long|float|double)\*? +((\w+)(?= ?\())?/g},
|
||||
{matches:{2:"entity.name.function"},pattern:/(\w|\*) +((\w+)(?= ?\())/g},{name:"storage.modifier",pattern:/\b(static|extern|auto|register|volatile|inline)\b/g},{name:"support.type",pattern:/\b(struct|union|enum)\b/g}]);Rainbow.extend("shell",[{name:"shell",matches:{1:{language:"shell"}},pattern:/\$\(([\s\S]*?)\)/gm},{matches:{2:"string"},pattern:/(\(|\s|\[|\=)(('|")[\s\S]*?(\3))/gm},{name:"keyword.operator",pattern:/<|>|&/g},{name:"comment",pattern:/\#[\s\S]*?$/gm},{name:"storage.function",pattern:/(.+?)(?=\(\)\s{0,}\{)/g},{name:"support.command",pattern:/\b(echo|rm|ls|(mk|rm)dir|cd|find|cp|exit|pwd|exec|trap|source|shift|unset)/g},{matches:{1:"keyword"},pattern:/\b(break|case|continue|do|done|elif|else|esac|eval|export|fi|for|function|if|in|local|return|set|then|unset|until|while)(?=\(|\b)/g}],
|
||||
k);Rainbow.extend("java",[{name:"constant",pattern:/\b(false|null|true|[A-Z_]+)\b/g},{b:{1:"keyword",2:"support.namespace"},pattern:/(import|package)\s(.+)/g},{name:"keyword",pattern:/\b(abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|transient|try|void|volatile|while)\b/g},
|
||||
{name:"string",pattern:/(".*?")/g},{name:"char",pattern:/(')(.|\\.|\\u[\dA-Fa-f]{4})\1/g},{name:"integer",pattern:/\b(0x[\da-f]+|\d+)L?\b/g},{name:"comment",pattern:/\/\*[\s\S]*?\*\/|(\/\/).*?$/gm},{name:"support.annotation",pattern:/@\w+/g},{b:{1:"entity.function"},pattern:/([^@\.\s]+)\(/g},{name:"entity.class",pattern:/\b([A-Z]\w*)\b/g},{name:"operator",pattern:/(\+{1,2}|-{1,2}|~|!|\*|\/|%|(?:<){1,2}|(?:>){1,3}|instanceof|(?:&){1,2}|\^|\|{1,2}|\?|:|(?:=|!|\+|-|\*|\/|%|\^|\||(?:<){1,2}|(?:>){1,3})?=)/g}],
|
||||
k);Rainbow.extend("d",[{name:"constant",pattern:/\b(false|null|true)\b/gm},{name:"keyword",pattern:/\b(abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|else|enum|export|extern|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|in|inout|int|interface|invariant|ireal|is|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|__FILE__|__LINE__|__gshared|__traits|__vector|__parameters)\b/gm},
|
||||
{matches:{1:"keyword",2:{name:"support.class",pattern:/\w+/gm}},pattern:/(typeof)\s([^\$].*?)(\)|;)/gm},{matches:{1:"keyword.namespace",2:{name:"support.namespace",pattern:/\w+/gm}},pattern:/\b(namespace)\s(.*?);/gm},{matches:{1:"storage.modifier",2:"storage.class",3:"entity.name.class",4:"storage.modifier.extends",5:"entity.other.inherited-class"},pattern:/\b(abstract|sealed)?\s?(class)\s(\w+)(\sextends\s)?([\w\\]*)?\s?\{?(\n|\})/gm},{name:"keyword.static",pattern:/\b(static)\b/gm},{matches:{1:"keyword.new",
|
||||
2:{name:"support.class",pattern:/\w+/gm}},pattern:/\b(new)\s([^\$].*?)(?=\)|\(|;|&)/gm},{name:"string",pattern:/("|')(.*?)\1/gm},{name:"integer",pattern:/\b(0x[\da-f]+|\d+)\b/gm},{name:"comment",pattern:/\/\*[\s\S]*?\*\/|\/\+[\s\S]*?\+\/|(\/\/)[\s\S]*?$/gm},{name:"operator",pattern:/(\/|\/=|&=|&&|&|\|=|\|\|\||\-=|\-\-|\-|\+=|\+\+|\+|<=|<<|<|<<=|<>=|<>|>|>>>=|>>=|>=|>>|>>>|!=|!<>=|!<>|!<=|!<|!>=|!>|!|[|]|\$|==|=|\*=|\*|%=|%|\^\^=|\^=|\^\^|\^|~=|~|@|=>|\:)/gm}],
|
||||
k);Rainbow.extend("coffeescript",[{name:"comment.block",pattern:/(\#{3})[\s\S]*\1/gm},{name:"string.block",pattern:/('{3}|"{3})[\s\S]*\1/gm},{name:"string.regex",matches:{2:{name:"comment",pattern:/\#(.*?)\n/g}},pattern:/(\/{3})([\s\S]*)\1/gm},{matches:{1:"keyword"},pattern:/\b(in|when|is|isnt|of|not|unless|until|super)(?=\b)/gi},{name:"keyword.operator",pattern:/\?/g},{name:"constant.language",pattern:/\b(undefined|yes|on|no|off)\b/g},{name:"keyword.variable.coffee",pattern:/@(\w+)/gi},{name:"reset",
|
||||
pattern:/object|class|print/gi},{matches:{1:"entity.name.function",2:"keyword.operator",3:{name:"function.argument.coffee",pattern:/([\@\w]+)/g},4:"keyword.function"},pattern:/(\w+)\s{0,}(=|:)\s{0,}\((.*?)((-|=)>)/gi},{matches:{1:{name:"function.argument.coffee",pattern:/([\@\w]+)/g},2:"keyword.function"},pattern:/\s\((.*?)\)\s{0,}((-|=)>)/gi},{matches:{1:"entity.name.function",2:"keyword.operator",3:"keyword.function"},pattern:/(\w+)\s{0,}(=|:)\s{0,}((-|=)>)/gi},{matches:{1:"storage.class",
|
||||
2:"entity.name.class",3:"storage.modifier.extends",4:"entity.other.inherited-class"},pattern:/\b(class)\s(\w+)(\sextends\s)?([\w\\]*)?\b/g},{matches:{1:"keyword.new",2:{name:"support.class",pattern:/\w+/g}},pattern:/\b(new)\s(.*?)(?=\s)/g}]);Rainbow.extend([{matches:{1:[{name:"keyword.operator",pattern:/\=|\+/g},{name:"keyword.dot",pattern:/\./g}],2:{name:"string",matches:{name:"constant.character.escape",pattern:/\\('|"){1}/g}}},pattern:/(\(|\s|\[|\=|:|\+|\.)(('|")([^\\\1]|\\.)*?(\3))/gm},{name:"comment",pattern:/\/\*[\s\S]*?\*\/|(\/\/|\#)[\s\S]*?$/gm},{name:"constant.numeric",pattern:/\b(\d+(\.\d+)?(e(\+|\-)?\d+)?(f|d)?|0x[\da-f]+)\b/gi},{matches:{1:"keyword"},pattern:/\b(and|array|as|b(ool(ean)?|reak)|c(ase|atch|har|lass|on(st|tinue))|d(ef|elete|o(uble)?)|e(cho|lse(if)?|xit|xtends|xcept)|f(inally|loat|or(each)?|unction)|global|if|import|int(eger)?|long|new|object|or|pr(int|ivate|otected)|public|return|self|st(ring|ruct|atic)|switch|th(en|is|row)|try|(un)?signed|var|void|while)(?=\(|\b)/gi},
|
||||
{name:"constant.language",pattern:/true|false|null/g},{name:"keyword.operator",pattern:/\+|\!|\-|&(gt|lt|amp);|\||\*|\=/g},{matches:{1:"function.call"},pattern:/(\w+?)(?=\()/g},{matches:{1:"storage.function",2:"entity.name.function"},pattern:/(function)\s(.*?)(?=\()/g}]);Rainbow.extend("scheme",[{name:"plain",pattern:/>|</g},{name:"comment",pattern:/;.*$/gm},{name:"constant.language",pattern:/#t|#f|'\(\)/g},{name:"constant.symbol",pattern:/'[^()\s#]+/g},{name:"constant.number",pattern:/\b\d+(?:\.\d*)?\b/g},{name:"string",pattern:/".+?"/g},{matches:{1:"storage.function",2:"variable"},pattern:/\(\s*(define)\s+\(?(\S+)/g},{matches:{1:"keyword"},pattern:/\(\s*(begin|define\-syntax|if|lambda|quasiquote|quote|set!|syntax\-rules|and|and\-let\*|case|cond|delay|do|else|or|let|let\*|let\-syntax|letrec|letrec\-syntax)(?=[\]()\s#])/g},
|
||||
{matches:{1:"entity.function"},pattern:/\(\s*(eqv\?|eq\?|equal\?|number\?|complex\?|real\?|rational\?|integer\?|exact\?|inexact\?|=|<|>|<=|>=|zero\?|positive\?|negative\?|odd\?|even\?|max|min|\+|\-|\*|\/|abs|quotient|remainder|modulo|gcd|lcm|numerator|denominator|floor|ceiling|truncate|round|rationalize|exp|log|sin|cos|tan|asin|acos|atan|sqrt|expt|make\-rectangular|make\-polar|real\-part|imag\-part|magnitude|angle|exact\->inexact|inexact\->exact|number\->string|string\->number|not|boolean\?|pair\?|cons|car|cdr|set\-car!|set\-cdr!|caar|cadr|cdar|cddr|caaar|caadr|cadar|caddr|cdaar|cdadr|cddar|cdddr|caaaar|caaadr|caadar|caaddr|cadaar|cadadr|caddar|cadddr|cdaaar|cdaadr|cdadar|cdaddr|cddaar|cddadr|cdddar|cddddr|null\?|list\?|list|length|append|reverse|list\-tail|list\-ref|memq|memv|member|assq|assv|assoc|symbol\?|symbol\->string|string\->symbol|char\?|char=\?|char<\?|char>\?|char<=\?|char>=\?|char\-ci=\?|char\-ci<\?|char\-ci>\?|char\-ci<=\?|char\-ci>=\?|char\-alphabetic\?|char\-numeric\?|char\-whitespace\?|char\-upper\-case\?|char\-lower\-case\?|char\->integer|integer\->char|char\-upcase|char\-downcase|string\?|make\-string|string|string\-length|string\-ref|string\-set!|string=\?|string\-ci=\?|string<\?|string>\?|string<=\?|string>=\?|string\-ci<\?|string\-ci>\?|string\-ci<=\?|string\-ci>=\?|substring|string\-append|string\->list|list\->string|string\-copy|string\-fill!|vector\?|make\-vector|vector|vector\-length|vector\-ref|vector\-set!|vector\->list|list\->vector|vector\-fill!|procedure\?|apply|map|for\-each|force|call\-with\-current\-continuation|call\/cc|values|call\-with\-values|dynamic\-wind|eval|scheme\-report\-environment|null\-environment|interaction\-environment|call\-with\-input\-file|call\-with\-output\-file|input\-port\?|output\-port\?|current\-input\-port|current\-output\-port|with\-input\-from\-file|with\-output\-to\-file|open\-input\-file|open\-output\-file|close\-input\-port|close\-output\-port|read|read\-char|peek\-char|eof\-object\?|char\-ready\?|write|display|newline|write\-char|load|transcript\-on|transcript\-off)(?=[\]()\s#])/g}],
|
||||
k);Rainbow.extend("javascript",[{name:"selector",pattern:/(\s|^)\$(?=\.|\()/g},{name:"support",pattern:/\b(window|document)\b/g},{matches:{1:"support.property"},pattern:/\.(length|node(Name|Value))\b/g},{matches:{1:"support.function"},pattern:/(setTimeout|setInterval)(?=\()/g},{matches:{1:"support.method"},pattern:/\.(getAttribute|push|getElementById|getElementsByClassName|log|setTimeout|setInterval)(?=\()/g},{name:"string.regexp",matches:{1:"string.regexp.open",2:{name:"constant.regexp.escape",pattern:/\\(.){1}/g},
|
||||
3:"string.regexp.close",4:"string.regexp.modifier"},pattern:/(\/)(?!\*)(.+)(\/)([igm]{0,3})/g},{matches:{1:"storage",3:"entity.function"},pattern:/(var)?(\s|^)(\S*)(?=\s?=\s?function\()/g},{matches:{1:"keyword",2:"entity.function"},pattern:/(new)\s+(.*)(?=\()/g},{name:"entity.function",pattern:/(\w+)(?=:\s{0,}function)/g}]);Rainbow.extend("r",[{matches:{1:{name:"keyword.operator",pattern:/\=|<\-|<-/g},2:{name:"string",matches:{name:"constant.character.escape",pattern:/\\('|"){1}/g}}},pattern:/(\(|\s|\[|\=|:)(('|")([^\\\1]|\\.)*?(\3))/gm},{matches:{1:"constant.language"},pattern:/\b(NULL|NA|TRUE|FALSE|T|F|NaN|Inf|NA_integer_|NA_real_|NA_complex_|NA_character_)\b/g},{matches:{1:"constant.symbol"},pattern:/[^0-9a-zA-Z\._](LETTERS|letters|month\.(abb|name)|pi)/g},{name:"keyword.operator",pattern:/<-|<-|-|==|<=|<=|>>|>=|<|>|&&|&&|&|&|!=|\|\|?|\*|\+|\^|\/|%%|%\/%|\=|%in%|%\*%|%o%|%x%|\$|:|~|\[{1,2}|\]{1,2}/g},
|
||||
{matches:{1:"storage",3:"entity.function"},pattern:/(\s|^)(.*)(?=\s?=\s?function\s\()/g},{matches:{1:"storage.function"},pattern:/[^a-zA-Z0-9._](function)(?=\s*\()/g},{matches:{1:"namespace",2:"keyword.operator",3:"function.call"},pattern:/([a-zA-Z][a-zA-Z0-9._]+)([:]{2,3})([.a-zA-Z][a-zA-Z0-9._]*(?=\s*\())\b/g},{name:"support.function",pattern:/(^|[^0-9a-zA-Z\._])(array|character|complex|data\.frame|double|integer|list|logical|matrix|numeric|vector)(?=\s*\()/g}]);Rainbow.extend("haskell",[{name:"comment",pattern:/\{\-\-[\s\S(\w+)]+[\-\-][\}$]/gm},{name:"comment",pattern:/\-\-(.*)/g},{matches:{1:"keyword",2:"support.namespace"},pattern:/\b(module)\s(\w+)\s[\(]?(\w+)?[\)?]\swhere/g},{name:"keyword.operator",pattern:/\+|\!|\-|&(gt|lt|amp);|\/\=|\||\@|\:|\.|\+{2}|\:|\*|\=|#|\.{2}|(\\)[a-zA-Z_]/g},{name:"keyword",pattern:/\b(case|class|foreign|hiding|qualified|data|family|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|in|otherwise|module|newtype|of|then|type|where)\b/g},
|
||||
{name:"keyword",pattern:/[\`][a-zA-Z_']*?[\`]/g},{matches:{1:"keyword",2:"keyword.operator"},pattern:/\b(infix|infixr|infixl)+\s\d+\s(\w+)*/g},{name:"entity.class",pattern:/\b([A-Z][A-Za-z0-9_']*)/g},{name:"meta.preprocessor",matches:{1:[{matches:{1:"keyword.define",2:"entity.name"},pattern:/(\w+)\s(\w+)\b/g},{name:"keyword.define",pattern:/endif/g},{name:"constant.numeric",pattern:/\d+/g},{matches:{1:"keyword.include",2:"string"},pattern:/(include)\s(.*?)$/g}]},pattern:/^\#([\S\s]*?)$/gm}]);Rainbow.extend("python",[{name:"variable.self",pattern:/self/g},{name:"constant.language",pattern:/None|True|False|NotImplemented|\.\.\./g},{name:"support.object",pattern:/object/g},{name:"support.function.python",pattern:/\b(bs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|bin|file|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern)(?=\()/g},
|
||||
{matches:{1:"keyword"},pattern:/\b(pass|lambda|with|is|not|in|from|elif|raise|del)(?=\(|\b)/g},{matches:{1:"storage.class",2:"entity.name.class",3:"entity.other.inherited-class"},pattern:/(class)\s+(\w+)\((\w+?)\)/g},{matches:{1:"storage.function",2:"support.magic"},pattern:/(def)\s+(__\w+)(?=\()/g},{name:"support.magic",pattern:/__(name)__/g},{matches:{1:"keyword.control",2:"support.exception.type"},pattern:/(except) (\w+):/g},{matches:{1:"storage.function",2:"entity.name.function"},pattern:/(def)\s+(\w+)(?=\()/g},
|
||||
{name:"entity.name.function.decorator",pattern:/@([\w\.]+)/g},{name:"comment.docstring",pattern:/('{3}|"{3})[\s\S]*?\1/gm}]);Rainbow.extend("html",[{name:"source.php.embedded",matches:{2:{language:"php"}},pattern:/<\?=?(?!xml)(php)?([\s\S]*?)(\?>)/gm},{name:"source.css.embedded",matches:{1:{matches:{1:"support.tag.style",2:[{name:"entity.tag.style",pattern:/^style/g},{name:"string",pattern:/('|")(.*?)(\1)/g},{name:"entity.tag.style.attribute",pattern:/(\w+)/g}],3:"support.tag.style"},pattern:/(<\/?)(style.*?)(>)/g},2:{language:"css"},3:"support.tag.style",4:"entity.tag.style",5:"support.tag.style"},pattern:/(<style.*?>)([\s\S]*?)(<\/)(style)(>)/gm},
|
||||
{name:"source.js.embedded",matches:{1:{matches:{1:"support.tag.script",2:[{name:"entity.tag.script",pattern:/^script/g},{name:"string",pattern:/('|")(.*?)(\1)/g},{name:"entity.tag.script.attribute",pattern:/(\w+)/g}],3:"support.tag.script"},pattern:/(<\/?)(script.*?)(>)/g},2:{language:"javascript"},3:"support.tag.script",4:"entity.tag.script",5:"support.tag.script"},pattern:/(<script(?! src).*?>)([\s\S]*?)(<\/)(script)(>)/gm},{name:"comment.html",pattern:/<\!--[\S\s]*?-->/g},
|
||||
{matches:{1:"support.tag.open",2:"support.tag.close"},pattern:/(<)|(\/?\??>)/g},{name:"support.tag",matches:{1:"support.tag",2:"support.tag.special",3:"support.tag-name"},pattern:/(<\??)(\/|\!?)(\w+)/g},{matches:{1:"support.attribute"},pattern:/([a-z-]+)(?=\=)/gi},{matches:{1:"support.operator",2:"string.quote",3:"string.value",4:"string.quote"},pattern:/(=)('|")(.*?)(\2)/g},{matches:{1:"support.operator",2:"support.value"},pattern:/(=)([a-zA-Z\-0-9]*)\b/g},{matches:{1:"support.attribute"},
|
||||
pattern:/\s(\w+)(?=\s|>)(?![\s\S]*<)/g}],k);Rainbow.extend("smalltalk",[{name:"keyword.pseudovariable",pattern:/self|thisContext/g},{name:"keyword.constant",pattern:/false|nil|true/g},{name:"string",pattern:/'([^']|'')*'/g},{name:"string.symbol",pattern:/#\w+|#'([^']|'')*'/g},{name:"string.character",pattern:/\$\w+/g},{name:"comment",pattern:/"([^"]|"")*"/g},{name:"constant.numeric",pattern:/-?\d+(\.\d+)?((r-?|s)[A-Za-z0-9]+|e-?[0-9]+)?/g},{name:"entity.name.class",pattern:/\b[A-Z]\w*/g},{name:"entity.name.function",pattern:/\b[a-z]\w*:?/g},
|
||||
{name:"entity.name.binary",pattern:/(<|>|&|[=~\|\\\/!@*\-_+])+/g},{name:"operator.delimiter",pattern:/;[\(\)\[\]\{\}]|#\[|#\(^\./g}],k);Rainbow.extend("csharp",[{name:"constant",pattern:/\b(false|null|true)\b/g},{name:"keyword",pattern:/\b(abstract|add|alias|ascending|as|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|descending|double|do|dynamic|else|enum|event|explicit|extern|false|finally|fixed|float|foreach|for|from|get|global|goto|group|if|implicit|int|interface|internal|into|in|is|join|let|lock|long|namespace|new|object|operator|orderby|out|override|params|partial|private|protected|public|readonly|ref|remove|return|sbyte|sealed|select|set|short|sizeof|stackalloc|static|string|struct|switch|this|throw|try|typeof|uint|unchecked|ulong|unsafe|ushort|using|value|var|virtual|void|volatile|where|while|yield)\b/g},
|
||||
{matches:{1:"keyword",2:{name:"support.class",pattern:/\w+/g}},pattern:/(typeof)\s([^\$].*?)(\)|;)/g},{matches:{1:"keyword.namespace",2:{name:"support.namespace",pattern:/\w+/g}},pattern:/\b(namespace)\s(.*?);/g},{matches:{1:"storage.modifier",2:"storage.class",3:"entity.name.class",4:"storage.modifier.extends",5:"entity.other.inherited-class"},pattern:/\b(abstract|sealed)?\s?(class)\s(\w+)(\sextends\s)?([\w\\]*)?\s?\{?(\n|\})/g},{name:"keyword.static",pattern:/\b(static)\b/g},{matches:{1:"keyword.new",
|
||||
2:{name:"support.class",pattern:/\w+/g}},pattern:/\b(new)\s([^\$].*?)(?=\)|\(|;|&)/g},{name:"string",pattern:/(")(.*?)\1/g},{name:"integer",pattern:/\b(0x[\da-f]+|\d+)\b/g},{name:"comment",pattern:/\/\*[\s\S]*?\*\/|(\/\/)[\s\S]*?$/gm},{name:"operator",pattern:/(\+\+|\+=|\+|--|-=|-|<<=|<<|<=|=>|>>=|>>|>=|!=|!|~|\^|\|\||&&|&=|&|\?\?|::|:|\*=|\*|\/=|%=|\|=|==|=)/g},{name:"preprocessor",pattern:/(\#if|\#else|\#elif|\#endif|\#define|\#undef|\#warning|\#error|\#line|\#region|\#endregion|\#pragma)[\s\S]*?$/gm}],
|
||||
k);Rainbow.extend("go",[{matches:{1:{name:"keyword.operator",pattern:/\=/g},2:{name:"string",matches:{name:"constant.character.escape",pattern:/\\(`|"){1}/g}}},pattern:/(\(|\s|\[|\=|:)((`|")([^\\\1]|\\.)*?(\3))/gm},{name:"comment",pattern:/\/\*[\s\S]*?\*\/|(\/\/)[\s\S]*?$/gm},{name:"constant.numeric",pattern:/\b(\d+(\.\d+)?(e(\+|\-)?\d+)?(f|d)?|0x[\da-f]+)\b/gi},{matches:{1:"keyword"},pattern:/\b(break|c(ase|onst|ontinue)|d(efault|efer)|else|fallthrough|for|go(to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)(?=\(|\b)/gi},
|
||||
{name:"constant.language",pattern:/true|false|null|string|byte|rune|u?int(8|16|32|64)?|float(32|64)|complex(64|128)/g},{name:"keyword.operator",pattern:/\+|\!|\-|&(gt|lt|amp);|\||\*|\:?=/g},{matches:{1:"function.call"},pattern:/(\w+?)(?=\()/g},{matches:{1:"storage.function",2:"entity.name.function"},pattern:/(func)\s(.*?)(?=\()/g}]);Rainbow.extend("php",[{name:"support",pattern:/\becho\b/g},{matches:{1:"variable.dollar-sign",2:"variable"},pattern:/(\$)(\w+)\b/g},{name:"constant.language",pattern:/true|false|null/ig},{name:"constant",pattern:/\b[A-Z0-9_]{2,}\b/g},{name:"keyword.dot",pattern:/\./g},{name:"keyword",pattern:/\b(die|end(for(each)?|switch|if)|case|require(_once)?|include(_once)?)(?=\(|\b)/g},{matches:{1:"keyword",2:{name:"support.class",pattern:/\w+/g}},pattern:/(instanceof)\s([^\$].*?)(\)|;)/g},{matches:{1:"support.function"},
|
||||
pattern:/\b(array(_key_exists|_merge|_keys|_shift)?|isset|count|empty|unset|printf|is_(array|string|numeric|object)|sprintf|each|date|time|substr|pos|str(len|pos|tolower|_replace|totime)?|ord|trim|in_array|implode|end|preg_match|explode|fmod|define|link|list|get_class|serialize|file|sort|mail|dir|idate|log|intval|header|chr|function_exists|dirname|preg_replace|file_exists)(?=\()/g},{name:"variable.language.php-tag",pattern:/(<\?(php)?|\?>)/g},{matches:{1:"keyword.namespace",2:{name:"support.namespace",
|
||||
pattern:/\w+/g}},pattern:/\b(namespace|use)\s(.*?);/g},{matches:{1:"storage.modifier",2:"storage.class",3:"entity.name.class",4:"storage.modifier.extends",5:"entity.other.inherited-class",6:"storage.modifier.extends",7:"entity.other.inherited-class"},pattern:/\b(abstract|final)?\s?(class|interface|trait)\s(\w+)(\sextends\s)?([\w\\]*)?(\simplements\s)?([\w\\]*)?\s?\{?(\n|\})/g},{name:"keyword.static",pattern:/self::|static::/g},{matches:{1:"storage.function",2:"support.magic"},pattern:/(function)\s(__.*?)(?=\()/g},
|
||||
{matches:{1:"keyword.new",2:{name:"support.class",pattern:/\w+/g}},pattern:/\b(new)\s([^\$].*?)(?=\)|\(|;)/g},{matches:{1:{name:"support.class",pattern:/\w+/g},2:"keyword.static"},pattern:/([\w\\]*?)(::)(?=\b|\$)/g},{matches:{2:{name:"support.class",pattern:/\w+/g}},pattern:/(\(|,\s?)([\w\\]*?)(?=\s\$)/g}]);Rainbow.extend("ruby",[{matches:{1:"variable.language",2:{language:null}},pattern:/^(__END__)\n((?:.*\n)*)/gm},{name:"string",matches:{1:"string.open",2:[{name:"string.interpolation",matches:{1:"string.open",2:{language:"ruby"},3:"string.close"},pattern:/(\#\{)(.*?)(\})/g}],3:"string.close"},pattern:/("|`)(.*?[^\\\1])?(\1)/g},{name:"string",pattern:/('|"|`)([^\\\1\n]|\\.)*?\1/g},{name:"string",pattern:/%[qQ](?=(\(|\[|\{|<|.)(.*?)(?:'|\)|\]|\}|>|\1))(?:\(\2\)|\[\2\]|\{\2\}|\<\2>|\1\2\1)/g},
|
||||
{matches:{1:"string",2:"string",3:"string"},pattern:/(<<)(\w+).*?$([\s\S]*?^\2)/gm},{matches:{1:"string",2:"string",3:"string"},pattern:/(<<\-)(\w+).*?$([\s\S]*?\2)/gm},{name:"string.regexp",matches:{1:"string.regexp",2:{name:"string.regexp",pattern:/\\(.){1}/g},3:"string.regexp",4:"string.regexp"},pattern:/(\/)(.*?)(\/)([a-z]*)/g},{name:"string.regexp",matches:{1:"string.regexp",2:{name:"string.regexp",pattern:/\\(.){1}/g},3:"string.regexp",4:"string.regexp"},pattern:/%r(?=(\(|\[|\{|<|.)(.*?)('|\)|\]|\}|>|\1))(?:\(\2\)|\[\2\]|\{\2\}|\<\2>|\1\2\1)([a-z]*)/g},
|
||||
{name:"comment",pattern:/#.*$/gm},{name:"comment",pattern:/^\=begin[\s\S]*?\=end$/gm},{matches:{1:"constant"},pattern:/(\w+:)[^:]/g},{matches:{1:"constant.symbol"},pattern:/[^:](:(?:\w+|(?=['"](.*?)['"])(?:"\2"|'\2')))/g},{name:"constant.numeric",pattern:/\b(0x[\da-f]+|\d+)\b/g},{name:"support.class",pattern:/\b[A-Z]\w*(?=((\.|::)[A-Za-z]|\[))/g},{name:"constant",pattern:/\b[A-Z]\w*\b/g},{matches:{1:"storage.class",2:"entity.name.class",3:"entity.other.inherited-class"},pattern:/\s*(class)\s+((?:(?:::)?[A-Z]\w*)+)(?:\s+<\s+((?:(?:::)?[A-Z]\w*)+))?/g},
|
||||
{matches:{1:"storage.module",2:"entity.name.class"},pattern:/\s*(module)\s+((?:(?:::)?[A-Z]\w*)+)/g},{name:"variable.global",pattern:/\$([a-zA-Z_]\w*)\b/g},{name:"variable.class",pattern:/@@([a-zA-Z_]\w*)\b/g},{name:"variable.instance",pattern:/@([a-zA-Z_]\w*)\b/g},{matches:{1:"keyword.control"},pattern:/[^\.]\b(BEGIN|begin|case|class|do|else|elsif|END|end|ensure|for|if|in|module|rescue|then|unless|until|when|while)\b(?![?!])/g},{matches:{1:"keyword.control.pseudo-method"},pattern:/[^\.]\b(alias|alias_method|break|next|redo|retry|return|super|undef|yield)\b(?![?!])|\bdefined\?|\bblock_given\?/g},
|
||||
{matches:{1:"constant.language"},pattern:/\b(nil|true|false)\b(?![?!])/g},{matches:{1:"variable.language"},pattern:/\b(__(FILE|LINE)__|self)\b(?![?!])/g},{matches:{1:"keyword.special-method"},pattern:/\b(require|gem|initialize|new|loop|include|extend|raise|attr_reader|attr_writer|attr_accessor|attr|catch|throw|private|module_function|public|protected)\b(?![?!])/g},{name:"keyword.operator",pattern:/\s\?\s|=|<<|<<=|%=|&=|\*=|\*\*=|\+=|\-=|\^=|\|{1,2}=|<<|<=>|<(?!<|=)|>(?!<|=|>)|<=|>=|===|==|=~|!=|!~|%|&|\*\*|\*|\+|\-|\/|\||~|>>/g},
|
||||
{matches:{1:"keyword.operator.logical"},pattern:/[^\.]\b(and|not|or)\b/g},{matches:{1:"storage.function",2:"entity.name.function"},pattern:/(def)\s(.*?)(?=(\s|\())/g}],k);Rainbow.extend("lua",[{matches:{1:{name:"keyword.operator",pattern:/\=/g},2:{name:"string",matches:{name:"constant.character.escape",pattern:/\\('|"){1}/g}}},pattern:/(\(|\s|\[|\=)(('|")([^\\\1]|\\.)*?(\3))/gm},{name:"comment",pattern:/\-{2}\[{2}\-{2}[\s\S]*?\-{2}\]{2}\-{2}|(\-{2})[\s\S]*?$/gm},{name:"constant.numeric",pattern:/\b(\d+(\.\d+)?(e(\+|\-)?\d+)?(f|d)?|0x[\da-f]+)\b/gi},{matches:{1:"keyword"},pattern:/\b((a|e)nd|in|repeat|break|local|return|do|for|then|else(if)?|function|not|if|or|until|while)(?=\(|\b)/gi},
|
||||
{name:"constant.language",pattern:/true|false|nil/g},{name:"keyword.operator",pattern:/\+|\!|\-|&(gt|lt|amp);|\||\*|\=|#|\.{2}/g},{matches:{1:"storage.function",2:"entity.name.function"},pattern:/(function)\s+(\w+[\:|\.]?\w+?)(?=\()/g},{matches:{1:"support.function"},pattern:/\b(print|require|module|\w+\.\w+)(?=\()/g}],k);Rainbow.extend("css",[{name:"comment",pattern:/\/\*[\s\S]*?\*\//gm},{name:"constant.hex-color",pattern:/#([a-f0-9]{3}|[a-f0-9]{6})(?=;|\s|,|\))/gi},{matches:{1:"constant.numeric",2:"keyword.unit"},pattern:/(\d+)(px|em|cm|s|%)?/g},{name:"string",pattern:/('|")(.*?)\1/g},{name:"support.css-property",matches:{1:"support.vendor-prefix"},pattern:/(-o-|-moz-|-webkit-|-ms-)?[\w-]+(?=\s?:)(?!.*\{)/g},{matches:{1:[{name:"entity.name.sass",pattern:/&/g},{name:"direct-descendant",pattern:/>/g},{name:"entity.name.class",
|
||||
pattern:/\.[\w\-_]+/g},{name:"entity.name.id",pattern:/\#[\w\-_]+/g},{name:"entity.name.pseudo",pattern:/:[\w\-_]+/g},{name:"entity.name.tag",pattern:/\w+/g}]},pattern:/([\w\ ,\n:\.\#\&\;\-_]+)(?=.*\{)/g},{matches:{2:"support.vendor-prefix",3:"support.css-value"},pattern:/(:|,)\s*(-o-|-moz-|-webkit-|-ms-)?([a-zA-Z-]*)(?=\b)(?!.*\{)/g}],k);
|
12
bl-themes/docs/languages/en_US.json
Normal file
12
bl-themes/docs/languages/en_US.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"theme-data":
|
||||
{
|
||||
"name": "Docs",
|
||||
"description": "Docs is based on the framework Pure.css. Website: http://purecss.io",
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "http://www.bludit.com",
|
||||
"version": "0.1",
|
||||
"releaseDate": "2015-08-02"
|
||||
}
|
||||
}
|
10
bl-themes/docs/metadata.json
Normal file
10
bl-themes/docs/metadata.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://github.com/dignajar/bludit-themes",
|
||||
"version": "1.0",
|
||||
"releaseDate": "2016-01-15",
|
||||
"license": "MIT",
|
||||
"compatible": "1.3,1.4,1.5beta",
|
||||
"notes": ""
|
||||
}
|
42
bl-themes/docs/php/head.php
Normal file
42
bl-themes/docs/php/head.php
Normal file
@ -0,0 +1,42 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<?php
|
||||
// CSS from theme/css/
|
||||
Theme::css(array(
|
||||
'pure-min.css',
|
||||
'grids-responsive-min.css',
|
||||
'blog.css',
|
||||
'rainbow.github.css'
|
||||
));
|
||||
|
||||
// Javascript from theme/js/
|
||||
Theme::javascript('rainbow.min.js');
|
||||
|
||||
// <meta name="keywords" content="HTML,CSS,XML,JavaScript">
|
||||
if( $Url->whereAmI()=='page' ) {
|
||||
Theme::keywords( $Page->tags() );
|
||||
Theme::description( $Page->description() );
|
||||
echo '<title>'.$Page->title().' - '.$Site->title().'</title>';
|
||||
}
|
||||
else {
|
||||
Theme::description( $Site->description() );
|
||||
echo '<title>'.$Site->title().'</title>';
|
||||
}
|
||||
?>
|
||||
|
||||
<link rel="shortcut icon" href="<?php echo HTML_PATH_THEME ?>img/favicon.png" type="image/png">
|
||||
|
||||
<!-- Custom Fonts -->
|
||||
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,300,600&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,cyrillic,latin-ext" rel="stylesheet" type="text/css">
|
||||
|
||||
<!-- Pure and Google Fonts -->
|
||||
<style>
|
||||
html, button, input, select, textarea,
|
||||
.pure-g [class *= "pure-u"] {
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Plugins Site Head -->
|
||||
<?php Theme::plugins('siteHead') ?>
|
47
bl-themes/docs/php/home.php
Normal file
47
bl-themes/docs/php/home.php
Normal file
@ -0,0 +1,47 @@
|
||||
<h1 class="subhead"><?php echo $Language->get('Recent posts') ?></h1>
|
||||
|
||||
<?php foreach ($posts as $Post): ?>
|
||||
|
||||
<section class="post">
|
||||
|
||||
<!-- Plugins Post Begin -->
|
||||
<?php Theme::plugins('postBegin') ?>
|
||||
|
||||
<!-- Post header -->
|
||||
<header class="post-header">
|
||||
|
||||
<!-- Post title -->
|
||||
<h2 class="post-title">
|
||||
<a href="<?php echo $Post->permalink() ?>"><?php echo $Post->title() ?></a>
|
||||
</h2>
|
||||
|
||||
<!-- Post date and author -->
|
||||
<div class="post-meta">
|
||||
<span class="date"><?php echo $Post->date() ?></span>
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
<!-- Post content -->
|
||||
<div class="post-content">
|
||||
<?php
|
||||
// Call the method with FALSE to get the first part of the post
|
||||
echo $Post->content(false)
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if($Post->readMore()) { ?>
|
||||
<a class="read-more" href="<?php echo $Post->permalink() ?>"><?php $Language->printMe('Read more') ?></a>
|
||||
<?php } ?>
|
||||
|
||||
<!-- Plugins Post End -->
|
||||
<?php Theme::plugins('postEnd') ?>
|
||||
|
||||
</section>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
<!-- Paginator for posts -->
|
||||
<?php
|
||||
echo Paginator::html();
|
||||
?>
|
26
bl-themes/docs/php/page.php
Normal file
26
bl-themes/docs/php/page.php
Normal file
@ -0,0 +1,26 @@
|
||||
<h1 class="subhead"><?php echo isset($pages[$Page->parentKey()])?$pages[$Page->parentKey()]->title().' -> ':'' ?><?php echo $Page->title() ?></h1>
|
||||
|
||||
<section class="page">
|
||||
|
||||
<!-- Plugins Page Begin -->
|
||||
<?php Theme::plugins('pageBegin') ?>
|
||||
|
||||
<!-- page header -->
|
||||
<header class="page-header">
|
||||
|
||||
<!-- page title -->
|
||||
<h2 class="page-title">
|
||||
<a href="<?php echo $Page->permalink() ?>"><?php echo $Page->title() ?></a>
|
||||
</h2>
|
||||
|
||||
</header>
|
||||
|
||||
<!-- page content -->
|
||||
<div class="page-content">
|
||||
<?php echo $Page->content() ?>
|
||||
</div>
|
||||
|
||||
<!-- Plugins Page End -->
|
||||
<?php Theme::plugins('pageEnd') ?>
|
||||
|
||||
</section>
|
31
bl-themes/docs/php/post.php
Normal file
31
bl-themes/docs/php/post.php
Normal file
@ -0,0 +1,31 @@
|
||||
<h1 class="subhead"><?php echo $Language->get('Post') ?></h1>
|
||||
|
||||
<section class="post">
|
||||
|
||||
<!-- Plugins Post Begin -->
|
||||
<?php Theme::plugins('postBegin') ?>
|
||||
|
||||
<!-- Post header -->
|
||||
<header class="post-header">
|
||||
|
||||
<!-- Post title -->
|
||||
<h2 class="post-title">
|
||||
<a href="<?php echo $Post->permalink() ?>"><?php echo $Post->title() ?></a>
|
||||
</h2>
|
||||
|
||||
<!-- Post date and author -->
|
||||
<div class="post-meta">
|
||||
<span class="date"><?php echo $Post->date() ?></span>
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
<!-- Post content -->
|
||||
<div class="post-content">
|
||||
<?php echo $Post->content() ?>
|
||||
</div>
|
||||
|
||||
<!-- Plugins Post End -->
|
||||
<?php Theme::plugins('postEnd') ?>
|
||||
|
||||
</section>
|
54
bl-themes/docs/php/sidebar.php
Normal file
54
bl-themes/docs/php/sidebar.php
Normal file
@ -0,0 +1,54 @@
|
||||
<div class="sidebar-content">
|
||||
|
||||
<h1 class="title"><?php echo $Site->title() ?></h1>
|
||||
|
||||
<!-- Plugins Sidebar -->
|
||||
<?php //Theme::plugins('siteSidebar') ?>
|
||||
|
||||
<?php
|
||||
|
||||
$html = '<div class="plugin plugin-pages">';
|
||||
$html .= '<div class="plugin-content">';
|
||||
$html .= '<ul>';
|
||||
|
||||
$parents = $pagesParents[NO_PARENT_CHAR];
|
||||
foreach($parents as $parent)
|
||||
{
|
||||
if($parent->published())
|
||||
{
|
||||
// Print the parent
|
||||
$html .= '<li>';
|
||||
$html .= '<span class="parent">'.$parent->title().'</span>';
|
||||
|
||||
// Check if the parent has children
|
||||
if(isset($pagesParents[$parent->key()]))
|
||||
{
|
||||
$children = $pagesParents[$parent->key()];
|
||||
|
||||
// Print children
|
||||
$html .= '<ul>';
|
||||
foreach($children as $child)
|
||||
{
|
||||
if($child->published())
|
||||
{
|
||||
$html .= '<li>';
|
||||
$html .= '<a class="children" href="'.$child->permalink().'">'.$child->title().'</a>';
|
||||
$html .= '</li>';
|
||||
}
|
||||
}
|
||||
$html .= '</ul>';
|
||||
}
|
||||
|
||||
$html .= '</li>';
|
||||
}
|
||||
}
|
||||
|
||||
$html .= '</ul>';
|
||||
$html .= '</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
echo $html;
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user