Skip to content
Snippets Groups Projects
Commit 354d10dc authored by Yassine Doghri's avatar Yassine Doghri
Browse files

feat(getting-started): add analytics events to resource links

parent 69908054
No related branches found
No related tags found
No related merge requests found
Pipeline #10167 passed
---
import { Icon } from "astro-icon";
let { link, icon, title, ...attributes } = Astro.props;
let { link, icon, title, analyticsEvent, ...attributes } = Astro.props;
---
<li {...attributes}>
<a
href={link}
class="relative flex flex-col w-full h-full gap-4 px-4 pt-4 pb-10 overflow-hidden transition bg-white border-4 border-transparent shadow-xl hover:shadow focus:shadow focus:bg-pine-100 group focus:outline-none focus:ring-2 focus:ring-pine-400 focus:ring-opacity-75 hover:bg-pine-100 rounded-conditional-xl hover:border-pine-500"
data-analytics={'"' +
analyticsEvent +
'", ' +
JSON.stringify({ props: { via: "Getting Started" } })}
>
<h2 class="text-xl font-semibold text-pine-800 font-display">
<Icon
......
......@@ -13,9 +13,9 @@ import Path5 from "assets:DashedPath/Path5";
import Path6 from "assets:DashedPath/Path6";
import StraightPath from "assets:DashedPath/StraightPath";
import { Icon } from "astro-icon";
import i18next, { t } from "i18next";
import { t } from "i18next";
import { Trans } from "astro-i18next/components";
import { localizePath } from "astro-i18next/index";
import { localizePath } from "astro-i18next";
---
<section id="features" class="container py-24">
......
......@@ -119,6 +119,10 @@ import CastopodMascot from "assets:CastopodMascot";
<a
href="https://docs.castopod.org/getting-started/docker.html"
class="inline-flex w-full gap-4 py-2 font-semibold group hover:underline decoration-2 decoration-pine-500 text-pine-900"
data-analytics={'"Install", ' +
JSON.stringify({
props: { method: "Docker", via: "Getting Started" },
})}
>
<Icon
pack="ri"
......@@ -131,6 +135,10 @@ import CastopodMascot from "assets:CastopodMascot";
<a
href="https://install-app.yunohost.org/?app=castopod"
class="inline-flex w-full gap-4 py-2 font-semibold group hover:underline decoration-2 decoration-pine-500 text-pine-900"
data-analytics={'"Install", ' +
JSON.stringify({
props: { method: "YunoHost", via: "Getting Started" },
})}
>
<Icon
pack="ri"
......@@ -143,6 +151,10 @@ import CastopodMascot from "assets:CastopodMascot";
<a
href="https://blog.castopod.org/install-castopod-on-cloud-panel-v2/"
class="inline-flex w-full gap-4 py-2 font-semibold group hover:underline decoration-2 decoration-pine-500 text-pine-900"
data-analytics={'"Install", ' +
JSON.stringify({
props: { method: "CloudPanel", via: "Getting Started" },
})}
>
<Icon
pack="ri"
......@@ -155,6 +167,13 @@ import CastopodMascot from "assets:CastopodMascot";
<a
href="https://github.com/belykhk/castopod-ansible-playbook"
class="inline-flex w-full gap-4 py-2 font-semibold group hover:underline decoration-2 decoration-pine-500 text-pine-900"
data-analytics={'"Install", ' +
JSON.stringify({
props: {
method: "Ansible Playbook",
via: "Getting Started",
},
})}
>
<Icon
pack="ri"
......@@ -167,6 +186,10 @@ import CastopodMascot from "assets:CastopodMascot";
<a
href="https://docs.castopod.org/getting-started/install.html"
class="inline-flex w-full gap-4 py-2 font-semibold group hover:underline decoration-2 decoration-pine-500 text-pine-900"
data-analytics={'"Install", ' +
JSON.stringify({
props: { method: "Manual", via: "Getting Started" },
})}
>
<Icon
pack="ri"
......@@ -184,24 +207,28 @@ import CastopodMascot from "assets:CastopodMascot";
link="https://docs.castopod.org/"
icon="book-read-fill"
title={t("documentation")}
analyticsEvent="Documentation"
>{t("documentationDescription")}
</Card>
<Card
link="https://code.castopod.org/adaures/castopod/-/issues"
icon="bug-fill"
title={t("issueTracker")}
analyticsEvent="Issue Tracker"
>{t("issueTrackerDescription")}
</Card>
<Card
link="https://translate.castopod.org/"
icon="translate-2"
title={t("translate")}
analyticsEvent="Translate"
>{t("translateDescription")}
</Card>
<Card
link="https://castopod.org/chat"
icon="chat-smile-2-fill"
title={t("chat")}
analyticsEvent="Chat"
>
{t("chatDescription")}
</Card>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment