Error executing template "Designs/Dwsimple/_parsed/fullwidth.parsed.cshtml"
System.Net.WebException: The remote server returned an error: (502) Bad Gateway.
   at System.Net.HttpWebRequest.GetResponse()
   at CompiledRazorTemplates.Dynamic.RazorEngine_6c6ec7e55be045d793e8682e75fcfe36.ImageHeight() in D:\dynamicweb.net\Solutions\Dynamicweb\enotria.dw9.dynamicweb-cms.com\Files\Templates\Designs\Dwsimple\_parsed\fullwidth.parsed.cshtml:line 2173
   at CompiledRazorTemplates.Dynamic.RazorEngine_6c6ec7e55be045d793e8682e75fcfe36.InitGeneralSettings() in D:\dynamicweb.net\Solutions\Dynamicweb\enotria.dw9.dynamicweb-cms.com\Files\Templates\Designs\Dwsimple\_parsed\fullwidth.parsed.cshtml:line 1228
   at CompiledRazorTemplates.Dynamic.RazorEngine_6c6ec7e55be045d793e8682e75fcfe36.Execute() in D:\dynamicweb.net\Solutions\Dynamicweb\enotria.dw9.dynamicweb-cms.com\Files\Templates\Designs\Dwsimple\_parsed\fullwidth.parsed.cshtml:line 2191
   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.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using System 3 @using System.Web 4 @using Dynamicweb.Security.UserManagement; 5 @using Dynamicweb.Security.UserManagement.Common.CustomFields; 6 @using Dynamicweb.Rendering; 7 @using Dynamicweb.Environment; 8 @using System.Text.RegularExpressions; 9 @using User = Dynamicweb.Security.UserManagement.User 10 @using System.Text.RegularExpressions 11 @using System.Web 12 13 14 @functions{ 15 public class WrapMethods 16 { 17 //Gets the contrasting color 18 public static string getContrastYIQ(string hexcolor) 19 { 20 if (hexcolor != "") 21 { 22 hexcolor = Regex.Replace(hexcolor, "[^0-9a-zA-Z]+", ""); 23 24 int r = Convert.ToByte(hexcolor.Substring(0, 2), 16); 25 int g = Convert.ToByte(hexcolor.Substring(2, 2), 16); 26 int b = Convert.ToByte(hexcolor.Substring(4, 2), 16); 27 int yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000; 28 29 if (yiq >= 128) 30 { 31 return "black"; 32 } 33 else 34 { 35 return "white"; 36 } 37 } 38 else 39 { 40 return "black"; 41 } 42 } 43 44 45 //Truncate text 46 public static string Truncate (string value, int count, bool strip=true) 47 { 48 if (strip == true){ 49 value = StripHtmlTagByCharArray(value); 50 } 51 52 if (value.Length > count) 53 { 54 value = value.Substring(0, count - 1) + "..."; 55 } 56 57 return value; 58 } 59 60 61 //Strip text from HTML 62 public static string StripHtmlTagByCharArray(string htmlString) 63 { 64 char[] array = new char[htmlString.Length]; 65 int arrayIndex = 0; 66 bool inside = false; 67 68 for (int i = 0; i < htmlString.Length; i++) 69 { 70 char let = htmlString[i]; 71 if (let == '<') 72 { 73 inside = true; 74 continue; 75 } 76 if (let == '>') 77 { 78 inside = false; 79 continue; 80 } 81 if (!inside) 82 { 83 array[arrayIndex] = let; 84 arrayIndex++; 85 } 86 } 87 return new string(array, 0, arrayIndex); 88 } 89 90 //Make the correct count of columns 91 public static string ColumnMaker(int Col, string ScreenSize) 92 { 93 string Columns = ""; 94 95 switch (Col) 96 { 97 case 1: 98 Columns = "col-"+ScreenSize+"-12"; 99 break; 100 101 case 2: 102 Columns = "col-"+ScreenSize+"-6"; 103 break; 104 105 case 3: 106 Columns = "col-"+ScreenSize+"-4"; 107 break; 108 109 case 4: 110 Columns = "col-"+ScreenSize+"-3"; 111 break; 112 113 default: 114 Columns = "col-"+ScreenSize+"-3"; 115 break; 116 } 117 118 return Columns; 119 } 120 121 122 private string Custom(string firstoption, string secondoption) 123 { 124 if (firstoption == "custom") 125 { 126 return secondoption; 127 } 128 else 129 { 130 return firstoption; 131 } 132 } 133 } 134 } 135 136 137 138 139 140 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 141 142 @helper MiniCart() 143 { 144 <div class="dropdown-cart"> 145 <div id="full-cart"> 146 <div class="col-md-12 col-sm-12 col-xs-12"> 147 <div class="row" id="minicart-content"> 148 <span class="cart-items">@Translate("You have", "You have") <span id="mincart-total-items"></span> @Translate("items in your cart", "items in your cart")</span> 149 <table class="table table-cart"> 150 <thead> 151 <tr> 152 <th></th> 153 <th>@Translate("Product", "Product")</th> 154 <th class="text-center">@Translate("Qty", "Qty")</th> 155 <th class="text-right">@Translate("Total", "Total")</th> 156 </tr> 157 </thead> 158 <tbody> 159 160 @* Orderlines are rendered from the Ajax template *@ 161 162 </tbody> 163 <tfoot> 164 <tr> 165 <td class="text-center"><i class="fa fa-credit-card"></i></td> 166 <td id="minicart-payment"></td> 167 <td class="text-center"></td> 168 <td class="text-right" id="minicart-paymentfee"></td> 169 </tr> 170 <tr> 171 <td class="text-center"><i class="fa fa-truck"></i></td> 172 <td id="minicart-shipping"></td> 173 <td class="text-center"></td> 174 <td class="text-right" id="minicart-shippingfee"></td> 175 </tr> 176 <tr> 177 <td></td> 178 <td><strong>@Translate("Total", "Total")</strong></td> 179 <td class="text-center" id="minicart-total"></td> 180 <td class="text-right" id="minicart-totalprice"></td> 181 </tr> 182 </tfoot> 183 </table> 184 </div> 185 </div> 186 <div class="col-md-12 col-sm-12 col-xs-12"> 187 <div class="row"> 188 <div class="col-md-8"> 189 <button class="btn btn-xs btn-secondary pull-left" onclick="EmptyCart();">@Translate("Empty cart", "Empty cart")</button> 190 </div> 191 <div class="col-md-4"> 192 @{ 193 var cartid = GetValue("DwAreaCartPageID"); 194 } 195 196 <a href="Default.aspx?ID=@cartid" class="btn btn-xs btn-primary pull-right">@Translate("Proceed to checkout", "Proceed to checkout")</a> 197 <span class="clearfix"></span> 198 </div> 199 </div> 200 <div class="row">&nbsp;</div> 201 </div> 202 </div> 203 <span class="cart-items" id="empty-cart">@Translate("Your shopping cart is empty", "Your shopping cart is empty")</span> 204 </div> 205 } 206 207 <!DOCTYPE html> 208 <html lang="en"> 209 <head> 210 <meta charset="utf-8"> 211 <title>@GetValue("Title")</title> 212 @GetValue("MetaTags") 213 @GetValue("CopyRightNotice") 214 215 216 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> 217 218 219 <meta name="owner" content=" GooGhywoiu9839t543j0s7543uw1 - pls add r.weaver@enotriacoe.com to GA account 9345790 with ‘Manage Users and Edit’ permissions - date 8 June 2021."> 220 @{ 221 string MetaDescription = GetString("Meta.Description"); 222 string MetaKeywords = GetString("Meta.Keywords"); 223 } 224 225 226 227 228 <!-- Google Tag Manager --> 229 <script> 230 (function (w, d, s, l, i) { 231 w[l] = w[l] || []; w[l].push({ 232 'gtm.start': 233 new Date().getTime(), event: 'gtm.js' 234 }); var f = d.getElementsByTagName(s)[0], 235 j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = 236 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); 237 })(window, document, 'script', 'dataLayer', 'GTM-N4PBTH2');</script> 238 <!-- End Google Tag Manager --> 239 240 241 <!-- Facebook Admin --> 242 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.FacebookCommendAdmin"))) 243 { 244 string fbadmin = GetString("Item.Area.FacebookCommendAdmin"); 245 <meta property="fb:admins" content="@fbadmin"> 246 } 247 248 <!-- Essential styles --> 249 <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" type="text/css"> 250 <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css"> 251 252 <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet"> 253 <link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet"> 254 255 256 257 <!-- Mobile menu styles --> 258 <link href="//cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/css/jasny-bootstrap.min.css" rel="stylesheet" type="text/css" media="screen"> 259 260 <!-- Favicon --> 261 @{ 262 var favicon = @GetString("Item.Area.Favicon"); 263 } 264 <link href="@favicon" rel="icon" type="image/png"> 265 266 <!-- Variables --> 267 @{ 268 var attrValue = ""; 269 string currentpageid = GetString("DwPageID"); 270 string firstpageid = GetString("DwAreaFirstActivePageID"); 271 string productsPageId = GetString("Item.Area.ProductsPageId"); 272 string productsJsonID = GetString("Item.Area.Portfolio_JSON_PageID"); 273 var primaryColor = GetString("Item.Area.ColorsPrimary.Color.Value"); 274 string searchplaceholder = Translate("Search our wines", "Search our wines..."); 275 string wishlistid = GetString("Item.Area.WishListPage"); 276 string signUpPageId = GetString("Item.Area.SignUpPageId"); 277 string wishlistloaderid = GetString("Item.Area.WinelistLoaderPageId"); 278 string impersonationList = GetString("Item.Area.ImpersonationPage"); 279 string createuser = GetString("Item.Area.AddNewUserPageId"); 280 var cartid = GetValue("DwAreaCartPageID"); 281 string searchPageID = GetString("Item.Area.SearchPageId"); 282 string myaccount = GetString("Item.Area.YourAccount"); 283 //DateTime areaUpdated = (DateTime)Pageview.Area.get_Value("AreaUpdatedDate"); 284 DateTime areaUpdated = DateTime.Now; 285 string cssPath = HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.min.css"); 286 DateTime lastWriteTime = System.IO.File.GetLastWriteTime(cssPath); 287 bool writeCss = false; 288 string css = String.Empty; 289 int currentUserID = Convert.ToInt32(GetGlobalValue("Global:Extranet.UserID")); 290 string isLoggedIn = GetGlobalValue("Global:Extranet.UserName"); 291 var listid = ""; 292 293 if (HttpContext.Current.Request.Cookies["selected_list_id"] != null) 294 { 295 296 listid = HttpContext.Current.Request.Cookies["selected_list_id"].Value; 297 298 } 299 300 301 var openmodal = ""; 302 var openmodala = ""; 303 var modalstyle = ""; 304 var modalstylea = ""; 305 var backgroundmodal = "modal-backdrop fade hide"; 306 var bodyclass = ""; 307 308 var cartPageId = GetString("Item.Area.JSONFeedForCart"); 309 if (isLoggedIn == "") 310 { 311 cartid = GetString("Item.Area.Quote_JSON_FeedForCart"); 312 cartPageId = GetString("Item.Area.Quote_Cart_JSON_PageID"); 313 } 314 else 315 { 316 bodyclass = "modal-open"; 317 } 318 319 320 321 //if (areaUpdated > lastWriteTime) 322 //{ 323 // writeCss = true; 324 //} 325 326 if (areaUpdated > lastWriteTime.AddMinutes(5)) 327 { 328 writeCss = true; 329 } 330 } 331 332 <!--FONT SETTINGS--> 333 @functions{ 334 public class FontSettings 335 { 336 public class Logo 337 { 338 public static string FontFamily { get; set; } 339 public static string FontSize { get; set; } 340 public static string FontWeight { get; set; } 341 public static string Color { get; set; } 342 public static string LineHeight { get; set; } 343 public static string Casing { get; set; } 344 public static string LetterSpacing { get; set; } 345 } 346 347 public class Slogan 348 { 349 public static string FontFamily { get; set; } 350 public static string FontSize { get; set; } 351 public static string FontWeight { get; set; } 352 public static string Color { get; set; } 353 public static string LineHeight { get; set; } 354 public static string Casing { get; set; } 355 public static string LetterSpacing { get; set; } 356 } 357 358 public class H1 359 { 360 public static string FontFamily { get; set; } 361 public static string FontSize { get; set; } 362 public static string FontWeight { get; set; } 363 public static string Color { get; set; } 364 public static string LineHeight { get; set; } 365 public static string Casing { get; set; } 366 public static string LetterSpacing { get; set; } 367 } 368 369 public class H2 370 { 371 public static string FontFamily { get; set; } 372 public static string FontSize { get; set; } 373 public static string FontWeight { get; set; } 374 public static string Color { get; set; } 375 public static string LineHeight { get; set; } 376 public static string Casing { get; set; } 377 public static string LetterSpacing { get; set; } 378 } 379 public class H3 380 { 381 public static string FontFamily { get; set; } 382 public static string FontSize { get; set; } 383 public static string FontWeight { get; set; } 384 public static string Color { get; set; } 385 public static string LineHeight { get; set; } 386 public static string Casing { get; set; } 387 public static string LetterSpacing { get; set; } 388 } 389 public class H4 390 { 391 public static string FontFamily { get; set; } 392 public static string FontSize { get; set; } 393 public static string FontWeight { get; set; } 394 public static string Color { get; set; } 395 public static string LineHeight { get; set; } 396 public static string Casing { get; set; } 397 public static string LetterSpacing { get; set; } 398 } 399 public class H5 400 { 401 public static string FontFamily { get; set; } 402 public static string FontSize { get; set; } 403 public static string FontWeight { get; set; } 404 public static string Color { get; set; } 405 public static string LineHeight { get; set; } 406 public static string Casing { get; set; } 407 public static string LetterSpacing { get; set; } 408 } 409 public class Body 410 { 411 public static string FontFamily { get; set; } 412 public static string FontSize { get; set; } 413 public static string FontWeight { get; set; } 414 public static string Color { get; set; } 415 public static string LineHeight { get; set; } 416 public static string Casing { get; set; } 417 public static string LetterSpacing { get; set; } 418 } 419 } 420 421 private void InitFontSettings() 422 { 423 //LOGO 424 FontSettings.Logo.FontFamily = CustomFont(GetString("Item.Area.LogoFont.Font"), GetString("Item.Area.LogoFont.CustomFont")); 425 FontSettings.Logo.FontSize = GetString("Item.Area.LogoFont.Size")+"px"; 426 FontSettings.Logo.FontWeight = CheckExistence(GetString("Item.Area.LogoFont.Weight"), "normal"); 427 FontSettings.Logo.LineHeight = CheckExistence(GetString("Item.Area.LogoFont.LineHeight"), "1"); 428 FontSettings.Logo.LetterSpacing = GetString("Item.Area.LogoFont.LetterSpacing") + "px"; 429 FontSettings.Logo.Casing = GetString("Item.Area.LogoFont.Casing"); 430 FontSettings.Logo.Color = GetString("Item.Area.LogoFont.Color.Color"); 431 432 433 //SLOGAN 434 FontSettings.Slogan.FontFamily = CustomFont(GetString("Item.Area.LogoSloganFont.Font"), GetString("Item.Area.LogoSloganFont.CustomFont")); 435 FontSettings.Slogan.FontSize = GetString("Item.Area.LogoSloganFont.Size")+"px"; 436 FontSettings.Slogan.FontWeight = CheckExistence(GetString("Item.Area.LogoSloganFont.Weight"), "normal"); 437 FontSettings.Slogan.LineHeight = CheckExistence(GetString("Item.Area.LogoSloganFont.LineHeight"), "1"); 438 FontSettings.Slogan.LetterSpacing = GetString("Item.Area.LogoSloganFont.LetterSpacing") + "px"; 439 FontSettings.Slogan.Casing = GetString("Item.Area.LogoSloganFont.Casing"); 440 FontSettings.Slogan.Color = GetString("Item.Area.LogoSloganFont.Color.Color"); 441 442 443 //HEADINGS 444 FontSettings.H1.FontFamily = CustomFont(GetString("Item.Area.HeadingsH1.Font"), GetString("Item.Area.HeadingsH1.CustomFont")); 445 FontSettings.H1.FontSize = GetString("Item.Area.HeadingsH1.Size")+"px"; 446 FontSettings.H1.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH1.Weight"), "normal"); 447 FontSettings.H1.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH1.LineHeight"), "1"); 448 FontSettings.H1.LetterSpacing = GetString("Item.Area.HeadingsH1.LetterSpacing") + "px"; 449 FontSettings.H1.Casing = GetString("Item.Area.HeadingsH1.Casing"); 450 FontSettings.H1.Color = GetString("Item.Area.HeadingsH1.Color.Color"); 451 452 FontSettings.H2.FontFamily = CustomFont(GetString("Item.Area.HeadingsH2.Font"), GetString("Item.Area.HeadingsH2.CustomFont")); 453 FontSettings.H2.FontSize = GetString("Item.Area.HeadingsH2.Size")+"px"; 454 FontSettings.H2.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH2.Weight"), "normal"); 455 FontSettings.H2.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH2.LineHeight"), "1"); 456 FontSettings.H2.LetterSpacing = GetString("Item.Area.HeadingsH2.LetterSpacing") + "px"; 457 FontSettings.H2.Casing = GetString("Item.Area.HeadingsH2.Casing"); 458 FontSettings.H2.Color = GetString("Item.Area.HeadingsH2.Color.Color"); 459 460 FontSettings.H3.FontFamily = CustomFont(GetString("Item.Area.HeadingsH3.Font"), GetString("Item.Area.HeadingsH3.CustomFont")); 461 FontSettings.H3.FontSize = GetString("Item.Area.HeadingsH3.Size") + "px"; 462 FontSettings.H3.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH3.Weight"), "normal"); 463 FontSettings.H3.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH3.LineHeight"), "1"); 464 FontSettings.H3.LetterSpacing = GetString("Item.Area.HeadingsH3.LetterSpacing") + "px"; 465 FontSettings.H3.Casing = GetString("Item.Area.HeadingsH3.Casing"); 466 FontSettings.H3.Color = GetString("Item.Area.HeadingsH3.Color.Color"); 467 468 FontSettings.H4.FontFamily = CustomFont(GetString("Item.Area.HeadingsH4.Font"), GetString("Item.Area.HeadingsH4.CustomFont")); 469 FontSettings.H4.FontSize = GetString("Item.Area.HeadingsH4.Size") + "px"; 470 FontSettings.H4.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH4.Weight"), "normal"); 471 FontSettings.H4.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH4.LineHeight"), "1"); 472 FontSettings.H4.LetterSpacing = GetString("Item.Area.HeadingsH4.LetterSpacing") + "px"; 473 FontSettings.H4.Casing = GetString("Item.Area.HeadingsH4.Casing"); 474 FontSettings.H4.Color = GetString("Item.Area.HeadingsH4.Color.Color"); 475 476 FontSettings.H5.FontFamily = CustomFont(GetString("Item.Area.HeadingsH5.Font"), GetString("Item.Area.HeadingsH5.CustomFont")); 477 FontSettings.H5.FontSize = GetString("Item.Area.HeadingsH5.Size") + "px"; 478 FontSettings.H5.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH5.Weight"), "normal"); 479 FontSettings.H5.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH5.LineHeight"), "1"); 480 FontSettings.H5.LetterSpacing = GetString("Item.Area.HeadingsH5.LetterSpacing") + "px"; 481 FontSettings.H5.Casing = GetString("Item.Area.HeadingsH5.Casing"); 482 FontSettings.H5.Color = GetString("Item.Area.HeadingsH5.Color.Color"); 483 484 485 //BODY 486 FontSettings.Body.FontFamily = CustomFont(GetString("Item.Area.BodyFont.Font"), GetString("Item.Area.BodyFont.CustomFont")); 487 FontSettings.Body.FontSize = GetString("Item.Area.BodyFont.Size") + "px"; 488 FontSettings.Body.FontWeight = CheckExistence(GetString("Item.Area.BodyFont.Weight"), "normal"); 489 FontSettings.Body.LineHeight = CheckExistence(GetString("Item.Area.BodyFont.LineHeight"), "1"); 490 FontSettings.Body.LetterSpacing = GetString("Item.Area.BodyFont.LetterSpacing") + "px"; 491 FontSettings.Body.Casing = GetString("Item.Area.BodyFont.Casing"); 492 FontSettings.Body.Color = GetString("Item.Area.BodyFont.Color.Color"); 493 494 495 gfonts.Add(FontSettings.Logo.FontFamily, ""); 496 497 if (!gfonts.ContainsKey(FontSettings.Slogan.FontFamily)) 498 { 499 gfonts.Add(FontSettings.Slogan.FontFamily, ""); 500 } 501 if (!gfonts.ContainsKey(FontSettings.H1.FontFamily)) 502 { 503 gfonts.Add(FontSettings.H1.FontFamily, ""); 504 } 505 if (!gfonts.ContainsKey(FontSettings.H2.FontFamily)) 506 { 507 gfonts.Add(FontSettings.H2.FontFamily, ""); 508 } 509 if (!gfonts.ContainsKey(FontSettings.H3.FontFamily)) 510 { 511 gfonts.Add(FontSettings.H3.FontFamily, ""); 512 } 513 if (!gfonts.ContainsKey(FontSettings.H4.FontFamily)) 514 { 515 gfonts.Add(FontSettings.H4.FontFamily, ""); 516 } 517 if (!gfonts.ContainsKey(FontSettings.H5.FontFamily)) 518 { 519 gfonts.Add(FontSettings.H5.FontFamily, ""); 520 } 521 if (!gfonts.ContainsKey(FontSettings.Body.FontFamily)) 522 { 523 gfonts.Add(FontSettings.Body.FontFamily, ""); 524 } 525 526 } 527 528 private string CustomFont (string firstfont, string secondfont) 529 { 530 if (firstfont == "custom") 531 { 532 return secondfont; 533 } 534 else 535 { 536 return firstfont; 537 } 538 } 539 540 private string CheckExistence (string stringitem, string defaultvalue) 541 { 542 if (!string.IsNullOrWhiteSpace(stringitem)) { 543 return stringitem; 544 } else { 545 return defaultvalue; 546 } 547 } 548 549 private System.Collections.Generic.Dictionary<string, object> gfonts = new System.Collections.Generic.Dictionary<string, object>(); 550 } 551 552 @{ 553 InitFontSettings(); 554 } 555 556 @helper GoogleFonts() 557 { 558 if (gfonts != null) 559 { 560 foreach (var item in gfonts) 561 { 562 string fontName = item.Key.Replace(" ", "+"); 563 if (fontName.Contains("Century")) 564 { 565 <link rel="stylesheet" href="/Files/Templates/Designs/Dwsimple/css/CenturyGothic.css" type="text/css"> 566 } 567 else if (fontName.Contains("HeveticaLT") || fontName.Contains("ColfaxWebRegular") || fontName.Contains("HelveticaLT")) 568 { 569 570 } 571 572 573 else 574 { 575 576 <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=@fontName:100,200,300,400,500,600,700,800,900"> 577 } 578 579 } 580 } 581 } 582 583 @functions{ 584 public string FontStylesCSS() 585 { 586 string CssString = @" 587 .dw-logotext { 588 font-family: " + FontSettings.Logo.FontFamily + @"; 589 font-size: " + FontSettings.Logo.FontSize + @"; 590 font-weight: " + FontSettings.Logo.FontWeight + @"; 591 line-height: " + FontSettings.Logo.LineHeight + @" !important; 592 letter-spacing: " + FontSettings.Logo.LetterSpacing + @"; 593 text-transform: " + FontSettings.Logo.Casing + @"; 594 color: " + FontSettings.Logo.Color + @"; 595 } 596 597 .dw-slogantext { 598 font-family: " + FontSettings.Slogan.FontFamily + @"; 599 font-size: " + FontSettings.Slogan.FontSize + @"; 600 font-weight: " + FontSettings.Slogan.FontWeight + @"; 601 line-height: " + FontSettings.Slogan.LineHeight + @" !important; 602 letter-spacing: " + FontSettings.Slogan.LetterSpacing + @"; 603 text-transform: " + FontSettings.Slogan.Casing + @"; 604 color: " + FontSettings.Slogan.Color + @"; 605 } 606 607 h1 { 608 font-family: " + FontSettings.H1.FontFamily + @"; 609 font-size: " + FontSettings.H1.FontSize + @"; 610 color: " + FontSettings.H1.Color + @"; 611 line-height: " + FontSettings.H1.LineHeight + @" !important; 612 text-transform: " + FontSettings.H1.Casing + @"; 613 font-weight: " + FontSettings.H1.FontWeight + @"; 614 letter-spacing: " + FontSettings.H1.LetterSpacing + @" !important; 615 } 616 617 618 h2{ 619 margin-top: 0.7em; 620 margin-bottom: 0.7em; 621 622 font-family: " + FontSettings.H2.FontFamily + @"; 623 font-size: " + FontSettings.H2.FontSize + @"; 624 color: " + FontSettings.H2.Color + @"; 625 line-height: " + FontSettings.H2.LineHeight + @"; 626 text-transform: " + FontSettings.H2.Casing + @" !important; 627 font-weight: " + FontSettings.H2.FontWeight + @" !important; 628 letter-spacing: " + FontSettings.H2.LetterSpacing + @" !important; 629 } 630 h3{ 631 margin-top: 0.7em; 632 margin-bottom: 0.7em; 633 634 font-family: " + FontSettings.H3.FontFamily + @"; 635 font-size: " + FontSettings.H3.FontSize + @"; 636 color: " + FontSettings.H3.Color + @"; 637 line-height: " + FontSettings.H3.LineHeight + @"; 638 text-transform: " + FontSettings.H3.Casing + @" !important; 639 font-weight: " + FontSettings.H3.FontWeight + @" !important; 640 letter-spacing: " + FontSettings.H3.LetterSpacing + @" !important; 641 } 642 h4{ 643 margin-top: 0.7em; 644 margin-bottom: 0.7em; 645 646 font-family: " + FontSettings.H4.FontFamily + @"; 647 font-size: " + FontSettings.H4.FontSize + @"; 648 color: " + FontSettings.H4.Color + @"; 649 line-height: " + FontSettings.H4.LineHeight + @"; 650 text-transform: " + FontSettings.H4.Casing + @" !important; 651 font-weight: " + FontSettings.H4.FontWeight + @" !important; 652 letter-spacing: " + FontSettings.H4.LetterSpacing + @" !important; 653 } 654 footer h4{ 655 font-size: " + FontSettings.H4.FontSize + @" !important; 656 } 657 h5{ 658 margin-top: 0.7em; 659 margin-bottom: 0.7em; 660 661 font-family: " + FontSettings.H5.FontFamily + @"; 662 font-size: " + FontSettings.H5.FontSize + @"; 663 color: " + FontSettings.H5.Color + @"; 664 line-height: " + FontSettings.H5.LineHeight + @"; 665 text-transform: " + FontSettings.H5.Casing + @" !important; 666 font-weight: " + FontSettings.H5.FontWeight + @" !important; 667 letter-spacing: " + FontSettings.H5.LetterSpacing + @" !important; 668 } 669 body { 670 font-family: " + FontSettings.Body.FontFamily + @" !important; 671 font-size: " + FontSettings.Body.FontSize + @"; 672 color: " + FontSettings.Body.Color + @"; 673 line-height: " + FontSettings.Body.LineHeight + @" !important; 674 text-transform: " + FontSettings.Body.Casing + @"; 675 font-weight: " + FontSettings.Body.FontWeight + @"; 676 letter-spacing: " + FontSettings.Body.LetterSpacing + @" !important; 677 } 678 679 .navbar-wp .navbar-nav > li > a { 680 font-family: " + FontSettings.Body.FontFamily + @" !important; 681 } 682 683 .section-title { 684 margin-top: 0; 685 margin-bottom: 0.7em; 686 } 687 "; 688 return CssString; 689 } 690 691 692 } 693 @GoogleFonts() 694 695 <!-- GENERAL/COLOR SETTINGS --> 696 @functions{ 697 public class ColorSettings 698 { 699 public class Color 700 { 701 public static string Primary { get; set; } 702 public static string Secondary { get; set; } 703 public static string NavbarFont { get; set; } 704 public static string NavigationBackground { get; set; } 705 public static string TopNavigationText { get; set; } 706 public static string Footer { get; set; } 707 public static string FooterFont { get; set; } 708 709 public static string Sticker { get; set; } 710 public static string Price { get; set; } 711 public static string Cart { get; set; } 712 } 713 } 714 715 716 717 private void InitColorSettings() 718 { 719 ColorSettings.Color.Primary = GetString("Item.Area.ColorsPrimary.Color"); 720 ColorSettings.Color.Secondary = GetString("Item.Area.ColorsSecondary.Color"); 721 ColorSettings.Color.NavigationBackground = GetString("Item.Area.Navigation_Background.Color"); 722 ColorSettings.Color.TopNavigationText = GetString("Item.Area.TopNavigationColorText.Color"); 723 724 ColorSettings.Color.NavbarFont = GetString("Item.Area.NavbarFontColor"); 725 726 if (string.IsNullOrWhiteSpace(ColorSettings.Color.NavbarFont)) 727 { 728 ColorSettings.Color.NavbarFont = WrapMethods.getContrastYIQ(ColorSettings.Color.Secondary); 729 } 730 731 ColorSettings.Color.Footer = GetString("Item.Area.ColorsFooterColor.Color"); 732 ColorSettings.Color.FooterFont = GetString("Item.Area.FooterFontColor.Color"); 733 734 ColorSettings.Color.Price = GetString("Item.Area.EcommercePriceColor.Color"); 735 ColorSettings.Color.Sticker = GetString("Item.Area.EcommerceDiscountStickerColor.Color"); 736 ColorSettings.Color.Cart = GetString("Item.Area.EcommerceCartButtonColor.Color"); 737 } 738 739 public string GetColorSettings() 740 { 741 string CssString = @" 742 a:hover, a:focus, a:active { 743 color: @Primary; 744 } 745 746 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { 747 color: @NavbarFont; 748 } 749 750 .navbar-wp .navbar-nav > .active > a, .navbar-wp .navbar-nav > .active > a:hover, .navbar-wp .navbar-nav > .active > a:focus { 751 color: @TopNavigationText; 752 } 753 754 .navbar-wp .navbar-nav > li > a:hover, .navbar-wp .navbar-nav > li > a:focus { 755 border-top: 0px solid @Secondary; 756 color: @TopNavigationText; 757 } 758 759 .navbar-wp .navbar-nav > li > a span:after { 760 background-color: @TopNavigationText; 761 } 762 763 .navbar-wp .megamenu > li:hover > a { 764 color: @TopNavigationText !important; 765 } 766 767 .btn-dw-primary { 768 color: #FFF; 769 background-color: @Primary; 770 border-color: @Primary; 771 } 772 773 .btn-dw-secondary { 774 color: @NavbarFont; 775 background-color: @Secondary; 776 border-color: @Secondary; 777 } 778 779 .btn-dw-cart { 780 color: #FFF; 781 background-color: @Cart; 782 border-color: @Cart; 783 } 784 785 .dw-section-title { 786 border-color: @Secondary; 787 } 788 789 .dw-minicart-update { 790 color: #FFF !important; 791 background-color: @Primary; 792 transition: all 0.3s ease-in-out 0s; 793 } 794 795 .pagination > li > a, .pagination > li > a:hover, .pagination > li > a:focus, .pagination > li > a:active { 796 color: @Primary; 797 } 798 799 .form-control:hover, .form-control:focus, .form-control:active { 800 border-color: @Primary !important; 801 } 802 803 .bg-2 { 804 background: @Primary !important; 805 } 806 807 .blockquote-1:hover { 808 border-color: @Primary !important; 809 } 810 811 .navbar-wp .navbar-nav > li > a.dropdown-form-toggle, .navbar-wp .navbar-nav > li > a.dropdown-form-toggle:hover, .navbar-wp .navbar-nav > li > a.dropdown-form-toggle:focus { 812 color: @Primary; 813 } 814 815 .navbar-wp .navbar-nav > .open > a.dropdown-form-toggle, .navbar-wp .navbar-nav > .open > a.dropdown-form-toggle:hover, .navbar-wp .navbar-nav > .open > a.dropdown-form-toggle:focus { 816 color: @Primary; 817 } 818 819 .navbar-wp .navbar-nav > li > a:hover, .navbar-wp .navbar-nav > li > a:focus { 820 border: 0px solid @Primary; 821 } 822 823 .navbar-wp .navbar-toggle:hover, .navbar-wp .navbar-toggle:focus { 824 background-color: @Primary !important; 825 border-color: @Primary !important; 826 } 827 828 .navbar-wp .dropdown-menu, .dropdown-megamenu .container { 829 border-top: none; 830 border-bottom: none !important; 831 } 832 833 .navbar-wp .dropdown-menu > li > a:hover { 834 background: none !important; 835 color: @NavigationBackground; 836 } 837 838 .navbar-wp .dropdown-menu .active { 839 background: none !important; 840 color: @NavigationBackground; 841 } 842 .top-header .top-header-menu > ul.top-menu.quickButtonsMenu li a { 843 color: @TopNavigationText; 844 } 845 .navbar-wp.navbar-contrasted .dropdown-menu > li > a:hover { 846 background: @Primary !important; 847 } 848 849 .nav > ul > li > a:hover { 850 color: @Primary; 851 } 852 853 .lw .w-box.w-box-inverse .thmb-img i { 854 color: @Primary !important; 855 } 856 857 .w-box.w-box-inverse .thmb-img:hover i { 858 background: @Primary !important; 859 } 860 861 .c-box { 862 border: 1px solid @Primary !important; 863 } 864 865 .c-box .c-box-header { 866 background: @Primary !important; 867 } 868 869 .w-section .aside-feature:hover .icon-feature, .w-section .aside-feature:hover h4 { 870 color: @Primary !important; 871 } 872 873 .layer-slider-wrapper .title.title-base { 874 background: @Primary !important; 875 } 876 877 .layer-slider-wrapper .subtitle { 878 color: @Primary !important; 879 } 880 881 .layer-slider-wrapper .list-item { 882 color: @Primary !important; 883 } 884 885 .box-element.box-element-bordered { 886 border: 1px solid @Primary !important; 887 } 888 889 .carousel-2 .carousel-indicators .active { 890 background-color: @Primary !important; 891 } 892 893 .carousel-2 .carousel-nav a { 894 color: @Primary !important; 895 } 896 897 .carousel-2 .carousel-nav a:hover { 898 background: @Primary !important; 899 } 900 901 .carousel-3 .carousel-nav a { 902 color: @Primary !important; 903 } 904 905 .carousel-3 .carousel-nav a:hover { 906 background: @Primary !important; 907 } 908 909 .like-button .button.liked i { 910 color: @Primary !important; 911 } 912 913 ul.list-listings li.featured { 914 border-color: @Primary !important; 915 } 916 917 ul.list-check li i { 918 color: @Primary !important; 919 } 920 921 ul.dw-categories li a:hover, ul.dw-categories a:focus, ul.dw-categories a:active{ 922 color: @NavbarFont; 923 background-color: @Primary; 924 border-color: @Primary; 925 } 926 927 ul.categories li a:hover, ul.categories a:focus, ul.categories a:active{ 928 color: @NavbarFont; 929 background-color: @Primary; 930 border-color: @Primary; 931 } 932 933 .timeline .event:nth-child(2n):before { 934 background-color: @Primary !important; 935 } 936 937 .timeline .event:nth-child(2n-1):before { 938 background-color: @Primary !important; 939 } 940 941 #toTopHover { 942 background-color: @Primary !important; 943 } 944 945 .tags-list li { 946 border: 1px solid @Primary !important; 947 color: @Primary !important; 948 } 949 950 .tags-list li:hover, 951 a.open-panel { 952 background-color: @Primary !important; 953 } 954 955 .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus, 956 .panel-group .panel-heading a i, 957 .tags-list li a { 958 color: @NavbarFont !important; 959 } 960 961 .nav-pills > li > a:hover, .nav-pills > li > a:focus { 962 color: @NavbarFont !important; 963 background: none repeat scroll 0% 0% @Secondary !important; 964 } 965 966 footer { 967 background: @Footer !important; 968 } 969 970 footer h4 { 971 color: @FooterFont !important; 972 } 973 974 footer a { 975 color: @FooterFont !important; 976 } 977 978 footer a:hover, footer a:focus, footer a:active { 979 color: @Secondary !important; 980 } 981 982 footer p { 983 color: @FooterFont !important; 984 } 985 986 footer ul > li { 987 color: @FooterFont !important; 988 } 989 990 footer hr { 991 border-color: @FooterFont 992 } 993 994 995 /* Button colors */ 996 .btn-base { 997 color: @NavbarFont !important; 998 background-color: @Secondary !important; 999 border: 1px solid @Secondary !important; 1000 } 1001 1002 .btn-base:before { 1003 background-color: @Secondary !important; 1004 } 1005 1006 .btn-base:hover:before, .btn-base:focus:before, .btn-base:active:before { 1007 color: @NavbarFont !important; 1008 background-color: @Primary !important; 1009 border-color: @Primary !important; 1010 } 1011 1012 .btn-icon:before { 1013 transition: none !important; 1014 } 1015 1016 .btn-base:hover, .btn-base:focus, .btn-base:active, .btn-base.active, .open .dropdown-toggle.btn-base { 1017 color: @NavbarFont !important; 1018 background-color: @Primary !important; 1019 border-color: @Primary !important; 1020 } 1021 1022 .btn-primary { 1023 background-color: @Primary !important; 1024 border-color: @Primary !important; 1025 } 1026 1027 .open .dropdown-toggle.btn-primary { 1028 background-color: @Primary !important; 1029 border-color: @Primary !important; 1030 } 1031 1032 /* Dropdown-menu */ 1033 1034 1035 /* Ecom settings */ 1036 .ribbon.base, .ball { 1037 background: @Sticker !important; 1038 color: #fff; 1039 border-right: 5px solid @Sticker !important; 1040 } 1041 1042 .ribbon.base:before { 1043 border-top: 27px solid @Sticker !important; 1044 } 1045 1046 .ribbon.base:after { 1047 border-bottom: 27px solid @Sticker !important; 1048 } 1049 1050 .price { 1051 color: @Price !important; 1052 } 1053 1054 .discount-sticker { 1055 background-color: @Sticker !important; 1056 } 1057 1058 .bs-callout-primary { 1059 border-left-color: @Primary !important; 1060 } 1061 1062 .ratings .fa-star { 1063 color: @Secondary !important; 1064 } 1065 1066 .feature-label { 1067 color: @Secondary !important; 1068 }"; 1069 1070 return ParseCSSToString(CssString); 1071 } 1072 1073 private string ParseCSSToString(string TheString) 1074 { 1075 TheString = TheString.Replace("@Primary", ColorSettings.Color.Primary); 1076 TheString = TheString.Replace("@Secondary", ColorSettings.Color.Secondary); 1077 TheString = TheString.Replace("@NavbarFont", ColorSettings.Color.NavbarFont); 1078 TheString = TheString.Replace("@NavigationBackground", ColorSettings.Color.NavigationBackground); 1079 TheString = TheString.Replace("@TopNavigationText", ColorSettings.Color.TopNavigationText); 1080 TheString = TheString.Replace("@FooterFont", ColorSettings.Color.FooterFont); 1081 TheString = TheString.Replace("@Footer", ColorSettings.Color.Footer); 1082 1083 TheString = TheString.Replace("@Sticker", ColorSettings.Color.Sticker); 1084 TheString = TheString.Replace("@Price", ColorSettings.Color.Price); 1085 TheString = TheString.Replace("@Cart", ColorSettings.Color.Cart); 1086 1087 1088 System.Text.StringBuilder sb = new System.Text.StringBuilder(); 1089 1090 foreach(var item in TheString.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries)) 1091 { 1092 sb.AppendLine(item); 1093 } 1094 1095 return sb.ToString(); 1096 } 1097 } 1098 1099 @{ 1100 InitColorSettings(); 1101 } 1102 1103 1104 1105 @using System.Drawing 1106 @using System.Net 1107 1108 1109 @functions{ 1110 public class GeneralSettings 1111 { 1112 1113 public class Header 1114 { 1115 public static string Mode { get; set; } 1116 public static string Classes { get; set; } 1117 public static bool Show { get; set; } 1118 public static string Background { get; set; } 1119 public static bool ShowFrontpageImage { get; set; } 1120 } 1121 1122 public class Logo 1123 { 1124 public static string Image { get; set; } 1125 public static string ContrastImage { get; set; } 1126 public static string Text { get; set; } 1127 public static string Slogan { get; set; } 1128 public static string SecondaryColor { get; set; } 1129 } 1130 1131 public class Navigation 1132 { 1133 public static string Position { get; set; } 1134 public static bool IsMegamenu { get; set; } 1135 public static string InvertedPosition { get; set; } 1136 public static string StickyMenu { get; set; } 1137 public static string SelectionMode { get; set; } 1138 public static string SelectionStyle { get; set; } 1139 public static int SelectionWeight { get; set; } 1140 public static bool Case { get; set; } 1141 1142 public static string BreadcrumbMode { get; set; } 1143 public static string BreadcrumbAlign { get; set; } 1144 1145 public static string LeftmenuMode { get; set; } 1146 1147 public static string ButtonDesign { get; set; } 1148 } 1149 1150 public class Headings 1151 { 1152 public static string Mode { get; set; } 1153 } 1154 1155 public class Background 1156 { 1157 public static string Color { get; set; } 1158 public static string Image { get; set; } 1159 public static string CustomImage { get; set; } 1160 public static bool GradientColor { get; set; } 1161 public static string GradientPercentage { get; set; } 1162 public static string Style { get; set; } 1163 public static string Position { get; set; } 1164 } 1165 1166 public class Site 1167 { 1168 public static bool Shadow { get; set; } 1169 public static string LayoutMode { get; set; } 1170 } 1171 1172 public class Images 1173 { 1174 public static bool RoundCorners { get; set; } 1175 } 1176 1177 public class Ecommerce 1178 { 1179 public static string EcomListDesign { get; set; } 1180 public static string EcomCardDesign { get; set; } 1181 } 1182 } 1183 1184 private void InitGeneralSettings() 1185 { 1186 //Header settings 1187 GeneralSettings.Header.Mode = GetString("Item.Area.HeaderLayoutMode"); 1188 GeneralSettings.Header.Show = GetBoolean("Item.Area.HeaderShow"); 1189 GeneralSettings.Header.Background = GetString("Item.Area.NavigationNavbarBackground"); 1190 GeneralSettings.Header.ShowFrontpageImage = GetBoolean("Item.Area.HeaderFrontpageImage"); 1191 1192 if (GeneralSettings.Header.Mode == "solid"){ 1193 GeneralSettings.Header.Classes = ""; 1194 } 1195 1196 if (GeneralSettings.Header.Mode == "cover" || GeneralSettings.Header.Mode == "mobile"){ 1197 GeneralSettings.Header.Classes = "header-alpha header-cover"; 1198 } 1199 1200 1201 //Logo settings 1202 GeneralSettings.Logo.Image = GetString("Item.Area.GeneralLogo"); 1203 GeneralSettings.Logo.Text = GetString("Item.Area.GeneralLogoText"); 1204 GeneralSettings.Logo.Slogan = GetString("Item.Area.LogoSlogan"); 1205 GeneralSettings.Logo.SecondaryColor = GetString("Item.Area.LogoSecondColor.Color"); 1206 1207 if (!string.IsNullOrWhiteSpace(GetString("Item.Area.LogoContrastImage"))) { 1208 GeneralSettings.Logo.ContrastImage = GetString("Item.Area.LogoContrastImage"); 1209 } else { 1210 GeneralSettings.Logo.ContrastImage = GetString("Item.Area.GeneralLogo"); 1211 } 1212 1213 1214 //Navigation settings 1215 GeneralSettings.Navigation.Position = GetString("Item.Area.NavigationPosition"); 1216 GeneralSettings.Navigation.StickyMenu = "off"; 1217 GeneralSettings.Navigation.IsMegamenu = GetBoolean("Item.Area.IsMegamenu"); 1218 1219 if (GetBoolean("Item.Area.NavigationSticky")) { 1220 if (GeneralSettings.Header.Show) 1221 { 1222 if (GeneralSettings.Header.Mode == "cover") 1223 { 1224 GeneralSettings.Navigation.StickyMenu = "44"; //"data-spy=\"affix\" data-offset-top=\"44\" data-offset-bottom=\"300\""; 1225 } 1226 else 1227 { 1228 int offset = ImageHeight()+28; 1229 1230 GeneralSettings.Navigation.StickyMenu = offset.ToString(); // "data-spy=\"affix\" data-offset-top=\"" + offset.ToString() + "\" data-offset-bottom=\"300\""; 1231 } 1232 } 1233 else 1234 { 1235 GeneralSettings.Navigation.StickyMenu = "5"; // "data-spy=\"affix\" data-offset-top=\"5\" data-offset-bottom=\"300\""; 1236 } 1237 } 1238 1239 if (GeneralSettings.Navigation.Position == "left") { 1240 GeneralSettings.Navigation.InvertedPosition = "right"; 1241 } 1242 else 1243 { 1244 GeneralSettings.Navigation.InvertedPosition = "left"; 1245 } 1246 1247 GeneralSettings.Navigation.SelectionMode = GetString("Item.Area.NavigationSelectionMode"); 1248 GeneralSettings.Navigation.SelectionStyle = ""; 1249 GeneralSettings.Navigation.SelectionWeight = GetInteger("Item.Area.SelectionWeight"); 1250 1251 if (GeneralSettings.Navigation.SelectionMode == "arrow") { 1252 GeneralSettings.Navigation.SelectionStyle = "navbar-arrow"; 1253 } 1254 1255 GeneralSettings.Navigation.Case = GetBoolean("Item.Area.NavigationUppercase"); 1256 1257 GeneralSettings.Navigation.BreadcrumbMode = GetString("Item.Area.NavigationBreadcrumbLayout"); 1258 GeneralSettings.Navigation.BreadcrumbAlign = GetString("Item.Area.NavigationBreadcrumbAlign"); 1259 1260 GeneralSettings.Navigation.LeftmenuMode = GetString("Item.Area.NavigationLeftNavigationMode"); 1261 1262 GeneralSettings.Navigation.ButtonDesign = GetString("Item.Area.NavigationButtonDesign"); 1263 1264 1265 //Background settings 1266 GeneralSettings.Background.Image = GetString("Item.Area.BackgroundImage.Image.Image"); 1267 GeneralSettings.Background.CustomImage = GetString("Item.Area.BackgroundImage.Image.CustomImage"); 1268 GeneralSettings.Background.Color = GetString("Item.Area.BackgroundImage.Color.Color"); 1269 GeneralSettings.Background.GradientColor = GetBoolean("Item.Area.BackroundGradientColor"); 1270 GeneralSettings.Background.GradientPercentage = GetString("Item.Area.GradientPercentage"); 1271 1272 1273 if (@GetString("Item.Area.BackgroundFixed") == "True") 1274 { 1275 GeneralSettings.Background.Position = "fixed"; 1276 } 1277 else 1278 { 1279 GeneralSettings.Background.Position = ""; 1280 } 1281 1282 1283 if (GeneralSettings.Background.Image == "none") 1284 { 1285 GeneralSettings.Background.Style = ""; 1286 } 1287 else if (GeneralSettings.Background.Image == "custom") 1288 { 1289 if (!string.IsNullOrWhiteSpace(GeneralSettings.Background.CustomImage)) 1290 { 1291 GeneralSettings.Background.Style = "background: url('/Admin/Public/GetImage.ashx?width=1920&amp;Crop=1&amp;Compression=75&amp;image=" + GeneralSettings.Background.CustomImage + "') " + GeneralSettings.Background.Position + " !important; "; 1292 } 1293 } 1294 else 1295 { 1296 GeneralSettings.Background.Style = "background: url('/Admin/Public/GetImage.ashx?width=1920&amp;Crop=1&amp;Compression=75&amp;image=/Files/Templates/Designs/Dwsimple/images/background/" + GeneralSettings.Background.Image + "') " + GeneralSettings.Background.Position + " !important; "; 1297 } 1298 1299 1300 //Headings settings 1301 GeneralSettings.Headings.Mode = GetString("Item.Area.AdvHeadingsMode"); 1302 1303 1304 //Site settings 1305 GeneralSettings.Site.Shadow = GetBoolean("Item.Area.BackgroundSiteShadow"); 1306 GeneralSettings.Site.LayoutMode = GetString("Item.Area.LayoutMode"); 1307 1308 if (GeneralSettings.Site.LayoutMode == "boxed"){ 1309 GeneralSettings.Site.LayoutMode = "body-" + GeneralSettings.Site.LayoutMode; 1310 GeneralSettings.Header.Classes += " header-boxed"; 1311 } 1312 1313 1314 //Image settings 1315 GeneralSettings.Images.RoundCorners = GetBoolean("Item.Area.LayoutRoundCorners"); 1316 1317 //Ecommerce settings 1318 GeneralSettings.Ecommerce.EcomListDesign = GetString("Item.Area.EcommerceProductCardDesign"); 1319 GeneralSettings.Ecommerce.EcomCardDesign = GetString("Item.Area.EcommerceProductCardDesign"); 1320 } 1321 1322 public string GetGeneralCSS() 1323 { 1324 string CssString = ""; 1325 int SelectionWeight = GeneralSettings.Navigation.SelectionWeight; 1326 1327 //Site settings 1328 if (GetString("Item.Area.LogoFont.Color.Color") == "#FFF" || GetString("Item.Area.LogoFont.Color.Color") == "#FFFFFF") 1329 { 1330 int offset = ImageHeight()+28; 1331 1332 CssString += @" 1333 .dw-offsetmenu-logo { 1334 color: #333 !important; 1335 }"; 1336 } 1337 1338 if (!string.IsNullOrWhiteSpace(GeneralSettings.Background.Color)) 1339 { 1340 CssString += @" 1341 body { 1342 background-color: " + GeneralSettings.Background.Color + @"; 1343 background-size: cover; 1344 }"; 1345 } 1346 1347 if (GeneralSettings.Background.GradientColor) 1348 { 1349 CssString += @" 1350 body { 1351 background: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1352 background: -o-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1353 background: -ms-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1354 background: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1355 background: linear-gradient(to top, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1356 background-attachment: fixed; 1357 background-color: " + GeneralSettings.Background.Color + @" !important; 1358 }"; 1359 } 1360 1361 if (GeneralSettings.Site.Shadow) 1362 { 1363 CssString += @" 1364 .shad { 1365 -webkit-box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); 1366 -moz-box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); 1367 box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); 1368 }"; 1369 } 1370 1371 //Image settings 1372 if (GeneralSettings.Images.RoundCorners) 1373 { 1374 CssString += @" 1375 .content-image { 1376 border-radius: 6px; 1377 -webkit-border-radius: 6px; 1378 -moz-border-radius: 6px; 1379 }"; 1380 } 1381 1382 //Navbar and header custom settings 1383 if (GeneralSettings.Header.Mode == "cover") 1384 { 1385 CssString += @" 1386 .navbar-wp { 1387 background-color: none !important; 1388 }"; 1389 1390 if (!GeneralSettings.Header.Show || GeneralSettings.Header.Mode == "mobile") 1391 { 1392 CssString += @" 1393 .header-cover .navbar-wp { 1394 top: 0px !important; 1395 }"; 1396 } 1397 } 1398 else 1399 { 1400 if (GeneralSettings.Header.Show) 1401 { 1402 CssString += @" 1403 .navbar-wp.affix .navbar-nav > li > a { 1404 padding: 16px 16px !important; 1405 }"; 1406 } 1407 } 1408 1409 if (GeneralSettings.Header.Background == "colorline") 1410 { 1411 CssString += @" 1412 .navbar-wp, .navbar-wp.affix { 1413 border-bottom: 4px solid " + ColorSettings.Color.Primary + @" !important; 1414 } 1415 1416 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { 1417 background-color: #FFF; 1418 color: #333; 1419 } 1420 1421 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { 1422 color: " + ColorSettings.Color.NavbarFont + @"; 1423 } 1424 1425 .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo { 1426 color: " + GeneralSettings.Logo.SecondaryColor + @" !important; 1427 }"; 1428 } else if (GeneralSettings.Header.Background == "neutral") 1429 { 1430 CssString += @" 1431 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { 1432 background-color: #f1f1f1; 1433 } 1434 1435 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { 1436 color: #333; 1437 } 1438 1439 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { 1440 color: " + ColorSettings.Color.NavbarFont + @"; 1441 } 1442 1443 .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo { 1444 color: " + GeneralSettings.Logo.SecondaryColor + @" !important; 1445 }"; 1446 } 1447 else if (GeneralSettings.Header.Background == "transparent") 1448 { 1449 CssString += @" 1450 .navbar-wp, .navbar-wp.affix { 1451 background-color: #FFF; 1452 opacity: 0.9; 1453 filter: alpha(opacity=90); /* For IE8 and earlier */ 1454 } 1455 1456 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { 1457 color: #333; 1458 } 1459 1460 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { 1461 color: " + ColorSettings.Color.NavbarFont + @"; 1462 } 1463 1464 .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo { 1465 color: " + GeneralSettings.Logo.SecondaryColor + @" !important; 1466 }"; 1467 } 1468 else 1469 { 1470 CssString += @" 1471 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { 1472 background-color: " + ColorSettings.Color.NavigationBackground + @"; 1473 color: " + ColorSettings.Color.TopNavigationText + @"; 1474 } 1475 1476 .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo { 1477 color: " + GeneralSettings.Logo.SecondaryColor + @" !important; 1478 }"; 1479 } 1480 1481 if (GeneralSettings.Navigation.SelectionMode == "background" || GeneralSettings.Navigation.SelectionMode == "arrow"){ 1482 CssString += NavbarPosition(false, SelectionWeight); 1483 1484 CssString += @" 1485 .dw-navbar-button > a { 1486 background-color: transparent !important; 1487 } 1488 1489 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1490 background-color: " + ColorSettings.Color.TopNavigationText + @" !important; 1491 }"; 1492 } 1493 1494 if (GeneralSettings.Navigation.SelectionMode == "underline"){ 1495 CssString += NavbarPosition(true); 1496 1497 CssString += ClearBackground(); 1498 1499 CssString += @" 1500 .dw-navbar-button > a span:after { 1501 position: absolute; 1502 content: ''; 1503 left: 0px; 1504 bottom: 0px; 1505 height: " + SelectionWeight + @"px; 1506 width: 100%; 1507 transform: scaleX(0); 1508 transition: all 0.3s ease-in-out 0s; 1509 } 1510 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1511 color: " + ColorSettings.Color.TopNavigationText + @" !important; 1512 } 1513 1514 .dw-navbar-button > a:hover span:after, dw-navbar-button > a:active span:after, dw-navbar-button > a:focus span:after, .active > a span:after { 1515 color: " + ColorSettings.Color.Primary + @" !important; 1516 transform: scaleX(1); 1517 transition: all 0.3s ease-in-out 0s; 1518 }"; 1519 } 1520 1521 if (GeneralSettings.Navigation.SelectionMode == "boxed"){ 1522 CssString += NavbarPosition(true, SelectionWeight); 1523 1524 CssString += @" 1525 .dw-navbar-button > a { 1526 background-color: transparent !important; 1527 } 1528 1529 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1530 background-color: " + ColorSettings.Color.Primary + @" !important; 1531 transition: all 0.3s ease-in-out 0s; 1532 }"; 1533 } 1534 1535 if (GeneralSettings.Navigation.SelectionMode == "border"){ 1536 CssString += NavbarPosition(true, 6, SelectionWeight); 1537 1538 CssString += ClearBackground(); 1539 1540 CssString += @" 1541 .dw-navbar-button > a { 1542 border: " + SelectionWeight + @"px solid transparent !important; transition: None !important; 1543 } 1544 1545 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1546 border-width: " + SelectionWeight + @"px !important; 1547 border-color: " + ColorSettings.Color.Primary + @" !important; 1548 transition: all 0.3s ease-in-out 0s; 1549 }"; 1550 } 1551 1552 if (GeneralSettings.Navigation.SelectionMode == "font"){ 1553 CssString += NavbarPosition(); 1554 1555 CssString += ClearBackground(); 1556 1557 SelectionWeight = (SelectionWeight*100); 1558 1559 CssString += @" 1560 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1561 color: " + ColorSettings.Color.Primary + @" !important; 1562 font-weight: " + SelectionWeight + @" !important; 1563 transition: all 0.3s ease-in-out 0s; 1564 }"; 1565 } 1566 1567 if (GeneralSettings.Navigation.Case){ 1568 CssString += @" 1569 .dw-navbar-button > a { 1570 text-transform: uppercase !important; 1571 }"; 1572 } 1573 else 1574 { 1575 CssString += @" 1576 .dw-navbar-button > a { 1577 text-transform: none !important; 1578 }"; 1579 } 1580 1581 1582 //Breadcrumb custom settings 1583 if (GeneralSettings.Navigation.BreadcrumbMode == "light") 1584 { 1585 CssString += @" 1586 .pg-opt { 1587 border-bottom: 0px; 1588 background: none repeat scroll 0% 0% #FFF; 1589 } 1590 1591 .dw-breadcrumb-title { 1592 font-size: 14px !important; 1593 padding: 5px 0px 5px 0px !important; 1594 } 1595 1596 .dw-breadcrumb { 1597 padding: 16px 15px 16px 0 !important; 1598 }"; 1599 } 1600 1601 if (GeneralSettings.Navigation.BreadcrumbMode == "normal") 1602 { 1603 CssString += @" 1604 .dw-breadcrumb-title { 1605 font-size: 14px !important; 1606 padding: 5px 0px 5px 0px !important; 1607 } 1608 1609 .dw-breadcrumb a, .pg-opt .breadcrumb { 1610 padding: 5px !important; 1611 }"; 1612 } 1613 1614 if (GeneralSettings.Navigation.BreadcrumbMode == "large") 1615 { 1616 CssString += @" 1617 .dw-breadcrumb-title { 1618 font-size: 22px !important; 1619 padding: 15px 0px 15px 0px !important; 1620 } 1621 1622 .dw-breadcrumb { 1623 padding: 15px !important; 1624 }"; 1625 } 1626 1627 1628 if (GeneralSettings.Navigation.BreadcrumbAlign == "right") 1629 { 1630 CssString += @" 1631 .dw-breadcrumb { 1632 float: right !important; 1633 }"; 1634 } 1635 else 1636 { 1637 CssString += @" 1638 .dw-breadcrumb { 1639 float: left !important; 1640 }"; 1641 } 1642 1643 1644 //Left menu custom settings 1645 if (GeneralSettings.Navigation.LeftmenuMode == "light" || GeneralSettings.Navigation.LeftmenuMode == "light-color") 1646 { 1647 CssString += @" 1648 ul.dw-categories, ul.dw-categories > li, ul.dw-categories > li > ul > li { 1649 border: 0px solid #EEE; 1650 } 1651 1652 ul.dw-categories > li > ul { 1653 background: none repeat scroll 0% 0% #FFF; 1654 } 1655 1656 ul.dw-categories li a:hover, ul.dw-categories li a:focus, ul.dw-categories li a:active { 1657 background-color: #FFF !important; 1658 color: " + ColorSettings.Color.Primary + @" !important; 1659 } 1660 1661 .list-active, .list-active > a { 1662 background-color: #FFF; 1663 color: " + ColorSettings.Color.Primary + @" !important; 1664 } 1665 1666 .list-open-active { 1667 background-color: #FFF; 1668 color: " + ColorSettings.Color.Primary + @" !important; 1669 }"; 1670 } 1671 1672 if (GeneralSettings.Navigation.LeftmenuMode == "lines") 1673 { 1674 CssString += @" 1675 ul.dw-categories > li { 1676 border-bottom: 1px solid #EEE; 1677 } 1678 1679 ul.dw-categories { 1680 border: 0px solid #EEE; 1681 } 1682 1683 ul.dw-categories > li > ul { 1684 background: none repeat scroll 0% 0% #FFF; 1685 } 1686 1687 ul.dw-categories li a:hover, a:focus, a:active { 1688 background-color: #FFF !important; 1689 color: " + ColorSettings.Color.Primary + @" !important; 1690 } 1691 1692 .list-active, .list-active > a { 1693 background-color: #FFF; 1694 color: " + ColorSettings.Color.Primary + @" !important; 1695 } 1696 1697 .list-open-active { 1698 background-color: #FFF; 1699 color: " + ColorSettings.Color.Primary + @" !important; 1700 }"; 1701 } 1702 1703 if (GeneralSettings.Navigation.LeftmenuMode == "boxed") 1704 { 1705 CssString += @" 1706 ul.dw-categories, ul.dw-categories > li, ul.dw-categories > li > ul > li { 1707 border: 0px solid #EEE; 1708 } 1709 1710 .list-active, .list-active > a { 1711 background-color: " + ColorSettings.Color.Primary + @" !important; 1712 color: #FFF; 1713 }"; 1714 } 1715 1716 if (GeneralSettings.Navigation.LeftmenuMode == "border") 1717 { 1718 CssString += @" 1719 ul.dw-categories > li { 1720 border: 1px solid #EEE; 1721 } 1722 1723 ul.dw-categories > li > ul > li { 1724 border-top: 1px solid #EEE; 1725 } 1726 1727 .list-active, .list-active > a { 1728 background-color: " + ColorSettings.Color.Primary + @" !important; 1729 color: #FFF; 1730 }"; 1731 } 1732 1733 if (GeneralSettings.Navigation.LeftmenuMode == "light-color") 1734 { 1735 CssString += @" 1736 ul.dw-categories li a:hover, ul.dw-categories a:focus, ul.dw-categories a:active { 1737 border-left: 6px solid " + ColorSettings.Color.Primary + @"; 1738 } 1739 1740 ul.dw-categories .M2 > li > a:hover, ul.dw-categories .M2 > li > a:focus, ul.dw-categories .M2 > li > a:active, ul.dw-categories .M2 > .list-active > a { 1741 padding-left: 20px; 1742 } 1743 1744 ul.dw-categories .M3 > li > a:hover, ul.dw-categories .M3 > li > a:focus, ul.dw-categories .M3 > li > a:active, ul.dw-categories .M3 > .list-active > a { 1745 padding-left: 30px; 1746 } 1747 1748 ul.dw-categories .M4 > li > a:hover, ul.dw-categories .M4 > li > a:focus, ul.dw-categories .M4 > li > a:active, ul.dw-categories .M4 > .list-active > a { 1749 padding-left: 40px; 1750 } 1751 1752 ul.dw-categories .M5 > li > a:hover, ul.dw-categories .M5 > li > a:focus, ul.dw-categories .M5 > li > a:active, ul.dw-categories .M5 > .list-active > a { 1753 padding-left: 50px; 1754 } 1755 1756 ul.dw-categories .M6 > li > a:hover, ul.dw-categories .M6 > li > a:focus, ul.dw-categories .M6 > li > a:active, ul.dw-categories .M6 > .list-active > a { 1757 padding-left: 50px; 1758 } 1759 1760 ul.dw-categories .M7 > li > a:hover, ul.dw-categories .M7 > li > a:focus, ul.dw-categories .M7 > li > a:active, ul.dw-categories .M7 > .list-active > a { 1761 padding-left: 50px; 1762 } 1763 1764 ul.dw-categories .M8 > li > a:hover, ul.dw-categories .M8 > li > a:focus, ul.dw-categories .M8 > li > a:active, ul.dw-categories .M8 > .list-active > a { 1765 padding-left: 50px; 1766 } 1767 1768 ul.dw-categories .list-active > a { 1769 border-left: 6px solid " + ColorSettings.Color.Primary + @"; 1770 } 1771 1772 .btn-dw:hover, .btn-dw:focus, .btn-dw:active { 1773 1774 }"; 1775 } 1776 1777 1778 //Buttons custom designs 1779 if (GeneralSettings.Navigation.ButtonDesign == "light-rounded") 1780 { 1781 CssString += @" 1782 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { 1783 border-width: 0px; 1784 } 1785 1786 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 1787 background-color: " + ColorSettings.Color.Secondary + @"; 1788 color: #FFF; 1789 border-width: 0px; 1790 } 1791 1792 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 1793 background-color: " + ColorSettings.Color.Primary + @"; 1794 color: #FFF; 1795 border-width: 0px; 1796 } 1797 1798 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 1799 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 1800 color: #FFF; 1801 border-width: 0px; 1802 }"; 1803 } 1804 1805 if (GeneralSettings.Navigation.ButtonDesign == "corners") 1806 { 1807 CssString += @" 1808 .btn-dw-primary, .btn-dw-secondary, btn-dw-cart , .btn-dw-cart { 1809 border-radius: 0px !important; 1810 border-width: 0px; 1811 } 1812 1813 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 1814 background-color: " + ColorSettings.Color.Secondary + @"; 1815 color: #FFF; 1816 border-width: 0px; 1817 } 1818 1819 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 1820 background-color: " + ColorSettings.Color.Primary + @"; 1821 color: #FFF; 1822 border-width: 0px; 1823 } 1824 1825 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 1826 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 1827 color: #FFF; 1828 border-width: 0px; 1829 }"; 1830 } 1831 1832 if (GeneralSettings.Navigation.ButtonDesign == "round") 1833 { 1834 CssString += @" 1835 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { 1836 padding: 5px 15px; 1837 border-radius: 200px !important; 1838 border-width: 0px !important; 1839 } 1840 1841 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 1842 background-color: " + ColorSettings.Color.Secondary + @"; 1843 color: #FFF; 1844 border-width: 0px !important; 1845 } 1846 1847 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 1848 background-color: " + ColorSettings.Color.Primary + @"; 1849 color: #FFF; 1850 border-width: 0px !important; 1851 } 1852 1853 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 1854 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 1855 color: #FFF; 1856 border-width: 0px !important; 1857 }"; 1858 } 1859 1860 if (GeneralSettings.Navigation.ButtonDesign == "border") 1861 { 1862 CssString += @" 1863 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { 1864 background-color: transparent; 1865 } 1866 1867 .btn-dw-primary { 1868 border-width: 4px; 1869 padding: 3px 10px; 1870 color: " + ColorSettings.Color.Primary + @"; 1871 } 1872 1873 .btn-dw-secondary { 1874 border-width: 2px; 1875 color: " + ColorSettings.Color.Secondary + @"; 1876 } 1877 1878 .btn-dw-cart { 1879 border-width: 4px; 1880 padding: 3px 10px; 1881 color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 1882 } 1883 1884 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 1885 background-color: " + ColorSettings.Color.Primary + @"; 1886 border-width: 4px; 1887 padding: 3px 10px; 1888 border-color: " + ColorSettings.Color.Primary + @"; 1889 color: #FFF; 1890 } 1891 1892 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 1893 background-color: " + ColorSettings.Color.Primary + @"; 1894 border-width: 2px; 1895 color: #FFF; 1896 border-color: #FFF; 1897 } 1898 1899 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 1900 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 1901 border-width: 4px; 1902 padding: 3px 10px; 1903 border-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 1904 color: #FFF; 1905 }"; 1906 } 1907 1908 if (GeneralSettings.Navigation.ButtonDesign == "border-sharp" || GeneralSettings.Navigation.ButtonDesign == "border-round") 1909 { 1910 CssString += @" 1911 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { 1912 background-color: transparent; 1913 } 1914 1915 .btn-dw-primary { 1916 border-width: 4px; 1917 padding: 3px 15px; 1918 color: " + ColorSettings.Color.Primary + @"; 1919 } 1920 1921 .btn-dw-secondary { 1922 border-width: 2px; 1923 padding: 5px 15px; 1924 color: " + ColorSettings.Color.Secondary + @"; 1925 } 1926 1927 .btn-dw-cart { 1928 border-width: 4px; 1929 padding: 3px 15px; 1930 color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 1931 } 1932 1933 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 1934 background-color: " + ColorSettings.Color.Primary + @"; 1935 border-width: 4px; 1936 color: #FFF; 1937 padding: 3px 15px; 1938 border-color: " + ColorSettings.Color.Primary + @"; 1939 } 1940 1941 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 1942 background-color: " + ColorSettings.Color.Primary + @"; 1943 border-width: 2px; 1944 color: #FFF; 1945 padding: 5px 15px; 1946 border-color: #FFF; 1947 } 1948 1949 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 1950 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 1951 border-width: 4px; 1952 color: #FFF; 1953 padding: 3px 15px; 1954 border-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 1955 }"; 1956 } 1957 1958 if (GeneralSettings.Navigation.ButtonDesign == "border-sharp") 1959 { 1960 CssString += @" 1961 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart, .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active, .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active, .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 1962 border-radius: 0px !important; 1963 }"; 1964 } 1965 1966 if (GeneralSettings.Navigation.ButtonDesign == "border-round") 1967 { 1968 CssString += @" 1969 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart, .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active, .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active, .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 1970 border-radius: 200px !important; 1971 }"; 1972 } 1973 1974 1975 //Headings custom settings 1976 if (GeneralSettings.Headings.Mode == "underline") 1977 { 1978 CssString += @" 1979 .dw-section-title { 1980 border-bottom: 2px solid; 1981 margin-bottom: 15px; 1982 }"; 1983 } 1984 1985 if (GeneralSettings.Headings.Mode == "boxed" || GeneralSettings.Headings.Mode == "boxed-line") 1986 { 1987 CssString += @" 1988 .dw-section-title span { 1989 background-color: " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; 1990 display: inline-block; 1991 padding: 8px 16px; 1992 color: #FFF; 1993 }"; 1994 1995 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) 1996 { 1997 CssString += @" 1998 .dw-section-title { 1999 background-color: " + ColorSettings.Color.Primary + @"; 2000 }"; 2001 } 2002 } 2003 2004 if (GeneralSettings.Headings.Mode == "boxed-line") 2005 { 2006 CssString += @" 2007 .dw-section-title span { 2008 margin-bottom: 2px; 2009 } 2010 2011 .dw-section-title { 2012 border-bottom: 2px solid " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; 2013 margin-bottom: 10px; 2014 }"; 2015 2016 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) 2017 { 2018 CssString += @" 2019 .dw-section-title { 2020 border-bottom: 2px solid " + ColorSettings.Color.Primary + @"; 2021 }"; 2022 } 2023 } 2024 2025 if (GeneralSettings.Headings.Mode == "outline") 2026 { 2027 CssString += @" 2028 .dw-section-title { 2029 color: #FFF; 2030 text-shadow: 2031 -1px -1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", 2032 1px -1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", 2033 -1px 1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", 2034 1px 1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; 2035 }"; 2036 2037 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) 2038 { 2039 CssString += @" 2040 .dw-section-title { 2041 text-shadow: 2042 -1px -1px 0 #1A1A1A, 2043 1px -1px 0 #1A1A1A, 2044 -1px 1px 0 #1A1A1A, 2045 1px 1px 0 #1A1A1A; 2046 }"; 2047 } 2048 } 2049 2050 if (GeneralSettings.Headings.Mode == "backline") 2051 { 2052 CssString += @" 2053 .dw-section-title { 2054 margin-bottom: 30px; 2055 } 2056 2057 .dw-section-title span::after { 2058 border-bottom: 5px solid #003A6F; 2059 width: 160px; 2060 content: ''; 2061 display: block; 2062 position: relative; 2063 margin-top: 10px; 2064 }"; 2065 } 2066 2067 if (GeneralSettings.Headings.Mode == "topbottomline") 2068 { 2069 CssString += @" 2070 H1.dw-section-title, 2071 H2.dw-section-title, 2072 H3.dw-section-title, 2073 H4.dw-section-title, 2074 H5.dw-section-title { 2075 border-top: 2px solid; 2076 border-bottom: 2px solid; 2077 padding: 10px 0; 2078 height: auto; 2079 }"; 2080 } 2081 2082 if (GeneralSettings.Ecommerce.EcomCardDesign == "one") 2083 { 2084 2085 } 2086 2087 if (GeneralSettings.Ecommerce.EcomCardDesign == "two") 2088 { 2089 CssString += @" 2090 .product { 2091 border: 1px solid #E5E5E5; 2092 }"; 2093 } 2094 2095 return CssString; 2096 } 2097 2098 private string ClearBackground() { 2099 string CssString = ""; 2100 2101 CssString += @" 2102 .dw-navbar-button > a { 2103 background-color: rgba(0, 0, 0, 0.0) !important; 2104 } 2105 2106 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 2107 background-color: rgba(0, 0, 0, 0.0) !important; 2108 }"; 2109 2110 return CssString; 2111 } 2112 2113 private string NavbarPosition(bool margin=false, int specialpadding=6, int extramargin=0) { 2114 int LogoHeight = 0; 2115 string CssString = ""; 2116 int Centerpos = 0; 2117 2118 if (GeneralSettings.Header.Mode != "solid"){ 2119 if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 2120 { 2121 LogoHeight = ImageHeight(); 2122 } 2123 else 2124 { 2125 LogoHeight = GetInteger("Item.Area.LogoFont.Size"); 2126 } 2127 } 2128 else 2129 { 2130 if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 2131 { 2132 LogoHeight = 18; 2133 } 2134 else 2135 { 2136 LogoHeight = GetInteger("Item.Area.LogoFont.Size")-10; 2137 } 2138 } 2139 2140 if (margin == false) 2141 { 2142 Centerpos = (LogoHeight/2) + 6; 2143 2144 CssString += @" 2145 .dw-navbar-button > a, .navbar-wp.affix .navbar-nav > li > a { 2146 padding: " + Centerpos + @"px " + (specialpadding+4) + @"px " + Centerpos + @"px " + (specialpadding+4) + @"px !important; 2147 margin: " + extramargin + @"px " + extramargin + @"px !important; 2148 }"; 2149 } 2150 else 2151 { 2152 Centerpos = ((LogoHeight/2)+6)-(specialpadding+extramargin); 2153 2154 CssString += @" 2155 .dw-navbar-button > a, .navbar-wp.affix .navbar-nav > li > a { 2156 padding: " + specialpadding + @"px " + (specialpadding+4) + @"px " + specialpadding + @"px " + (specialpadding+4) + @"px !important; 2157 margin: " + Centerpos + @"px 4px 0px 4px !important; 2158 }"; 2159 } 2160 2161 return CssString; 2162 } 2163 2164 private int ImageHeight () 2165 { 2166 int LogoHeight = 0; 2167 2168 if (!string.IsNullOrWhiteSpace(GetString("Item.Area.GeneralLogo"))) 2169 { 2170 string imageUrl = "http://" + HttpContext.Current.Request.Url.Authority + GetString("Item.Area.GeneralLogo"); 2171 2172 WebRequest request = WebRequest.Create(imageUrl); 2173 using (WebResponse response = request.GetResponse()) 2174 using (Image image = Image.FromStream(response.GetResponseStream())) 2175 { 2176 LogoHeight = image.Height; 2177 } 2178 } 2179 else 2180 { 2181 LogoHeight = 38; 2182 } 2183 2184 return LogoHeight; 2185 } 2186 } 2187 2188 2189 2190 @{ 2191 InitGeneralSettings(); 2192 } 2193 2194 2195 @if (writeCss) 2196 { 2197 css += FontStylesCSS() + "/*Colors*/" + Environment.NewLine + GetColorSettings() + Environment.NewLine + "/*General*/" + Environment.NewLine + GetGeneralCSS(); 2198 Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(css, HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.css"), false); 2199 Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(RemoveWhiteSpaceFromStylesheets(Dynamicweb.Core.Helpers.TextFileHelper.ReadTextFile(HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStyles.css"))), HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStyles.min.css"), false); 2200 Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(RemoveWhiteSpaceFromStylesheets(css), cssPath, false); 2201 } 2202 2203 @functions{ 2204 public static string RemoveWhiteSpaceFromStylesheets(string body) 2205 { 2206 body = Regex.Replace(body, @"[a-zA-Z]+#", "#"); 2207 body = Regex.Replace(body, @"[\n\r]+\s*", string.Empty); 2208 body = Regex.Replace(body, @"\s+", " "); 2209 body = Regex.Replace(body, @"\s?([:,;{}])\s?", "$1"); 2210 body = body.Replace(";}", "}"); 2211 body = Regex.Replace(body, @"([\s:]0)(px|pt|%|em)", "$1"); 2212 // Remove comments from CSS 2213 body = Regex.Replace(body, @"/\*[\d\D]*?\*/", string.Empty); 2214 return body; 2215 } 2216 } 2217 2218 <!-- Template styles --> 2219 <link id="dwStylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/DWGlobalStyles.min.css" rel="stylesheet" media="screen"> 2220 <!--<link rel="stylesheet" type="text/css" href="css/print.css" media="print">--> 2221 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/app.min.css"> 2222 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/style.css"> 2223 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/styles.css"> 2224 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/product.css"> 2225 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/header.css"> 2226 @{ string cssAutoPath = "/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.min.css?t=@areaUpdated.Ticks"; } 2227 2228 <link type="text/css" href="@cssAutoPath" rel="stylesheet"> 2229 2230 <!-- Analytics code --> 2231 @GetValue("Item.Area.OtherAnalyticsCode") 2232 2233 <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> 2234 2235 @if (GeneralSettings.Navigation.IsMegamenu) 2236 { 2237 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/megamenu.css"> 2238 } 2239 <style type="text/css"> 2240 @RenderSnippet("producersStyles") 2241 @RenderSnippet("styleNewsRow") 2242 @RenderSnippet("styleFocusElement") 2243 @RenderSnippet("styleCarousel") 2244 @RenderSnippet("subMenu") 2245 @RenderSnippet("imagePosition") 2246 @RenderSnippet("backgroundColor") 2247 @RenderSnippet("styleDescription") 2248 @RenderSnippet("styleThreeBoxes") 2249 </style> 2250 <script> 2251 2252 var currentUserId = "@GetGlobalValue("Global:Extranet.UserID")"; 2253 </script> 2254 @{ 2255 var currentUser = UserAddress.GetUserAddresses(currentUserID); 2256 } 2257 @{ 2258 var currentUserDefaultAddress = UserAddress.GetUserDefaultUserAddressesCustomFields(currentUserID); 2259 } 2260 2261 @GetValue("Stylesheets") 2262 @GetValue("Javascripts") 2263 </head> 2264 <body style="@GeneralSettings.Background.Style" id="sitecontent" class="@bodyclass"> 2265 2266 <!-- Google Tag Manager (noscript) --> 2267 <noscript> 2268 <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-N4PBTH2" height="0" width="0" style="display:none;visibility:hidden"></iframe> 2269 </noscript> 2270 <!-- End Google Tag Manager (noscript) --> 2271 2272 2273 <div id="fb-root"></div> 2274 <script> 2275 (function (d, s, id) { 2276 var js, fjs = d.getElementsByTagName(s)[0]; 2277 if (d.getElementById(id)) return; 2278 js = d.createElement(s); js.id = id; 2279 js.src = "//connect.facebook.net/da_DK/sdk.js#xfbml=1&version=v2.5"; 2280 fjs.parentNode.insertBefore(js, fjs); 2281 }(document, 'script', 'facebook-jssdk')); 2282 </script> 2283 2284 <!-- MODALS --> 2285 @{ 2286 string firstPageId = GetString("DwAreaFirstPageID"); 2287 2288 } 2289 2290 2291 <div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="loginModalLabel" aria-hidden="true"> 2292 <div class="modal-dialog modal-sm"> 2293 <div class="modal-content"> 2294 <div class="modal-header"> 2295 <h4 class="modal-title" id="loginModalLabel">@Translate("Login", "Login")</h4> 2296 @if (!string.IsNullOrWhiteSpace(GetString("DW_extranet_error_uk"))) 2297 { 2298 2299 <p class="bg-danger">@GetValue("DW_extranet_error_uk")</p> 2300 } 2301 2302 </div> 2303 2304 <form name="form" action="/Default.aspx?ID=@firstPageId" id="loginform" method="post"> 2305 <div class="modal-body"> 2306 2307 <input type="hidden" name="ID" value="@Pageview.ID"> 2308 <input type="hidden" name="DWExtranetUsernameRemember" value="True"> 2309 <input type="hidden" name="DWExtranetPasswordRemember" value="True"> 2310 <div class="form-group"> 2311 @{ attrValue = Translate("Enter email", "Enter email"); 2312 var username2 = @GetValue("DWExtranetUsername"); 2313 } 2314 2315 <label for="username">@Translate("Email", "Email")</label> 2316 <input type="text" class="form-control" name="username" id="username" placeholder="@attrValue" value="@username2" required=""> 2317 </div> 2318 <div class="form-group"> 2319 @{ attrValue = Translate("Enter password", "Enter password"); 2320 } 2321 2322 <label for="password">@Translate("Password", "Password")</label> 2323 <input type="password" class="form-control" name="password" id="password" placeholder="@attrValue" required=""> 2324 <p>&nbsp;</p> 2325 <a class="pull-left" href='/Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]&LoginAction=Recovery'>@Translate("Forgot your password?", "Forgot your password?")</a> 2326 &nbsp; 2327 </div> 2328 </div> 2329 <div class="modal-footer"> 2330 <div class="row"> 2331 <div class="col-md-12"> 2332 <div class="checkbox pull-left"> 2333 <label> 2334 <input type="checkbox" name="Autologin" checked="checked" value="True"> @Translate("Remember me", "Remember me") 2335 </label> 2336 </div> 2337 <button type="submit" class="btn btn-xs btn-base pull-right">@Translate("Sign in", "Sign in")</button> 2338 </div> 2339 </div> 2340 </div> 2341 </form> 2342 </div> 2343 </div> 2344 </div> 2345 2346 <div class="modal fade" id="address" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> 2347 <div class="modal-dialog modal-md"> 2348 <div class="modal-content"> 2349 <div class="modal-header"> 2350 <h4 class="modal-title" id="myModalLabel">@Translate("Addresses list", "Addresses list")</h4> 2351 </div> 2352 <div class="modal-body"> 2353 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2354 { 2355 var numberOfAddresses = currentUser.Count<UserAddress>(); 2356 <form class="form" name="modalAddress" method="post"> 2357 <div class="form-group"> 2358 <label for="selectaddress">@Translate("Select address", "Select address")</label> 2359 <select name="EcomOrderDeliveryAddress2" id="selectaddress" class="form-control"> 2360 @{ 2361 var userID = GetInteger("Ecom:Order.Customer.AccessUserID"); 2362 } 2363 2364 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Order.Customer.Address"))) 2365 { 2366 var navListId = ""; 2367 foreach (var def in currentUserDefaultAddress) 2368 { 2369 if (def.CustomField.SystemName == "AccessUserAddress_AccessUserWineListID") 2370 { 2371 2372 navListId = def.Value.ToString(); 2373 } 2374 } 2375 var dic = DynamicwebSoftware.Enotria.CustomSolution.ActiveListIdMacro.GetFavoriteListIds(navListId); 2376 var listId = ""; 2377 if (dic.ContainsKey(navListId)) 2378 { 2379 listId = dic[navListId]; 2380 } 2381 2382 } 2383 2384 @foreach (var add in currentUser) 2385 { 2386 string name = add.Name; 2387 string address = add.Address; 2388 var navListId = ""; 2389 int addressid = add.ID; 2390 bool defaultAdd = add.IsDefault; 2391 foreach (Dynamicweb.Security.UserManagement.Common.CustomFields.CustomFieldValue val in add.CustomFieldValues) 2392 { 2393 //<script>alert("@val.CustomField.SystemName")</script> 2394 if (val.CustomField.SystemName == "AccessUserAddress_AccessUserWineListID") 2395 { 2396 2397 navListId = val.Value.ToString(); 2398 //<script>alert("@navListId")</script> 2399 } 2400 } 2401 2402 var dic = DynamicwebSoftware.Enotria.CustomSolution.ActiveListIdMacro.GetFavoriteListIds(navListId); 2403 //<script>alert("@dic.Count()")</script> 2404 var listId = ""; 2405 foreach(string test in dic.Keys) 2406 { 2407 <text>@test</text> 2408 } 2409 if (dic.ContainsKey(navListId)) 2410 { 2411 listId = dic[navListId]; 2412 //<script>alert("@listId")</script> 2413 } 2414 else 2415 { 2416 // <script>alert("Fail")</script> 2417 } 2418 2419 2420 var addAddress2Text = ""; 2421 var addZipText = ""; 2422 var output = ""; 2423 2424 if (!string.IsNullOrWhiteSpace(add.Company)) 2425 { 2426 addAddress2Text = WrapMethods.Truncate(add.Company, 80); 2427 addZipText = add.Zip; 2428 output = addAddress2Text + ", " + addZipText; 2429 2430 } 2431 else 2432 { 2433 addAddress2Text = WrapMethods.Truncate(add.Address, 80); 2434 addZipText = add.Zip; 2435 output = addAddress2Text + ", " + addZipText; 2436 2437 } 2438 2439 if (!defaultAdd) 2440 { 2441 <option value="@addressid" data-listid="@listId" data-default=""> 2442 2443 @output 2444 </option> 2445 } 2446 else 2447 { 2448 if (numberOfAddresses <= 1) 2449 { 2450 <option value="@addressid" data-listid="@listId" data-default=""> 2451 @output 2452 </option> 2453 } 2454 2455 } 2456 } 2457 </select> 2458 </div> 2459 <div class="row">&nbsp;</div> 2460 <div class="form-group text-right"> 2461 <button type="submit" class="btn btn-dw-primary" id="get-address">@Translate("Save", "Save")</button> 2462 </div> 2463 </form> 2464 } 2465 </div> 2466 <div class="modal-footer"> 2467 2468 </div> 2469 2470 </div> 2471 </div> 2472 </div> 2473 2474 <!-- MOBILE MENU --> 2475 @{ 2476 var offsetmenuplace = "right"; 2477 } 2478 @if (GeneralSettings.Header.Mode == "mobile") 2479 { 2480 offsetmenuplace = GeneralSettings.Navigation.Position; 2481 } 2482 2483 <div id="myNavmenu" class="navmenu navmenu-default navmenu-fixed-@offsetmenuplace offcanvas off-canvas-wrapper"> 2484 <div class="mobile-menu-wrapper clearfix"> 2485 2486 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2487 <div class="row offcanvas-row"> 2488 &nbsp; 2489 </div> 2490 <div class="offcanvas-row pull-right"> 2491 <a href="javascript:void(0);" class=" close-menu" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body"> 2492 <i class="fa fa-times"></i> 2493 </a> 2494 </div> 2495 @*<div class="row offcanvas-row"> 2496 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2497 <a href="/Default.aspx?ID=@firstpageid" class="brand"> 2498 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 2499 { 2500 <div class="img-responsive dw-offsetmenu-logo pull-left"> 2501 @if (GeneralSettings.Logo.ContrastImage != GeneralSettings.Logo.Image) 2502 { 2503 <img src="@GeneralSettings.Logo.ContrastImage" alt="Logo"> 2504 } 2505 else 2506 { 2507 <img class="img-responsive" src="@GeneralSettings.Logo.Image" alt="Logo"> 2508 } 2509 </div> 2510 } 2511 2512 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text)) 2513 { 2514 <div class="dw-logotext dw-offsetmenu-logo pull-left">@GeneralSettings.Logo.Text</div> 2515 } 2516 </a> 2517 </div> 2518 </div> 2519 <div class="row offcanvas-row">&nbsp;</div>*@ 2520 </div> 2521 2522 2523 2524 2525 <div class="row offcanvas-row"> 2526 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2527 @GetValue("DwNavigation(drawernavigation)") 2528 </div> 2529 </div> 2530 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2531 @if (GetBoolean("Item.Area.EcomEnabled")) 2532 { 2533 <hr class="nav-line-hr"> 2534 <div class="row offcanvas-row"> 2535 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2536 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2537 { 2538 <div class="col-md-6 myIcons pull-left"> 2539 @{ 2540 var parameter = ""; 2541 } 2542 @if (!string.IsNullOrWhiteSpace(listid)) 2543 { 2544 parameter = "&ListID=" + listid; 2545 } 2546 <a href='Default.aspx?ID=@GetString("Item.Area.WishListPage")'> 2547 <i class="fa fa-list" aria-hidden="true"></i><span>@Translate("My List", "My List")</span> 2548 </a> 2549 </div> 2550 <div class="col-md-6 myIcons pull-right"> 2551 <span class="menu-quantity">@GetInteger("Ecom:Order.OrderLines.TotalProductQuantity")</span> 2552 <a href='Default.aspx?ID=@cartid'> 2553 <i class="fa fa-shopping-cart" aria-hidden="true"></i><span>@Translate("My Cart", "My Cart")</span> 2554 </a> 2555 </div> 2556 <div class="clearfix"></div> 2557 <hr class="nav-line-hr"> 2558 <div class="col-md-6 myIcons pull-left"> 2559 <a href='Default.aspx?ID=@myaccount'> 2560 <i class="fa fa-user" aria-hidden="true"></i><span>@Translate("My Account", "My Account")</span> 2561 </a> 2562 </div> 2563 <div class="col-md-6 myIcons pull-right"> 2564 <a href='/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.ID'> 2565 <i class="fa fa-sign-out" aria-hidden="true"></i><span>@Translate("Sign out", "Sign out")</span> 2566 </a> 2567 </div> 2568 } 2569 else 2570 { 2571 <div class="col-md-6 myIcons pull-left"> 2572 <a href="javascript:void(0);" id="yourid"> 2573 <i class="fa fa-sign-in" aria-hidden="true"></i><span>@Translate("Login", "Login")</span> 2574 </a> 2575 </div> 2576 <div class="col-md-6 myIcons pull-right"> 2577 <a href='Default.aspx?ID=@cartid'> 2578 <i class="fa fa-shopping-cart" aria-hidden="true"></i><span>@Translate("Pricequote", "Pricequote")</span> 2579 </a> 2580 </div> 2581 } 2582 @if (GetLoop("DWExtranetSecondaryUsers").Count > 0 || !string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) 2583 { 2584 <p>&nbsp;</p> 2585 <form method="post"> 2586 <div class="pull-left"> 2587 @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) 2588 { 2589 <select id="DWExtranetSecondaryUserSelector" name="DWExtranetSecondaryUserSelector" title="Impersonate selected user"> 2590 @foreach (var user in GetLoop("DWExtranetSecondaryUsers")) 2591 { 2592 <option value='@user.GetValue("UserID")'>@user.GetValue("UserName")</option> 2593 } 2594 </select> 2595 <input type="submit" class="btn btn-xs" tabindex="3" value="OK"> 2596 } 2597 else 2598 { 2599 string impersonateUser = @GetGlobalValue("Global:Extranet.SecondaryUser.UserName") + " is impersonated by " + @Pageview.User.UserName; 2600 <span title="@impersonateUser" class="btn btn-xs impersonation-btn"><i class="fa fa-user-secret"></i> @GetGlobalValue("Global:Extranet.SecondaryUser.UserName")</span> 2601 <input type="submit" class="btn btn-xs" name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" value="Stop impersonation"> 2602 } 2603 </div> 2604 </form> 2605 } 2606 </div> 2607 </div> 2608 <div class="row offcanvas-row">&nbsp;</div> 2609 } 2610 </div> 2611 2612 </div> 2613 </div> 2614 2615 2616 <!-- HEADER AND CONTENT--> 2617 2618 <div class="body-wrap shad @GeneralSettings.Site.LayoutMode"> 2619 2620 <!-- HEADER --> 2621 2622 <div id="divHeaderWrapper"> 2623 <header class="@GeneralSettings.Header.Classes"> 2624 2625 <!-- TOP HEADER --> 2626 <!-- MAIN NAV --> 2627 @{ 2628 var sticky = GeneralSettings.Navigation.StickyMenu; 2629 var stickyTrigger = "affix"; 2630 var navbarpos = GeneralSettings.Navigation.Position; 2631 var selectionstyle = GeneralSettings.Navigation.SelectionStyle; 2632 2633 if (sticky == "off") 2634 { 2635 stickyTrigger = ""; 2636 } 2637 } 2638 2639 @if (GeneralSettings.Header.Show) 2640 { 2641 2642 <div class="top-header navbar navbar-wp @selectionstyle navbar-fixed affix-top" role="navigation" data-spy="@stickyTrigger" data-offset-top="@sticky"> 2643 <div class="container-expanded"> 2644 <div class="row clearfix"> 2645 <div class="col-md-3 col-sm-4 col-xs-5 logobox"> 2646 @if (GeneralSettings.Header.Mode == "solid") 2647 { 2648 <a href="/Default.aspx?ID=@firstpageid" class="brand"> 2649 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 2650 { 2651 <img class="img-responsive dw-logoimage pull-left" src="@GeneralSettings.Logo.Image" alt="Logo"> 2652 } 2653 2654 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text)) 2655 { 2656 <div class="dw-logotext pull-left">@GeneralSettings.Logo.Text</div> 2657 } 2658 </a> 2659 2660 if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Slogan)) 2661 { 2662 <div class="dw-slogantext pull-left">@GeneralSettings.Logo.Slogan</div> 2663 } 2664 } 2665 </div> 2666 2667 <div class="col-lg-9 col-md-9 col-sm-8 col-xs-7 logobox"> 2668 <nav class="top-header-menu"> 2669 <ul class="top-menu quickButtonsMenu"> 2670 <!-- Ecommerce user menu --> 2671 @if (GetBoolean("Item.Area.EcomEnabled")) 2672 { 2673 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2674 { 2675 <text> 2676 2677 <li class="login hidden-xs hidden-sm"><a data-toggle="modal" data-target="#login"><i class="fa fa-user" aria-hidden="true"></i><span class="hidden-xs">@Translate("Login", "Login")</span></a></li> 2678 2679 2680 </text> 2681 } 2682 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2683 { 2684 <text> 2685 <li class="hidden-xs hidden-sm"> 2686 <a href='Default.aspx?ID=@myaccount'> 2687 <i class="fa fa-user" aria-hidden="true"></i><span class="hidden-xs">@Translate("My account", "My account")</span> 2688 </a> 2689 </li> 2690 <li class="hidden-xs hidden-sm"> 2691 @{ 2692 var parameter = ""; 2693 } 2694 @if (!string.IsNullOrWhiteSpace(listid)) 2695 { 2696 parameter = "&ListID=" + listid; 2697 } 2698 <a href='Default.aspx?ID=@GetString("Item.Area.WishListPage")' id="linkwishlist"> 2699 <i class="fa fa-list" aria-hidden="true"></i><span class="hidden-xs">@Translate("My List", "My List")</span> 2700 </a> 2701 </li> 2702 </text> 2703 } 2704 } 2705 2706 <!-- Ecommerce Cart --> 2707 @if (GetBoolean("Item.Area.EcomEnabled")) 2708 { 2709 var cartJSONRealID = GetString("Item.Area.Quote_Cart_JSON_PageID"); 2710 <li class="menu__item hidden-xs hidden-sm"> 2711 <div class="mini-cart"> 2712 <a href="/Default.aspx?ID=@cartid" class="menu-tools__link menu__link--condensed dw-mod js-mini-cart-button" onmouseover="Dynamo.UpdateContent('miniCart', '/Default.aspx?ID=@cartJSONRealID&LayoutTemplate=Json.cshtml&DisableStatistics=True')" data-init-onload="false"> 2713 <i class="fa fa-shopping-cart" style="margin-right:6px;"></i> 2714 @if (isLoggedIn == "") 2715 { 2716 <span class="hidden-xs">@Translate("Pricequote", "Pricequote")</span> 2717 } 2718 else 2719 { 2720 <span class="hidden-xs">@Translate("My cart", "My cart")</span> 2721 } 2722 </a> 2723 @if(currentpageid != cartPageId) { 2724 <div id="minicartQuantity" class="js-ajax-container" data-template="MiniCartQuantity" data-cart-id="@cartPageId" data-json-feed="/Default.aspx?ID=@cartPageId&LayoutTemplate=Json.cshtml&DisableStatistics=True" data-preloader="false"></div> 2725 <div class="mini-cart-dropdown js-ajax-container js-mini-cart" id="miniCart" data-template="MiniCartContent" data-cart-id="@cartPageId" data-json-feed="/Default.aspx?ID=@cartPageId&LayoutTemplate=Json.cshtml&DisableStatistics=True" data-preloader="false" data-init-onload="false"></div> 2726 2727 <script id="MiniCartQuantity" type="x-template"> 2728 <span class="mini-quantity data.isempty">data.numberofproducts</span> 2729 </script> 2730 2731 <div class="mini-cart-dropdown js-ajax-container js-mini-cart" id="miniCart" data-template="MiniCartContent" data-cart-id="@cartJSONRealID" data-json-feed="/Default.aspx?ID=@cartJSONRealID&LayoutTemplate=Json.cshtml&DisableStatistics=True" data-preloader="false" data-init-onload="false"></div> 2732 2733 2734 <script id="MiniCartContent" type="text/x-template"> 2735 <div class="hidden mini-new-quantity">data.numberofproducts</div> 2736 <div class="mini-cart-dropdown__inner data.isempty"> 2737 @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2738 { 2739 <table class="table mini-cart-table"> 2740 <thead> 2741 <tr> 2742 <td>&nbsp;</td> 2743 <td>@Translate("Product")</td> 2744 </tr> 2745 </thead> 2746 2747 <tbody id="OrderLines" data-template="OrderlinesTemplate"></tbody> 2748 <tr class="mini-cart-orderlines__footer"> 2749 <td colspan="2"><button type="button" class="btn pull-left btn-dw-primary emptyCartBtn" onclick="Cart.EmptyCart(event)">@Translate("Empty cart")</button></td> 2750 <td colspan="2" class="text-right"><a href="/Default.aspx?ID=@cartid" class="btn pull-right btn-dw-primary cartProceedBtn">@Translate("Proceed to checkout")</a></td> 2751 </tr> 2752 </table> 2753 } 2754 else 2755 { 2756 <table class="table mini-cart-table"> 2757 <thead> 2758 <tr> 2759 <td>&nbsp;</td> 2760 <td>@Translate("Product")</td> 2761 <td class="text-right">@Translate("Qty")</td> 2762 <td class="text-right">@Translate("Price")</td> 2763 </tr> 2764 </thead> 2765 2766 <tbody id="OrderLines" data-template="OrderlinesTemplate"></tbody> 2767 2768 <tr class="mini-cart-totals"> 2769 <td colspan="2">@Translate("Total")</td> 2770 <td class="text-right">data.numberofproducts</td> 2771 <td class="text-right">data.totalprice</td> 2772 </tr> 2773 <tr class="mini-cart-orderlines__footer"> 2774 <td colspan="2"><button type="button" class="btn pull-left btn-dw-primary emptyCartBtn" onclick="Cart.EmptyCart(event)">@Translate("Empty cart")</button></td> 2775 <td colspan="2" class="text-right"><a href="/Default.aspx?ID=@cartid" class="btn pull-right btn-dw-primary cartProceedBtn">@Translate("Proceed to checkout")</a></td> 2776 </tr> 2777 </table> 2778 } 2779 2780 </div> 2781 </script> 2782 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2783 { 2784 <script id="OrderlinesTemplate" type="text/x-template"> 2785 <tr class="data.isempty"> 2786 <td><div class="data.hideimage"><img src="data.image"></div></td> 2787 <td colspan="2"><a href="data.link">data.name data.variantname</a></td> 2788 </tr> 2789 </script> 2790 } 2791 else 2792 { 2793 <script id="OrderlinesTemplate" type="text/x-template"> 2794 <tr class="data.isempty"> 2795 <td><div class="data.hideimage"><img src="data.image"></div></td> 2796 <td><a href="data.link" class="mini-cart-orderlines__name">data.name data.variantname</a></td> 2797 <td class="text-right"><div class="data.hideimage">data.quantity</div></td> 2798 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2799 { 2800 <td class="text-right">data.totalprice</td> 2801 } 2802 </tr> 2803 </script> 2804 } 2805 } 2806 </div> 2807 </li> 2808 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2809 { 2810 <li class="logout hidden-xs hidden-sm"> 2811 <a href='/Admin/Public/ExtranetLogoff.aspx?ID=@firstpageid' title='@Translate("Sign out", "Sign out")'><i class="fa fa-sign-out" aria-hidden="true"></i>@Translate("Sign Out")</a> 2812 </li> 2813 } 2814 } @if (GeneralSettings.Header.Mode != "mobile") 2815 { 2816 <li class="hidden-lg hidden-md"> 2817 <a data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body"> <i class="fa fa-bars barsLink"></i></a> 2818 </li> 2819 } 2820 </ul> 2821 2822 2823 2824 </nav> 2825 @{ 2826 var deviceType = Dynamicweb.Frontend.PageView.Current().Device.ToString(); 2827 } 2828 2829 </div> 2830 2831 </div> 2832 </div> 2833 </div> 2834 } 2835 <div class="dropdown-megamenu Manufacturer hidden-xs hidden-sm navbar-fixed affix" role="navigation" data-spy="@stickyTrigger" data-offset-top="@sticky"> 2836 2837 @RenderItemList(new { ItemType = "Manufacturer", ListSourceType = "Area", ListSourceArea = 1, ItemFieldsList = "*", ListTemplate = "ItemPublisher/List/navigation.cshtml", ListPageSize = 100 }) 2838 2839 </div> 2840 2841 <div id="navOne" class="navbar-wp @selectionstyle navbar-fixed affix-top hidden-sm hidden-xs" role="navigation" data-spy="@stickyTrigger" data-offset-top="@sticky"> 2842 <div class="container"> 2843 @if (GeneralSettings.Header.Mode != "solid" || !GeneralSettings.Header.Show) 2844 { 2845 <div class="navbar-header pull-@GeneralSettings.Navigation.InvertedPosition"> 2846 <div class="hidden-sm hidden-xs"> 2847 <a href="/Default.aspx?ID=@firstpageid" class="brand"> 2848 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 2849 { 2850 if (GeneralSettings.Logo.ContrastImage != GeneralSettings.Logo.Image) 2851 { 2852 <img class="img-responsive dw-logoimage dw-logoimage-normal pull-left" src="@GeneralSettings.Logo.Image" alt="Logo"> 2853 <img class="img-responsive dw-logoimage dw-logoimage-contrast pull-left" src="@GeneralSettings.Logo.ContrastImage" alt="Logo"> 2854 } 2855 else 2856 { 2857 <img class="img-responsive dw-logoimage pull-left" src="@GeneralSettings.Logo.Image" alt="Logo"> 2858 } 2859 } 2860 2861 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text)) 2862 { 2863 <div class="dw-logotext pull-left">@GeneralSettings.Logo.Text</div> 2864 } 2865 </a> 2866 2867 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Slogan)) 2868 { 2869 <div class="dw-slogantext pull-left">@GeneralSettings.Logo.Slogan</div> 2870 } 2871 </div> 2872 </div> 2873 } 2874 @if (GeneralSettings.Header.Mode == "mobile") 2875 { 2876 <!-- Using only mobile navigation --> 2877 <div class="pull-@GeneralSettings.Navigation.Position"> 2878 <ul class="nav navbar-nav"> 2879 <li class="dw-navbar-button" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body"> 2880 <a><i class="fa fa-bars fa-2x"></i><span></span></a> 2881 </li> 2882 </ul> 2883 </div> 2884 } 2885 </div> 2886 </div> 2887 2888 @if (GetLoop("DWExtranetSecondaryUsers").Count > 0 || !string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) 2889 { 2890 <div class="impersonation-box" role="navigation" style="background-color:@primaryColor;"> 2891 <div class="container"> 2892 <form method="post" action="/" class="form-inline" id="form-impersonate"> 2893 2894 <span> 2895 @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) 2896 { 2897 <a class="impersonateListLink" href="@impersonationList" title="View the list of users you can impersonate"> 2898 @Translate("View the list of users you can impersonate", "View the list of users you can impersonate") 2899 </a> 2900 } 2901 else 2902 { 2903 string impersonateUser = GetGlobalValue("Global:Extranet.SecondaryUser.UserName") + " " + Translate("is now impersonating") + " " + GetGlobalValue("Global:Extranet.UserName"); 2904 string stopImpersonateTranslation = Translate("Stop impersonation"); 2905 <span title="@impersonateUser" class="impersonate-user"><i class="fa fa-user-secret"></i> @impersonateUser</span> 2906 <input type="hidden" name="DWExtranetRemoveSecondaryUser" value='Stop+impersonation'> 2907 <button type="submit" class="btn btn-dw-primary impresonateButton" value="@stopImpersonateTranslation"> 2908 @stopImpersonateTranslation 2909 </button> 2910 } 2911 </span> 2912 </form> 2913 </div> 2914 </div> 2915 } 2916 2917 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.HeaderLayoutImage"))) 2918 { 2919 if (currentpageid != firstpageid) 2920 { 2921 var coverimage = GetString("Item.Area.HeaderLayoutImage"); 2922 2923 <div class="container-fluid dw-header-image"> 2924 <div class="row"> 2925 <section class="carousel carousel-1 slice fluid" style="height: 160px !important; background: url('/Admin/Public/Getimage.ashx?width=1920&amp;compression=75&amp;Crop=5&amp;image=@coverimage') no-repeat; background-size: cover !important; background-color: @ColorSettings.Color.Secondary"></section> 2926 </div> 2927 </div> 2928 } 2929 else if (GeneralSettings.Header.ShowFrontpageImage) 2930 { 2931 var coverimage = GetString("Item.Area.HeaderLayoutImage"); 2932 2933 <div class="container-fluid dw-header-image"> 2934 <div class="row"> 2935 <section class="carousel carousel-1 slice fluid" style="height: 160px !important; background: url('/Admin/Public/Getimage.ashx?width=1920&amp;compression=75&amp;Crop=5&amp;image=@coverimage') no-repeat; background-size: cover !important; background-color: @ColorSettings.Color.Secondary"></section> 2936 </div> 2937 </div> 2938 } 2939 } 2940 else if (GeneralSettings.Header.Mode != "solid") 2941 { 2942 if (currentpageid != firstpageid) 2943 { 2944 <div class="container-fluid dw-header-image"> 2945 <div class="row"> 2946 <section class="carousel carousel-1 slice fluid" style="height: 160px !important; background-color: transparent; background-size: cover !important;"></section> 2947 </div> 2948 </div> 2949 2950 } 2951 } 2952 @{ 2953 var actionLink = "/Default.aspx?ID=" + searchPageID + "&PageNum=1"; 2954 } 2955 <div class="inner-search"> 2956 <div class="container"> 2957 <div class="row"> 2958 <div class="col-md-5 col-sm-12 col-xs-12 top-header navbar navbar-enco"> 2959 <nav class="navbar-collapse collapse"> 2960 @if (GeneralSettings.Navigation.IsMegamenu) 2961 { 2962 @GetValue("DwNavigation(topnavigationmegamenu)") 2963 } 2964 else 2965 { 2966 @GetValue("DwNavigation(topnavigation)") 2967 } 2968 2969 <!-- Extra navigation when no header is shown --> 2970 @if (GetBoolean("Item.Area.EcomEnabled")) 2971 { 2972 if (!GeneralSettings.Header.Show) 2973 { 2974 <ul class="nav navbar-nav"> 2975 <li>&nbsp;&nbsp;&nbsp;</li> 2976 @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2977 { 2978 <li class="dw-navbar-button"><a href="#" data-toggle="modal" data-target="#login" data-hover="dropdown"><i class="fa fa-sign-in"></i><span></span></a></li> 2979 <li class="dw-navbar-button"><a href="/Default.aspx?ID=@createuser" data-hover="dropdown"><i class="fa fa-user"></i><span></span></a></li> 2980 } 2981 2982 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2983 { 2984 <li class="dw-navbar-button"> 2985 <a href='Default.aspx?ID=@Pageview.Area.Item["OrdersPageId"]' data-hover="dropdown"> 2986 <nobr> 2987 <strong><i class="fa fa-user"></i></strong> 2988 </nobr> 2989 <span></span> 2990 </a> 2991 </li> 2992 <li class="dw-navbar-button"> 2993 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID" data-hover="dropdown"><i class="fa fa-sign-out"></i>@Translate("Sign Out")<span></span></a> 2994 </li> 2995 } 2996 2997 <li class="dw-navbar-button"> 2998 <a href="Default.aspx?ID=@cartid" title="" id="minipagecart-extra" data-hover="dropdown"><i class="fa fa-shopping-cart"></i> @GetValue("Ecom:Order.OrderLines.TotalProductQuantity") <span class="amount">@GetValue("Ecom:Order.OrderLines.Total.PriceWithVAT")</span><span></span></a> 2999 </li> 3000 </ul> 3001 } 3002 } 3003 </nav> 3004 </div> 3005 <div class="col-md-7 col-sm-12 col-xs-12"> 3006 <form class="innerSearch" method="POST"> 3007 <input name="actionVal" type="hidden" value="@actionLink"> 3008 <div class="dw-inner-search"> 3009 <div class="input-wrapper"> 3010 <input type="text" id="searchInput" name="q" class="form-control js-typeahead innerSerachBox" autocomplete="off" placeholder="@searchplaceholder" data-container-id="typeaheadSearch" data-search-page-id="@productsJsonID"> 3011 <label for="searchInput" class="fa fa-search input-icon"></label> 3012 </div> 3013 <input type="submit" class="hidden" value="sumbit"> 3014 <div class="typeahead-result js-ajax-container" id="typeaheadSearch" data-template="searchItems" data-json-feed="/Default.aspx?ID=@productsJsonID&LayoutTemplate=Json.cshtml&DisableStatistics=True&feedtype=typeahead" data-init-onload="false"></div> 3015 </div> 3016 </form> 3017 </div> 3018 </div> 3019 </div> 3020 </div> 3021 </header> 3022 3023 </div> 3024 3025 3026 3027 3028 3029 3030 3031 <!-- MAIN CONTENT --> 3032 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 3033 3034 @GetValue("Title(Full width page)") 3035 @GetValue("Description(Use this page for full width pages with no left navigation.)") 3036 3037 @{ 3038 string siteurl = GetGlobalValue("Global:Request.Url").ToString(); 3039 } 3040 3041 @if (GetBoolean("Item.Page.LayoutShowBreadcrumb")) 3042 { 3043 <div class="pg-opt pin white"> 3044 <div class="container"> 3045 <div class="row"> 3046 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> 3047 @GetValue("DwNavigation(breadcrumb)") 3048 </div> 3049 </div> 3050 </div> 3051 </div> 3052 } 3053 3054 <div class="slice white animate-hover-slide mainContentWrapper" id="content"> 3055 3056 <div class="container"> 3057 <div class="row"> 3058 @if (!GetBoolean("Item.Page.LayoutHideLeftMenu")) 3059 { 3060 <div class="col-md-3 hidden-sm hidden-xs contain-wrapper"> 3061 <div class="widget"> 3062 @*<h3 class="dw-section-title dw-section-title-small"><span>@GetGlobalValue("Global:Page.Top.Name")</span></h3>*@ 3063 @GetValue("DwNavigation(leftnavigation)") 3064 </div> 3065 <p>&nbsp;</p> 3066 </div> 3067 } 3068 3069 @*The content*@ 3070 @{ 3071 var attributeValue = "col-md-9 col-sm-12 col-xs-12"; 3072 3073 if (GetBoolean("Item.Page.LayoutHideLeftMenu")) 3074 { 3075 attributeValue = "col-md-12 col-sm-12 col-xm-12"; 3076 } 3077 } 3078 3079 <div class="@attributeValue"> 3080 <div class="row" id="maincontent">@GetValue("DwContent(maincontent)")</div> 3081 @{ 3082 var prodname = RenderSnippet("ProductName"); 3083 3084 @SnippetStart("ShareIcons") 3085 3086 var icons = ""; 3087 3088 <ul class="share-icons"> 3089 <li class="text-left"><span>@Translate("Share", "Share")</span></li> 3090 @foreach (var icon in GetLoop("Item.Page.SharingOption.Options")) 3091 { 3092 string name = icon.GetString("Item.Page.SharingOption.Option.Label"); 3093 var link = System.Web.HttpUtility.UrlDecode(icon.GetString("Item.Page.SharingOption.Option.Value")); 3094 3095 3096 if (icon.GetString("Item.Page.SharingOption.Option.IsSelected") == "True") 3097 { 3098 if (name.Contains("e-mail")) 3099 { 3100 icons = "fa-envelope"; 3101 } 3102 if (name.Contains("Pinterest")) 3103 { 3104 icons = "fa-pinterest"; 3105 } 3106 if (name.Contains("Google")) 3107 { 3108 icons = "fa-google-plus"; 3109 } 3110 if (name.Contains("facebook")) 3111 { 3112 icons = "fa-facebook"; 3113 } 3114 if (name.Contains("twitter")) 3115 { 3116 icons = "fa-twitter"; 3117 } 3118 if (name.Contains("linkedin")) 3119 { 3120 icons = "fa-linkedin"; 3121 } 3122 if (name.Contains("Instagram")) 3123 { 3124 icons = "fa-instagram"; 3125 } 3126 if (name.Contains("e-mail")) 3127 { 3128 <li> 3129 @prodname 3130 <a href="@link&amp;Subject=@siteurl&amp;Body=@siteurl" class=""><i class="fa @icons fa-2x" aria-hidden="true"></i></a> 3131 </li> 3132 } 3133 else 3134 { 3135 <li> 3136 <a href="@link@siteurl " target="_blank" class="customer share"><i class="fa @icons fa-2x" aria-hidden="true"></i></a> 3137 </li> 3138 } 3139 } 3140 } 3141 </ul> 3142 @SnippetEnd("ShareIcons") 3143 } 3144 </div> 3145 3146 </div> 3147 3148 </div> 3149 </div> 3150 3151 3152 3153 <!-- FOOTER --> 3154 <!-- FOOTER --> 3155 3156 @if (GetBoolean("Item.Area.FooterNewsletterSignUp")) 3157 { 3158 <div class="newsletterSingUp"> 3159 <div class="container"> 3160 <div class="row"> 3161 <div class="col-md-12"> 3162 3163 <h3 class="col-md-2">@Translate("Newsletter")</h3> 3164 <form class="col-md-10" style="padding-right:0px; padding-left:0;" name="UserManagementEditForm" action="/Default.aspx?ID=@signUpPageId" method="POST" enctype="multipart/form-data"> 3165 <div class="hidden"> 3166 <input name="UserManagementForm" value="1" type="hidden"> 3167 <input id="UserManagementForm.DeleteImage" name="UserManagementForm.DeleteImage" type="hidden"> 3168 <input name="UserManagement_Form_EmailAllowed" id="UserManagement_Form_EmailAllowed" value="True" checked="checked" type="checkbox"> 3169 <input name="UserManagement_Form_EmailAllowed_ApplyValue" id="UserManagement_Form_EmailAllowed_ApplyValue" value="AllowEmail" type="hidden"> 3170 </div> 3171 <input name="UserManagement_Form_Name" id="UserManagement_Form_Name" type="text" class="form-control" placeholder='@Translate("name")'> 3172 <input name="UserManagement_Form_Email" id="UserManagement_Form_Email" type="email" class="form-control" placeholder='@Translate("email")' required="required"> 3173 <button type="submit" class="btn btn-newsletterSubmit">@Translate("Sign up")</button> 3174 </form> 3175 3176 </div> 3177 </div> 3178 </div> 3179 </div> 3180 } 3181 @{ 3182 string TitleSize = GetString("Item.Area.FooterH4.Size") + "px"; 3183 string TitleColor = GetString("Item.Area.FooterH4.Color.Color.Value"); 3184 string TitleFont = CustomFont(GetString("Item.Area.FooterH4.Font.Value"), GetString("Item.Area.FooterH4.CustomFont.Value")); //.Replace(" ", "+"); 3185 } 3186 <style> 3187 #footersitemap h4{ 3188 color:@TitleColor !important; 3189 font-size:@TitleSize !important; 3190 font-family: @TitleFont !important; 3191 } 3192 footer .share-links h4{ 3193 color:@TitleColor !important; 3194 font-size:@TitleSize !important; 3195 font-family: @TitleFont !important; 3196 } 3197 </style> 3198 3199 3200 <div class="body-wrap @GeneralSettings.Site.LayoutMode"> 3201 @{ 3202 var footerbg = ""; 3203 var important = ""; 3204 3205 } 3206 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.FooterBackgroundImage"))) 3207 { 3208 footerbg = "background:url(/Admin/Public/GetImage.ashx?&width=1920&amp;Compression=99&amp;image=" + GetString("Item.Area.FooterBackgroundImage") + ") no-repeat"; 3209 important = "!important;"; 3210 } 3211 <footer class="footer" style='@footerbg @important background-position: center center !important;background-size: cover !important;'> 3212 <div class="overlay"></div> 3213 <div class="container"> 3214 <div class="row"> 3215 @if (GetBoolean("Item.Area.FooterShowSitemap")) 3216 { 3217 @GetValue("DwNavigation(footersitemap)") 3218 3219 } 3220 @if (GetBoolean("Item.Area.SocialLinksInFooter")) 3221 { 3222 string sicon = ""; 3223 string slink = ""; 3224 3225 <div class="col-md-4 col-sm-4 col-xs-12 share-links"> 3226 <div class="col text-left"> 3227 <h4>@Translate("Follow Us", "Follow Us")</h4> 3228 <p> 3229 @{ 3230 string footeremail = GetString("Item.Area.FooterEmail"); 3231 string footerphone = GetString("Item.Area.FooterPhone"); 3232 string footerfax = GetString("Item.Area.FooterFax"); 3233 string notesfooter = GetString("Item.Area.NotesFooter"); 3234 } 3235 <a href='mailto:@footeremail' class='footerEmail' style="font-size: 19px !important;margin-right: 10px;" title='@Translate("Send us a message")'> 3236 @Translate("@EnotriaCoe") 3237 </a> 3238 @foreach (LoopItem socialitem in GetLoop("Item.Area.SocialIconInFooter")) 3239 { 3240 sicon = socialitem.GetString("Item.Area.SocialIconInFooter.Icon"); 3241 slink = socialitem.GetString("Item.Area.SocialIconInFooter.Link"); 3242 <a href="@slink"> 3243 <i class="fa @sicon"></i> 3244 </a> 3245 } 3246 </p> 3247 <div class="EnotriaMeta"> 3248 @if (!string.IsNullOrWhiteSpace(footerphone)) 3249 { 3250 <p> 3251 @Translate("T: ", "T: ")@footerphone 3252 </p> 3253 } 3254 @GetValue("Item.Area.FooterAddress") 3255 </div> 3256 </div> 3257 </div> 3258 } 3259 </div> 3260 <div class="row logo-footer"> 3261 <p class="col"> 3262 <a href="https://www.drinkaware.co.uk/" title='@Translate("Visit Drinkaware website")' class="drinkawareLogo" target="_blank"> 3263 <img src="/Files/Templates/Designs/Dwsimple/images/drinkaware.png" alt='@Translate("Drinkaware logo")'> 3264 </a> 3265 </p> 3266 </div> 3267 </div> 3268 </footer> 3269 </div> 3270 3271 3272 <!--[if IE]> 3273 <style> 3274 3275 .widget.affix{ 3276 3277 width:21% !important; 3278 3279 } 3280 3281 3282 </style> 3283 <![endif]--> 3284 <!-- Essentials --> 3285 <div class="@backgroundmodal" style="z-index:1030;"></div> 3286 3287 3288 3289 <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> 3290 <script src="//cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.js"></script> 3291 <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/js/jasny-bootstrap.min.js"></script> 3292 <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script> 3293 <script src="/Files/Templates/Designs/Dwsimple/js/jquery.dotdotdot.js"></script> 3294 @{ 3295 Int32 unixTimestamp = (Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds; 3296 } 3297 <script src="/Files/Templates/Designs/Dwsimple/js/Cart.js?latest=@unixTimestamp"></script> 3298 <script src="/Files/Templates/Designs/Dwsimple/js/custom.js"></script> 3299 <script src="/Files/Templates/Designs/Dwsimple/js/spin.js"></script> 3300 <script src="/Files/Templates/Designs/Dwsimple/js/Search.js"></script> 3301 <script src="/Files/Templates/Designs/Dwsimple/js/Facets.js"></script> 3302 3303 <script src="/Files/Templates/Designs/Dwsimple/js/Dynamo.js?latest=@unixTimestamp"></script> <!--SHOULD BE LOADED LAST!!!! EVERYTHING BREAKS OTHERWISE--> 3304 3305 3306 @if (GetString("DW_extranet_error_uk") != "") 3307 { 3308 <script> 3309 $('#login').modal('show') 3310 </script> 3311 } 3312 3313 <!-- Replacing the Home text --> 3314 <script> 3315 if (document.getElementById("homemenubtn")) { 3316 document.getElementById("homemenubtn").innerHTML = "<i class='fa fa-home fa-2'></i><span></span>"; 3317 } 3318 </script> 3319 3320 <script type="text/x-template" id="OrderlineAjaxTemplate"> 3321 <tr> 3322 <td class="text-center"><img src="Obj.image" class="img-center" alt=""></td> 3323 <td> 3324 <a href="Obj.link"> 3325 Obj.name Obj.variantname 3326 </a> 3327 </td> 3328 <td class="text-center">Obj.quantity</td> 3329 <td class="text-right"> 3330 <nobr> 3331 Obj.totalprice 3332 </nobr> 3333 </td> 3334 </tr> 3335 </script> 3336 <!-- Template for Typeahead --> 3337 3338 <script id="searchItems" type="text/x-template"> 3339 <a href="data.link" class="typeahead-result__item"> 3340 <div class="typeahead-result__image"> 3341 <img src="data.image" alt=""> 3342 </div> 3343 <div class="typeahead-result__text"> 3344 <div class="typeahead-result__name">data.name</div> 3345 <div class="typeahead-result__info data.NotSeePrice">data.price</div> 3346 </div> 3347 </a> 3348 </script> 3349 3350 <!-- Initialize Fancybox --> 3351 <script type="text/javascript"> 3352 $(document).ready(function () { 3353 if ($(".fancybox").fancybox != undefined) { 3354 $(".fancybox").fancybox(); 3355 } 3356 3357 }); 3358 </script> 3359 <script> 3360 $("#form-impersonate").on("click", "a.select-user", function () { 3361 var $this = $(this); 3362 var $form = $this.closest("form"); 3363 $("input[name=DWExtranetSecondaryUserSelector]", $form).val($this.attr("data-userid")); 3364 $form.submit(); 3365 }); 3366 </script> 3367 @if (currentUser.Any()) 3368 { 3369 3370 3371 <script> 3372 $(function () { 3373 setTimeout(function () { 3374 3375 var userAddress = $.cookie("selected_address_id"); 3376 var userListID = $.cookie("selected_list_id"); 3377 if (currentUserId !== "0" && (userAddress == undefined || userAddress === "null")) { 3378 $("#address, .modal-backdrop").addClass("in show"); 3379 } 3380 if (currentUserId === "0") { 3381 $.cookie("selected_address_id", null, { path: "/" }); 3382 $.cookie("selected_list_id", null, { path: "/" }); 3383 } 3384 if ($.cookie('selected_address_id') != null) { 3385 $('#selectaddress option[value="' + $.cookie('selected_address_id') + '"]').attr('selected', 'selected'); 3386 if ($.cookie('selected_list_id') != "" && $.cookie('selected_list_id') != null) { 3387 @* $("#linkwishlist").attr("href", "Default.aspx?ID=" +@GetString("Item.Area.WinelistLoaderPageId") +"&ListID=" + $.cookie('selected_list_id'));*@ 3388 } 3389 } 3390 if ($("#selectaddress option").length <= 1) { 3391 var date = new Date(); 3392 var minutes = 1440; 3393 date.setTime(date.getTime() + (minutes * 60 * 1000)); 3394 $("#address, .modal-backdrop").removeClass("in show"); 3395 var selectedAddress = $("#selectaddress :first").val(); 3396 var selectedListID = $("#selectaddress :first").attr("data-listid"); 3397 $.cookie("selected_address_id", selectedAddress, { expires: date, path: "/" }); 3398 $.cookie("selected_list_id", selectedListID, { expires: date, path: "/" }); 3399 3400 } 3401 $("form[name=modalAddress]").submit(function (e) { 3402 var date = new Date(); 3403 var minutes = 1440; 3404 date.setTime(date.getTime() + (minutes * 60 * 1000)); 3405 var selectedAddress = $("#selectaddress :selected").val(); 3406 var selectedListID = $("#selectaddress :selected").attr("data-listid"); 3407 if (selectedAddress !== "") { 3408 $.cookie("selected_address_id", selectedAddress, { expires: date, path: "/" }); 3409 $.cookie("selected_list_id", selectedListID, { expires: date, path: "/" }); 3410 $("#address, .modal-backdrop").removeClass("in show"); 3411 } 3412 3413 return true; 3414 }); 3415 }, 100); 3416 }); 3417 </script> 3418 } 3419 <script> 3420 $(".logout a").on("click", function () { 3421 $.cookie("selected_address_id", null, { path: "/" }); 3422 $.cookie("selected_list_id", null, { path: "/" }); 3423 $.removeCookie("selected_address_id", { path: "/" }); 3424 $.removeCookie("selected_list_id", { path: "/" }); 3425 }); 3426 $(".quickButtonsMenu .login").on("click", function () { 3427 $.cookie("selected_address_id", null, { path: '/' }); 3428 $.cookie("selected_list_id", null, { path: "/" }); 3429 $.removeCookie("selected_address_id", { path: "/" }); 3430 $.removeCookie("selected_list_id", { path: "/" }); 3431 $.cookie("DeliveryName", "", { path: '/' }); 3432 $.cookie("DeliveryCompany", "", { path: '/' }); 3433 $.cookie("DeliveryPhone", "", { path: '/' }); 3434 $.cookie("DeliveryEmail", "", { path: '/' }); 3435 $.cookie("DeliveryAddress", "", { path: '/' }); 3436 $.cookie("DeliveryAddress2", "", { path: '/' }); 3437 $.cookie("DeliveryZip", "", { path: '/' }); 3438 $.cookie("DeliveryCity", "", { path: '/' }); 3439 }); 3440 @if (Pageview.Area.Item["EcommerceProductListForm"].ToString().Contains("box")) 3441 { 3442 <text> 3443 jQuery(function ($) { 3444 if (!$.cookie('ProductsTemplate') || $.cookie('ProductsTemplate') == undefined) { 3445 $.cookie("ProductsTemplate", "productGridItem"); 3446 } 3447 }); 3448 </text> 3449 } 3450 //$(".mini-quantity").hide(); 3451 //$(".js-mini-cart-button").on("mouseover", function () { 3452 // var newText = $(".mini-new-quantity").html(); 3453 // if (parseInt(newText) > 0) { 3454 // $(".mini-quantity").show(); 3455 // $(".mini-quantity").html(newText); 3456 // } else { 3457 // $(".mini-quantity").hide(); 3458 // } 3459 //}); 3460 $('#yourid').on('click', function () { 3461 $(".close-menu").trigger("click"); 3462 setTimeout(function () { $(".quickButtonsMenu .login a").trigger("click"); }, 100); 3463 }); 3464 </script> 3465 @RenderSnippet("JavaScriptBottom") 3466 @Pageview.Area.Item["EcommerceProductListForm"] 3467 </div></body> 3468 3469 </html>