diff --git a/README.md b/README.md index f8601b3..d2bc97c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # Distill Templates +## Development + +Run `yarn start` to start a watching build rollup server. + ## Testing Run `yarn test`. That's it. diff --git a/components/header.js b/components/header.js index 0677a1f..69ccdb6 100644 --- a/components/header.js +++ b/components/header.js @@ -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; diff --git a/index.js b/index.js index e6f8be5..8f2f2c5 100644 --- a/index.js +++ b/index.js @@ -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};