From 7314f369af22cdd849812ec5e3697624fc342897 Mon Sep 17 00:00:00 2001 From: Alma Armas Date: Sun, 22 Nov 2020 10:06:49 +0000 Subject: [PATCH] Add themepack option to not inherit default themepack styles --- Web/Presenters/templates/@layout.xml | 19 +++++++++++++++++-- Web/Themes/Themepack.php | 11 +++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/Web/Presenters/templates/@layout.xml b/Web/Presenters/templates/@layout.xml index 99b0dad8..70e98d94 100644 --- a/Web/Presenters/templates/@layout.xml +++ b/Web/Presenters/templates/@layout.xml @@ -7,15 +7,22 @@ - {css "css/style.css"} - {css "css/dialog.css"} {script "js/node_modules/jquery/dist/jquery.min.js"} {script "js/node_modules/umbrellajs/umbrella.min.js"} {script "js/openvk.cls.js"} + {ifset $thisUser} {if !is_null($thisUser->getTheme())} {var theme = $thisUser->getTheme()} + {if $theme->inheritDefault()} + {css "css/style.css"} + {css "css/dialog.css"} + {/if} + + {else} + {css "css/style.css"} + {css "css/dialog.css"} {/if} {if $thisUser->getStyleAvatar() == 1} @@ -24,6 +31,9 @@ {if $thisUser->getStyleAvatar() == 2} {css "css/avatar.2.css"} {/if} + {else} + {css "css/style.css"} + {css "css/dialog.css"} {/ifset} {ifset headIncludes}{include headIncludes}{/ifset} @@ -48,6 +58,11 @@