- Para Profissionais de Beleza
- Encomenda antes das 12h00, entregue no dia útil seguinte
- Pagamento seguro
- Pagamento seguro
SUMMER BREEZE
The summer nails that everyone wants!
With warm days approaching, we are pleased to introduce our latest summer collection SUMMER BREEZE. A beautiful range of nude shades that capture the essence of summer with a perfect blend of style and delicacy. Easy Breezy Summer Nails: discover 6 new BFLEX nudes!
SUMMER BREEZE ONLINE EVENT
BFLEX BOX 3
Nude nails are all the rage this summer! You've been asking in droves for new BFLEX nudes, and now they're here! Add these 6 new summer shades to your BFLEX nude range:
Wedding season is upon us! For many brides, this is a great reason to visit a nail salon for the first time. A first encounter with BFLEX can keep them coming back later. A natural nail treatment service with BFLEX is ideal for presenting non-typically gelled clients with a polished, natural look that lasts.
CHEEKY: a nude with a coral blush
BERRY: A sweet pastel lilac with a hint of berries.
BREEZY: A refreshing baby blue with pastel breeze
CREAMY: A delicate cream color
BUNNY: A soft creamy nude color
LOVELY: A delightful pastel pink nude shade
SUMMER CLASSICS
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_f7a94f126ea24acfba25eaa9a4e03ca2.<>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_f7a94f126ea24acfba25eaa9a4e03ca2.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