Compare commits
No commits in common. "9975d72364a95f911317ba98a0c81db7ee7b0e84" and "b83ba3b56af89e903d6f180cf7b2650e0aaa217f" have entirely different histories.
9975d72364
...
b83ba3b56a
17
index.html
|
@ -1,22 +1,11 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8" />
|
||||||
<link rel="icon" href="/static/images/home-icon.png">
|
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="/src/css/index.css">
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
<bottom-app-bar></bottom-app-bar>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<script src="/src/components/bottom-app-bar.js" type="module"></script>
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
|
@ -1,77 +0,0 @@
|
||||||
const template = `
|
|
||||||
<div>
|
|
||||||
<img src="/static/images/home-icon.png">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<img src="/static/images/routes-icon.png">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<img src="/static/images/settings-icon.png">
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
const style = `
|
|
||||||
:host {
|
|
||||||
position: fixed;
|
|
||||||
bottom: 20px;
|
|
||||||
display: flex;
|
|
||||||
height: 42px;
|
|
||||||
width: 80%;
|
|
||||||
border-radius: 90px;
|
|
||||||
box-shadow: 0 0 50px #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
:host > div {
|
|
||||||
flex: 1;
|
|
||||||
display: grid;
|
|
||||||
place-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
display: block;
|
|
||||||
height: 32px;
|
|
||||||
width: auto;
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Bottom app bar custom element.
|
|
||||||
*/
|
|
||||||
class BottomAppBar extends HTMLElement {
|
|
||||||
#elements = {};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @constructor
|
|
||||||
*/
|
|
||||||
constructor() {
|
|
||||||
super();
|
|
||||||
|
|
||||||
this.#createShadowDOM();
|
|
||||||
this.#setElements();
|
|
||||||
this.#addEventListeners();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create shadow DOM.
|
|
||||||
*/
|
|
||||||
#createShadowDOM() {
|
|
||||||
this.attachShadow({mode: 'open'});
|
|
||||||
this.shadowRoot.innerHTML = `
|
|
||||||
<style>${style}</style>
|
|
||||||
${template}
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set all shadow dom selectors.
|
|
||||||
*/
|
|
||||||
#setElements() {
|
|
||||||
this.selectors = {};
|
|
||||||
}
|
|
||||||
|
|
||||||
#addEventListeners() {}
|
|
||||||
}
|
|
||||||
|
|
||||||
customElements.define('bottom-app-bar', BottomAppBar);
|
|
||||||
|
|
||||||
export default BottomAppBar;
|
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
|
|
||||||
* {
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0px;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
|
||||||
display: grid;
|
|
||||||
place-items: center;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
Before Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 923 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 8 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 11 MiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 1 KiB |