Skip to content

Commit 5d92585

Browse files
committed
feat(i18n,ui): add cookie policy page
1 parent 765297c commit 5d92585

File tree

6 files changed

+347
-2
lines changed

6 files changed

+347
-2
lines changed

app/components/AppFooter.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,18 @@ const isHome = computed(() => route.name === 'index')
1111
>
1212
<div>
1313
<p class="font-mono text-balance m-0 hidden sm:block">{{ $t('tagline') }}</p>
14-
<BuildEnvironment v-if="!isHome" footer />
1514
</div>
1615
<!-- Desktop: Show all links. Mobile: Links are in MobileMenu -->
1716
<div class="hidden sm:flex items-center gap-6">
1817
<NuxtLink to="/about" class="link-subtle font-mono text-xs min-h-11 flex items-center">
1918
{{ $t('footer.about') }}
2019
</NuxtLink>
20+
<NuxtLink
21+
to="/cookie-policy"
22+
class="link-subtle font-mono text-xs min-h-11 flex items-center gap-1 lowercase"
23+
>
24+
{{ $t('cookie_policy.title') }}
25+
</NuxtLink>
2126
<a
2227
href="https://docs.npmx.dev"
2328
target="_blank"
@@ -56,6 +61,7 @@ const isHome = computed(() => route.name === 'index')
5661
</a>
5762
</div>
5863
</div>
64+
<BuildEnvironment v-if="!isHome" footer />
5965
<p class="text-xs text-fg-muted text-center sm:text-start m-0">
6066
<span class="sm:hidden">{{ $t('non_affiliation_disclaimer') }}</span>
6167
<span class="hidden sm:inline">{{ $t('trademark_disclaimer') }}</span>

app/components/BuildEnvironment.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const buildInfo = useAppConfig().buildInfo
1010
<template>
1111
<div
1212
class="font-mono text-xs text-fg-muted flex items-center gap-2 motion-safe:animate-fade-in motion-safe:animate-fill-both"
13-
:class="footer ? 'mt-4 justify-start' : 'mb-8 justify-center'"
13+
:class="footer ? 'mt-0 mb-3 justify-center sm:justify-start' : 'mb-8 justify-center'"
1414
style="animation-delay: 0.05s"
1515
>
1616
<i18n-t keypath="built_at" scope="global">

