Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
anattolia authored Jan 19, 2024
0 parents commit 70f4eaf
Show file tree
Hide file tree
Showing 22 changed files with 4,039 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/estilo-codigo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Estilo Código

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
ci:
runs-on: ubuntu-latest

steps:
- name: 🐯 Obtener código del repositorio
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: 🐝 Usar Node
uses: actions/setup-node@v3
with:
node-version: 'lts/*'

- name: 🦒 Instalar dependencias
run: |
yarn install --frozen-lockfile
- name: 👀 Buscar errores
run: yarn lint
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# build output
dist/

# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# environment variables
.env
.env.production

# macOS-specific files
.DS_Store
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
publico
estaticos
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"singleQuote": true,
"printWidth": 120,
"tabWidth": 2,
"endOfLine": "auto",
"trailingComma": "es5"
}
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Plantilla Astro

![Estilo Código](https://github.com/enflujo/enflujo-plantilla-astro/actions/workflows/estilo-codigo.yml/badge.svg)
![Tamaño](https://img.shields.io/github/repo-size/enflujo/enflujo-plantilla-astro?color=%235757f7&label=Tama%C3%B1o%20repo&logo=open-access&logoColor=white)
![Licencia](https://img.shields.io/github/license/enflujo/enflujo-plantilla-astro?label=Licencia&logo=open-source-initiative&logoColor=white)
12 changes: 12 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from 'astro/config';

export default defineConfig({
publicDir: './estaticos',
compressHTML: true,
outDir: './publico',
site: 'https://enflujo.com',
base: '/',
build: {
assets: 'estaticos',
},
});
Binary file added estaticos/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added estaticos/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions estaticos/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added estaticos/imagen_OG.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "enflujo-plantilla-astro",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro",
"lint": "prettier --check .",
"lint:fix": "prettier --write --list-different ."
},
"dependencies": {
"@astrojs/check": "^0.3.1",
"astro": "^3.6.0",
"typescript": "^5.3.2"
},
"devDependencies": {
"prettier": "^3.1.0",
"sass": "^1.69.5"
}
}
9 changes: 9 additions & 0 deletions public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/componentes/EjemploCoponente.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
interface Props {
titulo: string;
contenido: string;
}
const { titulo, contenido } = Astro.props;
---

<section>
<h2>{titulo}</h2>
<p>{contenido}</p>
</section>

<style lang="scss"></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" />
14 changes: 14 additions & 0 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
import EjemploCoponente from '@/componentes/EjemploCoponente.astro';
import Plantilla from '@/plantillas/Plantilla.astro';
---

<Plantilla>
<main>
<h1>..:: Plantilla EnFlujo - Astro ::..</h1>

<EjemploCoponente titulo="Una base para empezar a usar Astro" contenido="¬ | ¬" />
</main>
</Plantilla>

<style lang="scss"></style>
64 changes: 64 additions & 0 deletions src/plantillas/Plantilla.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
interface Props {
titulo?: string;
descripcion?: string;
imagen?: { ruta: string; alt: string };
}
const { titulo, descripcion, imagen } = Astro.props;
const nombreProyecto = 'EnFlujo';
const descripcionGeneral = 'Este proyecto...';
const { pathname } = Astro.url;
const tituloSEO = titulo ? `${titulo} | ${nombreProyecto}` : nombreProyecto;
const descripcionSEO = descripcion || descripcionGeneral;
const urlBase = new URL(import.meta.env.BASE_URL, Astro.site);
const urlPagina = new URL(pathname, Astro.site);
const rutaImg = imagen ? new URL(imagen.ruta, urlBase) : new URL('imagen_OG.webp', urlBase);
const altImg = imagen ? imagen.alt : nombreProyecto;
---

<!doctype html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta name="description" content="Descripción de la página" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" href={new URL('favicon.ico', urlBase)} sizes="32x32" />
<link rel="icon" href={new URL('favicon.svg', urlBase)} type="image/svg+xml" />
<link rel="apple-touch-icon" href={new URL('apple-touch-icon.png', urlBase)} />
<meta name="generator" content={Astro.generator} />
<link rel="canonical" href={urlPagina} />

<title>{tituloSEO}</title>
<meta name="description" content="Descripción del sitio...." />
<!-- OpenGraph -->
<meta property="og:locale" content="es_CO" />
<meta property="og:site_name" content={nombreProyecto} />
<meta property="og:type" content="website" />
<meta property="og:url" content={urlPagina} />
<meta property="og:title" content={tituloSEO} />
<meta property="og:description" content={descripcionSEO} />
<meta property="og:image" content={rutaImg} />
<meta property="og:image:alt" content={altImg} />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@labenflujo" />
<meta name="twitter:creator" content="@labenflujo" />
<meta name="twitter:url" content={urlPagina} />
<meta name="twitter:title" content={tituloSEO} />
<meta name="twitter:description" content={descripcionSEO} />
<meta name="twitter:image" content={rutaImg} />
<meta name="twitter:image:alt" content={altImg} />
</head>

<body>
<slot />
</body>
</html>

<style lang="scss" is:global>
@import '@/scss/estilos.scss';
</style>
21 changes: 21 additions & 0 deletions src/scss/_normalizar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
html {
box-sizing: border-box;
height: 100%;
}

*,
*:before,
*:after {
box-sizing: inherit;
}

html,
body {
margin: 0;
padding: 0;
}

a,
a:link {
text-decoration: none;
}
5 changes: 5 additions & 0 deletions src/scss/estilos.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import './normalizar';

:root {
--colorFuente: #252424;
}
Empty file added src/utilidades/constantes.ts
Empty file.
9 changes: 9 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "astro/tsconfigs/strict",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}
Loading

0 comments on commit 70f4eaf

Please sign in to comment.