add
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<slot name="label" />
|
||||
</summary>
|
||||
<div
|
||||
class="absolute right-0 top-full translate-y-1 bg-stone-900 p-2.5 border border-white/15 min-w-56 rounded-lg shadow drop-shadow"
|
||||
class="absolute right-0 top-full translate-y-1 bg-stone-900 border border-white/15 min-w-74 rounded-lg shadow drop-shadow"
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@ const courses = await getCollection(
|
||||
({ data }) => data.draft != true,
|
||||
);
|
||||
|
||||
const { title } = Astro.props;
|
||||
const { title, course } = Astro.props;
|
||||
---
|
||||
|
||||
<nav class="sticky top-0 z-10 bg-lime-400 py-3 drop-shadow shadow-sm">
|
||||
@@ -27,8 +27,18 @@ const { title } = Astro.props;
|
||||
|
||||
<BuyDropdown class="ml-auto">
|
||||
<Fragment slot="label">Contratar agora</Fragment>
|
||||
<ul>
|
||||
<li>...</li>
|
||||
<ul class="divide-y divide-white/10">
|
||||
<li class="uppercase py-2.5 px-5">EDUSEG® Flexível</li>
|
||||
<li class="uppercase py-2.5 px-5">EDUSEG® In-Company</li>
|
||||
<li class="uppercase py-2.5 px-5">EDUSEG® Conteúdo</li>
|
||||
<li class="py-2.5 px-5">
|
||||
Contratar {
|
||||
new Intl.NumberFormat("pt-BR", {
|
||||
style: "currency",
|
||||
currency: "BRL",
|
||||
}).format(course.unit_price)
|
||||
} p/ matrícula
|
||||
</li>
|
||||
</ul>
|
||||
</BuyDropdown>
|
||||
</Container>
|
||||
|
||||
@@ -30,7 +30,9 @@ import Modal from "~/components/Modal.astro";
|
||||
<h2 class="text-xl/6 font-semibold">
|
||||
Catálogo completo sempre à sua disposição
|
||||
</h2>
|
||||
<ul class="list-disc max-lg:pl-3.5 space-y-1.5 text-sm/5">
|
||||
<ul
|
||||
class="list-disc max-lg:pl-3.5 space-y-1.5 text-sm/5 marker:text-lime-400"
|
||||
>
|
||||
<li>Acesse todos os cursos imediatamente</li>
|
||||
<li>Pague apenas pelo que usar, mês a mês</li>
|
||||
<li>Gestão e autonomia direto pela plataforma</li>
|
||||
@@ -58,7 +60,9 @@ import Modal from "~/components/Modal.astro";
|
||||
<h2 class="text-xl/6 font-semibold">
|
||||
Treinamento presencial na sua empresa
|
||||
</h2>
|
||||
<ul class="list-disc max-lg:pl-3.5 space-y-1.5 text-sm/5">
|
||||
<ul
|
||||
class="list-disc max-lg:pl-3.5 space-y-1.5 text-sm/5 marker:text-lime-400"
|
||||
>
|
||||
<li>Atendemos nas principais cidades do Brasil</li>
|
||||
<li>Instrutores especialistas com vivência prática</li>
|
||||
<li>Ideal para grandes turmas ou treinamentos práticos</li>
|
||||
@@ -85,7 +89,9 @@ import Modal from "~/components/Modal.astro";
|
||||
<h2 class="text-xl/6 font-semibold">
|
||||
Leve nosso conteúdo para sua plataforma
|
||||
</h2>
|
||||
<ul class="list-disc max-lg:pl-3.5 space-y-1.5 text-sm/5">
|
||||
<ul
|
||||
class="list-disc max-lg:pl-3.5 space-y-1.5 text-sm/5 marker:text-lime-400"
|
||||
>
|
||||
<li>Customização completa com sua identidade visual</li>
|
||||
<li>Entregamos em formato SCORM para qualquer LMS</li>
|
||||
<li>Ideal para empresas com ambiente EAD próprio</li>
|
||||
@@ -104,3 +110,7 @@ import Modal from "~/components/Modal.astro";
|
||||
</div>
|
||||
</section>
|
||||
</Container>
|
||||
|
||||
<script is:inline>
|
||||
console.log(window);
|
||||
</script>
|
||||
|
||||
99
superpage/src/components/SEO.astro
Normal file
99
superpage/src/components/SEO.astro
Normal file
@@ -0,0 +1,99 @@
|
||||
---
|
||||
export type Image = {
|
||||
src: string;
|
||||
alt: string;
|
||||
};
|
||||
export type SEOMetadata = {
|
||||
name: string;
|
||||
title: string;
|
||||
description: string;
|
||||
image: Image;
|
||||
canonicalURL?: URL | string | null;
|
||||
locale?: string;
|
||||
};
|
||||
export type OpenGraph = Partial<SEOMetadata> & {
|
||||
type?: string;
|
||||
};
|
||||
export type Twitter = Partial<SEOMetadata> & {
|
||||
handle?: string;
|
||||
card?: "summary" | "summary_large_image";
|
||||
};
|
||||
export type Props = SEOMetadata & {
|
||||
og?: OpenGraph;
|
||||
twitter?: Twitter;
|
||||
};
|
||||
const {
|
||||
name,
|
||||
title,
|
||||
description,
|
||||
image,
|
||||
locale = "en",
|
||||
canonicalURL = new URL(Astro.url.pathname, Astro.site),
|
||||
} = Astro.props;
|
||||
|
||||
const og = {
|
||||
name,
|
||||
title,
|
||||
description,
|
||||
canonicalURL,
|
||||
image,
|
||||
locale,
|
||||
type: "website",
|
||||
...Astro.props.og,
|
||||
} satisfies OpenGraph;
|
||||
|
||||
const twitter = {
|
||||
name,
|
||||
title,
|
||||
description,
|
||||
canonicalURL,
|
||||
image,
|
||||
locale,
|
||||
card: "summary_large_image",
|
||||
...Astro.props.twitter,
|
||||
} satisfies Twitter;
|
||||
|
||||
/**
|
||||
* Enforce some standard canonical URL formatting across the site.
|
||||
*/
|
||||
function formatCanonicalURL(url: string | URL) {
|
||||
const path = url.toString();
|
||||
const hasQueryParams = path.includes("?");
|
||||
// If there are query params, make sure the URL has no trailing slash
|
||||
if (hasQueryParams) {
|
||||
path.replace(/\/?$/, "");
|
||||
}
|
||||
// otherwise, canonical URL always has a trailing slash
|
||||
return path.replace(/\/?$/, hasQueryParams ? "" : "/");
|
||||
}
|
||||
---
|
||||
|
||||
{/* Page Metadata */}
|
||||
{
|
||||
canonicalURL && (
|
||||
<link rel="canonical" href={formatCanonicalURL(canonicalURL)} />
|
||||
)
|
||||
}
|
||||
<meta name="description" content={description} />
|
||||
|
||||
{/* OpenGraph Tags */}
|
||||
<meta property="og:title" content={og.title} />
|
||||
<meta property="og:type" content={og.type} />
|
||||
{
|
||||
og.canonicalURL && (
|
||||
<meta property="og:url" content={formatCanonicalURL(og.canonicalURL)} />
|
||||
)
|
||||
}
|
||||
<meta property="og:locale" content={og.locale} />
|
||||
<meta property="og:description" content={og.description} />
|
||||
<meta property="og:site_name" content={og.name} />
|
||||
{og.image && <meta property="og:image" content={og.image.src} />}
|
||||
{og.image && <meta property="og:image:alt" content={og.image.alt} />}
|
||||
|
||||
{/* Twitter Tags */}
|
||||
{twitter.card && <meta name="twitter:card" content={twitter.card} />}
|
||||
{twitter.handle && <meta name="twitter:site" content={twitter.handle} />}
|
||||
<meta name="twitter:title" content={twitter.title} />
|
||||
<meta name="twitter:description" content={twitter.description} />
|
||||
{twitter.image && <meta name="twitter:image" content={twitter.image.src} />}
|
||||
{twitter.image && <meta name="twitter:image:alt" content={twitter.image.alt} />}
|
||||
Reference in New Issue
Block a user