app/pages/cookie-policy.vue

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
<script setup lang="ts">
2+
definePageMeta({
3+
name: 'cookie-policy',
4+
})
5+
6+
useSeoMeta({
7+
title: () => `${$t('cookie_policy.title')} - npmx`,
8+
description: () => $t('cookie_policy.welcome', { app: 'npmx' }),
9+
})
10+
11+
defineOgImageComponent('Default', {
12+
title: () => $t('cookie_policy.title'),
13+
description: () => $t('cookie_policy.welcome', { app: 'npmx' }),
14+
})
15+
</script>
16+
17+
<template>
18+
<main class="container flex-1 py-12 sm:py-16 w-full">
19+
<article class="max-w-3xl mx-auto">
20+
<header class="mb-8 pb-8 border-b border-border">
21+
<h1 class="font-mono text-3xl sm:text-4xl font-medium mb-4 lowercase">
22+
{{ $t('cookie_policy.title') }}
23+
</h1>
24+
<p class="text-fg-muted">
25+
{{
26+
$t('cookie_policy.last_updated', {
27+
date: '', // Placeholder, NuxtTime handles the date
28+
})
29+
}}
30+
<NuxtTime :datetime="new Date('2025-07-03')" date-style="long" />
31+
</p>
32+
</header>
33+
34+
<div class="prose prose-invert max-w-none text-fg-muted">
35+
<p>
36+
<i18n-t keypath="cookie_policy.welcome" tag="span" scope="global">
37+
<template #app>
38+
<strong class="text-fg">npmx</strong>
39+
</template>
40+
</i18n-t>
41+
</p>
42+
43+
<section class="mt-8">
44+
<h2 class="text-xl font-medium text-fg mb-4">
45+
{{ $t('cookie_policy.section_1.title') }}
46+
</h2>
47+
<p>{{ $t('cookie_policy.section_1.p1') }}</p>
48+
</section>
49+
50+
<section class="mt-8">
51+
<h2 class="text-xl font-medium text-fg mb-4">
52+
{{ $t('cookie_policy.section_2.title') }}
53+
</h2>
54+
<p class="mb-4">
55+
<i18n-t keypath="cookie_policy.section_2.p1" tag="span" scope="global">
56+
<template #bold>
57+
<strong class="text-fg">{{ $t('cookie_policy.section_2.bold') }}</strong>
58+
</template>
59+
</i18n-t>
60+
</p>
61+
<ul class="list-disc ps-5 space-y-2">
62+
<li>
63+
<i18n-t keypath="cookie_policy.section_2.li1" tag="span" scope="global">
64+
<template #bold>
65+
<strong class="text-fg">{{ $t('cookie_policy.section_2.li1_bold') }}</strong>
66+
</template>
67+
</i18n-t>
68+
</li>
69+
</ul>
70+
</section>
71+
72+
<section class="mt-8">
73+
<h2 class="text-xl font-medium text-fg mb-4">
74+
{{ $t('cookie_policy.section_3.title') }}
75+
</h2>
76+
<p class="mb-4">
77+
<i18n-t keypath="cookie_policy.section_3.p1" tag="span" scope="global">
78+
<template #bold>
79+
<strong class="text-fg">{{ $t('cookie_policy.section_3.bold') }}</strong>
80+
</template>
81+
<template #settings>
82+
<NuxtLink
83+
to="/settings"
84+
class="link-subtle font-mono text-xs min-h-11 inline-flex items-center gap-1 lowercase"
85+
>
86+
{{ $t('cookie_policy.section_3.settings') }}
87+
</NuxtLink>
88+
</template>
89+
</i18n-t>
90+
</p>
91+
<p>
92+
<i18n-t keypath="cookie_policy.section_3.p2" tag="span" scope="global">
93+
<template #bold>
94+
<strong class="text-fg">{{ $t('cookie_policy.section_3.bold2') }}</strong>
95+
</template>
96+
</i18n-t>
97+
</p>
98+
</section>
99+
100+
<section class="mt-8">
101+
<h2 class="text-xl font-medium text-fg mb-4">
102+
{{ $t('cookie_policy.section_4.title') }}
103+
</h2>
104+
<p>
105+
<i18n-t keypath="cookie_policy.section_4.p1" tag="span" scope="global">
106+
<template #bold>
107+
<strong class="text-fg">{{ $t('cookie_policy.section_4.bold') }}</strong>
108+
</template>
109+
<template #bold2>
110+
<strong class="text-fg">{{ $t('cookie_policy.section_4.bold2') }}</strong>
111+
</template>
112+
</i18n-t>
113+
</p>
114+
</section>
115+
116+
<section class="mt-8">
117+
<h2 class="text-xl font-medium text-fg mb-4">
118+
{{ $t('cookie_policy.section_5.title') }}
119+
</h2>
120+
<p class="mb-4">
121+
<i18n-t keypath="cookie_policy.section_5.p1" tag="span" scope="global">
122+
<template #bold>
123+
<strong class="text-fg">{{ $t('cookie_policy.section_5.bold') }}</strong>
124+
</template>
125+
</i18n-t>
126+
</p>
127+
<p class="mb-2">{{ $t('cookie_policy.section_5.p2') }}</p>
128+
<ul class="list-none px-0 space-y-2">
129+
<li>
130+
<a
131+
href="https://support.google.com/chrome/answer/95647?hl=en"
132+
target="_blank"
133+
rel="noopener noreferrer"
134+
class="flex justify-between items-center gap-1 p-3"
135+
>
136+
{{ $t('cookie_policy.section_5.chrome') }}
137+
<span class="i-carbon:launch rtl-flip w-3 h-3" aria-hidden="true"></span>
138+
</a>
139+
</li>
140+
<li>
141+
<a
142+
href="https://support.mozilla.org/en-US/kb/clear-cookies-and-site-data-firefox"
143+
target="_blank"
144+
rel="noopener noreferrer"
145+
class="flex justify-between items-center gap-1 p-3"
146+
>
147+
{{ $t('cookie_policy.section_5.firefox') }}
148+
<span class="i-carbon:launch rtl-flip w-3 h-3" aria-hidden="true"></span>
149+
</a>
150+
</li>
151+
<li>
152+
<a
153+
href="https://support.microsoft.com/en-us/windows/manage-cookies-in-microsoft-edge-view-allow-block-delete-and-use-168dab11-0753-043d-7c16-ede5947fc64d"
154+
target="_blank"
155+
rel="noopener noreferrer"
156+
class="flex justify-between items-center gap-1 p-3"
157+
>
158+
{{ $t('cookie_policy.section_5.edge') }}
159+
<span class="i-carbon:launch rtl-flip w-3 h-3" aria-hidden="true"></span>
160+
</a>
161+
</li>
162+
</ul>
163+
</section>
164+
165+
<section class="mt-8">
166+
<h2 class="text-xl font-medium text-fg mb-4">
167+
{{ $t('cookie_policy.section_6.title') }}
168+
</h2>
169+
<p>
170+
<i18n-t keypath="cookie_policy.section_6.p1" tag="span" scope="global">
171+
<template #link>
172+
<a
173+
href="https://github.com/npmx-dev/npmx.dev/issues"
174+
target="_blank"
175+
rel="noopener noreferrer"
176+
class="inline-flex items-center gap-1"
177+
>
178+
<span>{{ $t('cookie_policy.section_6.link') }}</span>
179+
<span class="i-carbon:launch rtl-flip w-3 h-3" aria-hidden="true"></span>
180+
</a>
181+
</template>
182+
</i18n-t>
183+
</p>
184+
</section>
185+
186+
<section class="mt-8">
187+
<h2 class="text-xl font-medium text-fg mb-4">
188+
{{ $t('cookie_policy.section_7.title') }}
189+
</h2>
190+
<p>{{ $t('cookie_policy.section_7.p1') }}</p>
191+
</section>
192+
</div>
193+
</article>
194+
</main>
195+
</template>

