Skip to content

Commit 75fc324

Browse files
author
Thomas Pollinger
committed
Update for extended blockmark
1 parent f9e16d8 commit 75fc324

8 files changed

Lines changed: 1314 additions & 23 deletions

File tree

demoNewBlockmarks.html

Lines changed: 554 additions & 0 deletions
Large diffs are not rendered by default.

demoNewxBlockmarks.html

Lines changed: 554 additions & 0 deletions
Large diffs are not rendered by default.

demoWSM.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</head>
1212

1313
<body>
14-
<pre class="brush: WSM">
14+
<pre class="brush: wsm;">
1515
&lt;!IoRedDotOpenPage&gt;&lt;a href=&quot;&lt;%infoBackLink%&gt;&quot;&gt;BACK&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;
1616
&lt;hr/&gt;
1717
&lt;!IoRangeDynLink&gt;&lt;%anchorDymanic%&gt;&lt;br/&gt;&lt;!/IoRangeDynLink&gt;

demoxWSM.html

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<html>
2+
3+
<head>
4+
<script type="text/javascript" src="scripts/XRegExp.js"></script>
5+
<script type="text/javascript" src="scripts/shCore.js"></script>
6+
<link href="styles/shCore.css" rel="stylesheet" type="text/css" />
7+
<link href="styles/shThemeDefault.css" rel="stylesheet" type="text/css" />
8+
9+
<script type="text/javascript" src="scripts/shBrushxWSM.js"></script>
10+
<link href="styles/shCorexWSM.css" rel="stylesheet" type="text/css" />
11+
</head>
12+
13+
<body>
14+
<pre class="brush: xwsm;">
15+
&lt;!IoRedDotOpenPage&gt;&lt;a href=&quot;&lt;%infoBackLink%&gt;&quot;&gt;BACK&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;
16+
&lt;hr/&gt;
17+
&lt;!IoRangeDynLink&gt;&lt;%anchorDymanic%&gt;&lt;br/&gt;&lt;!/IoRangeDynLink&gt;
18+
&lt;%!! Store:Get(test) !!%&gt;
19+
&lt;li&gt;
20+
&lt;!-- Render link to the current index page --&gt;
21+
&lt;a href=&quot;&lt;%!! Context:CurrentIndex.GetUrl() !!%&gt;&quot;&gt;
22+
&lt;%!! Context:CurrentIndex.Page.Headline !!%&gt;
23+
&lt;/a&gt;
24+
&lt;reddot:cms&gt;
25+
&lt;if&gt;
26+
If the current index has child pages
27+
&lt;query valuea=&quot;Context:CurrentIndex.HasChildren()&quot; operator=&quot;==&quot; valueb=&quot;Bool:True&quot;&gt;
28+
&lt;htmltext&gt;
29+
&lt;!-- Render list and call next level --&gt;
30+
&lt;ul&gt;
31+
&lt;navigation:nextlevel&gt;
32+
&lt;/ul&gt;
33+
&lt;/htmltext&gt;
34+
&lt;/query&gt;
35+
&lt;/if&gt;
36+
&lt;/reddot:cms&gt;
37+
&lt;/li&gt;
38+
&lt;reddot:cms&gt;
39+
&lt;foreach itemname=&quot;item&quot; object=&quot;Context:CurrentPage.Elements&quot; countername=&quot;counter&quot;&gt;
40+
&lt;output type=&quot;object&quot; object=&quot;Store:counter&quot; /&gt;
41+
&lt;output type=&quot;object&quot; object=&quot;Store:item.Name&quot; /&gt;
42+
&lt;output type=&quot;object&quot; object=&quot;Escape:Br&quot; /&gt;
43+
&lt;/foreach&gt;
44+
&lt;/reddot:cms&gt;
45+
</pre>
46+
<script type='text/javascript'>
47+
SyntaxHighlighter.all();
48+
</script>
49+
</body>
50+
51+
</html>

