feat: add prerender scripts for single product rendering and enhance layout in PrerenderProduct and Footer components

This commit is contained in:
sebseb7
2025-07-20 10:40:22 +02:00
parent b8d8003ac3
commit bffb1fed27
3 changed files with 69 additions and 6 deletions

View File

@@ -73,11 +73,71 @@ class PrerenderProduct extends React.Component {
{ position: 'sticky', color: 'primary', elevation: 0, sx: { zIndex: 1100 } },
React.createElement(
Toolbar,
{ sx: { minHeight: 64 } },
{ sx: { minHeight: 64, py: { xs: 0.5, sm: 0 } } },
React.createElement(
Container,
{ maxWidth: 'lg', sx: { display: 'flex', alignItems: 'center', px: { xs: 0, sm: 3 } } },
React.createElement(Logo)
{ maxWidth: { xs: false, sm: 'lg' }, sx: { display: 'flex', alignItems: 'center', px: { xs: 0, sm: 3 }, width: '100%' } },
React.createElement(
Box,
{
sx: {
display: 'flex',
alignItems: 'center',
width: '100%',
maxWidth: '100%',
flexDirection: { xs: 'column', sm: 'row' },
overflow: 'hidden'
}
},
React.createElement(
Box,
{
sx: {
display: 'flex',
alignItems: 'center',
width: '100%',
maxWidth: '100%',
justifyContent: { xs: 'space-between', sm: 'flex-start' },
minHeight: { xs: 52, sm: 'auto' },
px: { xs: 0, sm: 0 },
overflow: 'hidden'
}
},
React.createElement(Logo),
// Invisible ButtonGroup placeholder for mobile layout
React.createElement(
Box,
{
sx: {
display: { xs: 'flex', sm: 'none' },
alignItems: 'flex-end',
transform: 'translateY(4px) translateX(9px)',
ml: 0,
visibility: 'hidden',
width: 120, // Approximate width of ButtonGroup
height: 40
}
}
)
),
// Invisible SearchBar placeholder for mobile - matches SPA layout
React.createElement(
Box,
{
sx: {
display: { xs: 'block', sm: 'none' },
width: '100%',
maxWidth: '100%',
mt: { xs: 1, sm: 0 },
mb: { xs: 0.5, sm: 0 },
px: { xs: 0, sm: 0 },
height: 41, // Small TextField height
visibility: 'hidden',
overflow: 'hidden'
}
}
)
)
)
)
),
@@ -334,6 +394,7 @@ class PrerenderProduct extends React.Component {
{
sx: {
mt: "auto",
transform: "translateY(-1px)", // Move 1px up
p: 3,
background: "#f9f9f9",
borderRadius: 2,