-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
4 changed files
with
52 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |