Fix background and fix PageElement system

This commit is contained in:
schmelczerandras 2020-11-22 22:41:10 +01:00
parent 6fc16f4de0
commit 91d92f7f48
24 changed files with 528 additions and 809 deletions

View file

@ -0,0 +1,6 @@
import './main.scss';
import { html } from '../../types/html';
export const generate = (): html => `
<main></main>
`;

21
src/page/main/main.scss Normal file
View file

@ -0,0 +1,21 @@
@use '../../style/mixins' as *;
main {
height: 100%;
overflow-x: hidden;
overflow-y: scroll;
perspective: 5px;
@media (hover: hover) {
&::-webkit-scrollbar-track,
&::-webkit-scrollbar {
background-color: transparent;
width: 12px;
}
&::-webkit-scrollbar-thumb {
background-color: var(--accent-color);
border-radius: var(--border-radius);
}
}
}

10
src/page/main/main.ts Normal file
View file

@ -0,0 +1,10 @@
import { PageElement } from '../page-element';
import { generate } from './main.html';
import { createElement } from '../../helper/create-element';
export class Main extends PageElement {
constructor(...children: Array<PageElement>) {
super(createElement(generate()), children);
children.forEach(c => this.attachElement(c));
}
}