Skip to content

Commit 1f483cb

Browse files
authored
feat: add astro and tailwind (#1)
- Added Astro - Added Tailwind - Added first page tot test
1 parent a163ff0 commit 1f483cb

9 files changed

Lines changed: 148 additions & 0 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
dist/
3+
.astro/
4+
.env

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22.0.0

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,31 @@
11
# 2026.es.pycon.org
22
Pagina web para Pycon ES 2026
3+
4+
## Installation
5+
6+
```bash
7+
pnpm install
8+
```
9+
10+
## Development
11+
12+
```bash
13+
pnpm dev
14+
```
15+
16+
## Build
17+
18+
```bash
19+
pnpm build
20+
```
21+
22+
## Preview
23+
24+
```bash
25+
pnpm preview
26+
```
27+
28+
## Requirements
29+
30+
- Node.js v22.0.0 (see `.nvmrc`)
31+
- pnpm

astro.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { defineConfig } from "astro/config";
2+
3+
// https://astro.build/config
4+
export default defineConfig({});

package.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "2026.es.pycon.org",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"dev": "astro dev",
9+
"build": "astro build",
10+
"preview": "astro preview"
11+
},
12+
"keywords": [],
13+
"author": "",
14+
"license": "ISC",
15+
"packageManager": "pnpm@10.10.0",
16+
"dependencies": {
17+
"@tailwindcss/vite": "^4.1.18",
18+
"astro": "^5.16.8",
19+
"tailwindcss": "^4.1.18"
20+
}
21+
}

public/robots.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Example: Allow all bots to scan and index your site.
2+
# Full syntax: https://developers.google.com/search/docs/advanced/robots/create-robots-txt
3+
User-agent: *
4+
Allow: /

src/layouts/Layout.astro

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
// Import ClientRouter for smooth transitions (SPA feel) without React
3+
// Note: In Astro 4 it was called ViewTransitions, in Astro 5 Beta it's ClientRouter
4+
import { ClientRouter } from 'astro:transitions';
5+
6+
// 1. TypeScript: Define the Props this Layout will accept
7+
interface Props {
8+
title: string;
9+
description?: string; // Optional (?)
10+
}
11+
12+
// 2. Extract props with default values
13+
const {
14+
title,
15+
description = "Landing page created with Astro and Tailwind CSS"
16+
} = Astro.props;
17+
---
18+
19+
<!doctype html>
20+
<html lang="en">
21+
<head>
22+
<meta charset="UTF-8" />
23+
<meta name="description" content={description} />
24+
<meta name="viewport" content="width=device-width" />
25+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
26+
<meta name="generator" content={Astro.generator} />
27+
28+
<title>{title}</title>
29+
30+
<ClientRouter />
31+
</head>
32+
33+
<body class="bg-slate-900 text-white antialiased">
34+
<slot />
35+
</body>
36+
</html>
37+
38+
<style is:global>
39+
/* Global CSS styles (Vanilla CSS) */
40+
41+
:root {
42+
/* If you want to define native CSS variables */
43+
--accent: 136, 58, 234;
44+
}
45+
46+
html {
47+
font-family: system-ui, sans-serif;
48+
scroll-behavior: smooth; /* Smooth scroll when navigating by anchors (#) */
49+
}
50+
51+
/* Scrollbar customization (optional, Midudev style) */
52+
::-webkit-scrollbar {
53+
width: 10px;
54+
}
55+
::-webkit-scrollbar-track {
56+
background: #0f172a;
57+
}
58+
::-webkit-scrollbar-thumb {
59+
background: #334155;
60+
border-radius: 5px;
61+
}
62+
::-webkit-scrollbar-thumb:hover {
63+
background: #475569;
64+
}
65+
</style>

src/pages/index.astro

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
import Layout from '../layouts/Layout.astro';
3+
---
4+
5+
<Layout
6+
title="PyCon 2026"
7+
description="PyCon conference 2026"
8+
>
9+
<main class="container mx-auto px-4 py-10">
10+
<h1 class="text-5xl font-bold text-center mb-6">
11+
PyConf 2026
12+
</h1>
13+
<p class="text-center text-slate-300 text-xl">
14+
made with Astro 🚀
15+
</p>
16+
</main>
17+
</Layout>

tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "astro/tsconfigs/base"
3+
}

0 commit comments

Comments
 (0)