Skip to content

Commit

Permalink
feat: add waitlist template
Browse files Browse the repository at this point in the history
  • Loading branch information
ElianCodes authored and itsMapleLeaf committed Mar 5, 2024
1 parent 805548e commit ef2a34a
Show file tree
Hide file tree
Showing 30 changed files with 1,306 additions and 56 deletions.
823 changes: 767 additions & 56 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions templates/studio-template-waitlist/.github/workflows/studio.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Astro Studio

env:
ASTRO_STUDIO_PROJECT_ID: ${{ secrets.ASTRO_STUDIO_PROJECT_ID }}
ASTRO_STUDIO_APP_TOKEN: ${{secrets.ASTRO_STUDIO_APP_TOKEN }}

on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]

jobs:
Sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- uses: withastro/action-studio@main
23 changes: 23 additions & 0 deletions templates/studio-template-waitlist/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 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

.vercel/
4 changes: 4 additions & 0 deletions templates/studio-template-waitlist/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions templates/studio-template-waitlist/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
47 changes: 47 additions & 0 deletions templates/studio-template-waitlist/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Astro Starter Kit: Minimal

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

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

> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
## 🚀 Project Structure

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

```text
/
├── public/
├── src/
│ └── 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).
15 changes: 15 additions & 0 deletions templates/studio-template-waitlist/astro.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
import node from "@astrojs/node";
import db from "@astrojs/db";

export default defineConfig({
integrations: [
db(),
tailwind({
nesting: true,
}),
],
output: "server",
adapter: node({ mode: "standalone" }),
});
7 changes: 7 additions & 0 deletions templates/studio-template-waitlist/db/collections.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineTable, column } from "astro:db";

export const Signup = defineTable({
columns: {
email: column.text({ unique: true }),
},
});
8 changes: 8 additions & 0 deletions templates/studio-template-waitlist/db/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { defineDB } from "astro:db";
import { Signup } from "./collections";

export default defineDB({
tables: {
Signup,
},
});
9 changes: 9 additions & 0 deletions templates/studio-template-waitlist/db/seed.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { db, Signup } from "astro:db";

await db
.insert(Signup)
.values([
{ email: "[email protected]" },
{ email: "[email protected]" },
{ email: "[email protected]" },
]);
25 changes: 25 additions & 0 deletions templates/studio-template-waitlist/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "astro-waitlist-template",
"author": "ElianCodes",
"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.5.6",
"@astrojs/db": "^0.6.1",
"@astrojs/node": "^8.2.3",
"@astrojs/tailwind": "^5.1.0",
"astro": "^4.4.11",
"tailwindcss": "^3.4.1",
"typescript": "^5.3.3"
},
"devDependencies": {
"@types/node": "^20.11.17"
}
}
9 changes: 9 additions & 0 deletions templates/studio-template-waitlist/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
11 changes: 11 additions & 0 deletions templates/studio-template-waitlist/src/assets/BigCheck.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<svg
xmlns='http://www.w3.org/2000/svg'
width='96'
height='96'
viewBox='0 0 96 96'
fill='none'
>
<path
d='M87.1837 30.1837L39.1837 78.1837C38.7656 78.6032 38.2689 78.936 37.7219 79.1632C37.1749 79.3903 36.5885 79.5072 35.9962 79.5072C35.4039 79.5072 34.8175 79.3903 34.2705 79.1632C33.7235 78.936 33.2268 78.6032 32.8087 78.1837L11.8087 57.1837C11.3901 56.7651 11.0581 56.2681 10.8315 55.7212C10.605 55.1743 10.4884 54.5881 10.4884 53.9962C10.4884 53.4042 10.605 52.818 10.8315 52.2711C11.0581 51.7242 11.3901 51.2272 11.8087 50.8087C12.2273 50.3901 12.7242 50.058 13.2711 49.8315C13.8181 49.6049 14.4042 49.4883 14.9962 49.4883C15.5882 49.4883 16.1744 49.6049 16.7213 49.8315C17.2682 50.058 17.7651 50.3901 18.1837 50.8087L36 68.6249L80.8162 23.8162C81.6616 22.9708 82.8082 22.4958 84.0037 22.4958C85.1992 22.4958 86.3458 22.9708 87.1912 23.8162C88.0366 24.6615 88.5115 25.8081 88.5115 27.0037C88.5115 28.1992 88.0366 29.3458 87.1912 30.1912L87.1837 30.1837Z'
fill='#AF00CA'></path>
</svg>
12 changes: 12 additions & 0 deletions templates/studio-template-waitlist/src/assets/Discord.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<svg
xmlns='http://www.w3.org/2000/svg'
width='32'
height='32'
viewBox='0 0 32 32'
>
<path
fill-rule='evenodd'
clip-rule='evenodd'
d='M2.65396 5.27606C2 6.55953 2 8.23969 2 11.6V20.4C2 23.7603 2 25.4405 2.65396 26.7239C3.2292 27.8529 4.14708 28.7708 5.27606 29.346C6.55953 30 8.23969 30 11.6 30H20.4C23.7603 30 25.4405 30 26.7239 29.346C27.8529 28.7708 28.7708 27.8529 29.346 26.7239C30 25.4405 30 23.7603 30 20.4V11.6C30 8.23969 30 6.55953 29.346 5.27606C28.7708 4.14708 27.8529 3.2292 26.7239 2.65396C25.4405 2 23.7603 2 20.4 2H11.6C8.23969 2 6.55953 2 5.27606 2.65396C4.14708 3.2292 3.2292 4.14708 2.65396 5.27606ZM19.0275 8C20.945 8.10667 22.7615 8.74667 24.2752 10.0267C25.9908 13.44 26.8991 17.28 27 21.2267C25.4862 22.9333 23.367 24 21.1468 24C21.1468 24 20.4404 23.1467 19.9358 22.4C21.2477 22.08 22.4587 21.3333 23.2661 20.16L23.266 20.16C22.5596 20.5867 21.8532 21.0133 21.1468 21.3333C20.2385 21.76 19.3303 21.9733 18.422 22.1867L18.422 22.1867C17.6147 22.2933 16.8073 22.4 16 22.4C15.1927 22.4 14.3853 22.2933 13.578 22.1867L13.578 22.1867C12.6697 21.9733 11.7615 21.76 10.8532 21.3333C10.1468 21.0133 9.44039 20.5867 8.73398 20.16L8.73395 20.16C9.54128 21.3333 10.7523 22.08 12.0642 22.4C11.5596 23.1467 10.8532 24 10.8532 24C8.63303 24 6.51376 22.9333 5 21.2267C5.10092 17.28 6.00917 13.44 7.72477 10.0267C9.23853 8.74667 11.055 8.10667 12.9725 8L13.2752 8.32C11.5596 8.74667 10.0459 9.6 8.63303 10.7733C10.3486 9.81333 12.2661 9.17333 14.2844 8.96C14.8899 8.85333 15.3945 8.85333 16 8.85333C16.6055 8.85333 17.1101 8.85333 17.7156 8.96C19.7339 9.17333 21.6514 9.81333 23.367 10.7733C21.9541 9.6 20.4404 8.74667 18.7248 8.32L19.0275 8ZM10.7523 17.1733C10.7523 18.3467 11.6606 19.3067 12.6697 19.3067C13.6789 19.3067 14.5872 18.3467 14.5872 17.1733C14.5872 16 13.6789 15.04 12.6697 15.04C11.6606 15.04 10.7523 16 10.7523 17.1733ZM17.4128 17.1733C17.4128 18.3467 18.3211 19.3067 19.3303 19.3067C20.3394 19.3067 21.2477 18.3467 21.2477 17.1733C21.2477 16 20.3394 15.04 19.3303 15.04C18.3211 15.04 17.4128 16 17.4128 17.1733Z'
fill='currentColor'></path>
</svg>
10 changes: 10 additions & 0 deletions templates/studio-template-waitlist/src/assets/GitHub.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<svg
xmlns='http://www.w3.org/2000/svg'
width='32'
height='32'
viewBox='0 0 32 32'
>
<path
d='M16 2C8.265 2 2 8.265 2 16C2 22.195 6.0075 27.4275 11.5725 29.2825C12.2725 29.405 12.535 28.985 12.535 28.6175C12.535 28.285 12.5175 27.1825 12.5175 26.01C9 26.6575 8.09 25.1525 7.81 24.365C7.6525 23.9625 6.97 22.72 6.375 22.3875C5.885 22.125 5.185 21.4775 6.3575 21.46C7.46 21.4425 8.2475 22.475 8.51 22.895C9.77 25.0125 11.7825 24.4175 12.5875 24.05C12.71 23.14 13.0775 22.5275 13.48 22.1775C10.365 21.8275 7.11 20.62 7.11 15.265C7.11 13.7425 7.6525 12.4825 8.545 11.5025C8.405 11.1525 7.915 9.7175 8.685 7.7925C8.685 7.7925 9.8575 7.425 12.535 9.2275C13.655 8.9125 14.845 8.755 16.035 8.755C17.225 8.755 18.415 8.9125 19.535 9.2275C22.2125 7.4075 23.385 7.7925 23.385 7.7925C24.155 9.7175 23.665 11.1525 23.525 11.5025C24.4175 12.4825 24.96 13.725 24.96 15.265C24.96 20.6375 21.6875 21.8275 18.5725 22.1775C19.08 22.615 19.5175 23.455 19.5175 24.7675C19.5175 26.64 19.5 28.145 19.5 28.6175C19.5 28.985 19.7625 29.4225 20.4625 29.2825C23.2418 28.3443 25.6568 26.5581 27.3677 24.1753C29.0786 21.7926 29.9993 18.9334 30 16C30 8.265 23.735 2 16 2Z'
fill='currentColor'></path>
</svg>
10 changes: 10 additions & 0 deletions templates/studio-template-waitlist/src/assets/Mastodon.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<svg
xmlns='http://www.w3.org/2000/svg'
width='32'
height='32'
viewBox='0 0 32 32'
>
<path
d='M22.38 24.39C26.412 23.91 29.92 21.44 30.36 19.184C31.056 15.628 31 10.506 31 10.506C31 3.566 26.428 1.53 26.428 1.53C24.124 0.476 20.166 0.034 16.054 0H15.954C11.84 0.034 7.88402 0.476 5.58002 1.53C5.58002 1.53 1.01002 3.564 1.01002 10.506L1.00602 11.83C0.998019 13.11 0.992019 14.53 1.02802 16.012C1.19402 22.8 2.28002 29.492 8.58802 31.152C11.496 31.918 13.994 32.078 16.006 31.968C19.652 31.768 21.7 30.674 21.7 30.674L21.58 28.04C21.58 28.04 18.974 28.86 16.046 28.76C13.146 28.66 10.086 28.448 9.61602 24.904C9.57128 24.5752 9.54922 24.2438 9.55002 23.912C9.55002 23.912 12.398 24.604 16.006 24.768C18.212 24.868 20.28 24.64 22.382 24.39H22.38ZM25.606 19.45H22.26V11.29C22.26 9.572 21.532 8.7 20.078 8.7C18.47 8.7 17.664 9.734 17.664 11.782V16.248H14.336V11.78C14.336 9.732 13.53 8.698 11.922 8.698C10.468 8.698 9.74002 9.57 9.74002 11.29V19.448H6.39402V11.044C6.39402 9.326 6.83402 7.962 7.71402 6.952C8.62602 5.942 9.81802 5.424 11.3 5.424C13.012 5.424 14.308 6.08 15.166 7.39L16 8.78L16.834 7.39C17.692 6.08 18.988 5.424 20.702 5.424C22.182 5.424 23.374 5.942 24.284 6.952C25.168 7.962 25.606 9.326 25.606 11.044V19.45Z'
fill='currentColor'></path>
</svg>
27 changes: 27 additions & 0 deletions templates/studio-template-waitlist/src/assets/logo.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<svg
width='20'
height='20'
viewBox='0 0 20 20'
fill='none'
xmlns='http://www.w3.org/2000/svg'
>
<rect width='20' height='20' rx='10' fill='#FA0DFF'></rect>
<rect width='20' height='20' rx='10' fill='url(#paint0_linear_40_10279)'
></rect>
<path
d='M14.8979 7.77299L8.89795 13.773C8.84569 13.8254 8.78359 13.867 8.71522 13.8954C8.64685 13.9238 8.57354 13.9384 8.49951 13.9384C8.42548 13.9384 8.35217 13.9238 8.2838 13.8954C8.21543 13.867 8.15333 13.8254 8.10107 13.773L5.47607 11.148C5.42375 11.0957 5.38224 11.0335 5.35393 10.9652C5.32561 10.8968 5.31104 10.8235 5.31104 10.7496C5.31104 10.6756 5.32561 10.6023 5.35393 10.5339C5.38224 10.4656 5.42375 10.4034 5.47607 10.3511C5.5284 10.2988 5.59051 10.2573 5.65888 10.229C5.72724 10.2006 5.80051 10.1861 5.87451 10.1861C5.94851 10.1861 6.02178 10.2006 6.09014 10.229C6.15851 10.2573 6.22062 10.2988 6.27295 10.3511L8.49998 12.5781L14.102 6.97705C14.2077 6.87138 14.351 6.81201 14.5004 6.81201C14.6499 6.81201 14.7932 6.87138 14.8989 6.97705C15.0046 7.08272 15.0639 7.22604 15.0639 7.37549C15.0639 7.52493 15.0046 7.66825 14.8989 7.77393L14.8979 7.77299Z'
fill='white'></path>
<defs>
<linearGradient
id='paint0_linear_40_10279'
x1='10'
y1='0'
x2='10'
y2='20'
gradientUnits='userSpaceOnUse'
>
<stop stop-color='#AF00CA'></stop>
<stop offset='1' stop-color='#CF3F7E'></stop>
</linearGradient>
</defs>
</svg>
19 changes: 19 additions & 0 deletions templates/studio-template-waitlist/src/assets/x.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<svg
width='32'
height='32'
viewBox='0 0 32 32'
xmlns='http://www.w3.org/2000/svg'
>
<mask id='path-3-inside-1_0_1'>
<path d='M-944 -40H176V32H-944V-40Z'></path>
</mask>
<path d='M-944 -39H176V-41H-944V-39Z' mask='url(#path-3-inside-1_0_1)'></path>
<g id='social'>
<g id='Frame'>
<path
id='Vector'
d='M24.3253 3H28.736L19.1 14.0133L30.436 29H21.56L14.608 19.9107L6.65333 29H2.24L12.5467 17.22L1.672 3H10.7733L17.0573 11.308L24.3253 3ZM22.7773 26.36H25.2213L9.44533 5.50133H6.82266L22.7773 26.36Z'
fill='currentColor'></path>
</g>
</g>
</svg>
24 changes: 24 additions & 0 deletions templates/studio-template-waitlist/src/components/Footer.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
import X from '@assets/x.astro';
import Discord from '@assets/Discord.astro';
import GitHub from '@assets/GitHub.astro';
import Mastodon from '@assets/Mastodon.astro';
---

<footer class='flex flex-col'>
<hr class='border-gray-100 dark:border-[#27293A]' />
<div class='flex justify-center md:justify-end gap-4 my-10'>
<a href='https://twitter.com/astrodotbuild'>
<X />
</a>
<a href='https://astro.build/chat'>
<Discord />
</a>
<a href='https://github.com/withastro'>
<GitHub />
</a>
<a href='https://m.webtoo.ls/@astro'>
<Mastodon />
</a>
</div>
</footer>
18 changes: 18 additions & 0 deletions templates/studio-template-waitlist/src/components/Header.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
import Logo from './Logo.astro';
---

<header class='flex justify-between m-10'>
<a href='/'><Logo /></a>
<!-- Enable navigation -->
<!-- <nav>
<ul class='flex gap-6 dark:text-[#E1E2EB]'>
<li>
<a href='/about'>About us</a>
</li>
<li>
<a href='/careers'>Careers</a>
</li>
</ul>
</nav> -->
</header>
8 changes: 8 additions & 0 deletions templates/studio-template-waitlist/src/components/Logo.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
import LogoIcon from '@assets/logo.astro';
---

<div class='flex text-[#2A0050] dark:text-white gap-1 items-center'>
<LogoIcon />
Taskerly
</div>
3 changes: 3 additions & 0 deletions templates/studio-template-waitlist/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/// <reference path="../.astro/db-types.d.ts" />
/// <reference path="../.astro/types.d.ts" />
/// <reference types="astro/client" />
36 changes: 36 additions & 0 deletions templates/studio-template-waitlist/src/layouts/Default.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
import '../styles/global.css';
import Header from '@components/Header.astro';
import Footer from '@components/Footer.astro';
---

<html lang='en'>
<head>
<meta charset='utf-8' />
<link rel='icon' type='image/svg+xml' href='/favicon.svg' />
<meta name='viewport' content='width=device-width' />
<meta name='generator' content={Astro.generator} />
<title>Astro</title>
</head>
<body class='mx-6 md:mx-auto max-w-screen-lg'>
<Header />
<main>
<slot />
</main>
<Footer />
</body>
</html>

<script is:inline>
const setTheme = () => {
if (!window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.classList.remove('dark');
} else {
document.documentElement.classList.add('dark');
}
};
setTheme();
window
.matchMedia('(prefers-color-scheme: dark)')
.addEventListener('change', () => setTheme());
</script>
Loading

0 comments on commit ef2a34a

Please sign in to comment.