Skip to content

Commit

Permalink
new landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
KMKoushik committed Oct 19, 2024
1 parent 4bd473b commit d575716
Show file tree
Hide file tree
Showing 12 changed files with 258 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
24 changes: 24 additions & 0 deletions apps/landing/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# build output
dist/

# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

# jetbrains setting folder
.idea/
54 changes: 54 additions & 0 deletions apps/landing/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Astro Starter Kit: Basics

```sh
npm create astro@latest -- --template basics
```

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/basics)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/basics/devcontainer.json)

> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
![just-the-basics](https://github.com/withastro/astro/assets/2244813/a0a5533c-a856-4198-8470-2d67b1d7c554)

## 🚀 Project Structure

Inside of your Astro project, you'll see the following folders and files:

```text
/
├── public/
│ └── favicon.svg
├── src/
│ ├── components/
│ │ └── Card.astro
│ ├── layouts/
│ │ └── Layout.astro
│ └── pages/
│ └── index.astro
└── package.json
```

Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.

There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.

Any static assets, like images, can be placed in the `public/` directory.

## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |

## 👀 Want to learn more?

Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
9 changes: 9 additions & 0 deletions apps/landing/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// @ts-check
import { defineConfig } from 'astro/config';

import tailwind from '@astrojs/tailwind';

// https://astro.build/config
export default defineConfig({
integrations: [tailwind()]
});
20 changes: 20 additions & 0 deletions apps/landing/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "landing",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/tailwind": "^5.1.2",
"@unsend/tailwind-config": "workspace:*",
"astro": "^4.16.5",
"tailwindcss": "^3.4.14",
"typescript": "^5.6.3"
}
}
Binary file added apps/landing/public/favicon.ico
Binary file not shown.
61 changes: 61 additions & 0 deletions apps/landing/src/components/Card.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
interface Props {
title: string;
body: string;
href: string;
}
const { href, title, body } = Astro.props;
---

<li class="link-card">
<a href={href}>
<h2>
{title}
<span>&rarr;</span>
</h2>
<p>
{body}
</p>
</a>
</li>
<style>
.link-card {
list-style: none;
display: flex;
padding: 1px;
background-color: #23262d;
background-image: none;
background-size: 400%;
border-radius: 7px;
background-position: 100%;
transition: background-position 0.6s cubic-bezier(0.22, 1, 0.36, 1);
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.link-card > a {
width: 100%;
text-decoration: none;
line-height: 1.4;
padding: calc(1.5rem - 1px);
border-radius: 8px;
color: white;
background-color: #23262d;
opacity: 0.8;
}
h2 {
margin: 0;
font-size: 1.25rem;
transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
p {
margin-top: 0.5rem;
margin-bottom: 0;
}
.link-card:is(:hover, :focus-within) {
background-position: 0;
background-image: var(--accent-gradient);
}
.link-card:is(:hover, :focus-within) h2 {
color: rgb(var(--accent-light));
}
</style>
1 change: 1 addition & 0 deletions apps/landing/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference path="../.astro/types.d.ts" />
41 changes: 41 additions & 0 deletions apps/landing/src/layouts/Layout.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
interface Props {
title: string;
}
const { title } = Astro.props;
---

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="description" content="Astro description" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<meta name="generator" content={Astro.generator} />
<title>{title}</title>
</head>
<body>
<header
class="max-w-5xl mx-auto py-4 px-4 sm:px-6 lg:px-8 flex justify-between items-center"
>
<h1 class="text-2xl font-bold">Unsend</h1>
<nav>
<ul class="flex gap-6">
<li><a href="https://docs.unsend.dev" target="_blank">Docs</a></li>
<li>
<a href="https://github.com/unsend-dev/unsend" target="_blank"
>Github</a>
</li>
<li>
<a href="https://discord.gg/unsend" target="_blank">Discord</a>
</li>
</ul>
</nav>
</header>
<main class="max-w-5xl mx-auto py-4 px-4 sm:px-6 lg:px-8">
<slot />
</main>
</body>
</html>
36 changes: 36 additions & 0 deletions apps/landing/src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
import Layout from "../layouts/Layout.astro";
import Card from "../components/Card.astro";
---

<Layout title="Unsend">
<div class="mt-12">
<h1 class="text-4xl font-bold leading-[3rem] text-balance">
Open source sending infrastructure <br />
for your business
</h1>
<h2 class="text-xl text-neutral-500 mt-4 max-w-2xl text-balance">
Unsend is the most affordable way to send your transactional, marketing
emails, product updates, newsletters, and more.
</h2>
</div>

<div class="mt-12 flex gap-6">
<a
href="mailto:[email protected]?subject=Join%20unsend%20waitlist&body=hey,%20i%20would%20like%20to%20join%20unsend%20waitlist"
class="bg-black text-white px-4 py-2 rounded-md"
>
Join waitlist
</a>

<button class="bg-white text-black border px-4 py-2 rounded-md">
Star on Github
</button>
</div>

<div class="mt-20">
<video
src="https://unsend.dev/hero.mp4"
class="w-full h-full border rounded-xl shadow-lg"></video>
</div>
</Layout>
5 changes: 5 additions & 0 deletions apps/landing/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { type Config } from "tailwindcss";

export default {
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
} satisfies Config;
3 changes: 3 additions & 0 deletions apps/landing/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "astro/tsconfigs/strict"
}

0 comments on commit d575716

Please sign in to comment.