diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-09-22 11:23:41 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-09-22 11:27:09 +0800 |
commit | 42f7b2f0054d1b8c990a9c514b17396713506ab7 (patch) | |
tree | f929dcf0d9b9d205dd1da291fd9436ec6e53b958 /src | |
parent | 1ddf1b8c54fcda9fe89e6c4531739f76d7652f52 (diff) |
refactor: class name for content container
DumbyMap -> Dumby
Since maps are inside it!
Diffstat (limited to 'src')
-rw-r--r-- | src/css/dumbymap.css | 8 | ||||
-rw-r--r-- | src/dumbymap.mjs | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/css/dumbymap.css b/src/css/dumbymap.css index f58cf22..ebd38d3 100644 --- a/src/css/dumbymap.css +++ b/src/css/dumbymap.css | |||
@@ -79,7 +79,7 @@ | |||
79 | margin-bottom: 3rem; | 79 | margin-bottom: 3rem; |
80 | } | 80 | } |
81 | 81 | ||
82 | .DumbyMap { | 82 | .Dumby { |
83 | width: 100%; | 83 | width: 100%; |
84 | height: 100%; | 84 | height: 100%; |
85 | margin: 0 auto; | 85 | margin: 0 auto; |
@@ -150,11 +150,11 @@ | |||
150 | 150 | ||
151 | } | 151 | } |
152 | 152 | ||
153 | .DumbyMap[data-layout="normal"] { | 153 | .Dumby[data-layout="normal"] { |
154 | max-width: 60em; | 154 | max-width: 60em; |
155 | } | 155 | } |
156 | 156 | ||
157 | .DumbyMap[data-layout="side-by-side"] { | 157 | .Dumby[data-layout="side-by-side"] { |
158 | .SemanticHtml, | 158 | .SemanticHtml, |
159 | .Showcase { | 159 | .Showcase { |
160 | width: 50%; | 160 | width: 50%; |
@@ -212,7 +212,7 @@ | |||
212 | } | 212 | } |
213 | } | 213 | } |
214 | 214 | ||
215 | .DumbyMap[data-layout="overlay"] { | 215 | .Dumby[data-layout="overlay"] { |
216 | .SemanticHtml, | 216 | .SemanticHtml, |
217 | .Showcase { | 217 | .Showcase { |
218 | display: block; | 218 | display: block; |
diff --git a/src/dumbymap.mjs b/src/dumbymap.mjs index 79549ec..5f2fcc9 100644 --- a/src/dumbymap.mjs +++ b/src/dumbymap.mjs | |||
@@ -138,6 +138,7 @@ export const markdown2HTML = (container, mdContent) => { | |||
138 | } | 138 | } |
139 | // FIXME Don't use hard-coded CSS selector | 139 | // FIXME Don't use hard-coded CSS selector |
140 | export const generateMaps = async (container, callback) => { | 140 | export const generateMaps = async (container, callback) => { |
141 | container.classList.add('Dumby') | ||
141 | const htmlHolder = container.querySelector('.SemanticHtml') ?? container | 142 | const htmlHolder = container.querySelector('.SemanticHtml') ?? container |
142 | const showcase = document.createElement('div') | 143 | const showcase = document.createElement('div') |
143 | container.appendChild(showcase) | 144 | container.appendChild(showcase) |
@@ -150,7 +151,6 @@ export const generateMaps = async (container, callback) => { | |||
150 | blocks: Array.from(htmlHolder.querySelectorAll('.dumby-block')), | 151 | blocks: Array.from(htmlHolder.querySelectorAll('.dumby-block')), |
151 | } | 152 | } |
152 | 153 | ||
153 | container.classList.add('DumbyMap') | ||
154 | // LeaderLine {{{ | 154 | // LeaderLine {{{ |
155 | 155 | ||
156 | // Get anchors with "geo:" scheme | 156 | // Get anchors with "geo:" scheme |