-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Home & added section components (#15)
* rm unused components * Added Hero Section * Added HalfTextHalfImage sections * Added quote section * fixed padding * Updated padding on other sections to be a little larger * Added Navbar * Made navbar links move to the right on desktop when no CTA exists * Added Footer * small fixups for Hero * Added simple section section * rm web vitals * Added Features Section and Container * Created a render markdown component * Added a letter section * Updated TS config for path aliases * Updated Footer * Added Sign In Page * Updated Copy and added View on Deploy to Netlify * Centered the Clerk Sign In button * Updated Posts * Replace home page with new home page and added Posts page updates * Added FAQ * If I'm signed in take me to dashboard * Added optimized images * bumped version * rm unused file
- Loading branch information
1 parent
a353197
commit 8a4f0be
Showing
27 changed files
with
659 additions
and
276 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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
import DOMPurify from "isomorphic-dompurify"; | ||
import { marked } from "marked"; | ||
interface Props { | ||
content: string; | ||
} | ||
const { content } = Astro.props; | ||
const html = await marked.parse(content); | ||
// Convert markdown to HTML and sanitize | ||
const purifiedHTML = DOMPurify.sanitize(html, { | ||
FORBID_TAGS: ["script", "style", "iframe", "form"], | ||
FORBID_ATTR: ["onerror", "onload", "onclick", "onmouseover"] | ||
} as DOMPurify.Config); | ||
--- | ||
|
||
<div set:html={purifiedHTML} class="[&>p]:m-0 [&>p]:text-xl [&>p]:leading-relaxed" /> |
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,24 @@ | ||
--- | ||
interface Props { | ||
title?: string; | ||
subtitle?: string; | ||
align?: "center" | "left" | "right"; | ||
titleIsH1?: boolean; | ||
} | ||
const { title, subtitle, align = "left", titleIsH1 = false } = Astro.props; | ||
--- | ||
|
||
<section class="h-fit container flex flex-col justify-center items-center px-6 py-16"> | ||
{ | ||
title || subtitle ? ( | ||
<div class={`flex flex-col items-${align} max-w-3xl mx-auto text-${align} mb-12 w-full`}> | ||
{title && !titleIsH1 ? <h2 class="mb-4 text-balance">{title}</h2> : null} | ||
{title && titleIsH1 ? <h1 class="mb-4 text-balance">{title}</h1> : null} | ||
{subtitle && <p class="text-xl mb-0 line-clamp-4">{subtitle}</p>} | ||
</div> | ||
) : null | ||
} | ||
|
||
<slot /> | ||
</section> |
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,36 @@ | ||
--- | ||
import Container from "@sections/Container.astro"; | ||
import RenderMarkdown from "@/components/RenderMarkdown.astro"; | ||
interface Props { | ||
title: string; | ||
subtitle?: string; | ||
align?: "center" | "left" | "right"; | ||
items: { | ||
question: string; | ||
answer: string; | ||
}[]; | ||
} | ||
const { title, subtitle, align = "center", items } = Astro.props as Props; | ||
--- | ||
|
||
<Container title={title} subtitle={subtitle} align={align}> | ||
{ | ||
items.map((item, index) => ( | ||
<div class="collapse"> | ||
<input type="radio" name={title} checked={index === 0} /> | ||
<h3 class="collapse-title font-medium">{item.question}</h3> | ||
<div class="collapse-content"> | ||
<RenderMarkdown content={item.answer} /> | ||
</div> | ||
</div> | ||
)) | ||
} | ||
</Container> | ||
|
||
<style> | ||
.collapse:has(input:checked) { | ||
@apply bg-white rounded-xl border-2 border-slate-200; | ||
} | ||
</style> |
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,15 @@ | ||
--- | ||
interface Props { | ||
title: string; | ||
description: string; | ||
} | ||
const { title, description } = Astro.props as Props; | ||
--- | ||
|
||
<div class="card h-full bg-white border-2 border-slate-200"> | ||
<div class="card-body p-6 items-center text-center"> | ||
<h3 class="text-balance !m-0">{title}</h3> | ||
<p class="m-0">{description}</p> | ||
</div> | ||
</div> |
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,19 @@ | ||
--- | ||
import Container from "@sections/Container.astro"; | ||
import Card from "@sections/Features/Card.astro"; | ||
interface Props { | ||
features: { | ||
title: string; | ||
description: string; | ||
}[]; | ||
} | ||
const { features } = Astro.props as Props; | ||
--- | ||
|
||
<Container title="Technologies Inside" subtitle="" align="center"> | ||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 items-center"> | ||
{features.map((feature) => <Card title={feature.title} description={feature.description} />)} | ||
</div> | ||
</Container> |
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,63 @@ | ||
--- | ||
interface Props { | ||
title?: string; | ||
description?: string; | ||
links?: { | ||
title: string; | ||
items: { | ||
text: string; | ||
href: string; | ||
}[]; | ||
}[]; | ||
copyright?: string; | ||
} | ||
const { | ||
title = "Freedom Stack", | ||
description = "A full-stack Astro starter kit that feels freeing and is free.", | ||
links = [ | ||
{ | ||
title: "Product", | ||
items: [ | ||
{ text: "Features", href: "#" }, | ||
{ text: "Documentation", href: "#" } | ||
] | ||
}, | ||
{ | ||
title: "Company", | ||
items: [ | ||
{ text: "About", href: "#" }, | ||
{ text: "Blog", href: "#" } | ||
] | ||
} | ||
], | ||
copyright = `© ${new Date().getFullYear()} Freedom Stack. All rights reserved.` | ||
} = Astro.props; | ||
--- | ||
|
||
<footer class="not-prose bg-slate-100"> | ||
<div class="footer py-16 px-6 container"> | ||
<div> | ||
<h2 class="text-xl font-bold">{title}</h2> | ||
<p class="text-balance max-w-xs">{description}</p> | ||
<p class="text-slate-500 mt-2">{copyright}</p> | ||
</div> | ||
|
||
{ | ||
links.map((section) => ( | ||
<div> | ||
<h3 class="footer-title m-0 font-normal text-slate-800 opacity-100">{section.title}</h3> | ||
<ul class="space-y-2"> | ||
{section.items.map((link) => ( | ||
<li> | ||
<a href={link.href} class="hover:underline hover:text-primary transition-colors"> | ||
{link.text} | ||
</a> | ||
</li> | ||
))} | ||
</ul> | ||
</div> | ||
)) | ||
} | ||
</div> | ||
</footer> |
Oops, something went wrong.