Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/ryanve/templace
- Owner: ryanve
- License: cc0-1.0
- Created: 2018-05-17T04:05:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-11-12T04:21:26.000Z (about 3 years ago)
- Last Synced: 2024-10-06T16:37:41.601Z (about 1 month ago)
- Topics: dom, javascript, progressive-enhancement, template
- Language: HTML
- Homepage: https://ryanve.github.io/templace/
- Size: 38.1 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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/