Error executing template "Designs/ProNails_generated/_parsed/Workshop.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_f443b276ce5145fd8fde84a02609234a.Execute() in D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\_parsed\Workshop.parsed.cshtml:line 1049
   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 3 @using System; 4 @using System.Web; 5 @using System.Linq; 6 @using System.Data; 7 @using System.Data.SqlClient; 8 @using System.Globalization; 9 @using System.Reflection; 10 11 @using Dynamicweb; 12 @using Dynamicweb.Content.Items; 13 @using Dynamicweb.Environment; 14 @using Dynamicweb.Frontend; 15 @using Dynamicweb.Frontend.Navigation; 16 17 @using Bluedesk.DynamicWeb.ItemTypes; 18 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 19 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 20 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 21 22 @using Bluedesk.Tools.Generic; 23 @using Bluedesk.Tools.DynamicWeb.DataAccess; 24 25 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend; 26 @using ProNails.ItemTypes; 27 28 29 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 30 31 @using System; 32 @using System.Web; 33 @using System.Linq; 34 @using System.Globalization; 35 36 @using Dynamicweb; 37 @using Dynamicweb.Content.Items; 38 @using Dynamicweb.Environment; 39 @using Dynamicweb.Frontend; 40 @using Dynamicweb.Frontend.Navigation; 41 42 @using Bluedesk.Tools.Generic; 43 44 @using Bluedesk.DynamicWeb.ItemTypes; 45 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 46 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 47 48 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 49 50 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 51 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend; 52 53 @{ 54 55 var master_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration"); 56 MasterConfig mc = master_configuration.Item.ToCodeFirstItem<MasterConfig>(); 57 58 bool HideStandardFooter = mc.FooterConfiguration.HideStandardFooter.ToString() == "True" ? true : false; 59 60 string MasterConfigCssClass = !string.IsNullOrWhiteSpace(mc.CssClass) ? mc.CssClass : ""; 61 62 // GeneralConfig GeneralConfiguration = mc.GeneralConfiguration; 63 EcomConfig EcommerceConfiguration = mc.EcomConfiguration; 64 65 bool WithVATBool = Pageview.Area.EcomPricesWithVat == "True"; 66 bool pricesWithoutVatForUsers = EcommerceConfiguration.ShowPricesWithoutVatForUsers; 67 bool pricesWithoutVatForValidVat = EcommerceConfiguration.ShowPricesWithoutVatWhenValidVatNumber; 68 if(pricesWithoutVatForUsers && !pricesWithoutVatForValidVat && Pageview.User != null) { 69 WithVATBool = false; 70 } 71 if(pricesWithoutVatForValidVat && Pageview.User != null && !string.IsNullOrWhiteSpace(Pageview.User.VatRegNumber)) { 72 WithVATBool = false; 73 } 74 string ecomShowPricesWithVat = WithVATBool.ToString().ToLower(); 75 string ecomPricesFormatted = (EcommerceConfiguration.FormattedPrices).ToString().ToLower(); 76 77 bool IsNotContentManager = false; 78 bool isVisualEditor = Pageview.IsVisualEditorMode; 79 80 if (isVisualEditor) 81 { 82 System.Web.HttpContext.Current.Session["PreviousPage"] = Pageview.Page.ID; 83 IsNotContentManager = (Dynamicweb.Security.UserManagement.User.GetCurrentBackendUser()?.Groups?.All(g => g.Name != "Content managers") ?? true); 84 } 85 86 BaseSettingsObj BaseSettings = new BaseSettingsObj(); 87 88 BaseSettings = BaseSettingServices.RenderBaseSettings(Pageview); 89 HttpContext.Current.Session["BaseSettings"] = BaseSettings; 90 91 //if (HttpContext.Current.Session["BaseSettings"] == null) 92 //{ 93 94 //} 95 //else 96 //{ 97 // BaseSettings = (BaseSettingsObj)HttpContext.Current.Session["BaseSettings"]; 98 // if (BaseSettings.AreaID != Pageview.AreaID) 99 // { 100 // BaseSettings = BaseSettingServices.RenderBaseSettings(Pageview); 101 // HttpContext.Current.Session["BaseSettings"] = BaseSettings; 102 // } 103 //} 104 105 BaseSettingsBrandConfiguration BaseSettingsBrandConfiguration = BaseSettings.BrandConfiguration; 106 BaseSettingsButtons BaseSettingsButtons = BaseSettingsBrandConfiguration.Buttons; 107 108 var font_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "FontConfiguration"); 109 110 var httpdomain = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain(); 111 var lang = Pageview.Area.CultureInfo.TwoLetterISOLanguageName; 112 var langName = Pageview.Area.Culture; 113 114 var csrftoken = application._webapi.Helper.CSRFHelper.TokenHeaderValue(); 115 var designRoot = BaseSettings.DesignRoot; 116 117 var phonenumber = BaseSettings.CorporateSettings.Phonenumber; 118 var formattedPhonenumber = phonenumber.Replace(" ", String.Empty); 119 var emailadress = BaseSettings.CorporateSettings.Emailadress; 120 var buttonIconClass = Pageview.Area.Item["Global_button_icon"] != null ? Pageview.Area.Item["Global_button_icon"].ToString().Replace("+", " ") : "fal fa-arrow-right"; 121 var callmebackformlink = BaseSettings.BrandConfiguration.CallMeBackForm; 122 var mobileThemeColor = BaseSettings.BrandConfiguration.MobileThemeColor; 123 124 bool isOffline = false; 125 126 DateTime workingHoursStart = BaseSettings.CorporateSettings.OpeningTime; 127 DateTime workingHoursEnd = BaseSettings.CorporateSettings.ClosingTime; 128 DateTime today = DateTime.Now; 129 var cHour = DateTime.Now.TimeOfDay; 130 int cDay = (int)DateTime.Now.DayOfWeek; 131 string availableToHour24hFormat = workingHoursEnd.TimeOfDay.ToString().Substring(0, 5); 132 var timeFromInput = DateTime.ParseExact(availableToHour24hFormat, "H:m", null, DateTimeStyles.None); 133 string availableToHour12hFormat = timeFromInput.ToString("hh:mm tt", CultureInfo.InvariantCulture); 134 var availableToHour = lang == "en" ? availableToHour12hFormat : availableToHour24hFormat; 135 bool isOvertime = cHour >= workingHoursEnd.TimeOfDay || cHour <= workingHoursStart.TimeOfDay; 136 bool isNoValidDate = today < workingHoursStart || today > workingHoursEnd; 137 if (isNoValidDate || isOvertime) 138 { 139 isOffline = true; 140 } 141 142 Boolean showBreadcrumbs = Pageview.Page.PropertyItem != null && Pageview.Page.PropertyItem["ShowBreadcrumbs"] != null ? Convert.ToBoolean(Pageview.Page.PropertyItem["ShowBreadcrumbs"]) : false; 143 144 var appcss = Cache.VersionedFile(designRoot + "/dist/app.css"); 145 146 var favicon32 = Cache.VersionedFile(designRoot + "/assets/img/favicon-32.png", true); 147 var favicon16 = Cache.VersionedFile(designRoot + "/assets/img/favicon-16.png", true); 148 var favicon = Cache.VersionedFile(designRoot + "/assets/img/favicon.ico", true); 149 150 favicon = !string.IsNullOrWhiteSpace(BaseSettings.BrandConfiguration.Favicons.Favicon) ? BaseSettings.BrandConfiguration.Favicons.Favicon : favicon; 151 favicon16 = !string.IsNullOrWhiteSpace(BaseSettings.BrandConfiguration.Favicons.Favicon16) ? BaseSettings.BrandConfiguration.Favicons.Favicon16 : favicon16; 152 favicon32 = !string.IsNullOrWhiteSpace(BaseSettings.BrandConfiguration.Favicons.Favicon32) ? BaseSettings.BrandConfiguration.Favicons.Favicon32 : favicon32; 153 154 var appbundlejs = Cache.VersionedFile(designRoot + "/dist/app.bundle.js"); 155 var appAsyncbundlejs = Cache.VersionedFile(designRoot + "/dist/appAsync.bundle.js"); 156 var vuebundlejs = Cache.VersionedFile(designRoot + "/dist/vue.bundle.js"); 157 158 //*** Start Scanapp configuration ***\\ 159 bool hideHeader = false; 160 bool hideFooter = false; 161 bool hideBottombar = false; 162 163 if (HttpContext.Current.Session["ScanApp"] != null) 164 { 165 hideHeader = mc.ScanAppConfig.ShowHeader; 166 hideFooter = mc.ScanAppConfig.ShowFooter; 167 hideBottombar = mc.ScanAppConfig.ShowBottombar; 168 } 169 // END Scanapp configration **\\ 170 171 } 172 173 174 @{ 175 // Workshop page added variables 176 var pnColorService = new ColorSwatchService(); 177 Workshop _workshop = ItemManager.Storage.GetById<Workshop>(Pageview.Page.ItemId ?? "0"); 178 ButtonConfiguration _button = ItemManager.Storage.GetById<ButtonConfiguration>(_workshop.ButtonConfigurationID ?? "0"); 179 } 180 181 <!DOCTYPE html> 182 <html lang="@lang" prefix="og: http://ogp.me/ns#"> 183 <head> 184 <meta charset="utf-8"> 185 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 186 <meta name="viewport" content="width=device-width, initial-scale=1"> 187 <meta name="theme-color" content="@mobileThemeColor"> 188 @Model.MetaTags 189 <title>@Model.Title</title> 190 191 @RenderSnippet("canonical") 192 @RenderSnippet("ogTags") 193 194 @{ 195 string urlProtocol = Dynamicweb.Context.Current.Request.Url.Scheme; 196 List<Dynamicweb.Content.Page> pageTranslations = new List<Dynamicweb.Content.Page>(); 197 bool isMasterPage = Pageview.Area.IsMaster; 198 if (isMasterPage) 199 { 200 pageTranslations.Add(Pageview.Page); 201 if (Pageview.Page.Languages != null) 202 { 203 foreach (var language in Pageview.Page.Languages) 204 { 205 if (language.Active) 206 { 207 pageTranslations.Add(language); 208 } 209 } 210 } 211 } 212 else 213 { 214 pageTranslations.Add(Pageview.Page.MasterPage); 215 if (Pageview.Page.MasterPage != null) 216 { 217 if (Pageview.Page.MasterPage.Languages != null) 218 { 219 foreach (var language in Pageview.Page.MasterPage.Languages) 220 { 221 if (language.Active) 222 { 223 pageTranslations.Add(language); 224 } 225 } 226 } 227 } 228 } 229 foreach (var page in pageTranslations) 230 { 231 if (page != null) 232 { 233 string url = $"Default.aspx?ID={page.ID}"; 234 string groupid = Dynamicweb.Context.Current.Request.QueryString.Get("GroupID"); 235 string productid = Dynamicweb.Context.Current.Request.QueryString.Get("ProductID"); 236 string variantid = Dynamicweb.Context.Current.Request.QueryString.Get("VariantID"); 237 if (!string.IsNullOrWhiteSpace(groupid)) 238 { 239 var groupObj = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup(groupid, page.Area.EcomLanguageId); 240 if (groupObj == null) 241 { 242 continue; 243 } 244 url = $"{url}&GroupID={groupid}"; 245 } 246 if (!string.IsNullOrWhiteSpace(productid)) 247 { 248 var productObj = Dynamicweb.Ecommerce.Services.Products.GetProductById(productid, variantid, page.Area.EcomLanguageId);; 249 if (productObj == null) 250 { 251 continue; 252 } 253 url = $"{url}&ProductID={productid}"; 254 if (!string.IsNullOrWhiteSpace(variantid)) 255 { 256 url = $"{url}&VariantID={variantid}"; 257 } 258 } 259 260 string currentdomain = Context.Current.Request.Url.DnsSafeHost; 261 if (!string.IsNullOrEmpty(page.Area.DomainLock)) { 262 currentdomain = page.Area.DomainLock; 263 } 264 string friendlyUrl = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(url); 265 string href = $"{urlProtocol}://{currentdomain}{friendlyUrl}"; 266 string hreflang = page.Area.CultureInfo.Name.ToLower(); 267 <link rel="alternate" href="@href" hreflang="@hreflang" /> 268 } 269 } 270 } 271 272 273 <link rel="preconnect" href="https://fonts.googleapis.com"> 274 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> 275 <link href="@appcss" rel="stylesheet" type="text/css" /> 276 277 @{ 278 if (!string.IsNullOrWhiteSpace(favicon32)) 279 { 280 <link rel="icon" type="image/png" sizes="32x32" href="@favicon32"> 281 } 282 if (!string.IsNullOrWhiteSpace(favicon16)) 283 { 284 <link rel="icon" type="image/png" sizes="16x16" href="@favicon16"> 285 } 286 if (!string.IsNullOrWhiteSpace(favicon)) 287 { 288 <link rel="shortcut icon" href="@favicon"> 289 } 290 } 291 292 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 293 @using System; 294 @using System.Web; 295 @using System.Linq; 296 @using System.Globalization; 297 298 @using Dynamicweb; 299 @using Dynamicweb.Content.Items; 300 @using Dynamicweb.Environment; 301 @using Dynamicweb.Frontend; 302 @using Dynamicweb.Frontend.Navigation; 303 304 @using Bluedesk.Tools.Generic; 305 306 @using Bluedesk.DynamicWeb.ItemTypes; 307 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 308 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 309 310 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 311 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 312 @using Bluedesk.DynamicWeb.ItemTypes.Extensions; 313 314 @helper RenderCSSKeyAndValue(string Key, string Value) 315 { 316 if (!string.IsNullOrWhiteSpace(Value)) 317 { 318 <text>@Key : @Value !important;</text> 319 } 320 } 321 322 @helper SetFontCSSVariables(FontConfigurationItemTab FontConfiguration) 323 { 324 325 string Top = FontConfiguration.top != 0 ? FontConfiguration.top.ToString() + "px" : ""; 326 string Left = FontConfiguration.left != 0 ? FontConfiguration.left.ToString() + "px" : ""; 327 string Right = FontConfiguration.right != 0 ? FontConfiguration.right.ToString() + "px" : ""; 328 string Bottom = FontConfiguration.bottom != 0 ? FontConfiguration.bottom.ToString() + "px" : ""; 329 330 string Position = FontConfiguration.PositionAbsolute ? "absolute" : "relative"; 331 332 string Color = FontConfiguration.Color?.GetColorCode(Pageview.AreaID) ?? ""; 333 string BackgroundColor = FontConfiguration.Backgroundcolor?.GetColorCode(Pageview.AreaID) ?? ""; 334 335 string BorderColor = FontConfiguration.BorderColor?.GetColorCode(Pageview.AreaID) ?? ""; 336 string BorderSize = FontConfiguration.BorderSize != 0 ? FontConfiguration.BorderSize.ToString() + "px" : ""; 337 338 <text> 339 340 --Position: @Position; 341 342 @RenderCSSKeyAndValue("--Padding", FontConfiguration.Padding) 343 344 @RenderCSSKeyAndValue("--Top", Top) 345 @RenderCSSKeyAndValue("--Left", Left) 346 @RenderCSSKeyAndValue("--Right", Right) 347 @RenderCSSKeyAndValue("--Bottom", Bottom) 348 349 @RenderCSSKeyAndValue("--Color", Color) 350 @RenderCSSKeyAndValue("--FontSize", FontConfiguration.FontSize) 351 @RenderCSSKeyAndValue("--FontStyle", FontConfiguration.FontStyle) 352 353 @RenderCSSKeyAndValue("--FontWeight", FontConfiguration.FontWeight) 354 @RenderCSSKeyAndValue("--FontFamily", FontConfiguration.FontConfiguration.FontFamily) 355 @RenderCSSKeyAndValue("--LineHeight", FontConfiguration.LineHeight) 356 357 @RenderCSSKeyAndValue("--BackgroundColor", BackgroundColor) 358 @RenderCSSKeyAndValue("--BorderColor", BorderColor) 359 @RenderCSSKeyAndValue("--BorderSize", BorderSize) 360 361 </text> 362 363 } 364 365 366 <script> 367 window.globals = { 368 pageId: '@Pageview.ID', 369 Token: '@csrftoken', 370 DW_AREA_CULTURE: '@langName', 371 DW_AREA_CULTURE_SHORT: '@lang', 372 globalIconClass: '@buttonIconClass', 373 DW_USERID: '@Dynamicweb.Security.UserManagement.User.GetCurrentExtranetUserId()', 374 DW_SHOW_PRICES_WITH_VAT: @ecomShowPricesWithVat, 375 DW_PRICES_FORMATTED: @ecomPricesFormatted 376 }; 377 </script> 378 379 @BaseSettings.System.HeadScript 380 381 @{ 382 var _cookieOptinLevel = Dynamicweb.Environment.CookieManager.GetCookieOptInLevel(); 383 var _enabledCookieCategories = Dynamicweb.Environment.CookieManager.GetCookieOptInCategories(); 384 if (_cookieOptinLevel.ToString() == "All" || _enabledCookieCategories.Contains("Marketing_Cookies")) 385 { 386 @BaseSettings.System.HeadScriptAfterConsent; 387 } 388 } 389 390 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend; 391 @{ 392 393 var reviewName = BaseSettings.Review.Review_Name != null ? BaseSettings.Review.Review_Name : ""; 394 var reviewBestRating = BaseSettings.Review.Review_Best_Rating != null ? BaseSettings.Review.Review_Best_Rating : ""; 395 var reviewWorstRating = BaseSettings.Review.Review_Worst_Rating != null ? BaseSettings.Review.Review_Worst_Rating : ""; 396 var reviewRatingValue = BaseSettings.Review.Review_Rating_Value != null ? BaseSettings.Review.Review_Rating_Value : ""; 397 var reviewCount = BaseSettings.Review.Review_Count != null ? BaseSettings.Review.Review_Count : ""; 398 var reviewUrl = BaseSettings.Review.Review_URL != null ? BaseSettings.Review.Review_URL : ""; 399 400 var searchPageID = Bluedesk.Tools.DynamicWeb.Generic.PageHelper.GetPageIDByNavigationTag("searchresults", Pageview.AreaID); 401 var domain = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain(); 402 } 403 404 <script type="application/ld+json"> 405 [{ 406 "@@context": "https://schema.org", 407 "@@type": "Organization", 408 "name" : "@BaseSettings.CorporateSettings.CompanyName", 409 "url": "@domain", 410 "sameAs" : "@BaseSettings.SocialMedia.Facebook", 411 "logo": "@domain@BaseSettings.BrandConfiguration.Logos.Logo", 412 "contactPoint" : [{ 413 "@@type" : "ContactPoint", 414 "telephone" : "@BaseSettings.CorporateSettings.Phonenumber", 415 "contactType" : "customer service" , 416 "@@context": "https://schema.org", 417 "@@id": "@domain", 418 "name": "@BaseSettings.CorporateSettings.CompanyName" 419 }], 420 "address": { 421 "@@type": "PostalAddress", 422 "streetAddress": "@BaseSettings.CorporateSettings.Address", 423 "addressLocality": "@BaseSettings.CorporateSettings.City", 424 "postalCode": "@BaseSettings.CorporateSettings.Zipcode", 425 "addressRegion": "@BaseSettings.CorporateSettings.Region", 426 "addressCountry": "@BaseSettings.CorporateSettings.Country" 427 } 428 }, 429 { 430 "@@context": "https://schema.org", 431 "@@type": "WebSite", 432 "name" : "@BaseSettings.CorporateSettings.CompanyName", 433 "alternateName" : "@BaseSettings.CorporateSettings.AltCompanyName", 434 "url": "@domain", 435 "potentialAction": { 436 "@@type": "SearchAction", 437 "target": "@domain/Default.aspx?ID=@searchPageID&q={search_term_string}", 438 "query-input": "required name=search_term_string" 439 } 440 }] 441 </script> 442 443 <script type="application/ld+json"> 444 { 445 "@@context": "https://schema.org", 446 "@@type": "Product", 447 "name": "@reviewName", 448 "url":"@reviewUrl", 449 "aggregateRating": { 450 "@@type": "AggregateRating", 451 "bestRating": "@reviewBestRating", 452 "worstRating": "@reviewWorstRating", 453 "ratingValue": "@reviewRatingValue", 454 "reviewCount": "@reviewCount" 455 } 456 } 457 </script> 458 459 460 @RenderSnippet("DataLayer") 461 @RenderSnippet("GoogleMapsScript") 462 463 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend; 464 465 @{ 466 467 // TODO: Add there options to master config for product overview 468 bool hidePricesForGuests = false; 469 bool hideShoppingCartForGuests = false; 470 471 bool enableShoppingCart = hideShoppingCartForGuests && Pageview.User == null ? false : BaseSettings.Features.ConfigModuleShoppingCart; 472 bool enableLogin = BaseSettings.Features.ConfigModuleLogin; 473 bool enableQuickOrder = BaseSettings.Features.ConfigModuleQuickOrder; 474 bool enableAdvancedSearch = BaseSettings.Features.ConfigModuleAdvancedSearch; 475 bool enableCallMeBack = BaseSettings.Features.ConfigModuleCallMeBack; 476 bool enableDyslexicFont = BaseSettings.Features.ConfigModuleDyslexicFont; 477 bool enableProductCompare = BaseSettings.Features.ConfigModuleProductCompare; 478 } 479 480 481 <style> 482 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 483 @using Dynamicweb; 484 485 @using System.Data; 486 @using System.Data.SqlClient; 487 @using Bluedesk.Tools.DynamicWeb.DataAccess; 488 489 @using Bluedesk.DynamicWeb.ItemTypes; 490 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 491 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 492 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 493 494 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend; 495 496 @Title("Configuration page template") 497 498 @{ 499 500 string RoundedCornersValue = BaseSettings.BrandConfiguration.RoundedCorners; 501 string ButtonHeight = BaseSettings.BrandConfiguration.ButtonHeight; 502 503 string fontawesomeFontFamily = "Font Awesome 5 Pro"; 504 int fontawesomeFontWeight = 300; 505 506 switch (BaseSettings.BrandConfiguration.FontawesomeStyle) 507 { 508 509 case "fal": 510 fontawesomeFontWeight = 300; 511 break; 512 case "far": 513 fontawesomeFontWeight = 400; 514 break; 515 case "fas": 516 fontawesomeFontWeight = 900; 517 break; 518 case "fad": 519 fontawesomeFontWeight = 900; 520 fontawesomeFontFamily = "Font Awesome 5 Duotone"; 521 break; 522 } 523 524 } 525 526 @BaseSettingServices.RenderButtonCSS("btn__primary", BaseSettingsButtons.PrimaryButtonConfiguration) 527 @BaseSettingServices.RenderButtonCSS("btn__secondary", BaseSettingsButtons.SecondaryButtonConfiguration) 528 @BaseSettingServices.RenderButtonCSS("btn__contrast", BaseSettingsButtons.ContrastButtonConfiguration) 529 530 :root, 531 body { 532 533 --BaseColorPrimary : @BaseSettingsBrandConfiguration.BaseColorPrimary; 534 --BaseColorSecondary : @BaseSettingsBrandConfiguration.BaseColorSecondary; 535 --BaseColorContrast : @BaseSettingsBrandConfiguration.BaseColorContrast; 536 537 --BaseFontPrimary : @BaseSettingsBrandConfiguration.PrimaryFontFamily; 538 --BaseFontSecondary : @BaseSettingsBrandConfiguration.PrimaryFontFamily; 539 540 @BaseSettings.BrandConfiguration.BodyInlineStyles 541 --StandardUnitSize : 3.2rem; 542 } 543 544 .footer { 545 --FooterContainerDisplay: none !important; 546 display: var(--FooterContainerDisplay) 547 } 548 549 h1, h2, h3, h4, h5, h6 { @BaseSettings.BrandConfiguration.HeaderInlineStyles } 550 551 h1.cta-paragraph__header { @BaseSettings.BrandConfiguration.H1InlineStyles } 552 h2.cta-paragraph__header { @BaseSettings.BrandConfiguration.H2InlineStyles } 553 h3.cta-paragraph__header { @BaseSettings.BrandConfiguration.H3InlineStyles } 554 h4.cta-paragraph__header { @BaseSettings.BrandConfiguration.H4InlineStyles } 555 556 .po-block__addtocart .btn, 557 .productdetails__add-to-cart, 558 .searchbox__input { 559 border-radius: @RoundedCornersValue; 560 } 561 562 main.blur { 563 filter: grayscale(50%) blur(15px); 564 -webkit-filter: grayscale(50%) blur(15px); 565 } 566 567 .AdvancedGridButton { 568 --BorderRadius: @RoundedCornersValue; 569 } 570 571 .btn { 572 height: var(--StandardUnitSize); 573 } 574 575 .btn__icon { 576 577 --fontawesomeFontFamily : "@fontawesomeFontFamily"; 578 --fontawesomeFontWeight : @fontawesomeFontWeight; 579 580 font-family: var(--fontawesomeFontFamily); 581 font-weight: var(--fontawesomeFontWeight); 582 583 -moz-osx-font-smoothing: grayscale; 584 -webkit-font-smoothing: antialiased; 585 display: inline-block; 586 font-style: normal; 587 font-variant: normal; 588 text-rendering: auto; 589 line-height: 1; 590 591 } 592 593 .cta-paragraph { 594 background-color: var(--mainBackgroundColor); 595 } 596 597 .cta-paragraph__container { 598 background-color: var(--contentBackgroundColor); 599 border: var(--contentBorder); 600 } 601 602 .cta-paragraph__subheader, 603 .cta-paragraph__header, 604 .cta-paragraph__text p, 605 .cta-paragraph__text li { 606 color: var(--Color); 607 background-color: var(--BackgroundColor); 608 border-color: var(--BorderColor); 609 position: var(--Position); 610 top: var(--Top); 611 left: var(--Left); 612 right: var(--Right); 613 bottom: var(--Bottom); 614 padding: var(--Padding); 615 border: var(--BorderSize); 616 font-size: var(--FontSize); 617 text-transform: var(--FontStyle); 618 line-height: var(--LineHeight); 619 font-weight: var(--FontWeight); 620 font-family: var(--FontFamily); 621 border-radius: var(--BorderRadius); 622 } 623 624 .cta-paragraph__content-container { 625 align-items: var(--ContentElementAlignmentAlignItems); 626 text-align: var(--ContentElementAlignmentTextAlign); 627 } 628 629 .cta-paragraph__btn-navigation, 630 .cta-paragraph__content-container { 631 align-items : var(--ContainerFitContentAlignmentAlignItems); 632 justify-content: var(--ContainerFitContentAlignmentJustifyContent); 633 } 634 635 .jumbotron__subheader, 636 .jumbotron__header, 637 .jumbotron__shoutbox-intro p, 638 .jumbotron__shoutbox-intro li, 639 .header--desktop.headerNew { 640 position: relative; 641 } 642 643 .header--desktop.headerNew.stickyheader { 644 position: fixed; 645 } 646 647 @@media screen and (min-width: 992px){ 648 .image-left { 649 justify-content: flex-end; 650 flex-direction: row; 651 } 652 653 .image-right { 654 justify-content: flex-start; 655 flex-direction: row-reverse; 656 } 657 } 658 659 .AdvancedGrid__row { 660 background-color: var(--BackgroundColor); 661 } 662 663 .cta-paragraph__btn-navigation { 664 padding: 1.2rem 0rem !important; 665 } 666 667 .AdvancedGrid, 668 .AdvancedGrid__container { 669 width: 100%; 670 background-image: var(--BackgroundImage); 671 min-height: var(--Height); 672 } 673 674 @{ 675 676 int PageViewId = Pageview.Page.ID; 677 int AreaId = Pageview.AreaID; 678 679 // HttpContext.Current.Session["PageIdForStyles"] = Pageview.Page.ID; 680 // HttpContext.Current.Session["AreaIdForStyles"] = Pageview.AreaID; 681 682 DataTable AdvancedGridStylesDataTable = null; 683 684 AdvancedGridStylesDataTable = DynamicwebData.Query($@" 685 686 SELECT 687 InlineStyles AS Styles 688 689 FROM 690 [dbo].[ItemType_AdvancedGridConfiguration] AS AGC 691 LEFT JOIN [dbo].[GridRow] AS GR ON GR.GridRowItemId = AGC.Id 692 693 WHERE 694 GR.GridRowPageId = @PageId; 695 696 ", new SqlParameter("PageId", PageViewId)); 697 698 DataTable BackgroundConfigDataTable = null; 699 700 BackgroundConfigDataTable = DynamicwebData.Query($@" 701 702 SELECT 703 distinct(BG.Stylesheet) AS Styles 704 705 FROM [dbo].GridRow AS GR 706 INNER JOIN dbo.Paragraph AS PG ON PG.ParagraphGridRowId = GR.GridRowId 707 LEFT JOIN dbo.ItemType_CTAParagraph AS CTA ON CTA.Id = PG.ParagraphItemId 708 LEFT JOIN dbo.ItemType_MultiColumnParagraph AS MCP ON MCP.Id = PG.ParagraphItemId 709 LEFT JOIN dbo.ItemType_Carousel AS CS ON CS.Id = PG.ParagraphItemId 710 LEFT JOIN dbo.ItemType_BackgroundConfiguration AS BG ON CTA.BackgroundConfigurationID = BG.Id 711 OR MCP.BackgroundConfigurationID = BG.Id 712 OR CS.BackgroundConfigurationID = BG.Id 713 714 WHERE GR.GridRowPageID=@PageId 715 AND bg.Stylesheet Is NOT NULL", new SqlParameter("PageId", PageViewId)); 716 717 DataTable ButtonConfigDataTable = null; 718 719 ButtonConfigDataTable = DynamicwebData.Query($@" 720 721 SELECT 722 distinct(BCONF.Stylesheet) AS Styles 723 724 FROM [dbo].GridRow AS GR 725 LEFT JOIN [dbo].Paragraph AS P ON P.ParagraphGridRowId = GR.GridRowId 726 LEFT JOIN [dbo].ItemType_CTAParagraph AS CTAP ON CTAP.Id = P.ParagraphItemId 727 728 LEFT JOIN [dbo].ItemType_MultiColumnParagraph AS MCP ON MCP.Id = P.ParagraphItemId 729 LEFT JOIN [dbo].[ItemList] AS ColumnIL ON ColumnIL.ItemListId = MCP.ParagraphListID 730 LEFT JOIN [dbo].[ItemListRelation] AS ColumnILR ON ColumnIL.ItemListId = ColumnILR.ItemListRelationItemListId 731 LEFT JOIN [dbo].[ItemType_ParagraphColumn] AS PC ON PC.Id = ColumnILR.ItemListRelationItemId 732 733 LEFT JOIN [dbo].ItemType_Carousel AS CS ON CS.Id = P.ParagraphItemId 734 LEFT JOIN [dbo].[ItemList] AS CIIL ON CIIL.ItemListId = CS.CarouselListID 735 LEFT JOIN [dbo].[ItemListRelation] AS CIILR ON CIIL.ItemListId = CIILR.ItemListRelationItemListId 736 LEFT JOIN [dbo].ItemType_CarouselItem AS CI ON CI.Id = CIILR.ItemListRelationItemId 737 738 LEFT JOIN [dbo].[ItemType_JumbotronContainer] AS JC ON JC.Id = P.ParagraphItemId 739 LEFT JOIN [dbo].[ItemList] AS JCIL ON JCIL.ItemListId = JC.JumbotronListID 740 LEFT JOIN [dbo].[ItemListRelation] AS JCILR ON JCIL.ItemListId = JCILR.ItemListRelationItemListId 741 LEFT JOIN [dbo].ItemType_JumbotronListItem AS JCLI ON JCLI.Id = JCILR.ItemListRelationItemId 742 743 LEFT JOIN [dbo].[ItemType_CTAButton] AS CTAB ON 744 CTAP.ButtonID = CTAB.Id 745 OR CTAP.ExtraButtonID = CTAB.Id 746 OR MCP.ButtonID = CTAB.Id 747 OR PC.ButtonID = CTAB.Id 748 OR PC.ExtraButtonID = CTAB.Id 749 OR CS.ButtonID = CTAB.Id 750 OR CI.ButtonID = CTAB.Id 751 OR CI.ExtraButtonID = CTAB.Id 752 OR JCLI.ButtonID = CTAB.Id 753 LEFT JOIN [dbo].[ItemType_ButtonConfiguration] AS BCONF ON CTAB.ButtonConfigurationID = BCONF.Id 754 755 WHERE 756 GR.GridRowPageID = @PageId 757 AND GR.GridRowActive = 1 758 AND CTAB.ButtonConfigurationID Is NOT NULL", new SqlParameter("PageId", PageViewId)); 759 760 DataTable MasterConfigDataTable = null; 761 762 MasterConfigDataTable = DynamicwebData.Query($@" 763 764 SELECT 765 MC.CustomCSS 766 767 FROM 768 [dbo].[Page] AS P 769 INNER JOIN [dbo].[ItemType_MasterConfig] AS MC ON P.PageItemId = MC.Id 770 771 WHERE 772 p.PageItemType = 'MasterConfig' 773 AND PageAreaId = @AreaId;", new SqlParameter("AreaId", AreaId)); 774 775 if (AdvancedGridStylesDataTable != null && AdvancedGridStylesDataTable.Rows.Count > 0) 776 { 777 for (int i = 0; i < AdvancedGridStylesDataTable.Rows.Count; i++) 778 { 779 @AdvancedGridStylesDataTable.Rows[i]["Styles"].ToString(); 780 } 781 } 782 783 if (BackgroundConfigDataTable != null && BackgroundConfigDataTable.Rows.Count > 0) 784 { 785 for (int i = 0; i < BackgroundConfigDataTable.Rows.Count; i++) 786 { 787 @BackgroundConfigDataTable.Rows[i]["Styles"].ToString().Replace("--Color: ;", ""); 788 } 789 } 790 791 if (ButtonConfigDataTable != null && ButtonConfigDataTable.Rows.Count > 0) 792 { 793 for (int i = 0; i < ButtonConfigDataTable.Rows.Count; i++) 794 { 795 @ButtonConfigDataTable.Rows[i]["Styles"].ToString(); 796 } 797 } 798 799 @MasterConfigDataTable.Rows[0]["CustomCSS"].ToString(); 800 } 801 802 </style> 803 804 </head> 805 806 <body class="@MasterConfigCssClass workshoppage"> 807 808 @BaseSettings.System.BodyScript 809 810 @{ 811 if (_cookieOptinLevel.ToString() == "All" || _enabledCookieCategories.Contains("Marketing_Cookies")) 812 { 813 @BaseSettings.System.BodyScriptAfterConsent; 814 } 815 } 816 817 @BaseSettings.System.TailScript 818 819 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 820 821 @using System.Linq; 822 @using System.Data; 823 824 @using Dynamicweb; 825 @using Dynamicweb.Content; 826 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend; 827 828 @{ 829 830 DataTable DataTableObj = AdvancedGridServices.GetHeaderGridDataTable(Pageview.AreaID, Pageview.Page.ID); 831 832 WrapperObj Header = AdvancedGridServices.RenderWrapper(DataTableObj, "header", "header", Pageview.AreaID, Pageview.Page.ID); 833 WrapperObj Footer = AdvancedGridServices.RenderWrapper(DataTableObj, "footer", "footer", Pageview.AreaID, Pageview.Page.ID); 834 835 // var homepage = Dynamicweb.Services.Pages.GetRootPagesForArea(Pageview.AreaID).FirstOrDefault(p => p.ItemType == "HomePage" && p.Active) ?? Dynamicweb.Services.Pages.GetFirstPageForArea(Pageview.AreaID); 836 837 MasterLayoutPageObj MasterLayoutPageObj = MasterLayoutControllers.RenderMasterLayoutPageObj(Pageview); 838 839 bool userLoggedIn = false; 840 if (enableLogin) { userLoggedIn = Pageview.User == null ? false : true; } 841 842 string HeaderContainerSize = mc.HeaderConfiguration.ContainerSize != 0 ? mc.HeaderConfiguration.ContainerSize + "px" : "auto"; 843 844 } 845 846 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 847 @using Dynamicweb; 848 @using Dynamicweb.Content.Items; 849 850 <script> 851 852 function setImagesSizes(Classname) { 853 var Images = document.querySelectorAll(Classname); 854 for (var index = 0; index < Images.length; index++) { 855 if (!Images[index].hasAttribute("height")) { 856 Images[index].setAttribute("height", Images[index].offsetHeight); 857 } 858 if (!Images[index].hasAttribute("width")) { 859 Images[index].setAttribute("width", Images[index].offsetWidth); 860 } 861 } 862 } 863 864 window.addEventListener('load', function () { 865 setImagesSizes("img"); 866 setImagesSizes(".mc-header__logo-image"); 867 }); 868 869 </script> 870 871 872 @if (!hideHeader) 873 { 874 <header>@MasterLayoutPageObj.Header</header> 875 876 <!-- DO NOT REMOVE --> 877 <div id="quick-order"></div> 878 <div id="backdrop-megamenu"></div> 879 <mega-menu id="mega-menu"></mega-menu> 880 <!-- DO NOT REMOVE --> 881 } 882 883 @if (isVisualEditor && IsNotContentManager) 884 { 885 @AdvancedGridServices.RenderVisualEditorNavigation(DataTableObj, "header") 886 } 887 888 <style>@MasterLayoutPageObj.CSS</style> 889 890 <style> 891 892 893 .visual-editor__navigation { 894 position: absolute; 895 top: 10px; 896 left: 10px; 897 display: flex; 898 flex-direction: row; 899 z-index: 100000000; 900 } 901 902 .visual-editor__button { 903 height: 50px; 904 min-width: 150px; 905 right: auto; 906 left: auto; 907 background-color: white; 908 box-shadow: -10px 10px 10px rgb(28 28 84 / 25%); 909 display: flex; 910 justify-content: center; 911 align-items: center; 912 padding: 25px; 913 margin-right: 25px; 914 } 915 916 .visual-editor__button-icon { 917 margin-right: 25px; 918 } 919 920 .header { 921 --HeaderContainerDisplay: none; 922 } 923 924 .header__container { 925 padding: 0; 926 } 927 928 .header__container, .header__stickyheader-container { 929 max-width: none; 930 } 931 932 .header .AdvancedGrid__container { 933 max-width: @HeaderContainerSize; 934 margin: 0 auto; 935 } 936 937 .header .AdvancedGrid__column { 938 background-color: var(--BackgroundColor); 939 flex-grow: var(--FlexGrow); 940 } 941 942 .AdvancedGrid__row { 943 align-items: center; 944 } 945 </style> 946 947 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 948 @using Dynamicweb; 949 @using Bluedesk.DynamicWeb.ItemTypes; 950 951 @{ 952 var pid = ModuleOnlyParagraph.GetParagraphIDByTag<ModuleOnlyParagraph>("SideBarForm", Pageview.AreaID); 953 954 if (pid > 0) 955 { 956 <section id="vue-side-bar-form" data-paragraphid="@pid" data-telephone="@phonenumber" data-formatphonenumber="@formattedPhonenumber" data-isoffline="@isOffline"></section> 957 } 958 } 959 960 961 @if (@enableProductCompare) 962 { 963 <div id="vue-compare-list"></div> 964 } 965 966 <main> 967 968 @Model.Grid("grid", "Before content", "", "AdvancedGrid") 969 970 @if (showBreadcrumbs) 971 { 972 var navigationSettings = new NavigationSettings(); 973 navigationSettings.ExpandMode = ExpandMode.PathOnly; 974 navigationSettings.StartLevel = 1; 975 navigationSettings.StopLevel = 99; 976 navigationSettings.Parameters.Add("PageTitle", Model.Title); 977 navigationSettings.IncludeFoldersAndHidden = true; 978 979 @Navigation.RenderNavigation("Navigation/Breadcrumbs.cshtml", navigationSettings) 980 981 } 982 983 @{ 984 string introBackgroundColor = _workshop.IntroBackgroundColor != null ? _workshop.IntroBackgroundColor.ToString() : ""; 985 introBackgroundColor = !introBackgroundColor.Contains("#") ? pnColorService.GetHexColor(Pageview.AreaID, introBackgroundColor) : introBackgroundColor; 986 } 987 <section class="workshoppage__intro" style="--introbgcolor: @introBackgroundColor"> 988 <div class="container workshoppage__row"> 989 <div class="workshoppage__description"> 990 @if(!string.IsNullOrWhiteSpace(_workshop.SubTitle)) 991 { 992 <p class="workshoppage__subheader">@_workshop.SubTitle</p> 993 } 994 <h1 class="workshoppage__header">@_workshop.Name</h1> 995 @if(!string.IsNullOrWhiteSpace(_workshop.Description)) 996 { 997 <div> 998 @_workshop.Description 999 </div> 1000 } 1001 @if(_button != null && !string.IsNullOrWhiteSpace(_workshop.ButtonText)) { 1002 @RenderAcademyButton(_button, _workshop.ButtonLink, _button.ButtonClass, _workshop.ButtonText, "", false, "fa-chevron-right", "workshoppage__signupbtn", "", "") 1003 } 1004 </div> 1005 <div class="workshoppage__image w-full md:w-33p"> 1006 @if(!string.IsNullOrWhiteSpace(_workshop.Image)) { 1007 string imgUrl = "/Admin/Public/GetImage.ashx?Image=" + _workshop.Image + "&Crop=5&Format=webp&Quality=90&Compression=80&Width=500&Height=500"; 1008 <figure class=""> 1009 <img src="@imgUrl" alt="@_workshop.Name"> 1010 </figure> 1011 } 1012 </div> 1013 </div> 1014 </section> 1015 1016 <div class="container workshoppage__row"> 1017 @if(!string.IsNullOrWhiteSpace(_workshop.TopicsTitle)) { 1018 <h2>@_workshop.TopicsTitle</h2> 1019 } 1020 <ol class="workshoppage__learngrid"> 1021 @foreach(WorkshopTopic _topic in _workshop.Topics()) { 1022 string topicBackgroundColor = _workshop.TopicsBackgroundColor != null ? _workshop.TopicsBackgroundColor.ToString() : ""; 1023 topicBackgroundColor = !topicBackgroundColor.Contains("#") ? pnColorService.GetHexColor(Pageview.AreaID, topicBackgroundColor) : topicBackgroundColor; 1024 1025 if(!string.IsNullOrWhiteSpace(_topic.BackgroundColor) && _topic.BackgroundColor != "transparent") { 1026 string blockBackgroundColor = _topic.BackgroundColor != null ? _topic.BackgroundColor.ToString() : ""; 1027 topicBackgroundColor = !blockBackgroundColor.Contains("#") ? pnColorService.GetHexColor(Pageview.AreaID, blockBackgroundColor) : blockBackgroundColor; 1028 } 1029 <li style="--topic-bg-color: @topicBackgroundColor"> 1030 <h3>@_topic.Name</h3> 1031 <p>@_topic.Description</p> 1032 </li> 1033 } 1034 </ol> 1035 </div> 1036 1037 @Model.Grid("grid2", "Between content", "", "AdvancedGrid") 1038 1039 <section class="container workshoppage__row"> 1040 <div class="workshoppage__locations"> 1041 <h2>@Translate("WorkshopDetail.LocationsTitle", "Locations")</h2> 1042 @foreach(WorkshopCourse _location in _workshop.Locations().OrderBy(p => p.Location()?.Name)) { 1043 1044 IEnumerable<WorkshopTime> workshopTimes = _location.Times().Where(t => DateTime.Now.CompareTo(t.WorkshopStartDateTime) < 0).OrderBy(t => t.WorkshopStartDateTime); 1045 1046 if(workshopTimes.Any()) 1047 { 1048 <ul class="mb-4"> 1049 <li><h4>@_location.Location().Name</h4></li> 1050 <li> 1051 <ul class="workshoppage__dates"> 1052 @foreach(WorkshopTime _time in workshopTimes) 1053 { 1054 string formattedTime = _time.WorkshopStartDateTime.ToString("d MMMM yyyy - HH:mm", Pageview.Area.CultureInfo) + "-" + _time.WorkshopEndDateTime.ToString("HH:mm", CultureInfo.InvariantCulture); 1055 <li> 1056 <p>@formattedTime</p> 1057 @if(_time.ExtraTimes().Any()) 1058 { 1059 <span class="workshoppage__datesseperator">&</span> 1060 <ul class="workshoppage__extradates"> 1061 @foreach(WorkshopDay _extratime in _time.ExtraTimes().OrderBy(t => t.WorkshopStartDateTime)) 1062 { 1063 string formattedExtraTime = _extratime.WorkshopStartDateTime.ToString("d MMMM - HH:mm", Pageview.Area.CultureInfo) + "-" + _extratime.WorkshopEndDateTime.ToString("HH:mm", CultureInfo.InvariantCulture); 1064 <li> 1065 <p>@formattedExtraTime</p> 1066 </li> 1067 } 1068 </ul> 1069 } 1070 </li> 1071 } 1072 </ul> 1073 </li> 1074 </ul> 1075 } 1076 } 1077 1078 @if(_workshop.LocationsInfo != null && !string.IsNullOrWhiteSpace(_workshop.LocationsInfo)) 1079 { 1080 <p>@_workshop.LocationsInfo</p> 1081 } 1082 1083 <h2 class="mt-6">@Translate("WorkshopDetail.PriceTitle", "Price")</h2> 1084 1085 <p>@_workshop.Price</p> 1086 1087 @if(_workshop.PriceInfo != null && !string.IsNullOrWhiteSpace(_workshop.PriceInfo)) 1088 { 1089 <p>@_workshop.PriceInfo</p> 1090 } 1091 </div> 1092 <div id="signup" class="workshoppage__form"> 1093 @Model.Grid("grid3", "Signup form", "", "AdvancedGrid") 1094 </div> 1095 </section> 1096 1097 @Model.Grid("grid4", "After content", "", "AdvancedGrid") 1098 1099 </main> 1100 1101 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 1102 @using Dynamicweb; 1103 @using Bluedesk.DynamicWeb.ItemTypes; 1104 @using Bluedesk.DynamicWeb.ItemTypes.Extensions; 1105 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend; 1106 1107 @{ 1108 1109 string footerLogo = BaseSettings.BrandConfiguration.Logos.FooterLogo; 1110 string footerDescription = BaseSettings.CorporateSettings.FooterDescription; 1111 1112 var fb = BaseSettings.SocialMedia.Facebook; 1113 var twitter = BaseSettings.SocialMedia.Twitter; 1114 var linkedin = BaseSettings.SocialMedia.LinkedIn; 1115 var instagram = BaseSettings.SocialMedia.Instagram; 1116 var youtube = BaseSettings.SocialMedia.Youtube; 1117 var pinterest = BaseSettings.SocialMedia.Pinterest ?? ""; 1118 1119 var companyName = BaseSettings.CorporateSettings.CompanyName; 1120 var Emailadress = BaseSettings.CorporateSettings.Emailadress; 1121 var Phonenumber = BaseSettings.CorporateSettings.Phonenumber; 1122 var Address = BaseSettings.CorporateSettings.Address; 1123 var Zipcode = BaseSettings.CorporateSettings.Zipcode; 1124 var City = BaseSettings.CorporateSettings.City; 1125 var Country = BaseSettings.CorporateSettings.Country; 1126 1127 var selectedPaymentLogos = BaseSettings.BrandConfiguration.Logos.FooterPaymentLogos; 1128 1129 bool footer__newsletter_signup_display = !string.IsNullOrWhiteSpace(mc.FooterConfiguration.NewsLetterSignUpDisplay.ToString()) && mc.FooterConfiguration.NewsLetterSignUpDisplay.ToString() == "True" ? true : false; 1130 bool footer__USP_display = !string.IsNullOrWhiteSpace(mc.FooterConfiguration.UspDisplay.ToString()) && mc.FooterConfiguration.UspDisplay.ToString() == "True" ? true : false; 1131 1132 string footer__background_color = mc.FooterConfiguration.BackgroundColor?.GetColorCode(Pageview.AreaID) ?? "#000000"; 1133 string footer__color = mc.FooterConfiguration.Color?.GetColorCode(Pageview.AreaID) ?? "#FFFFFF"; 1134 1135 string footer__top_image = !string.IsNullOrWhiteSpace(mc.FooterConfiguration.TopImage.ToString()) ? mc.FooterConfiguration.TopImage.ToString() : ""; 1136 1137 1138 1139 } 1140 1141 <div id="scroll-to-top" class="scroll-to-top" aria-label="@Translate("Naar boven", "To Top")"> 1142 <span class="scroll-to-top__text"> 1143 @Translate("Naar boven", "To Top") 1144 </span> 1145 <i class="fal fa-arrow-to-top scroll-to-top__icon"></i> 1146 </div> 1147 1148 @if (Pageview.Page.ParentPageId > 0) 1149 { 1150 var siblings = Dynamicweb.Services.Pages.GetPagesByParentID(Pageview.Page.ParentPageId).Where(p => p.Active).ToList(); 1151 var parentpageItemType = Pageview.Page.Parent.ItemType; 1152 bool isParentPageOverviewpage = parentpageItemType == "OverviewPage"; 1153 1154 if (siblings.Count() > 1 && isParentPageOverviewpage) 1155 { 1156 var prevPage = siblings.OrderByDescending(p => p.Sort).FirstOrDefault(p => p.Sort < Pageview.Page.Sort); 1157 var nextPage = siblings.OrderBy(p => p.Sort).FirstOrDefault(p => p.Sort > Pageview.Page.Sort); 1158 var overview = "/Default.aspx?ID=" + Pageview.Page.ParentPageId; 1159 1160 <section class="page-navigation"> 1161 @if (prevPage != null) 1162 { 1163 var back = "/Default.aspx?ID=" + prevPage.ID; 1164 <a href="@back" class="page-navigation__item"> 1165 <i class="fal fa-arrow-alt-to-left page-navigation__item--icon"></i> 1166 <label class="page-navigation__item-label">@Translate("pagenavigation.previous", "Previous")</label> 1167 </a> 1168 } 1169 1170 <a href="@overview" class="page-navigation__item"> 1171 <label class="page-navigation__item-label">@Translate("pagenavigation.Overview", "To overview")</label> 1172 <i class="fas fa-th page-navigation__item--icon"></i> 1173 </a> 1174 1175 @if (nextPage != null) 1176 { 1177 var forward = "/Default.aspx?ID=" + nextPage.ID; 1178 <a href="@forward" class="page-navigation__item"> 1179 <label class="page-navigation__item-label">@Translate("pagenavigation.next", "Next")</label> 1180 <i class="fal fa-arrow-alt-to-right page-navigation__item--icon"></i> 1181 </a> 1182 } 1183 </section> 1184 } 1185 } 1186 1187 @* 1188 1189 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 1190 @using Dynamicweb; 1191 @using Bluedesk.Tools.DynamicWeb.ExtensionMethods; 1192 @using Bluedesk.DynamicWeb.ItemTypes; 1193 1194 @{ 1195 1196 if (Pageview.Page.ParentPageId > 0) 1197 { 1198 1199 // Paging 1200 1201 var siblings = Dynamicweb.Services.Pages.GetPagesByParentID(Pageview.Page.ParentPageId).Where(p => p.Active).ToList(); 1202 var currentID = Pageview.Page.ID; 1203 var parentpageItemType = Pageview.Page.Parent.ItemType; 1204 bool isParentPageOverviewpage = parentpageItemType == "OverviewPage"; 1205 1206 1207 var siblingsCount = siblings.Count; 1208 1209 int previousIdx = 0; 1210 int nextIdx = siblingsCount - 1; 1211 int idx = 0; 1212 1213 for (int i = 0; i < siblingsCount; i++) 1214 { 1215 if (siblings[i].ID == currentID && siblings[i].PropertyItem != null) 1216 { 1217 idx = i; 1218 } 1219 } 1220 1221 previousIdx = idx == previousIdx ? previousIdx : idx - 1; 1222 nextIdx = idx == nextIdx ? nextIdx : idx + 1; 1223 1224 var previousID = siblings[previousIdx].ID; 1225 var nextID = siblings[nextIdx].ID; 1226 var overview = "/Default.aspx?ID=" + Pageview.Page.ParentPageId; 1227 1228 if (siblingsCount > 1) 1229 { 1230 1231 <section class="page-navigation"> 1232 1233 @if (!(previousID == currentID || previousID == 0)) 1234 { 1235 var back = "/Default.aspx?ID=" + previousID; 1236 <a href="@back" class="page-navigation__item"> 1237 <i class="fal fa-arrow-alt-to-left page-navigation__item--icon"></i> 1238 <label class="page-navigation__item-label">@Translate("pagenavigation.previous", "Previous")</label> 1239 </a> 1240 } 1241 1242 <a href="@overview" class="page-navigation__item"> 1243 <label class="page-navigation__item-label">@Translate("pagenavigation.Overview", "To overview")</label> 1244 <i class="fas fa-th page-navigation__item--icon"></i> 1245 </a> 1246 1247 @if (!(nextID == currentID || nextID == 0)) 1248 { 1249 var forward = "/Default.aspx?ID=" + nextID; 1250 <a href="@forward" class="page-navigation__item"> 1251 <label class="page-navigation__item-label">@Translate("pagenavigation.next", "Next")</label> 1252 <i class="fal fa-arrow-alt-to-right page-navigation__item--icon"></i> 1253 </a> 1254 } 1255 1256 </section> 1257 1258 } 1259 1260 } 1261 else 1262 { 1263 // No action 1264 } 1265 1266 } 1267 1268 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 1269 @using Dynamicweb; 1270 1271 @if (Pageview.Page.ParentPageId > 0) 1272 { 1273 var siblings = Dynamicweb.Services.Pages.GetPagesByParentID(Pageview.Page.ParentPageId).Where(p => p.Active).ToList(); 1274 var parentpageItemType = Pageview.Page.Parent.ItemType; 1275 bool isParentPageOverviewpage = parentpageItemType == "OverviewPage"; 1276 1277 if (siblings.Count() > 1 && isParentPageOverviewpage) 1278 { 1279 var prevPage = siblings.OrderByDescending(p => p.Sort).FirstOrDefault(p => p.Sort < Pageview.Page.Sort); 1280 var nextPage = siblings.OrderBy(p => p.Sort).FirstOrDefault(p => p.Sort > Pageview.Page.Sort); 1281 var overview = "/Default.aspx?ID=" + Pageview.Page.ParentPageId; 1282 1283 <section class="page-navigation"> 1284 @if (prevPage != null) 1285 { 1286 var back = "/Default.aspx?ID=" + prevPage.ID; 1287 <a href="@back" class="page-navigation__item"> 1288 <i class="fal fa-arrow-alt-to-left page-navigation__item--icon"></i> 1289 <label class="page-navigation__item-label">@Translate("pagenavigation.previous", "Previous")</label> 1290 </a> 1291 } 1292 1293 <a href="@overview" class="page-navigation__item"> 1294 <label class="page-navigation__item-label">@Translate("pagenavigation.Overview", "To overview")</label> 1295 <i class="fas fa-th page-navigation__item--icon"></i> 1296 </a> 1297 1298 @if (nextPage != null) 1299 { 1300 var forward = "/Default.aspx?ID=" + nextPage.ID; 1301 <a href="@forward" class="page-navigation__item"> 1302 <label class="page-navigation__item-label">@Translate("pagenavigation.next", "Next")</label> 1303 <i class="fal fa-arrow-alt-to-right page-navigation__item--icon"></i> 1304 </a> 1305 } 1306 </section> 1307 } 1308 } 1309 1310 *@ 1311 1312 1313 1314 @if (!hideFooter) 1315 { 1316 <footer>@MasterLayoutPageObj.Footer</footer> 1317 } 1318 1319 @if (isVisualEditor && IsNotContentManager) 1320 { 1321 <nav class="footer-layout"> 1322 @AdvancedGridServices.RenderVisualEditorNavigation(DataTableObj, "footer") 1323 </nav> 1324 1325 <style> 1326 .footer-layout { 1327 position: absolute; 1328 bottom: 25px; 1329 } 1330 </style> 1331 } 1332 1333 @if (!string.IsNullOrWhiteSpace(footer__top_image) && HideStandardFooter == false) 1334 { 1335 <figure class="footer__top-image"> 1336 <img src="@footer__top_image" alt="" /> 1337 </figure> 1338 } 1339 1340 @if (HideStandardFooter == false || !hideFooter) 1341 { 1342 1343 <footer class="footer" style="--footer-bg-color: @footer__background_color; --footer-color: @footer__color;"> 1344 1345 @if (footer__USP_display) 1346 { 1347 if (!string.IsNullOrWhiteSpace(BaseSettings.USP.USP_1) || !string.IsNullOrWhiteSpace(BaseSettings.USP.USP_2) || !string.IsNullOrWhiteSpace(BaseSettings.USP.USP_3) || !string.IsNullOrWhiteSpace(BaseSettings.USP.USP_4) || !string.IsNullOrWhiteSpace(BaseSettings.USP.USP_5)) 1348 { 1349 <div class="footer-usp__wrapper"> 1350 <div class="container"> 1351 <ul class="footer-usp__list flex-wrap"> 1352 @RenderFooterUSP(BaseSettings.USP.USP_1, BaseSettings.USP.USP_1_icon) 1353 @RenderFooterUSP(BaseSettings.USP.USP_2, BaseSettings.USP.USP_2_icon) 1354 @RenderFooterUSP(BaseSettings.USP.USP_3, BaseSettings.USP.USP_3_icon) 1355 @RenderFooterUSP(BaseSettings.USP.USP_4, BaseSettings.USP.USP_4_icon) 1356 @RenderFooterUSP(BaseSettings.USP.USP_5, BaseSettings.USP.USP_5_icon) 1357 1358 </ul> 1359 </div> 1360 </div> 1361 } 1362 } 1363 1364 @if (footer__newsletter_signup_display) 1365 { 1366 <div> 1367 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 1368 @using Dynamicweb; 1369 1370 @{ 1371 var newsletterFormID = ModuleOnlyParagraph.GetParagraphIDByTag<ModuleOnlyParagraph>("Footer.Newsletter", Pageview.AreaID); 1372 1373 if (newsletterFormID > 0) 1374 { 1375 <section class="footer__newsletter-container"> 1376 <div class="container footer__newsletter"> 1377 <label class="footer__newsletter-label"> 1378 @Translate("Footer.SignUpNewsletter", "Sign up for the digital newsletter") 1379 </label> 1380 @RenderParagraphContent(newsletterFormID) 1381 </div> 1382 </section> 1383 } 1384 } 1385 1386 </div> 1387 } 1388 1389 @if (!string.IsNullOrWhiteSpace(mc.FooterConfiguration.BackgroundGradient)) 1390 { 1391 <style> 1392 .footer { 1393 @mc.FooterConfiguration.BackgroundGradient; 1394 } 1395 </style> 1396 } 1397 1398 <section class="container footer__content"> 1399 1400 <div class="footer__link"> 1401 @{ 1402 var footerColumnOneNavigationSettings = new NavigationSettings(); 1403 footerColumnOneNavigationSettings.ExpandMode = ExpandMode.All; 1404 footerColumnOneNavigationSettings.StartLevel = 1; 1405 footerColumnOneNavigationSettings.StopLevel = 4; 1406 footerColumnOneNavigationSettings.RootNavigationTag = "footer-column-1"; 1407 var footerColumnOneNavigation = Navigation.RenderNavigation("Navigation/BottomNavigation.cshtml", footerColumnOneNavigationSettings); 1408 1409 if (!string.IsNullOrEmpty(footerColumnOneNavigation)) 1410 { 1411 <p class="footer__link-header">@Translate("Footer.Column1.Header", "What you need to know")</p> 1412 @footerColumnOneNavigation 1413 } 1414 } 1415 </div> 1416 <div class="footer__link"> 1417 @{ 1418 var footerColumnTwoNavigationSettings = new NavigationSettings(); 1419 footerColumnTwoNavigationSettings.ExpandMode = ExpandMode.All; 1420 footerColumnTwoNavigationSettings.StartLevel = 1; 1421 footerColumnTwoNavigationSettings.StopLevel = 4; 1422 footerColumnTwoNavigationSettings.RootNavigationTag = "footer-column-2"; 1423 var footerColumnTwoNavigation = Navigation.RenderNavigation("Navigation/BottomNavigation.cshtml", footerColumnTwoNavigationSettings); 1424 1425 if (!string.IsNullOrEmpty(footerColumnTwoNavigation)) 1426 { 1427 <p class="footer__link-header">@Translate("Footer.Column2.Header", "Category two")</p> 1428 @footerColumnTwoNavigation 1429 } 1430 } 1431 </div> 1432 <div class="footer__link"> 1433 @{ 1434 var footerColumnThreeNavigationSettings = new NavigationSettings(); 1435 footerColumnThreeNavigationSettings.ExpandMode = ExpandMode.All; 1436 footerColumnThreeNavigationSettings.StartLevel = 1; 1437 footerColumnThreeNavigationSettings.StopLevel = 4; 1438 footerColumnThreeNavigationSettings.RootNavigationTag = "footer-column-3"; 1439 var footerColumnThreeNavigation = Navigation.RenderNavigation("Navigation/BottomNavigation.cshtml", footerColumnThreeNavigationSettings); 1440 1441 if (!string.IsNullOrEmpty(footerColumnThreeNavigation)) 1442 { 1443 <p class="footer__link-header">@Translate("Footer.Column3.Header", "Category three")</p> 1444 @footerColumnThreeNavigation 1445 } 1446 } 1447 </div> 1448 1449 @if (!string.IsNullOrWhiteSpace(footerLogo) || !string.IsNullOrWhiteSpace(footerDescription)) 1450 { 1451 <div class="footer__description-container"> 1452 @if (!string.IsNullOrWhiteSpace(footerLogo)) 1453 { 1454 <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" /> 1455 } 1456 1457 @if (!string.IsNullOrWhiteSpace(footerDescription)) 1458 { 1459 <div class="footer__description"> 1460 @footerDescription 1461 </div> 1462 } 1463 </div> 1464 } 1465 1466 </section> 1467 1468 <section class="footer__copyright"> 1469 1470 <div class="container bottombar__container"> 1471 @{ 1472 var copyRightMenuNavigationSettings = new NavigationSettings(); 1473 copyRightMenuNavigationSettings.ExpandMode = ExpandMode.All; 1474 copyRightMenuNavigationSettings.StartLevel = 1; 1475 copyRightMenuNavigationSettings.StopLevel = 4; 1476 copyRightMenuNavigationSettings.RootNavigationTag = "bottombar"; 1477 var copyRightMenuNavigation = Navigation.RenderNavigation("Navigation/CleanNavigation.cshtml", copyRightMenuNavigationSettings); 1478 1479 if (!string.IsNullOrEmpty(copyRightMenuNavigation)) 1480 { 1481 @copyRightMenuNavigation; 1482 } 1483 } 1484 1485 @if (!string.IsNullOrWhiteSpace(twitter) || !string.IsNullOrWhiteSpace(fb) || !string.IsNullOrWhiteSpace(linkedin) || !string.IsNullOrWhiteSpace(youtube) || !string.IsNullOrWhiteSpace(instagram) || !string.IsNullOrWhiteSpace(pinterest)) 1486 { 1487 <section class="footer__social-container"> 1488 1489 <span class="footer__icon-labels">@Translate("Footer.FollowUs", "Volg ons op:")</span> 1490 1491 <div class="footer__social-icon-container"> 1492 @if (!string.IsNullOrWhiteSpace(twitter)) 1493 { 1494 <a href="@twitter" target="_blank" title="twitter" class="footer__social" rel="noreferrer"><i class="fab fa-twitter"></i></a> 1495 } 1496 @if (!string.IsNullOrWhiteSpace(fb)) 1497 { 1498 <a href="@fb" target="_blank" title="facebook" class="footer__social" rel="noreferrer"><i class="fab fa-facebook-square"></i></a> 1499 } 1500 @if (!string.IsNullOrWhiteSpace(linkedin)) 1501 { 1502 <a href="@linkedin" target="_blank" title="LinkedIn" class="footer__social" rel="noreferrer"><i class="fab fa-linkedin"></i></a> 1503 } 1504 @if (!string.IsNullOrWhiteSpace(youtube)) 1505 { 1506 <a href="@youtube" target="_blank" title="YouTube" class="footer__social" rel="noreferrer"><i class="fab fa-youtube"></i></a> 1507 } 1508 @if (!string.IsNullOrWhiteSpace(instagram)) 1509 { 1510 <a href="@instagram" target="_blank" title="Instagram" class="footer__social" rel="noreferrer"><i class="fab fa-instagram"></i></a> 1511 } 1512 @if (!string.IsNullOrWhiteSpace(pinterest)) 1513 { 1514 <a href="@pinterest" target="_blank" title="Pinterest" class="footer__social" rel="noreferrer"><i class="fab fa-pinterest"></i></a> 1515 } 1516 </div> 1517 1518 </section> 1519 } 1520 </div> 1521 1522 </section> 1523 1524 <section class="footer-paymentoptions" data-paymentmethods="@selectedPaymentLogos"></section> 1525 </footer> 1526 1527 } 1528 1529 @helper RenderFooterUSP(string USP_content, string USP_icon) 1530 { 1531 if (!string.IsNullOrWhiteSpace(USP_content)) 1532 { 1533 var usp_icon_class = (!string.IsNullOrWhiteSpace(USP_icon)) ? USP_icon : "fal fa-check"; 1534 1535 <li class="footer-usp__item"> 1536 <i class="@usp_icon_class footer-usp__icon"></i> 1537 <span>@USP_content</span> 1538 </li> 1539 } 1540 } 1541 1542 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 1543 @using Dynamicweb; 1544 @using Dynamicweb.Content.Items; 1545 @using Bluedesk.DynamicWeb.ItemTypes; 1546 1547 @{ 1548 var colorService = new ColorSwatchService(); 1549 bool displayPrices = mc.EcomConfiguration.HidePricesForGuests ? Pageview.User != null : true; 1550 string ShowZeroPrices = (!mc.EcomConfiguration.HideZeroPrices).ToString().ToLower(); 1551 1552 var homepage = Dynamicweb.Services.Pages.GetRootPagesForArea(Pageview.AreaID).FirstOrDefault(p => p.ItemType == "HomePage" && p.Active) ?? Dynamicweb.Services.Pages.GetFirstPageForArea(Pageview.AreaID); 1553 1554 var bottomBarItemsList = new List<object>(); 1555 foreach (var _item in mc.FooterConfiguration.BottombarItemList) 1556 { 1557 string title = _item.Title; 1558 string link = _item.TargetLink; 1559 1560 if (_item.Type == "login" && Pageview.User != null) 1561 { 1562 title = @Translate("Bottombar.Logout", "Logout"); 1563 link = $"/Admin/Public/ExtranetLogoff.aspx?ID={homepage.ID}"; 1564 } 1565 1566 var newItem = new 1567 { 1568 title = title, 1569 icon = _item.Icon, 1570 link = link, 1571 subtitle = _item.Title, 1572 type = _item.Type, 1573 visible = true 1574 }; 1575 bottomBarItemsList.Add(newItem); 1576 } 1577 var allBottomBarItems = bottomBarItemsList.ToArray(); 1578 string bottomBarItemsJson = Newtonsoft.Json.JsonConvert.SerializeObject(allBottomBarItems).Replace("\"", "\'"); 1579 1580 string BottombarBackgroundColor = mc.FooterConfiguration.BottombarBackgroundColor; 1581 if (!string.IsNullOrWhiteSpace(BottombarBackgroundColor)) 1582 { 1583 BottombarBackgroundColor = !BottombarBackgroundColor.Contains("#") ? colorService.GetHexColor(Pageview.AreaID, BottombarBackgroundColor) : BottombarBackgroundColor; 1584 } 1585 1586 string BottombarTextColor = mc.FooterConfiguration.BottombarTextColor; 1587 if (!string.IsNullOrWhiteSpace(BottombarTextColor)) 1588 { 1589 BottombarTextColor = !BottombarTextColor.Contains("#") ? colorService.GetHexColor(Pageview.AreaID, BottombarTextColor) : BottombarTextColor; 1590 } 1591 1592 string BottombarIconColor = mc.FooterConfiguration.BottombarIconColor; 1593 if (!string.IsNullOrWhiteSpace(BottombarIconColor)) 1594 { 1595 BottombarIconColor = !BottombarIconColor.Contains("#") ? colorService.GetHexColor(Pageview.AreaID, BottombarIconColor) : BottombarIconColor; 1596 } 1597 } 1598 1599 <style> 1600 .bottombar { 1601 background-color: @BottombarBackgroundColor; 1602 } 1603 .bottombar__button span { 1604 color: @BottombarTextColor; 1605 } 1606 .bottombar__button [class^=fa], 1607 .bottombar__button [class^=svg-] { 1608 color: @BottombarIconColor; 1609 } 1610 </style> 1611 1612 <section id="vue-modal" 1613 data-show-prices="@displayPrices.ToString().ToLower()" 1614 data-show-zero-prices="@ShowZeroPrices"> 1615 </section> 1616 1617 @if (!hideBottombar) 1618 { 1619 <section id="vue-bottom-bar" 1620 data-items="@bottomBarItemsJson" 1621 data-phonenumber="@formattedPhonenumber" 1622 data-isoffline="@isOffline" 1623 data-emailadress="@emailadress" 1624 data-currentpageid="@homepage.ID" 1625 data-enable-login="@enableLogin" 1626 data-enable-shoppingcart="@enableShoppingCart" 1627 data-enable-advancedsearch="@enableAdvancedSearch"> 1628 </section> 1629 } 1630 1631 @{ 1632 int SearchPageID = Bluedesk.Tools.DynamicWeb.Generic.PageHelper.GetPageIDByNavigationTag("searchresults", Pageview.AreaID); 1633 var SearchPlaceholder = Translate("Searchbox.PlaceholderValue", "Search..."); 1634 var SearchPlaceholderHover = Translate("Search.PlaceholderValue2", "Zoekt u misschien een ...?"); 1635 var SearchPrefill = Dynamicweb.Context.Current.Request["q"]; 1636 var SearchboxClass = !string.IsNullOrWhiteSpace(SearchPrefill) ? "open" : ""; 1637 var SearchtoggleClass = !string.IsNullOrWhiteSpace(SearchPrefill) ? "close" : ""; 1638 } 1639 1640 <section class="bottombar__searchbox__wrapper"> 1641 <form class="searchbox__form" method="get" action="/Default.aspx" style="display: flex; flex-grow: 1;"> 1642 <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;" /> 1643 <div class="searchbox__button"> 1644 <button type="submit" class="searchbox__form__submit icon icon--medium icon__search input__icon" aria-label="Search"> 1645 <i class="fal fa-search"></i> 1646 </button> 1647 </div> 1648 <input type="hidden" name="ID" value="@SearchPageID" /> 1649 </form> 1650 1651 </section> 1652 1653 @using Dynamicweb.Rendering 1654 @using Dynamicweb.Security.UserManagement 1655 1656 @{ 1657 UserImpersonation impersonationMode = User.ImpersonationMode; 1658 User currentUser = Pageview.User; 1659 User secondaryUser = Pageview.User?.CurrentSecondaryUser ?? null; 1660 bool isImpersonating = Pageview.User?.CurrentSecondaryUser != null; 1661 int impersonationPageId = GetPageIdByNavigationTag("CustomerImpersonation"); 1662 1663 if(isImpersonating && impersonationMode == UserImpersonation.Full) { 1664 currentUser = Pageview.User.CurrentSecondaryUser; 1665 secondaryUser = Pageview.User; 1666 } 1667 } 1668 1669 @if(currentUser != null && currentUser.GetUsersICanSetAsSecondary().Count > 0) 1670 { 1671 <div class="impersonation"> 1672 <div class="impersonation__header"> 1673 <p class="impersonation__title"> 1674 @Translate("Impersonate.Modal.Title", "Impersonation") 1675 @if (isImpersonating) 1676 { 1677 <span title="On" class="impersonation__indicator"></span> 1678 } 1679 </p> 1680 <i class="fal fa-chevron-up impersonation__header-icon"></i> 1681 </div> 1682 <div class="impersonation__body"> 1683 @if (isImpersonating) 1684 { 1685 <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> 1686 1687 <form method="post" name="stopImpersonation"> 1688 <input name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" type="hidden"> 1689 <div class="mt-4"> 1690 <button class="btn btn__primary" type="submit"> 1691 <span class="btn__text">@Translate("Impersonate.StopBtn", "Stop impersonation")</span> 1692 <i class="fas fa-ban btn__icon"></i> 1693 </button> 1694 </div> 1695 </form> 1696 } else { 1697 <p>@Translate("Impersonate.Modal.Content", "Take a look at the list of customers you can impersonate.")</p> 1698 <div class="w-full flex mt-2"> 1699 <a href="Default.aspx?ID=@impersonationPageId" class="btn btn__primary"> 1700 <span class="btn__text">@Translate("Impersonate.Modal.ViewList", "View List")</span> 1701 <i class="fal fa-chevron-right btn__icon"></i> 1702 </a> 1703 </div> 1704 } 1705 </div> 1706 </div> 1707 } 1708 1709 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 1710 @using System; 1711 @using Dynamicweb; 1712 @using Dynamicweb.Ecommerce.CustomerExperienceCenter.Favorites; 1713 1714 @{ 1715 var favListService = new FavoriteListService(); 1716 IEnumerable<FavoriteList> favoriteLists = Pageview.User != null ? favListService.GetLists(Pageview.User.ID) : null; 1717 int favoritelistsPageId = GetPageIdByNavigationTag("CustomerFavorites"); 1718 } 1719 1720 @if(favoriteLists != null && Pageview.User != null) 1721 { 1722 <div class="offcanvas__backdrop" name="favoritelist"></div> 1723 <aside class="offcanvas" data-listcount="@favoriteLists.Count()" name="favoritelist"> 1724 <header class="offcanvas__header"> 1725 <span class="offcanvas__title">@Translate("OffCanvasMenu.FavoritesTitle", "Add to favorite list")</span> 1726 <button class="offcanvas__close" aria-label="@Translate("OffCanvasMenu.Close", "Close menu")"> 1727 <i class="fal fa-times"></i> 1728 </button> 1729 </header> 1730 <div class="offcanvas__body"> 1731 <p>@Translate("OffCanvasMenu.FavoritesContent", "Select the list you want to add the product to")</p> 1732 <ul class="favorites__list"> 1733 @foreach(FavoriteList list in favoriteLists) { 1734 <li class="favorites__list-item" data-listid="@list.ListId"> 1735 <span class="favorites__list-itemname">@list.Name</span> 1736 <i class="fas fa-plus"></i> 1737 </li> 1738 } 1739 </ul> 1740 </div> 1741 <footer class="offcanvas__footer"> 1742 <a href="/Default.aspx?ID=@favoritelistsPageId" class="btn btn__primary"> 1743 <span class="btn__text">@Translate("OffCanvasMenu.FavoritesManageLists", "Manage lists")</span> 1744 <i class="far fa-chevron-right btn__icon"></i> 1745 </a> 1746 </footer> 1747 </aside> 1748 } 1749 1750 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 1751 @using System; 1752 @using Dynamicweb; 1753 1754 @{ 1755 string currentWebsiteUrl = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain().Replace("https://", "").Replace("http://", ""); 1756 string redirectUrl = "www.pronails.nl"; 1757 } 1758 1759 <div class="popup__backdrop" name="language-popup"></div> 1760 1761 <div class="popup popup--content-centered" name="language-popup"> 1762 <div class="popup__innerwrapper"> 1763 <button class="popup__close languagemodal__close"> 1764 <i class="fal fa-times cross"></i> 1765 </button> 1766 <header class="popup__header"> 1767 <h2 class="popup__title">@Translate("LanguageSwitchModal.Title", "Hi Beautify Professional")</h2> 1768 </header> 1769 <div class="popup__body"> 1770 <p>@string.Format(Translate("LanguageSwitchModal.Current", "Now you've reached the website {0}."), currentWebsiteUrl)</p> 1771 <p>@string.Format(Translate("LanguageSwitchModal.Redirect", "Do you want to switch to the website {0} that is more relevant to your country?"), $"<span class='languagemodal__redirecturl'>{redirectUrl}</span>")</p> 1772 </div> 1773 <div class="popup__footer"> 1774 <a href="@redirectUrl" class="btn btn__contrast popup__btn languagemodal__btn"> 1775 <span class="btn__text">@Translate("LanguageSwitchModal.Button", "Yes, I want to switch")</span> 1776 <i class="btn__icon fal fa-chevron-right"></i> 1777 </a> 1778 </div> 1779 </div> 1780 </div> 1781 1782 1783 <div id="backdrop"></div> 1784 1785 <script src="@appbundlejs"></script> 1786 <script defer src="@vuebundlejs"></script> 1787 <script defer src="@appAsyncbundlejs"></script> 1788 1789 @if (font_configuration != null) 1790 { 1791 foreach (var item in font_configuration.Item.ToCodeFirstItem<Bluedesk.DynamicWeb.ItemTypes.Pages.ConfigurationPagesParent>().GetChildConfigs<FontConfiguration>()) 1792 { 1793 if (item["FontLink"] != null) 1794 { 1795 string fontName = item["FontName"].ToString(); 1796 string cssFile = $"files/Templates/Designs/Backyard/GoogleFont/{fontName.Replace(" ", "")}/{fontName.Replace(" ", "")}.css"; 1797 <link href="@cssFile" rel="stylesheet"> 1798 } 1799 } 1800 } 1801 1802 <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-rqn26AG5Pj86AF4SO72RK5fyefcQ/x32DNQfChxWvbXIyXFePlEktwD18fEz+kQU" crossorigin="anonymous"> 1803 1804 @if (isVisualEditor && IsNotContentManager) 1805 { 1806 1807 <style> 1808 body { 1809 background-color: #f1f1f1; 1810 font-family: 'Barlow', sans-serif; 1811 } 1812 1813 .slidePanel { 1814 position: fixed; 1815 top: 0; 1816 bottom: 0; 1817 min-width: 500px; 1818 box-shadow: -10px 10px 10px rgb(153 153 255 / 10%); 1819 background-color: #FFFFFF; 1820 z-index: 1000; 1821 box-sizing: border-box; 1822 transition: all .5s ease-in; 1823 } 1824 1825 .slidePanel.open { 1826 right: 0; 1827 } 1828 1829 .slidePanel { 1830 right: -500px; 1831 transition: all 0.5s ease-in; 1832 } 1833 1834 .slidePanel__container { 1835 display: flex; 1836 position: relative; 1837 height: 100%; 1838 } 1839 1840 .togglePanelButton { 1841 position: fixed; 1842 top: 50px; 1843 left: 50px; 1844 display: flex; 1845 justify-content: center; 1846 align-items: center; 1847 color: white; 1848 background-color: black; 1849 padding: 0px 25px; 1850 height: 50px; 1851 cursor: pointer; 1852 z-index: 1000; 1853 } 1854 1855 .closeButton { 1856 position: absolute; 1857 display: flex; 1858 top: 25px; 1859 right: 25px; 1860 font-size: 2rem; 1861 text-decoration: none; 1862 color: black; 1863 } 1864 1865 .blur { 1866 filter: blur(4px); 1867 pointer-events: none; 1868 } 1869 1870 .sideMenu { 1871 display: flex; 1872 position: absolute; 1873 align-items: center; 1874 min-height: 100px; 1875 z-index: 1200; 1876 top: 0; 1877 bottom: 0; 1878 right: 100%; 1879 flex-direction: column; 1880 justify-content: center; 1881 } 1882 1883 .sideMenu__link:first-child { 1884 margin-top: 10px; 1885 } 1886 1887 .sideMenu__link { 1888 position: relative; 1889 flex-direction: column; 1890 display: flex; 1891 height: 50px; 1892 width: 50px; 1893 background-color: #f1f1f1; 1894 margin-bottom: 10px; 1895 margin-left: 10px; 1896 margin-right: 10px; 1897 justify-content: space-between; 1898 align-items: center; 1899 font-size: 10px; 1900 padding: 10px; 1901 box-sizing: border-box; 1902 text-decoration: none; 1903 color: rgb(22, 101, 123); 1904 font-size: 24px; 1905 } 1906 .sideMenu__link:hover { 1907 background-color: #c9c9c9; 1908 color: white; 1909 transition: all ease-in 0.5s; 1910 } 1911 .sideMenu__link label { 1912 font-size: 12px; 1913 } 1914 1915 .sideMenu__container { 1916 display: flex; 1917 position: relative; 1918 flex-direction: column; 1919 box-shadow: -10px 10px 10px rgb(153 153 255 / 10%); 1920 background-color: white; 1921 } 1922 1923 .toolbar.close { 1924 display: none; 1925 } 1926 1927 #toolbarVE { 1928 position: fixed !important; 1929 z-index: 100; 1930 background-color: #CCC; 1931 border: 2px solid #F1F1F1; 1932 text-align: center; 1933 right: 0px; 1934 top: 300px; 1935 } 1936 1937 #toolbarVEHeader { 1938 padding: 10px; 1939 cursor: move; 1940 z-index: 10; 1941 background-color: #6e6e6e; 1942 color: #fff; 1943 } 1944 </style> 1945 1946 <div class="toolbarVE" id="toolbar" style="top: 150px; left: auto; width: 70px; position: fixed !important; right: 0px !important; "> 1947 <div id="toolbarVEHeader"> 1948 <a href="javascript:void(0);" onclick="toggleClass('.toolbar', 'close');" style="color: #FFF;"><i class="icon fa-light fa-circle-xmark"></i></a> 1949 </div> 1950 <section class="sideMenu__container"> 1951 <a href="javascript:history.back();" class="sideMenu__link"><i class="icon fa-light fa-reply"></i></a> 1952 <a href="/dashboard-configuration" class="sideMenu__link"><i class="icon fa-light fa-grid-horizontal"></i></a> 1953 <a href="/button-configuration" class="sideMenu__link"><i class="icon fa-light fa-diagram-cells"></i></a> 1954 <a href="/button-configuration" class="sideMenu__link"><i class="icon fa-light fa-link"></i></a> 1955 <a href="/background-configuration" class="sideMenu__link"><i class="icon fa-light fa-paintbrush"></i></a> 1956 <a href="/jumbotron-configuration" class="sideMenu__link"><i class="icon fa-light fa-megaphone"></i></a> 1957 <a href="/theme-configuration-page/theme-01" class="sideMenu__link"><i class="icon fa-light fa-brush"></i></a> 1958 <a href="/font-configuration" class="sideMenu__link"><i class="icon fa-light fa-font"></i></a> 1959 <a href="/device-manager" class="sideMenu__link"><i class="icon fa-light fa-computer"></i></a> 1960 </section> 1961 </div> 1962 1963 <script> 1964 function toggleClass(ClassName, AddedClassName) { 1965 var element = document.querySelector(ClassName); 1966 if (element.classList.contains(AddedClassName)) { 1967 element.classList.remove(AddedClassName); 1968 } else { 1969 element.classList.add(AddedClassName); 1970 } 1971 } 1972 </script> 1973 1974 <script> 1975 //Make the DIV element draggagle: 1976 dragElement(document.getElementById("toolbar")); 1977 1978 function dragElement(elmnt) { 1979 var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0; 1980 if (document.getElementById(elmnt.id + "Header")) { 1981 /* if present, the header is where you move the DIV from:*/ 1982 document.getElementById(elmnt.id + "Header").onmousedown = dragMouseDown; 1983 } else { 1984 /* otherwise, move the DIV from anywhere inside the DIV:*/ 1985 elmnt.onmousedown = dragMouseDown; 1986 } 1987 1988 function dragMouseDown(e) { 1989 e = e || window.event; 1990 e.preventDefault(); 1991 // get the mouse cursor position at startup: 1992 pos3 = e.clientX; 1993 pos4 = e.clientY; 1994 document.onmouseup = closeDragElement; 1995 // call a function whenever the cursor moves: 1996 document.onmousemove = elementDrag; 1997 } 1998 1999 function elementDrag(e) { 2000 e = e || window.event; 2001 e.preventDefault(); 2002 // calculate the new cursor position: 2003 pos1 = pos3 - e.clientX; 2004 pos2 = pos4 - e.clientY; 2005 pos3 = e.clientX; 2006 pos4 = e.clientY; 2007 // set the element's new position: 2008 elmnt.style.top = (elmnt.offsetTop - pos2) + "px"; 2009 elmnt.style.left = (elmnt.offsetLeft - pos1) + "px"; 2010 } 2011 2012 function closeDragElement() { 2013 /* stop moving when mouse button is released:*/ 2014 document.onmouseup = null; 2015 document.onmousemove = null; 2016 } 2017 } 2018 </script> 2019 2020 @*<section class="slidePanel" id="slidePanel"> 2021 2022 <div class="slidePanel__container"> 2023 2024 <a href="javasciprt:void(0);" onclick="toggleClass('.slidePanel', 'open'); toggleClass('main', 'blur')" class="closeButton"> 2025 <i class="fal fa-circle-xmark"></i> 2026 </a> 2027 2028 2029 <nav class="sideMenu" id="sideMenu"> 2030 2031 <section class="sideMenu__container"> 2032 <a href="javascript:history.back();" class="sideMenu__link"><i class="fal fa-reply"></i></a> 2033 <a href="/dashboard-configuration" class="sideMenu__link"><i class="fal fa-grid-horizontal"></i></a> 2034 <a href="/button-configuration" class="sideMenu__link"><i class="fal fa-diagram-cells"></i></a> 2035 <a href="/button-configuration" class="sideMenu__link"><i class="fal fa-link"></i></a> 2036 <a href="/background-configuration" class="sideMenu__link"><i class="fal fa-paintbrush"></i></a> 2037 <a href="/jumbotron-configuration" class="sideMenu__link"><i class="fal fa-megaphone"></i></a> 2038 <a href="/theme-configuration-page/theme-01" class="sideMenu__link"><i class="fal fa-brush"></i></a> 2039 <a href="/font-configuration" class="sideMenu__link"><i class="fal fa-font"></i></a> 2040 <a href="/device-manager" class="sideMenu__link"><i class="fal fa-computer"></i></a> 2041 </section> 2042 </nav> 2043 2044 </div> 2045 2046 </section>*@ 2047 2048 <script src="https://kit.fontawesome.com/a46eca85e2.js" crossorigin="anonymous"></script> 2049 2050 } 2051 2052 2053 </body> 2054 </html> 2055 2056 @helper RenderAcademyButton(ButtonConfiguration ButtonConfiguration, string btnLink, string btnClass, string btnText, string ariaLabel = "", bool newWindow = false, string btnIcon = "", string btnExtraClass = "", string btnTextClass = "", string btnIconClass = "") 2057 { 2058 string buttonID = ButtonConfiguration.Id; 2059 var master_configuration = Dynamicweb.Content.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration"); 2060 MasterConfig mc = master_configuration.Item.ToCodeFirstItem<MasterConfig>(); 2061 2062 string FontAwesomeLibrary = mc.GeneralConfiguration.fontawesomeStyle; 2063 bool HideIcon = ButtonConfiguration.HideIcon; 2064 string CustomIconClass = !string.IsNullOrWhiteSpace(ButtonConfiguration.CustomIcon) ? ButtonConfiguration.CustomIcon : !string.IsNullOrWhiteSpace(btnIcon) ? btnIcon : "fa-chevron-up"; 2065 string IconPositionClass = HideIcon ? "default-btn--no-icon" : mc.GeneralConfiguration.IconPosition == "left" ? "default-btn--icon-left" : ""; 2066 2067 string target = newWindow ? "_blank" : "_self"; 2068 string ariaText = !string.IsNullOrWhiteSpace(ariaLabel) ? "aria-label='" + ariaLabel + "'" : ""; 2069 2070 string styleBlock = GenerateButtonConfigVariables(ButtonConfiguration, mc, Pageview.AreaID); 2071 2072 if(string.IsNullOrWhiteSpace(btnLink)) { 2073 btnLink = "#signup"; 2074 } 2075 2076 if (!string.IsNullOrWhiteSpace(btnLink) && !string.IsNullOrWhiteSpace(btnText)) 2077 { 2078 <a href="@btnLink" class="btn default-btn default-btn--@buttonID @IconPositionClass @btnClass @btnExtraClass" target="@target" @ariaText style="@styleBlock"> 2079 <span class="btn__text @btnTextClass">@btnText</span> 2080 @if (!HideIcon) 2081 { 2082 <i class="btn__icon @FontAwesomeLibrary @CustomIconClass @btnIconClass"></i> 2083 } 2084 </a> 2085 } 2086 } 2087 2088 @functions { 2089 public string GenerateButtonConfigVariables(ButtonConfiguration BC, MasterConfig mc, int areaId) 2090 { 2091 var btnStyleBlock = new System.Text.StringBuilder(); 2092 2093 btnStyleBlock.Append(GenerateCssVar("BackgroundColor", BC.ButtonColorConfiguration.BackgroundColor.GetColorCode(areaId))); 2094 2095 return btnStyleBlock.ToString(); 2096 } 2097 2098 public string GenerateCssVar(string name, string value) 2099 { 2100 if (!string.IsNullOrWhiteSpace(value)) { 2101 return $"--{name}: {value};"; 2102 } else { 2103 return ""; 2104 } 2105 } 2106 } 2107