Skip to content

Commit edd591d

Browse files
committed
Add inbuilt infobox styling
1 parent 21f287b commit edd591d

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Next
44
- Added support for video embeds: currently only supports `{{#ev:youtube}}` and `{{#ev:vimeo}}`.
55
- Added support for named references.
6+
- Added styling for infoboxes (`#infobox`).
67
- Changed images to be displayed inline by default when no float is given.
78
- Fixed a crash occurring when attempting to apply custom styles.
89
- Fixed a crash occurring when a template goes unparsed.

src/parse.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ export function parse(data: string, config: Config = {}): Result {
257257
if (params.includes('{{')) return _;
258258

259259
const templateFile = title.trim().replace(/ /g, '_');
260-
console.log({ templateFile })
261260
const page: string = paths.join(templatesFolder, templateFile);
262261
let content = '';
263262
// Try retrieve template content

src/wiki.css.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@ a.redlink:visited {color: #b44;}
2727
#page+toc {border: 1px solid #aab; padding: 8px; width: fit-content; background-color: #f8f8f8; font-size: 95%;}
2828
#page+toc-heading {display: block; text-align: center;}
2929
#page+toc ol {margin: 0 0 0 1.3em;}
30+
31+
#infobox {float: right; clear: right; margin: 0 0 1em 1em; width: 300px; padding: 2px; border: 1px solid #CCC; overflow: auto; font-size: 90%;}
32+
#infobox tr:first-child :first-child {padding: 10px 10px 0; text-align: center; font-weight: bold; font-size: 120%;}
33+
#infobox th {padding-left: 10px; text-align: left;}
3034
`

0 commit comments

Comments
 (0)