Skip to content

eklipse18/templately-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIT License NPM Downloads NPM Bundle Size NPM version

TemplatelyJS

This is an extremely small and lightweight package to enable the usage of custom templatesg in static HTML websites.

Usage/Examples

index.html

<!DOCTYPE html>
<html>
<head>
    ...
    <!-- Include the TemplatelyJS package -->
    <script src="/templately.js"></script>
    <!-- Or use the jsDelivr CDN -->
    <script src="https://cdn.jsdelivr.net/npm/@vthechamp/templately"></script>
</head>
<body>
    <!-- Use a custom template -->
    <custom-template src="/templates/navbar.html"></custom-template>
</body>
</html>

templates/navbar.html

<!-- Define a custom template -->
<nav class="nav">
    <h1 class="logo"><a href="#">Flexbox</a></h1>
    <ul class="main-nav">
        <li><a href="#">Home</a></li>
        <li><a href="#">About</a></li>
        <li><a href="#">Portfolio</a></li>
        <li><a href="#">Contact</a></li>
    </ul>
</nav> 

About

A tiny package for custom reusable components

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published