Skip to content

Commit

Permalink
resuelto traduccion categorias, pequeño bug landing espaciado
Browse files Browse the repository at this point in the history
  • Loading branch information
clara7227 committed Jan 17, 2025
1 parent 7e00da0 commit 54f8ac7
Show file tree
Hide file tree
Showing 19 changed files with 31 additions and 74 deletions.
47 changes: 2 additions & 45 deletions components/core/Cards.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,50 +62,6 @@ const tagContainerClasses = cn(
"mt-6 w-full flex flex-wrap gap-2 justify-start"
);


const renderTags = (tags) => {
if (!tags) return null;
const tagsArray = tags.split(",").map((tag) => tag.trim()); // Convierte el string en array y elimina espacios
return tagsArray.map((tag, index) => (
<Mybadge key={index} variant="default">
{tag}
</Mybadge> // Añade una key a cada Label
));
};



// quitarle guión, añadir espaciado, mayúscula (Formateo)
const renderCategory = (category) => {
if (!category) return null;
const categoryFormat = category
.split("-") // cadena en un array de palabras
.map((palabra) => palabra.charAt(0).toUpperCase() + palabra.slice(1)) // la primera letra en mayúscula
.join(" "); // unir las palabras con espacio
return categoryFormat
};

const translateCategory = (category, currentLang) => {
if (currentLang == "es") {
if (category == "article-journal") {
category = "artículo-revista";
// console.log(category);
} else if (category == "paper-conference") {
category = "acta-congreso";
// console.log(category);
} else if (category == "book") {
category = "libro";
// console.log(category);
} else if (category == "chapter") {
category = "capítulo";
// console.log(category);
}
} else if (currentLang == "en") {
// transformar "artículo-revista" en article journal
}
return renderCategory(category);
};

const returnPwidth = () => {
const minWidth = 600; // Ancho mínimo
const maxWidth = 1600; // Ancho máximo
Expand All @@ -125,6 +81,7 @@ const returnPwidth = () => {
}
};

