Error compiling template "Designs/ClientBase_generated/_parsed/DashboardConfigurationPage.parsed.cshtml"
Line 402: 'Services' is obsolete: 'Use Dynamicweb.Content.Services instead.'
Line 402: 'Services.Items' is obsolete: 'Use Dynamicweb.Content.Services.Items instead.'
Line 403: 'Services' is obsolete: 'Use Dynamicweb.Content.Services instead.'
Line 403: 'Services.Pages' is obsolete: 'Use Dynamicweb.Content.Services.Pages instead.'
Line 458: 'Services' is obsolete: 'Use Dynamicweb.Content.Services instead.'
Line 458: 'Services.Pages' is obsolete: 'Use Dynamicweb.Content.Services.Pages instead.'
Line 511: A local variable or function named 'font_configuration' is already defined in this scope
Line 511: 'Services' is obsolete: 'Use Dynamicweb.Content.Services instead.'
Line 511: 'Services.Pages' is obsolete: 'Use Dynamicweb.Content.Services.Pages instead.'
Line 518: A local variable or function named 'designRoot' is already defined in this scope
Line 547: A local variable or function named 'appcss' is already defined in this scope
Line 527: The variable 'isOffline' is assigned but its value is never used
1 //------------------------------------------------------------------------------
2 // <auto-generated>
3 // This code was generated by a tool.
4 // Runtime Version:4.0.30319.42000
5 //
6 // Changes to this file may cause incorrect behavior and will be lost if
7 // the code is regenerated.
8 // </auto-generated>
9 //------------------------------------------------------------------------------
10 11 namespace CompiledRazorTemplates.Dynamic {
12 13 #line 249 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
14 using System;
15 16 #line default
17 #line hidden
18 using System.Collections.Generic;
19 20 #line 251 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
21 using System.Linq;
22 23 #line default
24 #line hidden
25 26 #line 254 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
27 using Dynamicweb;
28 29 #line default
30 #line hidden
31 32 #line 260 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
33 using Bluedesk.Tools.Generic;
34 35 #line default
36 #line hidden
37 38 #line 252 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
39 using System.Globalization;
40 41 #line default
42 #line hidden
43 44 #line 255 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
45 using Dynamicweb.Content.Items;
46 47 #line default
48 #line hidden
49 50 #line 262 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
51 using Bluedesk.DynamicWeb.ItemTypes;
52 53 #line default
54 #line hidden
55 56 #line 263 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
57 using Bluedesk.DynamicWeb.ItemTypes.Settings;
58 59 #line default
60 #line hidden
61 62 #line 268 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
63 using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration;
64 65 #line default
66 #line hidden
67 68 #line 266 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
69 using Bluedesk.DynamicWeb.ItemTypes.BaseSolution;
70 71 #line default
72 #line hidden
73 74 #line 250 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
75 using System.Web;
76 77 #line default
78 #line hidden
79 80 #line 256 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
81 using Dynamicweb.Environment;
82 83 #line default
84 #line hidden
85 86 #line 257 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
87 using Dynamicweb.Frontend;
88 89 #line default
90 #line hidden
91 92 #line 258 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
93 using Dynamicweb.Frontend.Navigation;
94 95 #line default
96 #line hidden
97 98 #line 265 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
99 using Bluedesk.DynamicWeb.ItemTypes.Configuration;
100101 #line default
102 #line hidden
103104 #line 52 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
105 using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend;
106107 #line default
108 #line hidden
109110 #line 267 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
111 using Bluedesk.DynamicWeb.ItemTypes.Extensions;
112113 #line default
114 #line hidden
115116117 public class RazorEngine_12a96c137e114982a7e9e2925fed5507 : Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> {
118119 #line hidden
120121 #line 197 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
122 public RazorEngine.Templating.TemplateWriter RenderCSSKeyAndValue(string Key, string Value)
123 {
124 #line default
125 #line hidden
126 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => {
127128 #line 198 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
129130 if (!string.IsNullOrWhiteSpace(Value))
131 {
132133134 #line default
135 #line hidden
136 WriteLiteralTo(__razor_helper_writer, "\t\t");
137138139 #line 201 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
140 WriteTo(__razor_helper_writer, Key);
141142143 #line default
144 #line hidden
145 WriteLiteralTo(__razor_helper_writer, " : ");
146147148 #line 201 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
149 WriteTo(__razor_helper_writer, Value);
150151152 #line default
153 #line hidden
154 WriteLiteralTo(__razor_helper_writer, " !important;");
155156 WriteLiteralTo(__razor_helper_writer, "\r\n");
157158159 #line 202 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
160 }
161162163 #line default
164 #line hidden
165 });
166167 #line 203 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
168 }
169 #line default
170 #line hidden
171172173 #line 205 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
174 public RazorEngine.Templating.TemplateWriter SetFontCSSVariables(FontConfigurationItemTab FontConfiguration)
175 {
176 #line default
177 #line hidden
178 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => {
179180 #line 206 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
181182183 string Top = FontConfiguration.top != 0 ? FontConfiguration.top.ToString() + "px" : "";
184 string Left = FontConfiguration.left != 0 ? FontConfiguration.left.ToString() + "px" : "";
185 string Right = FontConfiguration.right != 0 ? FontConfiguration.right.ToString() + "px" : "";
186 string Bottom = FontConfiguration.bottom != 0 ? FontConfiguration.bottom.ToString() + "px" : "";
187188 string Position = FontConfiguration.PositionAbsolute ? "absolute" : "relative";
189190 string Color = FontConfiguration.Color?.GetColorCode(Pageview.AreaID) ?? "";
191 string BackgroundColor = FontConfiguration.Backgroundcolor?.GetColorCode(Pageview.AreaID) ?? "";
192193 string BorderColor = FontConfiguration.BorderColor?.GetColorCode(Pageview.AreaID) ?? "";
194 string BorderSize = FontConfiguration.BorderSize != 0 ? FontConfiguration.BorderSize.ToString() + "px" : "";
195196197198 #line default
199 #line hidden
200 WriteLiteralTo(__razor_helper_writer, "\t");
201202 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n\t\t--Position:\t\t");
203204205 #line 223 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
206 WriteTo(__razor_helper_writer, Position);
207208209 #line default
210 #line hidden
211 WriteLiteralTo(__razor_helper_writer, ";\r\n\r\n");
212213 WriteLiteralTo(__razor_helper_writer, "\t\t");
214215216 #line 225 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
217 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--Padding", FontConfiguration.Padding));
218219220 #line default
221 #line hidden
222 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n");
223224 WriteLiteralTo(__razor_helper_writer, "\t\t");
225226227 #line 227 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
228 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--Top", Top));
229230231 #line default
232 #line hidden
233 WriteLiteralTo(__razor_helper_writer, "\r\n");
234235 WriteLiteralTo(__razor_helper_writer, "\t\t");
236237238 #line 228 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
239 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--Left", Left));
240241242 #line default
243 #line hidden
244 WriteLiteralTo(__razor_helper_writer, "\r\n");
245246 WriteLiteralTo(__razor_helper_writer, "\t\t");
247248249 #line 229 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
250 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--Right", Right));
251252253 #line default
254 #line hidden
255 WriteLiteralTo(__razor_helper_writer, "\r\n");
256257 WriteLiteralTo(__razor_helper_writer, "\t\t");
258259260 #line 230 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
261 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--Bottom", Bottom));
262263264 #line default
265 #line hidden
266 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n");
267268 WriteLiteralTo(__razor_helper_writer, "\t\t");
269270271 #line 232 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
272 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--Color", Color));
273274275 #line default
276 #line hidden
277 WriteLiteralTo(__razor_helper_writer, "\r\n");
278279 WriteLiteralTo(__razor_helper_writer, "\t\t");
280281282 #line 233 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
283 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--FontSize", FontConfiguration.FontSize));
284285286 #line default
287 #line hidden
288 WriteLiteralTo(__razor_helper_writer, "\r\n");
289290 WriteLiteralTo(__razor_helper_writer, "\t\t");
291292293 #line 234 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
294 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--FontStyle", FontConfiguration.FontStyle));
295296297 #line default
298 #line hidden
299 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n");
300301 WriteLiteralTo(__razor_helper_writer, "\t\t");
302303304 #line 236 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
305 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--FontWeight", FontConfiguration.FontWeight));
306307308 #line default
309 #line hidden
310 WriteLiteralTo(__razor_helper_writer, "\r\n");
311312 WriteLiteralTo(__razor_helper_writer, "\t\t");
313314315 #line 237 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
316 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--FontFamily", FontConfiguration.FontConfiguration.FontFamily));
317318319 #line default
320 #line hidden
321 WriteLiteralTo(__razor_helper_writer, "\r\n");
322323 WriteLiteralTo(__razor_helper_writer, "\t\t");
324325326 #line 238 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
327 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--LineHeight", FontConfiguration.LineHeight));
328329330 #line default
331 #line hidden
332 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n");
333334 WriteLiteralTo(__razor_helper_writer, "\t\t");
335336337 #line 240 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
338 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--BackgroundColor", BackgroundColor));
339340341 #line default
342 #line hidden
343 WriteLiteralTo(__razor_helper_writer, "\r\n");
344345 WriteLiteralTo(__razor_helper_writer, "\t\t");
346347348 #line 241 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
349 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--BorderColor", BorderColor));
350351352 #line default
353 #line hidden
354 WriteLiteralTo(__razor_helper_writer, "\r\n");
355356 WriteLiteralTo(__razor_helper_writer, "\t\t");
357358359 #line 242 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
360 WriteTo(__razor_helper_writer, RenderCSSKeyAndValue("--BorderSize", BorderSize));
361362363 #line default
364 #line hidden
365 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n\t");
366367 WriteLiteralTo(__razor_helper_writer, "\r\n");
368369370 #line 245 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
371372373374 #line default
375 #line hidden
376 });
377378 #line 246 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
379 }
380 #line default
381 #line hidden
382383384 public RazorEngine_12a96c137e114982a7e9e2925fed5507() {
385 }
386387 public override void Execute() {
388 WriteLiteral("\r\n");
389390391 #line 11 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
392 Write(Title("Configuration page template"));
393394395 #line default
396 #line hidden
397 WriteLiteral("\r\n\r\n");
398399400 #line 13 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
401402 var websitesettings = Dynamicweb.Services.Items.GetItemById<WebsiteSettings>(Model.Area.Item.Id);
403 var font_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "FontConfiguration");
404405 var designRoot = "/Files/Templates/Designs/" + Pageview.Area.Layout.Design.Name;
406 var appcss = Cache.VersionedFile(designRoot + "/dist/app.css");
407408409410 #line default
411 #line hidden
412 WriteLiteral("\r\n\r\n<!DOCTYPE html>\r\n<html");
413414 WriteLiteral(" prefix=\"og: http://ogp.me/ns#\"");
415416 WriteLiteral(">\r\n<head>\r\n\r\n</head>\r\n<body");
417418 WriteLiteral(" style=\"background-color: #f1f1f1;\"");
419420 WriteLiteral(">\r\n\r\n\t<link");
421422 WriteAttribute("href", Tuple.Create(" href=\"", 948), Tuple.Create("\"", 962)
423424 #line 29 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
425 , Tuple.Create(Tuple.Create("", 955), Tuple.Create<System.Object, System.Int32>(appcss
426427 #line default
428 #line hidden
429 , 955), false)
430 );
431432 WriteLiteral(" rel=\"stylesheet\"");
433434 WriteLiteral(" />\r\n");
435436437 #line 30 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
438439440 #line default
441 #line hidden
442 WriteLiteral("\r\n");
443444 WriteLiteral("\r\n");
445446 WriteLiteral("\r\n");
447448 WriteLiteral("\r\n");
449450 WriteLiteral("\r\n");
451452 WriteLiteral("\r\n");
453454455 #line 54 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
456457458 var master_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration");
459 MasterConfig mc = master_configuration.Item.ToCodeFirstItem<MasterConfig>();
460461 bool HideStandardFooter = mc.FooterConfiguration.HideStandardFooter.ToString() == "True" ? true : false;
462463 string MasterConfigCssClass = !string.IsNullOrWhiteSpace(mc.CssClass) ? mc.CssClass : "";
464465 // GeneralConfig GeneralConfiguration = mc.GeneralConfiguration;
466 EcomConfig EcommerceConfiguration = mc.EcomConfiguration;
467468 bool WithVATBool = Pageview.Area.EcomPricesWithVat == "True";
469 bool pricesWithoutVatForUsers = EcommerceConfiguration.ShowPricesWithoutVatForUsers;
470 bool pricesWithoutVatForValidVat = EcommerceConfiguration.ShowPricesWithoutVatWhenValidVatNumber;
471 if(pricesWithoutVatForUsers && !pricesWithoutVatForValidVat && Pageview.User != null) {
472 WithVATBool = false;
473 }
474 if(pricesWithoutVatForValidVat && Pageview.User != null && !string.IsNullOrWhiteSpace(Pageview.User.VatRegNumber)) {
475 WithVATBool = false;
476 }
477 string ecomShowPricesWithVat = WithVATBool.ToString().ToLower();
478 string ecomPricesFormatted = (EcommerceConfiguration.FormattedPrices).ToString().ToLower();
479480 bool IsNotContentManager = false;
481 bool isVisualEditor = Pageview.IsVisualEditorMode;
482483 if (isVisualEditor)
484 {
485 System.Web.HttpContext.Current.Session["PreviousPage"] = Pageview.Page.ID;
486 IsNotContentManager = (Dynamicweb.Security.UserManagement.User.GetCurrentBackendUser()?.Groups?.All(g => g.Name != "Content managers") ?? true);
487 }
488489 BaseSettingsObj BaseSettings = new BaseSettingsObj();
490491 BaseSettings = BaseSettingServices.RenderBaseSettings(Pageview);
492 HttpContext.Current.Session["BaseSettings"] = BaseSettings;
493494 //if (HttpContext.Current.Session["BaseSettings"] == null)
495 //{
496497 //}
498 //else
499 //{
500 // BaseSettings = (BaseSettingsObj)HttpContext.Current.Session["BaseSettings"];
501 // if (BaseSettings.AreaID != Pageview.AreaID)
502 // {
503 // BaseSettings = BaseSettingServices.RenderBaseSettings(Pageview);
504 // HttpContext.Current.Session["BaseSettings"] = BaseSettings;
505 // }
506 //}
507508 BaseSettingsBrandConfiguration BaseSettingsBrandConfiguration = BaseSettings.BrandConfiguration;
509 BaseSettingsButtons BaseSettingsButtons = BaseSettingsBrandConfiguration.Buttons;
510511 var font_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "FontConfiguration");
512513 var httpdomain = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain();
514 var lang = Pageview.Area.CultureInfo.TwoLetterISOLanguageName;
515 var langName = Pageview.Area.Culture;
516517 var csrftoken = application._webapi.Helper.CSRFHelper.TokenHeaderValue();
518 var designRoot = BaseSettings.DesignRoot;
519520 var phonenumber = BaseSettings.CorporateSettings.Phonenumber;
521 var formattedPhonenumber = phonenumber.Replace(" ", String.Empty);
522 var emailadress = BaseSettings.CorporateSettings.Emailadress;
523 var buttonIconClass = Pageview.Area.Item["Global_button_icon"] != null ? Pageview.Area.Item["Global_button_icon"].ToString().Replace("+", " ") : "fal fa-arrow-right";
524 var callmebackformlink = BaseSettings.BrandConfiguration.CallMeBackForm;
525 var mobileThemeColor = BaseSettings.BrandConfiguration.MobileThemeColor;
526527 bool isOffline = false;
528529 DateTime workingHoursStart = BaseSettings.CorporateSettings.OpeningTime;
530 DateTime workingHoursEnd = BaseSettings.CorporateSettings.ClosingTime;
531 DateTime today = DateTime.Now;
532 var cHour = DateTime.Now.TimeOfDay;
533 int cDay = (int)DateTime.Now.DayOfWeek;
534 string availableToHour24hFormat = workingHoursEnd.TimeOfDay.ToString().Substring(0, 5);
535 var timeFromInput = DateTime.ParseExact(availableToHour24hFormat, "H:m", null, DateTimeStyles.None);
536 string availableToHour12hFormat = timeFromInput.ToString("hh:mm tt", CultureInfo.InvariantCulture);
537 var availableToHour = lang == "en" ? availableToHour12hFormat : availableToHour24hFormat;
538 bool isOvertime = cHour >= workingHoursEnd.TimeOfDay || cHour <= workingHoursStart.TimeOfDay;
539 bool isNoValidDate = today < workingHoursStart || today > workingHoursEnd;
540 if (isNoValidDate || isOvertime)
541 {
542 isOffline = true;
543 }
544545 Boolean showBreadcrumbs = Pageview.Page.PropertyItem != null && Pageview.Page.PropertyItem["ShowBreadcrumbs"] != null ? Convert.ToBoolean(Pageview.Page.PropertyItem["ShowBreadcrumbs"]) : false;
546547 var appcss = Cache.VersionedFile(designRoot + "/dist/app.css");
548549 var favicon32 = Cache.VersionedFile(designRoot + "/assets/img/favicon-32.png", true);
550 var favicon16 = Cache.VersionedFile(designRoot + "/assets/img/favicon-16.png", true);
551 var favicon = Cache.VersionedFile(designRoot + "/assets/img/favicon.ico", true);
552553 favicon = !string.IsNullOrWhiteSpace(BaseSettings.BrandConfiguration.Favicons.Favicon) ? BaseSettings.BrandConfiguration.Favicons.Favicon : favicon;
554 favicon16 = !string.IsNullOrWhiteSpace(BaseSettings.BrandConfiguration.Favicons.Favicon16) ? BaseSettings.BrandConfiguration.Favicons.Favicon16 : favicon16;
555 favicon32 = !string.IsNullOrWhiteSpace(BaseSettings.BrandConfiguration.Favicons.Favicon32) ? BaseSettings.BrandConfiguration.Favicons.Favicon32 : favicon32;
556557 var appbundlejs = Cache.VersionedFile(designRoot + "/dist/app.bundle.js");
558 var appAsyncbundlejs = Cache.VersionedFile(designRoot + "/dist/appAsync.bundle.js");
559 var vuebundlejs = Cache.VersionedFile(designRoot + "/dist/vue.bundle.js");
560561 //*** Start Scanapp configuration ***\\
562 bool hideHeader = false;
563 bool hideFooter = false;
564 bool hideBottombar = false;
565566 if (HttpContext.Current.Session["ScanApp"] != null)
567 {
568 hideHeader = mc.ScanAppConfig.ShowHeader;
569 hideFooter = mc.ScanAppConfig.ShowFooter;
570 hideBottombar = mc.ScanAppConfig.ShowBottombar;
571 }
572 // END Scanapp configration **\\
573574 string areaIdClass = $"area-id-{Pageview.Area.ID}";
575576577 #line default
578 #line hidden
579 WriteLiteral("\r\n\r\n");
580581582 #line 175 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
583584585 #line default
586 #line hidden
587 WriteLiteral("\r\n");
588589 WriteLiteral("\r\n");
590591 WriteLiteral("\r\n");
592593 WriteLiteral("\r\n");
594595 WriteLiteral("\r\n");
596597 WriteLiteral("\r\n");
598599 WriteLiteral("\r\n");
600601602 #line 248 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
603604605 #line default
606 #line hidden
607 WriteLiteral("\r\n");
608609 WriteLiteral("\r\n");
610611 WriteLiteral("\r\n");
612613 WriteLiteral("\r\n");
614615 WriteLiteral("\r\n\r\n\t<header");
616617 WriteLiteral(" style=\"padding: 25px; display: flex; flex-direction: Column;\"");
618619 WriteLiteral(">\r\n\t\t<div>\r\n\t\t\t<h1>");
620621622 #line 273 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
623 Write(Model.Title);
624625626 #line default
627 #line hidden
628 WriteLiteral("</h1>\r\n\t\t\t<h2");
629630 WriteLiteral(" style=\"font-weight: normal;\"");
631632 WriteLiteral("></h2>\r\n\t\t</div>\r\n\t\t<nav");
633634 WriteLiteral(" style=\"display: flex; flex-direction: row; margin-left: 50px\"");
635636 WriteLiteral(">\r\n\t\t\t<a");
637638 WriteLiteral(" href=\"/Default.aspx?ID=1598\"");
639640 WriteLiteral(" class=\"ConfigurationButton\"");
641642 WriteLiteral("><i");
643644 WriteLiteral(" class=\"icon fa-light fa-grid-horizontal\"");
645646 WriteLiteral("></i><label>Dashboard</label></a>\r\n\t\t\t<a");
647648 WriteLiteral(" href=\"/Default.aspx?ID=1055\"");
649650 WriteLiteral(" class=\"ConfigurationButton\"");
651652 WriteLiteral("><i");
653654 WriteLiteral(" class=\"icon fa-light fa-diagram-cells\"");
655656 WriteLiteral("></i><label>Masters</label></a>\r\n\t\t\t<a");
657658 WriteLiteral(" href=\"/Default.aspx?ID=1055\"");
659660 WriteLiteral(" class=\"ConfigurationButton\"");
661662 WriteLiteral("><i");
663664 WriteLiteral(" class=\"icon fa-light fa-link\"");
665666 WriteLiteral("></i><label>Buttons</label></a>\r\n\t\t\t<a");
667668 WriteLiteral(" href=\"/Default.aspx?ID=1009\"");
669670 WriteLiteral(" class=\"ConfigurationButton\"");
671672 WriteLiteral("><i");
673674 WriteLiteral(" class=\"icon fa-light fa-paintbrush\"");
675676 WriteLiteral("></i><label>Backgrounds</label></a>\r\n\t\t\t<a");
677678 WriteLiteral(" href=\"/Default.aspx?ID=1460\"");
679680 WriteLiteral(" class=\"ConfigurationButton\"");
681682 WriteLiteral("><i");
683684 WriteLiteral(" class=\"icon fa-light fa-megaphone\"");
685686 WriteLiteral("></i><label>Jumbotrons</label></a>\r\n\t\t\t<a");
687688 WriteLiteral(" href=\"/Default.aspx?ID=1518\"");
689690 WriteLiteral(" class=\"ConfigurationButton\"");
691692 WriteLiteral("><i");
693694 WriteLiteral(" class=\"icon fa-light fa-brush\"");
695696 WriteLiteral("></i><label>Themes</label></a>\r\n\t\t\t<a");
697698 WriteLiteral(" href=\"/Default.aspx?ID=1450\"");
699700 WriteLiteral(" class=\"ConfigurationButton\"");
701702 WriteLiteral("><i");
703704 WriteLiteral(" class=\"icon fa-light fa-font\"");
705706 WriteLiteral("></i><label>Fonts</label></a>\r\n\t\t\t<a");
707708 WriteLiteral(" href=\"/Default.aspx?ID=1514\"");
709710 WriteLiteral(" class=\"ConfigurationButton\"");
711712 WriteLiteral("><i");
713714 WriteLiteral(" class=\"icon fa-light fa-computer\"");
715716 WriteLiteral(@"></i><label>Devices</label></a>
717 </nav>
718 </header>
719720 <style>
721 .ConfigurationButton {
722 display: flex;
723 flex-direction: column;
724 height: 150px;
725 width: 150px;
726 margin-right: 25px;
727 padding: 25px;
728 background-color: #ffffff;
729 justify-content: center;
730 align-items: center;
731 box-sizing: border-box;
732 text-align: center;
733 font-size: 12px;
734 box-shadow: rgb(153 153 255 / 10%) 10px 10px 10px;
735 }
736737 .ConfigurationButton .icon {
738 font-size: 35px;
739 }
740 </style>
741742 ");
743744 WriteLiteral("\t");
745746747 #line 310 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
748 Write(Model.Grid("Grid", "Configuration items", "default:true;sort:1", "Configuration"));
749750751 #line default
752 #line hidden
753 WriteLiteral("\r\n\r\n");
754755756 #line 312 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
757758759 #line default
760 #line hidden
761762 #line 312 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
763 if (font_configuration != null)
764 {
765 foreach (var item in font_configuration.Item.ToCodeFirstItem<Bluedesk.DynamicWeb.ItemTypes.Pages.ConfigurationPagesParent>().GetChildConfigs<FontConfiguration>())
766 {
767768769 #line default
770 #line hidden
771 WriteLiteral("\t\t\t<link");
772773 WriteAttribute("href", Tuple.Create(" href=\"", 12953), Tuple.Create("\"", 12977)
774775 #line 316 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
776 , Tuple.Create(Tuple.Create("", 12960), Tuple.Create<System.Object, System.Int32>(item["FontLink"]
777778 #line default
779 #line hidden
780 , 12960), false)
781 );
782783 WriteLiteral(" rel=\"stylesheet\"");
784785 WriteLiteral(">\r\n");
786787788 #line 317 "D:\dynamicweb.net\Solutions\Bluedesk\koksgroup.cloud.dynamicweb-cms.com\files\Templates\Designs\ClientBase_generated\_parsed\DashboardConfigurationPage.parsed.cshtml"
789 }
790 }
791792793 #line default
794 #line hidden
795 WriteLiteral("\r\n\t<link");
796797 WriteLiteral(" rel=\"stylesheet\"");
798799 WriteLiteral(" href=\"https://pro.fontawesome.com/releases/v5.15.4/css/all.css\"");
800801 WriteLiteral(" integrity=\"sha384-rqn26AG5Pj86AF4SO72RK5fyefcQ/x32DNQfChxWvbXIyXFePlEktwD18fEz+k" +
802 "QU\"");
803804 WriteLiteral(" crossorigin=\"anonymous\"");
805806 WriteLiteral(">\r\n\t<script");
807808 WriteLiteral(" src=\"https://kit.fontawesome.com/a46eca85e2.js\"");
809810 WriteLiteral(" crossorigin=\"anonymous\"");
811812 WriteLiteral("></script>\r\n\r\n</body>\r\n</html>\r\n");
813814 }
815 }
816 }
817
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
2 @using Dynamicweb;
3 @using Bluedesk.Tools.Generic;
4 @using System.Globalization;
5 @using Dynamicweb.Content.Items;
6 @using Bluedesk.DynamicWeb.ItemTypes;
7 @using Bluedesk.DynamicWeb.ItemTypes.Settings;
8 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration;
9 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution;
10 11 @Title("Configuration page template")
12 13 @{
14 var websitesettings = Dynamicweb.Services.Items.GetItemById<WebsiteSettings>(Model.Area.Item.Id);
15 var font_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "FontConfiguration");
16 17 var designRoot = "/Files/Templates/Designs/" + Pageview.Area.Layout.Design.Name;
18 var appcss = Cache.VersionedFile(designRoot + "/dist/app.css");
19 20 }
21 22 <!DOCTYPE html>
23 <html prefix="og: http://ogp.me/ns#">
24 <head>
25 26 </head>
27 <body style="background-color: #f1f1f1;">
28 29 <link href="@appcss" rel="stylesheet" />
30 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
31 32 @using System;
33 @using System.Web;
34 @using System.Linq;
35 @using System.Globalization;
36 37 @using Dynamicweb;
38 @using Dynamicweb.Content.Items;
39 @using Dynamicweb.Environment;
40 @using Dynamicweb.Frontend;
41 @using Dynamicweb.Frontend.Navigation;
42 43 @using Bluedesk.Tools.Generic;
44 45 @using Bluedesk.DynamicWeb.ItemTypes;
46 @using Bluedesk.DynamicWeb.ItemTypes.Settings;
47 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration;
48 49 @using Bluedesk.DynamicWeb.ItemTypes.Configuration;
50 51 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution;
52 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend;
53 54 @{
55 56 var master_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration");
57 MasterConfig mc = master_configuration.Item.ToCodeFirstItem<MasterConfig>();
58 59 bool HideStandardFooter = mc.FooterConfiguration.HideStandardFooter.ToString() == "True" ? true : false;
60 61 string MasterConfigCssClass = !string.IsNullOrWhiteSpace(mc.CssClass) ? mc.CssClass : "";
62 63 // GeneralConfig GeneralConfiguration = mc.GeneralConfiguration;
64 EcomConfig EcommerceConfiguration = mc.EcomConfiguration;
65 66 bool WithVATBool = Pageview.Area.EcomPricesWithVat == "True";
67 bool pricesWithoutVatForUsers = EcommerceConfiguration.ShowPricesWithoutVatForUsers;
68 bool pricesWithoutVatForValidVat = EcommerceConfiguration.ShowPricesWithoutVatWhenValidVatNumber;
69 if(pricesWithoutVatForUsers && !pricesWithoutVatForValidVat && Pageview.User != null) {
70 WithVATBool = false;
71 }
72 if(pricesWithoutVatForValidVat && Pageview.User != null && !string.IsNullOrWhiteSpace(Pageview.User.VatRegNumber)) {
73 WithVATBool = false;
74 }
75 string ecomShowPricesWithVat = WithVATBool.ToString().ToLower();
76 string ecomPricesFormatted = (EcommerceConfiguration.FormattedPrices).ToString().ToLower();
77 78 bool IsNotContentManager = false;
79 bool isVisualEditor = Pageview.IsVisualEditorMode;
80 81 if (isVisualEditor)
82 {
83 System.Web.HttpContext.Current.Session["PreviousPage"] = Pageview.Page.ID;
84 IsNotContentManager = (Dynamicweb.Security.UserManagement.User.GetCurrentBackendUser()?.Groups?.All(g => g.Name != "Content managers") ?? true);
85 }
86 87 BaseSettingsObj BaseSettings = new BaseSettingsObj();
88 89 BaseSettings = BaseSettingServices.RenderBaseSettings(Pageview);
90 HttpContext.Current.Session["BaseSettings"] = BaseSettings;
91 92 //if (HttpContext.Current.Session["BaseSettings"] == null)
93 //{
94 95 //}
96 //else
97 //{
98 // BaseSettings = (BaseSettingsObj)HttpContext.Current.Session["BaseSettings"];
99 // if (BaseSettings.AreaID != Pageview.AreaID)
100 // {
101 // BaseSettings = BaseSettingServices.RenderBaseSettings(Pageview);
102 // HttpContext.Current.Session["BaseSettings"] = BaseSettings;
103 // }
104 //}
105106 BaseSettingsBrandConfiguration BaseSettingsBrandConfiguration = BaseSettings.BrandConfiguration;
107 BaseSettingsButtons BaseSettingsButtons = BaseSettingsBrandConfiguration.Buttons;
108109 var font_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "FontConfiguration");
110111 var httpdomain = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain();
112 var lang = Pageview.Area.CultureInfo.TwoLetterISOLanguageName;
113 var langName = Pageview.Area.Culture;
114115 var csrftoken = application._webapi.Helper.CSRFHelper.TokenHeaderValue();
116 var designRoot = BaseSettings.DesignRoot;
117118 var phonenumber = BaseSettings.CorporateSettings.Phonenumber;
119 var formattedPhonenumber = phonenumber.Replace(" ", String.Empty);
120 var emailadress = BaseSettings.CorporateSettings.Emailadress;
121 var buttonIconClass = Pageview.Area.Item["Global_button_icon"] != null ? Pageview.Area.Item["Global_button_icon"].ToString().Replace("+", " ") : "fal fa-arrow-right";
122 var callmebackformlink = BaseSettings.BrandConfiguration.CallMeBackForm;
123 var mobileThemeColor = BaseSettings.BrandConfiguration.MobileThemeColor;
124125 bool isOffline = false;
126127 DateTime workingHoursStart = BaseSettings.CorporateSettings.OpeningTime;
128 DateTime workingHoursEnd = BaseSettings.CorporateSettings.ClosingTime;
129 DateTime today = DateTime.Now;
130 var cHour = DateTime.Now.TimeOfDay;
131 int cDay = (int)DateTime.Now.DayOfWeek;
132 string availableToHour24hFormat = workingHoursEnd.TimeOfDay.ToString().Substring(0, 5);
133 var timeFromInput = DateTime.ParseExact(availableToHour24hFormat, "H:m", null, DateTimeStyles.None);
134 string availableToHour12hFormat = timeFromInput.ToString("hh:mm tt", CultureInfo.InvariantCulture);
135 var availableToHour = lang == "en" ? availableToHour12hFormat : availableToHour24hFormat;
136 bool isOvertime = cHour >= workingHoursEnd.TimeOfDay || cHour <= workingHoursStart.TimeOfDay;
137 bool isNoValidDate = today < workingHoursStart || today > workingHoursEnd;
138 if (isNoValidDate || isOvertime)
139 {
140 isOffline = true;
141 }
142143 Boolean showBreadcrumbs = Pageview.Page.PropertyItem != null && Pageview.Page.PropertyItem["ShowBreadcrumbs"] != null ? Convert.ToBoolean(Pageview.Page.PropertyItem["ShowBreadcrumbs"]) : false;
144145 var appcss = Cache.VersionedFile(designRoot + "/dist/app.css");
146147 var favicon32 = Cache.VersionedFile(designRoot + "/assets/img/favicon-32.png", true);
148 var favicon16 = Cache.VersionedFile(designRoot + "/assets/img/favicon-16.png", true);
149 var favicon = Cache.VersionedFile(designRoot + "/assets/img/favicon.ico", true);
150151 favicon = !string.IsNullOrWhiteSpace(BaseSettings.BrandConfiguration.Favicons.Favicon) ? BaseSettings.BrandConfiguration.Favicons.Favicon : favicon;
152 favicon16 = !string.IsNullOrWhiteSpace(BaseSettings.BrandConfiguration.Favicons.Favicon16) ? BaseSettings.BrandConfiguration.Favicons.Favicon16 : favicon16;
153 favicon32 = !string.IsNullOrWhiteSpace(BaseSettings.BrandConfiguration.Favicons.Favicon32) ? BaseSettings.BrandConfiguration.Favicons.Favicon32 : favicon32;
154155 var appbundlejs = Cache.VersionedFile(designRoot + "/dist/app.bundle.js");
156 var appAsyncbundlejs = Cache.VersionedFile(designRoot + "/dist/appAsync.bundle.js");
157 var vuebundlejs = Cache.VersionedFile(designRoot + "/dist/vue.bundle.js");
158159 //*** Start Scanapp configuration ***\\
160 bool hideHeader = false;
161 bool hideFooter = false;
162 bool hideBottombar = false;
163164 if (HttpContext.Current.Session["ScanApp"] != null)
165 {
166 hideHeader = mc.ScanAppConfig.ShowHeader;
167 hideFooter = mc.ScanAppConfig.ShowFooter;
168 hideBottombar = mc.ScanAppConfig.ShowBottombar;
169 }
170 // END Scanapp configration **\\
171172 string areaIdClass = $"area-id-{Pageview.Area.ID}";
173 }
174175 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
176 @using System;
177 @using System.Web;
178 @using System.Linq;
179 @using System.Globalization;
180181 @using Dynamicweb;
182 @using Dynamicweb.Content.Items;
183 @using Dynamicweb.Environment;
184 @using Dynamicweb.Frontend;
185 @using Dynamicweb.Frontend.Navigation;
186187 @using Bluedesk.Tools.Generic;
188189 @using Bluedesk.DynamicWeb.ItemTypes;
190 @using Bluedesk.DynamicWeb.ItemTypes.Settings;
191 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration;
192193 @using Bluedesk.DynamicWeb.ItemTypes.Configuration;
194 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution;
195 @using Bluedesk.DynamicWeb.ItemTypes.Extensions;
196197 @helper RenderCSSKeyAndValue(string Key, string Value)
198 {
199 if (!string.IsNullOrWhiteSpace(Value))
200 {
201 <text>@Key : @Value !important;</text>
202 }
203 }
204205 @helper SetFontCSSVariables(FontConfigurationItemTab FontConfiguration)
206 {
207208 string Top = FontConfiguration.top != 0 ? FontConfiguration.top.ToString() + "px" : "";
209 string Left = FontConfiguration.left != 0 ? FontConfiguration.left.ToString() + "px" : "";
210 string Right = FontConfiguration.right != 0 ? FontConfiguration.right.ToString() + "px" : "";
211 string Bottom = FontConfiguration.bottom != 0 ? FontConfiguration.bottom.ToString() + "px" : "";
212213 string Position = FontConfiguration.PositionAbsolute ? "absolute" : "relative";
214215 string Color = FontConfiguration.Color?.GetColorCode(Pageview.AreaID) ?? "";
216 string BackgroundColor = FontConfiguration.Backgroundcolor?.GetColorCode(Pageview.AreaID) ?? "";
217218 string BorderColor = FontConfiguration.BorderColor?.GetColorCode(Pageview.AreaID) ?? "";
219 string BorderSize = FontConfiguration.BorderSize != 0 ? FontConfiguration.BorderSize.ToString() + "px" : "";
220221 <text>
222223 --Position: @Position;
224225 @RenderCSSKeyAndValue("--Padding", FontConfiguration.Padding)
226227 @RenderCSSKeyAndValue("--Top", Top)
228 @RenderCSSKeyAndValue("--Left", Left)
229 @RenderCSSKeyAndValue("--Right", Right)
230 @RenderCSSKeyAndValue("--Bottom", Bottom)
231232 @RenderCSSKeyAndValue("--Color", Color)
233 @RenderCSSKeyAndValue("--FontSize", FontConfiguration.FontSize)
234 @RenderCSSKeyAndValue("--FontStyle", FontConfiguration.FontStyle)
235236 @RenderCSSKeyAndValue("--FontWeight", FontConfiguration.FontWeight)
237 @RenderCSSKeyAndValue("--FontFamily", FontConfiguration.FontConfiguration.FontFamily)
238 @RenderCSSKeyAndValue("--LineHeight", FontConfiguration.LineHeight)
239240 @RenderCSSKeyAndValue("--BackgroundColor", BackgroundColor)
241 @RenderCSSKeyAndValue("--BorderColor", BorderColor)
242 @RenderCSSKeyAndValue("--BorderSize", BorderSize)
243244 </text>
245246 }
247248 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
249 @using System;
250 @using System.Web;
251 @using System.Linq;
252 @using System.Globalization;
253254 @using Dynamicweb;
255 @using Dynamicweb.Content.Items;
256 @using Dynamicweb.Environment;
257 @using Dynamicweb.Frontend;
258 @using Dynamicweb.Frontend.Navigation;
259260 @using Bluedesk.Tools.Generic;
261262 @using Bluedesk.DynamicWeb.ItemTypes;
263 @using Bluedesk.DynamicWeb.ItemTypes.Settings;
264265 @using Bluedesk.DynamicWeb.ItemTypes.Configuration;
266 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution;
267 @using Bluedesk.DynamicWeb.ItemTypes.Extensions;
268 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration;
269270271 <header style="padding: 25px; display: flex; flex-direction: Column;">
272 <div>
273 <h1>@Model.Title</h1>
274 <h2 style="font-weight: normal;"></h2>
275 </div>
276 <nav style="display: flex; flex-direction: row; margin-left: 50px">
277 <a href="/Default.aspx?ID=1598" class="ConfigurationButton"><i class="icon fa-light fa-grid-horizontal"></i><label>Dashboard</label></a>
278 <a href="/Default.aspx?ID=1055" class="ConfigurationButton"><i class="icon fa-light fa-diagram-cells"></i><label>Masters</label></a>
279 <a href="/Default.aspx?ID=1055" class="ConfigurationButton"><i class="icon fa-light fa-link"></i><label>Buttons</label></a>
280 <a href="/Default.aspx?ID=1009" class="ConfigurationButton"><i class="icon fa-light fa-paintbrush"></i><label>Backgrounds</label></a>
281 <a href="/Default.aspx?ID=1460" class="ConfigurationButton"><i class="icon fa-light fa-megaphone"></i><label>Jumbotrons</label></a>
282 <a href="/Default.aspx?ID=1518" class="ConfigurationButton"><i class="icon fa-light fa-brush"></i><label>Themes</label></a>
283 <a href="/Default.aspx?ID=1450" class="ConfigurationButton"><i class="icon fa-light fa-font"></i><label>Fonts</label></a>
284 <a href="/Default.aspx?ID=1514" class="ConfigurationButton"><i class="icon fa-light fa-computer"></i><label>Devices</label></a>
285 </nav>
286 </header>
287288 <style>
289 .ConfigurationButton {
290 display: flex;
291 flex-direction: column;
292 height: 150px;
293 width: 150px;
294 margin-right: 25px;
295 padding: 25px;
296 background-color: #ffffff;
297 justify-content: center;
298 align-items: center;
299 box-sizing: border-box;
300 text-align: center;
301 font-size: 12px;
302 box-shadow: rgb(153 153 255 / 10%) 10px 10px 10px;
303 }
304305 .ConfigurationButton .icon {
306 font-size: 35px;
307 }
308 </style>
309310 @Model.Grid("Grid", "Configuration items", "default:true;sort:1", "Configuration")
311312 @if (font_configuration != null)
313 {
314 foreach (var item in font_configuration.Item.ToCodeFirstItem<Bluedesk.DynamicWeb.ItemTypes.Pages.ConfigurationPagesParent>().GetChildConfigs<FontConfiguration>())
315 {
316 <link href="@item["FontLink"]" rel="stylesheet">
317 }
318 }
319320 <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-rqn26AG5Pj86AF4SO72RK5fyefcQ/x32DNQfChxWvbXIyXFePlEktwD18fEz+kQU" crossorigin="anonymous">
321 <script src="https://kit.fontawesome.com/a46eca85e2.js" crossorigin="anonymous"></script>
322323 </body>
324 </html>
325