@progressive-development/pd-page 0.1.98 → 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 +36 -21
- 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;
|
|
@@ -183,36 +184,50 @@ export class PdMenu extends LitElement {
|
|
|
183
184
|
padding-left: 10px;
|
|
184
185
|
}
|
|
185
186
|
|
|
186
|
-
.burger-menu {
|
|
187
|
-
display: flex;
|
|
188
|
-
gap: 0.3rem;
|
|
189
|
-
width: 100%;
|
|
190
|
-
justify-content: end;
|
|
191
|
-
align-items: center;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.burger-menu .item{
|
|
195
|
-
padding: 0;
|
|
196
|
-
font-size: 1.5em;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
187
|
.topItemLogo {
|
|
200
188
|
--pd-icon-size: 1.4rem;
|
|
201
189
|
--pd-icon-bg-col: transparent;
|
|
202
190
|
--pd-icon-stroke-col: var(--pd-menu-font-col, var(--pd-default-bg-col));
|
|
203
191
|
--pd-icon-col: var(--pd-menu-font-col, var(--pd-default-bg-col));
|
|
204
192
|
pointer-events: none;
|
|
205
|
-
}
|
|
193
|
+
}
|
|
206
194
|
|
|
207
195
|
.burgerLogo {
|
|
208
|
-
--pd-icon-size: 2rem;
|
|
209
|
-
--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
|
+
|
|
210
208
|
--pd-icon-stroke-col: var(--pd-menu-font-col, var(--pd-default-bg-col));
|
|
211
|
-
--pd-icon-col: var(--pd-default-hover-col);
|
|
209
|
+
--pd-icon-col: var(--pd-default-hover-col);
|
|
210
|
+
|
|
212
211
|
--pd-icon-stroke-col-active: var(--pd-menu-font-col, var(--pd-default-bg-col));
|
|
213
212
|
--pd-icon-col-active: lightgrey;
|
|
214
|
-
|
|
215
|
-
|
|
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
|
+
}
|
|
216
231
|
|
|
217
232
|
/* An anderer Stelle teils das Image von außen gestylt, das macht es wahrschweinlich
|
|
218
233
|
einfacher als hier einzeln zu stylen. noch zu prüfen
|
|
@@ -338,7 +353,7 @@ export class PdMenu extends LitElement {
|
|
|
338
353
|
` : html`
|
|
339
354
|
<div class="burger-menu" @click="${this._toggleBurgerMenu}">
|
|
340
355
|
<pd-icon class="burgerLogo" icon="${burgerIcon}" ?activeIcon="${!this._activeBurgerMenu}"></pd-icon>
|
|
341
|
-
<span class="item">Menu</span>
|
|
356
|
+
<span class="item ${this._activeBurgerMenu ? 'active' : ''}">Menu</span>
|
|
342
357
|
</div>
|
|
343
358
|
`}
|
|
344
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}
|