Skip to content

Commit 478909b

Browse files
committed
islas ok
1 parent 33cae2a commit 478909b

33 files changed

Lines changed: 642 additions & 0 deletions
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check out the code
18+
uses: actions/checkout@v3
19+
20+
- name: Set up Node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: 20
24+
25+
- name: Install dependencies
26+
run: npm install
27+
28+
- name: Build the project
29+
run: npm run build
30+
31+
- name: Upload to GitHub Pages
32+
uses: actions/upload-pages-artifact@v1
33+
with:
34+
path: ./dist
35+
36+
deploy:
37+
needs: build
38+
runs-on: ubuntu-latest
39+
permissions:
40+
pages: write
41+
id-token: write
42+
steps:
43+
- name: Deploy to GitHub Pages
44+
uses: actions/deploy-pages@v1
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# build output
2+
dist/
3+
# generated types
4+
.astro/
5+
6+
# dependencies
7+
node_modules/
8+
9+
# logs
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
pnpm-debug.log*
14+
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
20+
# macOS-specific files
21+
.DS_Store
22+
23+
# jetbrains setting folder
24+
.idea/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
plugins: [require("prettier-plugin-astro")],
3+
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"plugins": ["prettier-plugin-astro"],
3+
"overrides": [
4+
{
5+
"files": "*.astro",
6+
"options": {
7+
"parser": "astro"
8+
}
9+
}
10+
]
11+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// @ts-check
2+
import { defineConfig } from 'astro/config';
3+
4+
import preact from '@astrojs/preact';
5+
6+
// https://astro.build/config
7+
export default defineConfig({
8+
integrations: [preact()]
9+
});
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "ejemplo",
3+
"type": "module",
4+
"version": "0.0.1",
5+
"scripts": {
6+
"dev": "astro dev",
7+
"start": "astro dev",
8+
"build": "astro check && astro build",
9+
"preview": "astro preview",
10+
"astro": "astro"
11+
},
12+
"dependencies": {
13+
"@astrojs/check": "^0.9.4",
14+
"@astrojs/preact": "^3.5.4",
15+
"astro": "^4.16.13",
16+
"preact": "^10.25.0",
17+
"typescript": "^5.6.3"
18+
},
19+
"devDependencies": {
20+
"prettier-plugin-astro": "^0.14.1"
21+
}
22+
}
Lines changed: 9 additions & 0 deletions
Loading
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
import Social from "./social.astro";
3+
---
4+
5+
<footer>
6+
<Social platform="twitter" username="lemoncoders" />
7+
<Social platform="github" username="lemoncode" />
8+
<Social platform="youtube" username="lemoncoders" />
9+
</footer>
10+
11+
<style>
12+
footer {
13+
display: flex;
14+
gap: 1rem;
15+
margin-top: 2rem;
16+
}
17+
</style>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import type { FunctionComponent, h } from "preact";
2+
import { useState } from "preact/hooks";
3+
4+
interface GreetingProps {
5+
messages: string[];
6+
}
7+
8+
const Greeting: FunctionComponent<GreetingProps> = ({ messages }) => {
9+
const randomMessage = (): string =>
10+
messages[Math.floor(Math.random() * messages.length)];
11+
12+
const [greeting, setGreeting] = useState<string>(messages[0]);
13+
14+
return (
15+
<div>
16+
<h3>{greeting}! Thank you for visiting!</h3>
17+
<button onClick={() => setGreeting(randomMessage())}>New Greeting</button>
18+
</div>
19+
);
20+
};
21+
22+
export default Greeting;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
3+
---
4+
5+
<div class="hamburger">
6+
<span class="line"></span>
7+
<span class="line"></span>
8+
<span class="line"></span>
9+
</div>

0 commit comments

Comments
 (0)