From d25b3adef04041ee6c0fab0240b6ee7bdd198c3c Mon Sep 17 00:00:00 2001
From: Alexander Bilz <mail@alexbilz.com>
Date: Fri, 07 May 2021 20:28:47 +0000
Subject: [PATCH] Variable Sidebar RTL

---
 assets/css/style.rtl.css   |   29 +++++++++++------------------
 layouts/partials/head.html |    3 ++-
 2 files changed, 13 insertions(+), 19 deletions(-)

diff --git a/assets/css/style.rtl.css b/assets/css/style.rtl.css
index accd6e6..5e0bfab 100644
--- a/assets/css/style.rtl.css
+++ b/assets/css/style.rtl.css
@@ -272,7 +272,6 @@
     height: 100%;
     top: 0;
     right: 0;
-    float: left;
     position: fixed;
     z-index: 4;
     border-left: 1px solid var(--border-color);
@@ -1089,25 +1088,19 @@
 }
 
 @media (min-width: 1921px){
-    .content {
-        padding-right: 25%;
-        width: var(--content-max-width);
-    }
     .sidebar {
-        width: var(--sidebar-max-width);
-        left: 50%;
-        margin-left: calc( -1 * var(--body-max-width)/2);
+        padding-right: 17%;
+        width: calc(var(--sidebar-width) - 20%);
+        padding-left: 3%;
     }
-
-    .page-top {
-        width: var(--content-max-width);
+    .content {
+        margin-right: calc(15% + var(--sidebar-width));
+        width: calc(var(--content-width) - 20%);
+        padding-left: 20%;
+    }
+    .page-top{
         position: fixed;
-        left: 50%;
-        margin-left: calc(-1* (var(--body-max-width)/2 - var(--sidebar-max-width) ));
-        z-index: 3;
-        background-color: var(--bg-color);
-        height: 60px;
-        border-bottom: 1px solid var(--border-color);
+        width: calc(var(--content-width));
     }
 }
 
@@ -1180,4 +1173,4 @@
     border: 1px solid var(--form-button-hover-border-color);
 }
 
-/* (CONTACT) FORM END */
+/* (CONTACT) FORM END */
\ No newline at end of file
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index d19b5fc..becba47 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -13,7 +13,8 @@
     <!-- CSS -->
     
     {{ if eq .Site.Language.LanguageDirection "rtl"}}
-    {{ $style := resources.Get "css/style.rtl.css" | resources.Minify | resources.Fingerprint }}
+    {{ $templateStyle := resources.Get "css/style.rtl.css" }}
+    {{ $style := $templateStyle  | resources.ExecuteAsTemplate "css/main.css" . | resources.Minify | resources.Fingerprint }}
     <link rel="stylesheet"
           href="{{ $style.RelPermalink }}"
           integrity="{{ $style.Data.Integrity }}"

--
Gitblit v1.10.0