Commit a227c578 authored by danpros's avatar danpros

Mobile first layout for the sidebars and main content.

parent dc4abfe4
This diff is collapsed.
......@@ -47,7 +47,7 @@
}
#slideshow-wrapper {
height:365px;
background-image: url("../images/slideshow-shadow.gif");
background-image: url("../images/slideshow-shadow.png");
}
#preface-wrapper.in3 .column, #preface-wrapper.in2 .column, #preface-wrapper.in1 .column, #bottom-teaser.in3 .column, #bottom-teaser.in2 .column, #bottom-teaser.in1 .column, #bottom-wrapper.in4 .column, #bottom-wrapper.in3 .column, #bottom-wrapper.in2 .column, #bottom-wrapper.in1 .column {
width:100%;
......@@ -75,6 +75,10 @@
#header .region, #menu .region, #slideshow .region {
padding:0;
}
#bottom-wrapper {
border-left:none;
border-right: none;
}
}
......@@ -85,7 +89,7 @@
}
#slideshow-wrapper {
height:265px;
background-image: url("../images/slideshow-shadow.gif");
background-image: url("../images/slideshow-shadow.png");
}
.region-header {
......
......@@ -421,25 +421,33 @@ h1,h2,h3,h4,h5,h6 {
#layout-type-1 #sidebar-left {
width: 26%;
float: left;
margin-left: -98.5%;
font-size:12px;
}
#layout-type-2 #sidebar-left {
width: 21%;
float: left;
margin-right: 2%;
margin-left: -77%;
font-size:12px;
}
.one-sidebar #content{
width: 69%;
margin-left: 25px;
.one-sidebar-left #content{
width: 70.5%;
float: left;
margin-left: 28%;
}
.one-sidebar-right #content{
width: 70.5%;
float: left;
margin-left: 1.5%;
}
.two-sidebars #content{
width: 54%;
float: left;
margin-left: 23%;
}
#layout-type-1 #sidebar-right {
......
......@@ -2,7 +2,7 @@ name: Danland
type: theme
base theme: classy
description: Drupal Theme provided by <a href="http://www.danetsoft.com">Danetsoft</a> developed by <a href="http://www.danpros.com">Danang Probo Sayekti</a> inspired by <a href="http://www.maksimer.no">Maksimer</a>.
core: 8.x
# core: 8.x
regions:
header: Header
search_box: Search region
......
......@@ -20,6 +20,13 @@ function danland_preprocess_html(&$variables) {
else {
$variables['attributes']['class'][] = 'no-sidebars';
}
if (!empty($variables['page']['sidebar_first']) && empty($variables['page']['sidebar_second'])) {
$variables['attributes']['class'][] = 'one-sidebar-left';
}
elseif (empty($variables['page']['sidebar_first']) && !empty($variables['page']['sidebar_second'])) {
$variables['attributes']['class'][] = 'one-sidebar-right';
}
}
......
......@@ -90,14 +90,6 @@
<div style="clear:both"></div>
<div id="wrapper">
{% if page.sidebar_first %}
<div id="sidebar-left" class="column sidebar">
<div class="section">
{{ page.sidebar_first }}
</div>
</div> <!-- end sidebar-first -->
{% endif %}
<div id="content">
......@@ -149,6 +141,14 @@
{% endif %}
</div> <!-- end content -->
{% if page.sidebar_first %}
<div id="sidebar-left" class="column sidebar">
<div class="section">
{{ page.sidebar_first }}
</div>
</div> <!-- end sidebar-first -->
{% endif %}
{% if page.sidebar_second %}
<div id="sidebar-right" class="column sidebar">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment