diff --git a/src/assets/icons/thumbs-down.svg b/src/assets/icons/thumbs-down.svg new file mode 100644 index 0000000000..52aa171be6 --- /dev/null +++ b/src/assets/icons/thumbs-down.svg @@ -0,0 +1,6 @@ + + diff --git a/src/assets/icons/thumbs-up.svg b/src/assets/icons/thumbs-up.svg new file mode 100644 index 0000000000..cda73f907a --- /dev/null +++ b/src/assets/icons/thumbs-up.svg @@ -0,0 +1,6 @@ + + diff --git a/src/components/Feedback.astro b/src/components/Feedback.astro index 9b8c17d0d8..53d1db839b 100644 --- a/src/components/Feedback.astro +++ b/src/components/Feedback.astro @@ -1,7 +1,9 @@ --- import { accelerator } from '@lib/accelerator'; import type { Frontmatter } from 'astro-accelerator-utils/types/Frontmatter'; -import { SITE } from '@config'; +import { Lang, Translations } from '@util/Languages'; +import Button from './Button.astro'; +import { RATING_NO, RATING_YES } from '../scripts/modules/feedback-form.js'; const stats = new accelerator.statistics('components/Feedback.astro'); stats.start(); @@ -10,17 +12,148 @@ stats.start(); type Props = { lang: string; frontmatter: Frontmatter; - headings: { depth: number; slug: string; text: string }[]; }; -const { lang, frontmatter, headings } = Astro.props satisfies Props; +const { lang, frontmatter } = Astro.props satisfies Props; -// Logic -const heading = await accelerator.markdown.getTextFrom(frontmatter.title); -const formUrl = `https://docs.google.com/forms/d/e/1FAIpQLSehVdN2w6tgSvp5QX7lHGnHDmgKi2Yfvko7bM2izgWQaqg-Wg/viewform?usp=pp_url&entry.336432709=${encodeURIComponent(heading)}`; +// Titles can carry markdown, so they are flattened to text as everywhere else. +const pageTitle = await accelerator.markdown.getTextFrom(frontmatter.title); + +// Language +const _ = Lang(lang); stats.stop(); --- -
Please let us know if you have any feedback about this page.
- ++ {_(Translations.octopus_feedback.question)} +
++ {_(Translations.octopus_feedback.thanks)} +
+