Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New static page with terms #618

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="flex-grow" />
<footer class="p-4 footer footer-center text-base-content">
<div>
<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>
<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>
</div>
</footer>
</div>
Expand Down
25 changes: 15 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"dompurify": "^3.1.4",
"marked": "^12.0.2",
"notiwind-ts": "^2.0.2",
"torrust-index-api-lib": "^3.0.0-beta",
"torrust-index-types-lib": "^3.0.0-beta",
"torrust-index-api-lib": "^3.0.0-beta.2",
"torrust-index-types-lib": "^3.0.0-beta.2",
"uuid": "^9.0.1"
}
}
34 changes: 34 additions & 0 deletions pages/terms.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<template>
<div>
<Markdown :source="pageContent" class="px-40 pt-2 pb-5 prose-h1:text-center max-w-none" />
</div>
</template>

<script setup lang="ts">
import { ref, watch } from "vue";
import { useSettings, useSeoMeta } from "#imports";

const settings = useSettings();

const pageTitle = ref("");
const pageContent = ref("");

watch(
() => settings.value,
(newSettings) => {
if (newSettings?.website?.terms?.page) {
pageTitle.value = newSettings.website.terms.page.title;
pageContent.value = newSettings.website.terms.page.content;
}
},
{ immediate: true }
);

useSeoMeta({
title: () => `${pageTitle.value} - Torrent`
});
</script>

<style scoped>

</style>
Loading