Error compiling template "Designs/MavomSpecialtyChemicals_generated/Paragraph/DefaultParagraphSidebarModule.cshtml"
Line 964: Argument 1: cannot convert from 'string' to 'Bluedesk.DynamicWeb.ItemTypes.Configuration.ButtonConfiguration'
Line 964: Argument 5: cannot convert from 'bool' to 'string'
Line 975: Argument 1: cannot convert from 'string' to 'Bluedesk.DynamicWeb.ItemTypes.Configuration.ButtonConfiguration'
Line 975: Argument 5: cannot convert from 'bool' to 'string'
Line 1151: Argument 1: cannot convert from 'string' to 'Bluedesk.DynamicWeb.ItemTypes.Configuration.ButtonConfiguration'
Line 1151: Argument 5: cannot convert from 'bool' to 'string'
Line 1162: Argument 1: cannot convert from 'string' to 'Bluedesk.DynamicWeb.ItemTypes.Configuration.ButtonConfiguration'
Line 1162: Argument 5: cannot convert from 'bool' to 'string'

1 //------------------------------------------------------------------------------ 2 // <auto-generated> 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319.42000 5 // 6 // Changes to this file may cause incorrect behavior and will be lost if 7 // the code is regenerated. 8 // </auto-generated> 9 //------------------------------------------------------------------------------ 10 11 namespace CompiledRazorTemplates.Dynamic { 12 using System; 13 using System.Collections.Generic; 14 using System.Linq; 15 16 #line 79 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 17 using Dynamicweb; 18 19 #line default 20 #line hidden 21 22 #line 80 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 23 using Dynamicweb.Content.Items; 24 25 #line default 26 #line hidden 27 28 #line 81 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 29 using Bluedesk.DynamicWeb.ItemTypes; 30 31 #line default 32 #line hidden 33 34 #line 10 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 35 using Bluedesk.DynamicWeb.ItemTypes.Extensions; 36 37 #line default 38 #line hidden 39 40 #line 11 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 41 using Bluedesk.DynamicWeb.ItemTypes.Configuration; 42 43 #line default 44 #line hidden 45 46 #line 12 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 47 using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 48 49 #line default 50 #line hidden 51 52 53 public class RazorEngine_04eee33609584fcd9e6b065315505de6 : Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> { 54 55 #line hidden 56 57 #line 14 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 58 public RazorEngine.Templating.TemplateWriter RenderButton(ButtonConfiguration ButtonConfiguration, string btnLink, string btnClass, string btnText, string ariaLabel = "", bool newWindow = false, string btnIcon = "", string btnExtraClass = "", string btnTextClass = "", string btnIconClass = "") 59 { 60 #line default 61 #line hidden 62 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 63 64 #line 15 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 65 66 string buttonID = ButtonConfiguration.Id; 67 var master_configuration = Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration"); 68 MasterConfig mc = master_configuration.Item.ToCodeFirstItem<MasterConfig>(); 69 70 string FontAwesomeLibrary = mc.GeneralConfiguration.fontawesomeStyle; 71 bool HideIcon = ButtonConfiguration.HideIcon; 72 string CustomIconClass = !string.IsNullOrWhiteSpace(ButtonConfiguration.CustomIcon) ? ButtonConfiguration.CustomIcon : !string.IsNullOrWhiteSpace(btnIcon) ? btnIcon : "fa-chevron-right"; 73 string IconPositionClass = HideIcon ? "default-btn--no-icon" : mc.GeneralConfiguration.IconPosition == "left" ? "default-btn--icon-left" : ""; 74 75 string target = newWindow ? "_blank" : "_self"; 76 string ariaText = !string.IsNullOrWhiteSpace(ariaLabel) ? "aria-label='" + ariaLabel + "'" : ""; 77 78 string styleBlock = GenerateButtonConfigVariables(ButtonConfiguration, mc, Pageview.AreaID); 79 80 if (!string.IsNullOrWhiteSpace(btnLink) && !string.IsNullOrWhiteSpace(btnText)) 81 { 82 83 84 #line default 85 #line hidden 86 WriteLiteralTo(__razor_helper_writer, "\t\t<a"); 87 88 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 1888), Tuple.Create("\"", 1903) 89 90 #line 32 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 91 , Tuple.Create(Tuple.Create("", 1895), Tuple.Create<System.Object, System.Int32>(btnLink 92 93 #line default 94 #line hidden 95 , 1895), false) 96 ); 97 98 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 1904), Tuple.Create("\"", 1994) 99 , Tuple.Create(Tuple.Create("", 1912), Tuple.Create("btn", 1912), true) 100 , Tuple.Create(Tuple.Create(" ", 1915), Tuple.Create("default-btn", 1916), true) 101 , Tuple.Create(Tuple.Create(" ", 1927), Tuple.Create("default-btn--", 1928), true) 102103 #line 32 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 104 , Tuple.Create(Tuple.Create("", 1941), Tuple.Create<System.Object, System.Int32>(buttonID 105106 #line default 107 #line hidden 108 , 1941), false) 109110 #line 32 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 111 , Tuple.Create(Tuple.Create(" ", 1950), Tuple.Create<System.Object, System.Int32>(IconPositionClass 112113 #line default 114 #line hidden 115 , 1951), false) 116117 #line 32 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 118 , Tuple.Create(Tuple.Create(" ", 1969), Tuple.Create<System.Object, System.Int32>(btnClass 119120 #line default 121 #line hidden 122 , 1970), false) 123124 #line 32 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 125 , Tuple.Create(Tuple.Create(" ", 1979), Tuple.Create<System.Object, System.Int32>(btnExtraClass 126127 #line default 128 #line hidden 129 , 1980), false) 130 ); 131132 WriteAttributeTo(__razor_helper_writer, "target", Tuple.Create(" target=\"", 1995), Tuple.Create("\"", 2011) 133134 #line 32 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 135 , Tuple.Create(Tuple.Create("", 2004), Tuple.Create<System.Object, System.Int32>(target 136137 #line default 138 #line hidden 139 , 2004), false) 140 ); 141142 WriteLiteralTo(__razor_helper_writer, " "); 143144145 #line 32 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 146 WriteTo(__razor_helper_writer, ariaText); 147148149 #line default 150 #line hidden 151 WriteLiteralTo(__razor_helper_writer, " style=\""); 152153154 #line 32 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 155 WriteTo(__razor_helper_writer, styleBlock); 156157158 #line default 159 #line hidden 160 WriteLiteralTo(__razor_helper_writer, "\">\r\n\t\t\t<span"); 161162 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 2053), Tuple.Create("\"", 2084) 163 , Tuple.Create(Tuple.Create("", 2061), Tuple.Create("btn__text", 2061), true) 164165 #line 33 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 166 , Tuple.Create(Tuple.Create(" ", 2070), Tuple.Create<System.Object, System.Int32>(btnTextClass 167168 #line default 169 #line hidden 170 , 2071), false) 171 ); 172173 WriteLiteralTo(__razor_helper_writer, ">"); 174175176 #line 33 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 177 WriteTo(__razor_helper_writer, btnText); 178179180 #line default 181 #line hidden 182 WriteLiteralTo(__razor_helper_writer, "</span>\r\n"); 183184185 #line 34 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 186187188 #line default 189 #line hidden 190191 #line 34 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 192 if (!HideIcon) 193 { 194195196 #line default 197 #line hidden 198 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t<i"); 199200 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 2135), Tuple.Create("\"", 2203) 201 , Tuple.Create(Tuple.Create("", 2143), Tuple.Create("btn__icon", 2143), true) 202203 #line 36 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 204 , Tuple.Create(Tuple.Create(" ", 2152), Tuple.Create<System.Object, System.Int32>(FontAwesomeLibrary 205206 #line default 207 #line hidden 208 , 2153), false) 209210 #line 36 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 211 , Tuple.Create(Tuple.Create(" ", 2172), Tuple.Create<System.Object, System.Int32>(CustomIconClass 212213 #line default 214 #line hidden 215 , 2173), false) 216217 #line 36 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 218 , Tuple.Create(Tuple.Create(" ", 2189), Tuple.Create<System.Object, System.Int32>(btnIconClass 219220 #line default 221 #line hidden 222 , 2190), false) 223 ); 224225 WriteLiteralTo(__razor_helper_writer, "></i>\r\n"); 226227228 #line 37 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 229 } 230231232 #line default 233 #line hidden 234 WriteLiteralTo(__razor_helper_writer, "\t\t</a>\r\n"); 235236237 #line 39 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 238 } 239240241 #line default 242 #line hidden 243 }); 244245 #line 40 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 246 } 247 #line default 248 #line hidden 249250251 #line 42 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 252 public RazorEngine.Templating.TemplateWriter RenderFontConfig(Dictionary<string, string> FontConfig) 253 { 254 #line default 255 #line hidden 256 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 257258 #line 43 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 259260261262 #line default 263 #line hidden 264 WriteLiteralTo(__razor_helper_writer, "\t"); 265266 WriteLiteralTo(__razor_helper_writer, "color: "); 267268269 #line 44 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 270 WriteTo(__razor_helper_writer, FontConfig["textColor"]); 271272273 #line default 274 #line hidden 275 WriteLiteralTo(__razor_helper_writer, " !important;"); 276277 WriteLiteralTo(__razor_helper_writer, "\r\n"); 278279280 #line 45 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 281282 if (!string.IsNullOrWhiteSpace(FontConfig["textColor"])) 283 { 284285286 #line default 287 #line hidden 288 WriteLiteralTo(__razor_helper_writer, "\t\t"); 289290 WriteLiteralTo(__razor_helper_writer, "\r\n\t\t\tcolor: "); 291292293 #line 49 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 294 WriteTo(__razor_helper_writer, FontConfig["textColor"]); 295296297 #line default 298 #line hidden 299 WriteLiteralTo(__razor_helper_writer, " !important;\r\n\t\t"); 300301 WriteLiteralTo(__razor_helper_writer, "\r\n"); 302303304 #line 51 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 305 } 306307 if (!string.IsNullOrWhiteSpace(FontConfig["fontSize"])) 308 { 309310311 #line default 312 #line hidden 313 WriteLiteralTo(__razor_helper_writer, "\t\t"); 314315 WriteLiteralTo(__razor_helper_writer, "font-size: "); 316317318 #line 55 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 319 WriteTo(__razor_helper_writer, FontConfig["fontSize"]); 320321322 #line default 323 #line hidden 324 WriteLiteralTo(__razor_helper_writer, " !important;"); 325326 WriteLiteralTo(__razor_helper_writer, "\r\n"); 327328329 #line 56 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 330 } 331 if (!string.IsNullOrWhiteSpace(FontConfig["lineHeight"])) 332 { 333334335 #line default 336 #line hidden 337 WriteLiteralTo(__razor_helper_writer, "\t\t"); 338339 WriteLiteralTo(__razor_helper_writer, "line-height: "); 340341342 #line 59 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 343 WriteTo(__razor_helper_writer, FontConfig["lineHeight"]); 344345346 #line default 347 #line hidden 348 WriteLiteralTo(__razor_helper_writer, " !important;"); 349350 WriteLiteralTo(__razor_helper_writer, "\r\n"); 351352353 #line 60 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 354 } 355 if (!string.IsNullOrWhiteSpace(FontConfig["fontFamily"])) 356 { 357358359 #line default 360 #line hidden 361 WriteLiteralTo(__razor_helper_writer, "\t\t"); 362363 WriteLiteralTo(__razor_helper_writer, "font-family: "); 364365366 #line 63 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 367 WriteTo(__razor_helper_writer, FontConfig["fontFamily"]); 368369370 #line default 371 #line hidden 372 WriteLiteralTo(__razor_helper_writer, " !important;"); 373374 WriteLiteralTo(__razor_helper_writer, "\r\n"); 375376377 #line 64 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 378 } 379 if (!string.IsNullOrWhiteSpace(FontConfig["fontWeight"])) 380 { 381382383 #line default 384 #line hidden 385 WriteLiteralTo(__razor_helper_writer, "\t\t"); 386387 WriteLiteralTo(__razor_helper_writer, "font-weight: "); 388389390 #line 67 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 391 WriteTo(__razor_helper_writer, FontConfig["fontWeight"]); 392393394 #line default 395 #line hidden 396 WriteLiteralTo(__razor_helper_writer, " !important;"); 397398 WriteLiteralTo(__razor_helper_writer, "\r\n"); 399400401 #line 68 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 402 } 403 if (!string.IsNullOrWhiteSpace(FontConfig["fontStyle"])) 404 { 405 if (FontConfig["fontStyle"] != "none") 406 { 407408409 #line default 410 #line hidden 411 WriteLiteralTo(__razor_helper_writer, "\t\t\t"); 412413 WriteLiteralTo(__razor_helper_writer, "text-transform: "); 414415416 #line 73 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 417 WriteTo(__razor_helper_writer, FontConfig["fontStyle"]); 418419420 #line default 421 #line hidden 422 WriteLiteralTo(__razor_helper_writer, " !important;"); 423424 WriteLiteralTo(__razor_helper_writer, "\r\n"); 425426427 #line 74 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 428 } 429 } 430431432 #line default 433 #line hidden 434 }); 435436 #line 76 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 437 } 438 #line default 439 #line hidden 440441442 #line 83 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 443444445 Dictionary<string, string> GetFontConfiguration(string TextColor, FontConfigurationItemTab FontConfiguration) 446 { 447 var colorService = new ColorSwatchService(); 448 TextColor = !string.IsNullOrWhiteSpace(TextColor) ? TextColor : "" ; 449 TextColor = !TextColor.Contains("#") ? colorService.GetHexColor(Pageview.AreaID, TextColor) : TextColor; 450 Dictionary<string, string> FontConfig = new Dictionary<string, string>() { 451 { "textColor" , TextColor }, 452 { "fontSize" , FontConfiguration.FontSize }, 453 { "lineHeight", FontConfiguration.LineHeight}, 454 { "fontFamily" , FontConfiguration.FontConfiguration.FontFamily }, 455 { "fontWeight" , FontConfiguration.FontWeight }, 456 { "fontStyle" , FontConfiguration.FontStyle } 457 }; 458 return FontConfig; 459 } 460461 public string GenerateButtonConfigVariables(ButtonConfiguration BC, MasterConfig mc, int areaId) 462 { 463 string ButtonLabelAlignment = BC.ButtonLabelAlignment; 464 switch (ButtonLabelAlignment) 465 { 466 case "align-left": 467 ButtonLabelAlignment = "flex-start"; 468 break; 469 case "align-center": 470 ButtonLabelAlignment = "center"; 471 break; 472 case "align-right": 473 ButtonLabelAlignment = "flex-end"; 474 break; 475 case "align-full": 476 ButtonLabelAlignment = "space-between"; 477 break; 478 default: 479 ButtonLabelAlignment = "flex-start"; 480 break; 481 } 482483 var btnStyleBlock = new System.Text.StringBuilder(); 484485 // General Config 486 btnStyleBlock.Append(GenerateCssVar("btn-min-height", $"{mc.GeneralConfiguration.ButtonHeight}px")); 487 btnStyleBlock.Append(GenerateCssVar("btn-border-radius", $"{mc.GeneralConfiguration.RoundedCornerValue}px")); 488489 // Button Config 490 btnStyleBlock.Append(GenerateCssVar("btn-border-width", $"{BC.BorderSize.ToString()}px")); 491 btnStyleBlock.Append(GenerateCssVar("btn-label-alignment", ButtonLabelAlignment)); 492493 // Button Config Tab 494 btnStyleBlock.Append(GenerateCssVar("btn-bg-color", BC.ButtonColorConfiguration.BackgroundColor.GetColorCode(areaId))); 495 btnStyleBlock.Append(GenerateCssVar("btn-font-color", BC.ButtonColorConfiguration.FontColor.GetColorCode(areaId))); 496 btnStyleBlock.Append(GenerateCssVar("btn-border-color", BC.ButtonColorConfiguration.BorderColor.GetColorCode(areaId))); 497498 // Button Config Hover tab 499 btnStyleBlock.Append(GenerateCssVar("btn-bg-color-hover", BC.ButtonHoverColorConfiguration.BackgroundColor.GetColorCode(areaId))); 500 btnStyleBlock.Append(GenerateCssVar("btn-font-color-hover", BC.ButtonHoverColorConfiguration.FontColor.GetColorCode(areaId))); 501 btnStyleBlock.Append(GenerateCssVar("btn-border-color-hover", BC.ButtonHoverColorConfiguration.BorderColor.GetColorCode(areaId))); 502503 // Button Config Font Config 504 btnStyleBlock.Append(GenerateCssVar("btn-font-size", BC.FontConfiguration.FontSize)); 505 btnStyleBlock.Append(GenerateCssVar("btn-font-config-color", BC.FontConfiguration.Color.GetColorCode(areaId))); 506 btnStyleBlock.Append(GenerateCssVar("btn-font-line-height", BC.FontConfiguration.LineHeight)); 507 btnStyleBlock.Append(GenerateCssVar("btn-font-family", BC.FontConfiguration.FontConfiguration.FontFamily)); 508 btnStyleBlock.Append(GenerateCssVar("btn-font-weight", BC.FontConfiguration.FontWeight)); 509 btnStyleBlock.Append(GenerateCssVar("btn-font-transform", BC.FontConfiguration.FontStyle)); 510511 return btnStyleBlock.ToString(); 512 } 513514 public string GenerateCssVar(string name, string value) 515 { 516 if (!string.IsNullOrWhiteSpace(value)) { 517 return $"--{name}: {value};"; 518 } else { 519 return ""; 520 } 521 } 522523 #line default 524 #line hidden 525526527 public RazorEngine_04eee33609584fcd9e6b065315505de6() { 528 } 529530 public override void Execute() { 531 WriteLiteral("\r\n"); 532533 WriteLiteral("\r\n"); 534535 WriteLiteral("\r\n"); 536537 WriteLiteral("\r\n"); 538539 WriteLiteral("\r\n"); 540541 WriteLiteral("\r\n\r\n"); 542543544 #line 165 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 545546 DefaultParagraphSidebarModule _data = ItemManager.Storage.GetById<DefaultParagraphSidebarModule>(Pageview.CurrentParagraph.ItemId ?? "0"); 547 var paragraphID = Pageview.CurrentParagraph.ID; 548 var backgroundClass = !string.IsNullOrWhiteSpace(_data.BackgroundConfiguration.BackgroundClass) ? string.Format("bg-{0}", _data.BackgroundConfiguration.BackgroundClass) : ""; 549550551 #line default 552 #line hidden 553 WriteLiteral("\r\n\r\n"); 554555556 #line 171 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 557 if (_data != null) 558 { 559560561 #line default 562 #line hidden 563 WriteLiteral("\t<section"); 564565 WriteAttribute("class", Tuple.Create(" class=\"", 7432), Tuple.Create("\"", 7459) 566 , Tuple.Create(Tuple.Create("", 7440), Tuple.Create("dp", 7440), true) 567568 #line 173 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 569 , Tuple.Create(Tuple.Create(" ", 7442), Tuple.Create<System.Object, System.Int32>(backgroundClass 570571 #line default 572 #line hidden 573 , 7443), false) 574 ); 575576 WriteLiteral(" data-paragraphid=\""); 577578579 #line 173 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 580 Write(paragraphID); 581582583 #line default 584 #line hidden 585 WriteLiteral("\""); 586587 WriteAttribute("id", Tuple.Create(" id=\"", 7492), Tuple.Create("\"", 7509) 588589 #line 173 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 590 , Tuple.Create(Tuple.Create("", 7497), Tuple.Create<System.Object, System.Int32>(paragraphID 591592 #line default 593 #line hidden 594 , 7497), false) 595 ); 596597 WriteLiteral(">\r\n\t\t<div"); 598599 WriteLiteral(" class=\"container\""); 600601 WriteLiteral(">\r\n\t\t\t<div"); 602603 WriteLiteral(" class=\"dp__container\""); 604605 WriteLiteral(">\r\n\t\t\t\t<section"); 606607 WriteLiteral(" class=\"dp__content\""); 608609 WriteLiteral(">\r\n\r\n"); 610611612 #line 178 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 613614615 #line default 616 #line hidden 617618 #line 178 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 619 if (_data.Image.Image != null && !string.IsNullOrWhiteSpace(_data.Image.Image)) 620 { 621 string ImageUrl = "/Admin/Public/GetImage.ashx?Image=" + @_data.Image.Image + "&Crop=7&Format=webp&Quality=90"; 622623624 #line default 625 #line hidden 626 WriteLiteral("<figure"); 627628 WriteLiteral(" class=\"dp__image-wrapper\""); 629630 WriteLiteral(">\r\n\t\t\t\t\t\t\t<picture>\r\n\t\t\t\t\t\t\t\t<source"); 631632 WriteLiteral(" media=\"(max-width: 400px)\""); 633634 WriteAttribute("srcset", Tuple.Create(" srcset=\"", 7925), Tuple.Create("\"", 7953) 635636 #line 183 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 637 , Tuple.Create(Tuple.Create("", 7934), Tuple.Create<System.Object, System.Int32>(ImageUrl 638639 #line default 640 #line hidden 641 , 7934), false) 642 , Tuple.Create(Tuple.Create("", 7943), Tuple.Create("&Width=400", 7943), true) 643 ); 644645 WriteLiteral(">\r\n\t\t\t\t\t\t\t\t<source"); 646647 WriteLiteral(" media=\"(max-width: 994px)\""); 648649 WriteAttribute("srcset", Tuple.Create(" srcset=\"", 7999), Tuple.Create("\"", 8027) 650651 #line 184 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 652 , Tuple.Create(Tuple.Create("", 8008), Tuple.Create<System.Object, System.Int32>(ImageUrl 653654 #line default 655 #line hidden 656 , 8008), false) 657 , Tuple.Create(Tuple.Create("", 8017), Tuple.Create("&Width=994", 8017), true) 658 ); 659660 WriteLiteral(">\r\n\t\t\t\t\t\t\t\t<img"); 661662 WriteLiteral(" class=\"dp__image\""); 663664 WriteAttribute("src", Tuple.Create(" src=\"", 8061), Tuple.Create("\"", 8087) 665666 #line 185 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 667 , Tuple.Create(Tuple.Create("", 8067), Tuple.Create<System.Object, System.Int32>(ImageUrl 668669 #line default 670 #line hidden 671 , 8067), false) 672 , Tuple.Create(Tuple.Create("", 8076), Tuple.Create("&width=1920", 8076), true) 673 ); 674675 WriteLiteral(" loading=\"lazy\""); 676677 WriteAttribute("alt", Tuple.Create(" alt=\"", 8103), Tuple.Create("\"", 8130) 678679 #line 185 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 680 , Tuple.Create(Tuple.Create("", 8109), Tuple.Create<System.Object, System.Int32>(_data.Image.ImageAlt 681682 #line default 683 #line hidden 684 , 8109), false) 685 ); 686687 WriteLiteral(" width=\"1980\""); 688689 WriteLiteral(" height=\"500\""); 690691 WriteLiteral("/>\r\n\t\t\t\t\t\t\t</picture>\r\n\t\t\t\t\t\t</figure>\r\n"); 692693694 #line 188 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 695 } 696697698 #line default 699 #line hidden 700 WriteLiteral("\r\n\t\t\t\t\t<section"); 701702 WriteLiteral(" class=\"dp__inner-content\""); 703704 WriteLiteral(">\r\n"); 705706707 #line 191 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 708709710 #line default 711 #line hidden 712713 #line 191 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 714 if (!string.IsNullOrWhiteSpace(_data.Header.HeaderFormatted())) 715 { 716717718 #line default 719 #line hidden 720 WriteLiteral("\t\t\t\t\t\t\t<header"); 721722 WriteLiteral(" class=\"dp__header\""); 723724 WriteLiteral(">\r\n"); 725726 WriteLiteral("\t\t\t\t\t\t\t\t"); 727728729 #line 194 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 730 Write(_data.SubHeader.HeaderFormatted("dp__subheading")); 731732733 #line default 734 #line hidden 735 WriteLiteral("\r\n"); 736737 WriteLiteral("\t\t\t\t\t\t\t\t"); 738739740 #line 195 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 741 Write(_data.Header.HeaderFormatted("dp__heading")); 742743744 #line default 745 #line hidden 746 WriteLiteral("\r\n\t\t\t\t\t\t\t</header>\r\n"); 747748749 #line 197 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 750 } 751752753 #line default 754 #line hidden 755 WriteLiteral("\r\n"); 756757758 #line 199 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 759760761 #line default 762 #line hidden 763764 #line 199 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 765 if (!string.IsNullOrWhiteSpace(_data.Content.Text)) 766 { 767768769 #line default 770 #line hidden 771 WriteLiteral("\t\t\t\t\t\t\t<div"); 772773 WriteLiteral(" class=\"dp__text\""); 774775 WriteLiteral(">"); 776777778 #line 201 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 779 Write(_data.Content.Text); 780781782 #line default 783 #line hidden 784 WriteLiteral("</div>\r\n"); 785786787 #line 202 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 788 } 789790791 #line default 792 #line hidden 793 WriteLiteral("\r\n"); 794795796 #line 204 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 797798799 #line default 800 #line hidden 801802 #line 204 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 803 if (!_data.ModuleInSidebar && !string.IsNullOrWhiteSpace(GetString("ParagraphModule"))) 804 { 805806807 #line default 808 #line hidden 809 WriteLiteral("\t\t\t\t\t\t\t<section"); 810811 WriteLiteral(" class=\"mt-8\""); 812813 WriteLiteral(">\r\n\r\n"); 814815816 #line 208 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 817818819 #line default 820 #line hidden 821822 #line 208 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 823 if (!string.IsNullOrWhiteSpace(_data.SidebarHeader.HeaderFormatted())) 824 { 825826827 #line default 828 #line hidden 829 WriteLiteral("\t\t\t\t\t\t\t\t\t<header"); 830831 WriteLiteral(" class=\"dp__header\""); 832833 WriteLiteral(">\r\n"); 834835 WriteLiteral("\t\t\t\t\t\t\t\t\t\t"); 836837838 #line 211 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 839 Write(_data.SidebarHeader.HeaderFormatted("dp__header")); 840841842 #line default 843 #line hidden 844 WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t</header>\r\n"); 845846847 #line 213 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 848 } 849850851 #line default 852 #line hidden 853 WriteLiteral("\r\n"); 854855856 #line 215 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 857858859 #line default 860 #line hidden 861862 #line 215 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 863 if (!string.IsNullOrWhiteSpace(_data.SidebarContent.Text)) 864 { 865866867 #line default 868 #line hidden 869 WriteLiteral("\t\t\t\t\t\t\t\t\t<div"); 870871 WriteLiteral(" class=\"dp__text\""); 872873 WriteLiteral(">"); 874875876 #line 217 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 877 Write(_data.SidebarContent.Text); 878879880 #line default 881 #line hidden 882 WriteLiteral("</div>\r\n"); 883884885 #line 218 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 886 } 887888889 #line default 890 #line hidden 891 WriteLiteral("\r\n"); 892893894 #line 220 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 895896897 #line default 898 #line hidden 899900 #line 220 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 901 if (!string.IsNullOrWhiteSpace(GetString("ParagraphModule"))) 902 { 903904905 #line default 906 #line hidden 907 WriteLiteral("\t\t\t\t\t\t\t\t\t<div"); 908909 WriteLiteral(" class=\"dp__module\""); 910911 WriteLiteral(">"); 912913914 #line 222 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 915 Write(GetString("ParagraphModule")); 916917918 #line default 919 #line hidden 920 WriteLiteral("</div>\r\n"); 921922923 #line 223 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 924 } 925926927 #line default 928 #line hidden 929 WriteLiteral("\t\t\t\t\t\t\t</section>\r\n"); 930931932 #line 225 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 933 } 934935936 #line default 937 #line hidden 938 WriteLiteral("\r\n"); 939940941 #line 227 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 942943944 #line default 945 #line hidden 946947 #line 227 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 948 if(!string.IsNullOrWhiteSpace(_data.Button.ButtonText) || !string.IsNullOrWhiteSpace(_data.ExtraButton.ButtonText)) 949 { 950951952 #line default 953 #line hidden 954 WriteLiteral("\t\t\t\t\t\t\t<nav"); 955956 WriteLiteral(" class=\"dp__cta-container\""); 957958 WriteLiteral(">\r\n"); 959960 WriteLiteral("\t\t\t\t\t\t\t\t"); 961962963 #line 230 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 964 Write(RenderButton(_data.Button.ButtonLink, _data.Button.Configuration.ButtonClass, _data.Button.ButtonText, _data.Button.ButtonAriaLabel, _data.Button.NewWindow)); 965966967 #line default 968 #line hidden 969 WriteLiteral("\r\n\r\n"); 970971 WriteLiteral("\t\t\t\t\t\t\t\t"); 972973974 #line 232 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 975 Write(RenderButton(_data.ExtraButton.ButtonLink, _data.ExtraButton.Configuration.ButtonClass, _data.ExtraButton.ButtonText, _data.ExtraButton.ButtonAriaLabel, _data.ExtraButton.NewWindow)); 976977978 #line default 979 #line hidden 980 WriteLiteral("\r\n\t\t\t\t\t\t\t</nav>\r\n"); 981982983 #line 234 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 984 } 985986987 #line default 988 #line hidden 989 WriteLiteral("\t\t\t\t\t\t</section>\r\n\t\t\t\t</section>\r\n\r\n"); 990991992 #line 238 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 993994995 #line default 996 #line hidden 997998 #line 238 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 999 if(_data.ModuleInSidebar && !string.IsNullOrWhiteSpace(GetString("ParagraphModule"))) 1000 { 100110021003 #line default 1004 #line hidden 1005 WriteLiteral("\t\t\t\t\t<section"); 10061007 WriteLiteral(" class=\"dp__aside\""); 10081009 WriteLiteral(">\r\n\r\n"); 101010111012 #line 242 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 101310141015 #line default 1016 #line hidden 10171018 #line 242 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 1019 if (!string.IsNullOrWhiteSpace(_data.SidebarHeader.HeaderFormatted())) 1020 { 102110221023 #line default 1024 #line hidden 1025 WriteLiteral("\t\t\t\t\t\t\t<header"); 10261027 WriteLiteral(" class=\"dp__header\""); 10281029 WriteLiteral(">\r\n"); 10301031 WriteLiteral("\t\t\t\t\t\t\t\t"); 103210331034 #line 245 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 1035 Write(_data.SidebarHeader.HeaderFormatted()); 103610371038 #line default 1039 #line hidden 1040 WriteLiteral("\r\n\t\t\t\t\t\t\t</header>\r\n"); 104110421043 #line 247 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 1044 } 104510461047 #line default 1048 #line hidden 1049 WriteLiteral("\r\n"); 105010511052 #line 249 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 105310541055 #line default 1056 #line hidden 10571058 #line 249 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 1059 if (!string.IsNullOrWhiteSpace(_data.SidebarContent.Text)) 1060 { 106110621063 #line default 1064 #line hidden 1065 WriteLiteral("\t\t\t\t\t\t\t<div"); 10661067 WriteLiteral(" class=\"dp__text\""); 10681069 WriteLiteral(">"); 107010711072 #line 251 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 1073 Write(_data.SidebarContent.Text); 107410751076 #line default 1077 #line hidden 1078 WriteLiteral("</div>\r\n"); 107910801081 #line 252 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 1082 } 108310841085 #line default 1086 #line hidden 1087 WriteLiteral("\r\n"); 108810891090 #line 254 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 109110921093 #line default 1094 #line hidden 10951096 #line 254 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 1097 if (!string.IsNullOrWhiteSpace(GetString("ParagraphModule"))) 1098 { 109911001101 #line default 1102 #line hidden 1103 WriteLiteral("\t\t\t\t\t\t\t<div"); 11041105 WriteLiteral(" class=\"dp__module\""); 11061107 WriteLiteral(">"); 110811091110 #line 256 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 1111 Write(GetString("ParagraphModule")); 111211131114 #line default 1115 #line hidden 1116 WriteLiteral("</div>\r\n"); 111711181119 #line 257 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 1120 } 112111221123 #line default 1124 #line hidden 1125 WriteLiteral("\r\n"); 112611271128 #line 259 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 112911301131 #line default 1132 #line hidden 11331134 #line 259 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 1135 if(!string.IsNullOrWhiteSpace(_data.SidebarButton.ButtonText) || !string.IsNullOrWhiteSpace(_data.SidebarExtraButton.ButtonText)) 1136 { 113711381139 #line default 1140 #line hidden 1141 WriteLiteral("\t\t\t\t\t\t\t<nav"); 11421143 WriteLiteral(" class=\"dp__cta-container\""); 11441145 WriteLiteral(">\r\n"); 11461147 WriteLiteral("\t\t\t\t\t\t\t\t"); 114811491150 #line 262 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 1151 Write(RenderButton(_data.SidebarButton.ButtonLink, _data.SidebarButton.Configuration.ButtonClass, _data.SidebarButton.ButtonText, _data.SidebarButton.ButtonAriaLabel, _data.SidebarButton.NewWindow)); 115211531154 #line default 1155 #line hidden 1156 WriteLiteral("\r\n\r\n"); 11571158 WriteLiteral("\t\t\t\t\t\t\t\t"); 115911601161 #line 264 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 1162 Write(RenderButton(_data.SidebarExtraButton.ButtonLink, _data.SidebarExtraButton.Configuration.ButtonClass, _data.SidebarExtraButton.ButtonText, _data.SidebarExtraButton.ButtonAriaLabel, _data.SidebarExtraButton.NewWindow)); 116311641165 #line default 1166 #line hidden 1167 WriteLiteral("\r\n\t\t\t\t\t\t\t</nav>\r\n"); 116811691170 #line 266 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 1171 } 117211731174 #line default 1175 #line hidden 1176 WriteLiteral("\t\t\t\t\t</section>\r\n"); 117711781179 #line 268 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 1180 } 118111821183 #line default 1184 #line hidden 1185 WriteLiteral("\t\t\t</div>\r\n\t\t</div>\r\n\t</section>\r\n"); 118611871188 #line 272 "D:\virtual_hosts\Mavom_Production\files\Templates\Designs\MavomSpecialtyChemicals_generated\Paragraph\DefaultParagraphSidebarModule.cshtml" 1189 } 119011911192 #line default 1193 #line hidden 1194 } 1195 } 1196 } 1197

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using Dynamicweb; 3 @using Dynamicweb.Content.Items; 4 @using Bluedesk.DynamicWeb.ItemTypes; 5 6 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 7 @using Dynamicweb; 8 @using Dynamicweb.Content.Items; 9 @using Bluedesk.DynamicWeb.ItemTypes; 10 @using Bluedesk.DynamicWeb.ItemTypes.Extensions; 11 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 12 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 13 14 @helper RenderButton(ButtonConfiguration ButtonConfiguration, string btnLink, string btnClass, string btnText, string ariaLabel = "", bool newWindow = false, string btnIcon = "", string btnExtraClass = "", string btnTextClass = "", string btnIconClass = "") 15 { 16 string buttonID = ButtonConfiguration.Id; 17 var master_configuration = Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration"); 18 MasterConfig mc = master_configuration.Item.ToCodeFirstItem<MasterConfig>(); 19 20 string FontAwesomeLibrary = mc.GeneralConfiguration.fontawesomeStyle; 21 bool HideIcon = ButtonConfiguration.HideIcon; 22 string CustomIconClass = !string.IsNullOrWhiteSpace(ButtonConfiguration.CustomIcon) ? ButtonConfiguration.CustomIcon : !string.IsNullOrWhiteSpace(btnIcon) ? btnIcon : "fa-chevron-right"; 23 string IconPositionClass = HideIcon ? "default-btn--no-icon" : mc.GeneralConfiguration.IconPosition == "left" ? "default-btn--icon-left" : ""; 24 25 string target = newWindow ? "_blank" : "_self"; 26 string ariaText = !string.IsNullOrWhiteSpace(ariaLabel) ? "aria-label='" + ariaLabel + "'" : ""; 27 28 string styleBlock = GenerateButtonConfigVariables(ButtonConfiguration, mc, Pageview.AreaID); 29 30 if (!string.IsNullOrWhiteSpace(btnLink) && !string.IsNullOrWhiteSpace(btnText)) 31 { 32 <a href="@btnLink" class="btn default-btn default-btn--@buttonID @IconPositionClass @btnClass @btnExtraClass" target="@target" @ariaText style="@styleBlock"> 33 <span class="btn__text @btnTextClass">@btnText</span> 34 @if (!HideIcon) 35 { 36 <i class="btn__icon @FontAwesomeLibrary @CustomIconClass @btnIconClass"></i> 37 } 38 </a> 39 } 40 } 41 42 @helper RenderFontConfig(Dictionary<string, string> FontConfig) 43 { 44 <text>color: @FontConfig["textColor"] !important;</text> 45 46 if (!string.IsNullOrWhiteSpace(FontConfig["textColor"])) 47 { 48 <text> 49 color: @FontConfig["textColor"] !important; 50 </text> 51 } 52 53 if (!string.IsNullOrWhiteSpace(FontConfig["fontSize"])) 54 { 55 <text>font-size: @FontConfig["fontSize"] !important;</text> 56 } 57 if (!string.IsNullOrWhiteSpace(FontConfig["lineHeight"])) 58 { 59 <text>line-height: @FontConfig["lineHeight"] !important;</text> 60 } 61 if (!string.IsNullOrWhiteSpace(FontConfig["fontFamily"])) 62 { 63 <text>font-family: @FontConfig["fontFamily"] !important;</text> 64 } 65 if (!string.IsNullOrWhiteSpace(FontConfig["fontWeight"])) 66 { 67 <text>font-weight: @FontConfig["fontWeight"] !important;</text> 68 } 69 if (!string.IsNullOrWhiteSpace(FontConfig["fontStyle"])) 70 { 71 if (FontConfig["fontStyle"] != "none") 72 { 73 <text>text-transform: @FontConfig["fontStyle"] !important;</text> 74 } 75 } 76 } 77 78 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 79 @using Dynamicweb; 80 @using Dynamicweb.Content.Items; 81 @using Bluedesk.DynamicWeb.ItemTypes; 82 83 @functions { 84 85 Dictionary<string, string> GetFontConfiguration(string TextColor, FontConfigurationItemTab FontConfiguration) 86 { 87 var colorService = new ColorSwatchService(); 88 TextColor = !string.IsNullOrWhiteSpace(TextColor) ? TextColor : "" ; 89 TextColor = !TextColor.Contains("#") ? colorService.GetHexColor(Pageview.AreaID, TextColor) : TextColor; 90 Dictionary<string, string> FontConfig = new Dictionary<string, string>() { 91 { "textColor" , TextColor }, 92 { "fontSize" , FontConfiguration.FontSize }, 93 { "lineHeight", FontConfiguration.LineHeight}, 94 { "fontFamily" , FontConfiguration.FontConfiguration.FontFamily }, 95 { "fontWeight" , FontConfiguration.FontWeight }, 96 { "fontStyle" , FontConfiguration.FontStyle } 97 }; 98 return FontConfig; 99 } 100101 public string GenerateButtonConfigVariables(ButtonConfiguration BC, MasterConfig mc, int areaId) 102 { 103 string ButtonLabelAlignment = BC.ButtonLabelAlignment; 104 switch (ButtonLabelAlignment) 105 { 106 case "align-left": 107 ButtonLabelAlignment = "flex-start"; 108 break; 109 case "align-center": 110 ButtonLabelAlignment = "center"; 111 break; 112 case "align-right": 113 ButtonLabelAlignment = "flex-end"; 114 break; 115 case "align-full": 116 ButtonLabelAlignment = "space-between"; 117 break; 118 default: 119 ButtonLabelAlignment = "flex-start"; 120 break; 121 } 122123 var btnStyleBlock = new System.Text.StringBuilder(); 124125 // General Config 126 btnStyleBlock.Append(GenerateCssVar("btn-min-height", $"{mc.GeneralConfiguration.ButtonHeight}px")); 127 btnStyleBlock.Append(GenerateCssVar("btn-border-radius", $"{mc.GeneralConfiguration.RoundedCornerValue}px")); 128129 // Button Config 130 btnStyleBlock.Append(GenerateCssVar("btn-border-width", $"{BC.BorderSize.ToString()}px")); 131 btnStyleBlock.Append(GenerateCssVar("btn-label-alignment", ButtonLabelAlignment)); 132133 // Button Config Tab 134 btnStyleBlock.Append(GenerateCssVar("btn-bg-color", BC.ButtonColorConfiguration.BackgroundColor.GetColorCode(areaId))); 135 btnStyleBlock.Append(GenerateCssVar("btn-font-color", BC.ButtonColorConfiguration.FontColor.GetColorCode(areaId))); 136 btnStyleBlock.Append(GenerateCssVar("btn-border-color", BC.ButtonColorConfiguration.BorderColor.GetColorCode(areaId))); 137138 // Button Config Hover tab 139 btnStyleBlock.Append(GenerateCssVar("btn-bg-color-hover", BC.ButtonHoverColorConfiguration.BackgroundColor.GetColorCode(areaId))); 140 btnStyleBlock.Append(GenerateCssVar("btn-font-color-hover", BC.ButtonHoverColorConfiguration.FontColor.GetColorCode(areaId))); 141 btnStyleBlock.Append(GenerateCssVar("btn-border-color-hover", BC.ButtonHoverColorConfiguration.BorderColor.GetColorCode(areaId))); 142143 // Button Config Font Config 144 btnStyleBlock.Append(GenerateCssVar("btn-font-size", BC.FontConfiguration.FontSize)); 145 btnStyleBlock.Append(GenerateCssVar("btn-font-config-color", BC.FontConfiguration.Color.GetColorCode(areaId))); 146 btnStyleBlock.Append(GenerateCssVar("btn-font-line-height", BC.FontConfiguration.LineHeight)); 147 btnStyleBlock.Append(GenerateCssVar("btn-font-family", BC.FontConfiguration.FontConfiguration.FontFamily)); 148 btnStyleBlock.Append(GenerateCssVar("btn-font-weight", BC.FontConfiguration.FontWeight)); 149 btnStyleBlock.Append(GenerateCssVar("btn-font-transform", BC.FontConfiguration.FontStyle)); 150151 return btnStyleBlock.ToString(); 152 } 153154 public string GenerateCssVar(string name, string value) 155 { 156 if (!string.IsNullOrWhiteSpace(value)) { 157 return $"--{name}: {value};"; 158 } else { 159 return ""; 160 } 161 } 162 } 163164165 @{ 166 DefaultParagraphSidebarModule _data = ItemManager.Storage.GetById<DefaultParagraphSidebarModule>(Pageview.CurrentParagraph.ItemId ?? "0"); 167 var paragraphID = Pageview.CurrentParagraph.ID; 168 var backgroundClass = !string.IsNullOrWhiteSpace(_data.BackgroundConfiguration.BackgroundClass) ? string.Format("bg-{0}", _data.BackgroundConfiguration.BackgroundClass) : ""; 169 } 170171 @if (_data != null) 172 { 173 <section class="dp @backgroundClass" data-paragraphid="@paragraphID" id="@paragraphID"> 174 <div class="container"> 175 <div class="dp__container"> 176 <section class="dp__content"> 177178 @if (_data.Image.Image != null && !string.IsNullOrWhiteSpace(_data.Image.Image)) 179 { 180 string ImageUrl = "/Admin/Public/GetImage.ashx?Image=" + @_data.Image.Image + "&Crop=7&Format=webp&Quality=90"; 181 <figure class="dp__image-wrapper"> 182 <picture> 183 <source media="(max-width: 400px)" srcset="@ImageUrl&Width=400"> 184 <source media="(max-width: 994px)" srcset="@ImageUrl&Width=994"> 185 <img class="dp__image" src="@ImageUrl&width=1920" loading="lazy" alt="@_data.Image.ImageAlt" width="1980" height="500"/> 186 </picture> 187 </figure> 188 } 189190 <section class="dp__inner-content"> 191 @if (!string.IsNullOrWhiteSpace(_data.Header.HeaderFormatted())) 192 { 193 <header class="dp__header"> 194 @_data.SubHeader.HeaderFormatted("dp__subheading") 195 @_data.Header.HeaderFormatted("dp__heading") 196 </header> 197 } 198199 @if (!string.IsNullOrWhiteSpace(_data.Content.Text)) 200 { 201 <div class="dp__text">@_data.Content.Text</div> 202 } 203204 @if (!_data.ModuleInSidebar && !string.IsNullOrWhiteSpace(GetString("ParagraphModule"))) 205 { 206 <section class="mt-8"> 207208 @if (!string.IsNullOrWhiteSpace(_data.SidebarHeader.HeaderFormatted())) 209 { 210 <header class="dp__header"> 211 @_data.SidebarHeader.HeaderFormatted("dp__header") 212 </header> 213 } 214215 @if (!string.IsNullOrWhiteSpace(_data.SidebarContent.Text)) 216 { 217 <div class="dp__text">@_data.SidebarContent.Text</div> 218 } 219220 @if (!string.IsNullOrWhiteSpace(GetString("ParagraphModule"))) 221 { 222 <div class="dp__module">@GetString("ParagraphModule")</div> 223 } 224 </section> 225 } 226227 @if(!string.IsNullOrWhiteSpace(_data.Button.ButtonText) || !string.IsNullOrWhiteSpace(_data.ExtraButton.ButtonText)) 228 { 229 <nav class="dp__cta-container"> 230 @RenderButton(_data.Button.ButtonLink, _data.Button.Configuration.ButtonClass, _data.Button.ButtonText, _data.Button.ButtonAriaLabel, _data.Button.NewWindow) 231232 @RenderButton(_data.ExtraButton.ButtonLink, _data.ExtraButton.Configuration.ButtonClass, _data.ExtraButton.ButtonText, _data.ExtraButton.ButtonAriaLabel, _data.ExtraButton.NewWindow) 233 </nav> 234 } 235 </section> 236 </section> 237238 @if(_data.ModuleInSidebar && !string.IsNullOrWhiteSpace(GetString("ParagraphModule"))) 239 { 240 <section class="dp__aside"> 241242 @if (!string.IsNullOrWhiteSpace(_data.SidebarHeader.HeaderFormatted())) 243 { 244 <header class="dp__header"> 245 @_data.SidebarHeader.HeaderFormatted() 246 </header> 247 } 248249 @if (!string.IsNullOrWhiteSpace(_data.SidebarContent.Text)) 250 { 251 <div class="dp__text">@_data.SidebarContent.Text</div> 252 } 253254 @if (!string.IsNullOrWhiteSpace(GetString("ParagraphModule"))) 255 { 256 <div class="dp__module">@GetString("ParagraphModule")</div> 257 } 258259 @if(!string.IsNullOrWhiteSpace(_data.SidebarButton.ButtonText) || !string.IsNullOrWhiteSpace(_data.SidebarExtraButton.ButtonText)) 260 { 261 <nav class="dp__cta-container"> 262 @RenderButton(_data.SidebarButton.ButtonLink, _data.SidebarButton.Configuration.ButtonClass, _data.SidebarButton.ButtonText, _data.SidebarButton.ButtonAriaLabel, _data.SidebarButton.NewWindow) 263264 @RenderButton(_data.SidebarExtraButton.ButtonLink, _data.SidebarExtraButton.Configuration.ButtonClass, _data.SidebarExtraButton.ButtonText, _data.SidebarExtraButton.ButtonAriaLabel, _data.SidebarExtraButton.NewWindow) 265 </nav> 266 } 267 </section> 268 } 269 </div> 270 </div> 271 </section> 272 } 273

Mavom behoudt zich het recht voor om wijzigingen aan te brengen in deze privacyverklaring. Het verdient aanbeveling om deze privacyverklaring voor sollicitanten geregeld te raadplegen, zodat u van deze wijzigingen op de hoogte bent. 

To Top