scripts/shBrushWSM.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
SyntaxHighlighter.brushes.Custom = function () {
1+
SyntaxHighlighter.brushes.wsm = function () {
22
this.regexList = [
3-
{ regex: /&lt;%([^!])+?%&gt;/gm, css: 'placeholder' },
4-
{ regex: /&lt;!(\/?)IoRange(.+?)&gt;/gm, css: 'blockmark' },
5-
{ regex: /&lt;!IoRedDot(.+?)&gt;/gm, css: 'smartedit-wsm' },
6-
{ regex: /&lt;%!!(.+?)!!%&gt;/gm, css: 'rendertag-short' },
7-
{ regex: /&lt;(\/?)reddot:cms&gt;/gm, css: 'rendertag' },
8-
{ regex: /&lt;navigation(.*?)&gt;/gm, css: 'rendertag' },
9-
{ regex: /&lt;(\/?)output(.*?)&gt;/gm, css: 'rendertag' },
10-
{ regex: /&lt;(\/?)foreach(.*?)&gt;/gm, css: 'rendertag' },
11-
{ regex: /&lt;(\/?)if&gt;/gm, css: 'rendertag' },
12-
{ regex: /&lt;(\/?)query(.*?)&gt;/gm, css: 'rendertag' },
13-
{ regex: /&lt;(\/?)htmltext&gt;/gm, css: 'rendertag' },
14-
{ regex: /&lt;(\/?)xmltext&gt;/gm, css: 'rendertag' },
15-
{ regex: /&lt;(\/?)currentPageCommentCount(.*?)&gt;/gm, css: 'rendertag' },
16-
{ regex: /&lt;(\/?)pagesMostCommented(.*?)&gt;/gm, css: 'rendertag' }
3+
{ regex: /&lt;%([^!])+?%&gt;/gm, css: 'wsm-placeholder' },
4+
{ regex: /&lt;!(\/?)IoRange(.+?)&gt;/gm, css: 'wsm-blockmark' },
5+
{ regex: /&lt;!IoRedDot(.+?)&gt;/gm, css: 'wsm-smartedit' },
6+
{ regex: /&lt;%!!(.+?)!!%&gt;/gm, css: 'wsm-rendertag-short' },
7+
{ regex: /&lt;(\/?)reddot:cms&gt;/gm, css: 'wsm-rendertag' },
8+
{ regex: /&lt;navigation(.*?)&gt;/gm, css: 'wsm-rendertag' },
9+
{ regex: /&lt;(\/?)output(.*?)&gt;/gm, css: 'wsm-rendertag' },
10+
{ regex: /&lt;(\/?)foreach(.*?)&gt;/gm, css: 'wsm-rendertag' },
11+
{ regex: /&lt;(\/?)if&gt;/gm, css: 'wsm-rendertag' },
12+
{ regex: /&lt;(\/?)query(.*?)&gt;/gm, css: 'wsm-rendertag' },
13+
{ regex: /&lt;(\/?)htmltext&gt;/gm, css: 'wsm-rendertag' },
14+
{ regex: /&lt;(\/?)xmltext&gt;/gm, css: 'wsm-rendertag' },
15+
{ regex: /&lt;(\/?)currentPageCommentCount(.*?)&gt;/gm, css: 'wsm-rendertag' },
16+
{ regex: /&lt;(\/?)pagesMostCommented(.*?)&gt;/gm, css: 'wsm-rendertag' }
1717
];
1818
};
19-
SyntaxHighlighter.brushes.Custom.prototype = new SyntaxHighlighter.Highlighter();
20-
SyntaxHighlighter.brushes.Custom.aliases = ['WSM'];
19+
SyntaxHighlighter.brushes.wsm.prototype = new SyntaxHighlighter.Highlighter();
20+
SyntaxHighlighter.brushes.wsm.aliases = ['wsm','ms'];

scripts/shBrushxWSM.js

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
SyntaxHighlighter.brushes.xwsm = function () {
2+
this.regexList = [
3+
{ regex: /&lt;%([^!])+?%&gt;/gm, css: 'xplaceholder' },
4+
{ regex: /&lt;!(\/?)IoRangeNavigation&gt;/gm, css: 'xblockmark-navigation' },
5+
{ regex: /&lt;!(\/?)IoRangeNavigationArea&gt;/gm, css: 'xblockmark-navigation' },
6+
{ regex: /&lt;!(\/?)IoRangeIf&gt;/gm, css: 'xblockmark-condition' },
7+
{ regex: /&lt;!(\/?)IoRangeIfExists&gt;/gm, css: 'xblockmark-condition' },
8+
{ regex: /&lt;!(\/?)IoRangeSwitch&gt;/gm, css: 'xblockmark-condition' },
9+
{ regex: /&lt;!(\/?)IoRangeConstraint&gt;/gm, css: 'xblockmark-constraint' },
10+
{ regex: /&lt;!(\/?)IoRangeThen&gt;/gm, css: 'xblockmark' },
11+
{ regex: /&lt;!(\/?)IoRangeElse&gt;/gm, css: 'xblockmark' },
12+
{ regex: /&lt;!(\/?)IoRangeCase&gt;/gm, css: 'xblockmark' },
13+
{ regex: /&lt;!(\/?)IoRangeFor&gt;/gm, css: 'xblockmark-loop' },
14+
{ regex: /&lt;!(\/?)IoRangeForEach&gt;/gm, css: 'xblockmark-loop' },
15+
{ regex: /&lt;!(\/?)IoRangeDo&gt;/gm, css: 'xblockmark' },
16+
{ regex: /&lt;!(\/?)IoRangeComment&gt;/gm, css: 'xblockmark-comment' },
17+
{ regex: /&lt;!(\/?)IoRangeDocumentation&gt;/gm, css: 'xblockmark-comment' },
18+
{ regex: /&lt;!(\/?)IoRangeNoOutput&gt;/gm, css: 'xblockmark-comment' },
19+
{ regex: /&lt;!(\/?)IoRangeImageList&gt;/gm, css: 'xblockmark' },
20+
{ regex: /&lt;!(\/?)IoRangeInclude&gt;/gm, css: 'xblockmark-rendermode' },
21+
{ regex: /&lt;!(\/?)IoRangeMath&gt;/gm, css: 'xblockmark-math' },
22+
{ regex: /&lt;!(\/?)IoRangePreDefinition&gt;/gm, css: 'xblockmark-special' },
23+
{ regex: /&lt;!(\/?)IoRangeTemp&gt;/gm, css: 'xblockmark-special' },
24+
{ regex: /&lt;!(\/?)IoRangeSession&gt;/gm, css: 'xblockmark-special' },
25+
{ regex: /&lt;!(\/?)IoRangeUiSession&gt;/gm, css: 'xblockmark-special' },
26+
{ regex: /&lt;!(\/?)IoRangePreviewMode&gt;/gm, css: 'xblockmark-rendermode' },
27+
{ regex: /&lt;!(\/?)IoRangeEditMode&gt;/gm, css: 'xblockmark-rendermode' },
28+
{ regex: /&lt;!(\/?)IoRangeEditModeOn&gt;/gm, css: 'xblockmark-rendermode' },
29+
{ regex: /&lt;!(\/?)IoRangeEditModeOff&gt;/gm, css: 'xblockmark-rendermode' },
30+
{ regex: /&lt;!(\/?)IoRangePublishMode&gt;/gm, css: 'xblockmark-rendermode' },
31+
{ regex: /&lt;!(\/?)IoRangeRDExecute&gt;/gm, css: 'xblockmark-rendermode' },
32+
{ regex: /&lt;!(\/?)IoRangePreExecute&gt;/gm, css: 'xblockmark-rendermode' },
33+
34+
{ regex: /&lt;!(\/?)IoRangeBlocktyp&gt;/gm, css: 'xblockmark' },
35+
{ regex: /&lt;!(\/?)IoRangeBack&gt;/gm, css: 'xblockmark-navigation' },
36+
{ regex: /&lt;!(\/?)IoRangeBreadCrumb&gt;/gm, css: 'xblockmark-navigation' },
37+
{ regex: /&lt;!(\/?)IoRangeConditional&gt;/gm, css: 'xblockmark-condition' },
38+
{ regex: /&lt;!(\/?)IoRangeData&gt;/gm, css: 'xblockmark' },
39+
{ regex: /&lt;!(\/?)IoRangeDragDrop&gt;/gm, css: 'xblockmark' },
40+
{ regex: /&lt;!(\/?)IoRangeDynLink&gt;/gm, css: 'xblockmark' },
41+
{ regex: /&lt;!(\/?)IoRangeHit&gt;/gm, css: 'xblockmark' },
42+
{ regex: /&lt;!(\/?)IoRangeList&gt;/gm, css: 'xblockmark-loop' },
43+
{ regex: /&lt;!(\/?)IoRangeRedDotMode&gt;/gm, css: 'xblockmark' },
44+
{ regex: /&lt;!(\/?)IoRangeNoRedDotMode&gt;/gm, css: 'xblockmark' },
45+
{ regex: /&lt;!(\/?)IoRangeRedDotEditOnly&gt;/gm, css: 'xblockmark' },
46+
{ regex: /&lt;!(\/?)IoRangeNoEditMode&gt;/gm, css: 'xblockmark' },
47+
48+
{ regex: /&lt;!(\/?)IoRangeX(.+?)&gt;/gm, css: 'xblockmark' },
49+
{ regex: /&lt;!IoRedDot(.+?)&gt;/gm, css: 'xsmartedit-wsm' },
50+
{ regex: /&lt;%!!(.+?)!!%&gt;/gm, css: 'xrendertag-short' },
51+
{ regex: /&lt;(\/?)reddot:cms&gt;/gm, css: 'xrendertag' },
52+
{ regex: /&lt;navigation(.*?)&gt;/gm, css: 'xrendertag' },
53+
{ regex: /&lt;(\/?)output(.*?)&gt;/gm, css: 'xrendertag' },
54+
{ regex: /&lt;(\/?)foreach(.*?)&gt;/gm, css: 'xrendertag' },
55+
{ regex: /&lt;(\/?)if&gt;/gm, css: 'xrendertag' },
56+
{ regex: /&lt;(\/?)query(.*?)&gt;/gm, css: 'xrendertag' },
57+
{ regex: /&lt;(\/?)htmltext&gt;/gm, css: 'xrendertag' },
58+
{ regex: /&lt;(\/?)xmltext&gt;/gm, css: 'xrendertag' },
59+
{ regex: /&lt;(\/?)currentPageCommentCount(.*?)&gt;/gm, css: 'xrendertag' },
60+
{ regex: /&lt;(\/?)pagesMostCommented(.*?)&gt;/gm, css: 'xrendertag' }
61+
];
62+
};
63+
SyntaxHighlighter.brushes.xwsm.prototype = new SyntaxHighlighter.Highlighter();
64+
SyntaxHighlighter.brushes.xwsm.aliases = ['xwsm','xms'];

styles/shCoreWSM.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22
line-height: 1.2em !important;
33
}
44

