Skip to content

Commit c9f84f7

Browse files
committed
Merge #618: New static page with terms
367f420 feat: [#617] new static page with terms (Jose Celano) Pull request description: Depends on: - torrust/torrust-index-types-lib#25 - torrust/torrust-index#731 URL: http://localhost:3000/terms It also adds a link in the footer. The page content is loaded in markdown format from the API (settings->website). ACKs for top commit: josecelano: ACK 367f420 Tree-SHA512: 784d823560800c23da03295bf9c46677fcd20f0bfd638994be8bb675bf0961d57671c0d00a92eea566289803c89bc8e8e59261144f1feab973df50ffef573efd
2 parents c1bb16d + 367f420 commit c9f84f7

File tree

4 files changed

+52
-13
lines changed

4 files changed

+52
-13
lines changed

app.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<div class="flex-grow" />
1313
<footer class="p-4 footer footer-center text-base-content">
1414
<div>
15-
<p><a target="_blank" href="https://torrust.com" class="link link-hover"> Powered by Torrust </a> ⚡ <a target="_self" href="/license" class="link link-hover">Copyright © 2024</a></p>
15+
<p><a target="_blank" href="https://torrust.com" class="link link-hover"> Powered by Torrust </a> ⚡ <a target="_self" href="/license" class="link link-hover">Copyright © 2024</a> &nbsp; <a target="_self" href="/terms" class="link link-hover">Terms</a></p>
1616
</div>
1717
</footer>
1818
</div>

package-lock.json

Lines changed: 15 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
"dompurify": "^3.1.4",
4949
"marked": "^12.0.2",
5050
"notiwind-ts": "^2.0.2",
51-
"torrust-index-api-lib": "^3.0.0-beta",
52-
"torrust-index-types-lib": "^3.0.0-beta",
51+
"torrust-index-api-lib": "^3.0.0-beta.2",
52+
"torrust-index-types-lib": "^3.0.0-beta.2",
5353
"uuid": "^9.0.1"
5454
}
5555
}

pages/terms.vue

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<template>
2+
<div>
3+
<Markdown :source="pageContent" class="px-40 pt-2 pb-5 prose-h1:text-center max-w-none" />
4+
</div>
5+
</template>
6+
7+
<script setup lang="ts">
8+
import { ref, watch } from "vue";
9+
import { useSettings, useSeoMeta } from "#imports";
10+
11+
const settings = useSettings();
12+
13+
const pageTitle = ref("");
14+
const pageContent = ref("");
15+
16+
watch(
17+
() => settings.value,
18+
(newSettings) => {
19+
if (newSettings?.website?.terms?.page) {
20+
pageTitle.value = newSettings.website.terms.page.title;
21+
pageContent.value = newSettings.website.terms.page.content;
22+
}
23+
},
24+
{ immediate: true }
25+
);
26+
27+
useSeoMeta({
28+
title: () => `${pageTitle.value} - Torrent`
29+
});
30+
</script>
31+
32+
<style scoped>
33+
34+
</style>

0 commit comments

Comments
 (0)