")
212 | .html(Settings.template);
213 |
214 | var perc = fromStart ? '-100' : toBarPerc(NProgress.status || 0);
215 |
216 | $el.find('[role="bar"]').css({
217 | transition: 'all 0 linear',
218 | transform: 'translate3d('+perc+'%,0,0)'
219 | });
220 |
221 | if (!Settings.showSpinner)
222 | $el.find('[role="spinner"]').remove();
223 |
224 | $el.appendTo(document.body);
225 |
226 | return $el;
227 | };
228 |
229 | /**
230 | * Removes the element. Opposite of render().
231 | */
232 |
233 | NProgress.remove = function() {
234 | $('html').removeClass('nprogress-busy');
235 | $('#nprogress').remove();
236 | };
237 |
238 | /**
239 | * Checks if the progress bar is rendered.
240 | */
241 |
242 | NProgress.isRendered = function() {
243 | return ($("#nprogress").length > 0);
244 | };
245 |
246 | /**
247 | * Determine which positioning CSS rule to use.
248 | */
249 |
250 | NProgress.getPositioningCSS = function() {
251 | // Sniff on document.body.style
252 | var bodyStyle = document.body.style;
253 |
254 | // Sniff prefixes
255 | var vendorPrefix = ('WebkitTransform' in bodyStyle) ? 'Webkit' :
256 | ('MozTransform' in bodyStyle) ? 'Moz' :
257 | ('msTransform' in bodyStyle) ? 'ms' :
258 | ('OTransform' in bodyStyle) ? 'O' : '';
259 |
260 | if (vendorPrefix + 'Perspective' in bodyStyle) {
261 | // Modern browsers with 3D support, e.g. Webkit, IE10
262 | return 'translate3d';
263 | } else if (vendorPrefix + 'Transform' in bodyStyle) {
264 | // Browsers without 3D support, e.g. IE9
265 | return 'translate';
266 | } else {
267 | // Browsers without translate() support, e.g. IE7-8
268 | return 'margin';
269 | }
270 | };
271 |
272 | /**
273 | * Helpers
274 | */
275 |
276 | function clamp(n, min, max) {
277 | if (n < min) return min;
278 | if (n > max) return max;
279 | return n;
280 | }
281 |
282 | /**
283 | * (Internal) converts a percentage (`0..1`) to a bar translateX
284 | * percentage (`-100%..0%`).
285 | */
286 |
287 | function toBarPerc(n) {
288 | return (-1 + n) * 100;
289 | }
290 |
291 |
292 | /**
293 | * (Internal) returns the correct CSS for changing the bar's
294 | * position given an n percentage, and speed and ease from Settings
295 | */
296 |
297 | function barPositionCSS(n, speed, ease) {
298 | var barCSS;
299 |
300 | if (Settings.positionUsing === 'translate3d') {
301 | barCSS = { transform: 'translate3d('+toBarPerc(n)+'%,0,0)' };
302 | } else if (Settings.positionUsing === 'translate') {
303 | barCSS = { transform: 'translate('+toBarPerc(n)+'%,0)' };
304 | } else {
305 | barCSS = { 'margin-left': toBarPerc(n)+'%' };
306 | }
307 |
308 | barCSS.transition = 'all '+speed+'ms '+ease;
309 |
310 | return barCSS;
311 | }
312 |
313 | return NProgress;
314 | });
315 |
316 |
--------------------------------------------------------------------------------
/assets/js/script.js:
--------------------------------------------------------------------------------
1 |
2 | /*!--------------------------------*\
3 | 3-Jekyll Theme
4 | @author Peiwen Lu (P233)
5 | https://github.com/P233/3-Jekyll
6 | \*---------------------------------*/
7 |
8 | // Detect window size, if less than 1280px add class 'mobile' to sidebar therefore it will be auto hide when trigger the pjax request in small screen devices.
9 | if ($(window).width() <= 1280) {
10 | $('#sidebar').addClass('mobile')
11 | }
12 |
13 | // Variables
14 | var sidebar = $('#sidebar'),
15 | container = $('#post'),
16 | content = $('#pjax'),
17 | button = $('#icon-arrow');
18 |
19 | // Tags switcher
20 | var clickHandler = function(id) {
21 | return function() {
22 | $(this).addClass('active').siblings().removeClass('active');
23 | $('.pl__all').hide();
24 | $('.' + id).delay(50).fadeIn(350);
25 | }
26 | };
27 |
28 | $('#tags__ul li').each(function(index){
29 | $('#' + $(this).attr('id')).on('click', clickHandler($(this).attr('id')));
30 | });
31 |
32 | // If sidebar has class 'mobile', hide it after clicking.
33 | $('.pl__all').on('click', function() {
34 | $(this).addClass('active').siblings().removeClass('active');
35 | if (sidebar.hasClass('mobile')) {
36 | $('#sidebar, #pjax, #icon-arrow').addClass('fullscreen');
37 | }
38 | });
39 |
40 | // Enable fullscreen.
41 | $('#js-fullscreen').on('click', function() {
42 | if (button.hasClass('fullscreen')) {
43 | sidebar.removeClass('fullscreen');
44 | button.removeClass('fullscreen');
45 | content.delay(300).queue(function(){
46 | $(this).removeClass('fullscreen').dequeue();
47 | });
48 | } else {
49 | sidebar.addClass('fullscreen');
50 | button.addClass('fullscreen');
51 | content.delay(200).queue(function(){
52 | $(this).addClass('fullscreen').dequeue();
53 | });
54 | }
55 | });
56 |
57 | $('#mobile-avatar').on('click', function(){
58 | $('#sidebar, #pjax, #icon-arrow').addClass('fullscreen');
59 | });
60 |
61 | // Pjax
62 | $(document).pjax('#avatar, #mobile-avatar, .pl__all', '#pjax', { fragment: '#pjax', timeout: 10000 });
63 | $(document).on({
64 | 'pjax:click': function() {
65 | content.removeClass('fadeIn').addClass('fadeOut');
66 | NProgress.start();
67 | },
68 | 'pjax:start': function() {
69 | content.css({'opacity':0});
70 | },
71 | 'pjax:end': function() {
72 | NProgress.done();
73 | container.scrollTop(0);
74 | content.css({'opacity':1}).removeClass('fadeOut').addClass('fadeIn');
75 | afterPjax();
76 | }
77 | });
78 |
79 | // Re-run scripts for post content after pjax
80 | function afterPjax() {
81 | // Open links in new tab
82 | $('#post__content a').attr('target','_blank');
83 |
84 | // Generate post TOC for h1 h2 and h3
85 | var toc = $('#post__toc-ul');
86 | // Empty TOC and generate an entry for h1
87 | toc.empty().append('
' + $('#post__title').text() + '');
88 |
89 | // Generate entries for h2 and h3
90 | $('#post__content').children('h2,h3').each(function() {
91 | // Generate random ID for each heading
92 | $(this).attr('id', function() {
93 | var ID = "",
94 | alphabet = "abcdefghijklmnopqrstuvwxyz";
95 |
96 | for(var i=0; i < 5; i++) {
97 | ID += alphabet.charAt(Math.floor(Math.random() * alphabet.length));
98 | }
99 | return ID;
100 | });
101 |
102 | if ($(this).prop("tagName") == 'H2') {
103 | toc.append('
' + $(this).text() + '');
104 | } else {
105 | toc.append('
' + $(this).text() + '');
106 | }
107 | });
108 |
109 | // Smooth scrolling
110 | $('.js-anchor-link').on('click', function() {
111 | var target = $(this.hash);
112 | container.animate({scrollTop: target.offset().top + container.scrollTop() - 70}, 500, function() {
113 | target.addClass('flash').delay(700).queue(function() {
114 | $(this).removeClass('flash').dequeue();
115 | });
116 | });
117 | });
118 |
119 | // Lazy Loading Disqus
120 | // http://jsfiddle.net/dragoncrew/SHGwe/1/
121 | var ds_loaded = false,
122 | top = $('#disqus_thread').offset().top;
123 | window.disqus_shortname = $('#disqus_thread').attr('name');
124 |
125 | function check() {
126 | if ( !ds_loaded && container.scrollTop() + container.height() > top ) {
127 | $.ajax({
128 | type: 'GET',
129 | url: 'http://' + disqus_shortname + '.disqus.com/embed.js',
130 | dataType: 'script',
131 | cache: true
132 | });
133 | ds_loaded = true;
134 | }
135 | }check();
136 | container.scroll(check);
137 | }afterPjax();
138 |
139 |
--------------------------------------------------------------------------------
/ie.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
Not support IE9 and below
6 |
7 |
8 |
29 |
30 |
31 |
!
32 |
Not support IE9 and below
33 |
Recommend to use Chrome or Firefox as your primary browser.
34 |
35 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: 首页
4 | ---
5 |
6 |
7 |
8 |
19 | {% for cate in site.cates %}
20 |
35 | {% endfor %}
36 |
37 |
38 |
--------------------------------------------------------------------------------
/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: Welcome to Radxa Documents
4 | ---
5 |
6 | # 新手入门
7 |
8 | 如果你是刚接触Radxa Rock的朋友,建议先看一看下面的几篇文档,我相信,会很有帮助的。
9 |
10 | * [也许你应该会想要知道,你手上的是一个什么好东西](http://docs.radxa.us/2014/12/29/products.html)
11 |
12 | * [先要确定你的开发板是哪个版本](http://docs.radxa.us/2015/07/21/product-history.html)
13 |
14 | * [如何获取可刷机的镜像](http://docs.radxa.us/2015/07/21/firmware-naming.html)
15 |
16 | * [windows往板子中刷入第一个系统](http://docs.radxa.us/2014/12/28/Flash-image-to-nand-windows.html)
17 |
18 | * [Linux往板子中刷入第一个系统](http://docs.radxa.us/2014/12/28/Flash-image-to-nand-linux.html)
19 |
20 | * [新手使用时,总会有这个那个毛病,你可以先看看这有没有你需要的答案](http://docs.radxa.us/2014/12/29/Q-and-A.html)
21 |
22 | # Android开发
23 |
24 | android平台已经得到越来越广的使用
25 |
26 | * [android开发,首先应该知道如何编译一个android固件](http://docs.radxa.us/2015/07/17/build-android-source-code.html)
27 |
28 | * [windows下烧录固件](http://kevinxiasx.github.io/2014/12/28/Flash-image-to-nand-windows.html),[linux下烧录固件](http://docs.radxa.us/2014/12/28/Flash-image-to-nand-linux.html)
29 |
30 | * [然后你会需要ADB调试工具去调试你的设备](http://docs.radxa.us/2015/07/17/install-adb.html)
31 |
32 | * [在安装ADB时,出现问题的概率还是蛮高的,你可以看看这](http://docs.radxa.us/2015/07/22/adb-trouble-shooting.html)
33 |
34 | * [我们还提供了一些android开始时的小技巧,一起来交流吧](http://docs.radxa.us/2015/07/20/android-dev-tips.html)
35 |
36 | # Linux开发请看
37 |
38 | Linux作为一个开源系统,仍将火热不少年头。更多的文档信息可以点击左侧的"linux开发"
39 |
40 | * [老规矩,先编译一个属于你自己的linux固件](http://docs.radxa.us/2015/07/17/build-linux-image.html)
41 |
42 | * [windows下烧录固件](http://kevinxiasx.github.io/2014/12/28/Flash-image-to-nand-windows.html),[linux下烧录固件](http://docs.radxa.us/2014/12/28/Flash-image-to-nand-linux.html)
43 |
44 | * [如果你希望你固件的内核版本更高一些,看看这](http://docs.radxa.us/2015/07/17/build-mainline-kernel.html)
45 |
46 |
47 | # 硬件相关操作
48 |
49 | 当操作Rock上的硬件设备,或者把Rock连接到各式各样的设备上时,你可以看看这
50 |
51 | * [如果想要利用遥控器来控制设备,你需要看看如何使用红外设备](http://docs.radxa.us/2015/07/18/infrared-configuration.html)
52 |
53 | * [如何控制rock上面的LED灯](http://docs.radxa.us/2015/01/06/control-led-with-gpio.html)
54 |
55 | * [调整HDMI显示的分辨率](http://docs.radxa.us/2015/05/17/custom-HDMI-resolution.html)
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/pages/about.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: 关于
4 | ---
5 |
6 |
关于Radxa Documents
7 |
8 |
用来汇总raxda的相关资料。
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/pages/archive.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: 归档
4 | comments: false
5 | ---
6 |
7 | {% for post in site.posts %}
8 | {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
9 | {% capture this_month %}{{ post.date | date: "%m" }}{% endcapture %}
10 | {% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
11 | {% capture next_month %}{{ post.previous.date | date: "%m" }}{% endcapture %}
12 |
13 | {% if forloop.first %}
14 |
15 |
16 | {% endif %}
17 | - {{ post.date | date: "%Y年-%m月-%d日" }} »
18 | {{ post.title }}
19 |
20 |
21 | {% if forloop.last %}
22 |
23 | {% else %}
24 | {% if this_year != next_year %}
25 |
26 |
27 |
28 | {% else %}
29 | {% if this_month != next_month %}
30 |
31 |
32 |
33 | {% endif %}
34 | {% endif %}
35 | {% endif %}
36 | {% endfor %}
--------------------------------------------------------------------------------
/pages/atom.xml:
--------------------------------------------------------------------------------
1 | ---
2 | layout: null
3 | ---
4 |
5 |
6 |
7 | {{ site.title }}
8 | {{ site.url }}
9 | {{ site.description }}
10 | {% for post in site.posts limit:20 %}
11 | -
12 | {{ post.title }}
13 | {{ site.url }}{{ post.url }}
14 | {{ site.url }}{{ post.url }}
15 | {{ post.date | date_to_rfc822 }}
16 | {{ post.content | xml_escape }}
17 |
18 | {% endfor %}
19 |
20 |
--------------------------------------------------------------------------------
/pages/rss.xml:
--------------------------------------------------------------------------------
1 | ---
2 | layout: null
3 | ---
4 |
5 |
6 |
7 | {{ site.title }}
8 | {{ site.url }}
9 | {{ site.description }}
10 | {% for post in site.posts limit:20 %}
11 | -
12 | {{ post.title }}
13 | {{ site.url }}{{ post.url }}
14 | {{ site.url }}{{ post.url }}
15 | {{ post.date | date_to_rfc822 }}
16 | {{ post.content | xml_escape }}
17 |
18 | {% endfor %}
19 |
20 |
--------------------------------------------------------------------------------
/public/codes/oled.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/radxa/docs/cbb3849b861142ebf4a3caa4f8aec05d743944c8/public/codes/oled.tar.gz
--------------------------------------------------------------------------------
/public/css/base.css:
--------------------------------------------------------------------------------
1 | /* 页面配置 */
2 | .container {width: 100%; height: 100%;}
3 | body, html {
4 | margin: 0px;
5 | height: 100%;
6 | overflow: hidden;
7 | background-color: #1f2c39;
8 | }
9 | .row {height: 100%;}
10 | /* 导航栏 + 目录栏 */
11 | .aside {height: 100%;}
12 | /* 左侧导航栏 */
13 | .aside1 {
14 | background-color: #1f2c39;
15 | height: 100%;
16 | padding-left: 0px;
17 | padding-right: 0px;
18 | text-align: center;
19 | }
20 | .aside1 > .nav > li > a {
21 | padding-left: 0px;
22 | padding-right: 0px;
23 | border-radius: 0px;
24 | }
25 | .avatar {width: 60px; height: 60px;}
26 | .aside1_bottom {
27 | width: 100%;
28 | position: absolute;
29 | bottom: 0px;
30 | left: 0px;
31 | }
32 | .aside1_bottom > .table {margin-bottom: 0px;}
33 | #content ul, ol, dl, li {margin: 0px;}
34 | /* 中部目录栏 */
35 | .aside2 {
36 | background-color: #fafaf6;
37 | height: 100%;
38 | border-right: 2px solid #18bc9c;
39 | overflow-y: auto;
40 | }
41 | /* 右侧内容栏 */
42 | .aside3 {
43 | height: 100%;
44 | overflow-y: auto;
45 | background-color: #fafaf6;
46 | }
47 | .aside3-title {
48 | background-color: #1f2c39;
49 | padding-left: 30px;
50 | padding-right: 30px;
51 | text-align: center;
52 | color: #FFF;
53 | }
54 | .aside3-content {padding-left: 30px;padding-right: 30px;}
55 | /* 文章内容排版 */
56 | a:hover {text-decoration:none;}
57 | #content {font-size: 18px; line-height: 1.5;}
58 | #content p {margin: 20px 0px;}
59 | #content ul, ol, dl, li {margin: 10px 0px;}
60 | .nav > li {margin: 0px;}
61 | #content h2, h3 {line-height: 2;}
62 | #content blockquote > :first-child {margin-top: 0; }
63 | #content blockquote > :last-child {margin-bottom: 0;}
64 | /* 其他配置 */
65 | .center { text-align: center;}
66 | .nav-pills>li.active>a, .nav-pills>li.active>a:hover, .nav-pills>li.active>a:focus {
67 | color: #2a6496;
68 | background-color: #fafaf6;
69 | }
70 | /* 显示评论按钮 */
71 | .show-commend {width: 100%; margin-bottom: 40px;}
--------------------------------------------------------------------------------
/public/css/highlight.css:
--------------------------------------------------------------------------------
1 | .highlight { background: #ffffff; }
2 | .highlight .c { color: #999988; font-style: italic } /* Comment */
3 | .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
4 | .highlight .k { font-weight: bold } /* Keyword */
5 | .highlight .o { font-weight: bold } /* Operator */
6 | .highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
7 | .highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
8 | .highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
9 | .highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
10 | .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
11 | .highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
12 | .highlight .ge { font-style: italic } /* Generic.Emph */
13 | .highlight .gr { color: #aa0000 } /* Generic.Error */
14 | .highlight .gh { color: #999999 } /* Generic.Heading */
15 | .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
16 | .highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
17 | .highlight .go { color: #888888 } /* Generic.Output */
18 | .highlight .gp { color: #555555 } /* Generic.Prompt */
19 | .highlight .gs { font-weight: bold } /* Generic.Strong */
20 | .highlight .gu { color: #aaaaaa } /* Generic.Subheading */
21 | .highlight .gt { color: #aa0000 } /* Generic.Traceback */
22 | .highlight .kc { font-weight: bold } /* Keyword.Constant */
23 | .highlight .kd { font-weight: bold } /* Keyword.Declaration */
24 | .highlight .kp { font-weight: bold } /* Keyword.Pseudo */
25 | .highlight .kr { font-weight: bold } /* Keyword.Reserved */
26 | .highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
27 | .highlight .m { color: #009999 } /* Literal.Number */
28 | .highlight .s { color: #d14 } /* Literal.String */
29 | .highlight .na { color: #008080 } /* Name.Attribute */
30 | .highlight .nb { color: #0086B3 } /* Name.Builtin */
31 | .highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
32 | .highlight .no { color: #008080 } /* Name.Constant */
33 | .highlight .ni { color: #800080 } /* Name.Entity */
34 | .highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
35 | .highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
36 | .highlight .nn { color: #555555 } /* Name.Namespace */
37 | .highlight .nt { color: #000080 } /* Name.Tag */
38 | .highlight .nv { color: #008080 } /* Name.Variable */
39 | .highlight .ow { font-weight: bold } /* Operator.Word */
40 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */
41 | .highlight .mf { color: #009999 } /* Literal.Number.Float */
42 | .highlight .mh { color: #009999 } /* Literal.Number.Hex */
43 | .highlight .mi { color: #009999 } /* Literal.Number.Integer */
44 | .highlight .mo { color: #009999 } /* Literal.Number.Oct */
45 | .highlight .sb { color: #d14 } /* Literal.String.Backtick */
46 | .highlight .sc { color: #d14 } /* Literal.String.Char */
47 | .highlight .sd { color: #d14 } /* Literal.String.Doc */
48 | .highlight .s2 { color: #d14 } /* Literal.String.Double */
49 | .highlight .se { color: #d14 } /* Literal.String.Escape */
50 | .highlight .sh { color: #d14 } /* Literal.String.Heredoc */
51 | .highlight .si { color: #d14 } /* Literal.String.Interpol */
52 | .highlight .sx { color: #d14 } /* Literal.String.Other */
53 | .highlight .sr { color: #009926 } /* Literal.String.Regex */
54 | .highlight .s1 { color: #d14 } /* Literal.String.Single */
55 | .highlight .ss { color: #990073 } /* Literal.String.Symbol */
56 | .highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
57 | .highlight .vc { color: #008080 } /* Name.Variable.Class */
58 | .highlight .vg { color: #008080 } /* Name.Variable.Global */
59 | .highlight .vi { color: #008080 } /* Name.Variable.Instance */
60 | .highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
--------------------------------------------------------------------------------
/public/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/radxa/docs/cbb3849b861142ebf4a3caa4f8aec05d743944c8/public/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/public/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/radxa/docs/cbb3849b861142ebf4a3caa4f8aec05d743944c8/public/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/public/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/radxa/docs/cbb3849b861142ebf4a3caa4f8aec05d743944c8/public/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/public/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/radxa/docs/cbb3849b861142ebf4a3caa4f8aec05d743944c8/public/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/public/img/body_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/radxa/docs/cbb3849b861142ebf4a3caa4f8aec05d743944c8/public/img/body_bg.jpg
--------------------------------------------------------------------------------
/public/img/oled.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/radxa/docs/cbb3849b861142ebf4a3caa4f8aec05d743944c8/public/img/oled.jpg
--------------------------------------------------------------------------------
/public/img/spi_oled.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/radxa/docs/cbb3849b861142ebf4a3caa4f8aec05d743944c8/public/img/spi_oled.jpg
--------------------------------------------------------------------------------
/public/js/base.js:
--------------------------------------------------------------------------------
1 | /* 控制导航按钮动作 */
2 | function nav_click(is_show) {
3 | if (is_show) {
4 | /* 显示左侧aside */
5 | $('.aside')
6 | .addClass('visible-md visible-lg')
7 | .removeClass('hidden-md hidden-lg')
8 | /* 调整右侧内容 */
9 | $('.aside3')
10 | .removeClass('col-md-12 col-lg-12')
11 | .addClass('col-md-8 col-lg-8');
12 | /* 调整文字内容格式 */
13 | $('.aside3-content')
14 | .removeClass('col-md-10 col-lg-8 col-md-offset-1 col-lg-offset-2')
15 | .addClass('col-md-12');
16 | } else {
17 | /* 隐藏左侧aside */
18 | $('.aside')
19 | .removeClass('visible-md visible-lg')
20 | .addClass('hidden-md hidden-lg');
21 | /* 右侧内容最大化 */
22 | $('.aside3')
23 | .removeClass('col-md-8 col-lg-8')
24 | .addClass('col-md-12 col-lg-12');
25 | /* 修改文字排版 */
26 | $('.aside3-content')
27 | .removeClass('col-md-12')
28 | .addClass('col-md-10 col-lg-8 col-md-offset-1 col-lg-offset-2');
29 | }
30 | }
31 | /* 控制文章章节列表按钮 */
32 | function content_click(is_show) {
33 | if (is_show) {
34 | $('#content_table').show();
35 | } else {
36 | $('#content_table').hide();
37 | }
38 | }
39 |
40 | function content_effects() {
41 | //remove the asidebar
42 | $('.row-offcanvas').removeClass('active');
43 | if ($("#nav").length > 0) {
44 | $("#content > h2,#content > h3,#content > h4,#content > h5,#content > h6").each(function(i) {
45 | var current = $(this);
46 | current.attr("id", "title" + i);
47 | tag = current.prop('tagName').substr(-1);
48 | $("#nav").append("");
49 | });
50 | $("pre").addClass("prettyprint");
51 | prettyPrint();
52 | $('#content img').addClass('img-thumbnail').parent('p').addClass('center');
53 | $('#content_btn').show();
54 | } else {
55 | $('#content_btn').hide();
56 | }
57 | }
58 |
59 | $(document).ready(function() {
60 | /* 控制左侧 aside 的动作 */
61 | $("#nav_btn").on('click', function() {
62 | isClicked = $(this).data('clicked');
63 | nav_click(isClicked);
64 | $(this).data('clicked', !isClicked);
65 | });
66 |
67 | $('body').on('click', '#content_btn' , function() {
68 | isClicked = $(this).data('clicked');
69 | content_click(!isClicked);
70 | $(this).data('clicked', !isClicked);
71 | });
72 |
73 | $(document).pjax('.pjaxlink', '#pjax', {
74 | fragment: "#pjax",
75 | timeout: 10000
76 | });
77 |
78 | $(document).on("pjax:end", function() {
79 | if ($("body").find('.container').width() < 992)
80 | $('#nav_btn').click();
81 | $('.aside3').scrollTop(0);
82 | content_effects();
83 | });
84 |
85 | $('body').on('click', '.show-commend', function() {
86 | var ds_loaded = false;
87 | window.disqus_shortname = $('.show-commend').attr('name');
88 | $.ajax({
89 | type: "GET",
90 | url: "http://" + disqus_shortname + ".disqus.com/embed.js",
91 | dataType: "script",
92 | cache: true
93 | });
94 | });
95 | content_effects();
96 | });
--------------------------------------------------------------------------------
/public/js/jquery.pjax.js:
--------------------------------------------------------------------------------
1 | !function(a){function b(b,d,e){var f=this;return this.on("click.pjax",b,function(b){var g=a.extend({},p(d,e));g.container||(g.container=a(this).attr("data-pjax")||f),c(b,g)})}function c(b,c,d){var f,g,h,i;if(d=p(c,d),f=b.currentTarget,"A"!==f.tagName.toUpperCase())throw"$.fn.pjax or $.pjax.click requires an anchor element";b.which>1||b.metaKey||b.ctrlKey||b.shiftKey||b.altKey||location.protocol===f.protocol&&location.hostname===f.hostname&&(f.hash&&f.href.replace(f.hash,"")===location.href.replace(location.hash,"")||f.href!==location.href+"#"&&(b.isDefaultPrevented()||(g={url:f.href,container:a(f).attr("data-pjax"),target:f},h=a.extend({},g,d),i=a.Event("pjax:click"),a(f).trigger(i,[h]),i.isDefaultPrevented()||(e(h),b.preventDefault(),a(f).trigger("pjax:clicked",[h])))))}function d(b,c,d){var f,g;if(d=p(c,d),f=b.currentTarget,"FORM"!==f.tagName.toUpperCase())throw"$.pjax.submit requires a form element";g={type:f.method.toUpperCase(),url:f.action,data:a(f).serializeArray(),container:a(f).attr("data-pjax"),target:f},e(a.extend({},g,d)),b.preventDefault()}function e(b){function h(b,d,e){e||(e={}),e.relatedTarget=c;var g=a.Event(b,e);return f.trigger(g,d),!g.isDefaultPrevented()}var c,d,f,i,j;return b=a.extend(!0,{},a.ajaxSettings,e.defaults,b),a.isFunction(b.url)&&(b.url=b.url()),c=b.target,d=o(b.url).hash,f=b.context=q(b.container),b.data||(b.data={}),b.data._pjax=f.selector,b.beforeSend=function(a,c){return"GET"!==c.type&&(c.timeout=0),a.setRequestHeader("X-PJAX","true"),a.setRequestHeader("X-PJAX-Container",f.selector),h("pjax:beforeSend",[a,c])?(c.timeout>0&&(i=setTimeout(function(){h("pjax:timeout",[a,b])&&a.abort("timeout")},c.timeout),c.timeout=0),b.requestUrl=o(c.url).href,void 0):!1},b.complete=function(a,c){i&&clearTimeout(i),h("pjax:complete",[a,c,b]),h("pjax:end",[a,b])},b.error=function(a,c,d){var e=t("",a,b),f=h("pjax:error",[a,c,d,b]);"GET"==b.type&&"abort"!==c&&f&&g(e.url)},b.success=function(c,i,j){var r,s,v,k=e.state,l="function"==typeof a.pjax.defaults.version?a.pjax.defaults.version():a.pjax.defaults.version,n=j.getResponseHeader("X-PJAX-Version"),p=t(c,j,b);if(l&&n&&l!==n)return g(p.url),void 0;if(!p.contents)return g(p.url),void 0;e.state={id:b.id||m(),url:p.url,title:p.title,container:f.selector,fragment:b.fragment,timeout:b.timeout},(b.push||b.replace)&&window.history.replaceState(e.state,p.title,p.url);try{document.activeElement.blur()}catch(q){}p.title&&(document.title=p.title),h("pjax:beforeReplace",[p.contents,b],{state:e.state,previousState:k}),f.html(p.contents),r=f.find("input[autofocus], textarea[autofocus]").last()[0],r&&document.activeElement!==r&&r.focus(),u(p.scripts),"number"==typeof b.scrollTo&&a(window).scrollTop(b.scrollTo),""!==d&&(s=o(p.url),s.hash=d,e.state.url=s.href,window.history.replaceState(e.state,p.title,s.href),v=a(s.hash),v.length&&a(window).scrollTop(v.offset().top)),h("pjax:success",[c,i,j,b])},e.state||(e.state={id:m(),url:window.location.href,title:document.title,container:f.selector,fragment:b.fragment,timeout:b.timeout},window.history.replaceState(e.state,document.title)),j=e.xhr,j&&j.readyState<4&&(j.onreadystatechange=a.noop,j.abort()),e.options=b,j=e.xhr=a.ajax(b),j.readyState>0&&(b.push&&!b.replace&&(y(e.state.id,f.clone().contents()),window.history.pushState(null,"",n(b.requestUrl))),h("pjax:start",[j,b]),h("pjax:send",[j,b])),e.xhr}function f(b,c){var d={url:window.location.href,push:!1,replace:!0,scrollTo:!1};return e(a.extend(d,p(b,c)))}function g(a){window.history.replaceState(null,"","#"),window.location.replace(a)}function k(b){var f,j,k,l,m,n,c=e.state,d=b.state;if(d&&d.container){if(h&&i==d.url)return;if(e.state&&e.state.id===d.id)return;f=a(d.container),f.length?(k=v[d.id],e.state&&(j=e.state.id",{method:"GET"===d?"GET":"POST",action:c,style:"display:none"});if("GET"!==d&&"POST"!==d&&e.append(a("",{type:"hidden",name:"_method",value:d.toLowerCase()})),f=b.data,"string"==typeof f)a.each(f.split("&"),function(b,c){var d=c.split("=");e.append(a("",{type:"hidden",name:d[0],value:d[1]}))});else if("object"==typeof f)for(key in f)e.append(a("",{type:"hidden",name:key,value:f[key]}));a(document.body).append(e),e.submit()}function m(){return(new Date).getTime()}function n(a){return a.replace(/\?_pjax=[^&]+&?/,"?").replace(/_pjax=[^&]+&?/,"").replace(/[\?&]$/,"")}function o(a){var b=document.createElement("a");return b.href=a,b}function p(b,c){return b&&c?c.container=b:c=a.isPlainObject(b)?b:{container:b},c.container&&(c.container=q(c.container)),c}function q(b){if(b=a(b),b.length){if(""!==b.selector&&b.context===document)return b;if(b.attr("id"))return a("#"+b.attr("id"));throw"cant get selector for pjax container!"}throw"no pjax container for "+b.selector}function r(a,b){return a.filter(b).add(a.find(b))}function s(b){return a.parseHTML(b,document,!0)}function t(b,c,d){var f,g,h,e={};return e.url=n(c.getResponseHeader("X-PJAX-URL")||d.requestUrl),/]*>([\s\S.]*)<\/head>/i)[0])),g=a(s(b.match(/]*>([\s\S.]*)<\/body>/i)[0]))):f=g=a(s(b)),0===g.length?e:(e.title=r(f,"title").last().text(),d.fragment?(h="body"===d.fragment?g:r(g,d.fragment).first(),h.length&&(e.contents=h.contents(),e.title||(e.title=h.attr("title")||h.data("title")))):/e.defaults.maxCacheLength;)delete v[x.shift()]}function z(a,b,c){var d,e;v[b]=c,"forward"===a?(d=x,e=w):(d=w,e=x),d.push(b),(b=e.pop())&&delete v[b]}function A(){return a("meta").filter(function(){var b=a(this).attr("http-equiv");return b&&"X-PJAX-VERSION"===b.toUpperCase()}).attr("content")}function B(){a.fn.pjax=b,a.pjax=e,a.pjax.enable=a.noop,a.pjax.disable=C,a.pjax.click=c,a.pjax.submit=d,a.pjax.reload=f,a.pjax.defaults={timeout:650,push:!0,replace:!1,type:"GET",dataType:"html",scrollTo:0,maxCacheLength:20,version:A},a(window).on("popstate.pjax",k)}function C(){a.fn.pjax=function(){return this},a.pjax=l,a.pjax.enable=B,a.pjax.disable=a.noop,a.pjax.click=a.noop,a.pjax.submit=a.noop,a.pjax.reload=function(){window.location.reload()},a(window).off("popstate.pjax",k)}var v,w,x,h=!0,i=window.location.href,j=window.history.state;j&&j.container&&(e.state=j),"state"in window.history&&(h=!1),v={},w=[],x=[],a.inArray("state",a.event.props)<0&&a.event.props.push("state"),a.support.pjax=window.history&&window.history.pushState&&window.history.replaceState&&!navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]|WebApps\/.+CFNetwork)/),a.support.pjax?B():C()}(jQuery);
--------------------------------------------------------------------------------
/public/js/prettify/lang-apollo.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\n\r]*/,null,"#"],["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/,
2 | null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[ES]?BANK=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[!-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["apollo","agc","aea"]);
3 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-basic.js:
--------------------------------------------------------------------------------
1 | var a=null;
2 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^"(?:[^\n\r"\\]|\\.)*(?:"|$)/,a,'"'],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["com",/^REM[^\n\r]*/,a],["kwd",/^\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|END|FOR|GET|GOSUB|GOTO|IF|INPUT|LET|LIST|LOAD|NEW|NEXT|NOT|ON|OPEN|OR|POKE|PRINT|READ|RESTORE|RETURN|RUN|SAVE|STEP|STOP|SYS|THEN|TO|VERIFY|WAIT)\b/,a],["pln",/^[a-z][^\W_]?(?:\$|%)?/i,a],["lit",/^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?/i,a,"0123456789"],["pun",
3 | /^.[^\s\w"$%.]*/,a]]),["basic","cbm"]);
4 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-clj.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Google Inc.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | var a=null;
17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[([{]+/,a,"([{"],["clo",/^[)\]}]+/,a,")]}"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/,a],
18 | ["typ",/^:[\dA-Za-z-]+/]]),["clj"]);
19 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-css.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n\u000c"]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]+)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],
2 | ["com",/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}\b/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);
3 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-dart.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"]],[["com",/^#!.*/],["kwd",/^\b(?:import|library|part of|part|as|show|hide)\b/i],["com",/^\/\/.*/],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["kwd",/^\b(?:class|interface)\b/i],["kwd",/^\b(?:assert|break|case|catch|continue|default|do|else|finally|for|if|in|is|new|return|super|switch|this|throw|try|while)\b/i],["kwd",/^\b(?:abstract|const|extends|factory|final|get|implements|native|operator|set|static|typedef|var)\b/i],
2 | ["typ",/^\b(?:bool|double|dynamic|int|num|object|string|void)\b/i],["kwd",/^\b(?:false|null|true)\b/i],["str",/^r?'''[\S\s]*?[^\\]'''/],["str",/^r?"""[\S\s]*?[^\\]"""/],["str",/^r?'('|[^\n\f\r]*?[^\\]')/],["str",/^r?"("|[^\n\f\r]*?[^\\]")/],["pln",/^[$_a-z]\w*/i],["pun",/^[!%&*+/:<-?^|~-]/],["lit",/^\b0x[\da-f]+/i],["lit",/^\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i],["lit",/^\b\.\d+(?:e[+-]?\d+)?/i],["pun",/^[(),.;[\]{}]/]]),
3 | ["dart"]);
4 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-erlang.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n\u000b\u000c\r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["lit",/^[a-z]\w*/],["lit",/^'(?:[^\n\f\r'\\]|\\[^&])+'?/,null,"'"],["lit",/^\?[^\t\n ({]+/,null,"?"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\n]*/],["kwd",/^(?:module|attributes|do|let|in|letrec|apply|call|primop|case|of|end|when|fun|try|catch|receive|after|char|integer|float,atom,string,var)\b/],
2 | ["kwd",/^-[_a-z]+/],["typ",/^[A-Z_]\w*/],["pun",/^[,.;]/]]),["erlang","erl"]);
3 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-go.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["pln",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])+(?:'|$)|`[^`]*(?:`|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\/\*[\S\s]*?\*\/)/],["pln",/^(?:[^"'/`]|\/(?![*/]))+/]]),["go"]);
2 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-hs.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n\u000b\u000c\r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/,
2 | null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]);
3 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-lisp.js:
--------------------------------------------------------------------------------
1 | var a=null;
2 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a],
3 | ["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","lsp","scm","ss","rkt"]);
4 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-llvm.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^!?"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["com",/^;[^\n\r]*/,null,";"]],[["pln",/^[!%@](?:[$\-.A-Z_a-z][\w$\-.]*|\d+)/],["kwd",/^[^\W\d]\w*/,null],["lit",/^\d+\.\d+/],["lit",/^(?:\d+|0[Xx][\dA-Fa-f]+)/],["pun",/^[(-*,:<->[\]{}]|\.\.\.$/]]),["llvm","ll"]);
2 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-lua.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\S\s]*?(?:]\1]|$)|[^\n\r]*)/],["str",/^\[(=*)\[[\S\s]*?(?:]\1]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],
2 | ["pln",/^[_a-z]\w*/i],["pun",/^[^\w\t\n\r \xa0][^\w\t\n\r "'+=\xa0-]*/]]),["lua"]);
3 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-ml.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^#(?:if[\t\n\r \xa0]+(?:[$_a-z][\w']*|``[^\t\n\r`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])(?:'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\(\*[\S\s]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/],
2 | ["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^(?:[_a-z][\w']*[!#?]?|``[^\t\n\r`]*(?:``|$))/i],["pun",/^[^\w\t\n\r "'\xa0]+/]]),["fs","ml"]);
3 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-mumps.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"]|\\.)*"/,null,'"']],[["com",/^;[^\n\r]*/,null,";"],["dec",/^\$(?:d|device|ec|ecode|es|estack|et|etrap|h|horolog|i|io|j|job|k|key|p|principal|q|quit|st|stack|s|storage|sy|system|t|test|tl|tlevel|tr|trestart|x|y|z[a-z]*|a|ascii|c|char|d|data|e|extract|f|find|fn|fnumber|g|get|j|justify|l|length|na|name|o|order|p|piece|ql|qlength|qs|qsubscript|q|query|r|random|re|reverse|s|select|st|stack|t|text|tr|translate|nan)\b/i,
2 | null],["kwd",/^(?:[^$]b|break|c|close|d|do|e|else|f|for|g|goto|h|halt|h|hang|i|if|j|job|k|kill|l|lock|m|merge|n|new|o|open|q|quit|r|read|s|set|tc|tcommit|tre|trestart|tro|trollback|ts|tstart|u|use|v|view|w|write|x|xecute)\b/i,null],["lit",/^[+-]?(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?/i],["pln",/^[a-z][^\W_]*/i],["pun",/^[^\w\t\n\r"$%;^\xa0]|_/]]),["mumps"]);
3 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-n.js:
--------------------------------------------------------------------------------
1 | var a=null;
2 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/,
3 | a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/,
4 | a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]);
5 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-pascal.js:
--------------------------------------------------------------------------------
1 | var a=null;
2 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^'(?:[^\n\r'\\]|\\.)*(?:'|$)/,a,"'"],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["com",/^\(\*[\S\s]*?(?:\*\)|$)|^{[\S\s]*?(?:}|$)/,a],["kwd",/^(?:absolute|and|array|asm|assembler|begin|case|const|constructor|destructor|div|do|downto|else|end|external|for|forward|function|goto|if|implementation|in|inline|interface|interrupt|label|mod|not|object|of|or|packed|procedure|program|record|repeat|set|shl|shr|then|to|type|unit|until|uses|var|virtual|while|with|xor)\b/i,a],
3 | ["lit",/^(?:true|false|self|nil)/i,a],["pln",/^[a-z][^\W_]*/i,a],["lit",/^(?:\$[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)/i,a,"0123456789"],["pun",/^.[^\s\w$'./@]*/,a]]),["pascal"]);
4 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-proto.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]);
2 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-r.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^'\\]|\\[\S\s])*(?:'|$)/,null,"'"]],[["com",/^#.*/],["kwd",/^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![\w.])/],["lit",/^0[Xx][\dA-Fa-f]+([Pp]\d+)?[Li]?/],["lit",/^[+-]?(\d+(\.\d+)?|\.\d+)([Ee][+-]?\d+)?[Li]?/],["lit",/^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|\d+))(?![\w.])/],
2 | ["pun",/^(?:<-|->>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|[!*+/^]|%.*?%|[$=@~]|:{1,3}|[(),;?[\]{}])/],["pln",/^(?:[A-Za-z]+[\w.]*|\.[^\W\d][\w.]*)(?![\w.])/],["str",/^`.+`/]]),["r","s","R","S","Splus"]);
3 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-rd.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\n\r]*/,null,"%"]],[["lit",/^\\(?:cr|l?dots|R|tab)\b/],["kwd",/^\\[@-Za-z]+/],["kwd",/^#(?:ifn?def|endif)/],["pln",/^\\[{}]/],["pun",/^[()[\]{}]+/]]),["Rd","rd"]);
2 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-scala.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:""(?:""?(?!")|[^"\\]|\\.)*"{0,3}|(?:[^\n\r"\\]|\\.)*"?)/,null,'"'],["lit",/^`(?:[^\n\r\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&(--:-@[-^{-~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\n\r'\\]|\\(?:'|[^\n\r']+))'/],["lit",/^'[$A-Z_a-z][\w$]*(?![\w$'])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/],
2 | ["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:0(?:[0-7]+|x[\da-f]+)l?|(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:e[+-]?\d+)?f?|l?)|\\.\d+(?:e[+-]?\d+)?f?)/i],["typ",/^[$_]*[A-Z][\d$A-Z_]*[a-z][\w$]*/],["pln",/^[$A-Z_a-z][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"]);
3 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-sql.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\n\r]*|\/\*[\S\s]*?(?:\*\/|$))/],["kwd",/^(?:add|all|alter|and|any|apply|as|asc|authorization|backup|begin|between|break|browse|bulk|by|cascade|case|check|checkpoint|close|clustered|coalesce|collate|column|commit|compute|connect|constraint|contains|containstable|continue|convert|create|cross|current|current_date|current_time|current_timestamp|current_user|cursor|database|dbcc|deallocate|declare|default|delete|deny|desc|disk|distinct|distributed|double|drop|dummy|dump|else|end|errlvl|escape|except|exec|execute|exists|exit|fetch|file|fillfactor|following|for|foreign|freetext|freetexttable|from|full|function|goto|grant|group|having|holdlock|identity|identitycol|identity_insert|if|in|index|inner|insert|intersect|into|is|join|key|kill|left|like|lineno|load|match|matched|merge|natural|national|nocheck|nonclustered|nocycle|not|null|nullif|of|off|offsets|on|open|opendatasource|openquery|openrowset|openxml|option|or|order|outer|over|partition|percent|pivot|plan|preceding|precision|primary|print|proc|procedure|public|raiserror|read|readtext|reconfigure|references|replication|restore|restrict|return|revoke|right|rollback|rowcount|rowguidcol|rows?|rule|save|schema|select|session_user|set|setuser|shutdown|some|start|statistics|system_user|table|textsize|then|to|top|tran|transaction|trigger|truncate|tsequal|unbounded|union|unique|unpivot|update|updatetext|use|user|using|values|varying|view|waitfor|when|where|while|with|within|writetext|xml)(?=[^\w-]|$)/i,
2 | null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^[_a-z][\w-]*/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'+\xa0-]*/]]),["sql"]);
3 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-tcl.js:
--------------------------------------------------------------------------------
1 | var a=null;
2 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^{+/,a,"{"],["clo",/^}+/,a,"}"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:after|append|apply|array|break|case|catch|continue|error|eval|exec|exit|expr|for|foreach|if|incr|info|proc|return|set|switch|trace|uplevel|upvar|while)\b/,a],["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",
3 | /^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["tcl"]);
4 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-tex.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\n\r]*/,null,"%"]],[["kwd",/^\\[@-Za-z]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[()=[\]{}]+/]]),["latex","tex"]);
2 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-vb.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0\u2028\u2029]+/,null,"\t\n\r \u00a0\u2028\u2029"],["str",/^(?:["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})(?:["\u201c\u201d]c|$)|["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})*(?:["\u201c\u201d]|$))/i,null,'"\u201c\u201d'],["com",/^['\u2018\u2019](?:_(?:\r\n?|[^\r]?)|[^\n\r_\u2028\u2029])*/,null,"'\u2018\u2019"]],[["kwd",/^(?:addhandler|addressof|alias|and|andalso|ansi|as|assembly|auto|boolean|byref|byte|byval|call|case|catch|cbool|cbyte|cchar|cdate|cdbl|cdec|char|cint|class|clng|cobj|const|cshort|csng|cstr|ctype|date|decimal|declare|default|delegate|dim|directcast|do|double|each|else|elseif|end|endif|enum|erase|error|event|exit|finally|for|friend|function|get|gettype|gosub|goto|handles|if|implements|imports|in|inherits|integer|interface|is|let|lib|like|long|loop|me|mod|module|mustinherit|mustoverride|mybase|myclass|namespace|new|next|not|notinheritable|notoverridable|object|on|option|optional|or|orelse|overloads|overridable|overrides|paramarray|preserve|private|property|protected|public|raiseevent|readonly|redim|removehandler|resume|return|select|set|shadows|shared|short|single|static|step|stop|string|structure|sub|synclock|then|throw|to|try|typeof|unicode|until|variant|wend|when|while|with|withevents|writeonly|xor|endif|gosub|let|variant|wend)\b/i,
2 | null],["com",/^rem\b.*/i],["lit",/^(?:true\b|false\b|nothing\b|\d+(?:e[+-]?\d+[dfr]?|[dfilrs])?|(?:&h[\da-f]+|&o[0-7]+)[ils]?|\d*\.\d+(?:e[+-]?\d+)?[dfr]?|#\s+(?:\d+[/-]\d+[/-]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:am|pm))?)?|\d+:\d+(?::\d+)?(\s*(?:am|pm))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*(?:\[[!#%&@]+])?|\[(?:[a-z]|_\w)\w*])/i],["pun",/^[^\w\t\n\r "'[\]\xa0\u2018\u2019\u201c\u201d\u2028\u2029]+/],["pun",/^(?:\[|])/]]),["vb","vbs"]);
3 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-vhdl.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"]],[["str",/^(?:[box]?"(?:[^"]|"")*"|'.')/i],["com",/^--[^\n\r]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i,
2 | null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^'(?:active|ascending|base|delayed|driving|driving_value|event|high|image|instance_name|last_active|last_event|last_value|left|leftof|length|low|path_name|pos|pred|quiet|range|reverse_range|right|rightof|simple_name|stable|succ|transaction|val|value)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w.\\]+#(?:[+-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:e[+-]?\d+(?:_\d+)*)?)/i],
3 | ["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'\xa0-]*/]]),["vhdl","vhd"]);
4 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-wiki.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\d\t a-gi-z\xa0]+/,null,"\t \u00a0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[*=[\]^~]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^[A-Z][a-z][\da-z]+[A-Z][a-z][^\W_]+\b/],["lang-",/^{{{([\S\s]+?)}}}/],["lang-",/^`([^\n\r`]+)`/],["str",/^https?:\/\/[^\s#/?]*(?:\/[^\s#?]*)?(?:\?[^\s#]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\S\s])[^\n\r#*=A-[^`h{~]*/]]),["wiki"]);
2 | PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"]);
3 |
--------------------------------------------------------------------------------
/public/js/prettify/lang-yaml.js:
--------------------------------------------------------------------------------
1 | var a=null;
2 | PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]);
3 |
--------------------------------------------------------------------------------
/public/js/prettify/prettify.css:
--------------------------------------------------------------------------------
1 | pre.prettyprint { display: block; background-color: #333 }
2 | pre .nocode { background-color: none; color: #000 }
3 | pre .str { color: #ffa0a0 } /* string - pink */
4 | pre .kwd { color: #f0e68c; font-weight: bold }
5 | pre .com { color: #87ceeb } /* comment - skyblue */
6 | pre .typ { color: #98fb98 } /* type - lightgreen */
7 | pre .lit { color: #cd5c5c } /* literal - darkred */
8 | pre .pun { color: #fff } /* punctuation */
9 | pre .pln { color: #fff } /* plaintext */
10 | pre .tag { color: #f0e68c; font-weight: bold } /* html/xml tag - lightyellow */
11 | pre .atn { color: #bdb76b; font-weight: bold } /* attribute name - khaki */
12 | pre .atv { color: #ffa0a0 } /* attribute value - pink */
13 | pre .dec { color: #98fb98 } /* decimal - lightgreen */
14 |
15 | /* Specify class=linenums on a pre to get line numbering */
16 | ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE } /* IE indents via margin-left */
17 | /* Alternate shading for lines */
18 |
19 | @media print {
20 | pre.prettyprint { background-color: none }
21 | pre .str, code .str { color: #060 }
22 | pre .kwd, code .kwd { color: #006; font-weight: bold }
23 | pre .com, code .com { color: #600; font-style: italic }
24 | pre .typ, code .typ { color: #404; font-weight: bold }
25 | pre .lit, code .lit { color: #044 }
26 | pre .pun, code .pun { color: #440 }
27 | pre .pln, code .pln { color: #000 }
28 | pre .tag, code .tag { color: #006; font-weight: bold }
29 | pre .atn, code .atn { color: #404 }
30 | pre .atv, code .atv { color: #060 }
31 | }
32 |
--------------------------------------------------------------------------------
/public/js/prettify/prettify.js:
--------------------------------------------------------------------------------
1 | !function(){var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
2 | (function(){function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var a=e.charAt(1);return(b=r[a])?b:"0"<=a&&a<="7"?parseInt(e.substring(1),8):a==="u"||a==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function g(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return e==="\\"||e==="-"||e==="]"||e==="^"?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),e=[],a=
3 | b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,f=b.length;a122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;ah[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(g(h[1])));c.push("]");return c.join("")}function s(e){for(var a=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],f=0,h=0;f=2&&e==="["?a[f]=b(l):e!=="\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k=5&&"lang-"===w.substring(0,5))&&!(t&&typeof t[1]==="string"))f=!1,w="src";f||(r[z]=w)}h=c;c+=z.length;if(f){f=t[1];var l=z.indexOf(f),B=l+f.length;t[2]&&(B=z.length-t[2].length,l=B-f.length);w=w.substring(5);H(j+h,z.substring(0,l),g,k);H(j+h+l,f,I(w,f),k);H(j+h+B,z.substring(B),g,k)}else k.push(j+h,w)}a.g=k}var b={},s;(function(){for(var g=a.concat(d),j=[],k={},c=0,i=g.length;c=0;)b[n.charAt(e)]=r;r=r[1];n=""+r;k.hasOwnProperty(n)||(j.push(r),k[n]=q)}j.push(/[\S\s]/);s=S(j)})();var x=d.length;return g}function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
10 | q,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&g.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),g.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,q])):d.push(["com",
11 | /^#[^\n\r]*/,q,"#"]));a.cStyleComments&&(g.push(["com",/^\/\/[^\n\r]*/,q]),g.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));if(b=a.regexLiterals){var s=(b=b>1?"":"\n\r")?".":"[\\S\\s]";g.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+
12 | s+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&g.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&g.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),q]);d.push(["pln",/^\s+/,q," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");g.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,
13 | q],["pun",RegExp(b),q]);return C(d,g)}function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.className))if("br"===a.nodeName)s(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&g){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(j.createTextNode(d),a.nextSibling),s(a),c||a.parentNode.removeChild(a)}}function s(a){function b(a,c){var d=
14 | c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),g=a.nextSibling;e.appendChild(d);for(var i=g;i;i=g)g=i.nextSibling,e.appendChild(i)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var x=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,j=a.ownerDocument,k=j.createElement("li");a.firstChild;)k.appendChild(a.firstChild);for(var c=[k],i=0;i=0;){var b=d[g];F.hasOwnProperty(b)?D.console&&console.warn("cannot override language handler %s",b):F[b]=a}}function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*=l&&(b+=2);g>=B&&(r+=2)}}finally{if(f)f.style.display=h}}catch(u){D.console&&console.log(u&&u.stack||u)}}var D=window,y=["break,continue,do,else,for,if,return,while"],E=[[y,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
18 | "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],M=[E,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],N=[E,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],
19 | O=[N,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],E=[E,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],P=[y,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
20 | Q=[y,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],W=[y,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],y=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,
21 | V=/\S/,X=v({keywords:[M,O,E,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",P,Q,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};p(X,["default-code"]);p(C([],[["pln",/^[^]+/],["dec",/^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",
22 | /^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^