Skip to content

Commit e59f98e

Browse files
fixed sonar
1 parent 0a03768 commit e59f98e

File tree

2 files changed

+36
-69
lines changed

2 files changed

+36
-69
lines changed

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

Lines changed: 16 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -241,54 +241,14 @@ <h3>Title 4</h3>
241241

242242
<post-list slot="socialmedia">
243243
<h3>Follow us</h3>
244-
<post-list-item>
245-
<a href="#facebook" class="btn btn-primary btn-icon">
246-
<post-icon aria-hidden="true" name="8004"></post-icon>
247-
<span class="visually-hidden">Facebook</span>
248-
</a>
249-
</post-list-item>
250-
<post-list-item>
251-
<a href="#instagram" class="btn btn-primary btn-icon">
252-
<post-icon aria-hidden="true" name="8007"></post-icon>
253-
<span class="visually-hidden">Instagram</span>
254-
</a>
255-
</post-list-item>
256-
<post-list-item>
257-
<a href="#youtube" class="btn btn-primary btn-icon">
258-
<post-icon aria-hidden="true" name="8002"></post-icon>
259-
<span class="visually-hidden">Youtube</span>
260-
</a>
261-
</post-list-item>
262-
<post-list-item>
263-
<a href="#snapchat" class="btn btn-primary btn-icon">
264-
<post-icon aria-hidden="true" name="8017"></post-icon>
265-
<span class="visually-hidden">Snapchat</span>
266-
</a>
267-
</post-list-item>
268-
<post-list-item>
269-
<a href="#twitter-x" class="btn btn-primary btn-icon">
270-
<post-icon aria-hidden="true" name="8000"></post-icon>
271-
<span class="visually-hidden">Titter X</span>
272-
</a>
273-
</post-list-item>
274-
<post-list-item>
275-
<a href="#linkedin" class="btn btn-primary btn-icon">
276-
<post-icon aria-hidden="true" name="8005"></post-icon>
277-
<span class="visually-hidden">Linkedin</span>
278-
</a>
279-
</post-list-item>
280-
<post-list-item>
281-
<a href="#xing" class="btn btn-primary btn-icon">
282-
<post-icon aria-hidden="true" name="8001"></post-icon>
283-
<span class="visually-hidden">Xing</span>
284-
</a>
285-
</post-list-item>
286-
<post-list-item>
287-
<a href="mailto:[email protected]" class="btn btn-primary btn-icon">
288-
<post-icon aria-hidden="true" name="letter"></post-icon>
289-
<span class="visually-hidden">E-Mail</span>
290-
</a>
291-
</post-list-item>
244+
@for (social of socialMediaLinks; track social.name) {
245+
<post-list-item>
246+
<a [href]="social.url" class="btn btn-primary btn-icon">
247+
<post-icon aria-hidden="true" [name]="social.icon"></post-icon>
248+
<span class="visually-hidden">{{ social.name }}</span>
249+
</a>
250+
</post-list-item>
251+
}
292252
</post-list>
293253

294254
<post-list slot="app">
@@ -335,27 +295,14 @@ <h3>Die schweizerische Post AG</h3>
335295

336296
<post-list slot="meta" title-hidden="">
337297
<h3>Meta</h3>
338-
<post-list-item>
339-
<a href="https://www.post.ch/en/pages/footer/accessibility-at-swiss-post">
340-
Accessibility
341-
</a>
342-
</post-list-item>
343-
<post-list-item>
344-
<a href="https://www.post.ch/en/pages/footer/general-terms-and-conditions-gtc">
345-
General Terms and Conditions
346-
</a>
347-
</post-list-item>
348-
<post-list-item>
349-
<a href="https://www.post.ch/en/pages/footer/data-protection-and-disclaimer">
350-
Data protection and disclaimer
351-
</a>
352-
</post-list-item>
353-
<post-list-item>
354-
<a href="https://www.post.ch/en/pages/footer/publication-details">
355-
Publication details
356-
</a>
357-
</post-list-item>
358-
<post-list-item>
298+
@for (meta of metaLinks; track meta.text) {
299+
<post-list-item>
300+
<a [href]="meta.url">
301+
{{ meta.text }}
302+
</a>
303+
</post-list-item>
304+
}
305+
<post-list-item>
359306
<button
360307
class="btn btn-link"
361308
[style.minHeight]="0"

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,26 @@ export class AppComponent implements OnInit {
9494
{ text: 'Link 5', url: '#test' },
9595
];
9696

97+
// Social media links
98+
public socialMediaLinks = [
99+
{ name: 'Facebook', url: '#facebook', icon: '8004' },
100+
{ name: 'Instagram', url: '#instagram', icon: '8007' },
101+
{ name: 'Youtube', url: '#youtube', icon: '8002' },
102+
{ name: 'Snapchat', url: '#snapchat', icon: '8017' },
103+
{ name: 'Titter X', url: '#twitter-x', icon: '8000' },
104+
{ name: 'Linkedin', url: '#linkedin', icon: '8005' },
105+
{ name: 'Xing', url: '#xing', icon: '8001' },
106+
{ name: 'E-Mail', url: 'mailto:[email protected]', icon: 'letter' },
107+
];
108+
109+
// Meta links
110+
public metaLinks = [
111+
{ text: 'Accessibility', url: 'https://www.post.ch/en/pages/footer/accessibility-at-swiss-post' },
112+
{ text: 'General Terms and Conditions', url: 'https://www.post.ch/en/pages/footer/general-terms-and-conditions-gtc' },
113+
{ text: 'Data protection and disclaimer', url: 'https://www.post.ch/en/pages/footer/data-protection-and-disclaimer' },
114+
{ text: 'Publication details', url: 'https://www.post.ch/en/pages/footer/publication-details' },
115+
];
116+
97117
constructor(private router: Router) {}
98118

99119
ngOnInit(): void {

0 commit comments

Comments
 (0)