Aabahran

Diff: Formatting Guide

Comparing revision 616 (Erelei, ) to revision 633 (Erelei, )
1 1 Everything below works on any wiki or forum page. CommonMark plus GFM extras (tables, strikethrough, autolinks, task lists) work the standard way. The custom tags after that are unique to Aabahran.
2 2
3 3 Each entry shows the source first, then how it renders.
4 4
5 5 ## Paragraphs and line breaks
6 6
7 7 Plain text becomes paragraphs. A blank line starts a new paragraph. A single newline becomes a hard break.
8 8
9 9 ````
10 10 First line.
11 11 Second line is still in the same paragraph.
12 12
13 13 Third paragraph after a blank line.
14 14 ````
15 15
16 16 First line.
17 17 Second line is still in the same paragraph.
18 18
19 19 Third paragraph after a blank line.
20 20
21 21 ## Emphasis
22 22
23 23 ````
24 24 *italic*, _also italic_
25 25 **bold**, __also bold__
26 26 ***bold italic***
27 27 ~~strikethrough~~
28 28 ````
29 29
30 30 *italic*, _also italic_
31 31 **bold**, __also bold__
32 32 ***bold italic***
33 33 ~~strikethrough~~
34 34
35 35 ## Headings
36 36
37 37 ````
38 38 # H1 page title
39 39 ## H2 section
40 40 ### H3 subsection
41 41 #### H4
42 42 ##### H5
43 43 ###### H6
44 44 ````
45 45
46 46 Headings get an auto-generated id so `#section-name` links work. Override the id with `{#anchor}`:
47 47
48 48 ````
49 49 ## Races {#races}
50 50 ````
51 51
52 52 ## Lists
53 53
54 54 ````
55 55 - Bullet
56 56 - Another bullet
57 57 - Nested
58 58 - Nested
59 59 - Last
60 60 ````
61 61
62 62 - Bullet
63 63 - Another bullet
64 64 - Nested
65 65 - Nested
66 66 - Last
67 67
68 68 ````
69 69 1. First
70 70 2. Second
71 71 3. Third
72 72 ````
73 73
74 74 1. First
75 75 2. Second
76 76 3. Third
77 77
78 78 Task lists:
79 79
80 80 ````
81 81 - [x] Done
82 82 - [ ] Not done
83 83 - [ ] Still pending
84 84 ````
85 85
86 86 - [x] Done
87 87 - [ ] Not done
88 88 - [ ] Still pending
89 89
90 90 ## Links
91 91
92 92 ````
93 93 External: [Aabahran](https://theforsakenlands.com)
94 94 Autolink: <https://theforsakenlands.com>
95 95 Wiki page: [[Cabals]]
96 96 Wiki rename: [[Cabals/Tribunal|the Tribunal]]
97 97 Same-page anchor: [jump to Embeds](#embeds)
98 98 ````
99 99
100 100 External: [Aabahran](https://theforsakenlands.com)
101 101 Autolink: <https://theforsakenlands.com>
102 102 Wiki page: [[Cabals]]
103 103 Wiki rename: [[Cabals/Tribunal|the Tribunal]]
104 104 Same-page anchor: [jump to Embeds](#embeds)
105 105
106 106 ## Images
107 107
108 108 ````
109 109 ![alt text](/static/skull.png)
110 110 ````
111 111
112 112 For full-width wiki banners, use the `{banner:}` tag in the custom section below.
113 113
114 114 ## Blockquotes
115 115
116 116 ````
117 117 > This is a quote.
118 118 > Second line of the same quote.
119 119 >
120 120 > > Nested quote.
121 121 ````
122 122
123 123 > This is a quote.
124 124 > Second line of the same quote.
125 125 >
126 126 > > Nested quote.
127 127
128 128 ## Code
129 129
130 130 Inline:
131 131
132 132 ````
133 133 Use `get_skill(ch, sn)` to read a skill value.
134 134 ````
135 135
136 136 Use `get_skill(ch, sn)` to read a skill value.
137 137
138 138 Fenced block with language:
139 139
140 140 `````
141 141 ```c
142 142 void example(int x) {
143 143 if (x > 0) return;
144 144 }
145 145 ```
146 146 `````
147 147
148 148 ```c
149 149 void example(int x) {
150 150 if (x > 0) return;
151 151 }
152 152 ```
153 153
154 154 ## Horizontal rule
155 155
156 156 ````
157 157 ---
158 158 ````
159 159
160 160 ---
161 161
162 162 ## Tables
163 163
164 164 ````
165 165 | Race | Vulnerable | Resistant |
166 166 | :--- | :---: | :---: |
167 167 | Avian | air | - |
168 168 | Drow | silver | charm |
169 169 | Dwarf | drowning | poison |
170 170 ````
171 171
172 172 | Race | Vulnerable | Resistant |
173 173 | :--- | :---: | :---: |
174 174 | Avian | air | - |
175 175 | Drow | silver | charm |
176 176 | Dwarf | drowning | poison |
177 177
178 178 # Custom tags
179 179
180 180 Tags use single curly braces. Either `{name}`, `{name:arg}`, or `{name}...{/name}`. Anything inside a fenced code block stays as plain text, so the source blocks below render exactly as written.
181 181
182 182 ## Color text
183 183
184 184 ````
185 185 {#c4a872}A muted gold phrase{/} and {#8BA4B0}highlight-color text{/}.
186 186 ````
187 187
188 188 {#c4a872}A muted gold phrase{/} and {#8BA4B0}highlight-color text{/}.
189 189
190 190 ## Script font
191 191
192 192 ````
193 193 {script}From the journals of Erelei{/}
194 194 ````
195 195
196 196 {script}From the journals of Erelei{/}
197 197
198 198 ## Redact
199 199
200 200 A bar in the page background color hides the text. Click the bar to reveal it.
201 201
202 202 ````
203 203 The traitor was {redact}Vellichor{/redact}.
204 204 ````
205 205
206 206 The traitor was {redact}Vellichor{/redact}.
207 207
208 208 ## Drop cap
209 209
210 210 Big initial letter on the first character of a paragraph.
211 211
212 212 ````
213 213 {drop}A abahran is a world shaped by war, divine conflict, and the struggle between Life and Death.
214 214 ````
215 215
216 216 {drop}A abahran is a world shaped by war, divine conflict, and the struggle between Life and Death.
217 217
218 218 ## Stat bar
219 219
220 220 Inline scaled bar with the number on top. Format: `low:current:cap`.
221 221
222 222 ````
223 223 {statbar:14:18:25}
224 224 ````
225 225
226 226 {statbar:14:18:25}
227 227
228 228 ## Mentions
229 229
230 230 ````
231 231 nice fix @Erelei
232 232 ````
233 233
234 234 nice fix @Erelei
235 235
236 236 ## Eyebrow heading
237 237
238 238 A small lowercase label above a heading. Prefix any heading with `[Label]`.
239 239
240 240 ````
241 241 ## [Setting] The World
242 242 ## [Character] Races and Classes
243 243 ````
244 244
245 245 ## [Setting] The World
246 246
247 247 Aabahran has endured three great ages.
248 248
249 249 ## [Character] Races and Classes
250 250
251 251 Twenty-four races call Aabahran home.
252 252
253 253 ## Banner image
254 254
255 255 Wide banner pulled from `web/static/img/wiki/`. Extensions `png`, `jpg`, `svg`. Path can include subdirs.
256 256
257 257 ````
258 258 {banner:before_cataclysm.png}
259 259 ````
260 260
261 261 {banner:before_cataclysm.png}
262 262
263 263 ## Table of contents
264 264
265 265 Drops a TOC card that floats on the right on desktop, full width on mobile. Only fires when the page has two or more headings.
266 266
267 267 ````
268 268 {toc}
269 269 ````
270 270
271 271 ## Stat card
272 272
273 273 A key/value table wrapped as a compact card. Title is optional.
274 274
275 275 ````
276 276 {statcard:Stat Block}
277 277 | Name | Erelei the Wanderer |
278 278 | ----- | ------------------- |
279 279 | Race | Elf |
280 280 | Class | Rogue |
281 281 | Cabal | Vellichor |
282 282 {/statcard}
283 283 ````
284 284
285 285 {statcard:Stat Block}
286 286 | Name | Erelei the Wanderer |
287 287 | ----- | ------------------- |
288 288 | Race | Elf |
289 289 | Class | Rogue |
290 290 | Cabal | Vellichor |
291 291 {/statcard}
292 292
293 293 ## Mudlog
294 294
295 295 A pasted MUD log rendered in monospace with backtick color codes applied. Use a fenced block tagged `mudlog`.
296 296
297 297 `````
298 298 ```mudlog
299 299 Between Ice Bars [Room 10874]
300 300 You walk into an open cage surrounded by frozen bars and icy blocks.
301 301 Whomever was in here, must of had a very good immunity to cold or his
302 302 skin must of been twice that of any normal man. Icicles hang freely from
303 303 the ceiling as footing becomes extremely slippery.
304 304
305 305 [Exits: west]
306 306 (Dark Aura) An important Baron is frozen here.
307 307
308 308 > kill baron
309 309 Your punch LACERATES The Baron Helgardium!
310 310 The Baron Helgardium dodges your attack.
311 311 You feign and strike at The Baron Helgardium's nerve point.
312 312 Your shadow strike wounds The Baron Helgardium.
313 313 The Baron Helgardium has a few scratches.
314 314
315 315 >
316 316 The Baron Helgardium dodges your attack.
317 317 Your punch LACERATES The Baron Helgardium!
318 318 You feign and strike at The Baron Helgardium's nerve point.
319 319 Your shadow strike misses The Baron Helgardium.
320 320 Your punch maims The Baron Helgardium!
321 321 You dodge The Baron Helgardium's attack.
322 322 The Baron Helgardium's freezing bite DISMEMBERS you!
323 323 You dodge The Baron Helgardium's attack and redirect the momentum!
324 324 Your counterblow MASSACRES The Baron Helgardium!
325 325 Your deathly chill hits The Baron Helgardium.
326 326 Your deathly chill decimates The Baron Helgardium!
327 327 The Baron Helgardium has a few scratches.
328 328 ```
329 329 `````
330 330
331 331 ```mudlog
332 332 Between Ice Bars [Room 10874]
333 333 You walk into an open cage surrounded by frozen bars and icy blocks.
334 334 Whomever was in here, must of had a very good immunity to cold or his
335 335 skin must of been twice that of any normal man. Icicles hang freely from
336 336 the ceiling as footing becomes extremely slippery.
337 337
338 338 [Exits: west]
339 339 (Dark Aura) An important Baron is frozen here.
340 340
341 341 > kill baron
342 342 Your punch LACERATES The Baron Helgardium!
343 343 The Baron Helgardium dodges your attack.
344 344 You feign and strike at The Baron Helgardium's nerve point.
345 345 Your shadow strike wounds The Baron Helgardium.
346 346 The Baron Helgardium has a few scratches.
347 347
348 348 >
349 349 The Baron Helgardium dodges your attack.
350 350 Your punch LACERATES The Baron Helgardium!
351 351 You feign and strike at The Baron Helgardium's nerve point.
352 352 Your shadow strike misses The Baron Helgardium.
353 353 Your punch maims The Baron Helgardium!
354 354 You dodge The Baron Helgardium's attack.
355 355 The Baron Helgardium's freezing bite DISMEMBERS you!
356 356 You dodge The Baron Helgardium's attack and redirect the momentum!
357 357 Your counterblow MASSACRES The Baron Helgardium!
358 358 Your deathly chill hits The Baron Helgardium.
359 359 Your deathly chill decimates The Baron Helgardium!
360 360 The Baron Helgardium has a few scratches.
361 361 ```
362 362
363 363 ## Table modifiers
364 364
365 365 These sit on their own line right before a markdown table. Stack them on consecutive lines to compose.
366 366
367 367 ### Column widths
368 368
369 369 `{cols:}` takes one width per column. Percentages, pixels, em, or `auto`. Percentages summing to 100 or less get normalized so the table fills the container while keeping their relative proportions. Sums above 100 convert to pixels and the table scrolls horizontally.
370 370
371 371 ````
372 372 {cols: 30% 20% 20% 30%}
373 373 | Race | Vulnerable | Resistant | Bonus Skills |
374 374 | :--- | :--- | :--- | :--- |
375 375 | Avian | air | - | fly |
376 376 | Drow | silver | charm | sneak, infravision |
377 377 | Dwarf | drowning | poison | berserk, infravision |
378 378 ````
379 379
380 380 {cols: 30% 20% 20% 30%}
381 381 | Race | Vulnerable | Resistant | Bonus Skills |
382 382 | :--- | :--- | :--- | :--- |
383 383 | Avian | air | - | fly |
384 384 | Drow | silver | charm | sneak, infravision |
385 385 | Dwarf | drowning | poison | berserk, infravision |
386 386
387 387 ### Vertical headers
388 388
389 389 Rotates `<th>` cells 90 degrees. Optional alignment: `top`, `center`, `bottom`. Default is `bottom`.
390 390
391 391 ````
392 392 {vhead}
393 393 | Race | Strength | Dexterity | Constitution | Intelligence | Wisdom |
394 394 | :--- | :-: | :-: | :-: | :-: | :-: |
395 395 | Avian | 19 | 23 | 19 | 21 | 21 |
396 396 | Dwarf | 23 | 17 | 23 | 17 | 19 |
397 397 | Elf | 16 | 23 | 16 | 23 | 21 |
398 398 ````
399 399
400 400 {vhead}
401 401 | Race | Strength | Dexterity | Constitution | Intelligence | Wisdom |
402 402 | :--- | :-: | :-: | :-: | :-: | :-: |
403 403 | Avian | 19 | 23 | 19 | 21 | 21 |
404 404 | Dwarf | 23 | 17 | 23 | 17 | 19 |
405 405 | Elf | 16 | 23 | 16 | 23 | 21 |
406 406
407 407 ### Sleek
408 408
409 409 Minimal borders, mono uppercase headers, hover effect on rows. Good for dense data tables.
410 410
411 411 ````
412 412 {sleek}
413 413 | Patron | Domain | Cabal |
414 414 | :--- | :--- | :--- |
415 415 | Rathe | Death | Nexus |
416 416 | Maesil | Light | Knight |
417 417 | Athaketha | Justice | Tribunal |
418 418 ````
419 419
420 420 {sleek}
421 421 | Patron | Domain | Cabal |
422 422 | :--- | :--- | :--- |
423 423 | Rathe | Death | Nexus |
424 424 | Maesil | Light | Knight |
425 425 | Athaketha | Justice | Tribunal |
426 426
427 427 ### Sticky header
428 428
429 429 Pins the header row to the top of the viewport while you scroll past long lists. Combines fine with `{cols:}` as long as the percentages sum to 100 or less.
430 430
431 431 ````
432 432 {stickyhead}
433 433 {cols: 22% 22% 19% 19% 18%}
434 434 | Race | Bonus Skills | Vulnerable | Resistant | Immune |
435 435 | :--- | :--- | :---: | :---: | :---: |
436 436 | Avian | fly | air | - | - |
437 437 | Drow | sneak, infravision, faerie fire | silver, mithril | charm | - |
438 438 | Dwarf | berserk, infravision | drowning | poison, magic | - |
439 439 ````
440 440
441 441 {stickyhead}
442 442 {cols: 22% 22% 19% 19% 18%}
443 443 | Race | Bonus Skills | Vulnerable | Resistant | Immune |
444 444 | :--- | :--- | :---: | :---: | :---: |
445 445 | Avian | fly | air | - | - |
446 446 | Drow | sneak, infravision, faerie fire | silver, mithril | charm | - |
447 447 | Dwarf | berserk, infravision | drowning | poison, magic | - |
448 +
449 + ### Merged cells (colspan, rowspan)
450 +
451 + `{cspan:N}` at the start of a cell makes that cell span N columns. Leave the next N-1 cells in the row blank.
452 +
453 + `{rspan:N}` at the start of a cell makes that cell span N rows. Leave the same column position blank in the next N-1 rows.
454 +
455 + Both can appear in one brace group, in either order: `{cspan:2 rspan:3}` or `{rspan:3 cspan:2}`.
456 +
457 + Grouped headers (colspan):
458 +
459 + ````
460 + | Rank | {cspan:2} Combat | | {cspan:3} Disarm | | |
461 + | --- | :---: | :---: | :---: | :---: | :---: |
462 + | | Offense | Defense | To Disarm | Shield | Be Disarmed |
463 + | Best | Whip | Staff | Whip | Flail | Whip |
464 + ````
465 +
466 + | Rank | {cspan:2} Combat | | {cspan:3} Disarm | | |
467 + | --- | :---: | :---: | :---: | :---: | :---: |
468 + | | Offense | Defense | To Disarm | Shield | Be Disarmed |
469 + | Best | Whip | Staff | Whip | Flail | Whip |
470 +
471 + Repeated leftmost value (rowspan):
472 +
473 + ````
474 + | Path | Skill | Cost | Notes |
475 + | -------- | --------- | ---- | ----------------- |
476 + | {rspan:4} Adept | Meditate | 30 | heal mind |
477 + | | Destroy Undead | 25 | ? |
478 + | | Recover | 20 | regen |
479 + | | Aura | 35 | Defensive |
480 + | {rspan:2} Crusader | Bless | 25 | crusade |
481 + | | Behead | 30 | bypass parry |
482 + ````
483 +
484 + | Path | Skill | Cost | Notes |
485 + | -------- | --------- | ---- | ----------------- |
486 + | {rspan:4} Adept | Meditate | 30 | heal mind |
487 + | | Destroy Undead | 25 | ? |
488 + | | Recover | 20 | regen |
489 + | | Aura | 35 | Defensive |
490 + | {rspan:2} Crusader | Bless | 25 | crusade |
491 + | | Behead | 30 | bypass parry |
492 +
493 + Rules:
494 +
495 + - Marker must be at the start of cell content, before any text.
496 + - Consumed cells must be blank. A cell in a span's shadow with text in it stays put, so forgetting the marker degrades to side-by-side rather than data loss.
497 + - GFM grid rule still applies: every row needs the same number of pipe-separated cells.
498 + - Spans inside `{row}...{/row}` work fine.
499 +
500 + ### Side-by-side row
501 +
502 + Lay out two or more tables (or any block content) on the same horizontal plane. Wrap blocks with `{row}` / `{/row}`. Children share the row equally and wrap below ~300px on narrow screens.
503 +
504 + ````
505 + {row}
506 +
507 + | Skill | Cost |
508 + | :--- | :---: |
509 + | Shoulder Smash | 30 |
510 + | Fasting | 25 |
511 +
512 + | Stat | Value |
513 + | :--- | :---: |
514 + | STR | 19 |
515 + | DEX | 17 |
516 +
517 + {/row}
518 + ````
519 +
520 + {row}
521 +
522 + | Skill | Cost |
523 + | :--- | :---: |
524 + | Shoulder Smash | 5 |
525 + | Fasting | 25 |
526 +
527 + | Stat | Value |
528 + | :--- | :---: |
529 + | STR | 19 |
530 + | DEX | 17 |
531 +
532 + {/row}
533 +
534 + Each table needs the usual blank line above and below it so markdown renders them as separate blocks. Other tags inside the row still work: a `{cols:}` or `{stickyhead}` on a child table behaves normally.
448 535
449 536 ## Embeds
450 537
451 538 These pull live data from the game DB into the page.
452 539
453 540 ### Help
454 541
455 542 Multi-word keywords go in single quotes.
456 543
457 544 ````
458 545 {help:berserk}
459 546 ````
460 547
461 548 {help:berserk}
462 549
463 550 ### Item
464 551
465 552 Reference an item by vnum or by name.
466 553
467 554 ````
468 555 {item:vorpal sword}
469 556 ````
470 557
471 558 {item:vorpal sword}
472 559
473 560 ### Item stat block
474 561
475 562 A compact box with just the stats, no description.
476 563
477 564 ````
478 565 {stato:10801}
479 566 ````
480 567
481 568 {stato:10801}
482 569
483 570 ### Pseudocode
484 571
485 572 Renders the pseudocode for a game function.
486 573
487 574 ````
488 575 {pseudo:do_berserk}
489 576 ````
490 577
491 578 {pseudo:do_berserk}
492 579
493 580 ## Escapes
494 581
495 582 A literal `{` without firing tag detection:
496 583
497 584 ````
498 585 \{toc} renders as plain text instead of a TOC.
499 586 ````
500 587
501 588 \{toc} renders as plain text instead of a TOC.
502 589
503 590 A literal `<` or `>` inside prose works as-is. HTML tags get stripped by the sanitizer except for the small allow-list (b, i, em, strong, br, p, code, blockquote, hr, etc.).