Skip to content

Commit 5ab995f

Browse files
Add BackgroundDots component to RootPage; update About page image references and layout styles; enhance layout.js with viewport settings; improve styling in various components
1 parent 43de01b commit 5ab995f

10 files changed

Lines changed: 95 additions & 63 deletions

File tree

app/(redirect)/page.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,9 @@
33
import { useEffect } from "react";
44
import { useRouter } from "next/navigation";
55
import { MainPageBg, PageContainer, TitlePage } from "../ui/ComponentsStyled";
6-
import styled from "styled-components";
76
import SpinnerLoad from "../components/SpinnerLoad";
7+
import BackgroundDots from "../components/BgMovingDots";
88

9-
const Spinner = styled.svg`
10-
animation: spin 1s linear infinite;
11-
12-
@keyframes spin {
13-
from {
14-
transform: rotate(0deg);
15-
}
16-
to {
17-
transform: rotate(360deg);
18-
}
19-
}
20-
`;
219
export default function RootPage() {
2210
const router = useRouter();
2311

@@ -30,6 +18,7 @@ export default function RootPage() {
3018

3119
return (
3220
<PageContainer>
21+
<BackgroundDots numDots={90} />
3322
<MainPageBg>
3423
<div
3524
style={{

app/[locale]/about/page.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ export default async function About({ params }) {
3838
>
3939
<Image
4040
src={
41-
"https://res.cloudinary.com/dcvnw6hvt/image/upload/v1765059827/elCronopio/pots-12_h4swi6.jpg"
42-
// "https://res.cloudinary.com/dcvnw6hvt/image/upload/v1732922346/elCronopio/owsftbzp6mn5iuvkogrl.jpg"
41+
"https://res.cloudinary.com/dcvnw6hvt/image/upload/v1732922346/elCronopio/owsftbzp6mn5iuvkogrl.jpg"
4342
}
4443
alt={"A portrait photos of Eric Lucero"} // Texto alternativo
4544
width={150} // Ancho de la imagen
@@ -48,6 +47,7 @@ export default async function About({ params }) {
4847
style={{
4948
width: "100%",
5049
height: "auto",
50+
zIndex: 1000,
5151
}}
5252
/>
5353
</PhotoAvatar>

app/[locale]/layout.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ const NaviBar = nextDynamic(() =>
6767
export function generateStaticParams() {
6868
return [{ locale: "es" }, { locale: "en" }];
6969
}
70+
export const viewport = {
71+
themeColor: [
72+
{ media: "(prefers-color-scheme: light)", color: "#0077FF" }, // Blanco o gris claro
73+
{ media: "(prefers-color-scheme: dark)", color: "#FF3366" }, // Negro o tu gris oscuro
74+
],
75+
};
7076

7177
export default async function LocaleLayout({ children, params }) {
7278
// Siempre en primera línea dentro de la función

app/_posts/algoritmo-genetico-sorteo.es.mdx

Lines changed: 68 additions & 38 deletions
Large diffs are not rendered by default.

app/components/CodeWrapper.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ const CodeBlock = ({ language, value }) => {
6969
<Toolbar>
7070
<LanguageBadge>{language}</LanguageBadge>
7171
{/* <CopyToClipboard text={value} onCopy={handleCopy}> */}
72-
<CopyButton $isCopy={copied}>
72+
{/* TODO: Encontrar librería que funcione con Next 19 */}
73+
{/* <CopyButton $isCopy={copied}>
7374
{copied ? <LuCopyCheck /> : <LuCopy />}
74-
</CopyButton>
75+
</CopyButton> */}
7576
{/* </CopyToClipboard> */}
7677
</Toolbar>
7778
<SyntaxHighlighter

app/components/MdCompos/MDXComponents.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ const MdxComponents = {
8989
const captionSeparation = metastring.match(/caption=(.*)/);
9090
const caption = captionSeparation ? captionSeparation[1].trim() : null;
9191
const hasCaption = metastring.toLowerCase().includes("caption=");
92-
9392
return (
9493
<MdImage>
9594
<Image
@@ -98,7 +97,7 @@ const MdxComponents = {
9897
height={0}
9998
sizes="100vw"
10099
style={{ width: "100%", height: "auto" }}
101-
alt={alt.replace(/ *\{[^)]*\} */g, "")}
100+
alt={caption}
102101
// objectFit="cover"
103102
/>
104103
{hasCaption && <MdImageCaption>{caption}</MdImageCaption>}

app/components/MdCompos/SorteoMundial.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const Container = styled.div`
1111
width: 100%;
1212
max-width: 1400px;
1313
margin: 0 auto;
14-
padding: 2rem;
14+
padding: 2rem 1rem;
1515
/* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; */
1616
`;
1717

@@ -93,10 +93,11 @@ const GruposContainer = styled.div`
9393
display: grid;
9494
grid-template-columns: 1fr;
9595
gap: 2rem;
96-
96+
width: 100%;
9797
@media (min-width: 768px) {
9898
grid-template-columns: 1fr 1fr;
9999
}
100+
border: 1px solid red;
100101
`;
101102

102103
const ItinerarioSection = styled.div`

app/themes/GlobalStyleWrapper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ a {
4646
/* Citas y Bloques de Código */
4747
--quote-bg: #FFF3CD; /* Amarillo pálido para fondo de citas */
4848
--quote-fg: #6C757D; /* Gris oscuro para texto de citas */
49-
--code-fg: #00FFE7; /* Rojo suave para palabras reservadas en código */
49+
--code-fg: #FF3366; /* Rojo suave para palabras reservadas en código */
5050
--code-bg: #282C34; /* Fondo para bloques de código */
5151
/* Bordes */
5252
--primary-border: #0077FF; /* Azul para bordes */

app/ui/MarkDownComponents.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ export const MdImageCaption = styled.p`
159159
margin: 5px 0;
160160
text-align: justify;
161161
max-width: 98%;
162+
font-size: smaller;
162163
@media (min-width: 860px) {
163164
max-width: 80%;
164165
}

app/ui/lugs.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,21 @@ export const Article = styled.article`
3333
width: 70%;
3434
/* border: 2px dashed red; */
3535
}
36-
@media (min-width: 1080px) {
37-
width: 50%;
38-
}
3936
@media (max-width: 728px) {
4037
min-width: 100%;
4138
padding: 5px;
4239
box-shadow: none;
4340
font-size: small;
4441
/* border: 2px solid orange; */
4542
}
43+
@media (min-width: 1080px) {
44+
width: 60%;
45+
border: 2px solid cyan;
46+
}
47+
@media (min-width: 1380px) {
48+
width: 70%;
49+
border: 2px solid cyan;
50+
}
4651
`;
4752

4853
export const Title = styled.h1`

0 commit comments

Comments
 (0)