Added inline comments, hooked up markdown-toc to npm start
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<script src="node_modules/markdown-it/dist/markdown-it.js"></script>
|
<script src="node_modules/markdown-it/dist/markdown-it.js"></script>
|
||||||
<script src="node_modules/markdown-it-container/dist/markdown-it-container.js"></script>
|
<script src="node_modules/markdown-it-container/dist/markdown-it-container.js"></script>
|
||||||
|
<script src="node_modules/markdown-it-inline-comments/dist/markdown-it-inline-comments.js"></script>
|
||||||
<script src="tsorter.min.js"></script>
|
<script src="tsorter.min.js"></script>
|
||||||
<script src="utilities.js"></script>
|
<script src="utilities.js"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/semantic-ui/2.2.8/semantic.min.css">
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/semantic-ui/2.2.8/semantic.min.css">
|
||||||
|
|||||||
@@ -4,13 +4,14 @@
|
|||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"start": "markdown-toc -i rules.md"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"markdown-it": "^8.3.1",
|
"markdown-it": "^8.3.1",
|
||||||
"markdown-it-container": "^2.0.0",
|
"markdown-it-container": "^2.0.0",
|
||||||
|
"markdown-it-inline-comments": "^1.0.1",
|
||||||
"markdown-toc": "^1.1.0"
|
"markdown-toc": "^1.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ Fight your way across vast expanses, conquer enemy batallions, and survive in th
|
|||||||
|
|
||||||
::: mobileOnly
|
::: mobileOnly
|
||||||
|
|
||||||
|
<!-- toc -->
|
||||||
|
|
||||||
- [Basic Rules](#basic-rules)
|
- [Basic Rules](#basic-rules)
|
||||||
* [Phases of a Turn](#phases-of-a-turn)
|
* [Phases of a Turn](#phases-of-a-turn)
|
||||||
- [Types of Cards](#types-of-cards)
|
- [Types of Cards](#types-of-cards)
|
||||||
@@ -28,6 +30,8 @@ Fight your way across vast expanses, conquer enemy batallions, and survive in th
|
|||||||
* [Pilot Idiocy](#pilot-idiocy)
|
* [Pilot Idiocy](#pilot-idiocy)
|
||||||
* [Duplicate Phase Skipping](#duplicate-phase-skipping)
|
* [Duplicate Phase Skipping](#duplicate-phase-skipping)
|
||||||
|
|
||||||
|
<!-- tocstop -->
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
Basic Rules
|
Basic Rules
|
||||||
|
|||||||
@@ -59,9 +59,3 @@ footer {
|
|||||||
content: "\25BC";
|
content: "\25BC";
|
||||||
}
|
}
|
||||||
|
|
||||||
/* device only features */
|
|
||||||
@media screen and (min-width: 768px) {
|
|
||||||
.mobileOnly {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
//global markdown object and configuration
|
//global markdown object and configuration
|
||||||
var markdown = window.markdownit()
|
var markdown = window.markdownit()
|
||||||
|
|
||||||
|
//allow HTML-style comments
|
||||||
|
.use(window.markdownitInlineComments)
|
||||||
|
|
||||||
//configure for semantic-style visibility controls
|
//configure for semantic-style visibility controls
|
||||||
.use(window.markdownitContainer, 'mobileOnly', {
|
.use(window.markdownitContainer, 'mobileOnly', {
|
||||||
validate: function(params) {
|
validate: function(params) {
|
||||||
@@ -8,7 +12,7 @@ var markdown = window.markdownit()
|
|||||||
render: function (tokens, idx) {
|
render: function (tokens, idx) {
|
||||||
if (tokens[idx].nesting === 1) {
|
if (tokens[idx].nesting === 1) {
|
||||||
//opening tag
|
//opening tag
|
||||||
return '<div class="mobileOnly">';
|
return '<div class="ui mobile only grid">';
|
||||||
} else {
|
} else {
|
||||||
// closing tag
|
// closing tag
|
||||||
return '</div>';
|
return '</div>';
|
||||||
|
|||||||
Reference in New Issue
Block a user