# [WIP] gmi.js
## A bridge between the DOM and Gemini
gmi.js is made up of lines! Use ctrl+shift+i to open a console and paste this in:
```js
const line = Gemini.line({
type: "UL",
content: "manipulate the dom\nbut like in a Gemini way\ntry it!"
})
document.body.prepend(line.dom)
```
> now try changing the type and content and observing the effects.
```js
line.type = "BLOCKQUOTE"
line.content = "now it's a quote"
```
A document provides a way to handle many lines together:
```js
window.gmi = new Gemini(document.body)
window.gmi.lines[2].type = "P"
window.gmi.lines = [
Gemini.line({content: "interesting", type: "H1"}),
Gemini.line({content: "that's convienient"}),
]
```
> the gemtext source is available via .source
```js
window.gmi.source
```
> or maybe a .gmi file would be easier?
```js
window.gmi.download()
```
All the gmi.css variables are also available as properties.
=> /css/ learn more about gmi.css
```
window.gmi.foreground = "white"
window.gmi.background = "black"
```
=> /gmi.js view/download (minified version available via .min.js) CC0