gmi-web/js.gmi
Talon Poole f6f73cba98 v1.0.0
2020-12-11 23:23:57 +00:00

67 lines
2.3 KiB
Plaintext

# gmi.js
## an optional extension to gmi.css
=> /css/ gmi.css
* light/dark mode
* click to copy pre blocks
* inline images, audio and video
* themeable
```
<meta name="color-scheme" content="dark light">
<link rel="stylesheet" href="https://talon.computer/gmi.css"/>
<script src="/gmi.js"></script>
<script>
window.gmi = new Gemini({ modes: true })
window.onload = () => window.gmi
.clickToCopy()
.inline({ images: true, audio: true, video: true })
.themes({
book: {
icon: "📖",
colors: ["#555555", "#fffceb"]
},
rose: {
icon: "🌹",
colors: ["#555555", "#ffdfdf"]
},
plant: {
icon: "🌱",
colors: ["#555555", "#9eebcf"]
},
ocean: {
icon: "🌊",
colors: ["#555555", "#96ccff"]
},
})
</script>
```
By default gmi.js will determine your theme based on the --foreground and --background CSS variables. You can supply your own themes using the object format shown above. I recommend using readable color palettes.
=> https://tachyons.io/docs/themes/skins/ Tachyons Color Schemes
### Download gmi.js today!
=> //talon.computer/gmi.js gmi.js
=> //talon.computer/gmi.min.js gmi.min.js
# inline examples
## images
=> https://www.learningcontainer.com/wp-content/uploads/2020/09/Sample-ICO-file-Download-for-testing.ico ICO
=> https://www.learningcontainer.com/wp-content/uploads/2020/07/sample-jpg-file-for-testing.jpg JPG
=> https://www.learningcontainer.com/wp-content/uploads/2020/08/Sample-PNG-File-for-Testing.png PNG
=> https://www.learningcontainer.com/wp-content/uploads/2020/08/Sample-SVG-Image-File-Download.svg SVG
=> https://www.learningcontainer.com/wp-content/uploads/2020/08/sample-webp-file-for-testing.webp WEBP
=> https://www.learningcontainer.com/wp-content/uploads/2020/09/Sample-gif-Image-File-Download.gif GIF
## audio
=> https://learn.esperanto.com/assets/ogg/01.ogg OGG
=> https://learn.esperanto.com/assets/mp3/01.mp3 MP3
## video
=> https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-mp4-file.mp4 MP4
=> https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-mov-file.mov MOV
=> https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-webm-file.webm WEBM
=> https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-ogv-file.ogv OGV
CC0