i18n/locales/en.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,5 +936,53 @@
936936
"vulnerabilities_summary": "{count} ({critical}C/{high}H)"
937937
}
938938
}
939+
},
940+
"cookie_policy": {
941+
"title": "Cookie Policy",
942+
"last_updated": "Last updated: {date}",
943+
"welcome": "Welcome to {app}. In this policy, we explain what cookies are, how we use them, and how you can manage them.",
944+
"section_1": {
945+
"title": "1. What are cookies?",
946+
"p1": "Cookies are small text files stored on your device when you visit a website. Their purpose is to enhance your browsing experience by remembering certain preferences and settings."
947+
},
948+
"section_2": {
949+
"title": "2. What types of cookies do we use?",
950+
"p1": "On our website, we only use {bold} for purposes strictly necessary for the site's functionality. We do not use third-party or advertising cookies.",
951+
"bold": "first-party cookies",
952+
"li1": "They allow us to keep your session active once you have logged in. Technically, this cookie has no expiration date and is deleted by your browser upon closing. However, for your security, the session on our servers {bold}, at which point you will be asked to log in again.",
953+
"li1_bold": "will automatically terminate after a period of inactivity"
954+
},
955+
"section_3": {
956+
"title": "3. Other Storage Technologies",
957+
"p1": "In addition to session cookies, we use your browser's {bold} to save your display preferences. This allows us to remember the theme (light/dark) and some other {settings} you have selected, so you don't have to reconfigure them on each visit.",
958+
"bold": "Local Storage",
959+
"p2": "This information is purely functional, stored only on your device, and {bold}. We use it exclusively to improve your experience on our website.",
960+
"bold2": "contains no personal data nor is it used to track you",
961+
"settings": "settings"
962+
},
963+
"section_4": {
964+
"title": "4. Cookie Acceptance and Application Access",
965+
"p1": "The use of cookies on our website is {bold}. Therefore, {bold2}. By continuing to browse or log in, you expressly accept our cookie policy.",
966+
"bold": "essential for its proper functioning",
967+
"bold2": "if you do not accept the use of cookies, you will not be able to access the application"
968+
},
969+
"section_5": {
970+
"title": "5. Cookie Management",
971+
"p1": "You can configure your browser to accept, reject, or delete cookies according to your preferences. However, please note that {bold}.",
972+
"bold": "rejecting cookies will prevent access to and use of the application",
973+
"p2": "Below are links with instructions for cookie management in the most commonly used browsers:",
974+
"chrome": "Google Chrome (opens in a new window)",
975+
"firefox": "Mozilla Firefox (opens in a new window)",
976+
"edge": "Microsoft Edge (opens in a new window)"
977+
},
978+
"section_6": {
979+
"title": "6. Data Controller",
980+
"p1": "While our only cookie does not collect personal information, we guarantee compliance with the principles of transparency and security in data management. For any questions or requests regarding the use of cookies, you can contact us by opening an issue on our {link}.",
981+
"link": "GitHub repository"
982+
},
983+
"section_7": {
984+
"title": "7. Changes to the Cookie Policy",
985+
"p1": "We reserve the right to modify this policy at any time. Any changes will be published on this page."
986+
}
939987
}
940988
}

