ZEVIJ-NECOMIJ Bundelt krachten
Zevij-Necomij is de grootste inkooporganisatie van aangesloten technische groothandels in bouw & industrie in de Benelux. Zo kunnen zij samen een sterke positie innemen binnen het interessante samenspel met hun leveranciers.
Door nadrukkelijk de samenwerking te zoeken aan de achterkant, kan de focus van de groothandel liggen op de plek waar het werkelijke onderscheid te maken valt: in het contact met de klanten. Daarbij streeft Zevij-Necomij continu naar optimale efficiency en maximale transparantie in de keten. Met de focus op de disciplines inkoop, logistiek, ICT, data en marketing. Afgestemd op de wensen van de aangesloten groothandels volgens een cafetariamodel. Dat maakt het voor zowel de grotere als kleinere groothandels financieel aantrekkelijk zich aan te sluiten bij inkooporganisatie Zevij-Necomij.
Lid van
Zevij-Necomij
Zevij-Necomij werkt met een ingenieus differentiatiemodel waarbij alle leden voordeel hebben bij het vergroten van het totale volume, maar de partijen die daar het meest aan bijdragen, wel altijd het meest. Dat maakt het financieel aantrekkelijk voor zowel zeer grote als kleinere groothandels om zich aan te sluiten.
Error compiling template "Designs/deBisschop_generated/Paragraph/CTAParagraphVideo.cshtml" Line 67: 'Services' is obsolete: 'Use Dynamicweb.Content.Services instead.' Line 67: 'Services.Pages' is obsolete: 'Use Dynamicweb.Content.Services.Pages instead.' Line 1071: 'CTAButton' does not contain a definition for 'Configuration' and no accessible extension method 'Configuration' accepting a first argument of type 'CTAButton' could be found (are you missing a using directive or an assembly reference?) Line 1071: 'CTAButton' does not contain a definition for 'Configuration' and no accessible extension method 'Configuration' accepting a first argument of type 'CTAButton' could be found (are you missing a using directive or an assembly reference?) Line 1082: 'CTAButton' does not contain a definition for 'Configuration' and no accessible extension method 'Configuration' accepting a first argument of type 'CTAButton' could be found (are you missing a using directive or an assembly reference?) Line 1082: 'CTAButton' does not contain a definition for 'Configuration' and no accessible extension method 'Configuration' accepting a first argument of type 'CTAButton' could be found (are you missing a using directive or an assembly reference?)
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 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 17 using Dynamicweb; 18 19 #line default 20 #line hidden 21 22 #line 80 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 23 using Dynamicweb.Content.Items; 24 25 #line default 26 #line hidden 27 28 #line 81 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 29 using Bluedesk.DynamicWeb.ItemTypes; 30 31 #line default 32 #line hidden 33 34 #line 10 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 35 using Bluedesk.DynamicWeb.ItemTypes.Extensions; 36 37 #line default 38 #line hidden 39 40 #line 11 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 41 using Bluedesk.DynamicWeb.ItemTypes.Configuration; 42 43 #line default 44 #line hidden 45 46 #line 12 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 47 using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 48 49 #line default 50 #line hidden 51 52 53 public class RazorEngine_80d228962b6c407283811dd949792093 : Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> { 54 55 #line hidden 56 57 #line 14 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.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 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 65 66 string buttonID = ButtonConfiguration.Id; 67 var master_configuration = Dynamicweb.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=\"", 1899), Tuple.Create("\"", 1914) 89 90 #line 32 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 91 , Tuple.Create(Tuple.Create("", 1906), Tuple.Create<System.Object, System.Int32>(btnLink 92 93 #line default 94 #line hidden 95 , 1906), false) 96 ); 97 98 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 1915), Tuple.Create("\"", 2005) 99 , Tuple.Create(Tuple.Create("", 1923), Tuple.Create("btn", 1923), true) 100 , Tuple.Create(Tuple.Create(" ", 1926), Tuple.Create("default-btn", 1927), true) 101 , Tuple.Create(Tuple.Create(" ", 1938), Tuple.Create("default-btn--", 1939), true) 102 103 #line 32 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 104 , Tuple.Create(Tuple.Create("", 1952), Tuple.Create<System.Object, System.Int32>(buttonID 105 106 #line default 107 #line hidden 108 , 1952), false) 109 110 #line 32 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 111 , Tuple.Create(Tuple.Create(" ", 1961), Tuple.Create<System.Object, System.Int32>(IconPositionClass 112 113 #line default 114 #line hidden 115 , 1962), false) 116 117 #line 32 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 118 , Tuple.Create(Tuple.Create(" ", 1980), Tuple.Create<System.Object, System.Int32>(btnClass 119 120 #line default 121 #line hidden 122 , 1981), false) 123 124 #line 32 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 125 , Tuple.Create(Tuple.Create(" ", 1990), Tuple.Create<System.Object, System.Int32>(btnExtraClass 126 127 #line default 128 #line hidden 129 , 1991), false) 130 ); 131 132 WriteAttributeTo(__razor_helper_writer, "target", Tuple.Create(" target=\"", 2006), Tuple.Create("\"", 2022) 133 134 #line 32 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 135 , Tuple.Create(Tuple.Create("", 2015), Tuple.Create<System.Object, System.Int32>(target 136 137 #line default 138 #line hidden 139 , 2015), false) 140 ); 141 142 WriteLiteralTo(__razor_helper_writer, " "); 143 144 145 #line 32 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 146 WriteTo(__razor_helper_writer, ariaText); 147 148 149 #line default 150 #line hidden 151 WriteLiteralTo(__razor_helper_writer, " style=\""); 152 153 154 #line 32 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 155 WriteTo(__razor_helper_writer, styleBlock); 156 157 158 #line default 159 #line hidden 160 WriteLiteralTo(__razor_helper_writer, "\">\r\n\t\t\t<span"); 161 162 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 2064), Tuple.Create("\"", 2095) 163 , Tuple.Create(Tuple.Create("", 2072), Tuple.Create("btn__text", 2072), true) 164 165 #line 33 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 166 , Tuple.Create(Tuple.Create(" ", 2081), Tuple.Create<System.Object, System.Int32>(btnTextClass 167 168 #line default 169 #line hidden 170 , 2082), false) 171 ); 172 173 WriteLiteralTo(__razor_helper_writer, ">"); 174 175 176 #line 33 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 177 WriteTo(__razor_helper_writer, btnText); 178 179 180 #line default 181 #line hidden 182 WriteLiteralTo(__razor_helper_writer, "</span>\r\n"); 183 184 185 #line 34 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 186 187 188 #line default 189 #line hidden 190 191 #line 34 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 192 if (!HideIcon) 193 { 194 195 196 #line default 197 #line hidden 198 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t<i"); 199 200 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 2146), Tuple.Create("\"", 2214) 201 , Tuple.Create(Tuple.Create("", 2154), Tuple.Create("btn__icon", 2154), true) 202 203 #line 36 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 204 , Tuple.Create(Tuple.Create(" ", 2163), Tuple.Create<System.Object, System.Int32>(FontAwesomeLibrary 205 206 #line default 207 #line hidden 208 , 2164), false) 209 210 #line 36 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 211 , Tuple.Create(Tuple.Create(" ", 2183), Tuple.Create<System.Object, System.Int32>(CustomIconClass 212 213 #line default 214 #line hidden 215 , 2184), false) 216 217 #line 36 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 218 , Tuple.Create(Tuple.Create(" ", 2200), Tuple.Create<System.Object, System.Int32>(btnIconClass 219 220 #line default 221 #line hidden 222 , 2201), false) 223 ); 224 225 WriteLiteralTo(__razor_helper_writer, "></i>\r\n"); 226 227 228 #line 37 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 229 } 230 231 232 #line default 233 #line hidden 234 WriteLiteralTo(__razor_helper_writer, "\t\t</a>\r\n"); 235 236 237 #line 39 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 238 } 239 240 241 #line default 242 #line hidden 243 }); 244 245 #line 40 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 246 } 247 #line default 248 #line hidden 249 250 251 #line 42 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.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 => { 257 258 #line 43 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 259 260 261 262 #line default 263 #line hidden 264 WriteLiteralTo(__razor_helper_writer, "\t"); 265 266 WriteLiteralTo(__razor_helper_writer, "color: "); 267 268 269 #line 44 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 270 WriteTo(__razor_helper_writer, FontConfig["textColor"]); 271 272 273 #line default 274 #line hidden 275 WriteLiteralTo(__razor_helper_writer, " !important;"); 276 277 WriteLiteralTo(__razor_helper_writer, "\r\n"); 278 279 280 #line 45 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 281 282 if (!string.IsNullOrWhiteSpace(FontConfig["textColor"])) 283 { 284 285 286 #line default 287 #line hidden 288 WriteLiteralTo(__razor_helper_writer, "\t\t"); 289 290 WriteLiteralTo(__razor_helper_writer, "\r\n\t\t\tcolor: "); 291 292 293 #line 49 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 294 WriteTo(__razor_helper_writer, FontConfig["textColor"]); 295 296 297 #line default 298 #line hidden 299 WriteLiteralTo(__razor_helper_writer, " !important;\r\n\t\t"); 300 301 WriteLiteralTo(__razor_helper_writer, "\r\n"); 302 303 304 #line 51 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 305 } 306 307 if (!string.IsNullOrWhiteSpace(FontConfig["fontSize"])) 308 { 309 310 311 #line default 312 #line hidden 313 WriteLiteralTo(__razor_helper_writer, "\t\t"); 314 315 WriteLiteralTo(__razor_helper_writer, "font-size: "); 316 317 318 #line 55 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 319 WriteTo(__razor_helper_writer, FontConfig["fontSize"]); 320 321 322 #line default 323 #line hidden 324 WriteLiteralTo(__razor_helper_writer, " !important;"); 325 326 WriteLiteralTo(__razor_helper_writer, "\r\n"); 327 328 329 #line 56 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 330 } 331 if (!string.IsNullOrWhiteSpace(FontConfig["lineHeight"])) 332 { 333 334 335 #line default 336 #line hidden 337 WriteLiteralTo(__razor_helper_writer, "\t\t"); 338 339 WriteLiteralTo(__razor_helper_writer, "line-height: "); 340 341 342 #line 59 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 343 WriteTo(__razor_helper_writer, FontConfig["lineHeight"]); 344 345 346 #line default 347 #line hidden 348 WriteLiteralTo(__razor_helper_writer, " !important;"); 349 350 WriteLiteralTo(__razor_helper_writer, "\r\n"); 351 352 353 #line 60 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 354 } 355 if (!string.IsNullOrWhiteSpace(FontConfig["fontFamily"])) 356 { 357 358 359 #line default 360 #line hidden 361 WriteLiteralTo(__razor_helper_writer, "\t\t"); 362 363 WriteLiteralTo(__razor_helper_writer, "font-family: "); 364 365 366 #line 63 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 367 WriteTo(__razor_helper_writer, FontConfig["fontFamily"]); 368 369 370 #line default 371 #line hidden 372 WriteLiteralTo(__razor_helper_writer, " !important;"); 373 374 WriteLiteralTo(__razor_helper_writer, "\r\n"); 375 376 377 #line 64 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 378 } 379 if (!string.IsNullOrWhiteSpace(FontConfig["fontWeight"])) 380 { 381 382 383 #line default 384 #line hidden 385 WriteLiteralTo(__razor_helper_writer, "\t\t"); 386 387 WriteLiteralTo(__razor_helper_writer, "font-weight: "); 388 389 390 #line 67 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 391 WriteTo(__razor_helper_writer, FontConfig["fontWeight"]); 392 393 394 #line default 395 #line hidden 396 WriteLiteralTo(__razor_helper_writer, " !important;"); 397 398 WriteLiteralTo(__razor_helper_writer, "\r\n"); 399 400 401 #line 68 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 402 } 403 if (!string.IsNullOrWhiteSpace(FontConfig["fontStyle"])) 404 { 405 if (FontConfig["fontStyle"] != "none") 406 { 407 408 409 #line default 410 #line hidden 411 WriteLiteralTo(__razor_helper_writer, "\t\t\t"); 412 413 WriteLiteralTo(__razor_helper_writer, "text-transform: "); 414 415 416 #line 73 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 417 WriteTo(__razor_helper_writer, FontConfig["fontStyle"]); 418 419 420 #line default 421 #line hidden 422 WriteLiteralTo(__razor_helper_writer, " !important;"); 423 424 WriteLiteralTo(__razor_helper_writer, "\r\n"); 425 426 427 #line 74 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 428 } 429 } 430 431 432 #line default 433 #line hidden 434 }); 435 436 #line 76 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 437 } 438 #line default 439 #line hidden 440 441 442 #line 83 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 443 444 445 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 } 460 461 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 } 482 483 var btnStyleBlock = new System.Text.StringBuilder(); 484 485 // General Config 486 btnStyleBlock.Append(GenerateCssVar("btn-min-height", $"{mc.GeneralConfiguration.ButtonHeight}px")); 487 btnStyleBlock.Append(GenerateCssVar("btn-border-radius", $"{mc.GeneralConfiguration.RoundedCornerValue}px")); 488 489 // Button Config 490 btnStyleBlock.Append(GenerateCssVar("btn-border-width", $"{BC.BorderSize.ToString()}px")); 491 btnStyleBlock.Append(GenerateCssVar("btn-label-alignment", ButtonLabelAlignment)); 492 493 // 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))); 497 498 // 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))); 502 503 // 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)); 510 511 return btnStyleBlock.ToString(); 512 } 513 514 public string GenerateCssVar(string name, string value) 515 { 516 if (!string.IsNullOrWhiteSpace(value)) { 517 return $"--{name}: {value};"; 518 } else { 519 return ""; 520 } 521 } 522 523 #line default 524 #line hidden 525 526 527 #line 219 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 528 public RazorEngine.Templating.TemplateWriter CTAParagraphVideo(CTAParagraphVideo _data) 529 { 530 #line default 531 #line hidden 532 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 533 534 #line 220 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 535 536 string YoutubeID = _data.Video.YoutubeId; 537 string YoutubeLink = _data.Video.YoutubeLink; 538 539 string VimeoID = _data.Video.VimeoId; 540 string VimeoLink = _data.Video.VimeoLink; 541 542 int CleanVideo = _data.Video.Clean ? 1 : 0; 543 int ShowControls = _data.Video.ShowControls ? 1 : 0; 544 int AutoPlay = _data.Video.AutoPlay ? 1 : 0; 545 int LoopVideo = _data.Video.LoopVideo ? 1 : 0; 546 int MuteAudio = _data.Video.MuteAudio ? 1 : 0; 547 string origin = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain(); 548 549 if (!string.IsNullOrWhiteSpace(YoutubeLink)) 550 { 551 552 553 #line default 554 #line hidden 555 WriteLiteralTo(__razor_helper_writer, "\t\t<section"); 556 557 WriteLiteralTo(__razor_helper_writer, " class=\"multiple-paragraphs-container\""); 558 559 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 560 561 562 #line 237 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 563 564 565 #line default 566 #line hidden 567 568 #line 237 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 569 if(AutoPlay == 1) 570 { 571 572 573 #line default 574 #line hidden 575 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t<div"); 576 577 WriteLiteralTo(__razor_helper_writer, " class=\"video-background\""); 578 579 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t<div"); 580 581 WriteLiteralTo(__razor_helper_writer, " class=\"video-background__container video-background__container--youtube\""); 582 583 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t\t<iframe"); 584 585 WriteLiteralTo(__razor_helper_writer, " class=\"js-youtube-video\""); 586 587 WriteLiteralTo(__razor_helper_writer, " loading=\"lazy\""); 588 589 WriteLiteralTo(__razor_helper_writer, " data-video=\""); 590 591 592 #line 241 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 593 WriteTo(__razor_helper_writer, YoutubeID); 594 595 596 #line default 597 #line hidden 598 WriteLiteralTo(__razor_helper_writer, "\""); 599 600 WriteLiteralTo(__razor_helper_writer, " frameborder=\"0\""); 601 602 WriteLiteralTo(__razor_helper_writer, " allowfullscreen"); 603 604 WriteLiteralTo(__razor_helper_writer, " allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\""); 605 606 WriteLiteralTo(__razor_helper_writer, " title=\"YouTube video player\""); 607 608 WriteAttributeTo(__razor_helper_writer, "src", Tuple.Create(" src=\"", 10383), Tuple.Create("\"", 10620) 609 , Tuple.Create(Tuple.Create("", 10389), Tuple.Create("https://www.youtube-nocookie.com/embed/", 10389), true) 610 611 #line 241 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 612 , Tuple.Create(Tuple.Create("", 10428), Tuple.Create<System.Object, System.Int32>(YoutubeID 613 614 #line default 615 #line hidden 616 , 10428), false) 617 , Tuple.Create(Tuple.Create("", 10438), Tuple.Create("?autoplay=", 10438), true) 618 619 #line 241 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 620 , Tuple.Create(Tuple.Create("", 10448), Tuple.Create<System.Object, System.Int32>(AutoPlay 621 622 #line default 623 #line hidden 624 , 10448), false) 625 , Tuple.Create(Tuple.Create("", 10457), Tuple.Create("&controls=", 10457), true) 626 627 #line 241 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 628 , Tuple.Create(Tuple.Create("", 10467), Tuple.Create<System.Object, System.Int32>(ShowControls 629 630 #line default 631 #line hidden 632 , 10467), false) 633 , Tuple.Create(Tuple.Create("", 10480), Tuple.Create("&loop=", 10480), true) 634 635 #line 241 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 636 , Tuple.Create(Tuple.Create("", 10486), Tuple.Create<System.Object, System.Int32>(LoopVideo 637 638 #line default 639 #line hidden 640 , 10486), false) 641 , Tuple.Create(Tuple.Create("", 10496), Tuple.Create("&playlist=", 10496), true) 642 643 #line 241 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 644 , Tuple.Create(Tuple.Create("", 10506), Tuple.Create<System.Object, System.Int32>(YoutubeID 645 646 #line default 647 #line hidden 648 , 10506), false) 649 , Tuple.Create(Tuple.Create("", 10516), Tuple.Create("&playsinline=1&modestbranding=", 10516), true) 650 651 #line 241 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 652 , Tuple.Create(Tuple.Create("", 10546), Tuple.Create<System.Object, System.Int32>(CleanVideo 653 654 #line default 655 #line hidden 656 , 10546), false) 657 , Tuple.Create(Tuple.Create("", 10557), Tuple.Create("&mute=", 10557), true) 658 659 #line 241 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 660 , Tuple.Create(Tuple.Create("", 10563), Tuple.Create<System.Object, System.Int32>(MuteAudio 661 662 #line default 663 #line hidden 664 , 10563), false) 665 , Tuple.Create(Tuple.Create("", 10573), Tuple.Create("&rel=0&enablejsapi=1&origin=", 10573), true) 666 667 #line 241 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 668 , Tuple.Create(Tuple.Create("", 10601), Tuple.Create<System.Object, System.Int32>(origin 669 670 #line default 671 #line hidden 672 , 10601), false) 673 , Tuple.Create(Tuple.Create("", 10608), Tuple.Create("&disablekb=1", 10608), true) 674 ); 675 676 WriteLiteralTo(__razor_helper_writer, "></iframe>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n"); 677 678 679 #line 244 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 680 } 681 else 682 { 683 684 685 #line default 686 #line hidden 687 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t<div"); 688 689 WriteLiteralTo(__razor_helper_writer, " class=\"w-full\""); 690 691 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t<div"); 692 693 WriteLiteralTo(__razor_helper_writer, " class=\"h-full\""); 694 695 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t\t<lite-youtube"); 696 697 WriteAttributeTo(__razor_helper_writer, "videoid", Tuple.Create(" videoid=\"", 10753), Tuple.Create("\"", 10773) 698 699 #line 249 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 700 , Tuple.Create(Tuple.Create("", 10763), Tuple.Create<System.Object, System.Int32>(YoutubeID 701 702 #line default 703 #line hidden 704 , 10763), false) 705 ); 706 707 WriteAttributeTo(__razor_helper_writer, "params", Tuple.Create(" params=\"", 10774), Tuple.Create("\"", 10946) 708 , Tuple.Create(Tuple.Create("", 10783), Tuple.Create("controls=", 10783), true) 709 710 #line 249 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 711 , Tuple.Create(Tuple.Create("", 10792), Tuple.Create<System.Object, System.Int32>(ShowControls 712 713 #line default 714 #line hidden 715 , 10792), false) 716 , Tuple.Create(Tuple.Create("", 10805), Tuple.Create("&loop=", 10805), true) 717 718 #line 249 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 719 , Tuple.Create(Tuple.Create("", 10811), Tuple.Create<System.Object, System.Int32>(LoopVideo 720 721 #line default 722 #line hidden 723 , 10811), false) 724 , Tuple.Create(Tuple.Create("", 10821), Tuple.Create("&playlist=", 10821), true) 725 726 #line 249 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 727 , Tuple.Create(Tuple.Create("", 10831), Tuple.Create<System.Object, System.Int32>(YoutubeID 728 729 #line default 730 #line hidden 731 , 10831), false) 732 , Tuple.Create(Tuple.Create("", 10841), Tuple.Create("&playsinline=1&modestbranding=", 10841), true) 733 734 #line 249 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 735 , Tuple.Create(Tuple.Create("", 10871), Tuple.Create<System.Object, System.Int32>(CleanVideo 736 737 #line default 738 #line hidden 739 , 10871), false) 740 , Tuple.Create(Tuple.Create("", 10882), Tuple.Create("&mute=", 10882), true) 741 742 #line 249 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 743 , Tuple.Create(Tuple.Create("", 10888), Tuple.Create<System.Object, System.Int32>(MuteAudio 744 745 #line default 746 #line hidden 747 , 10888), false) 748 , Tuple.Create(Tuple.Create("", 10898), Tuple.Create("&rel=0&enablejsapi=1&", 10898), true) 749 , Tuple.Create(Tuple.Create("\t", 10919), Tuple.Create("origin=", 10920), true) 750 751 #line 249 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 752 , Tuple.Create(Tuple.Create("", 10927), Tuple.Create<System.Object, System.Int32>(origin 753 754 #line default 755 #line hidden 756 , 10927), false) 757 , Tuple.Create(Tuple.Create("", 10934), Tuple.Create("&disablekb=1", 10934), true) 758 ); 759 760 WriteLiteralTo(__razor_helper_writer, "></lite-youtube>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n"); 761 762 763 #line 252 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 764 } 765 766 767 #line default 768 #line hidden 769 WriteLiteralTo(__razor_helper_writer, "\t\t</section>\r\n"); 770 771 772 #line 254 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 773 } 774 if (!string.IsNullOrWhiteSpace(VimeoLink)) 775 { 776 777 778 #line default 779 #line hidden 780 WriteLiteralTo(__razor_helper_writer, "\t\t<section"); 781 782 WriteLiteralTo(__razor_helper_writer, " class=\"multiple-paragraphs-container\""); 783 784 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t<div"); 785 786 WriteLiteralTo(__razor_helper_writer, " class=\"video-background\""); 787 788 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t<div"); 789 790 WriteLiteralTo(__razor_helper_writer, " class=\"video-background__container video-background__container--vimeo\""); 791 792 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t<iframe"); 793 794 WriteLiteralTo(__razor_helper_writer, " class=\"js-youtube-video\""); 795 796 WriteLiteralTo(__razor_helper_writer, " loading=\"lazy\""); 797 798 WriteLiteralTo(__razor_helper_writer, " data-video=\""); 799 800 801 #line 260 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 802 WriteTo(__razor_helper_writer, VimeoID); 803 804 805 #line default 806 #line hidden 807 WriteLiteralTo(__razor_helper_writer, "\""); 808 809 WriteLiteralTo(__razor_helper_writer, " frameborder=\"0\""); 810 811 WriteLiteralTo(__razor_helper_writer, " allowfullscreen"); 812 813 WriteLiteralTo(__razor_helper_writer, " allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\""); 814 815 WriteLiteralTo(__razor_helper_writer, " title=\"Vimeo video player\""); 816 817 WriteAttributeTo(__razor_helper_writer, "src", Tuple.Create(" src=\"", 11444), Tuple.Create("\"", 11592) 818 , Tuple.Create(Tuple.Create("", 11450), Tuple.Create("https://player.vimeo.com/video/", 11450), true) 819 820 #line 260 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 821 , Tuple.Create(Tuple.Create("", 11481), Tuple.Create<System.Object, System.Int32>(VimeoID 822 823 #line default 824 #line hidden 825 , 11481), false) 826 , Tuple.Create(Tuple.Create("", 11489), Tuple.Create("?title=0&byline=0&portrait=0&autoplay=", 11489), true) 827 828 #line 260 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 829 , Tuple.Create(Tuple.Create("", 11527), Tuple.Create<System.Object, System.Int32>(AutoPlay 830 831 #line default 832 #line hidden 833 , 11527), false) 834 , Tuple.Create(Tuple.Create("", 11536), Tuple.Create("&controls=", 11536), true) 835 836 #line 260 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 837 , Tuple.Create(Tuple.Create("", 11546), Tuple.Create<System.Object, System.Int32>(ShowControls 838 839 #line default 840 #line hidden 841 , 11546), false) 842 , Tuple.Create(Tuple.Create("", 11559), Tuple.Create("&loop=", 11559), true) 843 844 #line 260 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 845 , Tuple.Create(Tuple.Create("", 11565), Tuple.Create<System.Object, System.Int32>(LoopVideo 846 847 #line default 848 #line hidden 849 , 11565), false) 850 , Tuple.Create(Tuple.Create("", 11575), Tuple.Create("&muted=", 11575), true) 851 852 #line 260 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 853 , Tuple.Create(Tuple.Create("", 11582), Tuple.Create<System.Object, System.Int32>(MuteAudio 854 855 #line default 856 #line hidden 857 , 11582), false) 858 ); 859 860 WriteLiteralTo(__razor_helper_writer, "></iframe>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</section>\r\n"); 861 862 863 #line 264 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 864 } 865 866 867 #line default 868 #line hidden 869 }); 870 871 #line 265 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 872 } 873 #line default 874 #line hidden 875 876 877 #line 267 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 878 public RazorEngine.Templating.TemplateWriter CTAParagraphContent(CTAParagraphVideo _data, string newWindow, string ariaLabel) 879 { 880 #line default 881 #line hidden 882 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 883 884 #line 268 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 885 886 var hasVideo = !string.IsNullOrWhiteSpace(_data.Video.YoutubeLink) || !string.IsNullOrWhiteSpace(_data.Video.VimeoLink); 887 var noImageClass = hasVideo ? "" : "no-image"; 888 889 string centerTextClass = _data.CenterVertical ? "text-center" : ""; 890 var centerContent = !string.IsNullOrWhiteSpace(_data.Video.YoutubeLink) || !string.IsNullOrWhiteSpace(_data.Video.VimeoLink) ? "" : "cta-paragraph__content--center"; 891 892 if (!string.IsNullOrWhiteSpace(_data.Button.ButtonText) || !string.IsNullOrWhiteSpace(_data.Content.Text) || !string.IsNullOrWhiteSpace(_data.Header.HeaderFormatted())) 893 { 894 895 896 #line default 897 #line hidden 898 WriteLiteralTo(__razor_helper_writer, "\t\t<section"); 899 900 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 12343), Tuple.Create("\"", 12402) 901 , Tuple.Create(Tuple.Create("", 12351), Tuple.Create("cta-paragraph__content", 12351), true) 902 903 #line 277 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 904 , Tuple.Create(Tuple.Create(" ", 12373), Tuple.Create<System.Object, System.Int32>(centerContent 905 906 #line default 907 #line hidden 908 , 12374), false) 909 910 #line 277 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 911 , Tuple.Create(Tuple.Create(" ", 12388), Tuple.Create<System.Object, System.Int32>(noImageClass 912 913 #line default 914 #line hidden 915 , 12389), false) 916 ); 917 918 WriteLiteralTo(__razor_helper_writer, ">\r\n\r\n\t\t\t<article"); 919 920 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 12419), Tuple.Create("\"", 12490) 921 , Tuple.Create(Tuple.Create("", 12427), Tuple.Create("cta-paragraph__content-container", 12427), true) 922 923 #line 279 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 924 , Tuple.Create(Tuple.Create(" ", 12459), Tuple.Create<System.Object, System.Int32>(centerTextClass 925 926 #line default 927 #line hidden 928 , 12460), false) 929 930 #line 279 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 931 , Tuple.Create(Tuple.Create(" ", 12476), Tuple.Create<System.Object, System.Int32>(noImageClass 932 933 #line default 934 #line hidden 935 , 12477), false) 936 ); 937 938 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 939 940 941 #line 280 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 942 943 944 #line default 945 #line hidden 946 947 #line 280 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 948 if (!string.IsNullOrWhiteSpace(_data.Header.HeaderFormatted())) 949 { 950 951 952 #line default 953 #line hidden 954 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t<header"); 955 956 WriteLiteralTo(__razor_helper_writer, " class=\"cta-paragraph__header\""); 957 958 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 959 960 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t\t"); 961 962 963 #line 283 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 964 WriteTo(__razor_helper_writer, _data.SubHeader.HeaderFormatted("cta-paragraph__subheader")); 965 966 967 #line default 968 #line hidden 969 WriteLiteralTo(__razor_helper_writer, "\r\n"); 970 971 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t\t"); 972 973 974 #line 284 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 975 WriteTo(__razor_helper_writer, _data.Header.HeaderFormatted("cta-paragraph__header")); 976 977 978 #line default 979 #line hidden 980 WriteLiteralTo(__razor_helper_writer, "\r\n\t\t\t\t\t</header>\r\n"); 981 982 983 #line 286 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 984 } 985 986 987 #line default 988 #line hidden 989 WriteLiteralTo(__razor_helper_writer, "\r\n"); 990 991 992 #line 288 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 993 994 995 #line default 996 #line hidden 997 998 #line 288 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 999 if (!string.IsNullOrWhiteSpace(_data.Content.Text)) 1000 { 1001 1002 1003 #line default 1004 #line hidden 1005 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t<div"); 1006 1007 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 12845), Tuple.Create("\"", 12889) 1008 , Tuple.Create(Tuple.Create("", 12853), Tuple.Create("cta-paragraph__text", 12853), true) 1009 1010 #line 290 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1011 , Tuple.Create(Tuple.Create(" ", 12872), Tuple.Create<System.Object, System.Int32>(centerTextClass 1012 1013 #line default 1014 #line hidden 1015 , 12873), false) 1016 ); 1017 1018 WriteLiteralTo(__razor_helper_writer, ">"); 1019 1020 1021 #line 290 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1022 WriteTo(__razor_helper_writer, _data.Content.Text); 1023 1024 1025 #line default 1026 #line hidden 1027 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 1028 1029 1030 #line 291 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1031 } 1032 1033 1034 #line default 1035 #line hidden 1036 WriteLiteralTo(__razor_helper_writer, "\r\n"); 1037 1038 1039 #line 293 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1040 1041 1042 #line default 1043 #line hidden 1044 1045 #line 293 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1046 if (!string.IsNullOrWhiteSpace(_data.Button.GetLink(Pageview)) && !string.IsNullOrWhiteSpace(_data.Button.ButtonText)) 1047 { 1048 1049 1050 #line default 1051 #line hidden 1052 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t<nav"); 1053 1054 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 13068), Tuple.Create("\"", 13122) 1055 , Tuple.Create(Tuple.Create("", 13076), Tuple.Create("cta-paragraph__btn-navigation", 13076), true) 1056 1057 #line 295 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1058 , Tuple.Create(Tuple.Create(" ", 13105), Tuple.Create<System.Object, System.Int32>(centerTextClass 1059 1060 #line default 1061 #line hidden 1062 , 13106), false) 1063 ); 1064 1065 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 1066 1067 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t\t"); 1068 1069 1070 #line 296 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1071 WriteTo(__razor_helper_writer, RenderButton(_data.Button.Configuration, _data.Button.GetLink(Pageview), _data.Button.Configuration.ButtonClass, _data.Button.ButtonText, _data.Button.ButtonAriaLabel, _data.Button.NewWindow, "", "cta-paragraph__btn cta-paragraph__btn--extra", "cta-paragraph__btn-label", "cta-paragraph__btn-icon")); 1072 1073 1074 #line default 1075 #line hidden 1076 WriteLiteralTo(__razor_helper_writer, "\r\n"); 1077 1078 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t\t"); 1079 1080 1081 #line 297 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1082 WriteTo(__razor_helper_writer, RenderButton(_data.ExtraButton.Configuration, _data.ExtraButton.GetLink(Pageview), _data.ExtraButton.Configuration.ButtonClass, _data.ExtraButton.ButtonText, _data.ExtraButton.ButtonAriaLabel, _data.ExtraButton.NewWindow, "", "cta-paragraph__btn cta-paragraph__btn--extra", "cta-paragraph__btn-label", "cta-paragraph__btn-icon")); 1083 1084 1085 #line default 1086 #line hidden 1087 WriteLiteralTo(__razor_helper_writer, "\r\n\t\t\t\t\t</nav>\r\n"); 1088 1089 1090 #line 299 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1091 } 1092 1093 1094 #line default 1095 #line hidden 1096 WriteLiteralTo(__razor_helper_writer, "\r\n\t\t\t</article>\r\n\r\n\t\t</section>\r\n"); 1097 1098 1099 #line 304 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1100 1101 } 1102 1103 1104 #line default 1105 #line hidden 1106 }); 1107 1108 #line 306 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1109 } 1110 #line default 1111 #line hidden 1112 1113 1114 public RazorEngine_80d228962b6c407283811dd949792093() { 1115 } 1116 1117 public override void Execute() { 1118 WriteLiteral("\r\n"); 1119 1120 WriteLiteral("\r\n"); 1121 1122 WriteLiteral("\r\n"); 1123 1124 WriteLiteral("\r\n"); 1125 1126 WriteLiteral("\r\n"); 1127 1128 WriteLiteral("\r\n\r\n"); 1129 1130 1131 #line 165 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1132 1133 var paragraphID = Pageview.CurrentParagraph.ID; 1134 CTAParagraphVideo _data = ItemManager.Storage.GetById<CTAParagraphVideo>(Pageview.CurrentParagraph.ItemId ?? "0"); 1135 1136 var backgroundClass = !string.IsNullOrWhiteSpace(_data.BackgroundConfiguration.BackgroundClass) ? string.Format("bg-{0}", _data.BackgroundConfiguration.BackgroundClass) : ""; 1137 var backgroundStyle = !string.IsNullOrWhiteSpace(_data.BackgroundConfiguration.BackgroundColor) ? $"background-color: {_data.BackgroundConfiguration.BackgroundColor}; " : ""; 1138 backgroundStyle += !string.IsNullOrWhiteSpace(_data.BackgroundConfiguration.BackgroundImage) ? $"background-image: url({_data.BackgroundConfiguration.BackgroundImage}); " : ""; 1139 1140 var newWindow = _data.Button.NewWindow ? "target='_blank'" : ""; 1141 string ariaLabel = !string.IsNullOrWhiteSpace(_data.Button.ButtonAriaLabel) ? "aria-label='" + _data.Button.ButtonAriaLabel + "'" : ""; 1142 string ParagraphHeight = _data.Height == 0 ? "auto" : _data.Height + "px"; 1143 1144 string fullWidthContainerClass = _data.Fullwidth ? "" : "container"; 1145 1146 bool clickableBlock = !string.IsNullOrWhiteSpace(_data.Button.GetLink(Pageview)) && _data.Clickable; 1147 string clickableClass = clickableBlock ? "cta-paragraph__container--clickable" : ""; 1148 1149 string contentRightClass = _data.ImagePosition.Equals("right") ? "image-right" : "image-left"; 1150 1151 1152 #line default 1153 #line hidden 1154 WriteLiteral("\r\n\r\n<style>\r\n\t.cta-paragraph__container--"); 1155 1156 1157 #line 186 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1158 Write(paragraphID); 1159 1160 1161 #line default 1162 #line hidden 1163 WriteLiteral(" {\r\n\t\theight: "); 1164 1165 1166 #line 187 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1167 Write(ParagraphHeight); 1168 1169 1170 #line default 1171 #line hidden 1172 WriteLiteral(";\r\n\t}\r\n\r\n\t"); 1173 1174 WriteLiteral("@media screen and (max-width: 991px) {\r\n\t\t.cta-paragraph__container--"); 1175 1176 1177 #line 191 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1178 Write(paragraphID); 1179 1180 1181 #line default 1182 #line hidden 1183 WriteLiteral(" .multiple-paragraphs-container {\r\n\t\t\theight: calc("); 1184 1185 1186 #line 192 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1187 Write(ParagraphHeight); 1188 1189 1190 #line default 1191 #line hidden 1192 WriteLiteral("/2);\r\n\t\t}\r\n\t}\r\n</style>\r\n\r\n"); 1193 1194 1195 #line 197 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1196 if (_data != null) 1197 { 1198 1199 1200 #line default 1201 #line hidden 1202 WriteLiteral("\t<div"); 1203 1204 WriteLiteral(" class=\"overflow-x-hidden\""); 1205 1206 WriteLiteral(" data-paragraphid=\""); 1207 1208 1209 #line 199 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1210 Write(paragraphID); 1211 1212 1213 #line default 1214 #line hidden 1215 WriteLiteral("\""); 1216 1217 WriteAttribute("id", Tuple.Create(" id=\"", 8750), Tuple.Create("\"", 8767) 1218 1219 #line 199 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1220 , Tuple.Create(Tuple.Create("", 8755), Tuple.Create<System.Object, System.Int32>(paragraphID 1221 1222 #line default 1223 #line hidden 1224 , 8755), false) 1225 ); 1226 1227 WriteLiteral(">\r\n\r\n\t\t<section"); 1228 1229 WriteAttribute("class", Tuple.Create(" class=\"", 8783), Tuple.Create("\"", 8865) 1230 , Tuple.Create(Tuple.Create("", 8791), Tuple.Create("cta-paragraph", 8791), true) 1231 , Tuple.Create(Tuple.Create(" ", 8804), Tuple.Create("cta-paragraph--", 8805), true) 1232 1233 #line 201 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1234 , Tuple.Create(Tuple.Create("", 8820), Tuple.Create<System.Object, System.Int32>(paragraphID 1235 1236 #line default 1237 #line hidden 1238 , 8820), false) 1239 1240 #line 201 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1241 , Tuple.Create(Tuple.Create(" ", 8832), Tuple.Create<System.Object, System.Int32>(backgroundClass 1242 1243 #line default 1244 #line hidden 1245 , 8833), false) 1246 1247 #line 201 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1248 , Tuple.Create(Tuple.Create(" ", 8849), Tuple.Create<System.Object, System.Int32>(_data.CssClass 1249 1250 #line default 1251 #line hidden 1252 , 8850), false) 1253 ); 1254 1255 WriteAttribute("style", Tuple.Create(" style=\"", 8866), Tuple.Create("\"", 8890) 1256 1257 #line 201 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1258 , Tuple.Create(Tuple.Create("", 8874), Tuple.Create<System.Object, System.Int32>(backgroundStyle 1259 1260 #line default 1261 #line hidden 1262 , 8874), false) 1263 ); 1264 1265 WriteLiteral(">\r\n\r\n\t\t\t<div"); 1266 1267 WriteAttribute("class", Tuple.Create(" class=\"", 8903), Tuple.Create("\"", 9067) 1268 , Tuple.Create(Tuple.Create("", 8911), Tuple.Create("cta-paragraph__container", 8911), true) 1269 , Tuple.Create(Tuple.Create(" ", 8935), Tuple.Create("cta-paragraph__container--video", 8936), true) 1270 , Tuple.Create(Tuple.Create(" ", 8967), Tuple.Create("cta-paragraph__container--", 8968), true) 1271 1272 #line 203 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1273 , Tuple.Create(Tuple.Create("", 8994), Tuple.Create<System.Object, System.Int32>(paragraphID 1274 1275 #line default 1276 #line hidden 1277 , 8994), false) 1278 1279 #line 203 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1280 , Tuple.Create(Tuple.Create(" ", 9006), Tuple.Create<System.Object, System.Int32>(fullWidthContainerClass 1281 1282 #line default 1283 #line hidden 1284 , 9007), false) 1285 1286 #line 203 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1287 , Tuple.Create(Tuple.Create(" ", 9031), Tuple.Create<System.Object, System.Int32>(clickableClass 1288 1289 #line default 1290 #line hidden 1291 , 9032), false) 1292 1293 #line 203 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1294 , Tuple.Create(Tuple.Create(" ", 9047), Tuple.Create<System.Object, System.Int32>(contentRightClass 1295 1296 #line default 1297 #line hidden 1298 , 9048), false) 1299 , Tuple.Create(Tuple.Create(" ", 9066), Tuple.Create("", 9066), true) 1300 ); 1301 1302 WriteLiteral(">\r\n\r\n"); 1303 1304 WriteLiteral("\t\t\t\t"); 1305 1306 1307 #line 205 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1308 Write(CTAParagraphVideo(_data)); 1309 1310 1311 #line default 1312 #line hidden 1313 WriteLiteral("\r\n"); 1314 1315 WriteLiteral("\t\t\t\t"); 1316 1317 1318 #line 206 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1319 Write(CTAParagraphContent(_data, newWindow, ariaLabel)); 1320 1321 1322 #line default 1323 #line hidden 1324 WriteLiteral("\r\n\r\n"); 1325 1326 1327 #line 208 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1328 1329 1330 #line default 1331 #line hidden 1332 1333 #line 208 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1334 if (clickableBlock) 1335 { 1336 1337 1338 #line default 1339 #line hidden 1340 WriteLiteral("\t\t\t\t\t<a"); 1341 1342 WriteAttribute("href", Tuple.Create(" href=\"", 9201), Tuple.Create("\"", 9239) 1343 1344 #line 210 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1345 , Tuple.Create(Tuple.Create("", 9208), Tuple.Create<System.Object, System.Int32>(_data.Button.GetLink(Pageview) 1346 1347 #line default 1348 #line hidden 1349 , 9208), false) 1350 ); 1351 1352 WriteLiteral(" class=\"cta-paragraph__clickable\""); 1353 1354 WriteLiteral(" "); 1355 1356 1357 #line 210 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1358 Write(newWindow); 1359 1360 1361 #line default 1362 #line hidden 1363 WriteLiteral(" "); 1364 1365 1366 #line 210 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1367 Write(ariaLabel); 1368 1369 1370 #line default 1371 #line hidden 1372 WriteLiteral("></a>\r\n"); 1373 1374 1375 #line 211 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1376 } 1377 1378 1379 #line default 1380 #line hidden 1381 WriteLiteral("\t\t\t</div>\r\n\r\n\t\t</section>\r\n\r\n\t</div>\r\n"); 1382 1383 1384 #line 217 "E:\Dynamicweb.NET\Groco-DeBisschop\Production\host\files\Templates\Designs\deBisschop_generated\Paragraph\CTAParagraphVideo.cshtml" 1385 } 1386 1387 1388 #line default 1389 #line hidden 1390 WriteLiteral("\r\n"); 1391 1392 WriteLiteral("\r\n"); 1393 1394 } 1395 } 1396 } 1397
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 = Dynamicweb.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 } 100 101 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 } 122 123 var btnStyleBlock = new System.Text.StringBuilder(); 124 125 // General Config 126 btnStyleBlock.Append(GenerateCssVar("btn-min-height", $"{mc.GeneralConfiguration.ButtonHeight}px")); 127 btnStyleBlock.Append(GenerateCssVar("btn-border-radius", $"{mc.GeneralConfiguration.RoundedCornerValue}px")); 128 129 // Button Config 130 btnStyleBlock.Append(GenerateCssVar("btn-border-width", $"{BC.BorderSize.ToString()}px")); 131 btnStyleBlock.Append(GenerateCssVar("btn-label-alignment", ButtonLabelAlignment)); 132 133 // 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))); 137 138 // 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))); 142 143 // 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)); 150 151 return btnStyleBlock.ToString(); 152 } 153 154 public string GenerateCssVar(string name, string value) 155 { 156 if (!string.IsNullOrWhiteSpace(value)) { 157 return $"--{name}: {value};"; 158 } else { 159 return ""; 160 } 161 } 162 } 163 164 165 @{ 166 var paragraphID = Pageview.CurrentParagraph.ID; 167 CTAParagraphVideo _data = ItemManager.Storage.GetById<CTAParagraphVideo>(Pageview.CurrentParagraph.ItemId ?? "0"); 168 169 var backgroundClass = !string.IsNullOrWhiteSpace(_data.BackgroundConfiguration.BackgroundClass) ? string.Format("bg-{0}", _data.BackgroundConfiguration.BackgroundClass) : ""; 170 var backgroundStyle = !string.IsNullOrWhiteSpace(_data.BackgroundConfiguration.BackgroundColor) ? $"background-color: {_data.BackgroundConfiguration.BackgroundColor}; " : ""; 171 backgroundStyle += !string.IsNullOrWhiteSpace(_data.BackgroundConfiguration.BackgroundImage) ? $"background-image: url({_data.BackgroundConfiguration.BackgroundImage}); " : ""; 172 173 var newWindow = _data.Button.NewWindow ? "target='_blank'" : ""; 174 string ariaLabel = !string.IsNullOrWhiteSpace(_data.Button.ButtonAriaLabel) ? "aria-label='" + _data.Button.ButtonAriaLabel + "'" : ""; 175 string ParagraphHeight = _data.Height == 0 ? "auto" : _data.Height + "px"; 176 177 string fullWidthContainerClass = _data.Fullwidth ? "" : "container"; 178 179 bool clickableBlock = !string.IsNullOrWhiteSpace(_data.Button.GetLink(Pageview)) && _data.Clickable; 180 string clickableClass = clickableBlock ? "cta-paragraph__container--clickable" : ""; 181 182 string contentRightClass = _data.ImagePosition.Equals("right") ? "image-right" : "image-left"; 183 } 184 185 <style> 186 .cta-paragraph__container--@paragraphID { 187 height: @ParagraphHeight; 188 } 189 190 @@media screen and (max-width: 991px) { 191 .cta-paragraph__container--@paragraphID .multiple-paragraphs-container { 192 height: calc(@ParagraphHeight/2); 193 } 194 } 195 </style> 196 197 @if (_data != null) 198 { 199 <div class="overflow-x-hidden" data-paragraphid="@paragraphID" id="@paragraphID"> 200 201 <section class="cta-paragraph cta-paragraph--@paragraphID @backgroundClass @_data.CssClass" style="@backgroundStyle"> 202 203 <div class="cta-paragraph__container cta-paragraph__container--video cta-paragraph__container--@paragraphID @fullWidthContainerClass @clickableClass @contentRightClass "> 204 205 @CTAParagraphVideo(_data) 206 @CTAParagraphContent(_data, newWindow, ariaLabel) 207 208 @if (clickableBlock) 209 { 210 <a href="@_data.Button.GetLink(Pageview)" class="cta-paragraph__clickable" @newWindow @ariaLabel></a> 211 } 212 </div> 213 214 </section> 215 216 </div> 217 } 218 219 @helper CTAParagraphVideo(CTAParagraphVideo _data) 220 { 221 string YoutubeID = _data.Video.YoutubeId; 222 string YoutubeLink = _data.Video.YoutubeLink; 223 224 string VimeoID = _data.Video.VimeoId; 225 string VimeoLink = _data.Video.VimeoLink; 226 227 int CleanVideo = _data.Video.Clean ? 1 : 0; 228 int ShowControls = _data.Video.ShowControls ? 1 : 0; 229 int AutoPlay = _data.Video.AutoPlay ? 1 : 0; 230 int LoopVideo = _data.Video.LoopVideo ? 1 : 0; 231 int MuteAudio = _data.Video.MuteAudio ? 1 : 0; 232 string origin = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain(); 233 234 if (!string.IsNullOrWhiteSpace(YoutubeLink)) 235 { 236 <section class="multiple-paragraphs-container"> 237 @if(AutoPlay == 1) 238 { 239 <div class="video-background"> 240 <div class="video-background__container video-background__container--youtube"> 241 <iframe class="js-youtube-video" loading="lazy" data-video="@YoutubeID" frameborder="0" allowfullscreen allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" title="YouTube video player" src="https://www.youtube-nocookie.com/embed/@YoutubeID?autoplay=@AutoPlay&controls=@ShowControls&loop=@LoopVideo&playlist=@YoutubeID&playsinline=1&modestbranding=@CleanVideo&mute=@MuteAudio&rel=0&enablejsapi=1&origin=@origin&disablekb=1"></iframe> 242 </div> 243 </div> 244 } 245 else 246 { 247 <div class="w-full"> 248 <div class="h-full"> 249 <lite-youtube videoid="@YoutubeID" params="controls=@ShowControls&loop=@LoopVideo&playlist=@YoutubeID&playsinline=1&modestbranding=@CleanVideo&mute=@MuteAudio&rel=0&enablejsapi=1& origin=@origin&disablekb=1"></lite-youtube> 250 </div> 251 </div> 252 } 253 </section> 254 } 255 if (!string.IsNullOrWhiteSpace(VimeoLink)) 256 { 257 <section class="multiple-paragraphs-container"> 258 <div class="video-background"> 259 <div class="video-background__container video-background__container--vimeo"> 260 <iframe class="js-youtube-video" loading="lazy" data-video="@VimeoID" frameborder="0" allowfullscreen allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" title="Vimeo video player" src="https://player.vimeo.com/video/@VimeoID?title=0&byline=0&portrait=0&autoplay=@AutoPlay&controls=@ShowControls&loop=@LoopVideo&muted=@MuteAudio"></iframe> 261 </div> 262 </div> 263 </section> 264 } 265 } 266 267 @helper CTAParagraphContent(CTAParagraphVideo _data, string newWindow, string ariaLabel) 268 { 269 var hasVideo = !string.IsNullOrWhiteSpace(_data.Video.YoutubeLink) || !string.IsNullOrWhiteSpace(_data.Video.VimeoLink); 270 var noImageClass = hasVideo ? "" : "no-image"; 271 272 string centerTextClass = _data.CenterVertical ? "text-center" : ""; 273 var centerContent = !string.IsNullOrWhiteSpace(_data.Video.YoutubeLink) || !string.IsNullOrWhiteSpace(_data.Video.VimeoLink) ? "" : "cta-paragraph__content--center"; 274 275 if (!string.IsNullOrWhiteSpace(_data.Button.ButtonText) || !string.IsNullOrWhiteSpace(_data.Content.Text) || !string.IsNullOrWhiteSpace(_data.Header.HeaderFormatted())) 276 { 277 <section class="cta-paragraph__content @centerContent @noImageClass"> 278 279 <article class="cta-paragraph__content-container @centerTextClass @noImageClass"> 280 @if (!string.IsNullOrWhiteSpace(_data.Header.HeaderFormatted())) 281 { 282 <header class="cta-paragraph__header"> 283 @_data.SubHeader.HeaderFormatted("cta-paragraph__subheader") 284 @_data.Header.HeaderFormatted("cta-paragraph__header") 285 </header> 286 } 287 288 @if (!string.IsNullOrWhiteSpace(_data.Content.Text)) 289 { 290 <div class="cta-paragraph__text @centerTextClass">@_data.Content.Text</div> 291 } 292 293 @if (!string.IsNullOrWhiteSpace(_data.Button.GetLink(Pageview)) && !string.IsNullOrWhiteSpace(_data.Button.ButtonText)) 294 { 295 <nav class="cta-paragraph__btn-navigation @centerTextClass"> 296 @RenderButton(_data.Button.Configuration, _data.Button.GetLink(Pageview), _data.Button.Configuration.ButtonClass, _data.Button.ButtonText, _data.Button.ButtonAriaLabel, _data.Button.NewWindow, "", "cta-paragraph__btn cta-paragraph__btn--extra", "cta-paragraph__btn-label", "cta-paragraph__btn-icon") 297 @RenderButton(_data.ExtraButton.Configuration, _data.ExtraButton.GetLink(Pageview), _data.ExtraButton.Configuration.ButtonClass, _data.ExtraButton.ButtonText, _data.ExtraButton.ButtonAriaLabel, _data.ExtraButton.NewWindow, "", "cta-paragraph__btn cta-paragraph__btn--extra", "cta-paragraph__btn-label", "cta-paragraph__btn-icon") 298 </nav> 299 } 300 301 </article> 302 303 </section> 304 305 } 306 } 307