🎉 Inits repo

This commit is contained in:
Daniel Svitan 2023-05-16 16:02:07 -07:00
parent faf1816b68
commit b8c658374f
11 changed files with 1066 additions and 166 deletions

View File

@ -1,4 +1,9 @@
import { defineConfig } from 'astro/config';
import vue from "@astrojs/vue";
import tailwind from "@astrojs/tailwind";
// https://astro.build/config
export default defineConfig({});
export default defineConfig({
integrations: [vue(), tailwind()]
});

846
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,10 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.4.1"
"@astrojs/tailwind": "^3.1.2",
"@astrojs/vue": "^2.1.1",
"astro": "^2.4.5",
"tailwindcss": "^3.3.2",
"vue": "^3.3.2"
}
}

View File

@ -30,7 +30,8 @@ const { href, title, body } = Astro.props;
border-radius: 0.6rem;
background-position: 100%;
transition: background-position 0.6s cubic-bezier(0.22, 1, 0.36, 1);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
0 2px 4px -2px rgba(0, 0, 0, 0.1);
}
.link-card > a {

View File

@ -0,0 +1,12 @@
<template>
<div class="flex items-center justify-center flex-col w-page h-page gap-2">
<p class="text-blue-800">You clicked {{ count }} times</p>
<button @click="() => count++" class="text-2xl">+</button>
</div>
</template>
<script setup lang="ts">
import { ref } from "vue";
const count = ref(0);
</script>

View File

@ -1,35 +0,0 @@
---
export interface Props {
title: string;
}
const { title } = Astro.props;
---
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="generator" content={Astro.generator} />
<title>{title}</title>
</head>
<body>
<slot />
</body>
</html>
<style is:global>
:root {
--accent: 124, 58, 237;
--accent-gradient: linear-gradient(45deg, rgb(var(--accent)), #da62c4 30%, white 60%);
}
html {
font-family: system-ui, sans-serif;
background-color: #F6F6F6;
}
code {
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
Bitstream Vera Sans Mono, Courier New, monospace;
}
</style>

43
src/layouts/Page.astro Normal file
View File

@ -0,0 +1,43 @@
---
export interface Props {
title: string;
}
const { title } = Astro.props;
---
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="generator" content={Astro.generator} />
<title>{title}</title>
</head>
<body>
<main>
<slot />
</main>
</body>
</html>
<style is:global>
:root {
--accent: 124, 58, 237;
--accent-gradient: linear-gradient(
45deg,
rgb(var(--accent)),
#da62c4 30%,
white 60%
);
}
html {
font-family: system-ui, sans-serif;
background-color: #f6f6f6;
}
code {
font-family: Menlo, Monaco, Lucida Console, Liberation Mono,
DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace;
}
</style>

View File

@ -1,13 +1,15 @@
---
import Layout from '../layouts/Layout.astro';
import Card from '../components/Card.astro';
import Page from "../layouts/Page.astro";
import Card from "../components/Card.astro";
import TestComp from "../components/TestComp.vue";
---
<Layout title="Welcome to Astro.">
<main>
<h1>Welcome to <span class="text-gradient">Astro</span></h1>
<Page title="Index">
<TestComp client:load />
<!-- <h1>Welcome to <span class="text-gradient">Astro</span></h1>
<p class="instructions">
To get started, open the directory <code>src/pages</code> in your project.<br />
To get started, open the directory <code>src/pages</code> in your project.<br
/>
<strong>Code Challenge:</strong> Tweak the "Welcome to Astro" message above.
</p>
<ul role="list" class="link-card-grid">
@ -31,9 +33,8 @@ import Card from '../components/Card.astro';
title="Community"
body="Come say hi to our amazing Discord community. ❤️"
/>
</ul>
</main>
</Layout>
</ul> -->
</Page>
<style>
main {

7
src/pages/test1.astro Normal file
View File

@ -0,0 +1,7 @@
---
import Page from "../layouts/Page.astro";
---
<Page title="Test 1">
<p>This is test 1 (astro)</p>
</Page>

15
tailwind.config.cjs Normal file
View File

@ -0,0 +1,15 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
theme: {
extend: {
width: {
page: "100vw",
},
height: {
page: "100vh",
},
},
},
plugins: [],
};

View File

@ -1,3 +1,6 @@
{
"extends": "astro/tsconfigs/strict"
"extends": "astro/tsconfigs/strict",
"compilerOptions": {
"jsx": "preserve"
}
}