bouncepaw / mycomarkup

Markup language for Mycorrhiza Wiki. Moved to SourceHut
https://mycorrhiza.wiki/help/en/mycomarkup
Apache License 2.0
5 stars 2 forks source link

Infobox #10

Closed bouncepaw closed 2 years ago

bouncepaw commented 2 years ago

No doubt, we need infoboxes in our life.

An infobox is a special box located to the right of the content (usually) containing some important information. Wikipedia and other MediaWiki wikis use them heavily.

On Mycorrhiza, infoboxes (or infoboces? hehe) shall:

I propose this syntax:

infobox {
  <content>
}

The does not support all of Mycomarkup, only a part of it, i/e no transclusion, no other infoboces, no tables.

Supported subset of Mycomarkup in infoboces:

# Infobox title
## Section
### Subsection
img { ... }
Hypothetical: video { ... }, audio { ... }
Hypothetical: collapse { ... }, spoiler { ... }
Paragraph

Additional syntax:

! key | value (paragraph)
| column 1 (paragraph) | column 2 (para) | column 3 (para)

An example infobox:

infobox {
# Red gurnard
img { red gurnard }
## Scientific classification
! Kingdom: | Animalia
! Phylum: | Chordata
! Class: | Actinopterygii
! Order: | Scorpaeniformes
! Family: | Triglidae
! Genus: | Chelidonichthys
! Species: | C. cuculus
}

Another one:

infobox {
# Chapter 13
img { cool cat }
## Chapter information
! Release date | 2021-02-30
## Chapter navigation
| < [[chapter 12]] | [[chapter 14]] >
}

Something like that.

bouncepaw commented 2 years ago

With the new heading syntax (#13) it becomes even better:

infobox {
= Chapter 13
img { cool cat }
== Chapter information
! Release date | 2021-02-30
== Chapter navigation
| < [[chapter 12]] | [[chapter 14]] >
}
bouncepaw commented 2 years ago

Moved to https://todo.sr.ht/~bouncepaw/mycomarkup/6