M README.md => README.md +1 -1
@@ 1,6 1,6 @@
## A bridge between Gemini and HTML
Start with [gmi.css](https://talon.computer/css/) and if you're feeling adventurous or perhaps naïve checkout [gmi.js](https://talon.computer/js/)
M docs/js.gmi => docs/js.gmi +7 -6
@@ 15,12 15,12 @@ line.content = "now\nit's\na\nlist"
A document provides a way to handle many lines together:
window.gmi = new Gemini(document.body)
window.gmi.lines.type = "P"
window.gmi.lines = [
Gemini.line("http://talon.computer/js/ now... take me back please", "A"),
window.gmi.lines.type = "H3"
> the gemtext source is available via .source
@@ 40,10 40,11 @@ window.gmi.background = foreground
=> /css/ learn more about gmi.css
=> https://git.sr.ht/~talon/gmi-web/tree gmi.js licensed under CC0 and available on sourcehut as apart of gmi-web
=> https://git.sr.ht/~talon/gmi-web/tree gmi.js is licensed under CC0 and available on sourcehut as apart of gmi-web
### [WIP] editing!
- enter from links/headings creates new P
- backspace at beginning of line doesn't remove DOM (+ delete on empty lines)
- cross-platform action for toggling editable?
- cross-platform action for changing line type?
* enter creates new P
* shift + enter creates newline
* backspace at beginning of line doesn't remove DOM (+ delete on empty lines)
* cross-platform action for changing line type?
* cross-platform action for toggling editable?
A docs/web.gmi => docs/web.gmi +30 -0
@@ 0,0 1,30 @@
Due to the ambiguity of HTML several translations from Gemini exist in the wild. I propose the following standard:
UL ↔ *
BLOCKQUOTE ↔ >
PRE ↔ ```
A ↔ =>
H[1-3] ↔ #[##]
> P, UL, BLOCKQUOTE, and PRE may also have newlines which should be inserted as innerHTML using the following rules:
P ↔ <br>
BLOCKQUOTE ↔ <div><br></div>
UL ↔ <li><br></li>
PRE (\n is implied hence preformatted)
If this standard is respected gmi.css will happily tell modern web browsers how to render your text in a predictable and readable way!
=> /css/ read more about gmi.css
gmi.js is currently under active development but already exposes a Gemini.line function which wraps the DOM API in a Gemini way. This should enable addressing the editability quirks and also provide a foundation for future JS/Gemini mashups.
=> /js/ read more about gmi.js
=> https://git.sr.ht/~talon/gmi-web/ gmi-web is licensed under CC0 and available on sourcehut