Error executing template "Designs/WorldEmp_generated/_parsed/VisualEditorPage.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_bb1271d4485c4f3882a712c97b38eb92.Execute() in C:\home\site\wwwroot\files\Templates\Designs\WorldEmp_generated\_parsed\VisualEditorPage.parsed.cshtml:line 1745
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.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 2 @using System; 3 @using Dynamicweb; 4 @using Dynamicweb.Environment; 5 @using Dynamicweb.Frontend; 6 @using System.Web; 7 @using System.Linq; 8 @using Bluedesk.Tools.Generic; 9 @using System.Globalization; 10 @using Dynamicweb.Content.Items; 11 @using Bluedesk.DynamicWeb.ItemTypes; 12 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 13 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 14 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 15 16 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 17 @using Dynamicweb; 18 @using Dynamicweb.Content.Items; 19 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 20 21 @{ 22 23 var colorService = new ColorSwatchService(); 24 25 var master_configuration = Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration"); 26 27 MasterConfig mc = master_configuration.Item.ToCodeFirstItem<MasterConfig>(); 28 29 string MasterConfigCssClass = !string.IsNullOrWhiteSpace(mc.CssClass) ? mc.CssClass : ""; 30 31 FeatureConfig FeatureConfiguration = mc.FeatureConfiguration; 32 33 HeaderConfig HeaderConfiguration = mc.HeaderConfiguration; 34 StickyheaderConfig StickyheaderConfiguration = mc.StickyheaderConfiguration; 35 FooterConfig FooterConfiguration = mc.FooterConfiguration; 36 37 GeneralConfig GeneralConfiguration = mc.GeneralConfiguration; 38 39 EcomConfig EcommerceConfiguration = mc.EcomConfiguration; 40 ProductDetailConfig ProductDetailConfiguration = mc.ProductDetailConfiguration; 41 ProductOverviewConfig ProductOverviewConfiguration = mc.ProductOverviewConfiguration; 42 43 string General__bodyFontFamily = GeneralConfiguration.FontConfigurationGeneralBody.FontConfiguration.FontFamily; 44 string General__headerFontFamily = GeneralConfiguration.FontConfigurationGeneralHeader.FontConfiguration.FontFamily; 45 46 string H1_FontSize = GeneralConfiguration.FontConfigurationGeneralHOne.FontSize; 47 string H1_InputPlaceholderFontStyle = GeneralConfiguration.FontConfigurationGeneralHOne.FontStyle; 48 string H1_FontWeight = GeneralConfiguration.FontConfigurationGeneralHOne.FontWeight; 49 string H1_FontFamily = GeneralConfiguration.FontConfigurationGeneralHOne.FontConfiguration.FontFamily; 50 51 string H2_FontSize = GeneralConfiguration.FontConfigurationGeneralHTwo.FontSize; 52 string H2_InputPlaceholderFontStyle = GeneralConfiguration.FontConfigurationGeneralHTwo.FontStyle; 53 string H2_FontWeight = GeneralConfiguration.FontConfigurationGeneralHTwo.FontWeight; 54 string H2_FontFamily = GeneralConfiguration.FontConfigurationGeneralHTwo.FontConfiguration.FontFamily; 55 56 string H3_FontSize = GeneralConfiguration.FontConfigurationGeneralHThree.FontSize; 57 string H3_InputPlaceholderFontStyle = GeneralConfiguration.FontConfigurationGeneralHThree.FontStyle; 58 string H3_FontWeight = GeneralConfiguration.FontConfigurationGeneralHThree.FontWeight; 59 string H3_FontFamily = GeneralConfiguration.FontConfigurationGeneralHThree.FontConfiguration.FontFamily; 60 61 string H4_FontSize = GeneralConfiguration.FontConfigurationGeneralHFour.FontSize; 62 string H4_InputPlaceholderFontStyle = GeneralConfiguration.FontConfigurationGeneralHFour.FontStyle; 63 string H4_FontWeight = GeneralConfiguration.FontConfigurationGeneralHFour.FontWeight; 64 string H4_FontFamily = GeneralConfiguration.FontConfigurationGeneralHFour.FontConfiguration.FontFamily; 65 66 string HeaderContainerSize = HeaderConfiguration.ContainerSize != 0 ? HeaderConfiguration.ContainerSize + "px" : "auto"; 67 68 69 } 70 71 72 @{ 73 var websitesettings = Services.Items.GetItemById<WebsiteSettings>(Model.Area.Item.Id); 74 75 var font_configuration = Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "FontConfiguration"); 76 77 var httpdomain = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain(); 78 var lang = Pageview.Area.CultureInfo.TwoLetterISOLanguageName; 79 var langName = Pageview.Area.Culture; 80 81 var csrftoken = application._webapi.Helper.CSRFHelper.TokenHeaderValue(); 82 var designRoot = "/Files/Templates/Designs/" + Pageview.Area.Layout.Design.Name; 83 84 string logo = websitesettings.Logo; 85 var phonenumber = websitesettings.Phonenumber; 86 var formattedPhonenumber = phonenumber.Replace(" ", String.Empty); 87 var emailadress = websitesettings.Emailadress; 88 var buttonIconClass = Pageview.Area.Item["Global_button_icon"] != null ? Pageview.Area.Item["Global_button_icon"].ToString().Replace("+", " ") : "fal fa-arrow-right"; 89 var callmebackformlink = websitesettings.Call_me_back_form; 90 var mobileThemeColor = websitesettings.Mobile_Theme_Color; 91 92 bool isOffline = false; 93 DateTime workingHoursStart = websitesettings.OpeningTime; 94 DateTime workingHoursEnd = websitesettings.ClosingTime; 95 DateTime today = DateTime.Now; 96 var cHour = DateTime.Now.TimeOfDay; 97 int cDay = (int)DateTime.Now.DayOfWeek; 98 string availableToHour24hFormat = workingHoursEnd.TimeOfDay.ToString().Substring(0, 5); 99 var timeFromInput = DateTime.ParseExact(availableToHour24hFormat, "H:m", null, DateTimeStyles.None); 100 string availableToHour12hFormat = timeFromInput.ToString("hh:mm tt", CultureInfo.InvariantCulture); 101 var availableToHour = lang == "en" ? availableToHour12hFormat : availableToHour24hFormat; 102 bool isOvertime = cHour >= workingHoursEnd.TimeOfDay || cHour <= workingHoursStart.TimeOfDay; 103 bool isNoValidDate = today < workingHoursStart || today > workingHoursEnd; 104 if (isNoValidDate || isOvertime) 105 { 106 isOffline = true; 107 } 108109 Boolean showBreadcrumbs = Pageview.Page.PropertyItem != null && Pageview.Page.PropertyItem["ShowBreadcrumbs"] != null ? Convert.ToBoolean(Pageview.Page.PropertyItem["ShowBreadcrumbs"]) : false; 110 } 111112 <!DOCTYPE html> 113 <html lang="@lang" prefix="og: http://ogp.me/ns#"> 114 <head> 115 <meta charset="utf-8"> 116 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 117 <meta name="viewport" content="width=device-width, initial-scale=1"> 118 <meta name="theme-color" content="@mobileThemeColor"> 119 @Model.MetaTags 120 <title>@Model.Title</title> 121122 @RenderSnippet("canonical") 123 @RenderSnippet("ogTags") 124125 @{ 126 string urlProtocol = Dynamicweb.Context.Current.Request.Url.Scheme; 127 List<Dynamicweb.Content.Page> pageTranslations = new List<Dynamicweb.Content.Page>(); 128 bool isMasterPage = Pageview.Area.IsMaster; 129130 if (isMasterPage) 131 { 132 pageTranslations.Add(Pageview.Page); 133 if (Pageview.Page.Languages != null) 134 { 135 foreach (var language in Pageview.Page.Languages) 136 { 137 pageTranslations.Add(language); 138 } 139 } 140 } 141 else 142 { 143 pageTranslations.Add(Pageview.Page.MasterPage); 144 if (Pageview.Page.MasterPage != null) 145 { 146 if (Pageview.Page.MasterPage.Languages != null) 147 { 148 foreach (var language in Pageview.Page.MasterPage.Languages) 149 { 150 pageTranslations.Add(language); 151 } 152 } 153 } 154 } 155156 foreach (var page in pageTranslations) 157 { 158 if (page != null) 159 { 160 string friendlyUrl = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(page.ID); 161 string href = $"{urlProtocol}://{page.Area.DomainLock}{friendlyUrl}"; 162 string hreflang = page.Area.CultureInfo.Name.ToLower(); 163 <link rel="alternate" href="@href" hreflang="@hreflang" /> 164 } 165 } 166 } 167168 <link rel="preconnect" href="https://fonts.googleapis.com"> 169 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> 170171 @{ 172 var appcss = Cache.VersionedFile(designRoot + "/dist/app.css"); 173 <link href="@appcss" rel="stylesheet" /> 174175 var favicon32 = Cache.VersionedFile(designRoot + "/assets/img/favicon-32.png", true); 176 var favicon16 = Cache.VersionedFile(designRoot + "/assets/img/favicon-16.png", true); 177 var favico = Cache.VersionedFile(designRoot + "/assets/img/favicon.ico", true); 178179 favico = !string.IsNullOrWhiteSpace(GeneralConfiguration.Favicon) ? GeneralConfiguration.Favicon : favico; 180 favicon16 = !string.IsNullOrWhiteSpace(GeneralConfiguration.Favicon16) ? GeneralConfiguration.Favicon16 : favicon16; 181 favicon32 = !string.IsNullOrWhiteSpace(GeneralConfiguration.Favicon32) ? GeneralConfiguration.Favicon32 : favicon32; 182183 if (!string.IsNullOrWhiteSpace(favicon32)) 184 { 185 <link rel="icon" type="image/png" sizes="32x32" href="@favicon32"> 186 } 187 if (!string.IsNullOrWhiteSpace(favicon16)) 188 { 189 <link rel="icon" type="image/png" sizes="16x16" href="@favicon16"> 190 } 191 if (!string.IsNullOrWhiteSpace(favico)) 192 { 193 <link rel="shortcut icon" href="@favico"> 194 } 195 } 196197 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 198 @using Dynamicweb; 199 @using Dynamicweb.Content.Items; 200201 @{ 202203 string RoundedCornersValue = "0px"; 204 string ButtonHeight = GeneralConfiguration.ButtonHeight.ToString() != "0" ? GeneralConfiguration.ButtonHeight.ToString() + "px" : ""; 205206 switch (GeneralConfiguration.RoundedCorners) 207 { 208209 case "rounded": 210 RoundedCornersValue = GeneralConfiguration.RoundedCornerValue.ToString() + "px"; 211 break; 212213 case "round": 214 RoundedCornersValue = ButtonHeight; 215 break; 216217 default: 218 RoundedCornersValue = "0px"; 219 break; 220 } 221 } 222223 <style> 224 body { 225 font-family: @General__bodyFontFamily; 226 } 227228 h1, 229 h2, 230 h3, 231 h4, 232 h5, 233 h6 { 234 /*color: $general-heading-color;*/ 235 font-family: @General__headerFontFamily; 236 } 237238 h1 { 239 @RenderCSSValue("font-size", H1_FontSize) 240 @RenderCSSValue("font-style", H1_FontSize) 241 @RenderCSSValue("font-weight", H1_FontSize) 242 @RenderCSSValue("font-family", H1_FontSize) 243 } 244245 h2 { 246 @RenderCSSValue("font-size", H2_FontSize) 247 @RenderCSSValue("font-style", H2_FontSize) 248 @RenderCSSValue("font-weight", H2_FontSize) 249 @RenderCSSValue("font-family", H2_FontSize) 250 } 251252 h3 { 253 @RenderCSSValue("font-size", H3_FontSize) 254 @RenderCSSValue("font-style", H3_FontSize) 255 @RenderCSSValue("font-weight", H3_FontSize) 256 @RenderCSSValue("font-family", H3_FontSize) 257 } 258259 h4 { 260 @RenderCSSValue("font-size", H4_FontSize) 261 @RenderCSSValue("font-style", H4_FontSize) 262 @RenderCSSValue("font-weight", H4_FontSize) 263 @RenderCSSValue("font-family", H4_FontSize) 264 } 265266 .po-block__addtocart .btn, 267 .productdetails__add-to-cart, 268 .searchbox__input, 269 .default-btn { 270 border-radius: @RoundedCornersValue !important; 271 } 272273 .default-btn { 274 @if(ButtonHeight != "") 275 { 276 <text> height: @ButtonHeight; </text> 277 } 278 } 279280 .default-btn, 281 .default-btn:hover { 282 transition: all .3s ease-in; 283 } 284285 .default-btn .btn__icon { 286 display: flex; 287 justify-content: center; 288 width: 50px; 289 align-items: center; 290 } 291292 .btn { 293 display: flex !important; 294 justify-content: space-between !important; 295 padding: 0 25px !important; 296 } 297298 </style> 299300 <style> 301 @mc.CustomCSS 302 </style> 303304 @helper RenderCSSValue(string Key, string Value) 305 { 306 if (!string.IsNullOrWhiteSpace(Value)) 307 { 308 <text> 309 @Key : @Value !important; 310 </text> 311 } 312 } 313314315 <script> 316 window.globals = { 317 pageId: '@Pageview.ID', 318 Token: '@csrftoken', 319 DW_AREA_CULTURE: '@langName', 320 DW_AREA_CULTURE_SHORT: '@lang', 321 globalIconClass: '@buttonIconClass', 322 DW_USERID: '@Dynamicweb.Security.UserManagement.User.GetCurrentExtranetUserId()' 323 }; 324 </script> 325326 @websitesettings.HeadScript 327328 @{ 329 var _cookieOptinLevel = Dynamicweb.Environment.CookieManager.GetCookieOptInLevel(); 330 var _enabledCookieCategories = Dynamicweb.Environment.CookieManager.GetCookieOptInCategories(); 331 if (_cookieOptinLevel.ToString() == "All" || _enabledCookieCategories.Contains("Marketing_Cookies")) 332 { 333 @websitesettings.HeadScriptAfterConsent; 334 } 335 } 336337 @{ 338339 var reviewName = websitesettings.Review_Name != null ? websitesettings.Review_Name : ""; 340 var reviewBestRating = websitesettings.Review_Best_Rating != null ? websitesettings.Review_Best_Rating : ""; 341 var reviewWorstRating = websitesettings.Review_Worst_Rating != null ? websitesettings.Review_Worst_Rating : ""; 342 var reviewRatingValue = websitesettings.Review_Rating_Value != null ? websitesettings.Review_Rating_Value : ""; 343 var reviewCount = websitesettings.Review_Count != null ? websitesettings.Review_Count : ""; 344 var reviewUrl = websitesettings.Review_URL != null ? websitesettings.Review_URL : ""; 345346 var searchPageID = Bluedesk.Tools.DynamicWeb.Generic.PageHelper.GetPageIDByNavigationTag("searchresults", Pageview.AreaID); 347 var domain = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain(); 348 } 349350 <script type="application/ld+json"> 351 [{ 352 "@@context": "https://schema.org", 353 "@@type": "Organization", 354 "name" : "@websitesettings.CompanyName", 355 "url": "@domain", 356 "sameAs" : "@websitesettings.Facebook", 357 "logo": "@domain@websitesettings.Logo", 358 "contactPoint" : [{ 359 "@@type" : "ContactPoint", 360 "telephone" : "@websitesettings.Phonenumber", 361 "contactType" : "customer service" , 362 "@@context": "https://schema.org", 363 "@@id": "@domain", 364 "name": "@websitesettings.CompanyName" 365 }], 366 "address": { 367 "@@type": "PostalAddress", 368 "streetAddress": "@websitesettings.Address", 369 "addressLocality": "@websitesettings.City", 370 "postalCode": "@websitesettings.Zipcode", 371 "addressRegion": "@websitesettings.Region", 372 "addressCountry": "@websitesettings.Country" 373 } 374 }, 375 { 376 "@@context": "https://schema.org", 377 "@@type": "WebSite", 378 "name" : "@websitesettings.CompanyName", 379 "alternateName" : "@websitesettings.AltCompanyName", 380 "url": "@domain", 381 "potentialAction": { 382 "@@type": "SearchAction", 383 "target": "@domain/Default.aspx?ID=@searchPageID&q={search_term_string}", 384 "query-input": "required name=search_term_string" 385 } 386 }] 387 </script> 388389 <script type="application/ld+json"> 390 { 391 "@@context": "https://schema.org", 392 "@@type": "Product", 393 "name": "@reviewName", 394 "url":"@reviewUrl", 395 "aggregateRating": { 396 "@@type": "AggregateRating", 397 "bestRating": "@reviewBestRating", 398 "worstRating": "@reviewWorstRating", 399 "ratingValue": "@reviewRatingValue", 400 "reviewCount": "@reviewCount" 401 } 402 } 403 </script> 404405406 @RenderSnippet("DataLayer") 407408 @RenderSnippet("GoogleMapsScript") 409410 @{ 411 // TODO: Add there options to master config for product overview 412 bool hidePricesForGuests = false; 413 bool hideShoppingCartForGuests = false; 414415 bool enableShoppingCart = hideShoppingCartForGuests && Pageview.User == null ? false : websitesettings.ConfigModuleShoppingCart; 416 bool enableLogin = websitesettings.ConfigModuleLogin; 417 bool enableQuickOrder = websitesettings.ConfigModuleQuickOrder; 418 bool enableAdvancedSearch = websitesettings.ConfigModuleAdvancedSearch; 419 bool enableCallMeBack = websitesettings.ConfigModuleCallMeBack; 420 bool enableDyslexicFont = websitesettings.ConfigModuleDyslexicFont; 421 bool enableProductCompare = websitesettings.ConfigModuleProductCompare; 422 } 423424425426 </head> 427 <body class="@MasterConfigCssClass"> 428429430431 @websitesettings.BodyScript 432 @{ 433 if (_cookieOptinLevel.ToString() == "All" || _enabledCookieCategories.Contains("Marketing_Cookies")) 434 { 435 @websitesettings.BodyScriptAfterConsent; 436 } 437 } 438439 @websitesettings.TailScript 440441 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 442 @using System.IO; 443 @using Dynamicweb; 444 @using Dynamicweb.Content; 445 @using Dynamicweb.Frontend; 446 @using Bluedesk.Tools.Generic; 447 @using Dynamicweb.Content.Items; 448 @using Dynamicweb.Content.Items.Queries; 449 @using Bluedesk.DynamicWeb.ItemTypes; 450 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 451 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 452 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution 453454 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 455 @using Dynamicweb; 456 @using Dynamicweb.Content.Items; 457 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 458459 @{ 460461 bool HeaderTransparency = Pageview.Page.PropertyItem["HeaderTransparency"]?.ToString() == "OnTop" ? true : false; 462463 bool userLoggedIn = false; 464465 if (enableLogin) 466 { 467 if (Pageview.User == null) 468 { 469 // <a href="#" class="mainmenu__list-item mainmenu__list-item--contrast topmenu__link topmenu__link--login"><i class="fal fa-user" style="position:relative; display: flex; flex-direction:column; font-size: 1.2rem;"></i><!-- @Translate("User.Login", "Login") --></a> 470 userLoggedIn = false; 471 } 472 else 473 { 474 // <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID" class="topmenu__link">@Translate("User.Logout", "Logout")</a> 475 userLoggedIn = true; 476 } 477 } 478479 /*********** Header ***********/ 480481 var header__custom_menu_items = mc.HeaderConfiguration.CustomMenuItems; 482483 // Display 484485 bool header__top_bar_display = mc.HeaderConfiguration.TopBarDisplay.ToString() == "True" ? true : false; 486 bool header__middle_bar_display = mc.HeaderConfiguration.MiddleBarDisplay.ToString() == "True" ? true : false; 487 bool header__bottom_bar_display = mc.HeaderConfiguration.BottomBarDisplay.ToString() == "True" ? true : false; 488 bool header__stickyheader_display = mc.HeaderConfiguration.StickyheaderDisplay.ToString() == "True" ? true : false; 489490 bool header__mainmenu_display = mc.HeaderConfiguration.MainmenuDisplay.ToString() == "True" ? true : false; 491 bool header__search_display = mc.HeaderConfiguration.SearchDisplay.ToString() == "True" ? true : false; 492493 // General 494495 string header__BackgroundColor = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.BackgroundColor.ToString()); 496 header__BackgroundColor = !string.IsNullOrWhiteSpace(header__BackgroundColor) ? header__BackgroundColor : "transparent"; 497498 string header__ContainerSize = mc.HeaderConfiguration.ContainerSize.ToString() == "0" ? "100%" : mc.HeaderConfiguration.ContainerSize.ToString() + "px"; 499500 // Header Custom Elements 501502 string header__CustomTemplate = !string.IsNullOrWhiteSpace(mc.HeaderConfiguration.CustomTemplate) ? mc.HeaderConfiguration.CustomTemplate.ToString() : ""; 503504 string header__CustomMenuItemColor = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.CustomMenuItemColor.ToString()); 505506 // Positions 507508 var header__mainmenu_position = GetDisplayBoolArray(mc.HeaderConfiguration.PositionMainmenu.ToString()); 509 var header__search_position = GetDisplayBoolArray(mc.HeaderConfiguration.PositionSearch.ToString()); 510 var header__login_position = GetDisplayBoolArray(mc.HeaderConfiguration.PositionLogin.ToString()); 511 var header__shoppingcart_position = GetDisplayBoolArray(mc.HeaderConfiguration.PositionShoppingcart.ToString()); 512 var header__langauage_switch_position = GetDisplayBoolArray(mc.HeaderConfiguration.PositionLanguageSwitch.ToString()); 513 var header__added_menu_position = GetDisplayBoolArray(mc.HeaderConfiguration.PositionAddedMenu.ToString()); 514 var header__custom_template_position = GetDisplayBoolArray(mc.HeaderConfiguration.PositionCustomTemplate.ToString()); 515516 // Mainmenu 517518 /*** Mainmenu general settings ***/ 519 string header_mainmenu__Color = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.MainmenuColor.ToString()); 520 string header_mainmenu__BackgroundColor = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.MainmenuBackgroundColor.ToString()); 521 header_mainmenu__BackgroundColor = !string.IsNullOrWhiteSpace(header_mainmenu__BackgroundColor) ? header_mainmenu__BackgroundColor : "transparent"; 522523 string header_mainmenu__ColorHover = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.MainmenuColorHover.ToString()); 524 string header_mainmenu__BackgroundColorHover = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.MainmenuBackgroundColorHover.ToString()); 525526 string header_mainmenu__ColorActive = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.MainmenuColorActive.ToString()); 527 string header_mainmenu__BackgroundColorActive = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.MainmenuBackgroundColorActive.ToString()); 528529 string header_mainmenu__textTransform = mc.HeaderConfiguration.MainmenuTextTransform.ToString(); 530 header_mainmenu__textTransform = !string.IsNullOrWhiteSpace(header_mainmenu__textTransform) ? header_mainmenu__textTransform : "uppercase"; 531532 bool header_mainmenu__FullWidthMainmenu = mc.HeaderConfiguration.FullWidthMainmenu; 533534 /* Font */ 535536 string header_mainmenu__FontFamily = HeaderConfiguration.FontConfigurationMainmenu.FontConfiguration.FontFamily; 537 string header_mainmenu__FontSize = HeaderConfiguration.FontConfigurationMainmenu.FontSize; 538 string header_mainmenu__FontStyle = HeaderConfiguration.FontConfigurationMainmenu.FontStyle; 539 string header_mainmenu__FontWeight = HeaderConfiguration.FontConfigurationMainmenu.FontWeight; 540541 // Searchbar 542543 string header_searchbar__Color = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.SearchBarColor.ToString()); 544 string header_searchbar__BackgroundColor = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.SearchBarBackgroundColor.ToString()); 545 header_searchbar__BackgroundColor = !string.IsNullOrWhiteSpace(header_searchbar__BackgroundColor) ? header_searchbar__BackgroundColor : "transparent"; 546547 // Top 548549 /*** Top bar general settings ***/ 550 string header_top__Color = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.TopColor.ToString()); 551 string header_top__BackgroundColor = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.TopBackgroundColor.ToString()); 552 header_top__BackgroundColor = !string.IsNullOrWhiteSpace(header_top__BackgroundColor) ? header_top__BackgroundColor : "transparent"; 553554 string header_top__link_text_color = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.TopLinkTextColor.ToString()); 555556 // Top | USP 557558 string header_top__USP_text_color = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.TopUSPTextColor.ToString()); 559 string header_top__USP_icon_color = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.TopUSPIconColor.ToString()); 560561 bool header_USP_top_bar__display = mc.HeaderConfiguration.TopBarUSPDisplay.ToString() == "True" ? true : false; 562563 // Middle 564565 /*** Middle bar general settings ***/ 566567 string header_main__Color = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.MiddleColor.ToString()); 568 string header_main__BackgroundColor = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.MiddleBackgroundColor.ToString()); 569 header_main__BackgroundColor = !string.IsNullOrWhiteSpace(header_main__BackgroundColor) ? header_main__BackgroundColor : "transparent"; 570571 string header_main__BackgroundGradient = !string.IsNullOrWhiteSpace(mc.HeaderConfiguration.MiddleBackgroundGradient.ToString()) ? mc.HeaderConfiguration.MiddleBackgroundGradient.ToString() : null; 572 string header_main__BackgroundImage = !string.IsNullOrWhiteSpace(mc.HeaderConfiguration.MiddleBackgroundImage.ToString()) ? mc.HeaderConfiguration.MiddleBackgroundImage.ToString() : null; 573574 string header_main__height = mc.HeaderConfiguration.MiddleBarHeight == 0 ? "auto" : mc.HeaderConfiguration.MiddleBarHeight.ToString() + "px"; 575576 /*** Desktop logo Settings ***/ 577 string header_logo__top = mc.HeaderConfiguration.LogoTop.ToString(); 578 header_logo__top = !string.IsNullOrWhiteSpace(header_logo__top) ? header_logo__top + "px" : "auto"; 579580 string header_logo__left = mc.HeaderConfiguration.LogoLeft.ToString(); 581 header_logo__left = !string.IsNullOrWhiteSpace(header_logo__left) ? header_logo__left + "px" : "auto"; 582583 string header_logo__width = mc.HeaderConfiguration.LogoWidth.ToString(); 584 header_logo__width = !string.IsNullOrWhiteSpace(header_logo__width) && header_logo__width != "0" ? header_logo__width + "px" : "auto"; 585586 string header_logo__height = mc.HeaderConfiguration.LogoHeight.ToString(); 587 header_logo__height = !string.IsNullOrWhiteSpace(header_logo__height) && header_logo__height != "0" ? header_logo__height + "px" : "auto"; 588589 string header_desktop__logo = mc.HeaderConfiguration.LogoDesktopImage.ToString(); 590591 /*** Mobile logo Settings ***/ 592 string header_mobile_logo__top = mc.HeaderConfiguration.LogoMobileTop.ToString(); 593 header_mobile_logo__top = !string.IsNullOrWhiteSpace(header_mobile_logo__top) ? header_mobile_logo__top + "px" : "auto"; 594595 string header_mobile_logo__left = mc.HeaderConfiguration.LogoMobileLeft.ToString(); 596 header_mobile_logo__left = !string.IsNullOrWhiteSpace(header_mobile_logo__left) ? header_mobile_logo__left + "px" : "auto"; 597598 string header_mobile_logo__height = mc.HeaderConfiguration.LogoMobileHeight.ToString(); 599 header_mobile_logo__height = !string.IsNullOrWhiteSpace(header_mobile_logo__height) && header_mobile_logo__height != "0" ? header_mobile_logo__height + "px" : "auto"; 600601 string header_mobile_logo__width = mc.HeaderConfiguration.LogoMobileWidth.ToString(); 602 header_mobile_logo__width = !string.IsNullOrWhiteSpace(header_mobile_logo__width) && header_mobile_logo__width != "0" ? header_mobile_logo__width + "px" : "auto"; 603604 string header_mobile__logo = mc.HeaderConfiguration.LogoMobileImage.ToString(); 605606 // Bottom 607608 /*** General settings ***/ 609 string header_bottom__Color = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.BottomColor.ToString()); 610 string header_bottom__BackgroundColor = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.BottomBackgroundColor.ToString()); 611 header_bottom__BackgroundColor = !string.IsNullOrWhiteSpace(header_bottom__BackgroundColor) ? header_bottom__BackgroundColor : "transparent"; 612613614 // Stickyheader 615616 /*** display ***/ 617 bool header_stickyheader_top_bar__display = mc.HeaderConfiguration.StickyheaderTopBarDisplay.ToString() == "True" ? true : false; 618 bool header_stickyheader_middle_bar__display = mc.HeaderConfiguration.StickyheaderMiddleBarDisplay.ToString() == "True" ? true : false; 619 bool header_stickyheader_bottom_bar__display = mc.HeaderConfiguration.StickyheaderBottomBarDisplay.ToString() == "True" ? true : false; 620621 /*** Stickyheader general Settings ***/ 622 string header_stickyheader_color = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.StickyheaderColor.ToString()); 623 string header_stickyheader_background_color = colorService.GetHexColor(Pageview.AreaID, mc.HeaderConfiguration.StickyheaderBackgroundColor.ToString()); 624 header_stickyheader_background_color = !string.IsNullOrWhiteSpace(header_stickyheader_background_color) ? header_stickyheader_background_color : "transparent"; 625626627 /*** Stickyheader logo Settings ***/ 628 string header_stickyheader_logo__top = mc.HeaderConfiguration.LogoStickyheaderTop.ToString(); 629 header_stickyheader_logo__top = !string.IsNullOrWhiteSpace(header_stickyheader_logo__top) ? header_stickyheader_logo__top + "px" : "auto"; 630631 string header_stickyheader_logo__left = mc.HeaderConfiguration.LogoStickyheaderLeft.ToString(); 632 header_stickyheader_logo__left = !string.IsNullOrWhiteSpace(header_stickyheader_logo__left) ? header_stickyheader_logo__left + "px" : "auto"; 633634 string header_stickyheader_logo__width = mc.HeaderConfiguration.LogoStickyheaderWidth.ToString(); 635 header_stickyheader_logo__width = !string.IsNullOrWhiteSpace(header_stickyheader_logo__width) && header_stickyheader_logo__width != "0" ? header_stickyheader_logo__width + "px" : "auto"; 636637 string header_stickyheader_logo__height = mc.HeaderConfiguration.LogoStickyheaderHeight.ToString(); 638 header_stickyheader_logo__height = !string.IsNullOrWhiteSpace(header_stickyheader_logo__height) && header_stickyheader_logo__height != "0" ? header_stickyheader_logo__height + "px" : "auto"; 639640 string header_desktop_stickyheader__logo = mc.HeaderConfiguration.LogoStickyheaderImage.ToString(); 641642 /*********** Footer ***********/ 643644 /*** General Setting ***/ 645 bool header__main_menu_display = true; 646 bool header__main_cta_button_display = true; 647 bool header__main_menu_custom_display = true; 648649 bool header__main_search_display = true; 650 bool header__main_mainmenu_display = true; 651 bool header__bottom_mainmenu_display = true; 652653654 /*** Searchbar ***/ 655656 string search_bar__max_width = HeaderConfiguration.SearchbarMaxWidth.ToString() != "0" ? HeaderConfiguration.SearchbarMaxWidth + "px" : "none"; 657658 int SearchPageID = Bluedesk.Tools.DynamicWeb.Generic.PageHelper.GetPageIDByNavigationTag("searchresults", Pageview.AreaID); 659 var SearchPlaceholder = Translate("Searchbox.PlaceholderValue", "Search..."); 660 var SearchPlaceholderHover = Translate("Search.PlaceholderValue2", "Zoekt u misschien een ...?"); 661 var SearchPrefill = Dynamicweb.Context.Current.Request["q"]; 662 var SearchboxClass = !string.IsNullOrWhiteSpace(SearchPrefill) ? "open" : ""; 663 var SearchtoggleClass = !string.IsNullOrWhiteSpace(SearchPrefill) ? "close" : ""; 664665 // cp = currentpage 666 var cp_default = System.Web.HttpContext.Current.Items["defaultActive"]; 667 var cp_productOverview = System.Web.HttpContext.Current.Items["productOverviewActive"]; 668 var cp_productDetail = System.Web.HttpContext.Current.Items["productDetailActive"]; 669670 string stickyHeaderCTAText = websitesettings.Sticky_header_cta_text; 671 string stickyHeaderCTALink = websitesettings.Sticky_header_cta_link; 672673 string stickyHeaderCTAIcon = websitesettings.Sticky_header_cta_icon; 674 string stickyHeaderCTAIconClass = (!string.IsNullOrWhiteSpace(stickyHeaderCTAIcon)) ? stickyHeaderCTAIcon : "fal fa-shopping-cart"; 675676 string stickyLogo = websitesettings.StickyLogo; 677678 string PageTypeClass = ""; 679680 if (cp_productDetail != null && (bool)cp_productDetail) 681 { 682 PageTypeClass = "productDetail "; 683 } 684 else if (cp_productOverview != null && (bool)cp_productOverview) 685 { 686 PageTypeClass = "productOverview "; 687 } 688689 string headerMainMenu_buttonLoginUrl = ""; 690 string headerMainMenu_buttonLoginLabel = ""; 691 string headerMainMenu_buttonLoginClass = ""; 692693 // Set logged in status for header main menu button 694 if (Pageview.User == null) 695 { 696 headerMainMenu_buttonLoginUrl = "javascript:void(0);"; 697 headerMainMenu_buttonLoginLabel = Translate("User.Login", "Login"); 698 headerMainMenu_buttonLoginClass = "topmenu__link--login"; 699 } 700 else 701 { 702 headerMainMenu_buttonLoginUrl = "/Admin/Public/ExtranetLogoff.aspx?ID=" + Pageview.Page.ID; 703 headerMainMenu_buttonLoginLabel = Translate("User.Logout", "Logout"); 704 headerMainMenu_buttonLoginClass = ""; 705 } 706707 string mainmenu_sublinks_padding = "25px"; 708709 /*** Code Dump *** 710711 // var masterconfig = Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfig"); 712 // var headerconfig = Services.Items.GetItem("HeaderConfiguration", masterconfig.Item["HeaderConfiguration"].ToString()); 713714 // bool header__main_search_display = headerconfig["HeaderMainSearchDisplay"].ToString() == "True" ? true : false; 715 // bool header__main_mainmenu_display = headerconfig["HeaderMainMainmenuDisplay"].ToString() == "True" ? true : false; 716 // bool header__bottom_mainmenu_display = headerconfig["HeaderBottomMainmenuDisplay"].ToString() == "True" ? true : false; 717718 // string header_main_custom_menu__Color = colorService.GetHexColor(Pageview.AreaID, headerconfig["HeaderMainCustomButtonsColor"].ToString()); 719 // string header_main_custom_menu__BackgroundColor = colorService.GetHexColor(Pageview.AreaID, headerconfig["HeaderMainCustomButtonsBackgroundColor"].ToString()); 720721 // string header_bottom_mainmenu__Color = colorService.GetHexColor(Pageview.AreaID, headerconfig["HeaderBottomMainmenuColor"].ToString()); 722 // string header_bottom_mainmenu__BackgroundColor = colorService.GetHexColor(Pageview.AreaID, headerconfig["HeaderBottomMainmenuBackgroundColor"].ToString()); 723724 // string header_stickyheader_mainmenu__BackgroundColor = colorService.GetHexColor(Pageview.AreaID, headerconfig["HeaderStickyheaderMainmenuBackgroundColor"].ToString()); 725726 ******************/ 727728 var AddedMenu = RenderNavigation( 729 new 730 { 731 StartLevel = 1, 732 EndLevel = 4, 733 ParentTag = "topmenu-nav", 734 blockclass = "addedmenu", 735 Template = "AddedNavigation.xslt", 736 expandmode = "all" 737 }); 738739 //websitesettings.Review_URL 740 //websitesettings.Review_Name 741 //websitesettings.Review_Best_Rating 742 //websitesettings.Review_Worst_Rating 743744 var ReviewRatingValue = websitesettings.Review_Rating_Value != null ? websitesettings.Review_Rating_Value : ""; 745 string ReviewCompanyRating = !string.IsNullOrWhiteSpace(websitesettings.Review_Rating_Value) ? (double.Parse(ReviewRatingValue) * 10) + "%" : ""; 746747 bool headerTransparent = Pageview.Page.PropertyItem != null && Pageview.Page.PropertyItem["HeaderTransparent"] != null ? Convert.ToBoolean(Pageview.Page.PropertyItem["HeaderTransparent"]) : false; 748749 string cssHeaderTransparent = headerTransparent ? "transparent " : ""; 750751 string AddToCartButtonBackgroundColor = EcommerceConfiguration.AddToCartButtonBackgroundColor; 752753 if (!string.IsNullOrWhiteSpace(AddToCartButtonBackgroundColor)) 754 { 755 AddToCartButtonBackgroundColor = !AddToCartButtonBackgroundColor.Contains("#") ? colorService.GetHexColor(Pageview.AreaID, AddToCartButtonBackgroundColor) : AddToCartButtonBackgroundColor; 756 } 757758 } 759760 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 761 @using Dynamicweb; 762 @using Dynamicweb.Content.Items; 763764 @functions { 765766 Dictionary<string, bool> GetDisplayBoolArray(string Position) 767 { 768769 bool top = false; 770 bool middle = false; 771 bool bottom = false; 772773 switch (Position) 774 { 775 case "top-bar": 776 top = true; 777 break; 778 case "middle-bar": 779 middle = true; 780 break; 781 case "bottom-bar": 782 bottom = true; 783 break; 784 } 785786 Dictionary<string, bool> header__position = new Dictionary<string, bool>() 787 { 788 { "top" , top }, 789 { "middle" , middle }, 790 { "bottom" , bottom } 791 }; 792793 return header__position; 794 } 795796 } 797798 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 799 @using Dynamicweb; 800 @using Dynamicweb.Content.Items; 801802 @helper RenderHeaderBackground(string BackgroundImage) 803 { 804 <figure class="headerNew__middle-background-container"> 805 @if (!string.IsNullOrWhiteSpace(BackgroundImage)) 806 { 807 <img src="@BackgroundImage" alt="" /> 808 } 809 </figure> 810 } 811812 @helper RenderHelperSearchBox(string SearchPrefill, string SearchPlaceholder, int SearchPageID) 813 { 814 <form class="searchbox__form" method="get" action="/Default.aspx" style="display: flex; flex-grow: 1;"> 815 <input type="text" name="q" value="@SearchPrefill" class="searchbox__input" placeholder="@SearchPlaceholder" aria-label="Search through site content" style="display: flex; flex-grow: 1;" /> 816 <div class="searchbox__button"> 817 <button type="submit" class="searchbox__form__submit icon icon--medium icon__search input__icon" aria-label="Search"> 818 <i class="fal fa-search"></i> 819 <label style="position: absolute; bottom: 0px;">Zoeken</label> 820 </button> 821 </div> 822 <input type="hidden" name="ID" value="@SearchPageID" /> 823 </form> 824 } 825826 @helper RenderReview(string ReviewRatingValue) 827 { 828 <section class="reviews"> 829 <div class="reviews__indicator"> 830 <div class="reviews__indicator-progressbar"></div> 831 <ul class="reviews__indicator-star-list"> 832 <li class="reviews__indicator-star-list-item"></li> 833 <li class="reviews__indicator-star-list-item"></li> 834 <li class="reviews__indicator-star-list-item"></li> 835 <li class="reviews__indicator-star-list-item"></li> 836 <li class="reviews__indicator-star-list-item"></li> 837 </ul> 838 </div> 839840 <label class="reviews__label">@ReviewRatingValue</label> 841 </section> 842 } 843844 @helper RenderSocialLink(string socialLink, string socialName) 845 { 846 if (!string.IsNullOrWhiteSpace(socialLink)) 847 { 848 <a href="@socialLink" target="_blank" title="@socialName" class="footer__social"><i class="fab fa-@socialName"></i></a> 849 } 850 } 851852 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 853 @using Dynamicweb; 854 @using Dynamicweb.Content.Items; 855856 @SnippetStart("HeaderLogoDesktop") 857 <!-- BEGIN HeaderLogo --> 858859 <a href="/" class="flex items-center"> 860 <img class="header__logo" src="@logo" alt="Logo" width="400" height="200"> 861 </a> 862863 <!-- END HeaderLogo --> 864 @SnippetEnd("HeaderLogoDesktop") 865866 @SnippetStart("HeaderBackground") 867868 <figure class="mc-header__main-background-container"> 869 @if (!string.IsNullOrWhiteSpace(header_main__BackgroundImage)) 870 { 871 <img src="@header_main__BackgroundImage" alt="" /> 872 } 873 </figure> 874875 @SnippetEnd("HeaderBackground") 876877 @SnippetStart("HeaderLogo") 878879 <figure class="mc-header__logo"> 880 <a href="/" aria-label="Logo"> 881 @if (!string.IsNullOrWhiteSpace(header_desktop__logo)) 882 { 883 <img class="mc-header__logo-image" src="@header_desktop__logo" alt="" /> 884 <img class="mc-header__logo-image stickyheader" src="@header_desktop_stickyheader__logo" alt="" /> 885 } 886 else 887 { 888 <img class="mc-header__logo-image" src="@logo" alt="" /> 889 } 890 </a> 891 </figure> 892893 @SnippetEnd("HeaderLogo") 894895 @SnippetStart("HeaderCTAButton") 896897 @if (!string.IsNullOrWhiteSpace(stickyHeaderCTAText) && header__main_cta_button_display) 898 { 899 <a href="@stickyHeaderCTALink" class="btn stickymenu__cta-btn mc-header__main-CTAbutton"> 900 <span class="btn__text stickymenu__cta-btn-label">@stickyHeaderCTAText</span> 901 <i class="btn__icon @stickyHeaderCTAIconClass stickymenu__cta-btn-icon"></i> 902 </a> 903 } 904905 @SnippetEnd("HeaderCTAButton") 906907 @SnippetStart("HeaderMainAddedMenu") 908909 @if (header__added_menu_position["middle"]) 910 { 911 <ul class="addedmenu">@AddedMenu</ul> 912 } 913914 @SnippetEnd("HeaderMainAddedMenu") 915916 <!-- ************************ --> 917 <!-- *** BEGIN MENU ITEMS *** --> 918 <!-- ************************ --> 919920 @SnippetStart("HeaderAddedMenu") 921922 <ul class="addedmenu">@AddedMenu</ul> 923924 @SnippetEnd("HeaderAddedMenu") 925926 @SnippetStart("HeaderCustomTemplate") 927928 <div class="mc-header__main-custom-template"> 929 @header__CustomTemplate 930 </div> 931932 @SnippetEnd("HeaderCustomTemplate") 933934 @SnippetStart("HeaderShoppingcart") 935936 <a href="#" class="mc-header__main-menu-link app-shopping-cart" data-cart-location="header-desktop"> 937 <i class="fal fa-shopping-cart"></i> 938 <label>@Translate("Shoppingcart", "Shoppingcart")</label> 939 </a> 940941 @SnippetEnd("HeaderShoppingcart") 942943 @SnippetStart("HeaderLogin") 944945 <a href="@headerMainMenu_buttonLoginUrl" class="mc-header__main-menu-link @headerMainMenu_buttonLoginClass" aria-label="@headerMainMenu_buttonLoginLabel"> 946 <i class="fal fa-user"></i> 947 <label>@headerMainMenu_buttonLoginLabel</label> 948 </a> 949950 @SnippetEnd("HeaderLogin") 951952 <!-- ********************** --> 953 <!-- *** END MENU ITEMS *** --> 954 <!-- ********************** --> 955956 @SnippetStart("HeaderLanguage") 957958 @if (header__langauage_switch_position["middle"] && LanguageSwitcher.GetLanguages().Count > 1) 959 { 960961 <div class="top-toggles"> 962 <div class="language"> 963 <div class="language-dropdown"> 964 <button class="language-dropdown__toggle mc-header__main-menu-link @headerMainMenu_buttonLoginClass" type="button" aria-label="Change language"> 965 <i class="fal fa-globe"></i> 966 @*<span class="flag flag-icon flag-icon-@Pageview.Area.Culture.Substring(3,2).ToLower()"></span>*@ 967 @*<i class="fal fa-chevron-down"></i>*@ 968 </button> 969 <ul class="language-dropdown__options"> 970 @foreach (var l in LanguageSwitcher.GetLanguages()) 971 { 972 string languageName = @l.NativeName.ToString().Split('(')[0]; 973 <li class="language-dropdown__item"> 974 <a href='@l.Url' title="@languageName"> 975 <span class="flag-icon flag-icon-@l.CountryCode"></span> 976 <span class="language-dropdown__item-code">@languageName</span> 977 </a> 978 </li> 979 } 980 </ul> 981 </div> 982 </div> 983 </div> 984985 } 986987 @SnippetEnd("HeaderLanguage") 988989 @SnippetStart("HeaderSearchbox") 990991 @if (header__main_menu_display == true) 992 { 993994 if (header__main_search_display == true && header__search_position["middle"]) 995 { 996 if (enableAdvancedSearch) 997 { 998999 <script> 10001001 var openSearchBar = true; 10021003 function toggleSearchButton() { 10041005 var SearchButtonDOM = document.querySelector('.search__visibility-toggle-icon').classList; 1006 var SearchWrapperDOM = document.querySelector('.searchbox__wrapper'); 100710081009 if (openSearchBar){ SearchButtonDOM.remove('fa-search'); SearchButtonDOM.add('fa-times') } else { SearchButtonDOM.remove('fa-times'); SearchButtonDOM.add('fa-search'); } 1010 SearchWrapperDOM.style.display = openSearchBar ? "flex" : "none"; 10111012 document.querySelector('.mainmenu').style.display = openSearchBar ? "none" : "flex"; 1013 document.querySelector('.mc-header__main-custom-template').style.display = openSearchBar ? "none" : "flex"; 1014 document.querySelector('.mc-header__main-menu').style.width = openSearchBar ? "calc(100% - @header_logo__width - @header_logo__left - 25px)" : "auto"; 10151016 openSearchBar = openSearchBar ? false : true; 10171018 } 10191020 </script> 10211022 <div id="advanced-search"></div> 1023 <a href="javascript:void(0)" onclick="toggleSearchButton()" class="mc-header__main-menu-link search__visibility-toggle"> 1024 <i class="fal fa-search search__visibility-toggle-icon"></i> 1025 @*<svg id="Laag_1" data-name="Laag 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 250 250"> 1026 <circle class="cls-1" cx="101.25" cy="101.25" r="43.64" /> 1027 <path class="cls-1" d="M80.53 80.53a29.31 29.31 0 0 0 0 41.44M144.31 144.31l-12.12-12.12M137.93 150.69 176.25 189c4 4 9.59 4.74 13.54.78h0c4-3.95 3.17-9.58-.78-13.54l-38.32-38.32-6.38 6.38" /> 1028 </svg>*@ 1029 <label>Search</label> 1030 </a> 10311032 } 1033 else 1034 { 1035 @RenderHelperSearchBox(SearchPrefill, SearchPlaceholder, SearchPageID) 1036 } 1037 } 10381039 } 1040 @SnippetEnd("HeaderSearchbox") 10411042 @SnippetStart("CallMeBackSnippet") 1043 <!-- BEGIN Stickymenu --> 1044 @if (enableCallMeBack) 1045 { 10461047 <div class="header__cta"> 10481049 @if (!isOffline) 1050 { 10511052 <a href="tel:@formattedPhonenumber" class="header__cta--phone phone-cta"> 1053 <p class="phone-cta__number"><i class="fas fa-phone-alt"></i> @Translate("Header.CallUsOn", "Call us on")<span>@phonenumber</span></p> 1054 <div class="phone-cta__availability__wrapper"> 1055 <i class="fas fa-circle phone-cta__availability__icon"></i> 1056 <p class="phone-cta__availability__description">@Translate("Header.AvailableUntill", "We are available until") @availableToHour</p> 1057 </div> 1058 </a> 10591060 } 1061 else 1062 { 10631064 <div class="header__cta--callmeback callmeback-cta"> 1065 <a href="@callmebackformlink" class="btn btn__outline btn--callmeback"> 1066 <span class="btn__text">@Translate("Header.CallMeBack", "Call me back")</span> 1067 <i class="btn__icon fas fa-phone"></i> 1068 </a> 1069 </div> 10701071 } 1072 . 1073 </div> 10741075 } 10761077 <!-- END Stickymenu --> 1078 @SnippetEnd("CallMeBackSnippet") 10791080 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 1081 @using Dynamicweb; 1082 @using Dynamicweb.Content.Items; 10831084 <script> 1085 function setImagesSizes(Classname) { 1086 var Images = document.querySelectorAll(Classname); 1087 for (var index = 0; index < Images.length; index++) { 1088 if(!Images[index].hasAttribute("height")) { 1089 Images[index].setAttribute("height", Images[index].offsetHeight); 1090 } 1091 if(!Images[index].hasAttribute("width")) { 1092 Images[index].setAttribute("width", Images[index].offsetWidth); 1093 } 1094 } 1095 } 10961097 window.addEventListener('load', function () { 1098 setImagesSizes("img"); 1099 setImagesSizes(".mc-header__logo-image"); 1100 }); 1101 </script> 11021103 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 1104 @using Dynamicweb; 1105 @using Dynamicweb.Content.Items; 1106 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 11071108 @{ 1109 string header_top__height = header__top_bar_display ? "50px" : "0px"; 1110 string header_bottom__height = header__bottom_bar_display ? "50px" : "0px"; 1111 } 11121113 <style> 11141115 /*** Header Base Configuration ***/ 111611171118 /*** Stickyheader***/ 1119 /*** Stickyheader Structure ***/ 112011211122 /*** Stickyheader Base Configuration ***/ 112311241125 .stickyheader .mc-header__hamburger-menu, 1126 .megamenu-wrapper.stickyheader { 1127 @if (header_main__height != "auto") 1128 { 1129 <text> top: @header_main__height; </text> 1130 } 1131 } 11321133 @if (header_main__height != "auto") 1134 { 1135 <text> 1136 .mc-header__hamburger-menu { 1137 top: calc(@header_main__height + @header_top__height); 1138 } 1139 </text> 1140 } 11411142 @if (header_stickyheader_top_bar__display != true) { 1143 <text> 1144 .stickyheader .mc-header__topmenu{ height: 0; } 1145 </text> 1146 } 1147 @if (header_stickyheader_middle_bar__display != true) { 1148 <text> 1149 .stickyheader .mc-header__main { height: 0; } 1150 </text> 1151 } 1152 @if (header_stickyheader_bottom_bar__display != true) { 1153 <text> 1154 .stickyheader .mc-header__bottom { height: 0; } 1155 </text> 1156 } 11571158 .mainmenu__list-container { 1159 height: 100%; 1160 } 11611162 .mc-header__main-menu { 1163 width: auto; 1164 } 11651166 @if (header__mainmenu_position["top"]) 1167 { 1168 <text> </text> 1169 } 1170 @if (header__mainmenu_position["middle"]) 1171 { 1172 <text> </text> 1173 } 11741175 @if (header__mainmenu_position["bottom"]) 1176 { 1177 <text> </text> 1178 } 11791180 .mc-header--desktop.mc-header.transparent { 1181 position: absolute; 1182 background-color: transparent; 1183 } 11841185 .mc-header--desktop.mc-header.transparent .mc-header__topmenu, 1186 .mc-header--desktop.mc-header.transparent .mc-header__main, 1187 .mc-header--desktop.mc-header.transparent .mc-header__bottom { 1188 background-color: transparent; 1189 color: white !important; 1190 } 11911192 .mc-header--desktop.mc-header.transparent .mainmenu, 1193 .mc-header--desktop.mc-header.transparent .mainmenu__link, 1194 .mc-header--desktop.mc-header.transparent .addedmenu__link, 1195 .mc-header--desktop.mc-header.transparent .usp__item { 1196 background-color: transparent !important; 1197 color: white !important; 1198 } 1199120012011202 .mc-header__main-background-container { 1203 position: absolute; 1204 top:0; 1205 left:0; 1206 height: 100%; 1207 width: 100%; 1208 } 12091210 .stickyheader .mc-header__bottom .mainmenu{ 1211 background-color : @header_stickyheader_background_color; 1212 color : @header_stickyheader_color; 1213 } 12141215 .productDetail.stickyheader .mc-header__bottom { 1216 background-color: white; 1217 } 12181219 .stickyheader .mc-header__bottom .mainmenu__label { 1220 color: @header_stickyheader_color !important; 1221 } 12221223 .stickyheader .mc-header__bottom { 1224 min-height: unset; 1225 background-color: @header_bottom__BackgroundColor; 1226 } 12271228 .mc-header__logo { 1229 top: @header_logo__top !important; 1230 left: @header_logo__left !important; 1231 margin: 0; 1232 } 12331234 .mc-header__logo, .mc-header__logo img { 1235 height: @header_logo__height; 1236 width: @header_logo__width; 1237 } 12381239 .stickyheader .mc-header__logo, 1240 .stickyheader .mc-header__logo img { 1241 top : @header_stickyheader_logo__top; 1242 left : @header_stickyheader_logo__left; 1243 height : @header_stickyheader_logo__height; 1244 } 12451246 </style> 12471248 @if (!string.IsNullOrWhiteSpace(header_desktop_stickyheader__logo)) 1249 { 1250 <style> 1251 .mc-header__logo-image { 1252 display: flex; 1253 } 12541255 .mc-header__logo-image.stickyheader { 1256 display: none; 1257 } 12581259 .stickyheader .mc-header__logo-image { 1260 display: none; 1261 } 12621263 .stickyheader .mc-header__logo-image.stickyheader { 1264 display: flex; 1265 } 1266 </style> 1267 } 12681269 <style> 12701271 @@media screen and (max-width: 992px) { 12721273 .header.header--mobile .header__logo { 1274 top : @header_mobile_logo__top; 1275 height : @header_mobile_logo__height; 1276 width : @header_mobile_logo__width; 1277 } 12781279 } 12801281 @@media screen and (min-width: 992px){ 12821283 .mainmenu .mainmenu__link { 1284 background-color: @header_mainmenu__BackgroundColor !important; 1285 text-transform: @header_mainmenu__textTransform; 1286 } 12871288 .mainmenu .mainmenu__link .mainmenu__label { 1289 color: @header_mainmenu__Color !important; 1290 } 12911292 .mainmenu .mainmenu__link:hover { 1293 background-color: @header_mainmenu__BackgroundColorHover !important; 1294 } 12951296 .mainmenu .mainmenu__link:hover .mainmenu__label { 1297 color: @header_mainmenu__ColorHover !important; 1298 } 12991300 .mainmenu .mainmenu__link--active { 1301 background-color: @header_mainmenu__BackgroundColorActive !important; 1302 } 13031304 .mainmenu .mainmenu__link--active .mainmenu__label { 1305 color: @header_mainmenu__ColorActive !important; 1306 } 13071308 .mc-header__topmenu-container, 1309 .mc-header__main-container, 1310 .mc-header__bottom-container { 1311 width: @header__ContainerSize; 1312 } 13131314 } 13151316 @@media screen and (min-width: 992px) { 1317 .mc-header__topmenu-container { 1318 min-width: 1200px; 1319 } 13201321 .mc-header__topmenu-container, 1322 .mc-header__main-container, 1323 .mc-header__bottom-container { 1324 position: relative; 1325 display: flex; 1326 height: inherit; 1327 margin: 0 auto; 1328 } 1329 } 13301331 .sublinks { 1332 padding: @mainmenu_sublinks_padding; 13331334 @if (header__mainmenu_position["top"]) 1335 { 1336 <text> top: 50px; </text> 1337 } 1338 @if (header__mainmenu_position["middle"]) 1339 { 1340 <text> top: 75px; </text> 1341 } 1342 } 13431344 .mainmenu__item:first-child { 1345 display: none; 1346 } 13471348 .mc-header .mc-header__hamburger-menu { 1349 position: fixed; 1350 } 13511352 </style> 13531354 @* 13551356 /**** CODE DUMP ****/ 13571358 .headerNew .searchbox .icon__search, 1359 .headerNew__main-menu .searchbox__form__submit, 1360 .headerNew__main-menu .topmenu__shoppingcart, 1361 .headerNew__main-menu-link{ 1362 color: @header_main_custom_menu__Color; 1363 background-color: @header_main_custom_menu__BackgroundColor; 1364 } 13651366 .headerNew__bottom .mainmenu { 1367 background-color: @header_bottom_mainmenu__BackgroundColor; 1368 } 13691370 .headerNew__bottom .mainmenu__label { 1371 color: @header_bottom_mainmenu__Color !important; 1372 } 13731374 *@ 13751376 <style> 13771378 .mc-header.stickyheader { 1379 height: auto !important; 1380 box-shadow: 10px 10px 10px rgb(153 153 255 / 10%); 1381 } 13821383 .mc-header__stickyheader { 1384 display: flex; 1385 flex-direction: row; 1386 flex-grow: 1; 1387 justify-content: space-between; 1388 align-items: center; 1389 max-height: 0; 1390 width: 100%; 1391 background-color: white; 1392 overflow: unset; 1393 } 13941395 .mc-header__stickyheader *{ 1396 opacity: 0; 1397 } 13981399 .stickyheader .mc-header__stickyheader * { 1400 opacity: 1; 1401 /* transition: all 0.5s ease-in; */ 1402 /* transition-delay: 0.5s; */ 1403 } 14041405 .mc-header__stickyheader-container { 1406 position: relative; 1407 display: flex; 1408 flex-grow: 1; 1409 } 14101411 .mc-header__stickyheader-image { 1412 top: @header_stickyheader_logo__top; 1413 left: @header_stickyheader_logo__left; 1414 height: @header_stickyheader_logo__height; 1415 width: @header_stickyheader_logo__width; 1416 } 14171418 .stickyheader .mc-header__stickyheader { 1419 max-height: 75px; 1420 /* transition: all 0.5s ease-in; */ 1421 } 14221423 .stickyheader .mc-header__topmenu, 1424 .stickyheader .mc-header__main, 1425 .stickyheader .mc-header__bottom { 1426 display: none; 1427 } 14281429 </style> 14301431 <style> 14321433 /*** Header ***/ 1434 /*** Header Structure ***/ 14351436 .mc-header { 1437 background-color: @header__BackgroundColor; 1438 } 14391440 .mc-header__topmenu { 1441 background-color : @header_top__BackgroundColor; 1442 color : @header_top__Color; 1443 } 14441445 .mc-header__topmenu-container { 1446 width : @header__ContainerSize; 1447 justify-content : space-between; 1448 } 14491450 .mc-header__main { 14511452 @if (!string.IsNullOrWhiteSpace(header_main__height)) { 1453 <text>height : @header_main__height ;</text> 1454 } 14551456 background-color : @header_main__BackgroundColor; 1457 @header_main__BackgroundGradient 1458 color : @header_main__Color; 1459 } 14601461 .mc-header__main-container { 1462 width : @header__ContainerSize; 1463 justify-content : space-between; 1464 } 14651466 .mc-header__bottom { 1467 background-color : @header_bottom__BackgroundColor; 1468 color : @header_bottom__Color; 1469 } 14701471 .mc-header__bottom-container { 1472 width : @header__ContainerSize; 1473 justify-content : space-between; 1474 } 14751476 .mc-header__stickyheader { 1477 background-color : @StickyheaderConfiguration.BackgroundColor; 1478 color : @StickyheaderConfiguration.Color; 1479 } 14801481 .mc-header__stickyheader-container { 1482 width : @header__ContainerSize; 1483 justify-content : space-between; 1484 } 14851486 .stickyheader .mc-header__topmenu, 1487 .stickyheader .mc-header__main, 1488 .stickyheader .mc-header__bottom { 1489 display: none; 1490 } 14911492 /*** Mainmenu ***/ 14931494 .mainmenu__label { 1495 font-family: @header_mainmenu__FontFamily; 1496 font-size: @header_mainmenu__FontSize; 1497 font-weight: @header_mainmenu__FontWeight; 1498 text-transform: @header_mainmenu__FontStyle; 1499 } 15001501 .stickyheader .mainmenu__label { 1502 color: @header_stickyheader_color; 1503 } 15041505 .stickyheader .searchbox__form { 1506 height: 100%; 1507 } 15081509 .section--center { 1510 display: flex; 1511 flex-grow: 1; 1512 color: white; 1513 align-items: center; 1514 justify-content: space-around; 1515 } 15161517 .section--center * { 1518 flex-grow: 0; 1519 } 152015211522 .section--right { 1523 display: flex; 1524 flex-grow: 0; 1525 justify-content: center; 1526 align-items: stretch; 1527 } 15281529 .p-filter { 1530 max-width: 250px; 1531 } 15321533 @@media only screen and (min-width: 975px) { 1534 /* styles for browsers larger than 960px; */ 1535 .p-overview__content--is-active { 1536 transform: translateX(250px); 1537 width: calc(100% - 250px); 1538 } 1539 } 15401541 /*** Search ***/ 15421543 .searchbox__input { 1544 color: @header_searchbar__Color !important; 1545 } 15461547 .searchbox__input::-webkit-input-placeholder { /* Edge */ 1548 color: @header_searchbar__Color; 1549 } 15501551 .searchbox__input:-ms-input-placeholder { /* Internet Explorer 10-11 */ 1552 color: @header_searchbar__Color; 1553 } 15541555 .searchbox__input::placeholder { 1556 color: @header_searchbar__Color; 1557 } 15581559 .mc-header .mc-header__topmenu .searchbox .icon__search, 1560 .mc-header .mc-header__main .searchbox .icon__search, 1561 .mc-header .mc-header__topmenu .input.form__input.input--text.searchbox__input, 1562 .mc-header .mc-header__main .input.form__input.input--text.searchbox__input { 1563 background-color: @header_searchbar__BackgroundColor !important; 1564 } 15651566 .searchbox__input { 1567 background-color: @header_searchbar__BackgroundColor !important; 1568 color: @header_searchbar__Color !important; 1569 } 15701571 .searchbox .icon__search { 1572 background-color: @header_searchbar__BackgroundColor; 1573 color: @header_searchbar__Color !important; 1574 } 15751576 .searchbox__wrapper { 1577 display: none; 1578 } 15791580 .searchbox__input { 1581 border: 1px solid #023B7E !important; 1582 height: 50px; 1583 border-radius: 5px; 1584 } 15851586 .searchbox__input:focus { 1587 border-radius: 5px 5px 0 0; 1588 } 15891590 .search-results { 1591 border: 1px solid #023B7E !important; 1592 border-radius: 0 0 5px 5px; 1593 box-shadow: 0 0 0 0; 1594 left: -50%; 1595 right: -50%; 1596 } 15971598 .mc-header__logo { 1599 margin: 0; 1600 } 16011602 .searchbox__form { 1603 height: 50px; 1604 } 16051606 .mc-header__main-menu .searchbox__form__submit { 1607 height: 100%; 1608 color: @header__CustomMenuItemColor; 1609 } 16101611 .searchbox, 1612 .searchbox__wrapper { 1613 display: flex; 1614 height: 100%; 1615 align-items: center; 1616 } 16171618 @if (HeaderConfiguration.SearchbarFullWidth) { 1619 <text> 16201621 .searchbox__form { 1622 width: 100%; 1623 } 16241625 .searchbox { 1626 flex-grow: 1; 1627 max-width: none; 1628 } 16291630 .searchbox__wrapper { 1631 flex-grow: 1; 1632 max-width: @search_bar__max_width; 1633 } 16341635 </text> 1636 } 16371638 @if (HeaderConfiguration.SearchbarFullHeight) { 1639 <text> 16401641 .searchbox__form { 1642 height: 100%; 1643 } 16441645 </text> 1646 } 16471648 /* clears the 'X' from Internet Explorer */ 1649 input[type=search]::-ms-clear { 1650 display: none; 1651 width: 0; 1652 height: 0; 1653 } 16541655 input[type=search]::-ms-reveal { 1656 display: none; 1657 width: 0; 1658 height: 0; 1659 } 16601661 /* clears the 'X' from Chrome */ 1662 input[type="search"]::-webkit-search-decoration, 1663 input[type="search"]::-webkit-search-cancel-button, 1664 input[type="search"]::-webkit-search-results-button, 1665 input[type="search"]::-webkit-search-results-decoration { 1666 display: none; 1667 } 16681669 .form__input { 1670 min-height: unset; 1671 } 16721673 .phone-cta__availability__wrapper { 1674 display: flex; 1675 } 16761677 @if (GeneralConfiguration.HideCallMeBackAvailability) { 1678 <text> 1679 .phone-cta__availability__wrapper { 1680 display: none; 1681 } 1682 </text> 1683 } 16841685 /*** E-commerce ***/ 16861687 .productdetails__add-to-cart { 1688 background-color: @AddToCartButtonBackgroundColor; 1689 } 16901691 @if (HeaderTransparency) { 16921693 <text> 1694 /* .mc-header { 1695 position: absolute; 1696 } 16971698 .backdrop.backdrop--megamenu { 1699 display: none; 1700 } 17011702 .megamenu-wrapper { 1703 top: 200px; 1704 } 17051706 .megamenu-wrapper.stickyheader, 1707 .mc-header.bsve-header.stickyheader { 1708 display: none; 1709 } 17101711 .megamenu__column { 1712 flex-basis: 20%; 1713 justify-content: flex-start; 1714 border-right: 0; 1715 } 17161717 .megamenu__category-header { 1718 background-color: #fff; 1719 border-top: 0; 1720 border-bottom: 0; 1721 font-weight: 700; 1722 color: black; 1723 } 17241725 .mainmenu .mainmenu__link:hover { 1726 background-color: transparent !important; 1727 border-bottom: 4px solid white; 1728 transition: All 0.5s ease-out; 1729 } 17301731 .mainmenu .mainmenu__link { 1732 background-color: transparent !important; 1733 border-bottom: 4px solid transparent; 1734 transition: All 0.5s ease-out; 1735 }*/ 17361737 </text> 1738 } 17391740 </style> 174117421743 @{ 1744 string ItemTypeId = GeneralConfiguration.MasterLayoutConfiguration.HeaderConfiguration.Id; 1745 int HeaderLayoutID = Services.Pages.GetPageForItem("HeaderConfigurationPage", ItemTypeId).ID; 17461747 string RowPlaceholder = HeaderTransparency ? "LayoutTransparent" : "LayoutRegular"; 1748 bool SetHeader = false; 17491750 string maxContainer = HeaderConfiguration.ContainerSize != 0 ? HeaderConfiguration.ContainerSize + "px" : "none"; 1751 } 17521753 <!-- 1754 *************************** 1755 *** BEGIN DESKTOP SETUP *** 1756 *************************** 1757 --> 17581759 @if (cp_productDetail != null && (bool)cp_productDetail) 1760 { 1761 header__stickyheader_display = StickyheaderConfiguration.ProductDetailDisplay; 1762 } 1763 else if (cp_productOverview != null && (bool)cp_productOverview) 1764 { 1765 header__stickyheader_display = StickyheaderConfiguration.ProductOverviewDisplay; 1766 } 1767 else 1768 { 1769 header__stickyheader_display = StickyheaderConfiguration.ContentpageDisplay; 1770 } 17711772 <style> 17731774 .mc-header { 1775 flex-direction: column; 1776 } 17771778 .mc-header--off { 1779 display: none; 1780 } 1781 </style> 17821783 @{ 1784 int FooHeaderLayoutID = 0; 1785 string minWidth = 0 + "px"; 1786 string maxWidth = 0 + "px"; 1787 } 178817891790 @foreach (GridRow g in Services.Grids.GetGridRowsByPageId(HeaderLayoutID)) 1791 { 17921793 //GridRow GriddyRow = Services.Grids.GetGridRowById(g.ID); 1794 Breakpoint _data = ItemManager.Storage.GetById<Breakpoint>(g.ItemId.ToString()); 17951796 minWidth = _data.Device.minWidth != 0 ? " and (min-width: " + _data.Device.minWidth + "px)" : ""; 1797 maxWidth = _data.Device.maxWidth != 0 ? " and (max-width: " + _data.Device.maxWidth + "px)" : ""; 17981799 FooHeaderLayoutID = Services.Pages.GetPageForItem("HeaderLayout", _data.HeaderLayoutConfiguration.Id).ID; 18001801 if (!string.IsNullOrWhiteSpace(_data.HeaderLayoutConfiguration.Id.ToString())) 1802 { 1803 // No Action 1804 } 18051806 if (string.IsNullOrWhiteSpace(minWidth) && string.IsNullOrWhiteSpace(maxWidth)) 1807 { 1808 // No Action 1809 } 18101811 <header class="mc-header header--@g.ItemId.ToString() @PageTypeClass @cssHeaderTransparent"> 1812 <section class="header--@g.ItemId.ToString()__container"> 1813 @RenderGrid(FooHeaderLayoutID, RowPlaceholder) 1814 </section> 1815 <section class="header--@g.ItemId.ToString()__stickyheader-container"> 1816 @RenderGrid(FooHeaderLayoutID, "LayoutStickyheader") 1817 </section> 1818 </header> 18191820 <style> 18211822 .header--@g.ItemId.ToString() { 1823 position: relative; 1824 } 18251826 .header--@g.ItemId.ToString() { 1827 @*max-width: @maxContainer;*@ 18281829 width: 100%; 1830 max-width: @HeaderContainerSize; 1831 margin: 0 auto; 1832 } 18331834 .header--@g.ItemId.ToString() .header--@g.ItemId.ToString()__container { 1835 display: none; 18361837 @if (HeaderTransparency) 1838 { 1839 <text> 1840 position: absolute; 1841 /*transform: translateX(25%);*/ 1842 margin: 0 auto; 1843 </text> 1844 } 1845 else 1846 { 1847 <text> 1848 position: relative; 1849 margin: 0 auto; 1850 </text> 1851 } 1852 } 18531854 .header--@g.ItemId.ToString() .header--@g.ItemId.ToString()__stickyheader-container { 1855 display: none; 1856 } 18571858 @@media screen @minWidth @maxWidth { 18591860 .header--@g.ItemId.ToString() .header--@g.ItemId.ToString()__container { 1861 display: flex; 1862 flex-direction: column; 1863 width: 100%; 1864 } 18651866 .stickyheader.header--@g.ItemId.ToString() .header--@g.ItemId.ToString()__container { 1867 display: none; 1868 } 18691870 .stickyheader.header-- @g.ItemId.ToString() .header-- @g.ItemId.ToString() __container .mc-header__logo-image { 1871 display: flex; 1872 } 18731874 .stickyheader.header--@g.ItemId.ToString() .header--@g.ItemId.ToString()__stickyheader-container { 1875 display: flex; 1876 min-height: 50px; 1877 z-index: 100; 1878 width: 100%; 1879 } 1880 } 18811882 </style> 1883 } 18841885 <!-- 1886 *************************** 1887 **** END DESKTOP SETUP **** 1888 *************************** 1889 --> 18901891 <header class="header header--mobile"> 18921893 <div class="flex items-center"> 1894 <a href="/" class="header__logo__wrapper mr-auto"> 1895 <img class="header__logo" src="@header_mobile__logo" alt="Logo"> 1896 </a> 18971898 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 1899 @using Dynamicweb; 1900 @using System.Web; 1901 @using Dynamicweb.Content; 1902 @using Dynamicweb.Extensibility; 1903 @using Bluedesk.Tools.DynamicWeb.Generic; 19041905 @if (LanguageSwitcher.GetLanguages().Count > 1) 1906 { 1907 <div class="top-toggles"> 1908 <div class="language"> 1909 <div class="language-dropdown"> 1910 <button class="language-dropdown__toggle" type="button" aria-label="Change language"> 1911 <!-- <i class="fal fa-globe"></i> --> 1912 <span class="flag flag-icon flag-icon-@Pageview.Area.Culture.Substring(3, 2).ToLower()"></span> 1913 <i class="fal fa-chevron-down"></i> 1914 </button> 1915 <ul class="language-dropdown__options"> 1916 @foreach (var l in LanguageSwitcher.GetLanguages()) 1917 { 1918 string languageName = @l.NativeName.ToString().Split('(')[0]; 1919 <li class="language-dropdown__item"> 1920 <a href='@l.Url' title="@languageName"> 1921 <span class="flag-icon flag-icon-@l.CountryCode"></span> 1922 <span class="language-dropdown__item-code">@languageName</span> 1923 </a> 1924 </li> 1925 } 1926 </ul> 1927 </div> 1928 </div> 1929 </div> 1930 } 193119321933 @if (enableShoppingCart) 1934 { 1935 <div class="app-shopping-cart" data-cart-location="header-mobile"></div> 1936 } 19371938 <div id="hamburger" class="icon__content"> 1939 <i class="fal fa-bars icon"></i> 1940 </div> 19411942 </div> 19431944 </header> 19451946 <!-- 1947 **************************** 1948 **** END MOBILE SETUP **** 1949 **************************** 1950 --> 1951 <!-- DO NOT REMOVE --> 1952 <div id="quick-order"></div> 1953 <div id="backdrop-megamenu"></div> 1954 <mega-menu id="mega-menu"></mega-menu> 1955 <!-- DO NOT REMOVE --> 195619571958 @*[Include file 'layout/StickymenuNewGrid.cshtml' not found in 'Templates/Designs/WorldEmp_generated/Masterpage/MasterVisualEditor.cshtml']*@ 19591960 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 1961 @using Dynamicweb; 1962 @using Bluedesk.DynamicWeb.ItemTypes; 19631964 @{ 1965 var pid = ModuleOnlyParagraph.GetParagraphIDByTag<ModuleOnlyParagraph>("SideBarForm", Pageview.AreaID); 19661967 if (pid > 0) 1968 { 1969 <section id="vue-side-bar-form" data-paragraphid="@pid" data-telephone="@phonenumber" data-formatphonenumber="@formattedPhonenumber" data-isoffline="@isOffline"></section> 1970 } 1971 } 197219731974 @if (@enableProductCompare) 1975 { 1976 <div id="vue-compare-list"></div> 1977 } 19781979 <style> 1980 main.blur { 1981 filter: grayscale(50%) blur(15px); 1982 -webkit-filter: grayscale(50%) blur(15px); 1983 } 1984 </style> 19851986 @{ 1987 var Home = Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "Home"); 1988 } 19891990 <main> 19911992 @Model.Grid("grid", "Before breadcrumb", "", "AdvancedGrid") 19931994 @if (showBreadcrumbs) 1995 { 1996 <nav class="breadcrumbs" id="breadcrumbs"> 1997 <span class="breadcrumbs__text">@Translate("Breadcrumbs.YouAreHere", "You are here")</span> 1998 @RenderNavigation(new { 1999 StartLevel = 1, 2000 EndLevel = 10, 2001 ParentTag = "breadcrumbs__nav-list dwnavigation", 2002 blockclass = "breadcrumbs", 2003 sitemapmode = "true", 2004 expandmode = "pathonly", 2005 Template = "Breadcrumbs.xslt" 2006 }) 2007 </nav> 20082009 } 20102011 @Model.Grid("grid2", "After breadcrumb", "", "AdvancedGrid") 20122013 </main> 20142015 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 2016 @using Dynamicweb; 2017 @using Bluedesk.DynamicWeb.ItemTypes; 2018 @using Bluedesk.DynamicWeb.ItemTypes.Extensions; 20192020 @{ 2021 string footerLogo = websitesettings.FooterLogo; 2022 string footerDescription = websitesettings.FooterDescription; 20232024 var fb = websitesettings.Facebook; 2025 var twitter = websitesettings.Twitter; 2026 var linkedin = websitesettings.LinkedIn; 2027 var instagram = websitesettings.Instagram; 2028 var youtube = websitesettings.Youtube; 20292030 var companyName = websitesettings.CompanyName; 2031 var Emailadress = websitesettings.Emailadress; 2032 var Phonenumber = websitesettings.Phonenumber; 2033 var Address = websitesettings.Address; 2034 var Zipcode = websitesettings.Zipcode; 2035 var City = websitesettings.City; 2036 var Country = websitesettings.Country; 20372038 var selectedPaymentLogos = websitesettings.FooterPaymentLogos; 20392040 bool footer__newsletter_signup_display = !string.IsNullOrWhiteSpace(mc.FooterConfiguration.NewsLetterSignUpDisplay.ToString()) && mc.FooterConfiguration.NewsLetterSignUpDisplay.ToString() == "True" ? true : false; 2041 bool footer__USP_display = !string.IsNullOrWhiteSpace(mc.FooterConfiguration.UspDisplay.ToString()) && mc.FooterConfiguration.UspDisplay.ToString() == "True" ? true : false; 20422043 string footer__background_color = mc.FooterConfiguration.BackgroundColor?.GetColorCode(Pageview.AreaID) ?? "#000000"; 2044 string footer__color = mc.FooterConfiguration.Color?.GetColorCode(Pageview.AreaID) ?? "#FFFFFF"; 20452046 string footer__top_image = !string.IsNullOrWhiteSpace(mc.FooterConfiguration.TopImage.ToString()) ? mc.FooterConfiguration.TopImage.ToString() : ""; 20472048 } 20492050 <a href="javascript:void(0);" id="scroll-to-top" class="scroll-to-top" aria-label="@Translate("Naar boven", "To Top")"> 2051 <span class="scroll-to-top__text"> 2052 @Translate("Naar boven", "To Top") 2053 </span> 2054 <i class="fal fa-arrow-to-top scroll-to-top__icon"></i> 2055 </a> 20562057 @if (Pageview.Page.ParentPageId > 0) 2058 { 2059 var siblings = Services.Pages.GetPagesByParentID(Pageview.Page.ParentPageId).Where(p => p.Active).ToList(); 2060 var parentpageItemType = Pageview.Page.Parent.ItemType; 2061 bool isParentPageOverviewpage = parentpageItemType == "OverviewPage"; 20622063 if (siblings.Count() > 1 && isParentPageOverviewpage) 2064 { 2065 var prevPage = siblings.OrderByDescending(p => p.Sort).FirstOrDefault(p => p.Sort < Pageview.Page.Sort); 2066 var nextPage = siblings.OrderBy(p => p.Sort).FirstOrDefault(p => p.Sort > Pageview.Page.Sort); 2067 var overview = "/Default.aspx?ID=" + Pageview.Page.ParentPageId; 20682069 <section class="page-navigation"> 2070 @if (prevPage != null) 2071 { 2072 var back = "/Default.aspx?ID=" + prevPage.ID; 2073 <a href="@back" class="page-navigation__item"> 2074 <i class="fal fa-arrow-alt-to-left page-navigation__item--icon"></i> 2075 <label class="page-navigation__item-label">@Translate("pagenavigation.previous", "Previous")</label> 2076 </a> 2077 } 20782079 <a href="@overview" class="page-navigation__item"> 2080 <label class="page-navigation__item-label">@Translate("pagenavigation.Overview", "To overview")</label> 2081 <i class="fas fa-th page-navigation__item--icon"></i> 2082 </a> 20832084 @if (nextPage != null) 2085 { 2086 var forward = "/Default.aspx?ID=" + nextPage.ID; 2087 <a href="@forward" class="page-navigation__item"> 2088 <label class="page-navigation__item-label">@Translate("pagenavigation.next", "Next")</label> 2089 <i class="fal fa-arrow-alt-to-right page-navigation__item--icon"></i> 2090 </a> 2091 } 2092 </section> 2093 } 2094 } 20952096 @* 20972098 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 2099 @using Dynamicweb; 2100 @using Bluedesk.Tools.DynamicWeb.ExtensionMethods; 2101 @using Bluedesk.DynamicWeb.ItemTypes; 21022103 @{ 21042105 if (Pageview.Page.ParentPageId > 0) 2106 { 21072108 // Paging 21092110 var siblings = Services.Pages.GetPagesByParentID(Pageview.Page.ParentPageId).Where(p => p.Active).ToList(); 2111 var currentID = Pageview.Page.ID; 2112 var parentpageItemType = Pageview.Page.Parent.ItemType; 2113 bool isParentPageOverviewpage = parentpageItemType == "OverviewPage"; 211421152116 var siblingsCount = siblings.Count; 21172118 int previousIdx = 0; 2119 int nextIdx = siblingsCount - 1; 2120 int idx = 0; 21212122 for (int i = 0; i < siblingsCount; i++) 2123 { 2124 if (siblings[i].ID == currentID && siblings[i].PropertyItem != null) 2125 { 2126 idx = i; 2127 } 2128 } 21292130 previousIdx = idx == previousIdx ? previousIdx : idx - 1; 2131 nextIdx = idx == nextIdx ? nextIdx : idx + 1; 21322133 var previousID = siblings[previousIdx].ID; 2134 var nextID = siblings[nextIdx].ID; 2135 var overview = "/Default.aspx?ID=" + Pageview.Page.ParentPageId; 21362137 if (siblingsCount > 1) 2138 { 21392140 <section class="page-navigation"> 21412142 @if (!(previousID == currentID || previousID == 0)) 2143 { 2144 var back = "/Default.aspx?ID=" + previousID; 2145 <a href="@back" class="page-navigation__item"> 2146 <i class="fal fa-arrow-alt-to-left page-navigation__item--icon"></i> 2147 <label class="page-navigation__item-label">@Translate("pagenavigation.previous", "Previous")</label> 2148 </a> 2149 } 21502151 <a href="@overview" class="page-navigation__item"> 2152 <label class="page-navigation__item-label">@Translate("pagenavigation.Overview", "To overview")</label> 2153 <i class="fas fa-th page-navigation__item--icon"></i> 2154 </a> 21552156 @if (!(nextID == currentID || nextID == 0)) 2157 { 2158 var forward = "/Default.aspx?ID=" + nextID; 2159 <a href="@forward" class="page-navigation__item"> 2160 <label class="page-navigation__item-label">@Translate("pagenavigation.next", "Next")</label> 2161 <i class="fal fa-arrow-alt-to-right page-navigation__item--icon"></i> 2162 </a> 2163 } 21642165 </section> 21662167 } 21682169 } 2170 else 2171 { 2172 // No action 2173 } 21742175 } 21762177 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2178 @using Dynamicweb; 21792180 @if (Pageview.Page.ParentPageId > 0) 2181 { 2182 var siblings = Services.Pages.GetPagesByParentID(Pageview.Page.ParentPageId).Where(p => p.Active).ToList(); 2183 var parentpageItemType = Pageview.Page.Parent.ItemType; 2184 bool isParentPageOverviewpage = parentpageItemType == "OverviewPage"; 21852186 if (siblings.Count() > 1 && isParentPageOverviewpage) 2187 { 2188 var prevPage = siblings.OrderByDescending(p => p.Sort).FirstOrDefault(p => p.Sort < Pageview.Page.Sort); 2189 var nextPage = siblings.OrderBy(p => p.Sort).FirstOrDefault(p => p.Sort > Pageview.Page.Sort); 2190 var overview = "/Default.aspx?ID=" + Pageview.Page.ParentPageId; 21912192 <section class="page-navigation"> 2193 @if (prevPage != null) 2194 { 2195 var back = "/Default.aspx?ID=" + prevPage.ID; 2196 <a href="@back" class="page-navigation__item"> 2197 <i class="fal fa-arrow-alt-to-left page-navigation__item--icon"></i> 2198 <label class="page-navigation__item-label">@Translate("pagenavigation.previous", "Previous")</label> 2199 </a> 2200 } 22012202 <a href="@overview" class="page-navigation__item"> 2203 <label class="page-navigation__item-label">@Translate("pagenavigation.Overview", "To overview")</label> 2204 <i class="fas fa-th page-navigation__item--icon"></i> 2205 </a> 22062207 @if (nextPage != null) 2208 { 2209 var forward = "/Default.aspx?ID=" + nextPage.ID; 2210 <a href="@forward" class="page-navigation__item"> 2211 <label class="page-navigation__item-label">@Translate("pagenavigation.next", "Next")</label> 2212 <i class="fal fa-arrow-alt-to-right page-navigation__item--icon"></i> 2213 </a> 2214 } 2215 </section> 2216 } 2217 } 22182219 *@ 2220222122222223 @if(!string.IsNullOrWhiteSpace(footer__top_image)) { 2224 <figure class="footer__top-image"> 2225 <img src="@footer__top_image" alt="" /> 2226 </figure> 2227 } 22282229 <footer class="footer" style="--footer-bg-color: @footer__background_color; --footer-color: @footer__color;"> 22302231 @if (footer__USP_display) 2232 { 2233 if (!string.IsNullOrWhiteSpace(websitesettings.USP_1) || !string.IsNullOrWhiteSpace(websitesettings.USP_2) || !string.IsNullOrWhiteSpace(websitesettings.USP_3) || !string.IsNullOrWhiteSpace(websitesettings.USP_4) || !string.IsNullOrWhiteSpace(websitesettings.USP_5)) 2234 { 2235 <div class="footer-usp__wrapper"> 2236 <div class="container"> 2237 <ul class="footer-usp__list flex-wrap"> 2238 @RenderFooterUSP(websitesettings.USP_1, websitesettings.USP_1_icon) 2239 @RenderFooterUSP(websitesettings.USP_2, websitesettings.USP_2_icon) 2240 @RenderFooterUSP(websitesettings.USP_3, websitesettings.USP_3_icon) 2241 @RenderFooterUSP(websitesettings.USP_4, websitesettings.USP_4_icon) 2242 @RenderFooterUSP(websitesettings.USP_5, websitesettings.USP_5_icon) 22432244 </ul> 2245 </div> 2246 </div> 2247 } 2248 } 22492250 @if (footer__newsletter_signup_display) 2251 { 2252 <div> 2253 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 2254 @using Dynamicweb; 22552256 @{ 2257 var newsletterFormID = ModuleOnlyParagraph.GetParagraphIDByTag<ModuleOnlyParagraph>("Footer.Newsletter"); 22582259 if (newsletterFormID > 0) 2260 { 2261 <section class="footer__newsletter-container"> 2262 <div class="container footer__newsletter"> 2263 <label class="footer__newsletter-label"> 2264 @Translate("Footer.SignUpNewsletter", "Sign up for the digital newsletter") 2265 </label> 2266 @RenderParagraphContent(newsletterFormID) 2267 </div> 2268 </section> 2269 } 2270 } 22712272 </div> 2273 } 22742275 @if(!string.IsNullOrWhiteSpace(mc.FooterConfiguration.BackgroundGradient)) 2276 { 2277 <style> 2278 .footer { 2279 @mc.FooterConfiguration.BackgroundGradient; 2280 } 2281 </style> 2282 } 22832284 <section class="container footer__content"> 22852286 <div class="footer__link"> 2287 @{ 2288 var footerColumn1 = RenderNavigation(new 2289 { 2290 id = "footernavigation-1", 2291 cssclass = "dwnavigation", 2292 startLevel = 1, 2293 endlevel = 4, 2294 template = "BottomNavigation.xslt", 2295 expandmode = "all", 2296 parenttag = "footer-column-1", 2297 }); 22982299 if (!string.IsNullOrEmpty(footerColumn1)) 2300 { 2301 <p class="footer__link-header">@Translate("Footer.Column1.Header", "What you need to know")</p> 2302 <ul class="footer__link-list"> 2303 @footerColumn1 2304 </ul> 2305 } 2306 } 2307 </div> 2308 <div class="footer__link"> 2309 @{ 2310 var footerColumn2 = RenderNavigation(new 2311 { 2312 id = "footernavigation-2", 2313 cssclass = "dwnavigation", 2314 startLevel = 1, 2315 endlevel = 4, 2316 template = "BottomNavigation.xslt", 2317 expandmode = "all", 2318 parenttag = "footer-column-2", 2319 }); 23202321 if (!string.IsNullOrEmpty(footerColumn2)) 2322 { 2323 <p class="footer__link-header">@Translate("Footer.Column2.Header", "Category two")</p> 2324 <ul class="footer__link-list"> 2325 @footerColumn2 2326 </ul> 2327 } 2328 } 2329 </div> 2330 <div class="footer__link"> 2331 @{ 2332 var footerColumn3 = RenderNavigation(new 2333 { 2334 id = "footernavigation-3", 2335 cssclass = "dwnavigation", 2336 startLevel = 1, 2337 endlevel = 4, 2338 template = "BottomNavigation.xslt", 2339 expandmode = "all", 2340 parenttag = "footer-column-3", 2341 }); 23422343 if (!string.IsNullOrEmpty(footerColumn3)) 2344 { 2345 <p class="footer__link-header">@Translate("Footer.Column3.Header", "Category three")</p> 2346 <ul class="footer__link-list"> 2347 @footerColumn3 2348 </ul> 2349 } 2350 } 2351 </div> 23522353 @if(!string.IsNullOrWhiteSpace(footerLogo) || !string.IsNullOrWhiteSpace(footerDescription)) 2354 { 2355 <div class="footer__description-container"> 2356 @if(!string.IsNullOrWhiteSpace(footerLogo)) 2357 { 2358 <img class="footer__logo" loading="lazy" src="/Admin/Public/GetImage.ashx?Image=@footerLogo&Crop=5&Format=webp&Quality=99&Compression=80&Width=400" alt="Footer logo" width="400" height="200"/> 2359 } 23602361 @if(!string.IsNullOrWhiteSpace(footerDescription)) 2362 { 2363 <div class="footer__description"> 2364 @footerDescription 2365 </div> 2366 } 2367 </div> 2368 } 23692370 </section> 23712372 <section class="footer__copyright"> 23732374 <div class="container bottombar__container"> 2375 @{ 2376 var copyRightContainer = RenderNavigation(new 2377 { 2378 id = "bottombar__navigation", 2379 cssclass = "dwnavigation", 2380 startLevel = 1, 2381 endlevel = 4, 2382 template = "CleanNavigation.xslt", 2383 expandmode = "all", 2384 parenttag = "bottombar", 2385 blockclass = "bottombar" 2386 }); 23872388 if (!string.IsNullOrEmpty(copyRightContainer)) 2389 { 2390 @copyRightContainer; 2391 } 2392 } 23932394 @if (!string.IsNullOrWhiteSpace(twitter) || !string.IsNullOrWhiteSpace(fb) || !string.IsNullOrWhiteSpace(linkedin) || !string.IsNullOrWhiteSpace(youtube) || !string.IsNullOrWhiteSpace(instagram)) 2395 { 2396 <section class="footer__social-container"> 23972398 <span class="footer__icon-labels">@Translate("Footer.FollowUs", "Volg ons op:")</span> 23992400 <div class="footer__social-icon-container"> 2401 @if (!string.IsNullOrWhiteSpace(twitter)) 2402 { 2403 <a href="@twitter" target="_blank" title="twitter" class="footer__social" rel="noreferrer"><i class="fab fa-twitter"></i></a> 2404 } 2405 @if (!string.IsNullOrWhiteSpace(fb)) 2406 { 2407 <a href="@fb" target="_blank" title="facebook" class="footer__social" rel="noreferrer"><i class="fab fa-facebook-square"></i></a> 2408 } 2409 @if (!string.IsNullOrWhiteSpace(linkedin)) 2410 { 2411 <a href="@linkedin" target="_blank" title="LinkedIn" class="footer__social" rel="noreferrer"><i class="fab fa-linkedin"></i></a> 2412 } 2413 @if (!string.IsNullOrWhiteSpace(youtube)) 2414 { 2415 <a href="@youtube" target="_blank" title="YouTube" class="footer__social" rel="noreferrer"><i class="fab fa-youtube"></i></a> 2416 } 2417 @if (!string.IsNullOrWhiteSpace(instagram)) 2418 { 2419 <a href="@instagram" target="_blank" title="Instagram" class="footer__social" rel="noreferrer"><i class="fab fa-instagram"></i></a> 2420 } 2421 </div> 24222423 </section> 2424 } 2425 </div> 24262427 </section> 24282429 <section class="footer-paymentoptions" data-paymentmethods="@selectedPaymentLogos"></section> 2430 </footer> 24312432 @helper RenderFooterUSP(string USP_content, string USP_icon) 2433 { 2434 if (!string.IsNullOrWhiteSpace(USP_content)) 2435 { 2436 var usp_icon_class = (!string.IsNullOrWhiteSpace(USP_icon)) ? USP_icon : "fal fa-check"; 24372438 <li class="footer-usp__item"> 2439 <i class="@usp_icon_class footer-usp__icon"></i> 2440 <span>@USP_content</span> 2441 </li> 2442 } 2443 } 24442445 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 2446 @using Dynamicweb; 2447 @using Bluedesk.DynamicWeb.ItemTypes; 24482449 <section id="vue-modal"></section> 24502451 <section id="vue-bottom-bar" 2452 data-phonenumber="@formattedPhonenumber" 2453 data-isoffline="@isOffline" 2454 data-emailadress="@emailadress" 2455 data-currentpageid="@Pageview.Page.ID" 2456 data-enable-login="@enableLogin" 2457 data-enable-shoppingcart="@enableShoppingCart" 2458 data-enable-advancedsearch="@enableAdvancedSearch"></section> 24592460 <section class="bottombar__searchbox__wrapper"> 2461 <form class="searchbox__form" method="get" action="/Default.aspx" style="display: flex; flex-grow: 1;"> 2462 <input type="text" name="q" value="@SearchPrefill" class="searchbox__input" placeholder="@SearchPlaceholder" aria-label="Search through site content" data-placeholder="@SearchPlaceholder" data-hoverplaceholder="@SearchPlaceholderHover" style="display: flex; flex-grow: 1;" /> 2463 <div class="searchbox__button"> 2464 <button type="submit" class="searchbox__form__submit icon icon--medium icon__search input__icon" aria-label="Search"> 2465 <i class="fal fa-search"></i> 2466 </button> 2467 </div> 2468 <input type="hidden" name="ID" value="@SearchPageID" /> 2469 </form> 24702471 </section> 24722473 @using Dynamicweb.Rendering 2474 @using Dynamicweb.Security.UserManagement 24752476 @{ 2477 UserImpersonation impersonationMode = User.ImpersonationMode; 2478 User currentUser = Pageview.User; 2479 User secondaryUser = Pageview.User?.CurrentSecondaryUser ?? null; 2480 bool isImpersonating = Pageview.User?.CurrentSecondaryUser != null; 2481 int impersonationPageId = GetPageIdByNavigationTag("CustomerImpersonation"); 24822483 if(isImpersonating && impersonationMode == UserImpersonation.Full) { 2484 currentUser = Pageview.User.CurrentSecondaryUser; 2485 secondaryUser = Pageview.User; 2486 } 2487 } 24882489 @if(currentUser != null && currentUser.GetUsersICanSetAsSecondary().Count > 0) 2490 { 2491 <div class="impersonation"> 2492 <div class="impersonation__header"> 2493 <p class="impersonation__title"> 2494 @Translate("Impersonate.Modal.Title", "Impersonation") 2495 @if (isImpersonating) 2496 { 2497 <span title="On" class="impersonation__indicator"></span> 2498 } 2499 </p> 2500 <i class="fal fa-chevron-up impersonation__header-icon"></i> 2501 </div> 2502 <div class="impersonation__body"> 2503 @if (isImpersonating) 2504 { 2505 <p>@string.Format(Translate("Impersonate.CurrentImpersonation", "You ({0}) are currently impersonating {1}"), string.Format("<strong>{0}</strong>", currentUser.UserName), string.Format("<strong>{0}</strong>", secondaryUser.UserName))</p> 25062507 <form method="post" name="stopImpersonation"> 2508 <input name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" type="hidden"> 2509 <div class="mt-4"> 2510 <button class="btn btn__primary" type="submit"> 2511 <span class="btn__text">@Translate("Impersonate.StopBtn", "Stop impersonation")</span> 2512 <i class="fas fa-ban btn__icon"></i> 2513 </button> 2514 </div> 2515 </form> 2516 } else { 2517 <p>@Translate("Impersonate.Modal.Content", "Take a look at the list of customers you can impersonate.")</p> 2518 <div class="w-full flex mt-2"> 2519 <a href="Default.aspx?ID=@impersonationPageId" class="btn btn__primary"> 2520 <span class="btn__text">@Translate("Impersonate.Modal.ViewList", "View List")</span> 2521 <i class="fal fa-chevron-right btn__icon"></i> 2522 </a> 2523 </div> 2524 } 2525 </div> 2526 </div> 2527 } 25282529 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 2530 @using System; 2531 @using Dynamicweb; 2532 @using Dynamicweb.Ecommerce.CustomerExperienceCenter.Favorites; 25332534 @{ 2535 var favListService = new FavoriteListService(); 2536 IEnumerable<FavoriteList> favoriteLists = Pageview.User != null ? favListService.GetLists(Pageview.User.ID) : null; 2537 int favoritelistsPageId = GetPageIdByNavigationTag("CustomerFavorites"); 2538 } 25392540 @if(favoriteLists != null && Pageview.User != null) 2541 { 2542 <div class="offcanvas__backdrop"></div> 2543 <aside class="offcanvas" data-listcount="@favoriteLists.Count()"> 2544 <header class="offcanvas__header"> 2545 <span class="offcanvas__title">@Translate("OffCanvasMenu.FavoritesTitle", "Add to favorite list")</span> 2546 <button class="offcanvas__close" aria-label="@Translate("OffCanvasMenu.Close", "Close menu")"> 2547 <i class="fal fa-times"></i> 2548 </button> 2549 </header> 2550 <div class="offcanvas__body"> 2551 <p>@Translate("OffCanvasMenu.FavoritesContent", "Select the list you want to add the product to")</p> 2552 <ul class="favorites__list"> 2553 @foreach(FavoriteList list in favoriteLists) { 2554 <li class="favorites__list-item" data-listid="@list.ListId"> 2555 <span class="favorites__list-itemname">@list.Name</span> 2556 <i class="fas fa-plus"></i> 2557 </li> 2558 } 2559 </ul> 2560 </div> 2561 <footer class="offcanvas__footer"> 2562 <a href="/Default.aspx?ID=@favoritelistsPageId" class="btn btn__primary"> 2563 <span class="btn__text">@Translate("OffCanvasMenu.FavoritesManageLists", "Manage lists")</span> 2564 <i class="far fa-chevron-right btn__icon"></i> 2565 </a> 2566 </footer> 2567 </aside> 2568 } 256925702571 <div id="backdrop"></div> 25722573 @{ 2574 var polyfillsjs = Cache.VersionedFile(designRoot + "/dist/polyfills.bundle.js"); 2575 var appbundlejs = Cache.VersionedFile(designRoot + "/dist/app.bundle.js"); 2576 var appAsyncbundlejs = Cache.VersionedFile(designRoot + "/dist/appAsync.bundle.js"); 2577 var vuebundlejs = Cache.VersionedFile(designRoot + "/dist/vue.bundle.js"); 2578 } 25792580 <script src="@polyfillsjs"></script> 2581 <script src="@appbundlejs"></script> 2582 <script defer src="@vuebundlejs"></script> 2583 <script defer src="@appAsyncbundlejs"></script> 25842585 @if (font_configuration != null) 2586 { 2587 foreach (var item in font_configuration.Item.ToCodeFirstItem<Bluedesk.DynamicWeb.ItemTypes.Pages.ConfigurationPagesParent>().GetChildConfigs<FontConfiguration>()) 2588 { 2589 <link href="@item["FontLink"]" rel="stylesheet"> 2590 } 2591 } 25922593 <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-rqn26AG5Pj86AF4SO72RK5fyefcQ/x32DNQfChxWvbXIyXFePlEktwD18fEz+kQU" crossorigin="anonymous"> 25942595 @{ 2596 bool isVisualEditor = Dynamicweb.Context.Current.Request.GetBoolean("visualedit"); 2597 if (isVisualEditor) 2598 { 2599 System.Web.HttpContext.Current.Session["PreviousPage"] = Pageview.Page.ID; 2600 } 2601 bool IsNotContentManager = (Dynamicweb.Security.UserManagement.User.GetCurrentBackendUser()?.Groups?.All(g => g.Name != "Content managers") ?? true); 2602 } 26032604 @if (isVisualEditor && IsNotContentManager) 2605 { 26062607 <style> 2608 body { 2609 background-color: #f1f1f1; 2610 font-family: 'Barlow', sans-serif; 2611 } 26122613 .slidePanel { 2614 position: fixed; 2615 top: 0; 2616 bottom: 0; 2617 min-width: 500px; 2618 box-shadow: -10px 10px 10px rgb(153 153 255 / 10%); 2619 background-color: #FFFFFF; 2620 z-index: 1000; 2621 box-sizing: border-box; 2622 transition: all .5s ease-in; 2623 } 26242625 .slidePanel.open { 2626 right: 0; 2627 } 26282629 .slidePanel { 2630 right: -500px; 2631 transition: all 0.5s ease-in; 2632 } 26332634 .slidePanel__container { 2635 display: flex; 2636 position: relative; 2637 height: 100%; 2638 } 26392640 .togglePanelButton { 2641 position: fixed; 2642 top: 50px; 2643 left: 50px; 2644 display: flex; 2645 justify-content: center; 2646 align-items: center; 2647 color: white; 2648 background-color: black; 2649 padding: 0px 25px; 2650 height: 50px; 2651 cursor: pointer; 2652 z-index: 1000; 2653 } 26542655 .closeButton { 2656 position: absolute; 2657 display: flex; 2658 top: 25px; 2659 right: 25px; 2660 font-size: 2rem; 2661 text-decoration: none; 2662 color: black; 2663 } 26642665 .blur { 2666 filter: blur(4px); 2667 pointer-events: none; 2668 } 26692670 .sideMenu { 2671 display: flex; 2672 position: absolute; 2673 align-items: center; 2674 min-height: 100px; 2675 z-index: 1200; 2676 top: 0; 2677 bottom: 0; 2678 right: 100%; 2679 flex-direction: column; 2680 justify-content: center; 2681 } 26822683 .sideMenu__link:first-child { 2684 margin-top: 10px; 2685 } 26862687 .sideMenu__link { 2688 position: relative; 2689 flex-direction: column; 2690 display: flex; 2691 height: 50px; 2692 width: 50px; 2693 background-color: #f1f1f1; 2694 margin-bottom: 10px; 2695 margin-left: 10px; 2696 margin-right: 10px; 2697 justify-content: space-between; 2698 align-items: center; 2699 font-size: 10px; 2700 padding: 10px; 2701 box-sizing: border-box; 2702 text-decoration: none; 2703 color: rgb(22, 101, 123); 2704 font-size: 24px; 2705 } 27062707 .sideMenu__link label { 2708 font-size: 12px; 2709 } 27102711 .sideMenu__container { 2712 display: flex; 2713 position: relative; 2714 flex-direction: column; 2715 box-shadow: -10px 10px 10px rgb(153 153 255 / 10%); 2716 background-color: white; 2717 } 2718 </style> 27192720 <script> 2721 function toggleClass(ClassName, AddedClassName) { 2722 var element = document.querySelector(ClassName); 2723 if (element.classList.contains(AddedClassName)) { 2724 element.classList.remove(AddedClassName); 2725 } else { 2726 element.classList.add(AddedClassName); 2727 } 2728 } 2729 </script> 27302731 <section class="slidePanel" id="slidePanel"> 27322733 <div class="slidePanel__container"> 27342735 <a href="javasciprt:void(0);" onclick="toggleClass('.slidePanel', 'open'); toggleClass('main', 'blur')" class="closeButton"> 2736 <i class="fal fa-circle-xmark"></i> 2737 </a> 273827392740 <nav class="sideMenu"> 2741 <section class="sideMenu__container"> 2742 <a href="javascript:history.back();" class="sideMenu__link"><i class="fal fa-reply"></i></a> 2743 <a href="/dashboard-configuration" class="sideMenu__link"><i class="fal fa-grid-horizontal"></i></a> 2744 <a href="/button-configuration" class="sideMenu__link"><i class="fal fa-diagram-cells"></i></a> 2745 <a href="/button-configuration" class="sideMenu__link"><i class="fal fa-link"></i></a> 2746 <a href="/background-configuration" class="sideMenu__link"><i class="fal fa-paintbrush"></i></a> 2747 <a href="/jumbotron-configuration" class="sideMenu__link"><i class="fal fa-megaphone"></i></a> 2748 <a href="/theme-configuration-page/theme-01" class="sideMenu__link"><i class="fal fa-brush"></i></a> 2749 <a href="/font-configuration" class="sideMenu__link"><i class="fal fa-font"></i></a> 2750 <a href="/device-manager" class="sideMenu__link"><i class="fal fa-computer"></i></a> 2751 </section> 2752 </nav> 27532754 </div> 27552756 </section> 27572758 <script src="https://kit.fontawesome.com/a46eca85e2.js" crossorigin="anonymous"></script> 27592760 } 27612762 </body> 2763 </html> 2764