mirror of
https://github.com/wassname/template.git
synced 2026-07-16 11:22:25 +08:00
Updates
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# Distill Templates
|
||||
|
||||
## Development
|
||||
|
||||
Run `yarn start` to start a watching build rollup server.
|
||||
|
||||
## Testing
|
||||
|
||||
Run `yarn test`. That's it.
|
||||
|
||||
@@ -6,12 +6,13 @@ dt-header {
|
||||
display: block;
|
||||
position: relative;
|
||||
height: 60px;
|
||||
background: none;
|
||||
background: #f9f9f9;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
z-index: 2;
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
||||
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
dt-header .content {
|
||||
height: 60px;
|
||||
|
||||
@@ -32,7 +32,6 @@ function renderOnLoad(dom, data) {
|
||||
code(dom, data);
|
||||
citation(dom, data);
|
||||
hoverBox(dom, data);
|
||||
// TODO remove script tag
|
||||
}
|
||||
|
||||
// If we are in a browser, render automatically.
|
||||
@@ -49,6 +48,9 @@ if(window && window.document) {
|
||||
function render(dom, data) {
|
||||
renderImmediately(dom);
|
||||
renderOnLoad(dom, data);
|
||||
// Remove script tag so it doesn't run again
|
||||
let s = dom.querySelector('script[src="http://distill.pub/template.js]');
|
||||
s.parentElement.removeChild(s);
|
||||
}
|
||||
|
||||
export {render as render};
|
||||
|
||||
Reference in New Issue
Block a user