1.0.0 • Published 2 years ago

@vthechamp/templately v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

MIT License NPM Downloads NPM Bundle Size NPM version

TemplatelyJS

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

Usage/Examples

index.html

<!DOCTYPE html>
<html>
<head>
    ...
    <!-- Include the TemplatelyJS package -->
    <script src="/templately.js"></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>