Skip to content

Commit

Permalink
boiler update and imgSvg
Browse files Browse the repository at this point in the history
  • Loading branch information
lauralog committed Oct 1, 2024
1 parent 6b338ba commit 58969b0
Show file tree
Hide file tree
Showing 9 changed files with 97 additions and 96 deletions.
Binary file modified app/icon.ico
Binary file not shown.
36 changes: 24 additions & 12 deletions app/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Divider from "@/components/ui/divider";
import Text from "@/components/ui/Text";
import { ArrowRightIcon, EnvelopeOpenIcon } from "@radix-ui/react-icons";
import Image from "@/components/ui/image";
import Img from "@/components/ui/imgSvg";

//Card
import {
Expand Down Expand Up @@ -66,11 +67,19 @@ export default function Projects() {
</Button>
</BannerContent>

<Image
{/* <Image
fit="cover"
src="placeholder.jpg"
alt="Descripción de la imagen"
className={"h-full hidden md:flex"}
/> */}
<Img
src="placeholder.jpg"
alt="Descripción de la imagen"
fit="contain"
hasBadge={true}
badgeVariant=""
badgeSize=""
/>
</Banner>

Expand Down Expand Up @@ -104,28 +113,31 @@ export default function Projects() {
</Card>
<Card
cardType="normal"
className="text-center content-center bg-white p-6"
className="text-center content-center bg-indigo-200 p-6 flex flex-col h-full justify-between"
>
<div className="icon pb-8 flex justify-center items-center ">
<svg
<Img
isSvg={true}
svgCode={`
<svg
width="116"
height="136"
viewBox="0 0 116 136"
fill="none"
fill="#fafewf"
xmlns="http://www.w3.org/2000/svg"
className="h-40 fill-primary"
className="fill-primary"
>
<path d="M85.989 65.9632C82.2476 62.227 77.4824 59.6836 72.2955 58.6544C67.1085 57.6252 61.7326 58.1565 56.8476 60.1811C51.9625 62.2057 47.7876 65.6327 44.8503 70.029C41.913 74.4253 40.3455 79.5934 40.3455 84.8803C40.3455 90.1671 41.913 95.3353 44.8503 99.7316C47.7876 104.128 51.9625 107.555 56.8476 109.579C61.7326 111.604 67.1085 112.135 72.2955 111.106C77.4824 110.077 82.2476 107.534 85.989 103.797C91.0009 98.7768 93.816 91.9734 93.816 84.8803C93.816 77.7871 91.0009 70.9837 85.989 65.9632ZM79.9476 97.8264C77.3997 100.376 74.1529 102.112 70.6178 102.816C67.0828 103.52 63.4182 103.16 60.0878 101.782C56.7574 100.403 53.9108 98.0682 51.908 95.072C49.9051 92.0759 48.8362 88.5532 48.8362 84.9496C48.8362 81.3459 49.9051 77.8232 51.908 74.8271C53.9108 71.831 56.7574 69.496 60.0878 68.1175C63.4182 66.7391 67.0828 66.3791 70.6178 67.0831C74.1529 67.7872 77.3997 69.5236 79.9476 72.0727C83.3408 75.4858 85.2451 80.1026 85.2451 84.9149C85.2451 89.7272 83.3408 94.344 79.9476 97.7572V97.8264Z" />
<path d="M27.6517 86.8821C24.5823 86.4488 21.5454 85.8101 18.5615 84.9703C16.1687 84.3301 13.8473 83.4482 11.6331 82.3381C10.2191 81.7709 9.06088 80.7067 8.37657 79.3457V69.1495C9.12484 69.5513 9.9424 69.9392 10.8015 70.3271C11.6607 70.715 12.9773 71.2691 14.1551 71.7124C14.7648 71.9202 15.402 72.1003 16.0256 72.2943L16.8294 72.5575L18.6864 73.0562L20.4046 73.4718L21.0281 73.6242L21.7764 73.7628L24.1875 74.1922L25.3374 74.3723C26.1411 74.4832 26.9587 74.594 27.7762 74.6771L28.8294 74.8156H29.4529L30.7002 74.9126C32.8619 75.0788 35.0513 75.1758 37.2961 75.1758H37.6564C38.6575 72.1478 40.1203 69.2927 41.9934 66.7113C40.4137 66.836 38.8481 66.8914 37.2961 66.8914C30.9436 66.8532 24.6244 65.968 18.506 64.2592C16.1132 63.619 13.7918 62.7371 11.5776 61.627C10.1591 61.0597 8.99955 59.9894 8.32109 58.6208V48.3969C10.17 49.4232 12.1033 50.2898 14.0996 50.9875C16.367 51.7687 18.681 52.4072 21.0281 52.8993C23.606 53.4293 26.2099 53.8223 28.8294 54.0769C31.6429 54.3566 34.4687 54.4953 37.2961 54.4925C40.0727 54.4955 42.8477 54.3568 45.6102 54.0769C48.1969 53.8173 50.7686 53.4243 53.3147 52.8993C55.6605 52.4018 57.9742 51.7633 60.2432 50.9875C62.2907 50.2839 64.2783 49.4176 66.1875 48.3969V53.9383H66.9636C69.4858 53.9368 71.9989 54.2439 74.4465 54.8527V17.3372C74.4465 12.7932 70.8159 8.90502 63.5548 5.67252C56.2938 2.44002 47.5178 0.819142 37.2267 0.809906C26.9726 0.809906 18.1966 2.43079 10.8986 5.67252C3.60065 8.91425 -0.0346366 12.8025 -0.00692282 17.3372V79.3457C-0.00692282 83.9636 3.59594 87.8703 10.8015 91.0658C18.0071 94.2614 26.7832 95.8638 37.1296 95.873H37.9473C36.938 93.2027 36.3037 90.4053 36.0626 87.5609C33.2476 87.5075 30.4389 87.2808 27.6517 86.8821ZM18.9218 11.7127C30.9947 8.16635 43.8329 8.16635 55.9058 11.7127C62.0721 13.4998 65.5225 15.3977 66.2846 17.3926C65.5271 19.3875 62.049 21.2624 55.8503 23.0172C43.7858 26.49 30.9863 26.49 18.9218 23.0172C12.8941 21.2855 9.38818 19.4014 8.43205 17.3372C9.38818 15.3839 12.8941 13.5413 18.9218 11.7127ZM8.43205 27.7689C10.281 28.7952 12.214 29.6619 14.2103 30.3596C16.4776 31.1407 18.7916 31.7793 21.1387 32.2714C23.7166 32.8013 26.3209 33.1944 28.9403 33.4489C31.7538 33.7286 34.5794 33.8673 37.4067 33.8645C40.1834 33.8675 42.9584 33.7288 45.7208 33.4489C48.3076 33.1893 50.8792 32.7963 53.4254 32.2714C55.7712 31.7738 58.0848 31.1354 60.3538 30.3596C62.4013 29.6559 64.3892 28.7896 66.2985 27.7689V40.2371C64.3888 41.2531 62.4009 42.1147 60.3538 42.8139C58.0888 43.6026 55.7743 44.2412 53.4254 44.7257C50.8795 45.2554 48.3078 45.6531 45.7208 45.9171C42.9584 46.197 40.1834 46.3358 37.4067 46.3327C34.5794 46.3355 31.7538 46.1968 28.9403 45.9171C26.3206 45.6582 23.7163 45.2605 21.1387 44.7257C18.7884 44.247 16.4735 43.6082 14.2103 42.8139C12.2144 42.1207 10.2814 41.2586 8.43205 40.2371V27.7689Z" />
<path d="M112.456 116.778L94.594 98.9208C93.305 101.439 91.678 103.77 89.7579 105.848L106.567 122.652C107.883 123.968 107.952 125.7 107.259 126.434C106.567 127.168 104.793 127.057 103.476 125.741L86.5711 108.84C84.3513 110.652 81.8885 112.144 79.2546 113.273L97.6012 131.629C99.8216 133.876 102.839 135.155 105.998 135.189C107.319 135.205 108.63 134.958 109.855 134.463C111.08 133.969 112.195 133.236 113.135 132.308C117.222 128.221 116.904 121.253 112.456 116.778Z" />
</svg>
</div>
</svg>`}
fit="cover"
hasBadge={false}
badgeVariant=""
badgeSize=""
/>
<Heading level="h5"> {t("front.Goals.Goal2.GoalTitle")}</Heading>
</Card>
<Card
cardType="normal"
className="text-center content-center p-6"
>
<Card cardType="normal" className="text-center content-center p-6">
<div className="icon pb-8 content-center flex justify-center items-center">
<Image
src="placeholder.jpg"
Expand Down
2 changes: 1 addition & 1 deletion components/core/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function Footer(props) {
/>
<div className="text-white flex items-center">
<EnvelopeClosedIcon className="mr-2 mb-0.5" />
<p className="text-white text-[14px]">
<p className="text-white text-[14px] flex gap-1">
<b>{t("footer.email")} </b>[email protected]
</p>
</div>
Expand Down
63 changes: 63 additions & 0 deletions components/ui/imgSvg.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
"use client";

import React from "react";
import clsx from "clsx";
import { Badge } from "../ui/badge";

const Img = ({
fit = "cover",
src,
alt = "",
className,
layout = "top-right",
hasBadge = false,
badgeVariant = "",
badgeSize = "",
isSvg = false, // Nuevo prop para detectar SVG
svgCode = "", // SVG en formato de código
}) => {
const imageContainerClasses = clsx(
// "relative flex w-full h-full",
"relative flex w-full",
className
);

const imageClasses = clsx(
"w-full h-full flex items-center justify-center",
{
"object-cover": fit === "cover",
"object-contain": fit === "contain",
}
);

const badgeLayout = clsx(
"absolute",
{
"top-2 left-2": layout === "top-left",
"top-2 right-2": layout === "top-right",
"bottom-2 left-2": layout === "bottom-left",
"bottom-2 right-2": layout === "bottom-right",
"top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2": layout === "center",
}
);

return (
<div className={imageContainerClasses}>
{isSvg ? (
<div
className={imageClasses}
dangerouslySetInnerHTML={{ __html: svgCode }} // Renderizamos SVG
/>
) : (
<img src={src} alt={alt} className={"h-fit w-fit"} />
)}
{hasBadge && (
<Badge className={badgeLayout} variant={badgeVariant} size={badgeSize}>
Hola
</Badge>
)}
</div>
);
};

export default Img;
8 changes: 4 additions & 4 deletions constants/langs/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ export const en = {
"publicationstab": "Publications",
},
"front": {
"title": "A secure data space",
"description": "Eunomia drives a secure data economy in Europe, supporting Gaia-X ISBL and DSBA. We develop solutions and open standards for secure and trusted data sharing. ",
"action-button": "About Eunomia",
"title": "Boiler by GING",
"description": "Boilerplate for investigation groups and other projects",
"action-button": "About us",
"section1Title": "Short description of the project",
"section1Description": "For the Eunomia project, technical solutions, standards and open tools will be developed to enable secure data sharing, guaranteeing the sovereignty and trust of users. The project includes the implementation of FIWARE technologies and other standards to facilitate interoperability and data governance. Tutorials and support will also be provided so that any user can experiment with these technologies. ",
"section1Description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus lacinia odio vitae vestibulum vestibulum. Cras venenatis euismod malesuada. Nullam id dolor sit amet risus malesuada aliquet. In efficitur, purus ac vehicula gravida, sapien justo luctus metus, id fermentum augue est in nunc. Aliquam erat volutpat. Duis pharetra, orci nec ultrices gravida, odio urna faucibus lorem, nec pharetra turpis felis nec sapien. Sed auctor lectus at elit consectetur, at venenatis ligula faucibus.",
"section1Subtitle": "Eunomia is based on:",
"latestPublicationsTitle": "Latest publications",
"latestPublicationsButton": "See all publications",
Expand Down
10 changes: 5 additions & 5 deletions constants/langs/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export const es = {
"publicationstab": "Publicaciones",
},
"front": {
"title": "Espacios de datos seguros",
"description": "Eunomia impulsa una economía de datos segura en Europa, apoyando Gaia-X ISBL y DSBA. Desarrollamos soluciones y estándares abiertos para compartir datos con seguridad y confianza. ",
"action-button": "Sobre Eunomia",
"section1Title": "Sobre Eunomia",
"section1Description": "Para el proyecto de Eunomia, se desarrollarán soluciones técnicas, estándares y herramientas abiertas que permitan la compartición de datos de manera segura, garantizando la soberanía y confianza de los usuarios. El proyecto incluye la implementación de tecnologías FIWARE y otros estándares para facilitar la interoperabilidad y la gobernanza de datos. También se proporcionarán tutoriales y soporte para que cualquier usuario pueda experimentar con estas tecnologías.",
"title": "Boiler by GING",
"description": "Boiler para páginas de grupos de investigación y otros proyectos",
"action-button": "Sobre nosotros",
"section1Title": "Descripción sobre el proyecto",
"section1Description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus lacinia odio vitae vestibulum vestibulum. Cras venenatis euismod malesuada. Nullam id dolor sit amet risus malesuada aliquet. In efficitur, purus ac vehicula gravida, sapien justo luctus metus, id fermentum augue est in nunc. Aliquam erat volutpat. Duis pharetra, orci nec ultrices gravida, odio urna faucibus lorem, nec pharetra turpis felis nec sapien. Sed auctor lectus at elit consectetur, at venenatis ligula faucibus.",
"section1Subtitle": "Eunomia se basa en:",
"latestPublicationsTitle": "Últimas publicaciones",
"latestPublicationsButton": "Ver todas las publicaciones",
Expand Down
62 changes: 0 additions & 62 deletions public/eunomia_logo_light.svg

This file was deleted.

Binary file removed public/eunomia_logo_white.png
Binary file not shown.
Loading

0 comments on commit 58969b0

Please sign in to comment.