Skip to content

Abdool-Zaid/outer_lining

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

outer_lining

This is a MVC framework made entirely in JS proof of concept p.1.0.0

instructions

  1. link the min.js in html and no further imports will be needed anywhere else

  2. to set data use this in any js file

    state.controllers.set_data('foo', 'bar')
  1. to display the data in html, call it with double curly braces, and any time the data is changed it will be reflected in the DOM
 <h1>{{foo}}</h1>
  1. theme detection is automatic but you can set your own custom them with state.controllers.set_theme("custom_theme") you can define your custom theme in state.themes in this format
custom_theme:{
primary: '#050808',
secondary: '#86e9a5',
accent : '#ff8847',
}
  1. you can use loops with
<loop count="{{foo}}"><h2>this is the item that will be repeated</h2></loop>

please note that the loop only works with one child element

  1. you can set inputs with
    <input type="text" value="{{foo}}">

~~~JS
    state.controllers.set_input('foo', 'bar') // bar will show as the placeholder 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published