@benev/web
v0.1.0-3
Published
✨ benev web sdk
Downloads
273
Readme
@benev/web
sdk toolkit for making an official benev website.
- install npm package
npm i @benev/web- note that imports from
@benev/webare browser-centric - note that imports from
@benev/web/ssgare node-safe
- note that imports from
- scute index.html.ts: install css from
ssgentrypoint- import benev css
import {benevCssText} from "@benev/web/ssg" - inject the css into your
<head>(along with your own styles)html` <style data-theme> @layer benev, app; @layer app { :root { color: #aaa; background: #000; } } ${html.raw(benevCssText)} ${orb.inject("css/app.css")} </style> `- benev styles are on the
benevlayer - the
applayer is an example of your own app's styles
- benev styles are on the
- import benev css
- html: add
benevhtml attribute wherever you want benev styles to apply<html benev> ... </html> - typescript: install custom elements
import {dom} from "@e280/sly" import {setupBenev} from "@benev/web" const benev = await setupBenev() dom.register(benev.elements)- menu (the benev overlay menu)
<benev-menu></benev-menu>- you can control the menu via
benev.shell, eg,benev.shell.toggle()
- you can control the menu via
- header (standard header with
bbutton that opens menu)<benev-header> <a href="https://benev.gg/">benev.gg</a> </benev-header> - loader (loading screens)
<benev-loader> hello world </benev-loader>- you control it by creating a
new Loader(dom("benev-loader"))
- you control it by creating a
- menu (the benev overlay menu)
