Error executing template "Designs/ColoursAndCoating_generated/MasterConfigurationPage.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_beed85570bdf473c952648616356ee39.ExecuteAsync()
   at RazorEngine.Templating.TemplateBase.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.DynamicWrapperService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, String name, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, String templateSource, String name, Type modelType, Object model, DynamicViewBag viewBag)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 2 @using Dynamicweb; 3 @using Dynamicweb.Content; 4 @using Bluedesk.DynamicWeb.ItemTypes.Pages; 5 @using Bluedesk.Tools.DynamicWeb.ExtensionMethods; 6 7 8 @{ 9 var websitesettings = Dynamicweb.Content.Services.Items.GetItemById<WebsiteSettings>(Model.Area.Item.Id); 10 var fontconfiguration = Dynamicweb.Content.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "FontConfiguration"); 11 12 var designroot = "/Files/Templates/Designs/" + Pageview.Area.Layout.Design.Name; 13 var app_css = Cache.VersionedFile(designroot + "/dist/app.css"); 14 15 bool is_VisualEditor = Dynamicweb.Context.Current.Request.GetBoolean("visualedit"); 16 17 if (is_VisualEditor) 18 { 19 Dynamicweb.Context.Current.Session["PreviousPage"] = Pageview.Page.ID; 20 } 21 22 string paragraphID = Model.Item.Id; 23 MasterConfigurationPage _data = ItemManager.Storage.GetById<MasterConfigurationPage>(paragraphID ?? "0"); 24 25 string ItemTypeId = _data.HeaderConfigurationID; 26 int HeaderLayoutID = Dynamicweb.Content.Services.Pages.GetPageForItem("HeaderConfigurationPage", ItemTypeId).ID; 27 28 } 29 30 <!DOCTYPE html> 31 <html prefix="og: http://ogp.me/ns#"> 32 <head> 33 34 </head> 35 <body> 36 37 <link href="@app_css" rel="stylesheet" /> 38 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 39 40 @using System; 41 @using System.Linq; 42 @using System.Data; 43 @using System.Globalization; 44 @using System.Reflection; 45 46 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend 47 @using Microsoft.AspNetCore.Http; 48 @using Microsoft.Extensions.DependencyInjection; 49 50 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration 51 @using Dynamicweb.Content.Items; 52 @using Dynamicweb.Environment; 53 @using Dynamicweb.Frontend; 54 @using Dynamicweb.Frontend.Navigation; 55 56 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 57 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 58 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 59 60 @using Bluedesk.Tools.Generic; 61 @using Bluedesk.Tools.DynamicWeb.DataAccess; 62 @using DynamicWeb.CustomCode._webapi.Helpers; 63 @using System.Runtime.Caching 64 65 @{ 66 67 var httpContextAccessor = Dynamicweb.Extensibility.ServiceLocator.Current.GetService<IHttpContextAccessor>(); 68 var httpContext = httpContextAccessor?.HttpContext; 69 70 Dynamicweb.Content.Page? master_configuration = null; 71 MasterConfig mc = null; 72 73 MemoryCache memCacheEcom = MemoryCache.Default; 74 string cacheKeyMasterConfiguration = $"MasterConfiguration_{Pageview.Area}"; 75 string cacheKeyMasterConfig = $"MasterConfig_{Pageview.Area}"; 76 77 if (memCacheEcom.Contains(cacheKeyMasterConfiguration)) 78 { 79 master_configuration = (Dynamicweb.Content.Page?)memCacheEcom.Get(cacheKeyMasterConfiguration); 80 } 81 else 82 { 83 master_configuration = Dynamicweb.Content.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration"); 84 memCacheEcom.Add(cacheKeyMasterConfiguration, master_configuration, DateTimeOffset.Now.AddMinutes(10)); 85 } 86 87 if (memCacheEcom.Contains(cacheKeyMasterConfig)) 88 { 89 mc = (MasterConfig)memCacheEcom.Get(cacheKeyMasterConfig); 90 } 91 else 92 { 93 mc = master_configuration.Item.ToCodeFirstItem<MasterConfig>(); 94 memCacheEcom.Add(cacheKeyMasterConfig, mc, DateTimeOffset.Now.AddMinutes(10)); 95 } 96 97 bool HideStandardFooter = mc.FooterConfiguration.HideStandardFooter.ToString() == "True" ? true : false; 98 99 string MasterConfigCssClass = !string.IsNullOrWhiteSpace(mc.CssClass) ? mc.CssClass : ""; 100 101 // GeneralConfig GeneralConfiguration = mc.GeneralConfiguration; 102 EcomConfig EcommerceConfiguration = mc.EcomConfiguration; 103 104 bool WithVATBool = Pageview.Area.EcomPricesWithVat == "True"; 105 bool pricesWithoutVatForUsers = EcommerceConfiguration.ShowPricesWithoutVatForUsers; 106 bool pricesWithoutVatForValidVat = EcommerceConfiguration.ShowPricesWithoutVatWhenValidVatNumber; 107 if(pricesWithoutVatForUsers && !pricesWithoutVatForValidVat && Pageview.User != null) { 108 WithVATBool = false; 109 } 110 if(pricesWithoutVatForValidVat && Pageview.User != null && !string.IsNullOrWhiteSpace(Pageview.User.VatRegNumber)) { 111 WithVATBool = false; 112 } 113 string ecomShowPricesWithVat = WithVATBool.ToString().ToLower(); 114 string ecomPricesFormatted = (EcommerceConfiguration.FormattedPrices).ToString().ToLower(); 115 116 bool IsNotContentManager = false; 117 bool isVisualEditor = Pageview.IsVisualEditorMode; 118 119 if (isVisualEditor) 120 { 121 Dynamicweb.Context.Current.Session["PreviousPage"] = Pageview.Page.ID; 122 IsNotContentManager = (Dynamicweb.Security.UserManagement.UserContext.Current.User?.GetGroups()?.All(g => g.Name != "Content managers") ?? true); 123 } 124 125 BaseSettingsObj BaseSettings = new BaseSettingsObj(); 126 127 BaseSettings = BaseSettingServices.RenderBaseSettings(Pageview); 128 Dynamicweb.Context.Current.Session["BaseSettings"] = BaseSettings; 129 130 //if (Dynamicweb.Context.Current.Session["BaseSettings"] == null) 131 //{ 132 133 //} 134 //else 135 //{ 136 // BaseSettings = (BaseSettingsObj)Dynamicweb.Context.Current.Session["BaseSettings"]; 137 // if (BaseSettings.AreaID != Pageview.AreaID) 138 // { 139 // BaseSettings = BaseSettingServices.RenderBaseSettings(Pageview); 140 // Dynamicweb.Context.Current.Session["BaseSettings"] = BaseSettings; 141 // } 142 //} 143 144 BaseSettingsBrandConfiguration BaseSettingsBrandConfiguration = BaseSettings.BrandConfiguration; 145 BaseSettingsButtons BaseSettingsButtons = BaseSettingsBrandConfiguration.Buttons; 146 147 var font_configuration = Dynamicweb.Content.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "FontConfiguration"); 148 149 var httpdomain = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain(); 150 var lang = Pageview.Area.CultureInfo.TwoLetterISOLanguageName; 151 var langName = Pageview.Area.Culture; 152 153 var csrftoken = CSRFHelper.TokenHeaderValue(httpContext); 154 var designRoot = BaseSettings.DesignRoot; 155 156 var phonenumber = BaseSettings.CorporateSettings.Phonenumber; 157 var formattedPhonenumber = phonenumber.Replace(" ", String.Empty); 158 var emailadress = BaseSettings.CorporateSettings.Emailadress; 159 var buttonIconClass = Pageview.Area.Item["Global_button_icon"] != null ? Pageview.Area.Item["Global_button_icon"].ToString().Replace("+", " ") : "fal fa-arrow-right"; 160 var callmebackformlink = BaseSettings.BrandConfiguration.CallMeBackForm; 161 var mobileThemeColor = BaseSettings.BrandConfiguration.MobileThemeColor; 162 163 bool isOffline = false; 164 165 DateTime workingHoursStart = BaseSettings.CorporateSettings.OpeningTime; 166 DateTime workingHoursEnd = BaseSettings.CorporateSettings.ClosingTime; 167 DateTime today = DateTime.Now; 168 var cHour = DateTime.Now.TimeOfDay; 169 int cDay = (int)DateTime.Now.DayOfWeek; 170 string availableToHour24hFormat = workingHoursEnd.TimeOfDay.ToString().Substring(0, 5); 171 var timeFromInput = DateTime.ParseExact(availableToHour24hFormat, "H:m", null, DateTimeStyles.None); 172 string availableToHour12hFormat = timeFromInput.ToString("hh:mm tt", CultureInfo.InvariantCulture); 173 var availableToHour = lang == "en" ? availableToHour12hFormat : availableToHour24hFormat; 174 bool isOvertime = cHour >= workingHoursEnd.TimeOfDay || cHour <= workingHoursStart.TimeOfDay; 175 bool isNoValidDate = today < workingHoursStart || today > workingHoursEnd; 176 if (isNoValidDate || isOvertime) 177 { 178 isOffline = true; 179 } 180 181 Boolean showBreadcrumbs = Pageview.Page.PropertyItem != null && Pageview.Page.PropertyItem["ShowBreadcrumbs"] != null ? Convert.ToBoolean(Pageview.Page.PropertyItem["ShowBreadcrumbs"]) : false; 182 183 var appcss = Cache.VersionedFile(designRoot + "/dist/app.css"); 184 185 var favicon32 = Cache.VersionedFile(designRoot + "/assets/img/favicon-32.png", true); 186 var favicon16 = Cache.VersionedFile(designRoot + "/assets/img/favicon-16.png", true); 187 var favicon = Cache.VersionedFile(designRoot + "/assets/img/favicon.ico", true); 188 189 favicon = !string.IsNullOrWhiteSpace(BaseSettings.BrandConfiguration.Favicons.Favicon) ? BaseSettings.BrandConfiguration.Favicons.Favicon : favicon; 190 favicon16 = !string.IsNullOrWhiteSpace(BaseSettings.BrandConfiguration.Favicons.Favicon16) ? BaseSettings.BrandConfiguration.Favicons.Favicon16 : favicon16; 191 favicon32 = !string.IsNullOrWhiteSpace(BaseSettings.BrandConfiguration.Favicons.Favicon32) ? BaseSettings.BrandConfiguration.Favicons.Favicon32 : favicon32; 192 193 var appbundlejs = Cache.VersionedFile(designRoot + "/dist/app.bundle.js"); 194 var appAsyncbundlejs = Cache.VersionedFile(designRoot + "/dist/appAsync.bundle.js"); 195 var vuebundlejs = Cache.VersionedFile(designRoot + "/dist/vue.bundle.js"); 196 197 //*** Start Scanapp configuration ***\\ 198 bool hideHeader = false; 199 bool hideFooter = false; 200 bool hideBottombar = false; 201 202 if (Dynamicweb.Context.Current.Session["ScanApp"] != null) 203 { 204 hideHeader = mc.ScanAppConfig.ShowHeader; 205 hideFooter = mc.ScanAppConfig.ShowFooter; 206 hideBottombar = mc.ScanAppConfig.ShowBottombar; 207 } 208 // END Scanapp configration **\\ 209 210 } 211 212 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 213 @using Bluedesk.DynamicWeb.ItemTypes 214 @using Bluedesk.DynamicWeb.ItemTypes.Extensions 215 216 @functions{ 217 string RenderCSSKeyAndValue(string Key, string Value) 218 { 219 string template = ""; 220 221 if (!string.IsNullOrWhiteSpace(Value)) 222 { 223 template = $@" 224 <text>{Key} : {Value} !important;</text>"; 225 } 226 227 return template; 228 } 229 230 string SetFontCSSVariables(FontConfigurationItemTab FontConfiguration) 231 { 232 string template = ""; 233 System.Text.StringBuilder stringBuilderTemplate = new System.Text.StringBuilder(); 234 235 string Top = FontConfiguration.top != 0 ? FontConfiguration.top.ToString() + "px" : ""; 236 string Left = FontConfiguration.left != 0 ? FontConfiguration.left.ToString() + "px" : ""; 237 string Right = FontConfiguration.right != 0 ? FontConfiguration.right.ToString() + "px" : ""; 238 string Bottom = FontConfiguration.bottom != 0 ? FontConfiguration.bottom.ToString() + "px" : ""; 239 240 string Position = FontConfiguration.PositionAbsolute ? "absolute" : "relative"; 241 242 string Color = FontConfiguration.Color?.GetColorCode(Pageview.AreaID) ?? ""; 243 string BackgroundColor = FontConfiguration.Backgroundcolor?.GetColorCode(Pageview.AreaID) ?? ""; 244 245 string BorderColor = FontConfiguration.BorderColor?.GetColorCode(Pageview.AreaID) ?? ""; 246 string BorderSize = FontConfiguration.BorderSize != 0 ? FontConfiguration.BorderSize.ToString() + "px" : ""; 247 248 stringBuilderTemplate.Append($@" 249 <text> 250 251 --Position: {Position};"); 252 253 stringBuilderTemplate.Append($@"{RenderCSSKeyAndValue("--Padding", FontConfiguration.Padding)}"); 254 stringBuilderTemplate.Append($@"{RenderCSSKeyAndValue("--Top", Top)}"); 255 stringBuilderTemplate.Append($@"{RenderCSSKeyAndValue("--Left", Left)}"); 256 stringBuilderTemplate.Append($@"{RenderCSSKeyAndValue("--Right", Right)}"); 257 stringBuilderTemplate.Append($@"{RenderCSSKeyAndValue("--Bottom", Bottom)}"); 258 stringBuilderTemplate.Append($@"{RenderCSSKeyAndValue("--Color", Color)}"); 259 stringBuilderTemplate.Append($@"{RenderCSSKeyAndValue("--FontSize", FontConfiguration.FontSize)}"); 260 stringBuilderTemplate.Append($@"{RenderCSSKeyAndValue("--FontStyle", FontConfiguration.FontStyle)}"); 261 stringBuilderTemplate.Append($@"{RenderCSSKeyAndValue("--FontWeight", FontConfiguration.FontWeight)}"); 262 stringBuilderTemplate.Append($@"{RenderCSSKeyAndValue("--FontFamily", FontConfiguration.FontConfiguration.FontFamily)}"); 263 stringBuilderTemplate.Append($@"{RenderCSSKeyAndValue("--LineHeight", FontConfiguration.LineHeight)}"); 264 stringBuilderTemplate.Append($@"{RenderCSSKeyAndValue("--BackgroundColor", BackgroundColor)}"); 265 stringBuilderTemplate.Append($@"{RenderCSSKeyAndValue("--BorderColor", BorderColor)}"); 266 stringBuilderTemplate.Append($@"{RenderCSSKeyAndValue("--BorderSize", BorderSize)}"); 267 268 stringBuilderTemplate.Append($@" 269 </text>"); 270 271 return template; 272 } 273 } 274 275 @*@helper RenderCSSKeyAndValue(string Key, string Value) 276 { 277 if (!string.IsNullOrWhiteSpace(Value)) 278 { 279 <text>@Key : @Value !important;</text> 280 } 281 }*@ 282 283 @*@helper SetFontCSSVariables(FontConfigurationItemTab FontConfiguration) 284 { 285 286 string Top = FontConfiguration.top != 0 ? FontConfiguration.top.ToString() + "px" : ""; 287 string Left = FontConfiguration.left != 0 ? FontConfiguration.left.ToString() + "px" : ""; 288 string Right = FontConfiguration.right != 0 ? FontConfiguration.right.ToString() + "px" : ""; 289 string Bottom = FontConfiguration.bottom != 0 ? FontConfiguration.bottom.ToString() + "px" : ""; 290 291 string Position = FontConfiguration.PositionAbsolute ? "absolute" : "relative"; 292 293 string Color = FontConfiguration.Color?.GetColorCode(Pageview.AreaID) ?? ""; 294 string BackgroundColor = FontConfiguration.Backgroundcolor?.GetColorCode(Pageview.AreaID) ?? ""; 295 296 string BorderColor = FontConfiguration.BorderColor?.GetColorCode(Pageview.AreaID) ?? ""; 297 string BorderSize = FontConfiguration.BorderSize != 0 ? FontConfiguration.BorderSize.ToString() + "px" : ""; 298 299 <text> 300 301 --Position: @Position; 302 303 @RenderCSSKeyAndValue("--Padding", FontConfiguration.Padding) 304 305 @RenderCSSKeyAndValue("--Top", Top) 306 @RenderCSSKeyAndValue("--Left", Left) 307 @RenderCSSKeyAndValue("--Right", Right) 308 @RenderCSSKeyAndValue("--Bottom", Bottom) 309 310 @RenderCSSKeyAndValue("--Color", Color) 311 @RenderCSSKeyAndValue("--FontSize", FontConfiguration.FontSize) 312 @RenderCSSKeyAndValue("--FontStyle", FontConfiguration.FontStyle) 313 314 @RenderCSSKeyAndValue("--FontWeight", FontConfiguration.FontWeight) 315 @RenderCSSKeyAndValue("--FontFamily", FontConfiguration.FontConfiguration.FontFamily) 316 @RenderCSSKeyAndValue("--LineHeight", FontConfiguration.LineHeight) 317 318 @RenderCSSKeyAndValue("--BackgroundColor", BackgroundColor) 319 @RenderCSSKeyAndValue("--BorderColor", BorderColor) 320 @RenderCSSKeyAndValue("--BorderSize", BorderSize) 321 322 </text> 323 324 } 325 *@ 326 327 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 328 329 330 <header style="padding: 25px; display: flex; flex-direction: row;"> 331 <div> 332 <h1>Branding Stylesheet</h1> 333 <h2 style="font-weight: normal;">@_data.Title</h2> 334 <button onclick="toggleClass('.slidePanel', 'open'); toggleClass('main', 'blur')" class="togglePanelButton">Open panel</button> 335 </div> 336 <nav style="display: flex; flex-direction: row; margin-left: 50px"> 337 338 @if (Dynamicweb.Context.Current.Session["PreviousPage"] != null) 339 { 340 <a href="/Default.aspx?ID=@Dynamicweb.Context.Current.Session["PreviousPage"]" class="ConfigurationButton"><i class="icon fa-light fa-reply"></i></a> 341 } 342 <a href="/Default.aspx?ID=1598" class="ConfigurationButton"><i class="icon fa-light fa-grid-horizontal"></i><label>Dashboard</label></a> 343 <a href="/Default.aspx?ID=1055" class="ConfigurationButton"><i class="icon fa-light fa-diagram-cells"></i><label>Masters</label></a> 344 <a href="/Default.aspx?ID=1055" class="ConfigurationButton"><i class="icon fa-light fa-link"></i><label>Buttons</label></a> 345 <a href="/Default.aspx?ID=1009" class="ConfigurationButton"><i class="icon fa-light fa-paintbrush"></i><label>Backgrounds</label></a> 346 <a href="/Default.aspx?ID=1460" class="ConfigurationButton"><i class="icon fa-light fa-megaphone"></i><label>Jumbotrons</label></a> 347 <a href="/Default.aspx?ID=1518" class="ConfigurationButton"><i class="icon fa-light fa-brush"></i><label>Themes</label></a> 348 <a href="/Default.aspx?ID=1450" class="ConfigurationButton"><i class="icon fa-light fa-font"></i><label>Fonts</label></a> 349 <a href="/Default.aspx?ID=1514" class="ConfigurationButton"><i class="icon fa-light fa-computer"></i><label>Devices</label></a> 350 351 </nav> 352 </header> 353 <main> 354 <a href="/Default.aspx?ID=@HeaderLayoutID" class="ConfigurationButton"><i class="icon fa-light fa-brush"></i><label>Edit Header configuration</label></a> 355 @RenderGrid(HeaderLayoutID) 356 </main> 357 358 <style> 359 .ConfigurationButton { 360 display: flex; 361 flex-direction: column; 362 height: 100px; 363 width: 100px; 364 margin-right: 25px; 365 padding: 25px; 366 background-color: #f1f1f1; 367 justify-content: center; 368 align-items: center; 369 box-sizing: border-box; 370 text-align: center; 371 font-size: 12px; 372 } 373 374 .ConfigurationButton .icon { 375 font-size: 25px; 376 } 377 </style> 378 379 @Model.Grid("Grid", "Configuration items", "default:true;sort:1", "Configuration") 380 381 @if (fontconfiguration != null) 382 { 383 foreach (var item in fontconfiguration.Item.ToCodeFirstItem<Bluedesk.DynamicWeb.ItemTypes.Pages.ConfigurationPagesParent>().GetChildConfigs<FontConfiguration>()) 384 { 385 <link href="@item["FontLink"]" rel="stylesheet"> 386 } 387 } 388 389 <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-rqn26AG5Pj86AF4SO72RK5fyefcQ/x32DNQfChxWvbXIyXFePlEktwD18fEz+kQU" crossorigin="anonymous"> 390 <script src="https://kit.fontawesome.com/a46eca85e2.js" crossorigin="anonymous"></script> 391 392 <style> 393 394 body { 395 background-color: #f1f1f1; 396 font-family: 'Barlow', sans-serif; 397 } 398 399 .slidePanel { 400 position: fixed; 401 top: 0; 402 bottom: 0; 403 min-width: 500px; 404 box-shadow: -10px 10px 10px rgb(153 153 255 / 10%); 405 background-color: #FFFFFF; 406 z-index: 1000; 407 box-sizing: border-box; 408 transition: all .5s ease-in; 409 } 410 411 .slidePanel.open { 412 right: 0; 413 } 414 415 .slidePanel { 416 right: -500px; 417 transition: all 0.5s ease-in; 418 } 419 420 .slidePanel__container { 421 display: flex; 422 position: relative; 423 height: 100%; 424 } 425 426 .togglePanelButton { 427 position: fixed; 428 top: 50px; 429 left: 50px; 430 display: flex; 431 justify-content: center; 432 align-items: center; 433 color: white; 434 background-color: black; 435 padding: 0px 25px; 436 height: 50px; 437 cursor: pointer; 438 z-index: 1000; 439 } 440 441 .closeButton { 442 position: absolute; 443 display: flex; 444 top: 25px; 445 right: 25px; 446 font-size: 2rem; 447 text-decoration: none; 448 color: black; 449 } 450 451 452 .blur { 453 filter: blur(4px); 454 pointer-events: none; 455 } 456 457 .sideMenu { 458 display: flex; 459 position: absolute; 460 align-items: center; 461 min-height: 100px; 462 z-index: 1200; 463 top: 0; 464 bottom: 0; 465 right: 100%; 466 } 467 468 .sideMenu__link:first-child { 469 margin-top: 10px; 470 } 471 472 .sideMenu__link { 473 position: relative; 474 flex-direction: column; 475 display: flex; 476 height: 50px; 477 width: 50px; 478 background-color: #f1f1f1; 479 margin-bottom: 10px; 480 margin-left: 10px; 481 margin-right: 10px; 482 justify-content: space-between; 483 align-items: center; 484 font-size: 10px; 485 padding: 10px; 486 box-sizing: border-box; 487 text-decoration: none; 488 color: rgb(22, 101, 123); 489 } 490 491 .sideMenu__link label { 492 font-size: 12px; 493 } 494 495 .sideMenu__link .icon { 496 font-size: 24px; 497 } 498 499 .sideMenu__container { 500 display: flex; 501 position: relative; 502 flex-direction: column; 503 box-shadow: -10px 10px 10px rgb(153 153 255 / 10%); 504 background-color: white; 505 } 506 </style> 507 508 <script> 509 function toggleClass(ClassName, AddedClassName) { 510 var element = document.querySelector(ClassName); 511 if (element.classList.contains(AddedClassName)) { 512 element.classList.remove(AddedClassName); 513 } else { 514 element.classList.add(AddedClassName); 515 } 516 } 517 </script> 518 519 <section class="slidePanel" id="slidePanel"> 520 521 <div class="slidePanel__container"> 522 523 <a href="javasciprt:void(0);" onclick="toggleClass('.slidePanel', 'open'); toggleClass('main', 'blur')" class="closeButton"> 524 <i class="fa-light fa-circle-xmark"></i> 525 </a> 526 527 <nav class="sideMenu"> 528 <section class="sideMenu__container"> 529 <a href="javascript:history.back();" class="sideMenu__link"><i class="icon fa-light fa-reply"></i></a> 530 <a href="/dashboard-configuration" class="sideMenu__link"><i class="icon fa-light fa-grid-horizontal"></i></a> 531 <a href="javasciprt:void(0);" onclick="toggleClass('.slidePanel', 'open'); toggleClass('main', 'blur')" class="sideMenu__link"><i class="icon fa-light fa-diagram-cells"></i></a> 532 <a href="/button-configuration" class="sideMenu__link"><i class="icon fa-light fa-link"></i></a> 533 <a href="/background-configuration" class="sideMenu__link"><i class="icon fa-light fa-paintbrush"></i></a> 534 <a href="/jumbotron-configuration" class="sideMenu__link"><i class="icon fa-light fa-megaphone"></i></a> 535 <a href="/theme-configuration-page/theme-01" class="sideMenu__link"><i class="icon fa-light fa-brush"></i></a> 536 <a href="/font-configuration" class="sideMenu__link"><i class="icon fa-light fa-font"></i></a> 537 <a href="/device-manager" class="sideMenu__link"><i class="icon fa-light fa-computer"></i></a> 538 </section> 539 </nav> 540 541 @{ 542 MasterConfigurationPage MCPage = Dynamicweb.Content.Services.Items.GetItemById<MasterConfigurationPage>(Model.Area.Item.Id); 543 } 544 545 <ul> 546 @foreach (Dynamicweb.Content.Page MasterConfigurationPage in Dynamicweb.Content.Services.Pages.GetPagesByParentID(Pageview.Page.ParentPageId)) 547 { 548 MCPage = Dynamicweb.Content.Services.Items.GetItemById<MasterConfigurationPage>(MasterConfigurationPage.ID.ToString()); 549 550 <li><a href="/Default.aspx?ID=@MasterConfigurationPage.ID">Link naar master @MasterConfigurationPage.ID</a></li> 551 552 } 553 </ul> 554 555 </div> 556 557 </section> 558 559 </body> 560 </html> 561