Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

chore: convert to astro #11

Merged
merged 12 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .husky/pre-commit
taciturnaxolotl marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

9 changes: 3 additions & 6 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"endOfLine": "lf",
"trailingComma": "none",
"plugins": [""],
"pluginSearchDirs": ["."],
"overrides": []
}
"tabWidth": 2,
"useTabs": false
}
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Astro Starter Kit: Basics
taciturnaxolotl marked this conversation as resolved.
Show resolved Hide resolved

[![Netlify Status](https://api.netlify.com/api/v1/badges/405c64d7-3e5c-41c6-8577-13298a2edcf7/deploy-status?branch=main)](https://app.netlify.com/sites/chimerical-fox-6d9845/deploys)

```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).
4 changes: 4 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { defineConfig } from 'astro/config';

// https://astro.build/config
export default defineConfig({});
3 changes: 3 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build]
command = "npm run build"
publish = "dist"
30 changes: 11 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
{
"name": "thepurplebubble-site",
"version": "1.0.0",
"private": true,
taciturnaxolotl marked this conversation as resolved.
Show resolved Hide resolved
"dependencies": {
"@lottiefiles/lottie-player": "1.5.7",
"parcel": "^2.10.3"
},
"name": "",
taciturnaxolotl marked this conversation as resolved.
Show resolved Hide resolved
"type": "module",
"version": "0.0.1",
"scripts": {
"prepare": "husky install"
taciturnaxolotl marked this conversation as resolved.
Show resolved Hide resolved
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
},
"devDependencies": {
"eslint": "^8.55.0",
"eslint-config-prettier": "^9.1.0",
"husky": "^8.0.3",
"lint-staged": "^15.2.0",
"prettier": "3.1.1",
"prettier-eslint": "^16.1.2"
},
"lint-staged": {
"**/*": "prettier --write --ignore-unknown"
"dependencies": {
"astro": "^4.0.4"
}
}
taciturnaxolotl marked this conversation as resolved.
Show resolved Hide resolved
}
61 changes: 61 additions & 0 deletions 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 src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="astro/client" />
140 changes: 140 additions & 0 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
---
interface Props {
title: string;
}

const { title } = Astro.props;
---

<!doctype html>
<html lang="en">
<head>
<meta name="description" content="We're high schoolers across the world building something new. A brand new alternative to both iMessage and RCS. Coming Soon!" />
<meta property="og:title" content="The Purple Bubble" />
<meta property="og:description" content="We're high schoolers across the world building something new. A brand new alternative to both iMessage and RCS. Coming Soon!" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8" />
<meta property="twitter:card" content="summary_large_image" />

<link rel="shortcut icon" href="public/favicon.png" type="icon/png" sizes="32x32" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&amp;display=swap" data-tag="font" />
<link rel="stylesheet" href="https://unpkg.com/@teleporthq/teleport-custom-scripts/dist/style.css" />

<title>{title}</title>
</head>
<body>
<slot />
</body>
</html>
<style is:global>
html {
font-family: Inter;
font-size: 16px;
}

body {
font-weight: 400;
font-style: normal;
text-decoration: none;
text-transform: none;
letter-spacing: normal;
line-height: 1.15;
color: var(--dl-color-gray-black);
background-color: var(--dl-color-gray-white);

}
</style>

<style is:global>
html {
line-height: 1.15;
}

body {
margin: 0;
}

* {
box-sizing: border-box;
border-width: 0;
border-style: solid;
}

p,
li,
ul,
pre,
div,
h1,
h2,
h3,
h4,
h5,
h6,
figure,
blockquote,
figcaption {
margin: 0;
padding: 0;
}

button {
background-color: transparent;
}

button,
input,
optgroup,
select,
textarea {
font-family: inherit;
font-size: 100%;
line-height: 1.15;
margin: 0;
}

button,
select {
text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
appearance: button;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}

button:-moz-focus,
[type="button"]:-moz-focus,
[type="reset"]:-moz-focus,
[type="submit"]:-moz-focus {
outline: 1px dotted ButtonText;
}

a {
color: inherit;
text-decoration: inherit;
}

input {
padding: 2px 4px;
}

img {
display: block;
}

html {
scroll-behavior: smooth
}
</style>
File renamed without changes.
Loading