Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Akohjesse/reUseMl

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReUseMarkup

You create your html components and use the reUseMl script to render them to your html document

Installation

For your simple usage of ReUSe dowload from Here

Set-Up

Create a directory of /components and store all your markup components , For small projects you can have your styling in your html using <style></style> tags

Usage

Add the reUse.js file or minified reUse.min.js to html code, then also create another javascript file where you call the render method

 <script src='reUse.min.js'></script>
 <script src='app.js'></script>

reuse-inuse

In your app.js, if you want to render a header.html component into your container with an Id of #header You instantiate reuse from ReUseMl(), then set the views or directory where it'll search for your components, using the reuse.set() method

const reuse = new ReUseMl();
reuse.set('./components)
reuse.render('header.html', '#header');

reuse-inuse

Example

Check here for an example using the library or clone repo and open

License

Distributed under the MIT license. See LICENSE for more information

About

A simple Javascript library for rendering html components

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.