From 14c199cfccb88016224a387b209e566b5c15d98c Mon Sep 17 00:00:00 2001
From: Thomas JUND <tjund@entrouvert.com>
Date: Fri, 13 Nov 2020 11:15:16 +0100
Subject: [PATCH] templates: introduce .column instead #left & #right (#48515)

---
 static/includes/_cells.scss                      | 16 ++++++++--------
 static/includes/_layout.scss                     |  8 ++------
 templates/authentic2/accounts.html               |  4 ++--
 templates/combo/page_template_2cols.html         |  4 ++--
 templates/combo/page_template_2cols_sidebar.html |  4 ++--
 5 files changed, 16 insertions(+), 20 deletions(-)

diff --git a/static/includes/_cells.scss b/static/includes/_cells.scss
index 7a9da3d2..6092f1f7 100644
--- a/static/includes/_cells.scss
+++ b/static/includes/_cells.scss
@@ -34,20 +34,20 @@ $cell-image-padding: 0.5rem !default;
 
 // Columns gutters
 @media screen and ($min-desktop-viewport) {
-	div#left div.a2-block, div#right div.a2-block,
+	.column div.a2-block,
 	.gru-content div.cell,
 	.block {
 		margin-left: #{$columns-gutter / 2};
 		margin-right: #{$columns-gutter / 2};
 	}
 	.gru-content #columns > .cell,
-	div#left .block,
-	div#left div.a2-block,
-	.gru-content #left .cell { margin-left: 0; }
+	.column:first-child .block,
+	.column:first-child div.a2-block,
+	.gru-content .column:first-child .cell { margin-left: 0; }
 	.gru-content #columns > .cell,
-	div#right .block,
-	div#right div.a2-block,
-	.gru-content #right .cell { margin-right: 0; }
+	.column:last-child .block,
+	.column:last-child div.a2-block,
+	.gru-content .column:last-child .cell { margin-right: 0; }
 }
 
 
@@ -83,7 +83,7 @@ div.a2-block,
 	border-radius: $cell-border-radius;
 }
 
-div#left div.a2-block, div#right div.a2-block,
+.column div.a2-block,
 .gru-content div.cell,
 .block {
 	margin-top: 0;
diff --git a/static/includes/_layout.scss b/static/includes/_layout.scss
index 3c5ddb7a..f02def0a 100644
--- a/static/includes/_layout.scss
+++ b/static/includes/_layout.scss
@@ -83,11 +83,7 @@ div#main-content {
 	min-height: 300px;
 }
 
-#right {
-	float: right;
-	width: 50%;
-}
-#left {
+.column {
 	float: left;
 	width: 50%;
 }
@@ -125,7 +121,7 @@ div#main-content {
 		padding: 0 0.7em;
 		max-width: 100%;
 	}
-	#right, #left {
+	.column {
 		float: none;
 		width: auto;
 	}
diff --git a/templates/authentic2/accounts.html b/templates/authentic2/accounts.html
index 1cab2273..3e2e198a 100644
--- a/templates/authentic2/accounts.html
+++ b/templates/authentic2/accounts.html
@@ -5,7 +5,7 @@
 {% block extra-body-class %}{{ block.super }} account-page{% endblock %}
 
 {% block content %}
-<div id="left" class="profile">
+<div class="column profile">
   {% block profile-pre %}{% endblock %}
   <div class="block" id="a2-profile">
     {% block profile-top %}{% endblock %}
@@ -43,7 +43,7 @@
   </div>
   {% block profile-post %}{% endblock %}
 </div>
-<div id="right" class="account-management">
+<div class="column account-management">
   {% block account-management-pre %}{% endblock %}
   <div class="block" id="account-management">
     {% block account-management-top %}{% endblock %}
diff --git a/templates/combo/page_template_2cols.html b/templates/combo/page_template_2cols.html
index b6714f96..f11ba1fd 100644
--- a/templates/combo/page_template_2cols.html
+++ b/templates/combo/page_template_2cols.html
@@ -2,11 +2,11 @@
 {% load combo i18n %}
 
 {% block columns %}
-<div id="left">
+<div id="left" class="column">
 {% trans "Left column" as name %}
 {% placeholder "content" name=name %}
 </div>
-<div id="right">
+<div id="right" class="column">
 {% trans "Right column" as name %}
 {% placeholder "right" name=name %}
 </div>
diff --git a/templates/combo/page_template_2cols_sidebar.html b/templates/combo/page_template_2cols_sidebar.html
index 6b818e20..d7c2d6ab 100644
--- a/templates/combo/page_template_2cols_sidebar.html
+++ b/templates/combo/page_template_2cols_sidebar.html
@@ -2,11 +2,11 @@
 {% load combo i18n %}
 
 {% block columns %}
-<div id="left">
+<div id="left" class="column">
 {% trans "Left column" as name %}
 {% placeholder "content" name=name %}
 </div>
-<div id="right">
+<div id="right" class="column">
 {% trans "Right column" as name %}
 {% placeholder "right" name=name %}
 </div>
-- 
2.20.1

