Skip to content

Commit 337fedd

Browse files
committed
Extract changes to follow-up PR
1 parent 42d2f84 commit 337fedd

File tree

9 files changed

+69
-71
lines changed

9 files changed

+69
-71
lines changed

packages/components-angular/projects/consumer-app/src/app/app.component.html

Lines changed: 51 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<post-logo slot="post-logo" url="/">Homepage</post-logo>
44

55
<!-- Target Group -->
6-
<ul slot="target-group">
6+
<ul slot="target-group" class="target-group">
77
<li>
88
<a href="#" class="active">Private customers</a>
99
</li>
@@ -13,7 +13,7 @@
1313
</ul>
1414

1515
<!-- Global controls (Search) -->
16-
<ul slot="global-controls">
16+
<ul class="list-inline" slot="global-controls">
1717
<li>
1818
<a href="">
1919
<span>Search</span>
@@ -23,7 +23,7 @@
2323
</ul>
2424

2525
<!-- Meta navigation -->
26-
<ul slot="meta-navigation">
26+
<ul class="list-inline" slot="meta-navigation">
2727
<li>
2828
<a href="">
2929
Jobs
@@ -80,37 +80,32 @@ <h2>Main Navigation</h2>
8080

8181
<!-- Level 1 with megadropdown -->
8282
@for (dropdown of megadropdowns; track dropdown.id) {
83-
<post-list-item slot="post-list-item">
84-
<post-megadropdown-trigger [for]="dropdown.id">{{
85-
dropdown.trigger
86-
}}</post-megadropdown-trigger>
87-
<post-megadropdown [id]="dropdown.id">
88-
<button slot="back-button" class="btn btn-tertiary px-0 btn-sm">
89-
<post-icon name="arrowleft"></post-icon>
90-
Back
91-
</button>
92-
<post-closebutton slot="close-button">Close</post-closebutton>
93-
<h2 slot="megadropdown-title">{{ dropdown.title }}</h2>
94-
<a slot="megadropdown-overview-link" [href]="dropdown.overviewLink"
95-
>Overview {{ dropdown.trigger }}</a
96-
>
97-
@for (section of dropdown.sections; track section.title) {
98-
<post-list>
99-
@if (section.titleLink) {
100-
<h3>
101-
<a [href]="section.titleLink">{{ section.title }}</a>
102-
</h3>
103-
} @else {
104-
<h3>{{ section.title }}</h3>
105-
} @for (link of section.links; track link.text) {
106-
<post-list-item slot="post-list-item">
107-
<a [href]="link.url">{{ link.text }}</a>
108-
</post-list-item>
83+
<post-list-item slot="post-list-item">
84+
<post-megadropdown-trigger [for]="dropdown.id">{{ dropdown.trigger }}</post-megadropdown-trigger>
85+
<post-megadropdown [id]="dropdown.id">
86+
<button slot="back-button" class="btn btn-tertiary px-0 btn-sm">
87+
<post-icon name="arrowleft"></post-icon>
88+
Back
89+
</button>
90+
<post-closebutton slot="close-button">Close</post-closebutton>
91+
<h2 slot="megadropdown-title">{{ dropdown.title }}</h2>
92+
<a slot="megadropdown-overview-link" [href]="dropdown.overviewLink">Overview {{ dropdown.trigger }}</a>
93+
@for (section of dropdown.sections; track section.title) {
94+
<post-list>
95+
@if (section.titleLink) {
96+
<h3><a [href]="section.titleLink">{{ section.title }}</a></h3>
97+
} @else {
98+
<h3>{{ section.title }}</h3>
99+
}
100+
@for (link of section.links; track link.text) {
101+
<post-list-item slot="post-list-item">
102+
<a [href]="link.url">{{ link.text }}</a>
103+
</post-list-item>
104+
}
105+
</post-list>
109106
}
110-
</post-list>
111-
}
112-
</post-megadropdown>
113-
</post-list-item>
107+
</post-megadropdown>
108+
</post-list-item>
114109
}
115110
</post-list>
116111
</post-mainnavigation>
@@ -149,26 +144,26 @@ <h1>Hurray, it works!</h1>
149144

150145
<post-footer label="Footer label">
151146
@for (grid of footerGrids; track grid.slot) {
152-
<span [attr.slot]="grid.slot + '-title'">{{ grid.title }}</span>
153-
<post-list [attr.slot]="grid.slot" [attr.id]="grid.slot">
154-
<h3>{{ grid.title }}</h3>
155-
@for (link of footerLinks.slice(0, grid.linkCount); track link.text) {
156-
<post-list-item>
157-
<a [href]="link.url">{{ link.text }}</a>
158-
</post-list-item>
159-
}
160-
</post-list>
147+
<span [attr.slot]="grid.slot + '-title'">{{ grid.title }}</span>
148+
<post-list [attr.slot]="grid.slot" [attr.id]="grid.slot">
149+
<h3>{{ grid.title }}</h3>
150+
@for (link of footerLinks.slice(0, grid.linkCount); track link.text) {
151+
<post-list-item>
152+
<a [href]="link.url">{{ link.text }}</a>
153+
</post-list-item>
154+
}
155+
</post-list>
161156
}
162157

163158
<post-list slot="socialmedia">
164159
<h3>Follow us</h3>
165160
@for (social of socialMediaLinks; track social.name) {
166-
<post-list-item>
167-
<a [href]="social.url" class="btn btn-primary btn-icon">
168-
<post-icon aria-hidden="true" [name]="social.icon"></post-icon>
169-
<span class="visually-hidden">{{ social.name }}</span>
170-
</a>
171-
</post-list-item>
161+
<post-list-item>
162+
<a [href]="social.url" class="btn btn-primary btn-icon">
163+
<post-icon aria-hidden="true" [name]="social.icon"></post-icon>
164+
<span class="visually-hidden">{{ social.name }}</span>
165+
</a>
166+
</post-list-item>
172167
}
173168
</post-list>
174169

@@ -189,7 +184,10 @@ <h3>Download app</h3>
189184
</a>
190185
</post-list-item>
191186
<post-list-item>
192-
<a class="app-store-badge" href="https://apps.apple.com/ch/app/die-post/id378676700">
187+
<a
188+
class="app-store-badge"
189+
href="https://apps.apple.com/ch/app/die-post/id378676700"
190+
>
193191
<img
194192
width="120"
195193
height="40"
@@ -214,9 +212,9 @@ <h3>Die schweizerische Post AG</h3>
214212
<post-list slot="meta" title-hidden="">
215213
<h3>Meta</h3>
216214
@for (meta of metaLinks; track meta.text) {
217-
<post-list-item>
218-
<a [href]="meta.url">{{ meta.text }}</a>
219-
</post-list-item>
215+
<post-list-item>
216+
<a [href]="meta.url">{{ meta.text }}</a>
217+
</post-list-item>
220218
}
221219
<post-list-item>
222220
<button
@@ -232,4 +230,4 @@ <h3>Meta</h3>
232230

233231
<span slot="copyright">© Copyright 2024 by Swiss Post Ltd.</span>
234232
<span slot="copyright">All rights reserved.</span>
235-
</post-footer>
233+
</post-footer>

packages/components/cypress/fixtures/post-mainnavigation-overflow.test.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<post-logo slot="post-logo">Homepage</post-logo>
1818

1919
<!-- Meta navigation -->
20-
<ul slot="meta-navigation">
20+
<ul class="list-inline" slot="meta-navigation">
2121
<li><a href="">Jobs</a></li>
2222
<li><a href="">Über uns</a></li>
2323
</ul>
@@ -46,7 +46,7 @@
4646
<h1 slot="title">Application title</h1>
4747

4848
<!-- Custom content (optional) -->
49-
<ul slot="local-controls">
49+
<ul slot="local-controls" class="list-inline">
5050
<li>
5151
<a href="#">
5252
<span>Search</span>

packages/components/cypress/fixtures/post-mainnavigation.test.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<post-logo slot="post-logo">Homepage</post-logo>
1818

1919
<!-- Meta navigation -->
20-
<ul slot="meta-navigation">
20+
<ul class="list-inline" slot="meta-navigation">
2121
<li><a href="">Jobs</a></li>
2222
<li><a href="">Über uns</a></li>
2323
</ul>
@@ -46,7 +46,7 @@
4646
<h1 slot="title">Application title</h1>
4747

4848
<!-- Custom content (optional) -->
49-
<ul slot="local-controls">
49+
<ul slot="local-controls" class="list-inline">
5050
<li>
5151
<a href="#">
5252
<span>Search</span>

packages/components/src/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<post-logo slot="post-logo">Homepage</post-logo>
2323

2424
<!-- Meta navigation -->
25-
<ul slot="meta-navigation">
25+
<ul class="list-inline" slot="meta-navigation">
2626
<li><a href="">Jobs</a></li>
2727
<li><a href="">Über uns</a></li>
2828
</ul>
@@ -52,7 +52,7 @@
5252
<h1 slot="title">Application title</h1>
5353

5454
<!-- Target group -->
55-
<ul slot="target-group">
55+
<ul slot="target-group" class="target-group">
5656
<li>
5757
<a href="#" aria-current="location">Private customers</a>
5858
</li>
@@ -62,7 +62,7 @@ <h1 slot="title">Application title</h1>
6262
</ul>
6363

6464
<!-- Local controls (optional) -->
65-
<ul slot="local-controls">
65+
<ul slot="local-controls" class="list-inline">
6666
<li>
6767
<a href="#">
6868
<span>Search</span>

packages/documentation/src/stories/components/back-to-top/back-to-top.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const meta: MetaComponent = {
2222
<post-logo slot="post-logo" url="/">Homepage</post-logo>
2323
2424
<!-- Meta navigation -->
25-
<ul slot="meta-navigation">
25+
<ul class="list-inline" slot="meta-navigation">
2626
<li><a href="">Jobs</a></li>
2727
<li><a href="">Über uns</a></li>
2828
</ul>
@@ -52,7 +52,7 @@ const meta: MetaComponent = {
5252
<h1 slot="title">Application title</h1>
5353
5454
<!-- Local controls (optional) -->
55-
<ul slot="local-controls">
55+
<ul slot="local-controls" class="list-inline">
5656
<li>
5757
<a href="#">
5858
<span>Search</span>

packages/documentation/src/stories/components/target-group/target-group.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function clickBlocker(story: StoryFn, context: StoryContext) {
7777
export const Default: Story = {
7878
render: (args: Args) => {
7979
return html`
80-
<ul>
80+
<ul class="target-group">
8181
${[args.label_1, args.label_2, args.label_3].map(
8282
(arg, i) => html`
8383
<li>

packages/documentation/src/stories/guidelines/header with custom logo link/framework-selector.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const code = `
88
{{logoLink}}
99
1010
<!-- Meta navigation -->
11-
<ul slot="meta-navigation">
11+
<ul class="list-inline" slot="meta-navigation">
1212
<li><a href="#">Jobs</a></li>
1313
<li><a href="#">Über uns</a></li>
1414
</ul>
@@ -37,7 +37,7 @@ const code = `
3737
<h1 slot="title">Application title</h1>
3838
3939
<!-- Custom content (optional) -->
40-
<ul slot="local-controls">
40+
<ul slot="local-controls" class="list-inline">
4141
<li>
4242
<a href="#">
4343
<span>Search</span>

packages/documentation/src/stories/raw-components/megadropdown/megadropdown.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function megadropdownDecorator(story: StoryFn, context: StoryContext) {
2929
<post-logo slot="post-logo" url="/">Homepage</post-logo>
3030
3131
<!-- Meta navigation -->
32-
<ul slot="meta-navigation">
32+
<ul class="list-inline" slot="meta-navigation">
3333
<li><a href="">Jobs</a></li>
3434
<li><a href="">About us</a></li>
3535
</ul>
@@ -59,7 +59,7 @@ export function megadropdownDecorator(story: StoryFn, context: StoryContext) {
5959
<h1 slot="title">Application title</h1>
6060
6161
<!-- Custom content (optional) -->
62-
<ul slot="local-controls">
62+
<ul slot="local-controls" class="list-inline">
6363
<li>
6464
<a href="#">
6565
<span>Search</span>

packages/nextjs-integration/src/app/ssr/layout.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default function Layout({ children }: { readonly children: React.ReactNod
2929
</PostLogo>
3030

3131
{/* Target Group */}
32-
<ul slot="target-group">
32+
<ul slot="target-group" className="target-group">
3333
<li>
3434
<a href="#" aria-current="location">
3535
Private customers
@@ -41,7 +41,7 @@ export default function Layout({ children }: { readonly children: React.ReactNod
4141
</ul>
4242

4343
{/* Global controls (Search) */}
44-
<ul slot="global-controls">
44+
<ul className="list-inline" slot="global-controls">
4545
<li>
4646
<a href="">
4747
<span>Search</span>
@@ -51,7 +51,7 @@ export default function Layout({ children }: { readonly children: React.ReactNod
5151
</ul>
5252

5353
{/* Meta navigation */}
54-
<ul slot="meta-navigation">
54+
<ul className="list-inline" slot="meta-navigation">
5555
<li>
5656
<a href="">
5757
Jobs
@@ -104,7 +104,7 @@ export default function Layout({ children }: { readonly children: React.ReactNod
104104
<PostMainnavigation slot="post-mainnavigation">
105105
<PostList title-hidden="">
106106
<h2>Main Navigation</h2>
107-
107+
108108
{/* Link only level 1 */}
109109
<PostListItem slot="post-list-item">
110110
<a href="/letters">Letters</a>

0 commit comments

Comments
 (0)