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_6e93d27111be4786b4ac38e42872be3b.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 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_44ffba24318d44778fa1b22089935fba.<>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 746
   at CompiledRazorTemplates.Dynamic.RazorEngine_44ffba24318d44778fa1b22089935fba.Execute() in D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\MultiColumnParagraph.cshtml:line 672
   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 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 <style> 499 @_data.BackgroundConfiguration.Stylesheet 500 </style> 501 502 <style> 503 504 @@media screen and (max-width: 991px) { 505 .multicolumn--@paragraphID .multicolumn__item { 506 height: @MobileParagraphHeight !important; 507 } 508 } 509 510 @@media screen and (min-width: 991px) { 511 .multicolumn--@paragraphID .multicolumn__item { 512 height: @ParagraphHeight !important; 513 } 514 } 515 516 .multicolumn--@paragraphID { 517 background-color: @ctaBackgroundColor; 518 @if (!string.IsNullOrWhiteSpace(BackgroundGradient)) 519 { 520 @BackgroundGradient 521 } 522 } 523 524 .multicolumn--@paragraphID .cta-paragraph { 525 background-color: @contentBackgroundColor; 526 border: @contentBorderSize @contentBorderColor solid; 527 } 528 529 .multicolumn--@paragraphID .cta-paragraph__content-container 530 { 531 @RenderContentAlignment(_data.BackgroundConfiguration) 532 } 533 534 .multicolumn--@paragraphID .cta-paragraph__content { 535 @if (Containerfit) 536 { 537 <text> 538 flex-grow: 0; 539 </text> 540 } 541 } 542 543 .multicolumn--@paragraphID .cta-paragraph__image-container { 544 @if (Containerfit) 545 { 546 <text> 547 position: absolute; 548 top: 0; 549 left: 0; 550 right: 0; 551 bottom: 0; 552 </text> 553 } 554 } 555 556 .cta-paragraph--@paragraphID .cta-paragraph__btn-navigation { 557 @if (Containerfit) 558 { 559 560 switch (_data.BackgroundConfiguration.ContainerFitContentAlignment) 561 { 562 563 case "TopLeft": 564 case "MiddleLeft": 565 case "BottomLeft": 566 <text> 567 justify-content: flex-start; 568 </text> 569 break; 570 571 case "TopRight": 572 case "MiddleRight": 573 case "BottomRight": 574 <text> 575 justify-content: flex-end; 576 </text> 577 break; 578 579 580 case "TopCenter": 581 case "MiddleCenter": 582 case "BottomCenter": 583 <text> 584 justify-content: center; 585 </text> 586 break; 587 588 } 589 } 590 591 } 592 593 .multicolumn--@paragraphID .cta-paragraph { 594 @if (Containerfit) 595 { 596 597 switch (_data.BackgroundConfiguration.ContainerFitContentAlignment) { 598 case "TopLeft": 599 <text> 600 justify-content: flex-start; 601 align-items: flex-start; 602 </text> 603 break; 604 case "TopCenter": 605 <text> 606 justify-content: flex-start; 607 align-items: center; 608 </text> 609 break; 610 case "TopRight": 611 <text> 612 justify-content: flex-start; 613 align-items: flex-end; 614 </text> 615 break; 616 case "MiddleLeft": 617 <text> 618 justify-content: center; 619 align-items: flex-start; 620 </text> 621 break; 622 case "MiddleCenter": 623 <text> 624 justify-content: center; 625 align-items: center; 626 </text> 627 break; 628 case "MiddleRight": 629 <text> 630 justify-content: center; 631 align-items: flex-end; 632 </text> 633 break; 634 case "BottomLeft": 635 <text> 636 justify-content: flex-end; 637 align-items: flex-start; 638 </text> 639 break; 640 case "BottomCenter": 641 <text> 642 justify-content: flex-end; 643 align-items: center; 644 </text> 645 break; 646 case "BottomRight": 647 <text> 648 justify-content: flex-end; 649 align-items: flex-end; 650 </text> 651 break; 652 653 } 654 655 656 } 657 658 } 659 660 </style> 661 662 @if (_data != null) 663 { 664 <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"> 665 666 <div class="multicolumn__container @fullWidthContainerClass"> 667 @if (!string.IsNullOrWhiteSpace(_data.Header.HeaderFormatted())) 668 { 669 <header class="multicolumn__header-wrapper">@_data.Header.HeaderFormatted("cta-paragraph__header")</header> 670 } 671 672 @RenderContentArea(_data, paragraphID) 673 </div> 674 675 </div> 676 } 677 678 @helper RenderContentArea(MultiColumnParagraph _data, int paragraphID) 679 { 680 681 if (_data.Paragraphs().Count > 0) 682 { 683 684 // string contentElementAlign = _data.BackgroundConfiguration.ContentElementAlign; 685 686 int colIndex = 0; 687 var colorService = new ColorSwatchService(); 688 689 string centerTextClass = _data.CenterText ? "items-center text-center" : "items-start text-left"; 690 string WarpElementsClass = !string.IsNullOrWhiteSpace(_data.WrapElements) ? _data.WrapElements : ""; 691 double ColumnWidthSize = 1; 692 693 bool Shadow = _data.BackgroundConfiguration.contentShadow; 694 string shadowClass = Shadow ? "contentShadow" : ""; 695 696 bool enableColumnAnimation = _data.AnimateDelayColumns; 697 string AnimateDirection = !string.IsNullOrWhiteSpace(_data.AnimateDirection) ? _data.AnimateDirection : ""; 698 int AnimationDuration = 0; 699 string DataAosValue = ""; 700 701 if (enableColumnAnimation) 702 { 703 AnimationDuration = _data.AnimateDuration; 704 switch (AnimateDirection) 705 { 706 case "left": 707 DataAosValue = "fade-left"; 708 break; 709 710 case "right": 711 DataAosValue = "fade-right"; 712 break; 713 714 case "up": 715 DataAosValue = "fade-up"; 716 break; 717 718 case "down": 719 DataAosValue = "fade-down"; 720 break; 721 722 case "": 723 case "none": 724 // No action 725 break; 726 } 727 } 728 729 <div class="grid-container @WarpElementsClass"> 730 731 @foreach (ParagraphColumn p in _data.Paragraphs()) 732 { 733 734 bool hasContent = !string.IsNullOrWhiteSpace(p.Button().ButtonText) || !string.IsNullOrWhiteSpace(p.Content().Text) || !string.IsNullOrWhiteSpace(p.Header().HeaderFormatted()); 735 string ImageContainerFixed = hasContent ? "cta-paragraph__image-container--fixed" : ""; 736 string imagesHeight = hasContent ? _data.ImageHeight.ToString() + "px" : "100%"; 737 imagesHeight = imagesHeight == "0px" ? "auto" : imagesHeight; 738 739 if (_data.BackgroundConfiguration.ContainerFit == "Fit") 740 { 741 imagesHeight = "auto"; 742 } 743 744 string newWindow = p.Button().NewWindow ? "target='_blank'" : ""; 745 string ariaLabel = !string.IsNullOrWhiteSpace(p.Button().ButtonAriaLabel) ? "aria-label='" + p.Button().ButtonAriaLabel + "'" : ""; 746 bool clickableBlock = !string.IsNullOrWhiteSpace(p.Button().GetLink(Pageview)) && _data.Clickable; 747 string clickableClass = clickableBlock ? "cta-paragraph__container--clickable" : ""; 748 749 ColumnWidthSize = GetColumnsize(p.LargeDevices); 750 751 var animationDelay = enableColumnAnimation ? colIndex * 100 : 0; 752 colIndex++; 753 754 <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"> 755 756 <section class="cta-paragraph config--@_data.BackgroundConfigurationID @clickableClass @shadowClass"> 757 758 @CTAParagraphImage( 759 p.Image(), 760 hasContent, 761 false, 762 null, 763 false, 764 _data.Fullwidth, 765 imagesHeight, 766 ColumnWidthSize 767 ) 768 769 @CTAParagraphVideo( 770 p.Video(), 771 imagesHeight 772 ) 773 774 @CTAParagraphIcon( 775 p.Icon(), 776 _data.CenterText 777 ) 778 779 @CTAParagraphContent( 780 paragraphID, 781 p.Header(), 782 p.Subheader(), 783 p.Content(), 784 p.Button(), 785 p.ExtraButton(), 786 p.Image(), 787 _data.CenterText 788 ) 789 790 @if (clickableBlock) 791 { 792 <a href="@p.Button().GetLink(Pageview)" class="cta-paragraph__clickable" @newWindow @ariaLabel></a> 793 } 794 795 </section> 796 </div> 797 } 798 </div> 799 } 800 801 } 802 803 804 @functions{ 805 806 double GetColumnsize(string DesktopColumnSize) 807 { 808 809 double ColumnWidthSize = 1; 810 811 switch (DesktopColumnSize) 812 { 813 case "auto": 814 ColumnWidthSize = 1; 815 break; 816 817 case "25p": 818 ColumnWidthSize = 0.25; 819 break; 820 821 case "33p": 822 ColumnWidthSize = 0.33; 823 break; 824 825 case "50p": 826 ColumnWidthSize = 0.5; 827 break; 828 829 case "66p": 830 ColumnWidthSize = 0.66; 831 break; 832 833 case "75p": 834 ColumnWidthSize = 0.75; 835 break; 836 837 case "full": 838 ColumnWidthSize = 1; 839 break; 840 } 841 842 return ColumnWidthSize; 843 844 } 845 846 847 // Check if this carousel contains only images (logo slider) 848 bool checkOnlyImages(Carousel _data) 849 { 850 851 int amountColumns = _data.CarouselItems.Count; // Amount of the columns in backend, filled by user 852 int emptyColumn = 0; 853 854 // Loop through all the columns 855 foreach (var column in _data.CarouselItems) 856 { 857 // If button is empty AND content is empty AND header is empty => this is img only 858 if (string.IsNullOrWhiteSpace(column.Button.ButtonText) && string.IsNullOrWhiteSpace(column.Content.Text) && string.IsNullOrWhiteSpace(column.Header.HeaderFormatted())) 859 { 860 emptyColumn++; 861 } 862 } 863 864 bool emptyColumnResult = emptyColumn == amountColumns ? true : false; 865 866 return emptyColumnResult; 867 868 } 869 } 870 871
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_44ffba24318d44778fa1b22089935fba.<>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 746
   at CompiledRazorTemplates.Dynamic.RazorEngine_44ffba24318d44778fa1b22089935fba.Execute() in D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\MultiColumnParagraph.cshtml:line 672
   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 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 <style> 499 @_data.BackgroundConfiguration.Stylesheet 500 </style> 501 502 <style> 503 504 @@media screen and (max-width: 991px) { 505 .multicolumn--@paragraphID .multicolumn__item { 506 height: @MobileParagraphHeight !important; 507 } 508 } 509 510 @@media screen and (min-width: 991px) { 511 .multicolumn--@paragraphID .multicolumn__item { 512 height: @ParagraphHeight !important; 513 } 514 } 515 516 .multicolumn--@paragraphID { 517 background-color: @ctaBackgroundColor; 518 @if (!string.IsNullOrWhiteSpace(BackgroundGradient)) 519 { 520 @BackgroundGradient 521 } 522 } 523 524 .multicolumn--@paragraphID .cta-paragraph { 525 background-color: @contentBackgroundColor; 526 border: @contentBorderSize @contentBorderColor solid; 527 } 528 529 .multicolumn--@paragraphID .cta-paragraph__content-container 530 { 531 @RenderContentAlignment(_data.BackgroundConfiguration) 532 } 533 534 .multicolumn--@paragraphID .cta-paragraph__content { 535 @if (Containerfit) 536 { 537 <text> 538 flex-grow: 0; 539 </text> 540 } 541 } 542 543 .multicolumn--@paragraphID .cta-paragraph__image-container { 544 @if (Containerfit) 545 { 546 <text> 547 position: absolute; 548 top: 0; 549 left: 0; 550 right: 0; 551 bottom: 0; 552 </text> 553 } 554 } 555 556 .cta-paragraph--@paragraphID .cta-paragraph__btn-navigation { 557 @if (Containerfit) 558 { 559 560 switch (_data.BackgroundConfiguration.ContainerFitContentAlignment) 561 { 562 563 case "TopLeft": 564 case "MiddleLeft": 565 case "BottomLeft": 566 <text> 567 justify-content: flex-start; 568 </text> 569 break; 570 571 case "TopRight": 572 case "MiddleRight": 573 case "BottomRight": 574 <text> 575 justify-content: flex-end; 576 </text> 577 break; 578 579 580 case "TopCenter": 581 case "MiddleCenter": 582 case "BottomCenter": 583 <text> 584 justify-content: center; 585 </text> 586 break; 587 588 } 589 } 590 591 } 592 593 .multicolumn--@paragraphID .cta-paragraph { 594 @if (Containerfit) 595 { 596 597 switch (_data.BackgroundConfiguration.ContainerFitContentAlignment) { 598 case "TopLeft": 599 <text> 600 justify-content: flex-start; 601 align-items: flex-start; 602 </text> 603 break; 604 case "TopCenter": 605 <text> 606 justify-content: flex-start; 607 align-items: center; 608 </text> 609 break; 610 case "TopRight": 611 <text> 612 justify-content: flex-start; 613 align-items: flex-end; 614 </text> 615 break; 616 case "MiddleLeft": 617 <text> 618 justify-content: center; 619 align-items: flex-start; 620 </text> 621 break; 622 case "MiddleCenter": 623 <text> 624 justify-content: center; 625 align-items: center; 626 </text> 627 break; 628 case "MiddleRight": 629 <text> 630 justify-content: center; 631 align-items: flex-end; 632 </text> 633 break; 634 case "BottomLeft": 635 <text> 636 justify-content: flex-end; 637 align-items: flex-start; 638 </text> 639 break; 640 case "BottomCenter": 641 <text> 642 justify-content: flex-end; 643 align-items: center; 644 </text> 645 break; 646 case "BottomRight": 647 <text> 648 justify-content: flex-end; 649 align-items: flex-end; 650 </text> 651 break; 652 653 } 654 655 656 } 657 658 } 659 660 </style> 661 662 @if (_data != null) 663 { 664 <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"> 665 666 <div class="multicolumn__container @fullWidthContainerClass"> 667 @if (!string.IsNullOrWhiteSpace(_data.Header.HeaderFormatted())) 668 { 669 <header class="multicolumn__header-wrapper">@_data.Header.HeaderFormatted("cta-paragraph__header")</header> 670 } 671 672 @RenderContentArea(_data, paragraphID) 673 </div> 674 675 </div> 676 } 677 678 @helper RenderContentArea(MultiColumnParagraph _data, int paragraphID) 679 { 680 681 if (_data.Paragraphs().Count > 0) 682 { 683 684 // string contentElementAlign = _data.BackgroundConfiguration.ContentElementAlign; 685 686 int colIndex = 0; 687 var colorService = new ColorSwatchService(); 688 689 string centerTextClass = _data.CenterText ? "items-center text-center" : "items-start text-left"; 690 string WarpElementsClass = !string.IsNullOrWhiteSpace(_data.WrapElements) ? _data.WrapElements : ""; 691 double ColumnWidthSize = 1; 692 693 bool Shadow = _data.BackgroundConfiguration.contentShadow; 694 string shadowClass = Shadow ? "contentShadow" : ""; 695 696 bool enableColumnAnimation = _data.AnimateDelayColumns; 697 string AnimateDirection = !string.IsNullOrWhiteSpace(_data.AnimateDirection) ? _data.AnimateDirection : ""; 698 int AnimationDuration = 0; 699 string DataAosValue = ""; 700 701 if (enableColumnAnimation) 702 { 703 AnimationDuration = _data.AnimateDuration; 704 switch (AnimateDirection) 705 { 706 case "left": 707 DataAosValue = "fade-left"; 708 break; 709 710 case "right": 711 DataAosValue = "fade-right"; 712 break; 713 714 case "up": 715 DataAosValue = "fade-up"; 716 break; 717 718 case "down": 719 DataAosValue = "fade-down"; 720 break; 721 722 case "": 723 case "none": 724 // No action 725 break; 726 } 727 } 728 729 <div class="grid-container @WarpElementsClass"> 730 731 @foreach (ParagraphColumn p in _data.Paragraphs()) 732 { 733 734 bool hasContent = !string.IsNullOrWhiteSpace(p.Button().ButtonText) || !string.IsNullOrWhiteSpace(p.Content().Text) || !string.IsNullOrWhiteSpace(p.Header().HeaderFormatted()); 735 string ImageContainerFixed = hasContent ? "cta-paragraph__image-container--fixed" : ""; 736 string imagesHeight = hasContent ? _data.ImageHeight.ToString() + "px" : "100%"; 737 imagesHeight = imagesHeight == "0px" ? "auto" : imagesHeight; 738 739 if (_data.BackgroundConfiguration.ContainerFit == "Fit") 740 { 741 imagesHeight = "auto"; 742 } 743 744 string newWindow = p.Button().NewWindow ? "target='_blank'" : ""; 745 string ariaLabel = !string.IsNullOrWhiteSpace(p.Button().ButtonAriaLabel) ? "aria-label='" + p.Button().ButtonAriaLabel + "'" : ""; 746 bool clickableBlock = !string.IsNullOrWhiteSpace(p.Button().GetLink(Pageview)) && _data.Clickable; 747 string clickableClass = clickableBlock ? "cta-paragraph__container--clickable" : ""; 748 749 ColumnWidthSize = GetColumnsize(p.LargeDevices); 750 751 var animationDelay = enableColumnAnimation ? colIndex * 100 : 0; 752 colIndex++; 753 754 <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"> 755 756 <section class="cta-paragraph config--@_data.BackgroundConfigurationID @clickableClass @shadowClass"> 757 758 @CTAParagraphImage( 759 p.Image(), 760 hasContent, 761 false, 762 null, 763 false, 764 _data.Fullwidth, 765 imagesHeight, 766 ColumnWidthSize 767 ) 768 769 @CTAParagraphVideo( 770 p.Video(), 771 imagesHeight 772 ) 773 774 @CTAParagraphIcon( 775 p.Icon(), 776 _data.CenterText 777 ) 778 779 @CTAParagraphContent( 780 paragraphID, 781 p.Header(), 782 p.Subheader(), 783 p.Content(), 784 p.Button(), 785 p.ExtraButton(), 786 p.Image(), 787 _data.CenterText 788 ) 789 790 @if (clickableBlock) 791 { 792 <a href="@p.Button().GetLink(Pageview)" class="cta-paragraph__clickable" @newWindow @ariaLabel></a> 793 } 794 795 </section> 796 </div> 797 } 798 </div> 799 } 800 801 } 802 803 804 @functions{ 805 806 double GetColumnsize(string DesktopColumnSize) 807 { 808 809 double ColumnWidthSize = 1; 810 811 switch (DesktopColumnSize) 812 { 813 case "auto": 814 ColumnWidthSize = 1; 815 break; 816 817 case "25p": 818 ColumnWidthSize = 0.25; 819 break; 820 821 case "33p": 822 ColumnWidthSize = 0.33; 823 break; 824 825 case "50p": 826 ColumnWidthSize = 0.5; 827 break; 828 829 case "66p": 830 ColumnWidthSize = 0.66; 831 break; 832 833 case "75p": 834 ColumnWidthSize = 0.75; 835 break; 836 837 case "full": 838 ColumnWidthSize = 1; 839 break; 840 } 841 842 return ColumnWidthSize; 843 844 } 845 846 847 // Check if this carousel contains only images (logo slider) 848 bool checkOnlyImages(Carousel _data) 849 { 850 851 int amountColumns = _data.CarouselItems.Count; // Amount of the columns in backend, filled by user 852 int emptyColumn = 0; 853 854 // Loop through all the columns 855 foreach (var column in _data.CarouselItems) 856 { 857 // If button is empty AND content is empty AND header is empty => this is img only 858 if (string.IsNullOrWhiteSpace(column.Button.ButtonText) && string.IsNullOrWhiteSpace(column.Content.Text) && string.IsNullOrWhiteSpace(column.Header.HeaderFormatted())) 859 { 860 emptyColumn++; 861 } 862 } 863 864 bool emptyColumnResult = emptyColumn == amountColumns ? true : false; 865 866 return emptyColumnResult; 867 868 } 869 } 870 871
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_6e93d27111be4786b4ac38e42872be3b.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 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