@progressive-development/pd-page 0.1.16 → 0.1.18

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/PdMenu.js +17 -11
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Progressive development page helper, teaser, menu, footer.",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "author": "PD Progressive Development",
6
- "version": "0.1.16",
6
+ "version": "0.1.18",
7
7
  "main": "index.js",
8
8
  "module": "index.js",
9
9
  "scripts": {
package/src/PdMenu.js CHANGED
@@ -59,7 +59,8 @@ export class PdMenu extends LitElement {
59
59
  display: flex;
60
60
  align-items: center;
61
61
  cursor: pointer;
62
- border-radius: 0.5rem;
62
+ border-radius: var(--pd-border-radius);
63
+
63
64
  }
64
65
 
65
66
  .item {
@@ -67,7 +68,7 @@ export class PdMenu extends LitElement {
67
68
  font-family: var(--pd-menu-font-family, var(--pd-default-font-title-family));
68
69
  font-size: var(--pd-menu-font-size, 1.2em);
69
70
  font-weight: var(--pd-menu-font-weight, bold);
70
- padding: 0.8em;
71
+ padding: var(--pd-menu-item-padding, 0.6em);
71
72
  }
72
73
 
73
74
  .item.active,
@@ -110,8 +111,10 @@ export class PdMenu extends LitElement {
110
111
  pointer-events: none;
111
112
  }
112
113
 
114
+ /* An anderer Stelle teils das Image von außen gestylt, das macht es wahrschweinlich
115
+ einfacher als hier einzeln zu stylen. noch zu prüfen */
113
116
  ::slotted(.logo) {
114
- max-width:6rem;
117
+ max-width: var(--pd-menu-logo-maxwidth, 8rem);
115
118
  width: 100%;
116
119
  padding: var(--pd-menu-logo-padding, 2em);
117
120
  }
@@ -133,20 +136,20 @@ export class PdMenu extends LitElement {
133
136
  visibility: hidden;
134
137
  position: absolute;
135
138
  flex-direction: column;
136
- top:5rem;
139
+ top: var(--pd-menu-burger-top, var(--pd-menu-height, 100px));
137
140
  right: 0px;
138
141
  background-color: var(--pd-menu-burger-bg-col, var(--pd-default-light-col));
139
- /**Angepasste BugerStyle */
142
+
140
143
  box-shadow: var(--pd-menu-shadow, 3px 3px 5px grey);
141
- border-bottom:3px solid #fff;
142
- padding: 1rem 0.2em 0.2em 0.2em;
144
+ border-bottom: var(--pd-menu-burger-bottomborder);
145
+ padding: var(--pd-menu-burger-padding, 0);
143
146
  width:100%;
144
- -moz-border-radius: 1rem;
145
- border-radius: 1rem;
147
+ -moz-border-radius: var(--pd-border-radius);
148
+ border-radius: var(--pd-border-radius);
146
149
  }
147
150
 
148
151
  li {
149
- border-radius: 0.5rem;
152
+ border-radius: var(--pd-border-radius);
150
153
  align-self: justify;
151
154
  width:80%;
152
155
  font-size:90% !important;
@@ -172,10 +175,12 @@ export class PdMenu extends LitElement {
172
175
  menuItems: { type: Array },
173
176
  topMenuItems: { type: Array },
174
177
  teaserClosed: { type: Boolean }, // TODO: Definiert um scroll position anzugleichen, unabhängiger machen...
178
+ scrollFix: { type: Number }, // fix scrollposition (for margin/padding/fixed content reasons)
175
179
  _activeSecIndex: { type: Number },
176
180
  _smallScreen: { type: Boolean, state: true },
177
181
  _activeBurgerMenu: { type: Boolean, reflect: true },
178
182
 
183
+
179
184
  };
180
185
  }
181
186
 
@@ -187,6 +192,7 @@ export class PdMenu extends LitElement {
187
192
 
188
193
  this._activeSecIndex = 0;
189
194
  this._activeBurgerMenu = false;
195
+ this.scrollFix = 30;
190
196
  }
191
197
 
192
198
  firstUpdated() {
@@ -313,7 +319,7 @@ export class PdMenu extends LitElement {
313
319
  const rect = el.getBoundingClientRect();
314
320
  // https://www.mediaevent.de/javascript/scroll.html
315
321
  window.scrollBy({
316
- top: rect.top - (this.teaserClosed ? 0 : 350),
322
+ top: rect.top - (this.teaserClosed ? this.scrollFix : (350 - this.scrollFix)),
317
323
  left: 0,
318
324
  behavior: 'smooth',
319
325
  });