Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(imágenes_darkmode): Cambiar imágenes de los patrocinadores en darkmode #228

Merged
merged 3 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pages/patrocinios/aaaimx.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Capítulo Estudiantil AAAIMX
description:
cover: https://somosnlp.github.io/assets/images/patrocinios/AAAIMX.png
cover_dark: https://somosnlp.github.io/assets/images/patrocinios/AAAIMX_dark.png
twitter: https://www.facebook.com/aaaimx/
linkedin: https://www.linkedin.com/company/aaaimx
website: https://www.aaaimx.org/
Expand Down
1 change: 1 addition & 0 deletions pages/patrocinios/agilmentor.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: AgilMentor
description:
cover: https://somosnlp.github.io/assets/images/patrocinios/AgilMentor.png
cover_dark: https://somosnlp.github.io/assets/images/patrocinios/AgilMentor_dark.png
twitter:
linkedin: https://www.linkedin.com/company/agilmentor/
website: https://agilmentor.com
Expand Down
1 change: 1 addition & 0 deletions pages/patrocinios/divertles.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: DiverTLes
description: Diversidad de Tecnologías del Lenguaje en España
cover: https://somosnlp.github.io/assets/images/patrocinios/DiverTLes.png
cover_dark: https://somosnlp.github.io/assets/images/patrocinios/DiverTLes_dark.png
twitter: https://twitter.com/divertlespln
linkedin:
website: https://divertles.ujaen.es/
Expand Down
1 change: 1 addition & 0 deletions pages/patrocinios/ibidat.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: IBiDat
description:
cover: https://somosnlp.github.io/assets/images/patrocinios/IBiDat.png
cover_dark: https://somosnlp.github.io/assets/images/patrocinios/IBiDat_dark.png
twitter:
linkedin:
website:
Expand Down
1 change: 1 addition & 0 deletions pages/patrocinios/iic.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Instituto de Ingeniería del Conocimiento
description:
cover: https://somosnlp.github.io/assets/images/patrocinios/iic.bmp
cover_dark: https://somosnlp.github.io/assets/images/patrocinios/iic_dark.bmp
twitter: https://twitter.com/IIConocimiento
linkedin: https://www.linkedin.com/company/instituto-de-ingenieria-del-conocimiento-iic
website: https://www.iic.uam.es
Expand Down
1 change: 1 addition & 0 deletions pages/patrocinios/iimas_unam.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Instituto de Investigaciones en Matemáticas Aplicadas y en Sistemas de la Universidad Nacional Autónoma de México
description:
cover: https://somosnlp.github.io/assets/images/patrocinios/UNAM.png
cover_dark: https://somosnlp.github.io/assets/images/patrocinios/UNAM_dark.png
twitter:
linkedin:
website:
Expand Down
1 change: 1 addition & 0 deletions pages/patrocinios/imfd.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Instituto Milenio Fundamentos de los Datos
description:
cover: https://somosnlp.github.io/assets/images/patrocinios/IMFD.png
cover_dark: https://somosnlp.github.io/assets/images/patrocinios/IMFD_dark.png
twitter: https://www.twitter.com/IMFDChile
linkedin: https://www.linkedin.com/company/fundamentosdelosdatos/
website: https://www.imfd.cl
Expand Down
1 change: 1 addition & 0 deletions pages/patrocinios/narrativa.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Narrativa
description:
cover: https://somosnlp.github.io/assets/images/patrocinios/Narrativa.png
cover_dark: https://somosnlp.github.io/assets/images/patrocinios/Narrativa_dark.png
twitter: https://twitter.com/NarrativaAI
linkedin: https://www.linkedin.com/company/narrativaai/
website: narrativa.com
Expand Down
1 change: 1 addition & 0 deletions pages/patrocinios/nova.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Nova
description: Red global de talento
cover: https://somosnlp.github.io/assets/images/patrocinios/Nova.png
cover_dark: https://somosnlp.github.io/assets/images/patrocinios/Nova_dark.png
twitter: https://twitter.com/NovaTalent_
linkedin: https://www.linkedin.com/company/nova/
website: https://www.novatalent.com/
Expand Down
1 change: 1 addition & 0 deletions pages/patrocinios/platzi.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Platzi
description:
cover: https://somosnlp.github.io/assets/images/patrocinios/platzi.png
cover_dark: https://somosnlp.github.io/assets/images/patrocinios/platzi_dark.png
twitter:
linkedin:
website:
Expand Down
1 change: 1 addition & 0 deletions pages/patrocinios/q-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Q Blocks
description:
cover: https://somosnlp.github.io/assets/images/patrocinios/QBlocks.png
cover_dark: https://somosnlp.github.io/assets/images/patrocinios/QBlocks_dark.png
twitter: https://twitter.com/blocks_q
linkedin: https://www.linkedin.com/company/q-blocks/
website: https://qblocks.cloud/
Expand Down
1 change: 1 addition & 0 deletions pages/patrocinios/software-themis.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Software Themis
description:
cover: https://somosnlp.github.io/assets/images/patrocinios/SoftwareThemis.png
cover_dark: https://somosnlp.github.io/assets/images/patrocinios/SoftwareThemis_dark.png
twitter: https://twitter.com/SoftwareThemis_
linkedin: https://www.linkedin.com/company/software-themis/
website: https://www.themis.es
Expand Down
1 change: 1 addition & 0 deletions pages/patrocinios/spain-ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Spain AI
description:
cover: https://somosnlp.github.io/assets/images/patrocinios/SpainAI.png
cover_dark: https://somosnlp.github.io/assets/images/patrocinios/SpainAI_dark.png
twitter: https://twitter.com/Spain_AI_
linkedin: https://www.linkedin.com/company/spainai/
website: https://www.spain-ai.com
Expand Down
1 change: 1 addition & 0 deletions pages/patrocinios/unl.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Universidad Nacional de Loja
description:
cover: https://somosnlp.github.io/assets/images/patrocinios/UNL.png
cover_dark: https://somosnlp.github.io/assets/images/patrocinios/UNL_dark.png
twitter: https://twitter.com/UNLoficial
linkedin: https://www.linkedin.com/school/universidad-nacional-de-loja/mycompany/
website: https://unl.edu.ec
Expand Down
11 changes: 8 additions & 3 deletions src/components/SponsorInfoRouter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,28 @@
<script setup lang="ts">
import { computed } from 'vue'
import type { RouteRecordNormalized } from 'vue-router'
import { isDark } from '~/logic'

const props = defineProps<{
route: RouteRecordNormalized
}>()

const frontmatter = computed(() => (props.route.meta as any).frontmatter)
const imgSrc = computed(() => isDark.value ? frontmatter.value.cover_dark || frontmatter.value.cover: frontmatter.value.cover || 'images/logo.svg' )
</script>

<template>
<router-link :to="route.path" :key="route.path" target="_blank" class="contents">
<div class="rounded-md grid p-4 gap-4 place-items-center <sm:grid-cols-1 <lg:grid-cols-2"
hover="bg-gray-50 dark:bg-gray-800">
<div>
<img class="bg-white rounded-md object-cover max-h-200px" dark="bg-gray-900" width="180" height="180"
:src="frontmatter.cover ? frontmatter.cover : 'images/logo.svg'" :alt="frontmatter.title" />
<img class="bg-white rounded-md object-cover max-h-200px"
dark="bg-dark-900" width="180" height="180"
:src="imgSrc"
:alt="frontmatter.title"
/>
</div>
</div>
</router-link>
</template>