Skip to content

Commit cdc50fe

Browse files
committed
Fix: Update service worker configuration, web manifests, and SEO metadata for improved performance and accessibility
1 parent c04100c commit cdc50fe

13 files changed

Lines changed: 94 additions & 30 deletions

File tree

ngsw-config.json

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,25 @@
2323
"updateMode": "prefetch",
2424
"resources": {
2525
"files": [
26-
"/**/*.(svg|cur|jpg|jpeg|png|apng|webp|avif|gif|otf|ttf|woff|woff2)",
27-
"/theme-light/*",
28-
"/theme-dark/*"
26+
"/assets/**/*.(svg|cur|jpg|jpeg|png|apng|webp|avif|gif)",
27+
"/fonts/**/*.(otf|ttf|woff|woff2)",
28+
"/i18n/*.json",
29+
"/theme-light/**/*.(png|svg)",
30+
"/theme-dark/**/*.(png|svg)"
2931
]
3032
}
3133
}
32-
]
34+
],
35+
"dataGroups": [
36+
{
37+
"name": "api-contact",
38+
"urls": ["/api/contact/**"],
39+
"cacheConfig": {
40+
"maxSize": 0,
41+
"maxAge": "0u",
42+
"strategy": "freshness"
43+
}
44+
}
45+
],
46+
"navigationUrls": ["/**", "!/**/*.*", "!/**/*__*", "!/**/*__*/**"]
3347
}

