nail art trends AW23
Nail Art Developer Kirsten Mutsaerts

Nail Art Developer Kirsten Mutsaerts

11 september 2023 in New Collection

8 minuten reading time

Nail Art Trends AW23

Trend alert!

What are the Nail Art Trends for winter of 2023?

Embrace the enchanting realm of nail artistry as we delve into Winter 2023's mystique. From snowflakes weaving tales to frosty winds, a tapestry of seasonal possibilities unfolds. Explore captivating nail looks gracing fingertips, each a unique brushstroke on winter's charming canvas. Join us in discovering the latest trends that make this season truly enchanting.

The trend is ombre, you're on it!

1. Sunset Ombre look

NAIL ART BRUSH INCLUDED! 

Achieve a professional ombre look effortlessly with the Ombre Sponge and the new Creamy Paint Palette. With its five trendy yet timeless shades, this palette is perfect for creating warm and beautiful ombre designs. Whether you're a beginner or a pro, you'll create stunning ombre looks in no time!

Or use it to create Handpainting Nail Art Looks! Add glitter to your colours for an extra touch of glamour.

The creamy texture of the gel ensures that it does not run out into the cuticles, giving you a flawless look every time. 

Error executing template "Designs/ProNails_generated/Paragraph/CTAParagraph.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at Bluedesk.DynamicWeb.ItemTypes.CTAButton.GetLink(PageView pv, String navigationtag)
   at CompiledRazorTemplates.Dynamic.RazorEngine_8bef9cdd88914a068a346a687674e270.Execute() in D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\CTAParagraph.cshtml:line 58
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using Dynamicweb; 3 @using Dynamicweb.Frontend; 4 @using Dynamicweb.Content.Items; 5 @using Bluedesk.DynamicWeb.ItemTypes; 6 @using Bluedesk.Tools.DynamicWeb.DataAccess; 7 8 @using System.Runtime.Caching; 9 10 11 @{ 12 /* var paragraphID = Pageview.CurrentParagraph.ID; 13 CTAParagraph _data = Dynamicweb.Services.Items.GetItem("CTAParagraph", Pageview.CurrentParagraph.ItemId).ToCodeFirstItem<CTAParagraph>() ?? new CTAParagraph(); */ 14 15 /* Hack */ 16 17 var paragraphID = Pageview.CurrentParagraph.ID; 18 CTAParagraph _data = new CTAParagraph(); 19 20 int CacheTime = 5; 21 MemoryCache memCache = MemoryCache.Default; 22 string cacheKey = $"CTAParagraph_{paragraphID}-{Pageview.AreaID}"; 23 24 if (Pageview.IsVisualEditorMode) 25 { 26 var cache = MemoryCache.Default; 27 memCache.Remove($"CTAParagraph_{paragraphID}-{Pageview.AreaID}"); 28 } 29 30 if (memCache.Contains(cacheKey)) 31 { 32 _data = memCache.Get(cacheKey) as CTAParagraph; 33 34 if (_data == null) 35 { 36 _data = Dynamicweb.Content.Services.Items.GetItem("CTAParagraph", Pageview.CurrentParagraph.ItemId).ToCodeFirstItem<CTAParagraph>() ?? new CTAParagraph(); 37 memCache.Set(cacheKey, _data, DateTimeOffset.UtcNow.AddMinutes(CacheTime)); 38 39 } 40 41 } 42 else 43 { 44 _data = Dynamicweb.Content.Services.Items.GetItem("CTAParagraph", Pageview.CurrentParagraph.ItemId).ToCodeFirstItem<CTAParagraph>() ?? new CTAParagraph(); 45 memCache.Set(cacheKey, _data, DateTimeOffset.UtcNow.AddMinutes(CacheTime)); 46 } 47 48 /* End Hack */ 49 50 List<string> BackgroundConfigIdList = ((List<string>)Dynamicweb.Context.Current.Items["BackgroundConfigIdList"]) ?? new List<string>(); 51 BackgroundConfigIdList.Add(_data.BackgroundConfigurationID); 52 Dynamicweb.Context.Current.Items["BackgroundConfigIdList"] = BackgroundConfigIdList; 53 54 string contentRightClass = _data.ImagePosition.Equals("right") ? "image-right" : "image-left"; 55 56 string newWindow = _data.Button.NewWindow ? "target='_blank'" : ""; 57 string ariaLabel = !string.IsNullOrWhiteSpace(_data.Button.ButtonAriaLabel) ? "aria-label='" + _data.Button.ButtonAriaLabel + "'" : ""; 58 bool clickableBlock = !string.IsNullOrWhiteSpace(_data.Button.GetLink(Pageview)) && _data.Clickable; 59 string clickableClass = clickableBlock ? "cta-paragraph__container--clickable" : ""; 60 string ctaHasBackgroundImageClass = _data.ImageAsBackground ? "cta-paragraph--hasbackgroundimg" : ""; 61 62 bool hasContent = !string.IsNullOrWhiteSpace(_data.Button.ButtonText) || !string.IsNullOrWhiteSpace(_data.Content.Text) || !string.IsNullOrWhiteSpace(_data.Header.HeaderFormatted()); 63 double ColumnWidthSize = hasContent ? 0.5 : 1; 64 65 // string backgroundClass = getbackgroundclass(_data.BackgroundConfiguration.BackgroundClass); 66 67 string AnimateDirection = !string.IsNullOrWhiteSpace(_data.AnimateDirection) ? _data.AnimateDirection : ""; 68 bool AnimateHalfBlock = false; 69 int AnimationDuration = _data.AnimateDuration; 70 string DataAosValue = ""; 71 72 switch (AnimateDirection) 73 { 74 case "left": 75 DataAosValue = "fade-left"; 76 break; 77 78 case "right": 79 DataAosValue = "fade-right"; 80 break; 81 82 case "up": 83 DataAosValue = "fade-up"; 84 break; 85 86 case "down": 87 DataAosValue = "fade-down"; 88 break; 89 90 case "center": 91 AnimateHalfBlock = true; 92 break; 93 94 case "": 95 case "none": 96 // No action 97 break; 98 } 99 100 string ParagraphHeight = _data.Height == 0 ? "auto" : _data.Height + "px"; 101 102 } 103 104 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 105 @using Dynamicweb; 106 @using Dynamicweb.Content.Items; 107 @using Bluedesk.DynamicWeb.ItemTypes; 108 109 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 110 @using Dynamicweb; 111 @using Dynamicweb.Content.Items; 112 @using Bluedesk.DynamicWeb.ItemTypes; 113 114 @functions { 115 116 Dictionary<string, string> GetFontConfiguration(string TextColor, FontConfigurationItemTab FontConfiguration) 117 { 118 var colorService = new ColorSwatchService(); 119 TextColor = !string.IsNullOrWhiteSpace(TextColor) ? TextColor : "" ; 120 TextColor = !TextColor.Contains("#") ? colorService.GetHexColor(Pageview.AreaID, TextColor) : TextColor; 121 Dictionary<string, string> FontConfig = new Dictionary<string, string>() { 122 { "textColor" , TextColor }, 123 { "fontSize" , FontConfiguration.FontSize }, 124 { "lineHeight", FontConfiguration.LineHeight}, 125 { "fontFamily" , FontConfiguration.FontConfiguration.FontFamily }, 126 { "fontWeight" , FontConfiguration.FontWeight }, 127 { "fontStyle" , FontConfiguration.FontStyle } 128 }; 129 return FontConfig; 130 } 131 132 public string GenerateButtonConfigVariables(ButtonConfiguration BC, MasterConfig mc, int areaId) 133 { 134 string ButtonLabelAlignment = BC.ButtonLabelAlignment; 135 switch (ButtonLabelAlignment) 136 { 137 case "align-left": 138 ButtonLabelAlignment = "flex-start"; 139 break; 140 case "align-center": 141 ButtonLabelAlignment = "center"; 142 break; 143 case "align-right": 144 ButtonLabelAlignment = "flex-end"; 145 break; 146 case "align-full": 147 ButtonLabelAlignment = "space-between"; 148 break; 149 default: 150 ButtonLabelAlignment = "flex-start"; 151 break; 152 } 153 154 var btnStyleBlock = new System.Text.StringBuilder(); 155 156 // General Config 157 btnStyleBlock.Append(GenerateCssVar("btn-min-height", $"{mc.GeneralConfiguration.ButtonHeight}px")); 158 btnStyleBlock.Append(GenerateCssVar("btn-border-radius", $"{mc.GeneralConfiguration.RoundedCornerValue}px")); 159 160 // Button Config 161 btnStyleBlock.Append(GenerateCssVar("btn-border-width", $"{BC.BorderSize.ToString()}px")); 162 btnStyleBlock.Append(GenerateCssVar("btn-label-alignment", ButtonLabelAlignment)); 163 164 // Button Config Tab 165 btnStyleBlock.Append(GenerateCssVar("btn-bg-color", BC.ButtonColorConfiguration.BackgroundColor.GetColorCode(areaId))); 166 btnStyleBlock.Append(GenerateCssVar("btn-font-color", BC.ButtonColorConfiguration.FontColor.GetColorCode(areaId))); 167 btnStyleBlock.Append(GenerateCssVar("btn-border-color", BC.ButtonColorConfiguration.BorderColor.GetColorCode(areaId))); 168 169 // Button Config Hover tab 170 btnStyleBlock.Append(GenerateCssVar("btn-bg-color-hover", BC.ButtonHoverColorConfiguration.BackgroundColor.GetColorCode(areaId))); 171 btnStyleBlock.Append(GenerateCssVar("btn-font-color-hover", BC.ButtonHoverColorConfiguration.FontColor.GetColorCode(areaId))); 172 btnStyleBlock.Append(GenerateCssVar("btn-border-color-hover", BC.ButtonHoverColorConfiguration.BorderColor.GetColorCode(areaId))); 173 174 // Button Config Font Config 175 btnStyleBlock.Append(GenerateCssVar("btn-font-size", BC.FontConfiguration.FontSize)); 176 btnStyleBlock.Append(GenerateCssVar("btn-font-config-color", BC.FontConfiguration.Color.GetColorCode(areaId))); 177 btnStyleBlock.Append(GenerateCssVar("btn-font-line-height", BC.FontConfiguration.LineHeight)); 178 btnStyleBlock.Append(GenerateCssVar("btn-font-family", BC.FontConfiguration.FontConfiguration.FontFamily)); 179 btnStyleBlock.Append(GenerateCssVar("btn-font-weight", BC.FontConfiguration.FontWeight)); 180 btnStyleBlock.Append(GenerateCssVar("btn-font-transform", BC.FontConfiguration.FontStyle)); 181 182 return btnStyleBlock.ToString(); 183 } 184 185 public string GenerateCssVar(string name, string value) 186 { 187 if (!string.IsNullOrWhiteSpace(value)) { 188 return $"--{name}: {value};"; 189 } else { 190 return ""; 191 } 192 } 193 } 194 195 196 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 197 @using Dynamicweb; 198 @using Dynamicweb.Content.Items; 199 @using Bluedesk.DynamicWeb.ItemTypes; 200 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 201 202 203 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 204 @using Dynamicweb; 205 @using Dynamicweb.Content.Items; 206 @using Bluedesk.DynamicWeb.ItemTypes; 207 @using Bluedesk.DynamicWeb.ItemTypes.Extensions; 208 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 209 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 210 @using Dynamicweb; 211 @using Dynamicweb.Frontend 212 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 213 214 @helper RenderButton(CTAButton button, PageView Pageview) 215 { 216 217 if (!string.IsNullOrWhiteSpace(button.GetLink(Pageview))) 218 { 219 string Template = button.GetButtonTemplate().Replace("{{ ButtonLink }}", button.GetLink(Pageview)); 220 @Template; 221 } 222 } 223 224 225 @{ 226 227 var colorService = new ColorSwatchService(); 228 229 string fullWidthContainerClass = _data.Fullwidth ? "" : "container"; 230 231 string backgroundClass = !string.IsNullOrWhiteSpace(_data.BackgroundConfiguration.BackgroundClass) ? string.Format("bg-{0}", _data.BackgroundConfiguration.BackgroundClass) : ""; 232 string backgroundStyle = !string.IsNullOrWhiteSpace(_data.BackgroundConfiguration.BackgroundColor) ? $"background-color: {_data.BackgroundConfiguration.BackgroundColor}; " : ""; 233 backgroundStyle += !string.IsNullOrWhiteSpace(_data.BackgroundConfiguration.BackgroundImage) ? $"background-image: url({_data.BackgroundConfiguration.BackgroundImage}); " : ""; 234 235 // string backgroundClass = "null"; 236 // string backgroundStyle = ""; 237 } 238 239 240 @functions { 241 //string getbackgroundclass(string backgroundClass) 242 //{ 243 // return !string.IsNullOrWhiteSpace(backgroundClass) ? string.Format("bg-{0}", backgroundClass) : ""; 244 //} 245 } 246 247 @helper CTAParagraphImage( 248 ParagraphImageResizable Image, 249 bool hasContent, 250 bool ImageAsBackground, 251 string ImagePosition, 252 bool ParallaxImage, 253 bool Fullwidth, 254 string imagesHeight, 255 double ColumnWidthSize, 256 int AnimationDuration = 300, 257 bool AnimateHalfBlock = false 258 ) 259 { 260 if (!string.IsNullOrWhiteSpace(Image.Image)) 261 { 262 263 string image = !string.IsNullOrWhiteSpace(Image.Image) ? Image.Image : null; 264 imagesHeight = hasContent ? imagesHeight : "100%"; 265 imagesHeight = !string.IsNullOrWhiteSpace(imagesHeight) ? "height: " + imagesHeight + ";" : ""; 266 267 string imageParrallax = ParallaxImage ? "rellax" : ""; 268 string imageAsBackground = ImageAsBackground ? "cta-paragraph__image--is-background" : ""; 269 double imageWidth = 2000; 270 271 imageWidth = Fullwidth ? imageWidth : 1200; 272 imageWidth = !ImageAsBackground ? imageWidth * ColumnWidthSize : imageWidth; 273 274 string strImageWidth = imageWidth + "px"; 275 string strImageWidthSize = imageWidth + "w"; 276 277 string ImageUrl; 278 if (image.EndsWith(".gif")) 279 { 280 ImageUrl = image; 281 } 282 else 283 { 284 ImageUrl = "/Admin/Public/GetImage.ashx?Image=" + image + "&Crop=7&Format=webp&Quality=90&Compression=80"; 285 ImageUrl = ImageUrl.Replace("?x", "&x"); 286 } 287 288 string animationDirection = AnimateHalfBlock ? ImagePosition.Equals("right") ? "fade-left" : "fade-right" : ""; 289 290 if (!string.IsNullOrWhiteSpace(Image.Image)) 291 { 292 293 <figure class="cta-paragraph__image-container @imageAsBackground @Image.PositionY @Image.PositionX" style="@imagesHeight" data-aos="@animationDirection" data-aos-duration="@AnimationDuration"> 294 295 <picture class="cta-paragraph__image @Image.BackgroundSize @imageParrallax"> 296 @if (ImageUrl.EndsWith(".gif")) 297 { 298 <source media="(max-width: 400px)" srcset="@ImageUrl&Width=400"> 299 <source media="(max-width: 994px)" srcset="@ImageUrl&Width=994"> 300 <img src="@ImageUrl" loading="lazy" alt="@Image.ImageAlt" class="cta-paragraph__image @Image.BackgroundSize @imageParrallax" width="1980" height="500"> 301 } 302 else 303 { 304 <source media="(max-width: 400px)" srcset="@ImageUrl&Width=400"> 305 <source media="(max-width: 994px)" srcset="@ImageUrl&Width=994"> 306 <img src="@ImageUrl&Width=@imageWidth" loading="lazy" alt="@Image.ImageAlt" class="cta-paragraph__image @Image.BackgroundSize @imageParrallax" width="1980" height="500"> 307 } 308 </picture> 309 310 </figure> 311 } 312 } 313 } 314 315 @helper CTAParagraphContent( 316 int paragraphID, 317 ParagraphHeader Header, 318 ParagraphHeader SubHeader, 319 ParagraphContent Content, 320 CTAButton Button, 321 CTAButton ExtraButton, 322 ParagraphImage Image, 323 bool strCenterVertical, 324 string ImagePosition = "", 325 int AnimationDuration = 300, 326 bool AnimateHalfBlock = false 327 ) 328 { 329 330 bool hasImage = !string.IsNullOrWhiteSpace(Image.Image) ? true : false; 331 string noImageClass = hasImage ? "" : "no-image"; 332 333 string centerTextClass = strCenterVertical ? "text-center" : ""; 334 string centerContent = !string.IsNullOrWhiteSpace(Image.Image) ? "" : "cta-paragraph__content--center"; 335 336 string paragraphInstanceClass = "cta-paragraph__content--" + paragraphID; 337 338 string animationDirection = (AnimateHalfBlock && hasImage) ? ImagePosition.Equals("right") ? "fade-right" : "fade-left" : ""; 339 340 if (!string.IsNullOrWhiteSpace(Button.ButtonText) || !string.IsNullOrWhiteSpace(Content.Text) || !string.IsNullOrWhiteSpace(Header.HeaderFormatted("cta-paragraph__header"))) 341 { 342 343 <section class="cta-paragraph__content @paragraphInstanceClass @centerContent @noImageClass" data-aos="@animationDirection" data-aos-duration="@AnimationDuration"> 344 345 <article class="cta-paragraph__content-container @noImageClass"> 346 347 @if (!string.IsNullOrWhiteSpace(Header.HeaderFormatted("cta-paragraph__header"))) 348 { 349 <header class="cta-paragraph__header @centerTextClass"> 350 @if (SubHeader != null) 351 { 352 @SubHeader.HeaderFormatted("cta-paragraph__subheader") 353 } 354 @Header.HeaderFormatted("cta-paragraph__header") 355 </header> 356 } 357 358 @if (!string.IsNullOrWhiteSpace(Content.Text)) 359 { 360 <div class="cta-paragraph__text @centerTextClass">@Content.Text</div> 361 } 362 363 @if (!string.IsNullOrWhiteSpace(Button.GetLink(Pageview)) && !string.IsNullOrWhiteSpace(Button.ButtonText)) 364 { 365 <nav class="cta-paragraph__btn-navigation @centerTextClass"> 366 @RenderButton(Button, Pageview) 367 @RenderButton(ExtraButton, Pageview) 368 </nav> 369 } 370 371 </article> 372 </section> 373 374 } 375 376 } 377 378 @helper CTAParagraphVideo(ParagraphVideo Video, string imagesHeight) 379 { 380 if (!string.IsNullOrWhiteSpace(Video.YoutubeLink) || !string.IsNullOrWhiteSpace(Video.VimeoLink)) 381 { 382 string YoutubeID = Video.YoutubeId; 383 string YoutubeLink = Video.YoutubeLink; 384 385 string VimeoID = Video.VimeoId; 386 string VimeoLink = Video.VimeoLink; 387 388 int CleanVideo = Video.Clean ? 1 : 0; 389 int ShowControls = Video.ShowControls ? 1 : 0; 390 int AutoPlay = Video.AutoPlay ? 1 : 0; 391 int LoopVideo = Video.LoopVideo ? 1 : 0; 392 int MuteAudio = Video.MuteAudio ? 1 : 0; 393 string hideControlsClass = Video.ShowControls ? "video-player-wrapper--hidecontrols" : ""; 394 string origin = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain(); 395 imagesHeight = !string.IsNullOrWhiteSpace(imagesHeight) ? "height: " + imagesHeight + ";" : ""; 396 397 if (!string.IsNullOrWhiteSpace(YoutubeLink)) 398 { 399 if(AutoPlay == 1) 400 { 401 <section class="cta-paragraph__video-container" style="@imagesHeight"> 402 <div class=""> 403 <div class="video-player-wrapper @hideControlsClass"> 404 <iframe class="video-player" 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=0"></iframe> 405 </div> 406 </div> 407 </section> 408 } 409 else 410 { 411 <lite-youtube style="@imagesHeight" videoid="@YoutubeID" params="controls=@ShowControls&loop=@LoopVideo&playlist=@YoutubeID&playsinline=1&modestbranding=@CleanVideo&mute=@MuteAudio&rel=0&enablejsapi=1&origin=@origin&disablekb=0"></lite-youtube> 412 } 413 } 414 if (!string.IsNullOrWhiteSpace(VimeoLink)) 415 { 416 <section class="cta-paragraph__video-container" style="@imagesHeight"> 417 <div class=""> 418 <div class="video-player-wrapper"> 419 <iframe class="video-player" 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> 420 </div> 421 </div> 422 </section> 423 } 424 } 425 } 426 427 @helper CTAParagraphIcon(ParagraphIcon Icon, bool strCenterVertical) 428 { 429 if (!string.IsNullOrWhiteSpace(Icon.FaIcon)) 430 { 431 string centerIconClass = strCenterVertical ? "justify-center" : "justify-start"; 432 string iconSizeClass = string.Format("cta-paragraph__icon--{0}", Icon.FaIconSize); 433 434 <div class="cta-paragraph__icon-container"> 435 <div class="cta-paragraph__icon-inner-container @centerIconClass"> 436 <span class="cta-paragraph__icon @iconSizeClass">@Icon.FaIcon</span> 437 </div> 438 </div> 439 } 440 } 441 442 @helper RenderContentAlignment(BackgroundConfiguration data) 443 { 444 445 switch (data.ContentElementAlign) 446 { 447 case "align-left": 448 <text> 449 align-items: flex-start; 450 text-align: left; 451 </text> 452 break; 453 case "align-center": 454 <text> 455 align-items: center; 456 text-align: center; 457 </text> 458 break; 459 case "align-right": 460 <text> 461 align-items: flex-end; 462 text-align: right; 463 </text> 464 break; 465 case "align-full": 466 <text> 467 align-items: flex-start; 468 text-align: justify; 469 </text> 470 break; 471 } 472 473 } 474 475 476 <style> 477 478 @@media screen and (min-width: 991px) { 479 .cta-paragraph__container--@paragraphID { 480 height: @ParagraphHeight !important; 481 } 482 } 483 484 </style> 485 486 @if (_data != null) 487 { 488 489 string BackgroundPadding = _data.BackgroundConfiguration.backgroundPadding; 490 491 bool Containerfit = _data.BackgroundConfiguration.ContainerFit == "Fit" ? true : false; 492 if (!string.IsNullOrWhiteSpace(contentRightClass)) 493 { 494 contentRightClass = Containerfit ? "" : contentRightClass; 495 } 496 497 string backgroundImageRepeatClass = _data.BackgroundConfiguration.BackgroundImageRepeat; 498 string backgroundImageSizeClass = ""; 499 500 string BackgroundImagePositionX = _data.BackgroundConfiguration.BackgroundImagePositionX; 501 string BackgroundImagePositionY = _data.BackgroundConfiguration.BackgroundImagePositionY; 502 503 504 string BackgroundImagePositionClass = ""; 505 506 if (backgroundImageRepeatClass == "no-repeat") 507 { 508 BackgroundImagePositionClass = BackgroundImagePositionY + "-" + BackgroundImagePositionX; 509 backgroundImageSizeClass = _data.BackgroundConfiguration.BackgroundImageSize; 510 } 511 512 string shadowClass = _data.BackgroundConfiguration.contentShadow ? "contentShadow" : ""; 513 514 <section class="cta-paragraph cta-paragraph--@paragraphID config--@_data.BackgroundConfigurationID @backgroundClass @_data.CssClass @backgroundImageRepeatClass @BackgroundImagePositionClass @backgroundImageSizeClass @BackgroundPadding @ctaHasBackgroundImageClass" style="@backgroundStyle" data-paragraphid="@paragraphID" id="@paragraphID" data-aos="@DataAosValue" data-aos-duration="@AnimationDuration"> 515 516 <div class="cta-paragraph__container cta-paragraph__container--@paragraphID @fullWidthContainerClass @clickableClass @contentRightClass @shadowClass"> 517 518 <style> 519 520 .cta-paragraph--@paragraphID .cta-paragraph__content { 521 @if (Containerfit) 522 { 523 <text> 524 flex-grow: 0; 525 </text> 526 } 527 } 528 529 .cta-paragraph--@paragraphID .cta-paragraph__image-container { 530 @if (Containerfit) 531 { 532 <text> 533 position: absolute; 534 top: 0; 535 left: 0; 536 right: 0; 537 bottom: 0; 538 </text> 539 } 540 } 541 542 </style> 543 544 @CTAParagraphImage( 545 _data.Image, 546 true, 547 _data.ImageAsBackground, 548 _data.ImagePosition, 549 _data.ParallaxImage, 550 _data.Fullwidth, 551 "", 552 ColumnWidthSize, 553 AnimationDuration, 554 AnimateHalfBlock 555 ) 556 @CTAParagraphContent( 557 paragraphID, 558 _data.Header, 559 _data.SubHeader, 560 _data.Content, 561 _data.Button, 562 _data.ExtraButton, 563 _data.Image, 564 _data.CenterVertical, 565 _data.ImagePosition, 566 AnimationDuration, 567 AnimateHalfBlock 568 ) 569 570 @if (clickableBlock) 571 { 572 <a href="@_data.Button.GetLink(Pageview)" class="cta-paragraph__clickable" @newWindow @ariaLabel></a> 573 } 574 575 </div> 576 577 </section> 578 } 579

Snow is falling on my nails

3. Snowy Snowflakes Stickers

Turn nails into a winter wonderland thanks to these magical snowflakes. These nail stickers are perfect to add flakes of chilly elegance to all your 
winter looks. 

Sent from Above

4. Dark Roses Stickers

Become a real Tattoo Artist and experiment with these Dark Roses nail stickers! Feminine, seductive, and sensual. Your unique tattoo, until the next refill anyway!

Error executing template "Designs/ProNails_generated/Paragraph/MultiColumnParagraph.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at Bluedesk.DynamicWeb.ItemTypes.CTAButton.GetLink(PageView pv, String navigationtag)
   at CompiledRazorTemplates.Dynamic.RazorEngine_416bd10ed169486c884fcd53bb56e26d.<>c__DisplayClass9_0.<RenderContentArea>b__0(TextWriter __razor_helper_writer) in D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\MultiColumnParagraph.cshtml:line 749
   at CompiledRazorTemplates.Dynamic.RazorEngine_416bd10ed169486c884fcd53bb56e26d.Execute() in D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\MultiColumnParagraph.cshtml:line 673
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 3 @using Dynamicweb; 4 @using Dynamicweb.Content.Items; 5 @using System.Web; 6 @using Bluedesk.Tools.DynamicWeb.ExtensionMethods; 7 @using Bluedesk.DynamicWeb.ItemTypes; 8 9 @using Dynamicweb.Frontend; 10 @using Bluedesk.Tools.DynamicWeb.DataAccess; 11 @using System.Runtime.Caching; 12 13 14 @{ 15 16 /* 17 var paragraphID = Pageview.CurrentParagraph.ID; 18 MultiColumnParagraph _data = Dynamicweb.Services.Items.GetItem("MultiColumnParagraph", Pageview.CurrentParagraph.ItemId).ToCodeFirstItem<MultiColumnParagraph>() ?? new MultiColumnParagraph(); */ 19 20 var paragraphID = Pageview.CurrentParagraph.ID; 21 MultiColumnParagraph _data = new MultiColumnParagraph(); 22 23 int CacheTime = 5; 24 MemoryCache memCache = MemoryCache.Default; 25 string cacheKey = $"MultiColumnParagraph_{paragraphID}-{Pageview.AreaID}"; 26 27 if (Pageview.IsVisualEditorMode) 28 { 29 var cache = MemoryCache.Default; 30 memCache.Remove($"MultiColumnParagraph_{paragraphID}-{Pageview.AreaID}"); 31 } 32 33 if (memCache.Contains(cacheKey)) 34 { 35 _data = memCache.Get(cacheKey) as MultiColumnParagraph; 36 37 if (_data == null) 38 { 39 _data = Dynamicweb.Content.Services.Items.GetItem("MultiColumnParagraph", Pageview.CurrentParagraph.ItemId).ToCodeFirstItem<MultiColumnParagraph>() ?? new MultiColumnParagraph(); 40 memCache.Set(cacheKey, _data, DateTimeOffset.UtcNow.AddMinutes(CacheTime)); 41 42 } 43 44 } 45 else 46 { 47 _data = Dynamicweb.Content.Services.Items.GetItem("MultiColumnParagraph", Pageview.CurrentParagraph.ItemId).ToCodeFirstItem<MultiColumnParagraph>() ?? new MultiColumnParagraph(); 48 memCache.Set(cacheKey, _data, DateTimeOffset.UtcNow.AddMinutes(CacheTime)); 49 } 50 51 52 List<string> BackgroundConfigIdList = ((List<string>)Dynamicweb.Context.Current.Items["BackgroundConfigIdList"]) ?? new List<string>(); 53 BackgroundConfigIdList.Add(_data.BackgroundConfigurationID); 54 Dynamicweb.Context.Current.Items["BackgroundConfigIdList"] = BackgroundConfigIdList; 55 56 string ParagraphHeight = _data.Height == 0 ? "auto" : _data.Height + "px"; 57 string MobileParagraphHeight = _data.MobileHeight == 0 ? "auto" : _data.MobileHeight + "px"; 58 59 } 60 61 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 62 @using Dynamicweb; 63 @using Dynamicweb.Content.Items; 64 @using Bluedesk.DynamicWeb.ItemTypes; 65 66 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 67 @using Dynamicweb; 68 @using Dynamicweb.Content.Items; 69 @using Bluedesk.DynamicWeb.ItemTypes; 70 71 @functions { 72 73 Dictionary<string, string> GetFontConfiguration(string TextColor, FontConfigurationItemTab FontConfiguration) 74 { 75 var colorService = new ColorSwatchService(); 76 TextColor = !string.IsNullOrWhiteSpace(TextColor) ? TextColor : "" ; 77 TextColor = !TextColor.Contains("#") ? colorService.GetHexColor(Pageview.AreaID, TextColor) : TextColor; 78 Dictionary<string, string> FontConfig = new Dictionary<string, string>() { 79 { "textColor" , TextColor }, 80 { "fontSize" , FontConfiguration.FontSize }, 81 { "lineHeight", FontConfiguration.LineHeight}, 82 { "fontFamily" , FontConfiguration.FontConfiguration.FontFamily }, 83 { "fontWeight" , FontConfiguration.FontWeight }, 84 { "fontStyle" , FontConfiguration.FontStyle } 85 }; 86 return FontConfig; 87 } 88 89 public string GenerateButtonConfigVariables(ButtonConfiguration BC, MasterConfig mc, int areaId) 90 { 91 string ButtonLabelAlignment = BC.ButtonLabelAlignment; 92 switch (ButtonLabelAlignment) 93 { 94 case "align-left": 95 ButtonLabelAlignment = "flex-start"; 96 break; 97 case "align-center": 98 ButtonLabelAlignment = "center"; 99 break; 100 case "align-right": 101 ButtonLabelAlignment = "flex-end"; 102 break; 103 case "align-full": 104 ButtonLabelAlignment = "space-between"; 105 break; 106 default: 107 ButtonLabelAlignment = "flex-start"; 108 break; 109 } 110 111 var btnStyleBlock = new System.Text.StringBuilder(); 112 113 // General Config 114 btnStyleBlock.Append(GenerateCssVar("btn-min-height", $"{mc.GeneralConfiguration.ButtonHeight}px")); 115 btnStyleBlock.Append(GenerateCssVar("btn-border-radius", $"{mc.GeneralConfiguration.RoundedCornerValue}px")); 116 117 // Button Config 118 btnStyleBlock.Append(GenerateCssVar("btn-border-width", $"{BC.BorderSize.ToString()}px")); 119 btnStyleBlock.Append(GenerateCssVar("btn-label-alignment", ButtonLabelAlignment)); 120 121 // Button Config Tab 122 btnStyleBlock.Append(GenerateCssVar("btn-bg-color", BC.ButtonColorConfiguration.BackgroundColor.GetColorCode(areaId))); 123 btnStyleBlock.Append(GenerateCssVar("btn-font-color", BC.ButtonColorConfiguration.FontColor.GetColorCode(areaId))); 124 btnStyleBlock.Append(GenerateCssVar("btn-border-color", BC.ButtonColorConfiguration.BorderColor.GetColorCode(areaId))); 125 126 // Button Config Hover tab 127 btnStyleBlock.Append(GenerateCssVar("btn-bg-color-hover", BC.ButtonHoverColorConfiguration.BackgroundColor.GetColorCode(areaId))); 128 btnStyleBlock.Append(GenerateCssVar("btn-font-color-hover", BC.ButtonHoverColorConfiguration.FontColor.GetColorCode(areaId))); 129 btnStyleBlock.Append(GenerateCssVar("btn-border-color-hover", BC.ButtonHoverColorConfiguration.BorderColor.GetColorCode(areaId))); 130 131 // Button Config Font Config 132 btnStyleBlock.Append(GenerateCssVar("btn-font-size", BC.FontConfiguration.FontSize)); 133 btnStyleBlock.Append(GenerateCssVar("btn-font-config-color", BC.FontConfiguration.Color.GetColorCode(areaId))); 134 btnStyleBlock.Append(GenerateCssVar("btn-font-line-height", BC.FontConfiguration.LineHeight)); 135 btnStyleBlock.Append(GenerateCssVar("btn-font-family", BC.FontConfiguration.FontConfiguration.FontFamily)); 136 btnStyleBlock.Append(GenerateCssVar("btn-font-weight", BC.FontConfiguration.FontWeight)); 137 btnStyleBlock.Append(GenerateCssVar("btn-font-transform", BC.FontConfiguration.FontStyle)); 138 139 return btnStyleBlock.ToString(); 140 } 141 142 public string GenerateCssVar(string name, string value) 143 { 144 if (!string.IsNullOrWhiteSpace(value)) { 145 return $"--{name}: {value};"; 146 } else { 147 return ""; 148 } 149 } 150 } 151 152 153 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 154 @using Dynamicweb; 155 @using Dynamicweb.Content.Items; 156 @using Bluedesk.DynamicWeb.ItemTypes; 157 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 158 159 160 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 161 @using Dynamicweb; 162 @using Dynamicweb.Content.Items; 163 @using Bluedesk.DynamicWeb.ItemTypes; 164 @using Bluedesk.DynamicWeb.ItemTypes.Extensions; 165 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 166 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 167 @using Dynamicweb; 168 @using Dynamicweb.Frontend 169 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 170 171 @helper RenderButton(CTAButton button, PageView Pageview) 172 { 173 174 if (!string.IsNullOrWhiteSpace(button.GetLink(Pageview))) 175 { 176 string Template = button.GetButtonTemplate().Replace("{{ ButtonLink }}", button.GetLink(Pageview)); 177 @Template; 178 } 179 } 180 181 182 @{ 183 184 var colorService = new ColorSwatchService(); 185 186 string fullWidthContainerClass = _data.Fullwidth ? "" : "container"; 187 188 string backgroundClass = !string.IsNullOrWhiteSpace(_data.BackgroundConfiguration.BackgroundClass) ? string.Format("bg-{0}", _data.BackgroundConfiguration.BackgroundClass) : ""; 189 string backgroundStyle = !string.IsNullOrWhiteSpace(_data.BackgroundConfiguration.BackgroundColor) ? $"background-color: {_data.BackgroundConfiguration.BackgroundColor}; " : ""; 190 backgroundStyle += !string.IsNullOrWhiteSpace(_data.BackgroundConfiguration.BackgroundImage) ? $"background-image: url({_data.BackgroundConfiguration.BackgroundImage}); " : ""; 191 192 // string backgroundClass = "null"; 193 // string backgroundStyle = ""; 194 } 195 196 197 @functions { 198 //string getbackgroundclass(string backgroundClass) 199 //{ 200 // return !string.IsNullOrWhiteSpace(backgroundClass) ? string.Format("bg-{0}", backgroundClass) : ""; 201 //} 202 } 203 204 @helper CTAParagraphImage( 205 ParagraphImageResizable Image, 206 bool hasContent, 207 bool ImageAsBackground, 208 string ImagePosition, 209 bool ParallaxImage, 210 bool Fullwidth, 211 string imagesHeight, 212 double ColumnWidthSize, 213 int AnimationDuration = 300, 214 bool AnimateHalfBlock = false 215 ) 216 { 217 if (!string.IsNullOrWhiteSpace(Image.Image)) 218 { 219 220 string image = !string.IsNullOrWhiteSpace(Image.Image) ? Image.Image : null; 221 imagesHeight = hasContent ? imagesHeight : "100%"; 222 imagesHeight = !string.IsNullOrWhiteSpace(imagesHeight) ? "height: " + imagesHeight + ";" : ""; 223 224 string imageParrallax = ParallaxImage ? "rellax" : ""; 225 string imageAsBackground = ImageAsBackground ? "cta-paragraph__image--is-background" : ""; 226 double imageWidth = 2000; 227 228 imageWidth = Fullwidth ? imageWidth : 1200; 229 imageWidth = !ImageAsBackground ? imageWidth * ColumnWidthSize : imageWidth; 230 231 string strImageWidth = imageWidth + "px"; 232 string strImageWidthSize = imageWidth + "w"; 233 234 string ImageUrl; 235 if (image.EndsWith(".gif")) 236 { 237 ImageUrl = image; 238 } 239 else 240 { 241 ImageUrl = "/Admin/Public/GetImage.ashx?Image=" + image + "&Crop=7&Format=webp&Quality=90&Compression=80"; 242 ImageUrl = ImageUrl.Replace("?x", "&x"); 243 } 244 245 string animationDirection = AnimateHalfBlock ? ImagePosition.Equals("right") ? "fade-left" : "fade-right" : ""; 246 247 if (!string.IsNullOrWhiteSpace(Image.Image)) 248 { 249 250 <figure class="cta-paragraph__image-container @imageAsBackground @Image.PositionY @Image.PositionX" style="@imagesHeight" data-aos="@animationDirection" data-aos-duration="@AnimationDuration"> 251 252 <picture class="cta-paragraph__image @Image.BackgroundSize @imageParrallax"> 253 @if (ImageUrl.EndsWith(".gif")) 254 { 255 <source media="(max-width: 400px)" srcset="@ImageUrl&Width=400"> 256 <source media="(max-width: 994px)" srcset="@ImageUrl&Width=994"> 257 <img src="@ImageUrl" loading="lazy" alt="@Image.ImageAlt" class="cta-paragraph__image @Image.BackgroundSize @imageParrallax" width="1980" height="500"> 258 } 259 else 260 { 261 <source media="(max-width: 400px)" srcset="@ImageUrl&Width=400"> 262 <source media="(max-width: 994px)" srcset="@ImageUrl&Width=994"> 263 <img src="@ImageUrl&Width=@imageWidth" loading="lazy" alt="@Image.ImageAlt" class="cta-paragraph__image @Image.BackgroundSize @imageParrallax" width="1980" height="500"> 264 } 265 </picture> 266 267 </figure> 268 } 269 } 270 } 271 272 @helper CTAParagraphContent( 273 int paragraphID, 274 ParagraphHeader Header, 275 ParagraphHeader SubHeader, 276 ParagraphContent Content, 277 CTAButton Button, 278 CTAButton ExtraButton, 279 ParagraphImage Image, 280 bool strCenterVertical, 281 string ImagePosition = "", 282 int AnimationDuration = 300, 283 bool AnimateHalfBlock = false 284 ) 285 { 286 287 bool hasImage = !string.IsNullOrWhiteSpace(Image.Image) ? true : false; 288 string noImageClass = hasImage ? "" : "no-image"; 289 290 string centerTextClass = strCenterVertical ? "text-center" : ""; 291 string centerContent = !string.IsNullOrWhiteSpace(Image.Image) ? "" : "cta-paragraph__content--center"; 292 293 string paragraphInstanceClass = "cta-paragraph__content--" + paragraphID; 294 295 string animationDirection = (AnimateHalfBlock && hasImage) ? ImagePosition.Equals("right") ? "fade-right" : "fade-left" : ""; 296 297 if (!string.IsNullOrWhiteSpace(Button.ButtonText) || !string.IsNullOrWhiteSpace(Content.Text) || !string.IsNullOrWhiteSpace(Header.HeaderFormatted("cta-paragraph__header"))) 298 { 299 300 <section class="cta-paragraph__content @paragraphInstanceClass @centerContent @noImageClass" data-aos="@animationDirection" data-aos-duration="@AnimationDuration"> 301 302 <article class="cta-paragraph__content-container @noImageClass"> 303 304 @if (!string.IsNullOrWhiteSpace(Header.HeaderFormatted("cta-paragraph__header"))) 305 { 306 <header class="cta-paragraph__header @centerTextClass"> 307 @if (SubHeader != null) 308 { 309 @SubHeader.HeaderFormatted("cta-paragraph__subheader") 310 } 311 @Header.HeaderFormatted("cta-paragraph__header") 312 </header> 313 } 314 315 @if (!string.IsNullOrWhiteSpace(Content.Text)) 316 { 317 <div class="cta-paragraph__text @centerTextClass">@Content.Text</div> 318 } 319 320 @if (!string.IsNullOrWhiteSpace(Button.GetLink(Pageview)) && !string.IsNullOrWhiteSpace(Button.ButtonText)) 321 { 322 <nav class="cta-paragraph__btn-navigation @centerTextClass"> 323 @RenderButton(Button, Pageview) 324 @RenderButton(ExtraButton, Pageview) 325 </nav> 326 } 327 328 </article> 329 </section> 330 331 } 332 333 } 334 335 @helper CTAParagraphVideo(ParagraphVideo Video, string imagesHeight) 336 { 337 if (!string.IsNullOrWhiteSpace(Video.YoutubeLink) || !string.IsNullOrWhiteSpace(Video.VimeoLink)) 338 { 339 string YoutubeID = Video.YoutubeId; 340 string YoutubeLink = Video.YoutubeLink; 341 342 string VimeoID = Video.VimeoId; 343 string VimeoLink = Video.VimeoLink; 344 345 int CleanVideo = Video.Clean ? 1 : 0; 346 int ShowControls = Video.ShowControls ? 1 : 0; 347 int AutoPlay = Video.AutoPlay ? 1 : 0; 348 int LoopVideo = Video.LoopVideo ? 1 : 0; 349 int MuteAudio = Video.MuteAudio ? 1 : 0; 350 string hideControlsClass = Video.ShowControls ? "video-player-wrapper--hidecontrols" : ""; 351 string origin = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain(); 352 imagesHeight = !string.IsNullOrWhiteSpace(imagesHeight) ? "height: " + imagesHeight + ";" : ""; 353 354 if (!string.IsNullOrWhiteSpace(YoutubeLink)) 355 { 356 if(AutoPlay == 1) 357 { 358 <section class="cta-paragraph__video-container" style="@imagesHeight"> 359 <div class=""> 360 <div class="video-player-wrapper @hideControlsClass"> 361 <iframe class="video-player" 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=0"></iframe> 362 </div> 363 </div> 364 </section> 365 } 366 else 367 { 368 <lite-youtube style="@imagesHeight" videoid="@YoutubeID" params="controls=@ShowControls&loop=@LoopVideo&playlist=@YoutubeID&playsinline=1&modestbranding=@CleanVideo&mute=@MuteAudio&rel=0&enablejsapi=1&origin=@origin&disablekb=0"></lite-youtube> 369 } 370 } 371 if (!string.IsNullOrWhiteSpace(VimeoLink)) 372 { 373 <section class="cta-paragraph__video-container" style="@imagesHeight"> 374 <div class=""> 375 <div class="video-player-wrapper"> 376 <iframe class="video-player" 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> 377 </div> 378 </div> 379 </section> 380 } 381 } 382 } 383 384 @helper CTAParagraphIcon(ParagraphIcon Icon, bool strCenterVertical) 385 { 386 if (!string.IsNullOrWhiteSpace(Icon.FaIcon)) 387 { 388 string centerIconClass = strCenterVertical ? "justify-center" : "justify-start"; 389 string iconSizeClass = string.Format("cta-paragraph__icon--{0}", Icon.FaIconSize); 390 391 <div class="cta-paragraph__icon-container"> 392 <div class="cta-paragraph__icon-inner-container @centerIconClass"> 393 <span class="cta-paragraph__icon @iconSizeClass">@Icon.FaIcon</span> 394 </div> 395 </div> 396 } 397 } 398 399 @helper RenderContentAlignment(BackgroundConfiguration data) 400 { 401 402 switch (data.ContentElementAlign) 403 { 404 case "align-left": 405 <text> 406 align-items: flex-start; 407 text-align: left; 408 </text> 409 break; 410 case "align-center": 411 <text> 412 align-items: center; 413 text-align: center; 414 </text> 415 break; 416 case "align-right": 417 <text> 418 align-items: flex-end; 419 text-align: right; 420 </text> 421 break; 422 case "align-full": 423 <text> 424 align-items: flex-start; 425 text-align: justify; 426 </text> 427 break; 428 } 429 430 } 431 432 433 @{ 434 435 string backgroundImageRepeatClass = _data.BackgroundConfiguration.BackgroundImageRepeat; 436 string backgroundImageSizeClass = ""; 437 438 string BackgroundImagePositionX = _data.BackgroundConfiguration.BackgroundImagePositionX; 439 string BackgroundImagePositionY = _data.BackgroundConfiguration.BackgroundImagePositionY; 440 441 string BackgroundImagePositionClass = ""; 442 443 if (backgroundImageRepeatClass == "no-repeat") 444 { 445 BackgroundImagePositionClass = BackgroundImagePositionY + "-" + BackgroundImagePositionX; 446 backgroundImageSizeClass = _data.BackgroundConfiguration.BackgroundImageSize; 447 } 448 449 string ctaBackgroundColor = _data.BackgroundConfiguration.BackgroundColor; 450 451 ctaBackgroundColor = colorService.GetHexColor(Pageview.AreaID, ctaBackgroundColor); 452 453 string BackgroundGradient = _data.BackgroundConfiguration.BackgroundGradient; 454 455 string contentBackgroundColor = _data.BackgroundConfiguration.contentBackgroundColor; 456 string contentBorderColor = _data.BackgroundConfiguration.contentBorderColor; 457 458 string contentBorderSize = _data.BackgroundConfiguration.contentBorderSize + "px"; 459 460 string contentGutterClass = _data.BackgroundConfiguration.contentGutter; 461 string BackgroundPadding = _data.BackgroundConfiguration.backgroundPadding; 462 463 bool Containerfit = _data.BackgroundConfiguration.ContainerFit == "Fit" ? true : false; 464 465 contentBackgroundColor = colorService.GetHexColor(Pageview.AreaID, contentBackgroundColor); 466 contentBorderColor = colorService.GetHexColor(Pageview.AreaID, contentBorderColor); 467 468 string AnimateDirection = !string.IsNullOrWhiteSpace(_data.AnimateDirection) ? _data.AnimateDirection : ""; 469 int AnimationDuration = _data.AnimateDuration; 470 string DataAosValue = ""; 471 472 switch (AnimateDirection) 473 { 474 case "left": 475 DataAosValue = "fade-left"; 476 break; 477 478 case "right": 479 DataAosValue = "fade-right"; 480 break; 481 482 case "up": 483 DataAosValue = "fade-up"; 484 break; 485 486 case "down": 487 DataAosValue = "fade-down"; 488 break; 489 490 case "": 491 case "none": 492 // No action 493 break; 494 } 495 496 497 } 498 499 <style> 500 @_data.BackgroundConfiguration.Stylesheet 501 </style> 502 503 <style> 504 505 @@media screen and (max-width: 991px) { 506 .multicolumn--@paragraphID .multicolumn__item { 507 height: @MobileParagraphHeight !important; 508 } 509 } 510 511 @@media screen and (min-width: 991px) { 512 .multicolumn--@paragraphID .multicolumn__item { 513 height: @ParagraphHeight !important; 514 } 515 } 516 517 .multicolumn--@paragraphID { 518 background-color: @ctaBackgroundColor; 519 @if (!string.IsNullOrWhiteSpace(BackgroundGradient)) 520 { 521 @BackgroundGradient 522 } 523 } 524 525 .multicolumn--@paragraphID .cta-paragraph { 526 background-color: @contentBackgroundColor; 527 border: @contentBorderSize @contentBorderColor solid; 528 } 529 530 .multicolumn--@paragraphID .cta-paragraph__content-container 531 { 532 @RenderContentAlignment(_data.BackgroundConfiguration) 533 } 534 535 .multicolumn--@paragraphID .cta-paragraph__content { 536 @if (Containerfit) 537 { 538 <text> 539 flex-grow: 0; 540 </text> 541 } 542 } 543 544 .multicolumn--@paragraphID .cta-paragraph__image-container { 545 @if (Containerfit) 546 { 547 <text> 548 position: absolute; 549 top: 0; 550 left: 0; 551 right: 0; 552 bottom: 0; 553 </text> 554 } 555 } 556 557 .cta-paragraph--@paragraphID .cta-paragraph__btn-navigation { 558 @if (Containerfit) 559 { 560 561 switch (_data.BackgroundConfiguration.ContainerFitContentAlignment) 562 { 563 564 case "TopLeft": 565 case "MiddleLeft": 566 case "BottomLeft": 567 <text> 568 justify-content: flex-start; 569 </text> 570 break; 571 572 case "TopRight": 573 case "MiddleRight": 574 case "BottomRight": 575 <text> 576 justify-content: flex-end; 577 </text> 578 break; 579 580 581 case "TopCenter": 582 case "MiddleCenter": 583 case "BottomCenter": 584 <text> 585 justify-content: center; 586 </text> 587 break; 588 589 } 590 } 591 592 } 593 594 .multicolumn--@paragraphID .cta-paragraph { 595 @if (Containerfit) 596 { 597 598 switch (_data.BackgroundConfiguration.ContainerFitContentAlignment) { 599 case "TopLeft": 600 <text> 601 justify-content: flex-start; 602 align-items: flex-start; 603 </text> 604 break; 605 case "TopCenter": 606 <text> 607 justify-content: flex-start; 608 align-items: center; 609 </text> 610 break; 611 case "TopRight": 612 <text> 613 justify-content: flex-start; 614 align-items: flex-end; 615 </text> 616 break; 617 case "MiddleLeft": 618 <text> 619 justify-content: center; 620 align-items: flex-start; 621 </text> 622 break; 623 case "MiddleCenter": 624 <text> 625 justify-content: center; 626 align-items: center; 627 </text> 628 break; 629 case "MiddleRight": 630 <text> 631 justify-content: center; 632 align-items: flex-end; 633 </text> 634 break; 635 case "BottomLeft": 636 <text> 637 justify-content: flex-end; 638 align-items: flex-start; 639 </text> 640 break; 641 case "BottomCenter": 642 <text> 643 justify-content: flex-end; 644 align-items: center; 645 </text> 646 break; 647 case "BottomRight": 648 <text> 649 justify-content: flex-end; 650 align-items: flex-end; 651 </text> 652 break; 653 654 } 655 656 657 } 658 659 } 660 661 </style> 662 663 @if (_data != null) 664 { 665 <div class="multicolumn multicolumn--@paragraphID @backgroundClass @backgroundImageRepeatClass @BackgroundImagePositionClass @backgroundImageSizeClass @contentGutterClass @BackgroundPadding @_data.CssClass" data-paragraphid="@paragraphID" id="@paragraphID" style="@backgroundStyle" data-aos="@DataAosValue" data-aos-duration="@AnimationDuration"> 666 667 <div class="multicolumn__container @fullWidthContainerClass"> 668 @if (!string.IsNullOrWhiteSpace(_data.Header.HeaderFormatted())) 669 { 670 <header class="multicolumn__header-wrapper">@_data.Header.HeaderFormatted("cta-paragraph__header")</header> 671 } 672 673 @RenderContentArea(_data, paragraphID) 674 </div> 675 676 </div> 677 } 678 679 @helper RenderContentArea(MultiColumnParagraph _data, int paragraphID) 680 { 681 682 if (_data.Paragraphs().Count > 0) 683 { 684 685 // string contentElementAlign = _data.BackgroundConfiguration.ContentElementAlign; 686 687 int colIndex = 0; 688 var colorService = new ColorSwatchService(); 689 690 string centerTextClass = _data.CenterText ? "items-center text-center" : "items-start text-left"; 691 string WarpElementsClass = !string.IsNullOrWhiteSpace(_data.WrapElements) ? _data.WrapElements : ""; 692 double ColumnWidthSize = 1; 693 694 bool Shadow = _data.BackgroundConfiguration.contentShadow; 695 string shadowClass = Shadow ? "contentShadow" : ""; 696 697 bool enableColumnAnimation = _data.AnimateDelayColumns; 698 string AnimateDirection = !string.IsNullOrWhiteSpace(_data.AnimateDirection) ? _data.AnimateDirection : ""; 699 int AnimationDuration = 0; 700 string DataAosValue = ""; 701 702 if (enableColumnAnimation) 703 { 704 AnimationDuration = _data.AnimateDuration; 705 switch (AnimateDirection) 706 { 707 case "left": 708 DataAosValue = "fade-left"; 709 break; 710 711 case "right": 712 DataAosValue = "fade-right"; 713 break; 714 715 case "up": 716 DataAosValue = "fade-up"; 717 break; 718 719 case "down": 720 DataAosValue = "fade-down"; 721 break; 722 723 case "": 724 case "none": 725 // No action 726 break; 727 } 728 } 729 730 <div class="grid-container @WarpElementsClass"> 731 732 @foreach (ParagraphColumn p in _data.Paragraphs()) 733 { 734 735 bool hasContent = !string.IsNullOrWhiteSpace(p.Button().ButtonText) || !string.IsNullOrWhiteSpace(p.Content().Text) || !string.IsNullOrWhiteSpace(p.Header().HeaderFormatted()); 736 string ImageContainerFixed = hasContent ? "cta-paragraph__image-container--fixed" : ""; 737 string imagesHeight = hasContent ? _data.ImageHeight.ToString() + "px" : "100%"; 738 imagesHeight = imagesHeight == "0px" ? "auto" : imagesHeight; 739 740 if (_data.BackgroundConfiguration.ContainerFit == "Fit") 741 { 742 imagesHeight = "auto"; 743 } 744 745 746 747 string newWindow = p.Button().NewWindow ? "target='_blank'" : ""; 748 string ariaLabel = !string.IsNullOrWhiteSpace(p.Button().ButtonAriaLabel) ? "aria-label='" + p.Button().ButtonAriaLabel + "'" : ""; 749 bool clickableBlock = !string.IsNullOrWhiteSpace(p.Button().GetLink(Pageview)) && _data.Clickable; 750 string clickableClass = clickableBlock ? "cta-paragraph__container--clickable" : ""; 751 752 ColumnWidthSize = GetColumnsize(p.LargeDevices); 753 754 var animationDelay = enableColumnAnimation ? colIndex * 100 : 0; 755 colIndex++; 756 757 <div class="multicolumn__item grid-@p.SmallDevices md-grid-@p.MediumDevices lg-grid-@p.LargeDevices" data-aos="@DataAosValue" data-aos-duration="@AnimationDuration" data-aos-delay="@animationDelay"> 758 759 <section class="cta-paragraph config--@_data.BackgroundConfigurationID @clickableClass @shadowClass"> 760 761 @CTAParagraphImage( 762 p.Image(), 763 hasContent, 764 false, 765 null, 766 false, 767 _data.Fullwidth, 768 imagesHeight, 769 ColumnWidthSize 770 ) 771 772 @CTAParagraphVideo( 773 p.Video(), 774 imagesHeight 775 ) 776 777 @CTAParagraphIcon( 778 p.Icon(), 779 _data.CenterText 780 ) 781 782 @CTAParagraphContent( 783 paragraphID, 784 p.Header(), 785 p.Subheader(), 786 p.Content(), 787 p.Button(), 788 p.ExtraButton(), 789 p.Image(), 790 _data.CenterText 791 ) 792 793 @if (clickableBlock) 794 { 795 <a href="@p.Button().GetLink(Pageview)" class="cta-paragraph__clickable" @newWindow @ariaLabel></a> 796 } 797 798 </section> 799 </div> 800 } 801 </div> 802 } 803 804 } 805 806 807 @functions{ 808 809 double GetColumnsize(string DesktopColumnSize) 810 { 811 812 double ColumnWidthSize = 1; 813 814 switch (DesktopColumnSize) 815 { 816 case "auto": 817 ColumnWidthSize = 1; 818 break; 819 820 case "25p": 821 ColumnWidthSize = 0.25; 822 break; 823 824 case "33p": 825 ColumnWidthSize = 0.33; 826 break; 827 828 case "50p": 829 ColumnWidthSize = 0.5; 830 break; 831 832 case "66p": 833 ColumnWidthSize = 0.66; 834 break; 835 836 case "75p": 837 ColumnWidthSize = 0.75; 838 break; 839 840 case "full": 841 ColumnWidthSize = 1; 842 break; 843 } 844 845 return ColumnWidthSize; 846 847 } 848 849 850 // Check if this carousel contains only images (logo slider) 851 bool checkOnlyImages(Carousel _data) 852 { 853 854 int amountColumns = _data.CarouselItems.Count; // Amount of the columns in backend, filled by user 855 int emptyColumn = 0; 856 857 // Loop through all the columns 858 foreach (var column in _data.CarouselItems) 859 { 860 // If button is empty AND content is empty AND header is empty => this is img only 861 if (string.IsNullOrWhiteSpace(column.Button.ButtonText) && string.IsNullOrWhiteSpace(column.Content.Text) && string.IsNullOrWhiteSpace(column.Header.HeaderFormatted())) 862 { 863 emptyColumn++; 864 } 865 } 866 867 bool emptyColumnResult = emptyColumn == amountColumns ? true : false; 868 869 return emptyColumnResult; 870 871 } 872 } 873 874
Error executing template "Designs/ProNails_generated/Paragraph/MultiColumnParagraph.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at Bluedesk.DynamicWeb.ItemTypes.CTAButton.GetLink(PageView pv, String navigationtag)
   at CompiledRazorTemplates.Dynamic.RazorEngine_416bd10ed169486c884fcd53bb56e26d.<>c__DisplayClass9_0.<RenderContentArea>b__0(TextWriter __razor_helper_writer) in D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\MultiColumnParagraph.cshtml:line 749
   at CompiledRazorTemplates.Dynamic.RazorEngine_416bd10ed169486c884fcd53bb56e26d.Execute() in D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\MultiColumnParagraph.cshtml:line 673
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 3 @using Dynamicweb; 4 @using Dynamicweb.Content.Items; 5 @using System.Web; 6 @using Bluedesk.Tools.DynamicWeb.ExtensionMethods; 7 @using Bluedesk.DynamicWeb.ItemTypes; 8 9 @using Dynamicweb.Frontend; 10 @using Bluedesk.Tools.DynamicWeb.DataAccess; 11 @using System.Runtime.Caching; 12 13 14 @{ 15 16 /* 17 var paragraphID = Pageview.CurrentParagraph.ID; 18 MultiColumnParagraph _data = Dynamicweb.Services.Items.GetItem("MultiColumnParagraph", Pageview.CurrentParagraph.ItemId).ToCodeFirstItem<MultiColumnParagraph>() ?? new MultiColumnParagraph(); */ 19 20 var paragraphID = Pageview.CurrentParagraph.ID; 21 MultiColumnParagraph _data = new MultiColumnParagraph(); 22 23 int CacheTime = 5; 24 MemoryCache memCache = MemoryCache.Default; 25 string cacheKey = $"MultiColumnParagraph_{paragraphID}-{Pageview.AreaID}"; 26 27 if (Pageview.IsVisualEditorMode) 28 { 29 var cache = MemoryCache.Default; 30 memCache.Remove($"MultiColumnParagraph_{paragraphID}-{Pageview.AreaID}"); 31 } 32 33 if (memCache.Contains(cacheKey)) 34 { 35 _data = memCache.Get(cacheKey) as MultiColumnParagraph; 36 37 if (_data == null) 38 { 39 _data = Dynamicweb.Content.Services.Items.GetItem("MultiColumnParagraph", Pageview.CurrentParagraph.ItemId).ToCodeFirstItem<MultiColumnParagraph>() ?? new MultiColumnParagraph(); 40 memCache.Set(cacheKey, _data, DateTimeOffset.UtcNow.AddMinutes(CacheTime)); 41 42 } 43 44 } 45 else 46 { 47 _data = Dynamicweb.Content.Services.Items.GetItem("MultiColumnParagraph", Pageview.CurrentParagraph.ItemId).ToCodeFirstItem<MultiColumnParagraph>() ?? new MultiColumnParagraph(); 48 memCache.Set(cacheKey, _data, DateTimeOffset.UtcNow.AddMinutes(CacheTime)); 49 } 50 51 52 List<string> BackgroundConfigIdList = ((List<string>)Dynamicweb.Context.Current.Items["BackgroundConfigIdList"]) ?? new List<string>(); 53 BackgroundConfigIdList.Add(_data.BackgroundConfigurationID); 54 Dynamicweb.Context.Current.Items["BackgroundConfigIdList"] = BackgroundConfigIdList; 55 56 string ParagraphHeight = _data.Height == 0 ? "auto" : _data.Height + "px"; 57 string MobileParagraphHeight = _data.MobileHeight == 0 ? "auto" : _data.MobileHeight + "px"; 58 59 } 60 61 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 62 @using Dynamicweb; 63 @using Dynamicweb.Content.Items; 64 @using Bluedesk.DynamicWeb.ItemTypes; 65 66 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 67 @using Dynamicweb; 68 @using Dynamicweb.Content.Items; 69 @using Bluedesk.DynamicWeb.ItemTypes; 70 71 @functions { 72 73 Dictionary<string, string> GetFontConfiguration(string TextColor, FontConfigurationItemTab FontConfiguration) 74 { 75 var colorService = new ColorSwatchService(); 76 TextColor = !string.IsNullOrWhiteSpace(TextColor) ? TextColor : "" ; 77 TextColor = !TextColor.Contains("#") ? colorService.GetHexColor(Pageview.AreaID, TextColor) : TextColor; 78 Dictionary<string, string> FontConfig = new Dictionary<string, string>() { 79 { "textColor" , TextColor }, 80 { "fontSize" , FontConfiguration.FontSize }, 81 { "lineHeight", FontConfiguration.LineHeight}, 82 { "fontFamily" , FontConfiguration.FontConfiguration.FontFamily }, 83 { "fontWeight" , FontConfiguration.FontWeight }, 84 { "fontStyle" , FontConfiguration.FontStyle } 85 }; 86 return FontConfig; 87 } 88 89 public string GenerateButtonConfigVariables(ButtonConfiguration BC, MasterConfig mc, int areaId) 90 { 91 string ButtonLabelAlignment = BC.ButtonLabelAlignment; 92 switch (ButtonLabelAlignment) 93 { 94 case "align-left": 95 ButtonLabelAlignment = "flex-start"; 96 break; 97 case "align-center": 98 ButtonLabelAlignment = "center"; 99 break; 100 case "align-right": 101 ButtonLabelAlignment = "flex-end"; 102 break; 103 case "align-full": 104 ButtonLabelAlignment = "space-between"; 105 break; 106 default: 107 ButtonLabelAlignment = "flex-start"; 108 break; 109 } 110 111 var btnStyleBlock = new System.Text.StringBuilder(); 112 113 // General Config 114 btnStyleBlock.Append(GenerateCssVar("btn-min-height", $"{mc.GeneralConfiguration.ButtonHeight}px")); 115 btnStyleBlock.Append(GenerateCssVar("btn-border-radius", $"{mc.GeneralConfiguration.RoundedCornerValue}px")); 116 117 // Button Config 118 btnStyleBlock.Append(GenerateCssVar("btn-border-width", $"{BC.BorderSize.ToString()}px")); 119 btnStyleBlock.Append(GenerateCssVar("btn-label-alignment", ButtonLabelAlignment)); 120 121 // Button Config Tab 122 btnStyleBlock.Append(GenerateCssVar("btn-bg-color", BC.ButtonColorConfiguration.BackgroundColor.GetColorCode(areaId))); 123 btnStyleBlock.Append(GenerateCssVar("btn-font-color", BC.ButtonColorConfiguration.FontColor.GetColorCode(areaId))); 124 btnStyleBlock.Append(GenerateCssVar("btn-border-color", BC.ButtonColorConfiguration.BorderColor.GetColorCode(areaId))); 125 126 // Button Config Hover tab 127 btnStyleBlock.Append(GenerateCssVar("btn-bg-color-hover", BC.ButtonHoverColorConfiguration.BackgroundColor.GetColorCode(areaId))); 128 btnStyleBlock.Append(GenerateCssVar("btn-font-color-hover", BC.ButtonHoverColorConfiguration.FontColor.GetColorCode(areaId))); 129 btnStyleBlock.Append(GenerateCssVar("btn-border-color-hover", BC.ButtonHoverColorConfiguration.BorderColor.GetColorCode(areaId))); 130 131 // Button Config Font Config 132 btnStyleBlock.Append(GenerateCssVar("btn-font-size", BC.FontConfiguration.FontSize)); 133 btnStyleBlock.Append(GenerateCssVar("btn-font-config-color", BC.FontConfiguration.Color.GetColorCode(areaId))); 134 btnStyleBlock.Append(GenerateCssVar("btn-font-line-height", BC.FontConfiguration.LineHeight)); 135 btnStyleBlock.Append(GenerateCssVar("btn-font-family", BC.FontConfiguration.FontConfiguration.FontFamily)); 136 btnStyleBlock.Append(GenerateCssVar("btn-font-weight", BC.FontConfiguration.FontWeight)); 137 btnStyleBlock.Append(GenerateCssVar("btn-font-transform", BC.FontConfiguration.FontStyle)); 138 139 return btnStyleBlock.ToString(); 140 } 141 142 public string GenerateCssVar(string name, string value) 143 { 144 if (!string.IsNullOrWhiteSpace(value)) { 145 return $"--{name}: {value};"; 146 } else { 147 return ""; 148 } 149 } 150 } 151 152 153 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 154 @using Dynamicweb; 155 @using Dynamicweb.Content.Items; 156 @using Bluedesk.DynamicWeb.ItemTypes; 157 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 158 159 160 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 161 @using Dynamicweb; 162 @using Dynamicweb.Content.Items; 163 @using Bluedesk.DynamicWeb.ItemTypes; 164 @using Bluedesk.DynamicWeb.ItemTypes.Extensions; 165 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 166 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 167 @using Dynamicweb; 168 @using Dynamicweb.Frontend 169 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 170 171 @helper RenderButton(CTAButton button, PageView Pageview) 172 { 173 174 if (!string.IsNullOrWhiteSpace(button.GetLink(Pageview))) 175 { 176 string Template = button.GetButtonTemplate().Replace("{{ ButtonLink }}", button.GetLink(Pageview)); 177 @Template; 178 } 179 } 180 181 182 @{ 183 184 var colorService = new ColorSwatchService(); 185 186 string fullWidthContainerClass = _data.Fullwidth ? "" : "container"; 187 188 string backgroundClass = !string.IsNullOrWhiteSpace(_data.BackgroundConfiguration.BackgroundClass) ? string.Format("bg-{0}", _data.BackgroundConfiguration.BackgroundClass) : ""; 189 string backgroundStyle = !string.IsNullOrWhiteSpace(_data.BackgroundConfiguration.BackgroundColor) ? $"background-color: {_data.BackgroundConfiguration.BackgroundColor}; " : ""; 190 backgroundStyle += !string.IsNullOrWhiteSpace(_data.BackgroundConfiguration.BackgroundImage) ? $"background-image: url({_data.BackgroundConfiguration.BackgroundImage}); " : ""; 191 192 // string backgroundClass = "null"; 193 // string backgroundStyle = ""; 194 } 195 196 197 @functions { 198 //string getbackgroundclass(string backgroundClass) 199 //{ 200 // return !string.IsNullOrWhiteSpace(backgroundClass) ? string.Format("bg-{0}", backgroundClass) : ""; 201 //} 202 } 203 204 @helper CTAParagraphImage( 205 ParagraphImageResizable Image, 206 bool hasContent, 207 bool ImageAsBackground, 208 string ImagePosition, 209 bool ParallaxImage, 210 bool Fullwidth, 211 string imagesHeight, 212 double ColumnWidthSize, 213 int AnimationDuration = 300, 214 bool AnimateHalfBlock = false 215 ) 216 { 217 if (!string.IsNullOrWhiteSpace(Image.Image)) 218 { 219 220 string image = !string.IsNullOrWhiteSpace(Image.Image) ? Image.Image : null; 221 imagesHeight = hasContent ? imagesHeight : "100%"; 222 imagesHeight = !string.IsNullOrWhiteSpace(imagesHeight) ? "height: " + imagesHeight + ";" : ""; 223 224 string imageParrallax = ParallaxImage ? "rellax" : ""; 225 string imageAsBackground = ImageAsBackground ? "cta-paragraph__image--is-background" : ""; 226 double imageWidth = 2000; 227 228 imageWidth = Fullwidth ? imageWidth : 1200; 229 imageWidth = !ImageAsBackground ? imageWidth * ColumnWidthSize : imageWidth; 230 231 string strImageWidth = imageWidth + "px"; 232 string strImageWidthSize = imageWidth + "w"; 233 234 string ImageUrl; 235 if (image.EndsWith(".gif")) 236 { 237 ImageUrl = image; 238 } 239 else 240 { 241 ImageUrl = "/Admin/Public/GetImage.ashx?Image=" + image + "&Crop=7&Format=webp&Quality=90&Compression=80"; 242 ImageUrl = ImageUrl.Replace("?x", "&x"); 243 } 244 245 string animationDirection = AnimateHalfBlock ? ImagePosition.Equals("right") ? "fade-left" : "fade-right" : ""; 246 247 if (!string.IsNullOrWhiteSpace(Image.Image)) 248 { 249 250 <figure class="cta-paragraph__image-container @imageAsBackground @Image.PositionY @Image.PositionX" style="@imagesHeight" data-aos="@animationDirection" data-aos-duration="@AnimationDuration"> 251 252 <picture class="cta-paragraph__image @Image.BackgroundSize @imageParrallax"> 253 @if (ImageUrl.EndsWith(".gif")) 254 { 255 <source media="(max-width: 400px)" srcset="@ImageUrl&Width=400"> 256 <source media="(max-width: 994px)" srcset="@ImageUrl&Width=994"> 257 <img src="@ImageUrl" loading="lazy" alt="@Image.ImageAlt" class="cta-paragraph__image @Image.BackgroundSize @imageParrallax" width="1980" height="500"> 258 } 259 else 260 { 261 <source media="(max-width: 400px)" srcset="@ImageUrl&Width=400"> 262 <source media="(max-width: 994px)" srcset="@ImageUrl&Width=994"> 263 <img src="@ImageUrl&Width=@imageWidth" loading="lazy" alt="@Image.ImageAlt" class="cta-paragraph__image @Image.BackgroundSize @imageParrallax" width="1980" height="500"> 264 } 265 </picture> 266 267 </figure> 268 } 269 } 270 } 271 272 @helper CTAParagraphContent( 273 int paragraphID, 274 ParagraphHeader Header, 275 ParagraphHeader SubHeader, 276 ParagraphContent Content, 277 CTAButton Button, 278 CTAButton ExtraButton, 279 ParagraphImage Image, 280 bool strCenterVertical, 281 string ImagePosition = "", 282 int AnimationDuration = 300, 283 bool AnimateHalfBlock = false 284 ) 285 { 286 287 bool hasImage = !string.IsNullOrWhiteSpace(Image.Image) ? true : false; 288 string noImageClass = hasImage ? "" : "no-image"; 289 290 string centerTextClass = strCenterVertical ? "text-center" : ""; 291 string centerContent = !string.IsNullOrWhiteSpace(Image.Image) ? "" : "cta-paragraph__content--center"; 292 293 string paragraphInstanceClass = "cta-paragraph__content--" + paragraphID; 294 295 string animationDirection = (AnimateHalfBlock && hasImage) ? ImagePosition.Equals("right") ? "fade-right" : "fade-left" : ""; 296 297 if (!string.IsNullOrWhiteSpace(Button.ButtonText) || !string.IsNullOrWhiteSpace(Content.Text) || !string.IsNullOrWhiteSpace(Header.HeaderFormatted("cta-paragraph__header"))) 298 { 299 300 <section class="cta-paragraph__content @paragraphInstanceClass @centerContent @noImageClass" data-aos="@animationDirection" data-aos-duration="@AnimationDuration"> 301 302 <article class="cta-paragraph__content-container @noImageClass"> 303 304 @if (!string.IsNullOrWhiteSpace(Header.HeaderFormatted("cta-paragraph__header"))) 305 { 306 <header class="cta-paragraph__header @centerTextClass"> 307 @if (SubHeader != null) 308 { 309 @SubHeader.HeaderFormatted("cta-paragraph__subheader") 310 } 311 @Header.HeaderFormatted("cta-paragraph__header") 312 </header> 313 } 314 315 @if (!string.IsNullOrWhiteSpace(Content.Text)) 316 { 317 <div class="cta-paragraph__text @centerTextClass">@Content.Text</div> 318 } 319 320 @if (!string.IsNullOrWhiteSpace(Button.GetLink(Pageview)) && !string.IsNullOrWhiteSpace(Button.ButtonText)) 321 { 322 <nav class="cta-paragraph__btn-navigation @centerTextClass"> 323 @RenderButton(Button, Pageview) 324 @RenderButton(ExtraButton, Pageview) 325 </nav> 326 } 327 328 </article> 329 </section> 330 331 } 332 333 } 334 335 @helper CTAParagraphVideo(ParagraphVideo Video, string imagesHeight) 336 { 337 if (!string.IsNullOrWhiteSpace(Video.YoutubeLink) || !string.IsNullOrWhiteSpace(Video.VimeoLink)) 338 { 339 string YoutubeID = Video.YoutubeId; 340 string YoutubeLink = Video.YoutubeLink; 341 342 string VimeoID = Video.VimeoId; 343 string VimeoLink = Video.VimeoLink; 344 345 int CleanVideo = Video.Clean ? 1 : 0; 346 int ShowControls = Video.ShowControls ? 1 : 0; 347 int AutoPlay = Video.AutoPlay ? 1 : 0; 348 int LoopVideo = Video.LoopVideo ? 1 : 0; 349 int MuteAudio = Video.MuteAudio ? 1 : 0; 350 string hideControlsClass = Video.ShowControls ? "video-player-wrapper--hidecontrols" : ""; 351 string origin = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain(); 352 imagesHeight = !string.IsNullOrWhiteSpace(imagesHeight) ? "height: " + imagesHeight + ";" : ""; 353 354 if (!string.IsNullOrWhiteSpace(YoutubeLink)) 355 { 356 if(AutoPlay == 1) 357 { 358 <section class="cta-paragraph__video-container" style="@imagesHeight"> 359 <div class=""> 360 <div class="video-player-wrapper @hideControlsClass"> 361 <iframe class="video-player" 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=0"></iframe> 362 </div> 363 </div> 364 </section> 365 } 366 else 367 { 368 <lite-youtube style="@imagesHeight" videoid="@YoutubeID" params="controls=@ShowControls&loop=@LoopVideo&playlist=@YoutubeID&playsinline=1&modestbranding=@CleanVideo&mute=@MuteAudio&rel=0&enablejsapi=1&origin=@origin&disablekb=0"></lite-youtube> 369 } 370 } 371 if (!string.IsNullOrWhiteSpace(VimeoLink)) 372 { 373 <section class="cta-paragraph__video-container" style="@imagesHeight"> 374 <div class=""> 375 <div class="video-player-wrapper"> 376 <iframe class="video-player" 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> 377 </div> 378 </div> 379 </section> 380 } 381 } 382 } 383 384 @helper CTAParagraphIcon(ParagraphIcon Icon, bool strCenterVertical) 385 { 386 if (!string.IsNullOrWhiteSpace(Icon.FaIcon)) 387 { 388 string centerIconClass = strCenterVertical ? "justify-center" : "justify-start"; 389 string iconSizeClass = string.Format("cta-paragraph__icon--{0}", Icon.FaIconSize); 390 391 <div class="cta-paragraph__icon-container"> 392 <div class="cta-paragraph__icon-inner-container @centerIconClass"> 393 <span class="cta-paragraph__icon @iconSizeClass">@Icon.FaIcon</span> 394 </div> 395 </div> 396 } 397 } 398 399 @helper RenderContentAlignment(BackgroundConfiguration data) 400 { 401 402 switch (data.ContentElementAlign) 403 { 404 case "align-left": 405 <text> 406 align-items: flex-start; 407 text-align: left; 408 </text> 409 break; 410 case "align-center": 411 <text> 412 align-items: center; 413 text-align: center; 414 </text> 415 break; 416 case "align-right": 417 <text> 418 align-items: flex-end; 419 text-align: right; 420 </text> 421 break; 422 case "align-full": 423 <text> 424 align-items: flex-start; 425 text-align: justify; 426 </text> 427 break; 428 } 429 430 } 431 432 433 @{ 434 435 string backgroundImageRepeatClass = _data.BackgroundConfiguration.BackgroundImageRepeat; 436 string backgroundImageSizeClass = ""; 437 438 string BackgroundImagePositionX = _data.BackgroundConfiguration.BackgroundImagePositionX; 439 string BackgroundImagePositionY = _data.BackgroundConfiguration.BackgroundImagePositionY; 440 441 string BackgroundImagePositionClass = ""; 442 443 if (backgroundImageRepeatClass == "no-repeat") 444 { 445 BackgroundImagePositionClass = BackgroundImagePositionY + "-" + BackgroundImagePositionX; 446 backgroundImageSizeClass = _data.BackgroundConfiguration.BackgroundImageSize; 447 } 448 449 string ctaBackgroundColor = _data.BackgroundConfiguration.BackgroundColor; 450 451 ctaBackgroundColor = colorService.GetHexColor(Pageview.AreaID, ctaBackgroundColor); 452 453 string BackgroundGradient = _data.BackgroundConfiguration.BackgroundGradient; 454 455 string contentBackgroundColor = _data.BackgroundConfiguration.contentBackgroundColor; 456 string contentBorderColor = _data.BackgroundConfiguration.contentBorderColor; 457 458 string contentBorderSize = _data.BackgroundConfiguration.contentBorderSize + "px"; 459 460 string contentGutterClass = _data.BackgroundConfiguration.contentGutter; 461 string BackgroundPadding = _data.BackgroundConfiguration.backgroundPadding; 462 463 bool Containerfit = _data.BackgroundConfiguration.ContainerFit == "Fit" ? true : false; 464 465 contentBackgroundColor = colorService.GetHexColor(Pageview.AreaID, contentBackgroundColor); 466 contentBorderColor = colorService.GetHexColor(Pageview.AreaID, contentBorderColor); 467 468 string AnimateDirection = !string.IsNullOrWhiteSpace(_data.AnimateDirection) ? _data.AnimateDirection : ""; 469 int AnimationDuration = _data.AnimateDuration; 470 string DataAosValue = ""; 471 472 switch (AnimateDirection) 473 { 474 case "left": 475 DataAosValue = "fade-left"; 476 break; 477 478 case "right": 479 DataAosValue = "fade-right"; 480 break; 481 482 case "up": 483 DataAosValue = "fade-up"; 484 break; 485 486 case "down": 487 DataAosValue = "fade-down"; 488 break; 489 490 case "": 491 case "none": 492 // No action 493 break; 494 } 495 496 497 } 498 499 <style> 500 @_data.BackgroundConfiguration.Stylesheet 501 </style> 502 503 <style> 504 505 @@media screen and (max-width: 991px) { 506 .multicolumn--@paragraphID .multicolumn__item { 507 height: @MobileParagraphHeight !important; 508 } 509 } 510 511 @@media screen and (min-width: 991px) { 512 .multicolumn--@paragraphID .multicolumn__item { 513 height: @ParagraphHeight !important; 514 } 515 } 516 517 .multicolumn--@paragraphID { 518 background-color: @ctaBackgroundColor; 519 @if (!string.IsNullOrWhiteSpace(BackgroundGradient)) 520 { 521 @BackgroundGradient 522 } 523 } 524 525 .multicolumn--@paragraphID .cta-paragraph { 526 background-color: @contentBackgroundColor; 527 border: @contentBorderSize @contentBorderColor solid; 528 } 529 530 .multicolumn--@paragraphID .cta-paragraph__content-container 531 { 532 @RenderContentAlignment(_data.BackgroundConfiguration) 533 } 534 535 .multicolumn--@paragraphID .cta-paragraph__content { 536 @if (Containerfit) 537 { 538 <text> 539 flex-grow: 0; 540 </text> 541 } 542 } 543 544 .multicolumn--@paragraphID .cta-paragraph__image-container { 545 @if (Containerfit) 546 { 547 <text> 548 position: absolute; 549 top: 0; 550 left: 0; 551 right: 0; 552 bottom: 0; 553 </text> 554 } 555 } 556 557 .cta-paragraph--@paragraphID .cta-paragraph__btn-navigation { 558 @if (Containerfit) 559 { 560 561 switch (_data.BackgroundConfiguration.ContainerFitContentAlignment) 562 { 563 564 case "TopLeft": 565 case "MiddleLeft": 566 case "BottomLeft": 567 <text> 568 justify-content: flex-start; 569 </text> 570 break; 571 572 case "TopRight": 573 case "MiddleRight": 574 case "BottomRight": 575 <text> 576 justify-content: flex-end; 577 </text> 578 break; 579 580 581 case "TopCenter": 582 case "MiddleCenter": 583 case "BottomCenter": 584 <text> 585 justify-content: center; 586 </text> 587 break; 588 589 } 590 } 591 592 } 593 594 .multicolumn--@paragraphID .cta-paragraph { 595 @if (Containerfit) 596 { 597 598 switch (_data.BackgroundConfiguration.ContainerFitContentAlignment) { 599 case "TopLeft": 600 <text> 601 justify-content: flex-start; 602 align-items: flex-start; 603 </text> 604 break; 605 case "TopCenter": 606 <text> 607 justify-content: flex-start; 608 align-items: center; 609 </text> 610 break; 611 case "TopRight": 612 <text> 613 justify-content: flex-start; 614 align-items: flex-end; 615 </text> 616 break; 617 case "MiddleLeft": 618 <text> 619 justify-content: center; 620 align-items: flex-start; 621 </text> 622 break; 623 case "MiddleCenter": 624 <text> 625 justify-content: center; 626 align-items: center; 627 </text> 628 break; 629 case "MiddleRight": 630 <text> 631 justify-content: center; 632 align-items: flex-end; 633 </text> 634 break; 635 case "BottomLeft": 636 <text> 637 justify-content: flex-end; 638 align-items: flex-start; 639 </text> 640 break; 641 case "BottomCenter": 642 <text> 643 justify-content: flex-end; 644 align-items: center; 645 </text> 646 break; 647 case "BottomRight": 648 <text> 649 justify-content: flex-end; 650 align-items: flex-end; 651 </text> 652 break; 653 654 } 655 656 657 } 658 659 } 660 661 </style> 662 663 @if (_data != null) 664 { 665 <div class="multicolumn multicolumn--@paragraphID @backgroundClass @backgroundImageRepeatClass @BackgroundImagePositionClass @backgroundImageSizeClass @contentGutterClass @BackgroundPadding @_data.CssClass" data-paragraphid="@paragraphID" id="@paragraphID" style="@backgroundStyle" data-aos="@DataAosValue" data-aos-duration="@AnimationDuration"> 666 667 <div class="multicolumn__container @fullWidthContainerClass"> 668 @if (!string.IsNullOrWhiteSpace(_data.Header.HeaderFormatted())) 669 { 670 <header class="multicolumn__header-wrapper">@_data.Header.HeaderFormatted("cta-paragraph__header")</header> 671 } 672 673 @RenderContentArea(_data, paragraphID) 674 </div> 675 676 </div> 677 } 678 679 @helper RenderContentArea(MultiColumnParagraph _data, int paragraphID) 680 { 681 682 if (_data.Paragraphs().Count > 0) 683 { 684 685 // string contentElementAlign = _data.BackgroundConfiguration.ContentElementAlign; 686 687 int colIndex = 0; 688 var colorService = new ColorSwatchService(); 689 690 string centerTextClass = _data.CenterText ? "items-center text-center" : "items-start text-left"; 691 string WarpElementsClass = !string.IsNullOrWhiteSpace(_data.WrapElements) ? _data.WrapElements : ""; 692 double ColumnWidthSize = 1; 693 694 bool Shadow = _data.BackgroundConfiguration.contentShadow; 695 string shadowClass = Shadow ? "contentShadow" : ""; 696 697 bool enableColumnAnimation = _data.AnimateDelayColumns; 698 string AnimateDirection = !string.IsNullOrWhiteSpace(_data.AnimateDirection) ? _data.AnimateDirection : ""; 699 int AnimationDuration = 0; 700 string DataAosValue = ""; 701 702 if (enableColumnAnimation) 703 { 704 AnimationDuration = _data.AnimateDuration; 705 switch (AnimateDirection) 706 { 707 case "left": 708 DataAosValue = "fade-left"; 709 break; 710 711 case "right": 712 DataAosValue = "fade-right"; 713 break; 714 715 case "up": 716 DataAosValue = "fade-up"; 717 break; 718 719 case "down": 720 DataAosValue = "fade-down"; 721 break; 722 723 case "": 724 case "none": 725 // No action 726 break; 727 } 728 } 729 730 <div class="grid-container @WarpElementsClass"> 731 732 @foreach (ParagraphColumn p in _data.Paragraphs()) 733 { 734 735 bool hasContent = !string.IsNullOrWhiteSpace(p.Button().ButtonText) || !string.IsNullOrWhiteSpace(p.Content().Text) || !string.IsNullOrWhiteSpace(p.Header().HeaderFormatted()); 736 string ImageContainerFixed = hasContent ? "cta-paragraph__image-container--fixed" : ""; 737 string imagesHeight = hasContent ? _data.ImageHeight.ToString() + "px" : "100%"; 738 imagesHeight = imagesHeight == "0px" ? "auto" : imagesHeight; 739 740 if (_data.BackgroundConfiguration.ContainerFit == "Fit") 741 { 742 imagesHeight = "auto"; 743 } 744 745 746 747 string newWindow = p.Button().NewWindow ? "target='_blank'" : ""; 748 string ariaLabel = !string.IsNullOrWhiteSpace(p.Button().ButtonAriaLabel) ? "aria-label='" + p.Button().ButtonAriaLabel + "'" : ""; 749 bool clickableBlock = !string.IsNullOrWhiteSpace(p.Button().GetLink(Pageview)) && _data.Clickable; 750 string clickableClass = clickableBlock ? "cta-paragraph__container--clickable" : ""; 751 752 ColumnWidthSize = GetColumnsize(p.LargeDevices); 753 754 var animationDelay = enableColumnAnimation ? colIndex * 100 : 0; 755 colIndex++; 756 757 <div class="multicolumn__item grid-@p.SmallDevices md-grid-@p.MediumDevices lg-grid-@p.LargeDevices" data-aos="@DataAosValue" data-aos-duration="@AnimationDuration" data-aos-delay="@animationDelay"> 758 759 <section class="cta-paragraph config--@_data.BackgroundConfigurationID @clickableClass @shadowClass"> 760 761 @CTAParagraphImage( 762 p.Image(), 763 hasContent, 764 false, 765 null, 766 false, 767 _data.Fullwidth, 768 imagesHeight, 769 ColumnWidthSize 770 ) 771 772 @CTAParagraphVideo( 773 p.Video(), 774 imagesHeight 775 ) 776 777 @CTAParagraphIcon( 778 p.Icon(), 779 _data.CenterText 780 ) 781 782 @CTAParagraphContent( 783 paragraphID, 784 p.Header(), 785 p.Subheader(), 786 p.Content(), 787 p.Button(), 788 p.ExtraButton(), 789 p.Image(), 790 _data.CenterText 791 ) 792 793 @if (clickableBlock) 794 { 795 <a href="@p.Button().GetLink(Pageview)" class="cta-paragraph__clickable" @newWindow @ariaLabel></a> 796 } 797 798 </section> 799 </div> 800 } 801 </div> 802 } 803 804 } 805 806 807 @functions{ 808 809 double GetColumnsize(string DesktopColumnSize) 810 { 811 812 double ColumnWidthSize = 1; 813 814 switch (DesktopColumnSize) 815 { 816 case "auto": 817 ColumnWidthSize = 1; 818 break; 819 820 case "25p": 821 ColumnWidthSize = 0.25; 822 break; 823 824 case "33p": 825 ColumnWidthSize = 0.33; 826 break; 827 828 case "50p": 829 ColumnWidthSize = 0.5; 830 break; 831 832 case "66p": 833 ColumnWidthSize = 0.66; 834 break; 835 836 case "75p": 837 ColumnWidthSize = 0.75; 838 break; 839 840 case "full": 841 ColumnWidthSize = 1; 842 break; 843 } 844 845 return ColumnWidthSize; 846 847 } 848 849 850 // Check if this carousel contains only images (logo slider) 851 bool checkOnlyImages(Carousel _data) 852 { 853 854 int amountColumns = _data.CarouselItems.Count; // Amount of the columns in backend, filled by user 855 int emptyColumn = 0; 856 857 // Loop through all the columns 858 foreach (var column in _data.CarouselItems) 859 { 860 // If button is empty AND content is empty AND header is empty => this is img only 861 if (string.IsNullOrWhiteSpace(column.Button.ButtonText) && string.IsNullOrWhiteSpace(column.Content.Text) && string.IsNullOrWhiteSpace(column.Header.HeaderFormatted())) 862 { 863 emptyColumn++; 864 } 865 } 866 867 bool emptyColumnResult = emptyColumn == amountColumns ? true : false; 868 869 return emptyColumnResult; 870 871 } 872 } 873 874
Error executing template "Designs/ProNails_generated/Paragraph/CTAParagraph.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at Bluedesk.DynamicWeb.ItemTypes.CTAButton.GetLink(PageView pv, String navigationtag)
   at CompiledRazorTemplates.Dynamic.RazorEngine_8bef9cdd88914a068a346a687674e270.Execute() in D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\CTAParagraph.cshtml:line 58
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using Dynamicweb; 3 @using Dynamicweb.Frontend; 4 @using Dynamicweb.Content.Items; 5 @using Bluedesk.DynamicWeb.ItemTypes; 6 @using Bluedesk.Tools.DynamicWeb.DataAccess; 7 8 @using System.Runtime.Caching; 9 10 11 @{ 12 /* var paragraphID = Pageview.CurrentParagraph.ID; 13 CTAParagraph _data = Dynamicweb.Services.Items.GetItem("CTAParagraph", Pageview.CurrentParagraph.ItemId).ToCodeFirstItem<CTAParagraph>() ?? new CTAParagraph(); */ 14 15 /* Hack */ 16 17 var paragraphID = Pageview.CurrentParagraph.ID; 18 CTAParagraph _data = new CTAParagraph(); 19 20 int CacheTime = 5; 21 MemoryCache memCache = MemoryCache.Default; 22 string cacheKey = $"CTAParagraph_{paragraphID}-{Pageview.AreaID}"; 23 24 if (Pageview.IsVisualEditorMode) 25 { 26 var cache = MemoryCache.Default; 27 memCache.Remove($"CTAParagraph_{paragraphID}-{Pageview.AreaID}"); 28 } 29 30 if (memCache.Contains(cacheKey)) 31 { 32 _data = memCache.Get(cacheKey) as CTAParagraph; 33 34 if (_data == null) 35 { 36 _data = Dynamicweb.Content.Services.Items.GetItem("CTAParagraph", Pageview.CurrentParagraph.ItemId).ToCodeFirstItem<CTAParagraph>() ?? new CTAParagraph(); 37 memCache.Set(cacheKey, _data, DateTimeOffset.UtcNow.AddMinutes(CacheTime)); 38 39 } 40 41 } 42 else 43 { 44 _data = Dynamicweb.Content.Services.Items.GetItem("CTAParagraph", Pageview.CurrentParagraph.ItemId).ToCodeFirstItem<CTAParagraph>() ?? new CTAParagraph(); 45 memCache.Set(cacheKey, _data, DateTimeOffset.UtcNow.AddMinutes(CacheTime)); 46 } 47 48 /* End Hack */ 49 50 List<string> BackgroundConfigIdList = ((List<string>)Dynamicweb.Context.Current.Items["BackgroundConfigIdList"]) ?? new List<string>(); 51 BackgroundConfigIdList.Add(_data.BackgroundConfigurationID); 52 Dynamicweb.Context.Current.Items["BackgroundConfigIdList"] = BackgroundConfigIdList; 53 54 string contentRightClass = _data.ImagePosition.Equals("right") ? "image-right" : "image-left"; 55 56 string newWindow = _data.Button.NewWindow ? "target='_blank'" : ""; 57 string ariaLabel = !string.IsNullOrWhiteSpace(_data.Button.ButtonAriaLabel) ? "aria-label='" + _data.Button.ButtonAriaLabel + "'" : ""; 58 bool clickableBlock = !string.IsNullOrWhiteSpace(_data.Button.GetLink(Pageview)) && _data.Clickable; 59 string clickableClass = clickableBlock ? "cta-paragraph__container--clickable" : ""; 60 string ctaHasBackgroundImageClass = _data.ImageAsBackground ? "cta-paragraph--hasbackgroundimg" : ""; 61 62 bool hasContent = !string.IsNullOrWhiteSpace(_data.Button.ButtonText) || !string.IsNullOrWhiteSpace(_data.Content.Text) || !string.IsNullOrWhiteSpace(_data.Header.HeaderFormatted()); 63 double ColumnWidthSize = hasContent ? 0.5 : 1; 64 65 // string backgroundClass = getbackgroundclass(_data.BackgroundConfiguration.BackgroundClass); 66 67 string AnimateDirection = !string.IsNullOrWhiteSpace(_data.AnimateDirection) ? _data.AnimateDirection : ""; 68 bool AnimateHalfBlock = false; 69 int AnimationDuration = _data.AnimateDuration; 70 string DataAosValue = ""; 71 72 switch (AnimateDirection) 73 { 74 case "left": 75 DataAosValue = "fade-left"; 76 break; 77 78 case "right": 79 DataAosValue = "fade-right"; 80 break; 81 82 case "up": 83 DataAosValue = "fade-up"; 84 break; 85 86 case "down": 87 DataAosValue = "fade-down"; 88 break; 89 90 case "center": 91 AnimateHalfBlock = true; 92 break; 93 94 case "": 95 case "none": 96 // No action 97 break; 98 } 99 100 string ParagraphHeight = _data.Height == 0 ? "auto" : _data.Height + "px"; 101 102 } 103 104 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 105 @using Dynamicweb; 106 @using Dynamicweb.Content.Items; 107 @using Bluedesk.DynamicWeb.ItemTypes; 108 109 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 110 @using Dynamicweb; 111 @using Dynamicweb.Content.Items; 112 @using Bluedesk.DynamicWeb.ItemTypes; 113 114 @functions { 115 116 Dictionary<string, string> GetFontConfiguration(string TextColor, FontConfigurationItemTab FontConfiguration) 117 { 118 var colorService = new ColorSwatchService(); 119 TextColor = !string.IsNullOrWhiteSpace(TextColor) ? TextColor : "" ; 120 TextColor = !TextColor.Contains("#") ? colorService.GetHexColor(Pageview.AreaID, TextColor) : TextColor; 121 Dictionary<string, string> FontConfig = new Dictionary<string, string>() { 122 { "textColor" , TextColor }, 123 { "fontSize" , FontConfiguration.FontSize }, 124 { "lineHeight", FontConfiguration.LineHeight}, 125 { "fontFamily" , FontConfiguration.FontConfiguration.FontFamily }, 126 { "fontWeight" , FontConfiguration.FontWeight }, 127 { "fontStyle" , FontConfiguration.FontStyle } 128 }; 129 return FontConfig; 130 } 131 132 public string GenerateButtonConfigVariables(ButtonConfiguration BC, MasterConfig mc, int areaId) 133 { 134 string ButtonLabelAlignment = BC.ButtonLabelAlignment; 135 switch (ButtonLabelAlignment) 136 { 137 case "align-left": 138 ButtonLabelAlignment = "flex-start"; 139 break; 140 case "align-center": 141 ButtonLabelAlignment = "center"; 142 break; 143 case "align-right": 144 ButtonLabelAlignment = "flex-end"; 145 break; 146 case "align-full": 147 ButtonLabelAlignment = "space-between"; 148 break; 149 default: 150 ButtonLabelAlignment = "flex-start"; 151 break; 152 } 153 154 var btnStyleBlock = new System.Text.StringBuilder(); 155 156 // General Config 157 btnStyleBlock.Append(GenerateCssVar("btn-min-height", $"{mc.GeneralConfiguration.ButtonHeight}px")); 158 btnStyleBlock.Append(GenerateCssVar("btn-border-radius", $"{mc.GeneralConfiguration.RoundedCornerValue}px")); 159 160 // Button Config 161 btnStyleBlock.Append(GenerateCssVar("btn-border-width", $"{BC.BorderSize.ToString()}px")); 162 btnStyleBlock.Append(GenerateCssVar("btn-label-alignment", ButtonLabelAlignment)); 163 164 // Button Config Tab 165 btnStyleBlock.Append(GenerateCssVar("btn-bg-color", BC.ButtonColorConfiguration.BackgroundColor.GetColorCode(areaId))); 166 btnStyleBlock.Append(GenerateCssVar("btn-font-color", BC.ButtonColorConfiguration.FontColor.GetColorCode(areaId))); 167 btnStyleBlock.Append(GenerateCssVar("btn-border-color", BC.ButtonColorConfiguration.BorderColor.GetColorCode(areaId))); 168 169 // Button Config Hover tab 170 btnStyleBlock.Append(GenerateCssVar("btn-bg-color-hover", BC.ButtonHoverColorConfiguration.BackgroundColor.GetColorCode(areaId))); 171 btnStyleBlock.Append(GenerateCssVar("btn-font-color-hover", BC.ButtonHoverColorConfiguration.FontColor.GetColorCode(areaId))); 172 btnStyleBlock.Append(GenerateCssVar("btn-border-color-hover", BC.ButtonHoverColorConfiguration.BorderColor.GetColorCode(areaId))); 173 174 // Button Config Font Config 175 btnStyleBlock.Append(GenerateCssVar("btn-font-size", BC.FontConfiguration.FontSize)); 176 btnStyleBlock.Append(GenerateCssVar("btn-font-config-color", BC.FontConfiguration.Color.GetColorCode(areaId))); 177 btnStyleBlock.Append(GenerateCssVar("btn-font-line-height", BC.FontConfiguration.LineHeight)); 178 btnStyleBlock.Append(GenerateCssVar("btn-font-family", BC.FontConfiguration.FontConfiguration.FontFamily)); 179 btnStyleBlock.Append(GenerateCssVar("btn-font-weight", BC.FontConfiguration.FontWeight)); 180 btnStyleBlock.Append(GenerateCssVar("btn-font-transform", BC.FontConfiguration.FontStyle)); 181 182 return btnStyleBlock.ToString(); 183 } 184 185 public string GenerateCssVar(string name, string value) 186 { 187 if (!string.IsNullOrWhiteSpace(value)) { 188 return $"--{name}: {value};"; 189 } else { 190 return ""; 191 } 192 } 193 } 194 195 196 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 197 @using Dynamicweb; 198 @using Dynamicweb.Content.Items; 199 @using Bluedesk.DynamicWeb.ItemTypes; 200 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 201 202 203 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 204 @using Dynamicweb; 205 @using Dynamicweb.Content.Items; 206 @using Bluedesk.DynamicWeb.ItemTypes; 207 @using Bluedesk.DynamicWeb.ItemTypes.Extensions; 208 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 209 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 210 @using Dynamicweb; 211 @using Dynamicweb.Frontend 212 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 213 214 @helper RenderButton(CTAButton button, PageView Pageview) 215 { 216 217 if (!string.IsNullOrWhiteSpace(button.GetLink(Pageview))) 218 { 219 string Template = button.GetButtonTemplate().Replace("{{ ButtonLink }}", button.GetLink(Pageview)); 220 @Template; 221 } 222 } 223 224 225 @{ 226 227 var colorService = new ColorSwatchService(); 228 229 string fullWidthContainerClass = _data.Fullwidth ? "" : "container"; 230 231 string backgroundClass = !string.IsNullOrWhiteSpace(_data.BackgroundConfiguration.BackgroundClass) ? string.Format("bg-{0}", _data.BackgroundConfiguration.BackgroundClass) : ""; 232 string backgroundStyle = !string.IsNullOrWhiteSpace(_data.BackgroundConfiguration.BackgroundColor) ? $"background-color: {_data.BackgroundConfiguration.BackgroundColor}; " : ""; 233 backgroundStyle += !string.IsNullOrWhiteSpace(_data.BackgroundConfiguration.BackgroundImage) ? $"background-image: url({_data.BackgroundConfiguration.BackgroundImage}); " : ""; 234 235 // string backgroundClass = "null"; 236 // string backgroundStyle = ""; 237 } 238 239 240 @functions { 241 //string getbackgroundclass(string backgroundClass) 242 //{ 243 // return !string.IsNullOrWhiteSpace(backgroundClass) ? string.Format("bg-{0}", backgroundClass) : ""; 244 //} 245 } 246 247 @helper CTAParagraphImage( 248 ParagraphImageResizable Image, 249 bool hasContent, 250 bool ImageAsBackground, 251 string ImagePosition, 252 bool ParallaxImage, 253 bool Fullwidth, 254 string imagesHeight, 255 double ColumnWidthSize, 256 int AnimationDuration = 300, 257 bool AnimateHalfBlock = false 258 ) 259 { 260 if (!string.IsNullOrWhiteSpace(Image.Image)) 261 { 262 263 string image = !string.IsNullOrWhiteSpace(Image.Image) ? Image.Image : null; 264 imagesHeight = hasContent ? imagesHeight : "100%"; 265 imagesHeight = !string.IsNullOrWhiteSpace(imagesHeight) ? "height: " + imagesHeight + ";" : ""; 266 267 string imageParrallax = ParallaxImage ? "rellax" : ""; 268 string imageAsBackground = ImageAsBackground ? "cta-paragraph__image--is-background" : ""; 269 double imageWidth = 2000; 270 271 imageWidth = Fullwidth ? imageWidth : 1200; 272 imageWidth = !ImageAsBackground ? imageWidth * ColumnWidthSize : imageWidth; 273 274 string strImageWidth = imageWidth + "px"; 275 string strImageWidthSize = imageWidth + "w"; 276 277 string ImageUrl; 278 if (image.EndsWith(".gif")) 279 { 280 ImageUrl = image; 281 } 282 else 283 { 284 ImageUrl = "/Admin/Public/GetImage.ashx?Image=" + image + "&Crop=7&Format=webp&Quality=90&Compression=80"; 285 ImageUrl = ImageUrl.Replace("?x", "&x"); 286 } 287 288 string animationDirection = AnimateHalfBlock ? ImagePosition.Equals("right") ? "fade-left" : "fade-right" : ""; 289 290 if (!string.IsNullOrWhiteSpace(Image.Image)) 291 { 292 293 <figure class="cta-paragraph__image-container @imageAsBackground @Image.PositionY @Image.PositionX" style="@imagesHeight" data-aos="@animationDirection" data-aos-duration="@AnimationDuration"> 294 295 <picture class="cta-paragraph__image @Image.BackgroundSize @imageParrallax"> 296 @if (ImageUrl.EndsWith(".gif")) 297 { 298 <source media="(max-width: 400px)" srcset="@ImageUrl&Width=400"> 299 <source media="(max-width: 994px)" srcset="@ImageUrl&Width=994"> 300 <img src="@ImageUrl" loading="lazy" alt="@Image.ImageAlt" class="cta-paragraph__image @Image.BackgroundSize @imageParrallax" width="1980" height="500"> 301 } 302 else 303 { 304 <source media="(max-width: 400px)" srcset="@ImageUrl&Width=400"> 305 <source media="(max-width: 994px)" srcset="@ImageUrl&Width=994"> 306 <img src="@ImageUrl&Width=@imageWidth" loading="lazy" alt="@Image.ImageAlt" class="cta-paragraph__image @Image.BackgroundSize @imageParrallax" width="1980" height="500"> 307 } 308 </picture> 309 310 </figure> 311 } 312 } 313 } 314 315 @helper CTAParagraphContent( 316 int paragraphID, 317 ParagraphHeader Header, 318 ParagraphHeader SubHeader, 319 ParagraphContent Content, 320 CTAButton Button, 321 CTAButton ExtraButton, 322 ParagraphImage Image, 323 bool strCenterVertical, 324 string ImagePosition = "", 325 int AnimationDuration = 300, 326 bool AnimateHalfBlock = false 327 ) 328 { 329 330 bool hasImage = !string.IsNullOrWhiteSpace(Image.Image) ? true : false; 331 string noImageClass = hasImage ? "" : "no-image"; 332 333 string centerTextClass = strCenterVertical ? "text-center" : ""; 334 string centerContent = !string.IsNullOrWhiteSpace(Image.Image) ? "" : "cta-paragraph__content--center"; 335 336 string paragraphInstanceClass = "cta-paragraph__content--" + paragraphID; 337 338 string animationDirection = (AnimateHalfBlock && hasImage) ? ImagePosition.Equals("right") ? "fade-right" : "fade-left" : ""; 339 340 if (!string.IsNullOrWhiteSpace(Button.ButtonText) || !string.IsNullOrWhiteSpace(Content.Text) || !string.IsNullOrWhiteSpace(Header.HeaderFormatted("cta-paragraph__header"))) 341 { 342 343 <section class="cta-paragraph__content @paragraphInstanceClass @centerContent @noImageClass" data-aos="@animationDirection" data-aos-duration="@AnimationDuration"> 344 345 <article class="cta-paragraph__content-container @noImageClass"> 346 347 @if (!string.IsNullOrWhiteSpace(Header.HeaderFormatted("cta-paragraph__header"))) 348 { 349 <header class="cta-paragraph__header @centerTextClass"> 350 @if (SubHeader != null) 351 { 352 @SubHeader.HeaderFormatted("cta-paragraph__subheader") 353 } 354 @Header.HeaderFormatted("cta-paragraph__header") 355 </header> 356 } 357 358 @if (!string.IsNullOrWhiteSpace(Content.Text)) 359 { 360 <div class="cta-paragraph__text @centerTextClass">@Content.Text</div> 361 } 362 363 @if (!string.IsNullOrWhiteSpace(Button.GetLink(Pageview)) && !string.IsNullOrWhiteSpace(Button.ButtonText)) 364 { 365 <nav class="cta-paragraph__btn-navigation @centerTextClass"> 366 @RenderButton(Button, Pageview) 367 @RenderButton(ExtraButton, Pageview) 368 </nav> 369 } 370 371 </article> 372 </section> 373 374 } 375 376 } 377 378 @helper CTAParagraphVideo(ParagraphVideo Video, string imagesHeight) 379 { 380 if (!string.IsNullOrWhiteSpace(Video.YoutubeLink) || !string.IsNullOrWhiteSpace(Video.VimeoLink)) 381 { 382 string YoutubeID = Video.YoutubeId; 383 string YoutubeLink = Video.YoutubeLink; 384 385 string VimeoID = Video.VimeoId; 386 string VimeoLink = Video.VimeoLink; 387 388 int CleanVideo = Video.Clean ? 1 : 0; 389 int ShowControls = Video.ShowControls ? 1 : 0; 390 int AutoPlay = Video.AutoPlay ? 1 : 0; 391 int LoopVideo = Video.LoopVideo ? 1 : 0; 392 int MuteAudio = Video.MuteAudio ? 1 : 0; 393 string hideControlsClass = Video.ShowControls ? "video-player-wrapper--hidecontrols" : ""; 394 string origin = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain(); 395 imagesHeight = !string.IsNullOrWhiteSpace(imagesHeight) ? "height: " + imagesHeight + ";" : ""; 396 397 if (!string.IsNullOrWhiteSpace(YoutubeLink)) 398 { 399 if(AutoPlay == 1) 400 { 401 <section class="cta-paragraph__video-container" style="@imagesHeight"> 402 <div class=""> 403 <div class="video-player-wrapper @hideControlsClass"> 404 <iframe class="video-player" 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=0"></iframe> 405 </div> 406 </div> 407 </section> 408 } 409 else 410 { 411 <lite-youtube style="@imagesHeight" videoid="@YoutubeID" params="controls=@ShowControls&loop=@LoopVideo&playlist=@YoutubeID&playsinline=1&modestbranding=@CleanVideo&mute=@MuteAudio&rel=0&enablejsapi=1&origin=@origin&disablekb=0"></lite-youtube> 412 } 413 } 414 if (!string.IsNullOrWhiteSpace(VimeoLink)) 415 { 416 <section class="cta-paragraph__video-container" style="@imagesHeight"> 417 <div class=""> 418 <div class="video-player-wrapper"> 419 <iframe class="video-player" 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> 420 </div> 421 </div> 422 </section> 423 } 424 } 425 } 426 427 @helper CTAParagraphIcon(ParagraphIcon Icon, bool strCenterVertical) 428 { 429 if (!string.IsNullOrWhiteSpace(Icon.FaIcon)) 430 { 431 string centerIconClass = strCenterVertical ? "justify-center" : "justify-start"; 432 string iconSizeClass = string.Format("cta-paragraph__icon--{0}", Icon.FaIconSize); 433 434 <div class="cta-paragraph__icon-container"> 435 <div class="cta-paragraph__icon-inner-container @centerIconClass"> 436 <span class="cta-paragraph__icon @iconSizeClass">@Icon.FaIcon</span> 437 </div> 438 </div> 439 } 440 } 441 442 @helper RenderContentAlignment(BackgroundConfiguration data) 443 { 444 445 switch (data.ContentElementAlign) 446 { 447 case "align-left": 448 <text> 449 align-items: flex-start; 450 text-align: left; 451 </text> 452 break; 453 case "align-center": 454 <text> 455 align-items: center; 456 text-align: center; 457 </text> 458 break; 459 case "align-right": 460 <text> 461 align-items: flex-end; 462 text-align: right; 463 </text> 464 break; 465 case "align-full": 466 <text> 467 align-items: flex-start; 468 text-align: justify; 469 </text> 470 break; 471 } 472 473 } 474 475 476 <style> 477 478 @@media screen and (min-width: 991px) { 479 .cta-paragraph__container--@paragraphID { 480 height: @ParagraphHeight !important; 481 } 482 } 483 484 </style> 485 486 @if (_data != null) 487 { 488 489 string BackgroundPadding = _data.BackgroundConfiguration.backgroundPadding; 490 491 bool Containerfit = _data.BackgroundConfiguration.ContainerFit == "Fit" ? true : false; 492 if (!string.IsNullOrWhiteSpace(contentRightClass)) 493 { 494 contentRightClass = Containerfit ? "" : contentRightClass; 495 } 496 497 string backgroundImageRepeatClass = _data.BackgroundConfiguration.BackgroundImageRepeat; 498 string backgroundImageSizeClass = ""; 499 500 string BackgroundImagePositionX = _data.BackgroundConfiguration.BackgroundImagePositionX; 501 string BackgroundImagePositionY = _data.BackgroundConfiguration.BackgroundImagePositionY; 502 503 504 string BackgroundImagePositionClass = ""; 505 506 if (backgroundImageRepeatClass == "no-repeat") 507 { 508 BackgroundImagePositionClass = BackgroundImagePositionY + "-" + BackgroundImagePositionX; 509 backgroundImageSizeClass = _data.BackgroundConfiguration.BackgroundImageSize; 510 } 511 512 string shadowClass = _data.BackgroundConfiguration.contentShadow ? "contentShadow" : ""; 513 514 <section class="cta-paragraph cta-paragraph--@paragraphID config--@_data.BackgroundConfigurationID @backgroundClass @_data.CssClass @backgroundImageRepeatClass @BackgroundImagePositionClass @backgroundImageSizeClass @BackgroundPadding @ctaHasBackgroundImageClass" style="@backgroundStyle" data-paragraphid="@paragraphID" id="@paragraphID" data-aos="@DataAosValue" data-aos-duration="@AnimationDuration"> 515 516 <div class="cta-paragraph__container cta-paragraph__container--@paragraphID @fullWidthContainerClass @clickableClass @contentRightClass @shadowClass"> 517 518 <style> 519 520 .cta-paragraph--@paragraphID .cta-paragraph__content { 521 @if (Containerfit) 522 { 523 <text> 524 flex-grow: 0; 525 </text> 526 } 527 } 528 529 .cta-paragraph--@paragraphID .cta-paragraph__image-container { 530 @if (Containerfit) 531 { 532 <text> 533 position: absolute; 534 top: 0; 535 left: 0; 536 right: 0; 537 bottom: 0; 538 </text> 539 } 540 } 541 542 </style> 543 544 @CTAParagraphImage( 545 _data.Image, 546 true, 547 _data.ImageAsBackground, 548 _data.ImagePosition, 549 _data.ParallaxImage, 550 _data.Fullwidth, 551 "", 552 ColumnWidthSize, 553 AnimationDuration, 554 AnimateHalfBlock 555 ) 556 @CTAParagraphContent( 557 paragraphID, 558 _data.Header, 559 _data.SubHeader, 560 _data.Content, 561 _data.Button, 562 _data.ExtraButton, 563 _data.Image, 564 _data.CenterVertical, 565 _data.ImagePosition, 566 AnimationDuration, 567 AnimateHalfBlock 568 ) 569 570 @if (clickableBlock) 571 { 572 <a href="@_data.Button.GetLink(Pageview)" class="cta-paragraph__clickable" @newWindow @ariaLabel></a> 573 } 574 575 </div> 576 577 </section> 578 } 579

Enchanting chrome nails, no powder!

6. Liquid Aurora

With this liquid chrome in a bottle you give a magical mother-of-pearl effect to the nails. This look is otherworldly trendy

Simpler application method than with classic chrome powders. No dust particles flying around when you apply this chrome effect.

Nail Art Developer Kirsten Mutsaerts

About the author

Nail Art Developer Kirsten Mutsaerts

Tags

  • Nail Art
To Top