lunaria/files/en-GB.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,5 +936,53 @@
936936
"vulnerabilities_summary": "{count} ({critical}C/{high}H)"
937937
}
938938
}
939+
},
940+
"cookie_policy": {
941+
"title": "Cookie Policy",
942+
"last_updated": "Last updated: {date}",
943+
"welcome": "Welcome to {app}. In this policy, we explain what cookies are, how we use them, and how you can manage them.",
944+
"section_1": {
945+
"title": "1. What are cookies?",
946+
"p1": "Cookies are small text files stored on your device when you visit a website. Their purpose is to enhance your browsing experience by remembering certain preferences and settings."
947+
},
948+
"section_2": {
949+
"title": "2. What types of cookies do we use?",
950+
"p1": "On our website, we only use {bold} for purposes strictly necessary for the site's functionality. We do not use third-party or advertising cookies.",
951+
"bold": "first-party cookies",
952+
"li1": "They allow us to keep your session active once you have logged in. Technically, this cookie has no expiration date and is deleted by your browser upon closing. However, for your security, the session on our servers {bold}, at which point you will be asked to log in again.",
953+
"li1_bold": "will automatically terminate after a period of inactivity"
954+
},
955+
"section_3": {
956+
"title": "3. Other Storage Technologies",
957+
"p1": "In addition to session cookies, we use your browser's {bold} to save your display preferences. This allows us to remember the theme (light/dark) and some other {settings} you have selected, so you don't have to reconfigure them on each visit.",
958+
"bold": "Local Storage",
959+
"p2": "This information is purely functional, stored only on your device, and {bold}. We use it exclusively to improve your experience on our website.",
960+
"bold2": "contains no personal data nor is it used to track you",
961+
"settings": "settings"
962+
},
963+
"section_4": {
964+
"title": "4. Cookie Acceptance and Application Access",
965+
"p1": "The use of cookies on our website is {bold}. Therefore, {bold2}. By continuing to browse or log in, you expressly accept our cookie policy.",
966+
"bold": "essential for its proper functioning",
967+
"bold2": "if you do not accept the use of cookies, you will not be able to access the application"
968+
},
969+
"section_5": {
970+
"title": "5. Cookie Management",
971+
"p1": "You can configure your browser to accept, reject, or delete cookies according to your preferences. However, please note that {bold}.",
972+
"bold": "rejecting cookies will prevent access to and use of the application",
973+
"p2": "Below are links with instructions for cookie management in the most commonly used browsers:",
974+
"chrome": "Google Chrome (opens in a new window)",
975+
"firefox": "Mozilla Firefox (opens in a new window)",
976+
"edge": "Microsoft Edge (opens in a new window)"
977+
},
978+
"section_6": {
979+
"title": "6. Data Controller",
980+
"p1": "While our only cookie does not collect personal information, we guarantee compliance with the principles of transparency and security in data management. For any questions or requests regarding the use of cookies, you can contact us by opening an issue on our {link}.",
981+
"link": "GitHub repository"
982+
},
983+
"section_7": {
984+
"title": "7. Changes to the Cookie Policy",
985+
"p1": "We reserve the right to modify this policy at any time. Any changes will be published on this page."
986+
}
939987
}
940988
}

