Compare commits
2 commits
8d8d292ac2
...
a76b429acd
Author | SHA1 | Date | |
---|---|---|---|
|
a76b429acd | ||
|
9c8be1a264 |
2 changed files with 2 additions and 25 deletions
24
src/html.js
24
src/html.js
|
@ -1,24 +0,0 @@
|
|||
class html {
|
||||
constructor() {
|
||||
this.html = '';
|
||||
}
|
||||
|
||||
|
||||
async loadingStart(element) {}
|
||||
|
||||
async loadingEnd(element) {}
|
||||
|
||||
async render(element, content) {
|
||||
var template = '%s';
|
||||
if (element.hasAttribute('html-template'))
|
||||
template = element.getAttribute('html-template');
|
||||
else if (element.hasAttribute("template")) {
|
||||
template = element.innerHTML;
|
||||
element.setAttribute('html-template', template);
|
||||
}
|
||||
|
||||
element.innerHTML = template.replace('%s', content);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4,10 +4,11 @@ import '../css/tripledot.css';
|
|||
|
||||
import { MyIP } from './plugins/myip.js';
|
||||
import { Time } from './plugins/time.js';
|
||||
|
||||
import { OpenCollective } from './plugins/opencollective.js';
|
||||
|
||||
|
||||
(function() {
|
||||
var time = new Time();
|
||||
var myip = new MyIP();
|
||||
var opencollective = new OpenCollective();
|
||||
})();
|
||||
|
|
Loading…
Reference in a new issue