@latel88/hotate

1.1.0 • Public • Published

Hotate

UI library.

install

npm install @latel88/hotate
  • CJS
const Hotate = requrire( "@latel88/hotate" ).default;
  • ESM
import Hotate from "@latel88/hotate";

exsample

const $ = new Hotate( { window } );
const elem = document.getElementById( "render" );

$.BOOT( elem ).
	OPEN( "div",
	{
		style: {
			"color": "#f00"
			
		}
		
	} ).
		TEXT( "HelloWorld!" ).

	CLOSE( "div" ).
EXIT();

rendering list

const list = [ "apple", "orange", "nuts" ];
const render = ( name ) ->
{
	$.OPEN( "li" ).
		TEXT( name ).

	CLOSE( "li" );

}

$.BOOT( elem );
	$.OPEN( "ul",
	{
		style: {
			"listStyleType": "number"
			
		}
		
	} );

	list.forEach( render );

	$.CLOSE( "ul" );
$.EXIT();

append touch element

const canvas = document.createElement( "canvas" );
const css = elem.style;

canvas.id = "game";
css.width = elem.width * 2 + "px";
css.height = elem.height * 2 + "px";

$.BOOT( elem ).
	ELEMENT( canvas ).
	
EXIT();

$.BOOT( elem ).
	VOID( "canvas" ).
	
EXIT();

console.log( canvas.parentNode ); //null

Readme

Keywords

none

Package Sidebar

Install

npm i @latel88/hotate

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

129 kB

Total Files

56

Last publish

Collaborators

  • latel88