5-
.syntaxhighlighter .placeholder {
5+
.syntaxhighlighter .wsm-placeholder {
66
color: #000000 !important;
77
background-color: #ffff80 !important;
88
}
99

10-
.syntaxhighlighter .blockmark {
10+
.syntaxhighlighter .wsm-blockmark {
1111
color: #008800 !important;
1212
background-color: #ccffcc !important;
1313
}
1414

15-
.syntaxhighlighter .smartedit-wsm {
15+
.syntaxhighlighter .wsm-smartedit {
1616
color: #ff0000 !important;
1717
background-color: #ffe5e5 !important;
1818
}
1919

20-
.syntaxhighlighter .rendertag {
20+
.syntaxhighlighter .wsm-rendertag {
2121
color: #197674 !important;
2222
background-color: #ccf0ff !important;
2323
}
2424

25-
.syntaxhighlighter .rendertag-short {
25+
.syntaxhighlighter .wsm-rendertag-short {
2626
color: #000000 !important;
2727
background-color: #ccf0ff !important;
2828
}

styles/shCorexWSM.css

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
.syntaxhighlighter a, .syntaxhighlighter div, .syntaxhighlighter code, .syntaxhighlighter table, .syntaxhighlighter table td, .syntaxhighlighter table tr, .syntaxhighlighter table tbody, .syntaxhighlighter table thead, .syntaxhighlighter table caption, .syntaxhighlighter textarea {
2+
line-height: 1.2em !important;
3+
}
4+
5+
.syntaxhighlighter .xplaceholder {
6+
color: #000000 !important;
7+
background-color: #ffff80 !important;
8+
}
9+
10+
.syntaxhighlighter .xblockmark {
11+
color: #008800 !important;
12+
background-color: #ccffcc !important;
13+
}
14+
15+
.syntaxhighlighter .xblockmark-comment {
16+
color: #000000 !important;
17+
background-color: #d8d8d8 !important;
18+
}
19+
20+
.syntaxhighlighter .xblockmark-condition {
21+
color: #8a4b08 !important;
22+
background-color: #f5d0a9 !important;
23+
}
24+
25+
.syntaxhighlighter .xblockmark-loop {
26+
color: #886a08 !important;
27+
background-color: #f3e2a9 !important;
28+
}
29+
30+
.syntaxhighlighter .xblockmark-constraint {
31+
color: #8a2908 !important;
32+
background-color: #f5bca9 !important;
33+
}
34+
35+
.syntaxhighlighter .xblockmark-navigation {
36+
color: #197674 !important;
37+
background-color: #ccf0ff !important;
38+
}
39+
40+
.syntaxhighlighter .xblockmark-rendermode {
41+
color: #08088a !important;
42+
background-color: #cecef6 !important;
43+
}
44+
45+
.syntaxhighlighter .xblockmark-math {
46+
color: #8a0808 !important;
47+
background-color: #f8e0e0 !important;
48+
}
49+
50+
.syntaxhighlighter .xblockmark-special {
51+
color: #610b5e !important;
52+
background-color: #f6cef5 !important;
53+
}
54+
55+
.syntaxhighlighter .xsmartedit-wsm {
56+
color: #ff0000 !important;
57+
background-color: #ffe5e5 !important;
58+
}
59+
60+
.syntaxhighlighter .xrendertag {
61+
color: #197674 !important;
62+
background-color: #ccf0ff !important;
63+
}
64+
65+
.syntaxhighlighter .xrendertag-short {
66+
color: #000000 !important;
67+
background-color: #ccf0ff !important;
68+
}

0 commit comments

Comments
 (0)