From 32acdb386052966e2ea62a4bbeef5357b5d2e490 Mon Sep 17 00:00:00 2001 From: Michael Silber Date: Sun, 13 Jul 2014 00:02:23 -0400 Subject: [PATCH] Move
and .sidebar markup out of PHP Add more efficient LESS with variables Add new line to _variables.less Add sidebar class to body element instead of main element Change body sidebar class to .sidebar-active Change body sidebar class to .sidebar-primary Correct spacing issues --- assets/less/_variables.less | 4 ++++ assets/less/layouts/_general.less | 7 ++++++- assets/less/layouts/_sidebar.less | 4 +++- base.php | 4 ++-- lib/config.php | 21 +++++---------------- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/assets/less/_variables.less b/assets/less/_variables.less index 104bb1f240..9c14db13dd 100644 --- a/assets/less/_variables.less +++ b/assets/less/_variables.less @@ -8,3 +8,7 @@ // ------------------------- @icon-font-path: "../vendor/bootstrap/fonts/"; + +@main-sm-columns: @grid-columns; + +@sidebar-sm-columns: 4; diff --git a/assets/less/layouts/_general.less b/assets/less/layouts/_general.less index 56330b94c8..c0d5dc422c 100644 --- a/assets/less/layouts/_general.less +++ b/assets/less/layouts/_general.less @@ -2,4 +2,9 @@ .wrap { } // Main content area -.main { } +.main { + .make-sm-column(@main-sm-columns); + .sidebar-primary & { + .make-sm-column(@main-sm-columns - @sidebar-sm-columns); + } +} diff --git a/assets/less/layouts/_sidebar.less b/assets/less/layouts/_sidebar.less index e33ad3189b..0a735c9268 100644 --- a/assets/less/layouts/_sidebar.less +++ b/assets/less/layouts/_sidebar.less @@ -1 +1,3 @@ -.sidebar { } +.sidebar { + .make-sm-column(@sidebar-sm-columns); +} diff --git a/base.php b/base.php index ce3e1022eb..27c050b2ed 100644 --- a/base.php +++ b/base.php @@ -14,11 +14,11 @@
-
+
-