Skip to content

Commit 427adea

Browse files
author
Stephan Schmitz
committedSep 12, 2019
Add (static) task list support
1 parent f4e578d commit 427adea

File tree

4 files changed

+82
-3
lines changed

4 files changed

+82
-3
lines changed
 

‎index.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@
3232

3333
<link href='/static/dom_distiller_viewer.css' rel='stylesheet' media='nope' onload='this.media="all"'>
3434
<link href='https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.15.6/build/styles/default.min.css' rel='stylesheet' media='nope' onload='this.media="all"'>
35-
<link href='/static/vendor/atom-one-light.css' rel='stylesheet' media='nope' onload='this.media="all"'>
35+
<link href='/static/vendor/github-gist.css' rel='stylesheet' media='nope' onload='this.media="all"'>
3636

3737
<script src='https://cdn.jsdelivr.net/gh/markdown-it/markdown-it@8.4.2/dist/markdown-it.min.js'></script>
3838
<script src='/static/vendor/markdown-it-anchor@5.0.2.min.js'></script>
39+
<script src='https://unpkg.com/markdown-it-task-lists@2.1.1/dist/markdown-it-task-lists.min.js'></script>
3940
<script src='https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.15.6/build/highlight.min.js' async defer></script>
4041
</head>
4142
<body class='light sans-serif'>

‎static/app.js

+2
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,8 @@
360360
}
361361
});
362362

363+
md.use(window.markdownitTaskLists, {enabled: true});
364+
363365
// render markdown
364366
this.files.markdown.forEach(file => {
365367
html += md.render(file.content);

‎static/dom_distiller_viewer.css

+7-2
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,11 @@ article {
500500
}
501501

502502
.hljs {
503-
white-space: pre;
504-
word-wrap: normal;
503+
white-space: pre;
504+
word-wrap: normal;
505+
}
506+
507+
ul.contains-task-list {
508+
list-style-type: none;
509+
margin-left: 0;
505510
}

‎static/vendor/github-gist.css

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/**
2+
* GitHub Gist Theme
3+
* Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro
4+
*/
5+
6+
.hljs {
7+
display: block;
8+
background: white;
9+
padding: 0.5em;
10+
color: #333333;
11+
overflow-x: auto;
12+
}
13+
14+
.hljs-comment,
15+
.hljs-meta {
16+
color: #969896;
17+
}
18+
19+
.hljs-string,
20+
.hljs-variable,
21+
.hljs-template-variable,
22+
.hljs-strong,
23+
.hljs-emphasis,
24+
.hljs-quote {
25+
color: #df5000;
26+
}
27+
28+
.hljs-keyword,
29+
.hljs-selector-tag,
30+
.hljs-type {
31+
color: #a71d5d;
32+
}
33+
34+
.hljs-literal,
35+
.hljs-symbol,
36+
.hljs-bullet,
37+
.hljs-attribute {
38+
color: #0086b3;
39+
}
40+
41+
.hljs-section,
42+
.hljs-name {
43+
color: #63a35c;
44+
}
45+
46+
.hljs-tag {
47+
color: #333333;
48+
}
49+
50+
.hljs-title,
51+
.hljs-attr,
52+
.hljs-selector-id,
53+
.hljs-selector-class,
54+
.hljs-selector-attr,
55+
.hljs-selector-pseudo {
56+
color: #795da3;
57+
}
58+
59+
.hljs-addition {
60+
color: #55a532;
61+
background-color: #eaffea;
62+
}
63+
64+
.hljs-deletion {
65+
color: #bd2c00;
66+
background-color: #ffecec;
67+
}
68+
69+
.hljs-link {
70+
text-decoration: underline;
71+
}

0 commit comments

Comments
 (0)
Please sign in to comment.