// VER MAS
const getIdealLength = () => {
const isMobile = window.innerWidth <= 600;

Expand Down Expand Up @@ -432,7 +389,7 @@ const Card = React.forwardRef(
{title}
</CardTitle>
<div className="flex"> <Text type="small" className="font-bold">
{translateCategory(category, currentLang)}</Text>
{t(`research.filter.${category}`)}</Text>
<div className="mx-2 mb-2">·</div> <Text type="small"> {date && date[0]} </Text> </div>
<Text className="text-gray-300/90 mb-4" type="small">{author}</Text>
<div className="flex flex-wrap gap-1.5">
Expand Down
8 changes: 4 additions & 4 deletions components/illustrations/ResearchlineIllust.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const ResearchlineIllust = ({ researchLine }) => {
<div className="data-spaces-item" id="data-spaces-item-4"></div>
</div>
<Link className="icon_link_publication" target="_blank" href="projects?researchline=data">
<ArrowOutwardIcon className=" text-white absolute right-2 hover:right-0 bottom-1 transition-all hover:bottom-2 font-bold opacity-75 hover:opacity-100" sx={{ fontSize: 48 }} />
<ArrowOutwardIcon className=" text-white absolute right-1 hover:right-0 bottom-1 transition-all hover:bottom-2 font-bold opacity-75 hover:opacity-100" sx={{ fontSize: 48 }} />
<Mybadge variant="secondary" size="sm" className="link_publication absolute right-2 bottom-14"> {t("front.ResearchLines.button")} </Mybadge>
</Link>
</div>
Expand All @@ -56,7 +56,7 @@ const ResearchlineIllust = ({ researchLine }) => {
{/* <div className="generative-ai-item" id="generative-ai-item-4"></div> */}
</div>
<Link className="icon_link_publication" target="_blank" href="projects?researchline=ai">
<ArrowOutwardIcon className=" text-background absolute right-2 hover:right-0 bottom-1 transition-all hover:bottom-2 font-bold opacity-75 hover:opacity-100" sx={{ fontSize: 48 }} />
<ArrowOutwardIcon className=" text-background absolute right-1 hover:right-0 bottom-1 transition-all hover:bottom-2 font-bold opacity-75 hover:opacity-100" sx={{ fontSize: 48 }} />
<Mybadge variant="secondary" size="sm" className="link_publication absolute right-2 bottom-14"> {t("front.ResearchLines.button")} </Mybadge>
</Link>
</div>
Expand All @@ -71,7 +71,7 @@ const ResearchlineIllust = ({ researchLine }) => {
{/* <div className="generative-ai-item" id="generative-ai-item-4"></div> */}
</div>
<Link className="icon_link_publication" target="_blank" href="projects?researchline=e-learning">
<ArrowOutwardIcon className=" text-white absolute right-2 hover:right-0 bottom-1 transition-all hover:bottom-2 font-bold opacity-75 hover:opacity-100" sx={{ fontSize: 48 }} />
<ArrowOutwardIcon className=" text-white absolute right-1 hover:right-0 bottom-1 transition-all hover:bottom-2 font-bold opacity-75 hover:opacity-100" sx={{ fontSize: 48 }} />
<Mybadge variant="secondary" size="sm" className="link_publication absolute right-2 bottom-14"> {t("front.ResearchLines.button")} </Mybadge>
</Link>
</div>
Expand All @@ -86,7 +86,7 @@ const ResearchlineIllust = ({ researchLine }) => {
></img>
</div>
<Link className="icon_link_publication" target="_blank" href="projects?researchline=computing">
<ArrowOutwardIcon className=" text-white absolute right-2 hover:right-0 bottom-1 transition-all hover:bottom-2 font-bold opacity-75 hover:opacity-100" sx={{ fontSize: 48 }} />
<ArrowOutwardIcon className=" text-white absolute right-1 hover:right-0 bottom-1 transition-all hover:bottom-2 font-bold opacity-75 hover:opacity-100" sx={{ fontSize: 48 }} />
<Mybadge variant="secondary" size="sm" className="link_publication absolute right-2 bottom-14"> {t("front.ResearchLines.button")} </Mybadge>
</Link>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/_next/static/chunks/816-27b91fa87b096be3.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/_next/static/chunks/816-a00ca4eb212d7aed.js

This file was deleted.

2 changes: 1 addition & 1 deletion docs/contact.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/contact.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
1:"$Sreact.fragment"
2:I[4547,[],"ClientSegmentRoot"]
3:I[8784,["105","static/chunks/0e5ce63c-c3a86c17627f63d4.js","525","static/chunks/525-02b0e089dba1282b.js","109","static/chunks/109-72ea9f28e9ed85a3.js","432","static/chunks/432-5e8542185e668544.js","746","static/chunks/746-9391c6c23571ac60.js","816","static/chunks/816-a00ca4eb212d7aed.js","541","static/chunks/541-e57db6b9dca3963d.js","719","static/chunks/719-ee67d093a3d3e6ed.js","146","static/chunks/146-08c5294045ee26f7.js","837","static/chunks/837-03e48eed5e7fbd97.js","273","static/chunks/273-6811a84eb76d1797.js","177","static/chunks/app/layout-3cc242bf2af141e2.js"],"default"]
3:I[8784,["105","static/chunks/0e5ce63c-c3a86c17627f63d4.js","525","static/chunks/525-02b0e089dba1282b.js","109","static/chunks/109-72ea9f28e9ed85a3.js","432","static/chunks/432-5e8542185e668544.js","746","static/chunks/746-9391c6c23571ac60.js","816","static/chunks/816-27b91fa87b096be3.js","541","static/chunks/541-e57db6b9dca3963d.js","719","static/chunks/719-ee67d093a3d3e6ed.js","146","static/chunks/146-08c5294045ee26f7.js","837","static/chunks/837-03e48eed5e7fbd97.js","273","static/chunks/273-6811a84eb76d1797.js","177","static/chunks/app/layout-3cc242bf2af141e2.js"],"default"]
4:I[5244,[],""]
5:I[3866,[],""]
7:I[7033,[],"ClientPageRoot"]
Expand All @@ -11,7 +11,7 @@ f:I[6213,[],"ViewportBoundary"]
11:I[4835,[],""]
:HL["/_next/static/css/c197a578b0b4181a.css","style"]
:HL["/_next/static/css/5068fe894a9bb7fe.css","style"]
0:{"P":null,"b":"r7b590HKt-oFkCVsCr-Vd","p":"","c":["","contact"],"i":false,"f":[[["",{"children":["contact",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/c197a578b0b4181a.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/5068fe894a9bb7fe.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","$L2",null,{"Component":"$3","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[],[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"params":{},"promise":"$@6"}]]}],{"children":["contact",["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","contact","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L7",null,{"Component":"$8","searchParams":{},"params":"$0:f:0:1:1:props:children:1:props:params","promises":["$@9","$@a"]}],null,["$","$Lb",null,{"children":"$Lc"}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,["$","$1","LzHvjWJRO_s2BMuNM-tO2",{"children":[["$","$Ld",null,{"children":"$Le"}],["$","$Lf",null,{"children":"$L10"}],null]}]]}],false]],"m":"$undefined","G":["$11","$undefined"],"s":false,"S":true}
0:{"P":null,"b":"jdFyD_GLdny1rs1MfcQDQ","p":"","c":["","contact"],"i":false,"f":[[["",{"children":["contact",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/c197a578b0b4181a.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/5068fe894a9bb7fe.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","$L2",null,{"Component":"$3","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[],[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"params":{},"promise":"$@6"}]]}],{"children":["contact",["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","contact","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L7",null,{"Component":"$8","searchParams":{},"params":"$0:f:0:1:1:props:children:1:props:params","promises":["$@9","$@a"]}],null,["$","$Lb",null,{"children":"$Lc"}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,["$","$1","mXbGtof5v4TA87vuZo9jq",{"children":[["$","$Ld",null,{"children":"$Le"}],["$","$Lf",null,{"children":"$L10"}],null]}]]}],false]],"m":"$undefined","G":["$11","$undefined"],"s":false,"S":true}
6:{}
9:{}
a:{}
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/index.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
1:"$Sreact.fragment"
2:I[4547,[],"ClientSegmentRoot"]
3:I[8784,["105","static/chunks/0e5ce63c-c3a86c17627f63d4.js","525","static/chunks/525-02b0e089dba1282b.js","109","static/chunks/109-72ea9f28e9ed85a3.js","432","static/chunks/432-5e8542185e668544.js","746","static/chunks/746-9391c6c23571ac60.js","816","static/chunks/816-a00ca4eb212d7aed.js","541","static/chunks/541-e57db6b9dca3963d.js","719","static/chunks/719-ee67d093a3d3e6ed.js","146","static/chunks/146-08c5294045ee26f7.js","837","static/chunks/837-03e48eed5e7fbd97.js","273","static/chunks/273-6811a84eb76d1797.js","177","static/chunks/app/layout-3cc242bf2af141e2.js"],"default"]
3:I[8784,["105","static/chunks/0e5ce63c-c3a86c17627f63d4.js","525","static/chunks/525-02b0e089dba1282b.js","109","static/chunks/109-72ea9f28e9ed85a3.js","432","static/chunks/432-5e8542185e668544.js","746","static/chunks/746-9391c6c23571ac60.js","816","static/chunks/816-27b91fa87b096be3.js","541","static/chunks/541-e57db6b9dca3963d.js","719","static/chunks/719-ee67d093a3d3e6ed.js","146","static/chunks/146-08c5294045ee26f7.js","837","static/chunks/837-03e48eed5e7fbd97.js","273","static/chunks/273-6811a84eb76d1797.js","177","static/chunks/app/layout-3cc242bf2af141e2.js"],"default"]
4:I[5244,[],""]
5:I[3866,[],""]
7:I[7033,[],"ClientPageRoot"]
8:I[7578,["105","static/chunks/0e5ce63c-c3a86c17627f63d4.js","525","static/chunks/525-02b0e089dba1282b.js","109","static/chunks/109-72ea9f28e9ed85a3.js","816","static/chunks/816-a00ca4eb212d7aed.js","974","static/chunks/app/page-a7f3103ad0cf13ea.js"],"default"]
8:I[7578,["105","static/chunks/0e5ce63c-c3a86c17627f63d4.js","525","static/chunks/525-02b0e089dba1282b.js","109","static/chunks/109-72ea9f28e9ed85a3.js","816","static/chunks/816-27b91fa87b096be3.js","974","static/chunks/app/page-a7f3103ad0cf13ea.js"],"default"]
b:I[6213,[],"OutletBoundary"]
d:I[6213,[],"MetadataBoundary"]
f:I[6213,[],"ViewportBoundary"]
11:I[4835,[],""]
:HL["/_next/static/css/c197a578b0b4181a.css","style"]
:HL["/_next/static/css/5068fe894a9bb7fe.css","style"]
0:{"P":null,"b":"r7b590HKt-oFkCVsCr-Vd","p":"","c":["",""],"i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/c197a578b0b4181a.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/5068fe894a9bb7fe.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","$L2",null,{"Component":"$3","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[],[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"params":{},"promise":"$@6"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L7",null,{"Component":"$8","searchParams":{},"params":"$0:f:0:1:1:props:children:1:props:params","promises":["$@9","$@a"]}],null,["$","$Lb",null,{"children":"$Lc"}]]}],{},null,false]},null,false],["$","$1","h",{"children":[null,["$","$1","Ra0gP4S53ajAaCXsnflGr",{"children":[["$","$Ld",null,{"children":"$Le"}],["$","$Lf",null,{"children":"$L10"}],null]}]]}],false]],"m":"$undefined","G":["$11","$undefined"],"s":false,"S":true}
0:{"P":null,"b":"jdFyD_GLdny1rs1MfcQDQ","p":"","c":["",""],"i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/c197a578b0b4181a.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/5068fe894a9bb7fe.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","$L2",null,{"Component":"$3","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[],[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"params":{},"promise":"$@6"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L7",null,{"Component":"$8","searchParams":{},"params":"$0:f:0:1:1:props:children:1:props:params","promises":["$@9","$@a"]}],null,["$","$Lb",null,{"children":"$Lc"}]]}],{},null,false]},null,false],["$","$1","h",{"children":[null,["$","$1","UzA2mxewUeCTPDw29oDVy",{"children":[["$","$Ld",null,{"children":"$Le"}],["$","$Lf",null,{"children":"$L10"}],null]}]]}],false]],"m":"$undefined","G":["$11","$undefined"],"s":false,"S":true}
6:{}
9:{}
a:{}
Expand Down
2 changes: 1 addition & 1 deletion docs/projects.html

Large diffs are not rendered by default.

Loading

0 comments on commit 54f8ac7

Please sign in to comment.