mirror of
https://github.com/wassname/template.git
synced 2026-08-08 11:28:20 +08:00
static js include
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import code from './hover-box.txt';
|
||||
|
||||
export default function(dom) {
|
||||
let s = dom.createElement("script");
|
||||
s.textContent = code;
|
||||
dom.querySelector("body").appendChild(s);
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import footer from "./components/footer";
|
||||
import citation from "./components/citation";
|
||||
import markdown from "./components/markdown";
|
||||
import code from "./components/code";
|
||||
import hoverBox from "./components/hover-box";
|
||||
import generateCrossref from "./components/generate-crossref";
|
||||
|
||||
function renderImmediately(dom) {
|
||||
@@ -28,6 +29,7 @@ function renderOnLoad(dom, data) {
|
||||
markdown(dom, data);
|
||||
code(dom, data);
|
||||
citation(dom, data);
|
||||
hoverBox(dom, data);
|
||||
// TODO remove script tag
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ export default {
|
||||
browser: true,
|
||||
}),
|
||||
string({
|
||||
include: ["**/*.svg", "**/*.html", "**/*.css", "**/*.base64"]
|
||||
include: ["**/*.txt", "**/*.svg", "**/*.html", "**/*.css", "**/*.base64"]
|
||||
}),
|
||||
buble({
|
||||
exclude: 'node_modules',
|
||||
|
||||
Reference in New Issue
Block a user