lunaria/files/en-US.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,5 +936,53 @@
936936
"vulnerabilities_summary": "{count} ({critical}C/{high}H)"
937937
}
938938
}
939+
},
940+
"cookie_policy": {
941+
"title": "Cookie Policy",
942+
"last_updated": "Last updated: {date}",
943+
"welcome": "Welcome to {app}. In this policy, we explain what cookies are, how we use them, and how you can manage them.",
944+
"section_1": {
945+
"title": "1. What are cookies?",
946+
"p1": "Cookies are small text files stored on your device when you visit a website. Their purpose is to enhance your browsing experience by remembering certain preferences and settings."
947+
},
948+
"section_2": {
949+
"title": "2. What types of cookies do we use?",
950+
"p1": "On our website, we only use {bold} for purposes strictly necessary for the site's functionality. We do not use third-party or advertising cookies.",
951+
"bold": "first-party cookies",
952+
"li1": "They allow us to keep your session active once you have logged in. Technically, this cookie has no expiration date and is deleted by your browser upon closing. However, for your security, the session on our servers {bold}, at which point you will be asked to log in again.",
953+
"li1_bold": "will automatically terminate after a period of inactivity"
954+
},
955+
"section_3": {
956+
"title": "3. Other Storage Technologies",
957+
"p1": "In addition to session cookies, we use your browser's {bold} to save your display preferences. This allows us to remember the theme (light/dark) and some other {settings} you have selected, so you don't have to reconfigure them on each visit.",
958+
"bold": "Local Storage",
959+
"p2": "This information is purely functional, stored only on your device, and {bold}. We use it exclusively to improve your experience on our website.",
960+
"bold2": "contains no personal data nor is it used to track you",
961+
"settings": "settings"
962+
},
963+
"section_4": {
964+
"title": "4. Cookie Acceptance and Application Access",
965+
"p1": "The use of cookies on our website is {bold}. Therefore, {bold2}. By continuing to browse or log in, you expressly accept our cookie policy.",
966+
"bold": "essential for its proper functioning",
967+
"bold2": "if you do not accept the use of cookies, you will not be able to access the application"
968+
},
969+
"section_5": {
970+
"title": "5. Cookie Management",
971+
"p1": "You can configure your browser to accept, reject, or delete cookies according to your preferences. However, please note that {bold}.",
972+
"bold": "rejecting cookies will prevent access to and use of the application",
973+
"p2": "Below are links with instructions for cookie management in the most commonly used browsers:",
974+
"chrome": "Google Chrome (opens in a new window)",
975+
"firefox": "Mozilla Firefox (opens in a new window)",
976+
"edge": "Microsoft Edge (opens in a new window)"
977+
},
978+
"section_6": {
979+
"title": "6. Data Controller",
980+
"p1": "While our only cookie does not collect personal information, we guarantee compliance with the principles of transparency and security in data management. For any questions or requests regarding the use of cookies, you can contact us by opening an issue on our {link}.",
981+
"link": "GitHub repository"
982+
},
983+
"section_7": {
984+
"title": "7. Changes to the Cookie Policy",
985+
"p1": "We reserve the right to modify this policy at any time. Any changes will be published on this page."
986+
}
939987
}
940988
}

0 commit comments

Comments
 (0)