mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-25 04:24:45 -04:00
Start to replace jQuery with dom.
This commit is contained in:
parent
9234e3f287
commit
7320592dc2
26 changed files with 566 additions and 301 deletions
|
@ -1,10 +1,10 @@
|
|||
const {jq} = require('../globals');
|
||||
const {dom} = require('../dom');
|
||||
|
||||
const rootSelector = 'body';
|
||||
const tplTopbar =
|
||||
`<div id="topbar">
|
||||
<div id="toolbar"/>
|
||||
<div id="flowbar"/>
|
||||
<div id="toolbar"></div>
|
||||
<div id="flowbar"></div>
|
||||
<a id="backlink" href="https://larsjung.de/h5ai/" title="powered by h5ai - https://larsjung.de/h5ai/">
|
||||
<div>powered</div>
|
||||
<div>by h5ai</div>
|
||||
|
@ -12,16 +12,16 @@ const tplTopbar =
|
|||
</div>`;
|
||||
const tplMainrow =
|
||||
`<div id="mainrow">
|
||||
<div id="content"/>
|
||||
<div id="content"></div>
|
||||
</div>`;
|
||||
|
||||
const init = () => {
|
||||
jq('#fallback, #fallback-hints').remove();
|
||||
dom('#fallback, #fallback-hints').rm();
|
||||
|
||||
const $root = jq(rootSelector)
|
||||
const $root = dom(rootSelector)
|
||||
.attr('id', 'root')
|
||||
.append(tplTopbar)
|
||||
.append(tplMainrow);
|
||||
.app(tplTopbar)
|
||||
.app(tplMainrow);
|
||||
|
||||
return {
|
||||
$root,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue