1 | import logo from "./distill-logo.svg";
|
2 |
|
3 | let html = `
|
4 | <style>
|
5 | dt-footer {
|
6 | display: block;
|
7 | color: rgba(255, 255, 255, 0.4);
|
8 | font-weight: 300;
|
9 | padding: 40px 0;
|
10 | border-top: 1px solid rgba(0, 0, 0, 0.1);
|
11 | background-color: hsl(200, 60%, 15%);
|
12 | text-align: center;
|
13 | }
|
14 | dt-footer .logo svg {
|
15 | width: 24px;
|
16 | position: relative;
|
17 | top: 4px;
|
18 | margin-right: 2px;
|
19 | }
|
20 | dt-footer .logo svg path {
|
21 | fill: none;
|
22 | stroke: rgba(255, 255, 255, 0.8);
|
23 | stroke-width: 3px;
|
24 | }
|
25 | dt-footer .logo {
|
26 | font-size: 17px;
|
27 | font-weight: 200;
|
28 | color: rgba(255, 255, 255, 0.8);
|
29 | text-decoration: none;
|
30 | margin-right: 6px;
|
31 | }
|
32 | </style>
|
33 |
|
34 | <div class="l-screen-inset">
|
35 | <a href="/" class="logo">
|
36 | ${logo}
|
37 | Distill
|
38 | </a> is dedicated to clear explanations of machine learning
|
39 | </div>
|
40 | `;
|
41 |
|
42 | export default function(dom, data) {
|
43 | let el = dom.querySelector("dt-footer");
|
44 | if(el) {
|
45 | el.innerHTML = html;
|
46 | } else {
|
47 | let footer = dom.createElement("dt-footer");
|
48 | footer.innerHTML = html;
|
49 | let b = dom.querySelector("body");
|
50 | b.appendChild(footer);
|
51 | }
|
52 | }
|