Skip to content

Commit

Permalink
add github action and add many other changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorge committed Nov 23, 2023
1 parent b242e44 commit 80cd3be
Show file tree
Hide file tree
Showing 12 changed files with 124 additions and 54 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy to GitHub Pages

on:
# Trigger the workflow every time you push to the `main` branch
# Using a different branch name? Replace `main` with your branch’s name
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:

# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v3
- name: Install, build, and upload your site
uses: withastro/action@v1
# with:
# path: . # The root location of your Astro project inside the repository. (optional)
# node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 18. (optional)
# package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
1 change: 0 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const whenExternalScripts = (items = []) =>

export default defineConfig({
site: SITE.site,
base: SITE.base,
trailingSlash: SITE.trailingSlash ? 'always' : 'never',

output: 'static',
Expand Down
1 change: 1 addition & 0 deletions public/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hackudc.gpul.org
Binary file added src/assets/images/metatag.jpeg
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 src/assets/images/proximamente.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 8 additions & 6 deletions src/components/ui/Form.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ const { inputs, textarea, disclaimer, button = 'Contact us', description = '' }
{
inputs &&
inputs.map(
({ type = 'text', name, label = '', autocomplete = 'on', placeholder = '' }) =>
({ type = 'text', name, label = '', autocomplete = 'on', placeholder = '', error = '', required = false }) =>
name && (
<div class="mb-6">
<div class="mb-2">
{label && (
<label for={name} class="block text-sm font-medium">
{label}
<label for={name} class="block text-sm font-medium mb-1">
{label} { required && <small class="text-red-500 pl-1">*</small>}
</label>
)}
<input
Expand All @@ -25,6 +25,7 @@ const { inputs, textarea, disclaimer, button = 'Contact us', description = '' }
placeholder={placeholder}
class="py-3 px-4 block w-full text-md rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-slate-900"
/>
{ error && <small class="text-red-500 mb-0">{error}</small>}
</div>
)
)
Expand All @@ -33,8 +34,8 @@ const { inputs, textarea, disclaimer, button = 'Contact us', description = '' }
{
textarea && (
<div>
<label for="textarea" class="block text-sm font-medium">
{textarea.label}
<label for="textarea" class="block text-sm font-medium mb-1">
{textarea.label} { textarea.required && <small class="text-red-500 pl-1">*</small>}
</label>
<textarea
id="textarea"
Expand All @@ -43,6 +44,7 @@ const { inputs, textarea, disclaimer, button = 'Contact us', description = '' }
placeholder={textarea.placeholder}
class="py-3 px-4 block w-full text-md rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-slate-900"
/>
{ textarea.error && <small class="text-red-500 mb-0">{textarea.error}</small>}
</div>
)
}
Expand Down
17 changes: 17 additions & 0 deletions src/components/widgets/Brands.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const {
tagline = '',
oro = [],
plata = [],
bronce = [],
colaboradores = [],
id,
isDark = false,
Expand Down Expand Up @@ -52,6 +53,22 @@ const {
)
}
</div>
<div class="mt-5 text-center text-xl dark:text-gray-300 font-medium mb-2">Bronce</div>
<div class="flex flex-wrap justify-center gap-x-6 sm:gap-x-12 lg:gap-x-24">
{
bronce &&
bronce.map(
(image) =>
image.src && (
<div class="flex flex-col justify-center col-span-1 my-2 lg:my-4 py-1 px-3 rounded-md dark:bg-gray-200">
{ image.href ? <a href={image.href}>
<Image src={image.src} alt={image.alt || ''} height={image.height || 200} width={image.width || 200} />
</a> : <Image src={image.src} alt={image.alt || ''} height={image.height || 200} width={image.width || 200} /> }
</div>
)
)
}
</div>
<div class="mt-5 text-center text-xl dark:text-gray-300 font-medium mb-2">Colaboradores</div>
<div class="flex flex-wrap justify-center gap-x-6 sm:gap-x-12 lg:gap-x-24">
{
Expand Down
7 changes: 3 additions & 4 deletions src/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
site:
name: HackUDC
site: 'https://hackudc.gpul.org'
base: '/'
trailingSlash: false

googleSiteVerificationId: # TODO
Expand All @@ -18,13 +17,13 @@ metadata:
openGraph:
site_name: HackUDC 2024 - 16 al 18 de Febrero | El hackathon universitario organizado por GPUL
images:
- url: '~/assets/images/meta.png'
- url: '~/assets/images/metatag.jpeg'
width: 1200
height: 628
type: website
twitter:
handle: '@gpul'
site: '@gpul'
handle: '@gpul_'
site: '@gpul_'
cardType: summary_large_image

i18n:
Expand Down
15 changes: 15 additions & 0 deletions src/pages/contacto.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,23 @@ const metadata = {
inputs={[
{
type: 'text',
autocomplete: 'off',
required: true,
name: 'name',
label: 'Nombre',
},
{
type: 'email',
autocomplete: 'off',
required: true,
name: 'email',
error: 'Intoduce un email válido',
label: 'Email',
},
]}
textarea={{
label: 'Mensaje',
required: true,
}}
button="Enviar"
description="Normalmente respondemos en menos de 24h."
Expand All @@ -39,3 +45,12 @@ const metadata = {
</Fragment>
</Note>
</Layout>


<script>
const submitButton = document.getElementById('submitButton');
const form = document.querySelector('form');
const nameInput = document.getElementById('name');
const emailInput = document.getElementById('email');
const requestInput = document.getElementById('request');
</script>
42 changes: 31 additions & 11 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import CallToAction from '~/components/widgets/CallToAction.astro';
import Note from '~/components/widgets/Note.astro';
import { getPermalink } from '~/utils/permalinks';
import logoCodee from '~/assets/images/codee.png';
import proximamenteImage from '~/assets/images/proximamente.jpeg';
import logoFIC from '~/assets/images/fic.svg';
import logoUDC from '~/assets/images/udc.svg';
import logoAmtega from '~/assets/images/amtega.svg';
Expand Down Expand Up @@ -102,54 +102,74 @@ title="Patrocinadores & Colaboradores"
subtitle="El evento no habría sido posible sin la ayuda de las siguientes empresas y entidades:"
oro={[
{
src: 'https://gpul.org/assets/images/logos/logo_gpul.png',
src: proximamenteImage,
alt: 'Próximamente',

},
{
src: 'https://gpul.org/assets/images/logos/logo_gpul.png',
src: proximamenteImage,
alt: 'Próximamente',
},
{
src: 'https://gpul.org/assets/images/logos/logo_gpul.png',
src: proximamenteImage,
alt: 'Próximamente',
},
{
src: 'https://gpul.org/assets/images/logos/logo_gpul.png',
src: proximamenteImage,
alt: 'Próximamente',
},
]}
plata={[
{
src: 'https://gpul.org/assets/images/logos/logo_gpul.png',
src: proximamenteImage,
alt: 'Próximamente',
width: 120,
height: 120,
},
{
src: 'https://gpul.org/assets/images/logos/logo_gpul.png',
src: proximamenteImage,
alt: 'Próximamente',
width: 120,
height: 120,
},
{
src: 'https://gpul.org/assets/images/logos/logo_gpul.png',
src: proximamenteImage,
alt: 'Próximamente',
width: 120,
height: 120,
},
{
src: 'https://gpul.org/assets/images/logos/logo_gpul.png',
src: proximamenteImage,
alt: 'Próximamente',
width: 120,
height: 120,
},
]}
bronce={[
{
src: proximamenteImage,
alt: 'Próximamente',
width: 90,
height: 90,
},
{
src: proximamenteImage,
alt: 'Próximamente',
width: 90,
height: 90,
},
{
src: proximamenteImage,
alt: 'Próximamente',
width: 90,
height: 90,
},
]}
colaboradores={[
{
src: logoFIC,
alt: 'Facultad de Informática',
href: 'https://fic.udc.gal',
href: 'https://fic.udc.es',
width: 60,
height: 80,
},
Expand All @@ -162,7 +182,7 @@ colaboradores={[
{
src: logoAmtega,
alt: 'Axencia para a modernización tecnolóxia de galicia',
href: 'https://amtega.xunta.gal',
href: 'https://amtega.xunta.gal/gl',
},
]}
/>
Expand Down
37 changes: 5 additions & 32 deletions src/pages/registro.astro
Original file line number Diff line number Diff line change
@@ -1,51 +1,24 @@
---
import Note from '~/components/widgets/Note.astro';
import Contact from '~/components/widgets/Contact.astro';
import Note from '~/components/widgets/Note.astro';
import Layout from '~/layouts/PageLayout.astro';
import { getPermalink } from '~/utils/permalinks';
---

<Layout>
<Contact
title="Regístrate y participa en HackUDC"
subtitle="Asegúrate de cubrir correctamente todos los campos, una vez lo envíes no podrás editarlo. Recibirás un correo electrónico cuando seas aceptado."
title="El formulario de registro aún no está abierto"
subtitle="Puedes dejarnos tu email y te avisaremos cuando esté disponible."
inputs={[
{
type: 'text',
autocomplete: 'off',
name: 'name',
label: 'Nombre y apellidos',
},
{
type: 'email',
autocomplete: 'off',
name: 'email',
label: 'Email',
},
{
type: 'checkbox',
autocomplete: 'off',
name: 'email',
label: 'Email',
},
{
type: 'file',
autocomplete: 'off',
name: 'cv',
label: 'Currículum vitae',
},
{
type: 'file',
autocomplete: 'off',
name: 'justify',
label: 'Justificación de condición de estudiante',
},
]}
textarea={{
label: 'Mensaje',
}}
button="Enviar"
description="Al enviar, aceptas la política de privacidad y el código de conducta."
button="Avísame"
description="Al enviar, aceptas la política de privacidad."
/>

<Note icon="tabler:shield-heart">
Expand Down
5 changes: 5 additions & 0 deletions src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,17 @@ export interface Input {
type: HTMLInputTypeAttribute;
name: string;
label?: string;
error?: string;
required?: boolean;
autocomplete?: string;
placeholder?: string;
}

export interface Textarea {
label?: string;
placeholder?: string;
error?: string;
required?: boolean;
rows?: number;
}

Expand Down Expand Up @@ -235,6 +239,7 @@ export interface Testimonials extends Headline, Widget {
export interface Brands extends Headline, Widget {
oro?: Array<Image & { height?: number, width?: number, href?: string }>;
plata?: Array<Image & { height?: number, width?: number, href?: string }>;
bronce?: Array<Image & { height?: number, width?: number, href?: string }>;
colaboradores?: Array<Image & { height?: number, width?: number, href?: string }>;
}

Expand Down

0 comments on commit 80cd3be

Please sign in to comment.