feat(git): initial commit,
This commit is contained in:
+55
@@ -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
|
||||
Reference in New Issue
Block a user