Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE OR ALTER PROCEDURE [dbo].as_design_processSettings
- AS
- BEGIN
- declare @css nvarchar(max) =''
- declare @breadcrumbShadow bit = try_cast(dbo.as_design_getSetting('breadcrumbShadow', '') as bit)
- if(@breadcrumbShadow=1) begin
- set @css = @css + '
- html body .breadcrumb{
- -webkit-box-shadow: 0px 0px 10px 2px rgba(34, 60, 80, 0.2);
- -moz-box-shadow: 0px 0px 10px 2px rgba(34, 60, 80, 0.2);
- box-shadow: 0px 0px 10px 2px rgba(34, 60, 80, 0.2);
- }'+ char(10)+ char(13)
- end
- declare @menuIconSize nvarchar(128) =dbo.as_design_getSetting('menuIconSize', '')
- if(isnull(@menuIconSize,'')<>'')begin
- set @css = @css + '
- html .sidebar-toggled .sidebar .nav-item .nav-link i {
- font-size: '+@menuIconSize+'rem;
- }'+ char(10)+ char(13)
- end
- declare @topBackground nvarchar(128) =dbo.as_design_getSetting('topBackground', '')
- if(isnull(@topBackground,'')<>'' and lower(@topBackground)<>'#000000')begin
- set @css = @css + '
- html #as-topMenuCont {
- background-color: '+@topBackground+' !important;
- }'+ char(10)+ char(13)
- end
- declare @background nvarchar(128) =dbo.as_design_getSetting('background', '')
- if(isnull(@background,'')<>'' and lower(@background)<>'#000000')begin
- set @css = @css + '
- html #content-wrapper {
- background-color: '+@background+' !important;
- }'+ char(10)+ char(13)
- end
- declare @menuBackground nvarchar(128) =dbo.as_design_getSetting('menuBackground', '')
- if(isnull(@menuBackground,'')<>'' and lower(@menuBackground)<>'#000000')begin
- set @css = @css + '
- html #accordionSidebar {
- background-color: '+@menuBackground+' !important; background-image: none;
- }'+ char(10)+ char(13)
- end
- declare @breadcrumbBackground nvarchar(128) =dbo.as_design_getSetting('breadcrumbBackground', '')
- if(isnull(@breadcrumbBackground,'')<>'' and lower(@breadcrumbBackground)<>'#000000')begin
- set @css = @css + '
- html .breadcrumb {
- background-color: '+@breadcrumbBackground+' !important;
- }'+ char(10)+ char(13)
- end
- declare @colorLink nvarchar(128) =dbo.as_design_getSetting('colorLink', '')
- if(isnull(@colorLink,'')<>'' and lower(@colorLink)<>'#000000')begin
- set @css = @css + '
- html body a {
- color: '+@colorLink+';
- }'+ char(10)+ char(13)
- end
- declare @fontSize nvarchar(128) =dbo.as_design_getSetting('fontSize', '')
- if(isnull(@fontSize,'')<>'')begin
- set @css = @css + '
- html body {
- font-size: '+@fontSize+' !important;
- }'+ char(10)+ char(13)
- end
- declare @hideScrollTopButton bit = try_cast(dbo.as_design_getSetting('hideScrollTopButton', '') as bit)
- if(@hideScrollTopButton=1) begin
- set @css = @css + '
- html .scroll-to-top{display: none !important;}'+ char(10)+ char(13)
- end
- declare @id int = (select top 1 id from as_settings where code= 'autoGlobalCSS')
- if(@id is null) insert into as_settings(code, value) values('autoGlobalCSS', @css)
- else update as_settings set value = @css where code='autoGlobalCSS'
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement