Compare commits

..

6 Commits

Author SHA1 Message Date
c86f7d466c 1.0.99 2022-08-18 02:11:36 +02:00
9a6db7d882 fix(core): update 2022-08-18 02:11:35 +02:00
b69b1179a1 1.0.98 2022-08-17 19:56:22 +02:00
0df9fe750c fix(core): update 2022-08-17 19:56:22 +02:00
0d05bfa5ff 1.0.97 2022-08-17 19:28:12 +02:00
4dc9e04c2e fix(core): update 2022-08-17 19:28:11 +02:00
5 changed files with 63 additions and 14 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@designestate/dees-catalog",
"version": "1.0.96",
"version": "1.0.99",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@designestate/dees-catalog",
"version": "1.0.96",
"version": "1.0.99",
"license": "MIT",
"dependencies": {
"@designestate/dees-domtools": "^2.0.23",

View File

@ -1,6 +1,6 @@
{
"name": "@designestate/dees-catalog",
"version": "1.0.96",
"version": "1.0.99",
"private": false,
"description": "website for lossless.com",
"main": "dist_ts_web/index.js",

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@designestate/dees-catalog',
version: '1.0.96',
version: '1.0.99',
description: 'website for lossless.com'
}

View File

@ -10,12 +10,32 @@ import {
} from '@designestate/dees-element';
import { DeesWindowLayer } from './dees-windowlayer.js';
@customElement('lele-mobilenavigation')
export class LeleMobilenavigation extends DeesElement {
private static singletonRef: LeleMobilenavigation;
@customElement('dees-mobilenavigation')
export class DeesMobilenavigation extends DeesElement {
// STATIC
public static demo = () => html`
<dees-mobilenavigation
.menuItems="${[
{
name: 'hello1',
action: async () => {},
},
{
name: 'hello2',
action: async () => {},
},
{
name: 'hello3',
action: async () => {},
},
]}"
></dees-mobilenavigation>
`;
private static singletonRef: DeesMobilenavigation;
public static async createAndInit(menuItemsArg: plugins.tsclass.website.IMenuItem[]) {
if (!this.singletonRef) {
this.singletonRef = new LeleMobilenavigation();
this.singletonRef = new DeesMobilenavigation();
document.body.append(this.singletonRef);
await this.singletonRef.init();
}
@ -27,12 +47,24 @@ export class LeleMobilenavigation extends DeesElement {
// INSTANCE
@property({
type: Object,
type: Array,
})
public heading: string = `MENU`;
@property({
type: Array,
})
public menuItems: plugins.tsclass.website.IMenuItem[] = [];
readyDeferred = domtools.plugins.smartpromise.defer();
constructor() {
super();
this.init().then(() => {
this.show();
});
}
/**
* inits the mobile navigation
*/
@ -52,13 +84,15 @@ export class LeleMobilenavigation extends DeesElement {
will-change: transform;
position: fixed;
height: 100vh;
min-width: 370px;
min-width: 280px;
transform: translateX(200px);
color: #fff;
z-index: 100;
z-index: 250;
opacity: 0;
padding: 16px;
padding: 16px 32px;
right: 0px;
top: 0px;
bottom: 0px;
background: #000;
border-left: 1px dashed #444;
pointer-events: none;
@ -71,20 +105,34 @@ export class LeleMobilenavigation extends DeesElement {
}
.menuItem {
text-align: center;
text-align: left;
padding: 8px;
margin-left: -8px;
margin-right: -8px;
cursor: pointer;
border-radius: 3px;
}
.menuItem:hover {
background: #333;
}
.heading {
text-align: left;
font-size: 24px;
padding: 8px 0px;
font-family: 'Roboto';
font-weight: 300;
border-bottom: 1px dashed #444;
margin-top: 16px;
margin-bottom: 16px;
}
`,
];
public render() {
return html`
<div class="main">
<div class="heading">${this.heading}</div>
${this.menuItems.map((menuItem) => {
return html`
<div
@ -134,7 +182,7 @@ export class LeleMobilenavigation extends DeesElement {
this.windowLayer.hide();
}
async disconnectedCallback () {
async disconnectedCallback() {
document.body.removeChild(this.windowLayer);
}
}

View File

@ -42,6 +42,7 @@ export class DeesWindowLayer extends DeesElement {
background: rgba(0, 0, 0, 0.0);
backdrop-filter: brightness(1);
pointer-events: none;
z-index: 200;
}
.visible {