🎉 Inits repo
This commit is contained in:
parent
faf1816b68
commit
b8c658374f
@ -1,4 +1,9 @@
|
|||||||
import { defineConfig } from 'astro/config';
|
import { defineConfig } from 'astro/config';
|
||||||
|
import vue from "@astrojs/vue";
|
||||||
|
|
||||||
|
import tailwind from "@astrojs/tailwind";
|
||||||
|
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
export default defineConfig({});
|
export default defineConfig({
|
||||||
|
integrations: [vue(), tailwind()]
|
||||||
|
});
|
846
package-lock.json
generated
846
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -10,6 +10,10 @@
|
|||||||
"astro": "astro"
|
"astro": "astro"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,63 +1,64 @@
|
|||||||
---
|
---
|
||||||
export interface Props {
|
export interface Props {
|
||||||
title: string;
|
title: string;
|
||||||
body: string;
|
body: string;
|
||||||
href: string;
|
href: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { href, title, body } = Astro.props;
|
const { href, title, body } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<li class="link-card">
|
<li class="link-card">
|
||||||
<a href={href}>
|
<a href={href}>
|
||||||
<h2>
|
<h2>
|
||||||
{title}
|
{title}
|
||||||
<span>→</span>
|
<span>→</span>
|
||||||
</h2>
|
</h2>
|
||||||
<p>
|
<p>
|
||||||
{body}
|
{body}
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<style>
|
<style>
|
||||||
.link-card {
|
.link-card {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 0.25rem;
|
padding: 0.25rem;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
background-size: 400%;
|
background-size: 400%;
|
||||||
border-radius: 0.6rem;
|
border-radius: 0.6rem;
|
||||||
background-position: 100%;
|
background-position: 100%;
|
||||||
transition: background-position 0.6s cubic-bezier(0.22, 1, 0.36, 1);
|
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 {
|
.link-card > a {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
padding: 1rem 1.3rem;
|
padding: 1rem 1.3rem;
|
||||||
border-radius: 0.35rem;
|
border-radius: 0.35rem;
|
||||||
color: #111;
|
color: #111;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
h2 {
|
h2 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
|
transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
|
||||||
}
|
}
|
||||||
p {
|
p {
|
||||||
margin-top: 0.5rem;
|
margin-top: 0.5rem;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
color: #444;
|
color: #444;
|
||||||
}
|
}
|
||||||
.link-card:is(:hover, :focus-within) {
|
.link-card:is(:hover, :focus-within) {
|
||||||
background-position: 0;
|
background-position: 0;
|
||||||
background-image: var(--accent-gradient);
|
background-image: var(--accent-gradient);
|
||||||
}
|
}
|
||||||
.link-card:is(:hover, :focus-within) h2 {
|
.link-card:is(:hover, :focus-within) h2 {
|
||||||
color: rgb(var(--accent));
|
color: rgb(var(--accent));
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
12
src/components/TestComp.vue
Normal file
12
src/components/TestComp.vue
Normal 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>
|
@ -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
43
src/layouts/Page.astro
Normal 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>
|
@ -1,81 +1,82 @@
|
|||||||
---
|
---
|
||||||
import Layout from '../layouts/Layout.astro';
|
import Page from "../layouts/Page.astro";
|
||||||
import Card from '../components/Card.astro';
|
import Card from "../components/Card.astro";
|
||||||
|
import TestComp from "../components/TestComp.vue";
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout title="Welcome to Astro.">
|
<Page title="Index">
|
||||||
<main>
|
<TestComp client:load />
|
||||||
<h1>Welcome to <span class="text-gradient">Astro</span></h1>
|
<!-- <h1>Welcome to <span class="text-gradient">Astro</span></h1>
|
||||||
<p class="instructions">
|
<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>
|
<strong>Code Challenge:</strong> Tweak the "Welcome to Astro" message above.
|
||||||
<ul role="list" class="link-card-grid">
|
</p>
|
||||||
<Card
|
<ul role="list" class="link-card-grid">
|
||||||
href="https://docs.astro.build/"
|
<Card
|
||||||
title="Documentation"
|
href="https://docs.astro.build/"
|
||||||
body="Learn how Astro works and explore the official API docs."
|
title="Documentation"
|
||||||
/>
|
body="Learn how Astro works and explore the official API docs."
|
||||||
<Card
|
/>
|
||||||
href="https://astro.build/integrations/"
|
<Card
|
||||||
title="Integrations"
|
href="https://astro.build/integrations/"
|
||||||
body="Supercharge your project with new frameworks and libraries."
|
title="Integrations"
|
||||||
/>
|
body="Supercharge your project with new frameworks and libraries."
|
||||||
<Card
|
/>
|
||||||
href="https://astro.build/themes/"
|
<Card
|
||||||
title="Themes"
|
href="https://astro.build/themes/"
|
||||||
body="Explore a galaxy of community-built starter themes."
|
title="Themes"
|
||||||
/>
|
body="Explore a galaxy of community-built starter themes."
|
||||||
<Card
|
/>
|
||||||
href="https://astro.build/chat/"
|
<Card
|
||||||
title="Community"
|
href="https://astro.build/chat/"
|
||||||
body="Come say hi to our amazing Discord community. ❤️"
|
title="Community"
|
||||||
/>
|
body="Come say hi to our amazing Discord community. ❤️"
|
||||||
</ul>
|
/>
|
||||||
</main>
|
</ul> -->
|
||||||
</Layout>
|
</Page>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
main {
|
main {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
padding: 1.5rem;
|
padding: 1.5rem;
|
||||||
max-width: 60ch;
|
max-width: 60ch;
|
||||||
}
|
}
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 3rem;
|
font-size: 3rem;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
.text-gradient {
|
.text-gradient {
|
||||||
background-image: var(--accent-gradient);
|
background-image: var(--accent-gradient);
|
||||||
-webkit-background-clip: text;
|
-webkit-background-clip: text;
|
||||||
-webkit-text-fill-color: transparent;
|
-webkit-text-fill-color: transparent;
|
||||||
background-size: 400%;
|
background-size: 400%;
|
||||||
background-position: 0%;
|
background-position: 0%;
|
||||||
}
|
}
|
||||||
.instructions {
|
.instructions {
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
margin: 1rem 0;
|
margin: 1rem 0;
|
||||||
border: 1px solid rgba(var(--accent), 25%);
|
border: 1px solid rgba(var(--accent), 25%);
|
||||||
background-color: white;
|
background-color: white;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
border-radius: 0.4rem;
|
border-radius: 0.4rem;
|
||||||
}
|
}
|
||||||
.instructions code {
|
.instructions code {
|
||||||
font-size: 0.875em;
|
font-size: 0.875em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
background: rgba(var(--accent), 12%);
|
background: rgba(var(--accent), 12%);
|
||||||
color: rgb(var(--accent));
|
color: rgb(var(--accent));
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
padding: 0.3em 0.45em;
|
padding: 0.3em 0.45em;
|
||||||
}
|
}
|
||||||
.instructions strong {
|
.instructions strong {
|
||||||
color: rgb(var(--accent));
|
color: rgb(var(--accent));
|
||||||
}
|
}
|
||||||
.link-card-grid {
|
.link-card-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr));
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
7
src/pages/test1.astro
Normal file
7
src/pages/test1.astro
Normal 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
15
tailwind.config.cjs
Normal 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: [],
|
||||||
|
};
|
@ -1,3 +1,6 @@
|
|||||||
{
|
{
|
||||||
"extends": "astro/tsconfigs/strict"
|
"extends": "astro/tsconfigs/strict",
|
||||||
|
"compilerOptions": {
|
||||||
|
"jsx": "preserve"
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user