feat(git): initial commit,

This commit is contained in:
remigracion-dev
2026-10-14 17:40:31 +00:00
commit fe57ca28c2
43 changed files with 6512 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# Artefactos de extraccion de la base de datos de WordPress (pesan
# cientos de MB y no son codigo fuente; el pipeline para regenerarlos
# esta documentado en GUIA_WORDPRESS.md y scripts/extract_site.py)
*.sqlite
*.sqlite.gz
*.sqlite.incomplete
src/content/site.json.bak
+66
View File
@@ -0,0 +1,66 @@
# Remigración — React
Proyecto base para migrar el sitio de WordPress (`Remigracion/20260329_remigracionorg_...`) a un stack moderno con **React + Vite**.
## Requisitos
- Node.js 18 o superior
- npm (o pnpm / yarn si lo prefieres)
## Instalación
Desde esta carpeta (`remigracion-react/`):
```bash
npm install
```
## Desarrollo
```bash
npm run dev
```
Vite arrancará el servidor de desarrollo, normalmente en `http://localhost:5173`.
## Build de producción
```bash
npm run build
npm run preview
```
El resultado se genera en `dist/`.
## Estructura
```
remigracion-react/
├── index.html # punto de entrada HTML
├── package.json
├── vite.config.js
├── public/ # assets estáticos servidos tal cual
└── src/
├── main.jsx # bootstrap de React
├── App.jsx # componente raíz
├── App.css
├── index.css
└── assets/
```
## Cómo se pobló el contenido
`src/content/site.json` se generó extrayendo la home (`wp_posts` ID 10044) y sus metadatos Elementor (`_elementor_data`) del dump SQL del export. Ver `../GUIA_WORDPRESS.md` para el detalle del proceso.
El JSON tiene tres claves:
- `site` — `name`, `description`, `url`, `lang`.
- `menu` — ítems del menú principal con `title` y `url` (la mayoría son anclas `#seccion`).
- `sections` — lista de secciones con `anchor`, `headings`, `paragraphs`, `images`, `lists`.
## Próximos pasos
1. Añadir las páginas legales (`/cookies`, `/aviso-legal`) con React Router.
2. Reemplazar los `dangerouslySetInnerHTML` por un sanitizador (`DOMPurify`) antes de producción.
3. Descargar las imágenes del `wp-content/uploads` del export y servirlas desde `/public/img/` en lugar de hotlinkear a `http://remigracion.es/`.
4. Revisar el contenido extraído — algunas secciones tienen 2 versiones (desktop y móvil) en el HTML original; el extractor se queda con la primera.
+20
View File
@@ -0,0 +1,20 @@
<!doctype html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Remigración.es | La remigración es inevitable</title>
<meta name="description" content="La remigración es inevitable. Información, medidas y precedentes históricos." />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@700;900&display=swap"
rel="stylesheet"
/>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
+4430
View File
File diff suppressed because it is too large Load Diff
+28
View File
@@ -0,0 +1,28 @@
{
"name": "remigracion-react",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "eslint .",
"preview": "vite preview"
},
"dependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@eslint/js": "^9.9.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^9.9.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.9",
"globals": "^15.9.0",
"vite": "^5.4.1"
}
}
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 410 404"><path d="M399.641 59.5246L215.643 388.545C211.844 395.338 202.084 395.378 198.228 388.618L10.5817 59.5563C6.38087 52.1896 12.6802 43.2665 21.0281 44.7586L205.223 77.6824C206.398 77.8924 207.601 77.8904 208.776 77.6763L389.119 44.7705C397.439 43.2525 403.768 52.1256 399.641 59.5246Z" fill="url(#paint0_linear)"/><path d="M292.965 1.5744L156.801 28.2552C154.563 28.6937 152.906 30.5903 152.771 32.8664L144.395 174.33C144.198 177.662 147.258 180.248 150.51 179.498L188.42 170.749C191.967 169.931 195.172 173.055 194.443 176.622L183.18 231.775C182.422 235.487 185.907 238.661 189.532 237.56L212.947 230.446C216.577 229.344 220.065 232.527 219.297 236.242L201.398 322.875C200.278 328.294 207.486 331.249 210.492 326.603L212.5 323.5L323.454 102.072C325.312 98.3645 322.108 94.137 318.036 94.9228L279.014 102.454C275.347 103.161 272.227 99.746 273.262 96.1583L298.731 7.86689C299.767 4.27212 296.636 0.854363 292.965 1.5744Z" fill="url(#paint1_linear)"/><defs><linearGradient id="paint0_linear" x1="6.00017" y1="32.9999" x2="235" y2="344" gradientUnits="userSpaceOnUse"><stop stop-color="#41D1FF"/><stop offset="1" stop-color="#BD34FE"/></linearGradient><linearGradient id="paint1_linear" x1="194.651" y1="8.81818" x2="236.076" y2="292.989" gradientUnits="userSpaceOnUse"><stop stop-color="#FFEA83"/><stop offset="0.0833333" stop-color="#FFDD35"/><stop offset="1" stop-color="#FFA800"/></linearGradient></defs></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 979 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

+433
View File
@@ -0,0 +1,433 @@
#!/usr/bin/env python3
"""
Extractor ampliado de contenido WordPress/Elementor -> src/content/site.json
Lee la base de datos SQLite recuperada del export de Duplicator y genera un
site.json que mantiene compatibilidad con el que ya consumen App.jsx /
Section.jsx / Navbar.jsx / Footer.jsx (mismas claves: site, menu, sections
con headings/paragraphs/images/lists) y anade informacion nueva que el
extractor anterior no capturaba: acordeones, tabs, carruseles, slideshows,
barras de progreso, texto animado, los dos paginas legales, los menus reales
y los campos del formulario de contacto.
Uso:
python3 scripts/extract_site.py <ruta-a-wp.sqlite-valido> [salida.json]
"""
import sys
import re
import json
import sqlite3
HOME_ID = 10044
PAGES = {
"cookies": {"id": 2316, "slug": "informacion-sobre-las-cookies"},
"avisoLegal": {"id": 2318, "slug": "aviso-legal-y-proteccion-de-datos"},
}
WPFORMS_ID = 2938
KIT_ID = 12
MENU_TERM_IDS = {"principal": 5, "footer": 6}
# Rangos de indices raiz (hijos directos del arbol _elementor_data de la
# home) que componen cada seccion anclada. Se confirmaron inspeccionando el
# arbol: cada seccion empieza en un contenedor con settings._element_id y
# se extiende hasta el indice anterior al siguiente anchor; "contacto" no
# tiene su propio contenedor anclado (solo un heading suelto con ese id), asi
# que se separa a mano de la cola de "precedentes_historicos".
SECTION_RANGES = [
("first-section", 0, 2),
("significa", 2, 5),
("inmigración_masiva", 5, 10),
("detener_el_reemplazo_poblacional", 10, 21),
("que_podemoshacer", 21, 28),
("precedentes_historicos", 28, 32),
("contacto", 32, 34),
]
NESTED_WIDGET_TYPES = {
"nested-accordion", "nested-tabs", "nested-carousel",
"premium-carousel-widget", "slides", "premium-addon-progressbar",
"premium-addon-fancy-text", "premium-nav-menu",
}
SKIP_WIDGET_TYPES = {"divider", "spacer"}
IMG_URL_RE = re.compile(r"https?://remigracion\.es/wp-content/uploads/[^\"'\s)]+")
def php_unserialize(data):
"""Parser minimo de php serialize() para leer el kit global de Elementor.
Trabaja en bytes: las longitudes de PHP (s:N:"...") cuentan bytes UTF-8,
no caracteres, y este dump tiene acentos (o, a, n) que son multibyte."""
b = data.encode("utf-8")
pos = 0
def parse():
nonlocal pos
kind = b[pos:pos + 1]
if kind == b"s":
m = re.match(rb's:(\d+):"', b[pos:])
length = int(m.group(1))
start = pos + m.end()
val = b[start:start + length].decode("utf-8")
pos = start + length + 2 # cierra comillas + ;
return val
if kind == b"i":
m = re.match(rb"i:(-?\d+);", b[pos:])
pos += m.end()
return int(m.group(1))
if kind == b"d":
m = re.match(rb"d:([^;]+);", b[pos:])
pos += m.end()
return float(m.group(1))
if kind == b"b":
m = re.match(rb"b:([01]);", b[pos:])
pos += m.end()
return m.group(1) == b"1"
if kind == b"N":
pos += 2
return None
if kind == b"a":
m = re.match(rb"a:(\d+):\{", b[pos:])
count = int(m.group(1))
pos += m.end()
result = {}
is_list = True
next_idx = 0
for _ in range(count):
k = parse()
v = parse()
if k != next_idx:
is_list = False
next_idx += 1
result[k] = v
pos += 1 # cierra '}'
if is_list:
return [result[i] for i in range(count)]
return result
raise ValueError(f"tipo php-serialize no soportado: {kind!r} en {b[pos:pos+30]!r}")
return parse()
def list_items_from_html(html):
"""Si el HTML es una lista <ul>/<ol>, devuelve sus <li> como lista de
strings; si no, devuelve None."""
stripped = html.strip()
if not re.match(r"^<(ul|ol)[\s>]", stripped, re.I):
return None
items = re.findall(r"<li[^>]*>(.*?)</li>", stripped, re.I | re.S)
return [i.strip() for i in items] if items else None
def extract_container(elements):
"""Recorre recursivamente una lista de elementos Elementor y devuelve
{headings, paragraphs, images, lists, widgets}. Los widgets anidados
(acordeon, tabs, carrusel...) se extraen aparte en vez de aplanarse."""
out = {"headings": [], "paragraphs": [], "images": [], "lists": [], "widgets": []}
def walk(nodes):
for n in nodes:
wtype = n.get("widgetType")
settings = n.get("settings", {})
if wtype == "heading":
html = settings.get("title", "")
if html:
out["headings"].append({"level": settings.get("header_size", "h2"), "html": html})
continue
if wtype == "text-editor":
html = settings.get("editor", "")
if html:
items = list_items_from_html(html)
if items:
out["lists"].append(items)
else:
out["paragraphs"].append(html)
continue
if wtype == "image":
img = settings.get("image", {}) or {}
if img.get("url"):
out["images"].append({"url": img["url"], "alt": img.get("alt", "")})
continue
if wtype in SKIP_WIDGET_TYPES:
continue
if wtype == "nested-accordion":
items = settings.get("items", [])
panels = n.get("elements", [])
out["widgets"].append({
"type": "accordion",
"items": [
{"title": it.get("item_title", ""), **extract_container(panel.get("elements", []))}
for it, panel in zip(items, panels)
],
})
continue
if wtype == "nested-tabs":
tabs = settings.get("tabs", [])
panels = n.get("elements", [])
out["widgets"].append({
"type": "tabs",
"items": [
{"title": t.get("tab_title", ""), **extract_container(panel.get("elements", []))}
for t, panel in zip(tabs, panels)
],
})
continue
if wtype == "nested-carousel":
slide_meta = settings.get("carousel_items", [])
panels = n.get("elements", [])
out["widgets"].append({
"type": "carousel",
"slides": [
{"title": m.get("slide_title", ""), **extract_container(panel.get("elements", []))}
for m, panel in zip(slide_meta, panels)
],
})
continue
if wtype == "premium-carousel-widget":
# Sin contenido textual propio: solo controla un carrusel
# visual de las secciones vecinas (progressbars). Se deja
# constancia de que existe para que Fase 2 decida el efecto.
rep = settings.get("premium_carousel_templates_repeater", [])
out["widgets"].append({"type": "carousel-decorative", "slideCount": len(rep)})
continue
if wtype == "slides":
slides = settings.get("slides", [])
out["widgets"].append({
"type": "slideshow",
"slides": [
{
"heading": s.get("heading", ""),
"description": s.get("description", ""),
"buttonText": s.get("button_text", ""),
"image": {"url": (s.get("background_image") or {}).get("url", "")},
}
for s in slides
],
})
continue
if wtype == "premium-addon-progressbar":
out["widgets"].append({
"type": "progressbar",
"leftLabel": settings.get("premium_progressbar_left_label", ""),
"rightLabel": settings.get("premium_progressbar_right_label", ""),
"percent": settings.get("premium_progressbar_progress_percentage", ""),
"image": {"url": (settings.get("image_upload") or {}).get("url", "")},
})
continue
if wtype == "premium-addon-fancy-text":
out["widgets"].append({
"type": "fancy-text",
"prefix": settings.get("premium_fancy_prefix_text", ""),
"base": settings.get("text", ""),
"strings": [s.get("premium_text_strings_text_field", "") for s in settings.get("premium_fancy_text_strings", [])],
"suffix": settings.get("premium_fancy_suffix_text", ""),
})
continue
if wtype == "premium-nav-menu":
# El contenido real del menu no vive aqui (son placeholders
# del widget); referencia al menu real de WordPress, ya
# extraido aparte en site.json.menus.
out["widgets"].append({"type": "nav-menu", "menuTermId": settings.get("pa_nav_menus", "")})
continue
if wtype:
# Red de seguridad: cualquier tipo de widget no previsto se
# deja constancia de que existe en vez de perderlo en silencio.
out["widgets"].append({"type": f"unhandled:{wtype}", "settingsKeys": list(settings.keys())[:15]})
continue
if n.get("elements"):
walk(n["elements"])
walk(elements)
return out
def get_elementor_data(cur, post_id):
cur.execute("SELECT meta_value FROM wp_postmeta WHERE post_id=? AND meta_key='_elementor_data'", (post_id,))
row = cur.fetchone()
return json.loads(row[0]) if row and row[0] else []
def extract_sections(cur):
data = get_elementor_data(cur, HOME_ID)
sections = []
for anchor, start, end in SECTION_RANGES:
content = extract_container(data[start:end])
sections.append({"anchor": anchor, **content})
return sections
def extract_pages(cur):
pages = {}
for key, info in PAGES.items():
cur.execute("SELECT post_title FROM wp_posts WHERE ID=?", (info["id"],))
row = cur.fetchone()
title = row[0] if row else ""
data = get_elementor_data(cur, info["id"])
content = extract_container(data)
pages[key] = {"id": info["id"], "title": title, "slug": info["slug"], **content}
return pages
def resolve_menu_target(cur, object_id):
"""post_type / post_type_archive menu items guardan la URL real en la
pagina referenciada (object_id), no en _menu_item_url (que suele venir
vacio para estos). Devuelve (titulo, url) o (None, None) si no aplica."""
if not object_id:
return None, None
cur.execute("SELECT ID, post_title, post_name FROM wp_posts WHERE ID=?", (object_id,))
row = cur.fetchone()
if not row:
return None, None
pid, title, slug = row
url = "/" if pid == HOME_ID else f"/{slug}"
return title, url
def extract_menus(cur):
menus = {}
for name, term_id in MENU_TERM_IDS.items():
cur.execute("""
SELECT p.ID, p.post_title, p.menu_order
FROM wp_posts p
JOIN wp_term_relationships tr ON tr.object_id = p.ID
JOIN wp_term_taxonomy tt ON tt.term_taxonomy_id = tr.term_taxonomy_id
WHERE tt.term_id = ? AND p.post_type = 'nav_menu_item'
ORDER BY p.menu_order
""", (term_id,))
items = []
for pid, title, order in cur.fetchall():
cur.execute("SELECT meta_key, meta_value FROM wp_postmeta WHERE post_id=? AND meta_key IN ('_menu_item_url','_menu_item_object_id','_menu_item_type')", (pid,))
meta = dict(cur.fetchall())
item_type = meta.get("_menu_item_type", "")
url = meta.get("_menu_item_url", "")
if item_type == "post_type" and not url:
resolved_title, resolved_url = resolve_menu_target(cur, meta.get("_menu_item_object_id"))
title = title or resolved_title or ""
url = resolved_url or ""
items.append({
"order": order,
"title": title,
"url": url,
"type": item_type,
})
menus[name] = items
return menus
def extract_theme(cur):
cur.execute("SELECT meta_value FROM wp_postmeta WHERE post_id=? AND meta_key='_elementor_page_settings'", (KIT_ID,))
row = cur.fetchone()
if not row or not row[0]:
return {}
kit = php_unserialize(row[0])
colors = {c["_id"]: {"title": c["title"], "hex": c["color"]} for c in kit.get("system_colors", [])}
typo = {}
for t in kit.get("system_typography", []):
size = t.get("typography_font_size", {})
typo[t["_id"]] = {
"title": t.get("title", ""),
"fontFamily": t.get("typography_font_family", ""),
"fontWeight": t.get("typography_font_weight", ""),
"fontSize": size.get("size") if isinstance(size, dict) else None,
}
return {"colors": colors, "typography": typo}
def extract_contact_form(cur):
cur.execute("SELECT post_content FROM wp_posts WHERE ID=?", (WPFORMS_ID,))
row = cur.fetchone()
if not row or not row[0]:
return {}
form = json.loads(row[0])
fields = []
for f in form.get("fields", {}).values():
fields.append({
"id": f.get("id"),
"type": f.get("type"),
"label": f.get("label"),
"required": f.get("required") == "1",
})
return {"id": WPFORMS_ID, "title": form.get("form_title", ""), "fields": fields}
def collect_image_urls(obj, found):
if isinstance(obj, str):
for m in IMG_URL_RE.findall(obj):
found.add(m)
elif isinstance(obj, dict):
for v in obj.values():
collect_image_urls(v, found)
elif isinstance(obj, list):
for v in obj:
collect_image_urls(v, found)
def main():
if len(sys.argv) < 2:
print("Uso: extract_site.py <wp.sqlite valido> [salida.json]", file=sys.stderr)
sys.exit(1)
db_path = sys.argv[1]
out_path = sys.argv[2] if len(sys.argv) > 2 else "src/content/site.json"
con = sqlite3.connect(f"file:{db_path}?mode=ro", uri=True)
cur = con.cursor()
cur.execute("SELECT option_value FROM wp_options WHERE option_name='blogname'")
name = cur.fetchone()[0]
cur.execute("SELECT option_value FROM wp_options WHERE option_name='blogdescription'")
description = cur.fetchone()[0]
menus = extract_menus(cur)
# "menu" (compat con Navbar.jsx actual): mismo formato que antes,
# tomado del menu "principal".
legacy_menu = [
{"order": m["order"], "title": m["title"], "type": "custom", "url": m["url"], "object_id": ""}
for m in menus["principal"]
]
site_json = {
"site": {"name": name, "description": description, "url": "http://remigracion.es", "lang": "es_ES"},
"menu": legacy_menu,
"menus": menus,
"theme": extract_theme(cur),
"sections": extract_sections(cur),
"pages": extract_pages(cur),
"contactForm": extract_contact_form(cur),
}
image_urls = set()
collect_image_urls(site_json, image_urls)
with open(out_path, "w", encoding="utf-8") as f:
json.dump(site_json, f, ensure_ascii=False, indent=2)
urls_path = out_path.replace(".json", "") + ".image-urls.txt"
with open(urls_path, "w", encoding="utf-8") as f:
for u in sorted(image_urls):
f.write(u + "\n")
print(f"OK -> {out_path}")
print(f"Secciones: {len(site_json['sections'])}")
for s in site_json["sections"]:
print(f" {s['anchor']}: headings={len(s['headings'])} paragraphs={len(s['paragraphs'])} images={len(s['images'])} lists={len(s['lists'])} widgets={len(s['widgets'])}")
print(f"Paginas: {list(site_json['pages'].keys())}")
print(f"Imagenes referenciadas (unicas): {len(image_urls)} -> {urls_path}")
print(f"Formulario: {site_json['contactForm'].get('fields')}")
print(f"Tema: {json.dumps(site_json['theme'], ensure_ascii=False)[:300]}")
if __name__ == "__main__":
main()
+235
View File
@@ -0,0 +1,235 @@
/*
* Remigración.es — estilos base para la versión React del sitio.
* Color de acento (#bd4a2a) tomado del HTML original, donde aparece
* embebido en los <span style="color: #bd4a2a"> del contenido de Elementor.
*/
:root {
--color-bg: #ffffff;
--color-bg-alt: #f2ede6;
--color-bg-dark: #1a1a1a;
--color-text: #1f1f1f;
--color-text-dim: #555;
--color-accent: #bd4a2a;
--color-accent-dark: #8a3419;
--font-display: "Playfair Display", Georgia, serif;
--font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--max-width: 1100px;
}
/* Reset mínimo */
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
background: var(--color-bg);
color: var(--color-text);
font-family: var(--font-body);
line-height: 1.6;
scroll-behavior: smooth;
}
img {
max-width: 100%;
height: auto;
display: block;
}
/* ------- Navbar ------- */
.nav {
position: sticky;
top: 0;
z-index: 100;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: saturate(180%) blur(10px);
border-bottom: 1px solid #e5e5e5;
}
.nav-inner {
max-width: var(--max-width);
margin: 0 auto;
padding: 0.9rem 1.25rem;
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
}
.brand {
font-family: var(--font-display);
font-weight: 700;
font-size: 1.25rem;
color: var(--color-text);
text-decoration: none;
letter-spacing: -0.01em;
}
.brand:hover {
color: var(--color-accent);
}
.nav-links {
list-style: none;
margin: 0;
padding: 0;
display: flex;
gap: 1.25rem;
flex-wrap: wrap;
}
.nav-links a {
color: var(--color-text);
text-decoration: none;
font-size: 0.95rem;
font-weight: 500;
transition: color 0.15s ease;
}
.nav-links a:hover {
color: var(--color-accent);
}
/* ------- Secciones ------- */
.section {
padding: 5rem 1.25rem;
}
.section-inner {
max-width: var(--max-width);
margin: 0 auto;
}
.section--default {
background: var(--color-bg);
}
.section--alt {
background: var(--color-bg-alt);
}
.section--hero {
background: linear-gradient(180deg, #14110f 0%, #2a1f18 100%);
color: #fff;
padding: 7rem 1.25rem 6rem;
text-align: center;
}
.section--hero .section-heading,
.section--hero .section-paragraph {
color: #fff;
}
.section-heading {
font-family: var(--font-display);
font-weight: 700;
margin: 0 0 1rem;
line-height: 1.15;
letter-spacing: -0.02em;
}
.section-heading--h1 {
font-size: clamp(2.2rem, 5vw, 3.8rem);
}
.section-heading--h2 {
font-size: clamp(1.8rem, 4vw, 2.8rem);
}
.section-heading--h3 {
font-size: clamp(1.4rem, 3vw, 2rem);
}
.section-heading--h4,
.section-heading--h5,
.section-heading--h6 {
font-size: 1.15rem;
}
.section-paragraph {
font-size: 1.05rem;
margin: 0 0 1.25rem;
color: var(--color-text);
}
.section--hero .section-paragraph {
max-width: 750px;
margin-inline: auto;
font-size: 1.15rem;
opacity: 0.92;
}
.section-paragraph p {
margin: 0 0 1em;
}
.section-paragraph strong {
color: var(--color-accent);
}
/* Respetar el <span style="color: #bd4a2a"> que viene del HTML original */
.section-paragraph span[style*='bd4a2a'],
.section-heading span[style*='bd4a2a'] {
color: var(--color-accent) !important;
}
.section-figure {
margin: 2rem 0;
}
.section-figure img {
border-radius: 8px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.section-list {
padding-left: 1.2rem;
margin: 1rem 0;
}
.section-list li {
margin: 0.5rem 0;
}
/* ------- Footer ------- */
.site-footer {
background: var(--color-bg-dark);
color: #d8d6d4;
padding: 3rem 1.25rem;
}
.site-footer-inner {
max-width: var(--max-width);
margin: 0 auto;
display: flex;
flex-direction: column;
gap: 0.75rem;
align-items: center;
text-align: center;
}
.site-footer-brand {
font-family: var(--font-display);
font-size: 1.25rem;
margin: 0;
color: #fff;
}
.site-footer-copy {
margin: 0;
font-size: 0.9rem;
opacity: 0.7;
}
.site-footer-links {
list-style: none;
margin: 0.5rem 0 0;
padding: 0;
display: flex;
gap: 1.5rem;
}
.site-footer-links a {
color: #d8d6d4;
text-decoration: none;
font-size: 0.9rem;
}
.site-footer-links a:hover {
color: var(--color-accent);
}
/* ------- Responsive ------- */
@media (max-width: 640px) {
.nav-inner {
flex-direction: column;
align-items: flex-start;
gap: 0.6rem;
}
.nav-links {
font-size: 0.85rem;
gap: 0.9rem;
}
.section {
padding: 3.5rem 1rem;
}
.section--hero {
padding: 4.5rem 1rem 4rem;
}
}
+55
View File
@@ -0,0 +1,55 @@
import Navbar from './components/Navbar'
import Section from './components/Section'
import Footer from './components/Footer'
import siteData from './content/site.json'
import './App.css'
// Variantes visuales por anchor para romper la monotonía
const VARIANTS = {
'first-section': 'hero',
significa: 'default',
'inmigración_masiva': 'alt',
detener_el_reemplazo_poblacional: 'default',
que_podemoshacer: 'alt',
precedentes_historicos: 'default',
contacto: 'hero',
}
// Orden en que aparecen en la página — coincide con el orden del menú
const SECTION_ORDER = [
'first-section',
'significa',
'inmigración_masiva',
'detener_el_reemplazo_poblacional',
'que_podemoshacer',
'precedentes_historicos',
'contacto',
]
function App() {
const byAnchor = Object.fromEntries(
siteData.sections.map((s) => [s.anchor, s])
)
return (
<>
<Navbar />
<main>
{SECTION_ORDER.map((anchor) => {
const s = byAnchor[anchor]
if (!s) return null
return (
<Section
key={anchor}
section={s}
variant={VARIANTS[anchor] || 'default'}
/>
)
})}
</main>
<Footer />
</>
)
}
export default App
+23
View File
@@ -0,0 +1,23 @@
import siteData from '../content/site.json'
export default function Footer() {
const { site } = siteData
return (
<footer className="site-footer" id="contacto-footer">
<div className="site-footer-inner">
<p className="site-footer-brand">{site.name}</p>
<p className="site-footer-copy">
{site.description} — Todos los derechos reservados
</p>
<ul className="site-footer-links">
<li>
<a href="/informacion-sobre-las-cookies">Cookies</a>
</li>
<li>
<a href="/aviso-legal-y-proteccion-de-datos">Aviso legal</a>
</li>
</ul>
</div>
</footer>
)
}
+21
View File
@@ -0,0 +1,21 @@
import siteData from '../content/site.json'
export default function Navbar() {
const { site, menu } = siteData
return (
<nav className="nav">
<div className="nav-inner">
<a href="#first-section" className="brand">
{site.name}
</a>
<ul className="nav-links">
{menu.map((item) => (
<li key={item.order}>
<a href={item.url}>{item.title}</a>
</li>
))}
</ul>
</div>
</nav>
)
}
+56
View File
@@ -0,0 +1,56 @@
/**
* Renderiza una sección del JSON extraído del export de Elementor.
*
* Los campos `html` contienen HTML tal cual lo guardaba Elementor (con <br>,
* <span style="color: #bd4a2a">…</span>, etc.). Lo inyectamos con
* dangerouslySetInnerHTML porque son datos nuestros ya saneados en origen.
*/
export default function Section({ section, variant = 'default' }) {
const { anchor, headings, paragraphs, images, lists } = section
return (
<section id={anchor} className={`section section--${variant}`}>
<div className="section-inner">
{headings.slice(0, 2).map((h, i) => {
const Tag = (h.level || 'h2').toLowerCase()
return (
<Tag
key={`h-${i}`}
className={`section-heading section-heading--${Tag}`}
dangerouslySetInnerHTML={{ __html: h.html }}
/>
)
})}
{images.slice(0, 1).map((img, i) => (
<figure key={`img-${i}`} className="section-figure">
<img src={img.url} alt={img.alt || ''} loading="lazy" />
</figure>
))}
{paragraphs.slice(0, 5).map((p, i) => (
<div
key={`p-${i}`}
className="section-paragraph"
dangerouslySetInnerHTML={{ __html: p }}
/>
))}
{lists.length > 0 && (
<div className="section-lists">
{lists.map((l, i) => (
<ul key={`l-${i}`} className="section-list">
{l.map((item, j) => (
<li
key={j}
dangerouslySetInnerHTML={{ __html: item }}
/>
))}
</ul>
))}
</div>
)}
</div>
</section>
)
}
+26
View File
@@ -0,0 +1,26 @@
http://remigracion.es/wp-content/uploads/2025/10/f.elconfidencial.com_original_f8e_780_24a_f8e78024ab9c646d096e6ac8c2f8e503.jpg
http://remigracion.es/wp-content/uploads/2025/11/question-2.png
http://remigracion.es/wp-content/uploads/2026/02/Imagen2.png
http://remigracion.es/wp-content/uploads/2026/02/Sin-titulo-1-e1769969819361.jpg
http://remigracion.es/wp-content/uploads/2026/02/Sin-titulo-11.jpg
http://remigracion.es/wp-content/uploads/2026/02/Sin-titulo-15.jpg
http://remigracion.es/wp-content/uploads/2026/02/Sin-titulo-18.jpg
http://remigracion.es/wp-content/uploads/2026/02/Sin-titulo-20.jpg
http://remigracion.es/wp-content/uploads/2026/02/Sin-titulo-22.jpg
http://remigracion.es/wp-content/uploads/2026/02/Sin-titulo-23.jpg
http://remigracion.es/wp-content/uploads/2026/02/Sin-titulo-24.jpg
http://remigracion.es/wp-content/uploads/2026/02/Sin-titulo-29.jpg
http://remigracion.es/wp-content/uploads/2026/02/Sin-titulo-3-e1769970459949.jpg
http://remigracion.es/wp-content/uploads/2026/02/Sin-titulo-30.jpg
http://remigracion.es/wp-content/uploads/2026/02/Sin-titulo-31.jpg
http://remigracion.es/wp-content/uploads/2026/02/Sin-titulo-4-e1769970494226.jpg
http://remigracion.es/wp-content/uploads/2026/02/Sin-titulo-5-e1769970526297.jpg
http://remigracion.es/wp-content/uploads/2026/02/Sin-titulo-50.jpg
http://remigracion.es/wp-content/uploads/2026/02/placeholder-10.png
http://remigracion.es/wp-content/uploads/2026/02/placeholder-11.png
http://remigracion.es/wp-content/uploads/2026/02/placeholder-8.png
http://remigracion.es/wp-content/uploads/2026/02/placeholder-9.png
http://remigracion.es/wp-content/uploads/2026/02/remigracion.jpg
http://remigracion.es/wp-content/uploads/2026/02/titular-final-.png_0000_Sin-titulo-7.png
http://remigracion.es/wp-content/uploads/2026/02/titular-final-.png_0001_Sin-titulo-6.png
http://remigracion.es/wp-content/uploads/2026/02/z-9.jpg
File diff suppressed because one or more lines are too long
+27
View File
@@ -0,0 +1,27 @@
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
min-height: 100vh;
font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #1f1f1f;
background: #ffffff;
}
#root {
min-height: 100vh;
}
/* Anclas offset para no quedar debajo del navbar sticky */
:target {
scroll-margin-top: 80px;
}
+10
View File
@@ -0,0 +1,10 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App.jsx'
createRoot(document.getElementById('root')).render(
<StrictMode>
<App />
</StrictMode>,
)
+7
View File
@@ -0,0 +1,7 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
})