Overview
Comment:feat(skin): add syntax highlighting for code via highlight.js. This requires escaping the dollar signs in highlight.pack.js for TH1.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 2041b54a181c9d21eb1bc77b26c9c854fa09128e41070789ce9c314214501a6e
User & Date: dbohdan on 2020-07-04 16:24:39
Original Comment: feat(skin): add highlight.js. This requires escaping the dollar signs in highlight.pack.js for TH1.
Other Links: manifest | tags
Context
2020-07-04
16:37
build(skin): give skin files standard names check-in: 5acfd85546 user: dbohdan tags: trunk
16:24
feat(skin): add syntax highlighting for code via highlight.js. This requires escaping the dollar signs in highlight.pack.js for TH1. check-in: 2041b54a18 user: dbohdan tags: trunk
2020-06-05
18:12
refactor(tag-page): factor out [pages-with-contents]. Use semantic [list] and [dict create] for new values. check-in: cccd50fa76 user: dbohdan tags: trunk
Changes

Modified skin/Makefile from [898e5d2267] to [955669267b].

1
2
3
4
5
6
7
8
9
10



all: css/all.css footer.html

css/all.css: css/bootstrap.min.css css/bootswatch.css css/tclssg.css
	cat css/bootstrap.min.css css/bootswatch.css css/tclssg.css > $@

footer.html: footer.html.src toc.js
	cp footer.html.src $@
	echo '<script nonce="$$<nonce>">' >> $@
	cat toc.js >> $@
	echo '</script>' >> $@



|
|
|
|
|
|
|
|
|
|
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
all: css/all.css skin.js

css/all.css: css/bootstrap.min.css css/bootswatch.css css/highlight.js.css css/tclssg.css Makefile
	cat css/bootstrap.min.css \
	    css/bootswatch.css \
	    css/highlight.js.css \
	    css/tclssg.css \
	    > $@

skin.js: highlight.pack.js toc.js bottom.js Makefile
	sed 's/\$$/<th1>puts \\$$<\/th1>/g' highlight.pack.js > $@
	cat toc.js >> $@
	cat bottom.js >> $@

Added skin/bottom.js version [87b1d06ebf].





>
>
1
2
// ------
hljs.initHighlightingOnLoad();

Added skin/css/highlight.js.css version [3a5d47c2dd].







































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*

github.com style (c) Vasily Polovnyov <vast@whiteants.net>

*/

.hljs {
  display: block;
  overflow-x: auto;
  padding: 0.5em;
  color: #333;
  background: #f8f8f8;
}

.hljs-comment,
.hljs-quote {
  color: #998;
  font-style: italic;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
  color: #333;
  font-weight: bold;
}

.hljs-number,
.hljs-literal,
.hljs-variable,
.hljs-template-variable,
.hljs-tag .hljs-attr {
  color: #008080;
}

.hljs-string,
.hljs-doctag {
  color: #d14;
}

.hljs-title,
.hljs-section,
.hljs-selector-id {
  color: #900;
  font-weight: bold;
}

.hljs-subst {
  font-weight: normal;
}

.hljs-type,
.hljs-class .hljs-title {
  color: #458;
  font-weight: bold;
}

.hljs-tag,
.hljs-name,
.hljs-attribute {
  color: #000080;
  font-weight: normal;
}

.hljs-regexp,
.hljs-link {
  color: #009926;
}

.hljs-symbol,
.hljs-bullet {
  color: #990073;
}

.hljs-built_in,
.hljs-builtin-name {
  color: #0086b3;
}

.hljs-meta {
  color: #999;
  font-weight: bold;
}

.hljs-deletion {
  background: #fdd;
}

.hljs-addition {
  background: #dfd;
}

.hljs-emphasis {
  font-style: italic;
}

.hljs-strong {
  font-weight: bold;
}

Added skin/footer.html version [a2c2f8839b].





















































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<th1>
  if {! $is_index && ! $is_home} {
    html "</div>"
  }
</th1>
<div id="push"></div>
</div>
<footer class="footer">
  <p>&#169; Copyright $<project_name>. All right reserved. Fossil $release_version &#183; <a href="$home/timeline.rss">RSS</a></p>
</footer>

<script nonce="$<nonce>">
var tables = document.querySelectorAll('table');
for (var i = 0; i < tables.length; i++) {
  if (tables[i].id !== "timelineTable")
  tables[i].classList.add('table');
};
var submenus = document.querySelectorAll('.submenu');
for (var i = 0; i < submenus.length; i++) {
  submenus[i].classList.add('btn-group');
  var labels = submenus[i].querySelectorAll('.label');
  for (var j = 0; j < labels.length; j++) {
    labels[j].classList.remove('label');
    labels[j].classList.add('btn');
    labels[j].classList.add('btn-default');
    labels[j].classList.add('btn-sm');
  }
};
//Handle the collapsible navbar
var collapse = document.querySelector('[data-toggle="collapse"]');
collapse.onclick = function(){
  var target = document.querySelector(
    collapse.getAttribute('data-target')
  );
  target.classList.toggle('collapse');
  target.classList.toggle('collapsed');
};
</script>

<script nonce="$<nonce>">
<th1>styleScript</th1>
</script>

Deleted skin/footer.html.src version [2c4ed83975].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<th1>
  if {! $is_index && ! $is_home} {
    html "</div>"
  }
</th1>
<div id="push"></div>
</div>
<footer class="footer">
  <p>&#169; Copyright $<project_name>. All right reserved. Fossil $release_version &#183; <a href="$home/timeline.rss">RSS</a></p>
</footer>
<script nonce="$<nonce>">
var tables = document.querySelectorAll('table');
for (var i = 0; i < tables.length; i++) {
  if (tables[i].id !== "timelineTable")
  tables[i].classList.add('table');
};
var submenus = document.querySelectorAll('.submenu');
for (var i = 0; i < submenus.length; i++) {
  submenus[i].classList.add('btn-group');
  var labels = submenus[i].querySelectorAll('.label');
  for (var j = 0; j < labels.length; j++) {
    labels[j].classList.remove('label');
    labels[j].classList.add('btn');
    labels[j].classList.add('btn-default');
    labels[j].classList.add('btn-sm');
  }
};
//Handle the collapsible navbar
var collapse = document.querySelector('[data-toggle="collapse"]');
collapse.onclick = function(){
  var target = document.querySelector(
    collapse.getAttribute('data-target')
  );
  target.classList.toggle('collapse');
  target.classList.toggle('collapsed');
};
</script>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































Added skin/highlight.pack.js version [8bdcf93237].

cannot compute difference between binary files

Modified skin/toc.js from [86a395183a] to [801d6d3ef5].


1
2
3
4
5
6
7

// Generate a ToC for a Fossil wiki page.  This code should work in old
// browsers.
// Copyright (c) 2020 D. Bohdan.
// License: MIT.

var tocGen = {};

>







1
2
3
4
5
6
7
8
// toc.js
// Generate a ToC for a Fossil wiki page.  This code should work in old
// browsers.
// Copyright (c) 2020 D. Bohdan.
// License: MIT.

var tocGen = {};