Compare commits

..

4 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
5 changed files with 59 additions and 10 deletions

4
package-lock.json generated
View File

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

View File

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

View File

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

View File

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

View File

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