Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ryanve/templace

HTML template tag progressive content loader with minimal JavaScript
https://github.com/ryanve/templace

dom javascript progressive-enhancement template

Last synced: about 1 month ago
JSON representation

HTML template tag progressive content loader with minimal JavaScript

Awesome Lists containing this project

README

        

# templace
Progressively load template content via JavaScript. Useful for wrapping low-priority heavy content like `iframe` embeds such to load after initial page load and only when JavaScript is enabled. Gracefully degrades to noop.

```
npm install templace
```

## usage

```html

```

#### Include `script` late in page for best performance benefits

```html

```

#### Templacements happen automagically when the script loads or anytime you invoke the export

```js
templace()
```

#### Normalize `template` CSS for browsers without support

```css
template {
display: none;
}
```

## status
It's a simple minimum viable package with more granular features in consideration

## demo
https://ryanve.github.io/templace/