This commit is contained in:
Shan Carter
2017-01-11 11:12:04 -08:00
parent 10c436ffb2
commit 93d61449f9
3 changed files with 10 additions and 3 deletions
+4
View File
@@ -1,5 +1,9 @@
# Distill Templates
## Development
Run `yarn start` to start a watching build rollup server.
## Testing
Run `yarn test`. That's it.
+3 -2
View File
@@ -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;
+3 -1
View File
@@ -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};