Gute Idee.
Stelle hier dann auch mal 2 HTML-Strukturen zur Verfügung.
Wer Lust und Laune hat, könnte hierauf aufbauen.
Grid-Layout-Struktur (Responsive)
(Header - Footer - Sidebars - Content)
index.php
<?php /** @var $this \Ilch\Layout\Frontend */ ?><!DOCTYPE html>
<html lang="de">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<?=$this->getHeader() ?>
<link href="<?=$this->getLayoutUrl('style.css') ?>" rel="stylesheet">
<?=$this->getCustomCSS() ?>
</head>
<body>
<div class="rtx_wrapper">
<header class="header">Header</header>
<main class="main-content">Main content</main>
<section class="left-sidebar">Left sidebar</section>
<aside class="right-sidebar">Right sidebar</aside>
<footer class="footer">Footer</footer>
</div>
<?=$this->getFooter() ?>
</body>
</html>
style.css
.rtx_wrapper {
display:grid;
grid-template-areas:
'header'
'main-content'
'left-sidebar'
'right-sidebar'
'footer';
}
.rtx_wrapper > * {
padding:1rem;
}
.rtx_wrapper > .header {
grid-area:header;
background:#f97171;
}
.rtx_wrapper > .main-content {
grid-area:main-content;
background:#fff;
}
.rtx_wrapper > .left-sidebar {
grid-area:left-sidebar;
background:#f5d55f;
}
.rtx_wrapper > .right-sidebar {
grid-area:right-sidebar;
background:#c5ed77;
}
.rtx_wrapper > .footer {
grid-area:footer;
background:#72c2f1;
}
@media (min-width:768px) {
.rtx_wrapper {
grid-template-columns: 1fr 1fr;
grid-template-areas:
'header header'
'main-content main-content'
'left-sidebar right-sidebar'
'footer footer';
}
}
@media (min-width:1024px) {
.rtx_wrapper {
grid-template-columns: repeat(4, 1fr);
grid-template-areas:
'header header header header'
'left-sidebar main-content main-content right-sidebar'
'footer footer footer footer';
}
}
______________________________________________________________________________________________________________
Flexbox-Layout-Struktur (Responsive)
(Header - Footer - Sidebars - Content)
index.php
<?php /** @var $this \Ilch\Layout\Frontend */ ?><!DOCTYPE html>
<html lang="de">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<?=$this->getHeader() ?>
<link href="<?=$this->getLayoutUrl('style.css') ?>" rel="stylesheet">
<?=$this->getCustomCSS() ?>
</head>
<body>
<div class="rtx_wrapper">
<header class="header">Header</header>
<main class="main-content">Main content</main>
<section class="left-sidebar">Left sidebar</section>
<aside class="right-sidebar">Right sidebar</aside>
<footer class="footer">Footer</footer>
</div>
<?=$this->getFooter() ?>
</body>
</html>
style.css
* {
box-sizing:border-box;
}
.rtx_wrapper {
display:flex;
flex-wrap:wrap;
}
.rtx_wrapper > * {
width:100%;
padding:1rem;
}
.rtx_wrapper > .header {background:#f97171}
.rtx_wrapper > .main-content {background:#fff}
.rtx_wrapper > .left-sidebar {background:#f5d55f}
.rtx_wrapper > .right-sidebar {background:#c5ed77}
.rtx_wrapper > .footer {background:#72c2f1}
@media (min-width:768px) {
.rtx_wrapper > .left-sidebar,
.rtx_wrapper > .right-sidebar {
width:50%;
}
}
@media (min-width:1024px) {
.rtx_wrapper > .header {
order:-2;
}
.rtx_wrapper > .left-sidebar {
order:-1;
}
.rtx_wrapper > .main-content {
width:50%;
}
.rtx_wrapper > .left-sidebar,
.rtx_wrapper > .right-sidebar {
width:25%;
}
}