sp-templates

Premade HTML templates for kickstarting a new web application. Uses encode-html-template-tag under the hood.

Usage no npm install needed!

<script type="module">
  import spTemplates from 'https://cdn.skypack.dev/sp-templates';
</script>

README

SP Templates

Premade HTML templates for kickstarting a new web application. Uses encode-html-template-tag under the hood.

Dependencies

  • css.escape: ^1.5.1
  • encode-html-template-tag: ^2.4.0

Modules

sp-templates

Members

tag

sp-templates

sp-templates.page(options, body)

Create a basic page with header, nav, main and footer.

Kind: static method of sp-templates

Param Type Description
options Object Page options
options.title String Page title
options.colour String Theme colour
body String | Html The body

sp-templates.time(options, date)

Create an HTML element representing a date and time

Kind: static method of sp-templates

Param Type Description
options Object Extra attributes to add to the time component
options.lang String The locale to render the text in
date Date The datetime to use

tag

Deprecated

Kind: global variable