@progressive-development/pd-page 0.1.97 → 0.1.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/PdMenu.js +38 -22
- package/src/stories/menu.stories.js +1 -1
package/package.json
CHANGED
package/src/PdMenu.js
CHANGED
|
@@ -48,8 +48,9 @@ export class PdMenu extends LitElement {
|
|
|
48
48
|
.menu-container {
|
|
49
49
|
height: 100%;
|
|
50
50
|
padding-left: 10px;
|
|
51
|
-
padding-right: 10px;
|
|
51
|
+
padding-right: 10px;
|
|
52
52
|
display: flex;
|
|
53
|
+
justify-content: space-between;
|
|
53
54
|
align-items: center;
|
|
54
55
|
white-space: nowrap;
|
|
55
56
|
max-width: 1170px;
|
|
@@ -94,6 +95,7 @@ export class PdMenu extends LitElement {
|
|
|
94
95
|
flex-direction: column;
|
|
95
96
|
top: 10px;
|
|
96
97
|
right: 15px;
|
|
98
|
+
z-index: 100;
|
|
97
99
|
background-color: var(--pd-menu-burger-bg-col, var(--pd-default-light-col));
|
|
98
100
|
|
|
99
101
|
box-shadow: var(--pd-menu-shadow, 3px 3px 5px grey);
|
|
@@ -182,36 +184,50 @@ export class PdMenu extends LitElement {
|
|
|
182
184
|
padding-left: 10px;
|
|
183
185
|
}
|
|
184
186
|
|
|
185
|
-
.burger-menu {
|
|
186
|
-
display: flex;
|
|
187
|
-
gap: 0.3rem;
|
|
188
|
-
width: 100%;
|
|
189
|
-
justify-content: end;
|
|
190
|
-
align-items: center;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.burger-menu .item{
|
|
194
|
-
padding: 0;
|
|
195
|
-
font-size: 1.5em;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
187
|
.topItemLogo {
|
|
199
188
|
--pd-icon-size: 1.4rem;
|
|
200
189
|
--pd-icon-bg-col: transparent;
|
|
201
190
|
--pd-icon-stroke-col: var(--pd-menu-font-col, var(--pd-default-bg-col));
|
|
202
191
|
--pd-icon-col: var(--pd-menu-font-col, var(--pd-default-bg-col));
|
|
203
192
|
pointer-events: none;
|
|
204
|
-
}
|
|
193
|
+
}
|
|
205
194
|
|
|
206
195
|
.burgerLogo {
|
|
207
|
-
--pd-icon-size: 2rem;
|
|
208
|
-
--pd-icon-bg-col: transparent;
|
|
196
|
+
--pd-icon-size: 2rem;
|
|
197
|
+
--pd-icon-bg-col: transparent;
|
|
198
|
+
pointer-events: none;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.burger-menu {
|
|
202
|
+
display: flex;
|
|
203
|
+
gap: 0.3rem;
|
|
204
|
+
justify-content: end;
|
|
205
|
+
align-items: center;
|
|
206
|
+
cursor: pointer;
|
|
207
|
+
|
|
209
208
|
--pd-icon-stroke-col: var(--pd-menu-font-col, var(--pd-default-bg-col));
|
|
210
|
-
--pd-icon-col: var(--pd-default-hover-col);
|
|
209
|
+
--pd-icon-col: var(--pd-default-hover-col);
|
|
210
|
+
|
|
211
211
|
--pd-icon-stroke-col-active: var(--pd-menu-font-col, var(--pd-default-bg-col));
|
|
212
212
|
--pd-icon-col-active: lightgrey;
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.burger-menu .item{
|
|
216
|
+
padding: 0;
|
|
217
|
+
font-size: 1.5em;
|
|
218
|
+
transition: color ease 0.5s;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.burger-menu:hover .item {
|
|
222
|
+
color: var(--pd-default-hover-col);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.burger-menu:hover {
|
|
226
|
+
--pd-icon-col: var(--pd-default-hover-col);
|
|
227
|
+
--pd-icon-col-active: var(--pd-default-hover-col);
|
|
228
|
+
--pd-icon-stroke-col: var(--pd-menu-font-col, var(--pd-default-bg-col));
|
|
229
|
+
--pd-icon-stroke-col-active: var(--pd-menu-font-col, var(--pd-default-bg-col));
|
|
230
|
+
}
|
|
215
231
|
|
|
216
232
|
/* An anderer Stelle teils das Image von außen gestylt, das macht es wahrschweinlich
|
|
217
233
|
einfacher als hier einzeln zu stylen. noch zu prüfen
|
|
@@ -322,7 +338,7 @@ export class PdMenu extends LitElement {
|
|
|
322
338
|
${this.selectedLocale}
|
|
323
339
|
<pd-icon class="locale-selection-logo" icon="${toggleArrow}" ?activeIcon="${!this._activeLocaleMenu}"></pd-icon>
|
|
324
340
|
<ul class="menu-ul locale-ul">
|
|
325
|
-
${this.locales.map(locale => html`
|
|
341
|
+
${this.locales.filter(l => l !== this.selectedLocale).map(locale => html`
|
|
326
342
|
<li class="item menu-li burger-li burger-item locale-item"
|
|
327
343
|
data-key="${locale}"
|
|
328
344
|
@click="${this._localeClicked}"
|
|
@@ -337,7 +353,7 @@ export class PdMenu extends LitElement {
|
|
|
337
353
|
` : html`
|
|
338
354
|
<div class="burger-menu" @click="${this._toggleBurgerMenu}">
|
|
339
355
|
<pd-icon class="burgerLogo" icon="${burgerIcon}" ?activeIcon="${!this._activeBurgerMenu}"></pd-icon>
|
|
340
|
-
<span class="item">Menu</span>
|
|
356
|
+
<span class="item ${this._activeBurgerMenu ? 'active' : ''}">Menu</span>
|
|
341
357
|
</div>
|
|
342
358
|
`}
|
|
343
359
|
|
|
@@ -86,7 +86,7 @@ function Template({ menuItems, topMenuItems, color, logo, menuColor, locales, se
|
|
|
86
86
|
return html`
|
|
87
87
|
<pd-menu
|
|
88
88
|
style="--pd-menu-bg-col: ${menuColor || color};
|
|
89
|
-
--pd-menu-height: ${menuHeight ||
|
|
89
|
+
--pd-menu-height: ${menuHeight || 80}px;
|
|
90
90
|
transition: background-color 1s;"
|
|
91
91
|
.menuItems=${menuItems}
|
|
92
92
|
.topMenuItems=${topMenuItems}
|