Skip to content

Commit

Permalink
Merge #618: New static page with terms
Browse files Browse the repository at this point in the history
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
  • Loading branch information
josecelano committed Sep 15, 2024
2 parents c1bb16d + 367f420 commit c9f84f7
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 13 deletions.
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>

0 comments on commit c9f84f7

Please sign in to comment.