public/manifest-dark.webmanifest

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scope": "/",
77
"display": "standalone",
88
"orientation": "any",
9-
"background_color": "#1a1a1a",
9+
"background_color": "#000000",
1010
"theme_color": "#00bc8f",
1111
"categories": ["portfolio", "developer", "web development"],
1212
"lang": "en",
@@ -81,10 +81,10 @@
8181
],
8282
"shortcuts": [
8383
{
84-
"name": "Projects",
85-
"short_name": "Projects",
86-
"description": "View my latest development projects",
87-
"url": "/projects",
84+
"name": "About",
85+
"short_name": "About",
86+
"description": "Learn more about my skills and experience",
87+
"url": "/#about",
8888
"icons": [
8989
{
9090
"src": "/theme-dark/icon-192.png",
@@ -94,10 +94,23 @@
9494
]
9595
},
9696
{
97-
"name": "About",
98-
"short_name": "About",
99-
"description": "Learn more about my skills and experience",
100-
"url": "/about",
97+
"name": "Skills",
98+
"short_name": "Skills",
99+
"description": "Explore my technical skills and expertise",
100+
"url": "/#skills",
101+
"icons": [
102+
{
103+
"src": "/theme-dark/icon-192.png",
104+
"sizes": "192x192",
105+
"type": "image/png"
106+
}
107+
]
108+
},
109+
{
110+
"name": "Projects",
111+
"short_name": "Projects",
112+
"description": "View my latest development projects",
113+
"url": "/#projects",
101114
"icons": [
102115
{
103116
"src": "/theme-dark/icon-192.png",
@@ -110,7 +123,7 @@
110123
"name": "Contact",
111124
"short_name": "Contact",
112125
"description": "Get in touch for collaboration opportunities",
113-
"url": "/contact",
126+
"url": "/#contact",
114127
"icons": [
115128
{
116129
"src": "/theme-dark/icon-192.png",

public/manifest-light.webmanifest

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scope": "/",
77
"display": "standalone",
88
"orientation": "any",
9-
"background_color": "#fffcf3",
9+
"background_color": "#ffffff",
1010
"theme_color": "#00bc8f",
1111
"categories": ["portfolio", "developer", "web development"],
1212
"lang": "en",
@@ -81,10 +81,10 @@
8181
],
8282
"shortcuts": [
8383
{
84-
"name": "Projects",
85-
"short_name": "Projects",
86-
"description": "View my latest development projects",
87-
"url": "/projects",
84+
"name": "About",
85+
"short_name": "About",
86+
"description": "Learn more about my skills and experience",
87+
"url": "/#about",
8888
"icons": [
8989
{
9090
"src": "/theme-light/icon-192.png",
@@ -94,10 +94,23 @@
9494
]
9595
},
9696
{
97-
"name": "About",
98-
"short_name": "About",
99-
"description": "Learn more about my skills and experience",
100-
"url": "/about",
97+
"name": "Skills",
98+
"short_name": "Skills",
99+
"description": "Explore my technical skills and expertise",
100+
"url": "/#skills",
101+
"icons": [
102+
{
103+
"src": "/theme-light/icon-192.png",
104+
"sizes": "192x192",
105+
"type": "image/png"
106+
}
107+
]
108+
},
109+
{
110+
"name": "Projects",
111+
"short_name": "Projects",
112+
"description": "View my latest development projects",
113+
"url": "/#projects",
101114
"icons": [
102115
{
103116
"src": "/theme-light/icon-192.png",
@@ -110,7 +123,7 @@
110123
"name": "Contact",
111124
"short_name": "Contact",
112125
"description": "Get in touch for collaboration opportunities",
113-
"url": "/contact",
126+
"url": "/#contact",
114127
"icons": [
115128
{
116129
"src": "/theme-light/icon-192.png",

src/app/core/services/seo.service.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export interface PageMetadata {
1515
ogDescription?: string;
1616
ogImage?: string;
1717
ogUrl?: string;
18+
robots?: string;
1819
}
1920

2021
@Injectable({
@@ -57,6 +58,11 @@ export class SeoService {
5758
if (metadata.ogUrl) {
5859
this.metaService.updateTag({ property: 'og:url', content: metadata.ogUrl });
5960
}
61+
62+
// Robots meta tag (for noindex, nofollow)
63+
if (metadata.robots) {
64+
this.metaService.updateTag({ name: 'robots', content: metadata.robots });
65+
}
6066
}
6167

6268
/**

src/app/layout/footer/footer.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ <h4 class="app-footer__social-heading">{{ footerData().socialHeading }}</h4>
4949
<a
5050
[href]="social.url"
5151
[attr.aria-label]="social.ariaLabel"
52+
[attr.title]="'Visit my ' + social.name + ' profile'"
5253
[class]="'social-link social-link--' + social.hoverColor"
5354
target="_blank"
5455
rel="noopener noreferrer"

src/app/layout/header/header.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
(keyup.space)="navigateToHome()"
1212
role="button"
1313
tabindex="0"
14+
title="Go to homepage"
1415
>
1516
<img class="header__logo-icon" [src]="logoPath()" alt="dev2k Logo" draggable="false" />
1617
<span class="header__logo-text">dev2k</span>
@@ -78,7 +79,7 @@
7879
appNoScroll
7980
/>
8081

81-
<label class="header__burger" for="menuToggle">
82+
<label class="header__burger" for="menuToggle" title="Toggle menu">
8283
<span class="header__burger-line"></span>
8384
<span class="header__burger-line"></span>
8485
<span class="header__burger-line"></span>

src/app/shared/components/buttons/icon-button/icon-button.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
<button [type]="type()" class="icon-button" (click)="onClick()" [attr.aria-label]="ariaLabel()">
1+
<button
2+
[type]="type()"
3+
class="icon-button"
4+
(click)="onClick()"
5+
[attr.aria-label]="ariaLabel()"
6+
[attr.title]="ariaLabel()"
7+
>
28
<img
39
[src]="arrowImage"
410
[class.icon-button__arrow--dark]="isDark()"

src/app/shared/components/buttons/nav-button/nav-button.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class NavButtonComponent {
4444
const route = Array.isArray(link) ? link[0] : link;
4545
this.navigationService.navigateToSection(frag, route);
4646
} else {
47-
this.navigationService.navigateToHome();
47+
this.navigationService.navigateToRoute(link);
4848
}
4949
}
5050
}

src/app/shared/components/buttons/project-button/project-button.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { SmoothScrollService } from '../../../../core/services';
1818
type="button"
1919
(click)="handleClick()"
2020
(focus)="handleFocus($event)"
21+
[attr.title]="label()"
2122
>
2223
{{ label() }}
2324
</button>

src/app/shared/components/language-switcher/language-switcher.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
(click)="toggleDropdown()"
55
[attr.aria-expanded]="isDropdownOpen()"
66
[attr.aria-label]="'Language: ' + getCurrentLanguageData()?.label"
7+
title="Change language"
78
>
89
<img
910
[src]="getCurrentLanguageData()?.flag"

0 commit comments

Comments
 (0)