@progressive-development/pd-page 0.0.61 → 0.1.0

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 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.0.61",
6
+ "version": "0.1.0",
7
7
  "main": "index.js",
8
8
  "module": "index.js",
9
9
  "scripts": {
@@ -17,11 +17,13 @@
17
17
  "storybook:build": "npm run analyze -- --exclude dist && build-storybook"
18
18
  },
19
19
  "dependencies": {
20
- "@progressive-development/pd-contact": "0.0.35",
21
- "@progressive-development/pd-dialog": "0.0.48",
22
- "@progressive-development/pd-forms": "^0.1.3",
23
- "@progressive-development/pd-icon": "^0.1.7",
24
- "lit": "^2.2.0"
20
+ "@progressive-development/pd-contact": "0.1.1",
21
+ "@progressive-development/pd-dialog": "0.1.1",
22
+ "@progressive-development/pd-forms": "^0.1.5",
23
+ "@progressive-development/pd-icon": "^0.1.9",
24
+ "@progressive-development/pd-shared-styles": "^0.1.1",
25
+ "lit": "^2.2.0",
26
+ "pwa-helpers": "^0.9.1"
25
27
  },
26
28
  "devDependencies": {
27
29
  "@custom-elements-manifest/analyzer": "^0.4.17",
@@ -12,6 +12,8 @@ import '@progressive-development/pd-forms/pd-input.js';
12
12
  import '@progressive-development/pd-forms/pd-input-area.js';
13
13
  import '@progressive-development/pd-contact/pd-contact.js';
14
14
 
15
+ import { PDColorStyles, PDFontStyles } from '@progressive-development/pd-shared-styles';
16
+
15
17
  /**
16
18
  * An example element.
17
19
  *
@@ -25,50 +27,29 @@ export class PdContactUs extends LitElement {
25
27
  */
26
28
 
27
29
  static get styles() {
28
- return css`
29
- :host {
30
- --my-background-color: var(--squi-test, #177e89);
31
- --my-text-color: var(--squi-test, white);
32
- --my-background-img: var(--pd-bg-image);
30
+ return [
31
+ PDColorStyles, PDFontStyles,
32
+ css`
33
+ :host {
33
34
 
34
35
  display: flex;
35
36
  flex-flow: row;
36
- background-color: var(--my-background-color);
37
+ background-color: var(--pd-contactus-bg-col, var(--pd-default-col));
37
38
 
38
- background-image: var(--my-background-img);
39
+ background-image: var(--pd-contactus-bg-image);
39
40
  background-repeat: no-repeat;
40
41
 
41
42
  min-height: 500px; /* Temporär hier... */
42
43
  width: 100%;
43
44
  }
44
45
 
45
- h1,
46
- h2,
47
- h3,
48
- h4 {
49
- font-family: var(--my-primary-font, 'Oswald');
50
- font-style: normal;
51
- color: #fefefe;
52
- margin: 0;
53
- padding: 0;
54
- }
55
-
56
46
  h2 {
57
- line-height: 1.4;
47
+ font-family: var(--pd-default-font-title-family);
48
+ font-style: normal;
49
+ color: var(--pd-contactus-font-col, var(--pd-default-bg-col));
58
50
  margin-top: 1.4em;
59
51
  margin-bottom: 2.5rem;
60
- font-size: 2.5rem;
61
- }
62
-
63
- p {
64
- margin-bottom: 1rem;
65
- line-height: 1.5;
66
- text-rendering: optimizeLegibility;
67
- margin: 0;
68
- padding: 0;
69
-
70
- color: #323031;
71
- font-size: 1.1rem;
52
+ font-size: var(--pd-contactus-font-h2-size, 2.5rem);
72
53
  }
73
54
 
74
55
  .content-block {
@@ -80,7 +61,7 @@ export class PdContactUs extends LitElement {
80
61
  max-width: 1170px;
81
62
  margin: 0 auto;
82
63
  text-align: left;
83
- padding-left: 10px;
64
+ padding-left: 30px;
84
65
  }
85
66
 
86
67
  .contact-block {
@@ -99,7 +80,8 @@ export class PdContactUs extends LitElement {
99
80
  }
100
81
 
101
82
  .company-contact {
102
- --squi-addrress-txt-color: #fefefe;
83
+ --app-font-content-col: var(--pd-contactus-font-col, var(--pd-default-bg-col));;
84
+ --app-font-title-col: var(--pd-contactus-font-col, var(--pd-default-bg-col));;
103
85
  }
104
86
 
105
87
  /* Size Elements for small width */
@@ -111,7 +93,7 @@ export class PdContactUs extends LitElement {
111
93
  justify-content: left;
112
94
  }
113
95
  }
114
- `;
96
+ `];
115
97
  }
116
98
 
117
99
  static get properties() {
@@ -147,6 +129,7 @@ export class PdContactUs extends LitElement {
147
129
  class="quarter3"
148
130
  placeHolder="Naam"
149
131
  valueName="name"
132
+ autoCompleteName="full-name"
150
133
  required
151
134
  ></pd-input>
152
135
  </pd-form-row>
@@ -157,6 +140,8 @@ export class PdContactUs extends LitElement {
157
140
  class="quarter3"
158
141
  placeHolder="Email"
159
142
  valueName="mail"
143
+ autoCompleteName="email"
144
+ name="email"
160
145
  field-type="mail"
161
146
  required
162
147
  ></pd-input>
package/src/PdFooter.js CHANGED
@@ -6,6 +6,7 @@
6
6
  */
7
7
 
8
8
  import { LitElement, html, css } from 'lit';
9
+ import { PDColorStyles, PDFontStyles } from '@progressive-development/pd-shared-styles';
9
10
 
10
11
  /**
11
12
  * An example element.
@@ -15,117 +16,93 @@ import { LitElement, html, css } from 'lit';
15
16
  */
16
17
  export class PdFooter extends LitElement {
17
18
  /**
18
- * Fired when free date clicked => At the moment only for freeDates
19
- * @event show-policy
19
+ * Fired when footer link clicked.
20
+ * @event footer-link
20
21
  */
21
22
 
23
+ static get properties() {
24
+ return {
25
+ version: { type: String },
26
+ copyright: { type: String },
27
+ madeBy: { type: Object },
28
+ footerLinks: { type: Array }
29
+ };
30
+ }
31
+
22
32
  static get styles() {
23
- return css`
33
+ return [
34
+ PDColorStyles, PDFontStyles,
35
+ css`
24
36
  :host {
25
- --my-height: var(--squi-teaser-height, 130px);
26
-
27
- --my-header-background-color: var(--squi-test, #084c61);
28
- --my-header-text-color: var(--squi-test, white);
29
-
30
- --my-footer-background-color: var(--squi-test, #2bcadb);
31
-
32
37
  display: flex;
33
- flex-flow: row;
34
- justify-content: space-between;
35
- background-color: #10565d; /*#177e89;/* #084c61;*/
36
- height: var(--my-height);
38
+ flex-flow: column;
39
+ justify-content: end;
40
+ background-color: var(--pd-footer-bg-col, var(--pd-default-col));
37
41
  width: 100%;
42
+ white-space: nowrap;
38
43
  }
39
44
 
40
- h1,
41
- h2,
42
- h3,
43
- h4 {
44
- font-family: var(--my-primary-font, 'Oswald');
45
- font-style: normal;
46
- margin: 0;
47
- padding: 0;
45
+ .footer-links {
46
+ display: flex;
47
+ align-items: center;
48
+ justify-content: right;
49
+ height: 100%;
50
+ color: var(--pd-footer-font-col, var(--pd-default-bg-col));
51
+ font-family: var(--pd-footer-font-family, var(--pd-default-font-title-family));
52
+ font-size: var(--pd-footer-font-size, 1.1em);
48
53
  }
49
54
 
50
- .left-content {
51
- width: 50%;
52
- padding-left: 30px;
53
- align-self: flex-end;
54
- height: calc(var(--my-height) / 1.4);
55
+ .footer-links ul {
56
+ display: flex;
57
+ flex-wrap: wrap;
58
+ list-style: none;
59
+ gap: 1em;
60
+ margin: 0px;
61
+ padding: 2em 2.5em 2em 2.5em;
55
62
  }
56
63
 
57
- .right-content {
58
- width: 50%;
59
- padding-right: 30px;
64
+ .footer-links li {
65
+ cursor: pointer;
60
66
  }
61
67
 
62
- .right-content ul {
63
- display: flex;
64
- justify-content: flex-end;
65
- list-style: none;
66
- margin-top: 0px;
67
- margin-bottom: 0px;
68
- height: 100%;
68
+ .footer-links li:hover {
69
+ color: var(--pd-default-hover-col);
69
70
  }
70
71
 
71
- .right-content li {
72
+ .bottom-line {
73
+ background-color: var(--pd-footer-bottom-col, var(--pd-default-light-col));
74
+ font-size: var(--pd-footer-bottom-font-size, 0.9em);
75
+ color: var(--pd-footer-bottom-font-col, var(--pd-default-dark-col));
76
+ padding: 0.5em;
72
77
  display: flex;
78
+ gap: 1em;
79
+ flex-wrap: wrap;
80
+ justify-content: space-between;
73
81
  align-items: center;
74
- padding: 0rem 1rem;
75
- height: 100%;
76
82
  }
77
83
 
78
- .item,
79
- .right-content p,
80
- .left-content p {
81
- color: #2bcadb;
82
- font-size: 1.1rem;
83
- white-space: nowrap;
84
+ .copyright {
85
+ font-weight: bold;
84
86
  }
85
87
 
86
88
  .version {
87
- color: #9fbdc0;
88
- font-style: italic;
89
- font-size: 0.9rem;
89
+ font-weight: normal;
90
90
  }
91
91
 
92
92
  .madeBy {
93
- color: white;
94
- font-size: 0.9rem;
95
- }
96
-
97
- .madeBy:hover {
98
- border-bottom: 1px solid #ffc857;
99
- }
100
-
101
- .madeBy:hover,
102
- .item a:hover {
103
- color: #ffc857;
104
93
  cursor: pointer;
94
+ font-style: italic;
105
95
  }
106
96
 
107
- /* Size Elements for small width */
108
- @media (max-width: 450px) {
109
- .right-content ul {
110
- height: 40%;
111
- }
112
-
113
- .right-content {
114
- width: 30%;
115
- }
97
+ .madeBy:hover {
98
+ color: var(--pd-default-col);
116
99
  }
117
- `;
118
- }
119
-
120
- static get properties() {
121
- return {
122
- version: { type: String },
123
- };
124
- }
100
+ `];
101
+ }
125
102
 
126
103
  constructor() {
127
- super();
128
- this.version = undefined;
104
+ super();
105
+ this.footerLinks = [];
129
106
  this._mailTo = 'info@progressive-development.com';
130
107
  }
131
108
 
@@ -133,81 +110,40 @@ export class PdFooter extends LitElement {
133
110
 
134
111
  render() {
135
112
  return html`
136
- <div class="left-content">
137
- <p>
138
- © ticomi technics<br />
139
- <span class="version">${this.version} development by</span><br />
140
- <span class="madeBy" @click="${this._mailToProgressiveDevelopment}"
141
- >PD Progressive Development</span
142
- >
143
- </p>
144
- </div>
145
-
146
- <div class="right-content">
147
- <ul>
148
- <li class="item">
149
- <a
150
- @keypress="${() => {
151
- console.log();
152
- }}"
153
- @click="${this._legalClicked}"
154
- >Voorwaarden</a
155
- >
156
- </li>
157
- <li class="item">
158
- <a
159
- @keypress="${() => {
160
- console.log();
161
- }}"
162
- @click="${this._policyClicked}"
163
- >Privacy</a
164
- >
165
- </li>
166
- <li class="item">
167
- <a
168
- @keypress="${() => {
169
- console.log();
170
- }}"
171
- @click="${this._cookiePolicyClicked}"
172
- >Cookies</a
173
- >
174
- </li>
175
- </ul>
176
- </div>
177
- `;
178
- }
179
-
180
- _mailToProgressiveDevelopment() {
181
- window.location.href = `mailto:${this._mailTo}`;
113
+
114
+ <div class="footer-links">
115
+ <ul>
116
+ ${this.footerLinks.map(link => html`
117
+ <li class="item">
118
+ <a @click="${this._footerLinkClicked}" data-link="${link.key}">${link.name}</a>
119
+ </li>
120
+ `)}
121
+ </ul>
122
+ </div>
123
+ <div class="bottom-line">
124
+ <div>
125
+ ${this.copyright ? html`<span class="copyright">© ${this.copyright}, </span>` : ''}
126
+ ${this.version ? html`<span class="version">${this.version}</span>` : ''}
127
+ </div>
128
+ ${this.madeBy ? html`<span class="madeBy" @click="${this._clickMadeby}">${this.madeBy.txt}</span>` : ''}
129
+ </div>
130
+ `;
182
131
  }
183
132
 
184
- _legalClicked() {
185
- // this.shadowRoot.getElementById('legalPopupId').showPopup();
186
- this.dispatchEvent(
187
- new CustomEvent('show-policy', {
188
- detail: {
189
- policy: 'legal'
190
- }
191
- })
192
- );
193
- }
194
-
195
- _policyClicked() {
196
- // this.shadowRoot.getElementById('privacyPopupId').showPopup();
197
- this.dispatchEvent(
198
- new CustomEvent('show-policy', {
199
- detail: {
200
- policy: 'policy'
201
- }
202
- })
203
- );
133
+ _clickMadeby() {
134
+ if (this.madeBy.email) {
135
+ window.location.href = `mailto:${this.madeBy.email}`;
136
+ } else if (this.madeBy.link) {
137
+ window.open(this.madeBy.link, '_blank');
138
+ }
204
139
  }
205
140
 
206
- _cookiePolicyClicked() {
141
+ _footerLinkClicked(e) {
142
+ const linkKey = e.target.dataset.link;
207
143
  this.dispatchEvent(
208
- new CustomEvent('show-policy', {
144
+ new CustomEvent('footer-link', {
209
145
  detail: {
210
- policy: 'cookie'
146
+ link: linkKey
211
147
  }
212
148
  })
213
149
  );
package/src/PdMenu.js CHANGED
@@ -5,9 +5,13 @@
5
5
  */
6
6
 
7
7
  import { LitElement, html, css } from 'lit';
8
+ import { installMediaQueryWatcher } from 'pwa-helpers/media-query.js';
8
9
 
10
+ import { ICON_TOOGLE_ARROW as burgerIcon } from '@progressive-development/pd-icon/src/PdIcon.js';
9
11
  import '@progressive-development/pd-icon/pd-icon.js';
10
12
 
13
+ import { PDColorStyles, PDFontStyles } from '@progressive-development/pd-shared-styles';
14
+
11
15
  /**
12
16
  * An example element.
13
17
  *
@@ -15,90 +19,140 @@ import '@progressive-development/pd-icon/pd-icon.js';
15
19
  * @csspart button - The button
16
20
  */
17
21
  export class PdMenu extends LitElement {
22
+
18
23
  /**
19
24
  * Fired when route menu item clicked
20
25
  * @event route-event
21
26
  */
22
27
 
23
28
  static get styles() {
24
- return css`
25
- :host {
26
- --my-height: var(--squi-teaser-height, 80px);
29
+ return [
30
+ PDColorStyles, PDFontStyles,
31
+ css`
27
32
 
28
- --my-bg-color: var(--squi-menu-bg-color, #177e89);
29
- --my-header-text-color: var(--squi-test, white);
33
+ :host {
34
+ display: block;
35
+ position: relative;
36
+ height: var(--pd-menu-height, 100px);
37
+ background-color: var(--pd-menu-bg-col, var(--pd-default-col));
38
+ box-shadow: var(--pd-menu-shadow, 3px 3px 5px grey);
39
+ }
30
40
 
41
+ .menu-container {
42
+ height: 100%;
43
+ padding-left: 10px;
44
+ padding-right: 10px;
31
45
  display: flex;
32
- background-color: var(--my-bg-color);
33
- height: var(--my-height);
34
- width: 100%;
35
-
36
- box-shadow: 3px 3px 5px grey;
46
+ align-items: center;
47
+ white-space: nowrap;
48
+ max-width: 1170px;
49
+ margin: 0 auto;
37
50
  }
38
51
 
39
- ul {
40
- padding-left: 0px;
52
+ ul {
41
53
  display: flex;
42
- justify-content: flex-start;
43
- align-items: flex-start;
44
- max-width: 1170px;
45
- margin: 0 auto;
54
+ align-items: center;
46
55
  list-style: none;
47
- margin-top: 0px;
48
- height: 100%;
56
+ gap: 1em;
57
+ margin: 0;
58
+ padding: 0;
49
59
  }
50
60
 
51
61
  li {
52
62
  display: flex;
53
- align-items: center;
54
- padding: 0rem 1.1rem;
63
+ align-items: center;
55
64
  cursor: pointer;
56
65
  height: 100%;
57
66
  }
58
67
 
59
68
  .item {
60
- color: #fefefe;
61
- font-family: Oswald, sans-serif;
62
- font-size: 1.2rem;
63
-
64
- --pd-icon-fill: var(--my-header-text-color);
65
- }
66
- .item.active {
67
- color: #ffc857;
69
+ color: var(--pd-menu-font-col, var(--pd-default-bg-col));
70
+ font-family: var(--pd-menu-font-family, var(--pd-default-font-title-family));
71
+ font-size: var(--pd-footer-font-size, 1.2em);
68
72
  }
73
+
74
+ .item.active,
69
75
  .item:hover {
70
- color: #ffc857;
71
- /*border-bottom: 1px solid #FFC857;*/
72
- /* Hack? => Set also Icon to hover color, else they react different
73
- (hover on text => icon not with hover color...)
74
- This is also the reason why icon-fill is defined for item, not for topMenuItem
75
- Erkennbar: Farbe Icon leicht unterschiedlich zu Farbe Text nach hover icon.
76
- */
77
- --pd-icon-fill: #ffc857;
76
+ color: var(--pd-default-hover-col);
78
77
  }
79
78
 
80
- .topItemLogo {
81
- --pd-icon-size: 1.6rem;
82
- --icon-transition: none;
83
- pointer-events: none;
79
+ .item:hover .topItemLogo {
80
+ --pd-icon-stroke-col: var(--pd-default-hover-col);
84
81
  }
85
82
 
86
83
  .topMenu {
87
- margin-top: -15px;
84
+ width: 100%;
85
+ justify-content: end;
86
+ padding-left: 10px;
87
+ }
88
+
89
+ .burger-menu {
90
+ display: flex;
91
+ width: 100%;
92
+ visibility: hidden;
93
+ justify-content: end;
88
94
  }
89
95
 
96
+ .topItemLogo {
97
+ --pd-icon-size: 1.6rem;
98
+ /* TODO: noch vars übernehmen
99
+ --pd-icon-bg-col: var(--pd-menu-bg-col, var(--pd-default-col));
100
+ --pd-icon-col: var(--pd-menu-bg-col, var(--pd-default-dark-col));
101
+ --pd-icon-stroke-col: var(--pd-menu-font-col, var(--pd-default-bg-col));
102
+ */
103
+
104
+ --pd-icon-bg-col: transparent;
105
+ --pd-icon-stroke-col: var(--pd-default-bg-col);
106
+ --pd-icon-col: var(--pd-default-dark-col);
107
+ pointer-events: none;
108
+ }
109
+
90
110
  ::slotted(.logo) {
91
- max-width: 8rem;
92
- width: 8rem; /* wird sonst im Chrome nicht angezeigt*/
111
+ max-width: 8rem;
112
+ width: 100%;
113
+ padding-right: 3em;
93
114
  }
94
115
 
95
- /* Size Elements for small width */
96
- @media (max-width: 440px) {
97
- .changevis {
98
- display: none;
116
+ /**
117
+ * Style for drop down menu on small screens.
118
+ */
119
+ @media (max-width: 500px) {
120
+
121
+ :host([_activeBurgerMenu]) ul {
122
+ visibility: visible;
123
+ }
124
+
125
+ .burger-menu {
126
+ visibility: visible;
127
+ }
128
+
129
+ ul {
130
+ visibility: hidden;
131
+ position: absolute;
132
+ flex-direction: column;
133
+ top: var(--pd-menu-height, 100px);
134
+ right: 0px;
135
+ background-color: var(--pd-menu-burger-bg-col, var(--pd-default-light-col));
136
+ border: 1px solid var(--pd-menu-burger-font-col, var(--pd-default-dark-col));
137
+ padding: 0.8em;
99
138
  }
139
+
140
+ li {
141
+ align-self: flex-start;
142
+ }
143
+
144
+ .item {
145
+ color: var(--pd-menu-burger-font-col, var(--pd-default-dark-col));
146
+ }
147
+
148
+ li:hover {
149
+ background-color: var(--pd-default-dark-col);
150
+ }
151
+
100
152
  }
101
- `;
153
+
154
+ /* Media Query für 500 => Alles darunter mit Burger Menu */
155
+ `];
102
156
  }
103
157
 
104
158
  static get properties() {
@@ -107,6 +161,9 @@ export class PdMenu extends LitElement {
107
161
  topMenuItems: { type: Array },
108
162
  teaserClosed: { type: Boolean }, // TODO: Definiert um scroll position anzugleichen, unabhängiger machen...
109
163
  _activeSecIndex: { type: Number },
164
+ _smallScreen: { type: Boolean, state: true },
165
+ _activeBurgerMenu: { type: Boolean, reflect: true },
166
+
110
167
  };
111
168
  }
112
169
 
@@ -117,6 +174,7 @@ export class PdMenu extends LitElement {
117
174
  this.teaserClosed = false;
118
175
 
119
176
  this._activeSecIndex = 0;
177
+ this._activeBurgerMenu = false;
120
178
  }
121
179
 
122
180
  firstUpdated() {
@@ -150,55 +208,70 @@ export class PdMenu extends LitElement {
150
208
  }
151
209
 
152
210
  render() {
211
+
212
+ installMediaQueryWatcher(`(max-width: 500px)`, matches => {
213
+ if (matches) {
214
+ this._smallScreen = true;
215
+ } else {
216
+ this._smallScreen = false;
217
+ }
218
+ });
219
+
153
220
  return html`
221
+ <div class="menu-container">
222
+ <slot class="logo-icon" name="slotLogo"></slot>
154
223
  <ul>
155
- <li @click="${PdMenu._scrollToTop}">
156
- <slot name="slotLogo"></slot>
157
- </li>
224
+ ${this._renderItems(this._smallScreen ? [...this.menuItems, ...this.topMenuItems] : this.menuItems, this._smallScreen)}
225
+ </ul>
158
226
 
159
- ${this.menuItems.map(
227
+ ${!this._smallScreen ? html`
228
+ <ul class="topMenu">
229
+ ${this._renderItems(this.topMenuItems)}
230
+ </ul>
231
+ ` : html`
232
+ <div class="burger-menu">
233
+ <pd-icon class="round" icon="${burgerIcon}" ?activeIcon="${!this._activeBurgerMenu}" @click="${this._toggleBurgerMenu}"></pd-icon>
234
+ </div>
235
+ `}
236
+
237
+ </div>
238
+ `;
239
+ }
240
+
241
+ _renderItems(items, disableIcons) {
242
+ return html`
243
+ ${items.map(
160
244
  (item, index) => html`
161
245
  <li
162
246
  class="item ${this._activeSecIndex === index + 1
163
247
  ? 'active'
164
- : ''} changevis"
248
+ : ''}"
165
249
  data-sec="${item.sec}"
166
250
  data-route="${item.route}"
167
251
  @click="${this._menuItemClicked}"
168
252
  >
169
- ${item.name}
170
- </li>
171
- `
172
- )}
173
- </ul>
174
-
175
- <ul class="topMenu">
176
- ${this.topMenuItems.map(
177
- topItem => html`
178
- <li
179
- class="item"
180
- data-sec="${topItem.sec}"
181
- data-route="${topItem.route}"
182
- @click="${this._menuItemClicked}"
183
- >
184
- ${topItem.icon
253
+ ${item.icon && !disableIcons
185
254
  ? html`<pd-icon
186
255
  class="topItemLogo"
187
- icon="${topItem.icon}"
256
+ icon="${item.icon}"
188
257
  ></pd-icon>`
189
258
  : ''}
190
- ${topItem.name}
191
- </li>
259
+ ${item.name}
260
+ </li>
192
261
  `
193
262
  )}
194
- </ul>
195
263
  `;
196
264
  }
197
265
 
266
+ _toggleBurgerMenu() {
267
+ this._activeBurgerMenu = !this._activeBurgerMenu;
268
+ }
269
+
198
270
  _menuItemClicked(e) {
199
271
  const secParam = e.target.dataset.sec;
200
272
  const routeParam = e.target.dataset.route;
201
273
  if (secParam !== 'undefined' && secParam !== '') {
274
+ // TODO: Check if element exists
202
275
  this._scrollToContent(secParam);
203
276
  } else if (routeParam !== 'undefined' && routeParam !== '') {
204
277
  this.dispatchEvent(
package/src/PdTeaser.js CHANGED
@@ -7,6 +7,8 @@ import { LitElement, html, css } from 'lit';
7
7
 
8
8
  import '@progressive-development/pd-icon/pd-icon.js';
9
9
 
10
+ import { PDColorStyles } from '@progressive-development/pd-shared-styles';
11
+
10
12
  /**
11
13
  * An example element.
12
14
  *
@@ -20,17 +22,17 @@ export class PdTeaser extends LitElement {
20
22
  */
21
23
 
22
24
  static get styles() {
23
- return css`
25
+ return [
26
+ PDColorStyles,
27
+ css`
24
28
  :host {
25
29
 
26
- --my-height: var(--squi-teaser-height, 420px);
30
+ --my-height: var(--pd-teaser-height, 420px);
27
31
 
28
- display: block;
29
- background-color: #084c61;
30
-
32
+ display: block;
33
+ background-color: var(--pd-teaser-bg-col, var(--pd-default-col));
31
34
  }
32
35
 
33
- /* Layout Grid for the Wizard Component */
34
36
  .teaser {
35
37
  display: grid;
36
38
  grid-template-columns: minmax(10px, 200px) auto;
@@ -38,8 +40,7 @@ export class PdTeaser extends LitElement {
38
40
  grid-template-areas:
39
41
  ". content"
40
42
  }
41
-
42
- /* Layout Grid for the Wizard Component */
43
+
43
44
  .teaser-flex {
44
45
  display: flex;
45
46
  justify-content: left;
@@ -58,16 +59,23 @@ export class PdTeaser extends LitElement {
58
59
  position: absolute;
59
60
  top: calc(var(--my-height) / 2);
60
61
  left: 10px;
61
- z-index: 1;
62
- --pd-icon-fill: white;
62
+ z-index: 1;
63
63
  }
64
64
 
65
65
  .next {
66
66
  position: absolute;
67
67
  top: calc(var(--my-height) / 2);
68
68
  right: 10px;
69
- z-index: 1;
70
- --pd-icon-fill: white;
69
+ z-index: 1;
70
+ }
71
+
72
+ pd-icon {
73
+ --pd-icon-bg-col: transparent;
74
+ --pd-icon-stroke-col: var(--pd-default-bg-col);
75
+ --pd-icon-col: var(--pd-default-dark-col);
76
+ --pd-icon-bg-col-hover: transparent;
77
+ --pd-icon-stroke-col-hover: var(--pd-default-hover-col);
78
+ --pd-icon-col-hover: var(--pd-default-dark-col);
71
79
  }
72
80
 
73
81
  .content {
@@ -150,7 +158,7 @@ export class PdTeaser extends LitElement {
150
158
  }
151
159
  }
152
160
 
153
- `;
161
+ `];
154
162
  }
155
163
 
156
164
  static get properties() {
@@ -5,6 +5,8 @@
5
5
 
6
6
  import { LitElement, html, css } from 'lit';
7
7
 
8
+ import { PDColorStyles, PDFontStyles } from '@progressive-development/pd-shared-styles';
9
+
8
10
  /**
9
11
  * An example element.
10
12
  *
@@ -17,12 +19,14 @@ export class PdTeaserContent extends LitElement {
17
19
  * @event book-date
18
20
  */
19
21
 
20
- static get styles() {
21
- return css`
22
+ static get styles() {
23
+ return [
24
+ PDColorStyles, PDFontStyles,
25
+ css`
22
26
  :host {
23
- --my-background: var(--squi-teaser-image);
24
- --my-background-size: var(--squi-teaser-image-size, auto);
25
- --my-background-position: var(--squi-teaser-image-position, 100% 50%);
27
+ --my-background: var(--pd-teaser-image);
28
+ --my-background-size: var(--pd-teaser-image-size, auto);
29
+ --my-background-position: var(--pd-teaser-image-position, 100% 50%);
26
30
 
27
31
  display: grid;
28
32
  grid-template-columns: repeat(15, 1fr);
@@ -76,10 +80,10 @@ export class PdTeaserContent extends LitElement {
76
80
  }
77
81
 
78
82
  h1 {
79
- color: #fefefe;
80
- font-size: 2.2rem;
81
- font-family: Oswald, sans-serif;
82
- line-height: 1.4;
83
+ color: var(--pd-teaser-font-col, var(--pd-default-bg-col));
84
+ font-size: var(--pd-teaser-font-title-size, 2.2em);
85
+ font-family: var(--pd-teaser-font-family, var(--pd-default-font-title-family));
86
+ line-height: 1.4em;
83
87
  margin-top: 0;
84
88
  margin-bottom: 0.5rem;
85
89
  }
@@ -89,16 +93,15 @@ export class PdTeaserContent extends LitElement {
89
93
  display: block;
90
94
  width: 2.5rem;
91
95
  height: 0.125rem;
92
- background: #fefefe;
96
+ background: var(--pd-teaser-font-col, var(--pd-default-light-col));
93
97
  margin: 1rem 0;
94
- opacity: 0.5;
95
98
  }
96
99
 
97
100
  p {
98
- color: #fefefe;
99
- font-size: 1.5rem;
100
- font-family: Montserrat, sans-serif;
101
- line-height: 1.5;
101
+ color: var(--pd-teaser-font-col, var(--pd-default-bg-col));;
102
+ font-size: var(--pd-teaser-font-subtitletitle-size, 1.5rem);
103
+ font-family: var(--pd-teaser-font-family, var(--pd-default-font-content-family));
104
+ line-height: var(--pd-teaser-font-subtitletitle-size, 1.5rem);
102
105
  margin-top: 0;
103
106
  margin-bottom: 1rem;
104
107
  }
@@ -187,7 +190,7 @@ export class PdTeaserContent extends LitElement {
187
190
  line-height: 1;
188
191
  }
189
192
  }
190
- `;
193
+ `];
191
194
  }
192
195
 
193
196
  static get properties() {
@@ -7,14 +7,35 @@ export default {
7
7
  argTypes: {},
8
8
  };
9
9
 
10
- function Template() {
10
+ function Template({links, version, copyright, madeBy}) {
11
11
  return html`
12
- <pd-footer version="0.1 Test">
13
- <span slot="legal"><p>My AGB</p></span>
14
- <span slot="privacy"><p>My Privacy</p></span>
12
+ <pd-footer version="${version}" copyright="${copyright}" .madeBy="${madeBy}"
13
+ .footerLinks="${links}">
15
14
  </pd-footer>
16
15
  `;
17
16
  }
18
17
 
19
18
  export const Footer = Template.bind({});
20
- Footer.args = {};
19
+ Footer.args = {
20
+ links: [
21
+ {name: "Datenschutzerklärung", key: 'legal'},
22
+ {name: "Impressum"},
23
+ {name: "Location-Wiki"}
24
+ ],
25
+ version: "1.2.2 Test",
26
+ copyright: "ticomi",
27
+ madeBy: {
28
+ txt: "made by PD Progressive Development",
29
+ email: "info@progressive-development.com"
30
+ }
31
+ };
32
+
33
+ export const FooterSmallContent = Template.bind({});
34
+ FooterSmallContent.args = {
35
+ links: [
36
+ {name: "Datenschutzerklärung", key: 'legal'},
37
+ {name: "Impressum"},
38
+ {name: "Location-Wiki"}
39
+ ],
40
+ version: "1.2.2 Test",
41
+ };
@@ -15,7 +15,7 @@ const getTeaser = () => html`
15
15
  <pd-teaser-content
16
16
  slot="t1"
17
17
  primaryTxt="Boek nu uw goedkoopste serviceafspraak."
18
- secondaryTxt="Lage kosten met snelle reactietijden."
18
+ secondaryTxt="Lage kosten met snelle reactietijden. Und das kann aber auch mal läönger werden, wenn es sein muss."
19
19
  style="--squi-teaser-image: url('/images/hero_1.svg');"
20
20
  >
21
21
  </pd-teaser-content>