Error compiling template "Designs/Dwsimple/_parsed/product-catalogue.parsed.cshtml"
Line 5692: A local variable named 'request' is already defined in this scope

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 3 @using System 4 @using System.Web 5 @using System.Globalization 6 @using Dynamicweb.Frontend.Devices 7 @using System.Text.RegularExpressions 8 @using Dynamicweb.Environment.Helpers 9 @using Dynamicweb.Rendering 10 11 @using System.Text.RegularExpressions 12 @using System.Web 13 14 15 @functions{ 16 public class WrapMethods 17 { 18 //Gets the contrasting color 19 public static string getContrastYIQ(string hexcolor) 20 { 21 if (hexcolor != "") 22 { 23 hexcolor = Regex.Replace(hexcolor, "[^0-9a-zA-Z]+", ""); 24 25 int r = Convert.ToByte(hexcolor.Substring(0, 2), 16); 26 int g = Convert.ToByte(hexcolor.Substring(2, 2), 16); 27 int b = Convert.ToByte(hexcolor.Substring(4, 2), 16); 28 int yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000; 29 30 if (yiq >= 128) 31 { 32 return "black"; 33 } 34 else 35 { 36 return "white"; 37 } 38 } 39 else 40 { 41 return "black"; 42 } 43 } 44 45 46 //Truncate text 47 public static string Truncate (string value, int count, bool strip=true) 48 { 49 if (strip == true){ 50 value = StripHtmlTagByCharArray(value); 51 } 52 53 if (value.Length > count) 54 { 55 value = value.Substring(0, count - 1) + "..."; 56 } 57 58 return value; 59 } 60 61 62 //Strip text from HTML 63 public static string StripHtmlTagByCharArray(string htmlString) 64 { 65 char[] array = new char[htmlString.Length]; 66 int arrayIndex = 0; 67 bool inside = false; 68 69 for (int i = 0; i < htmlString.Length; i++) 70 { 71 char let = htmlString[i]; 72 if (let == '<') 73 { 74 inside = true; 75 continue; 76 } 77 if (let == '>') 78 { 79 inside = false; 80 continue; 81 } 82 if (!inside) 83 { 84 array[arrayIndex] = let; 85 arrayIndex++; 86 } 87 } 88 return new string(array, 0, arrayIndex); 89 } 90 91 //Make the correct count of columns 92 public static string ColumnMaker(int Col, string ScreenSize) 93 { 94 string Columns = ""; 95 96 switch (Col) 97 { 98 case 1: 99 Columns = "col-"+ScreenSize+"-12"; 100 break; 101 102 case 2: 103 Columns = "col-"+ScreenSize+"-6"; 104 break; 105 106 case 3: 107 Columns = "col-"+ScreenSize+"-4"; 108 break; 109 110 case 4: 111 Columns = "col-"+ScreenSize+"-3"; 112 break; 113 114 default: 115 Columns = "col-"+ScreenSize+"-3"; 116 break; 117 } 118 119 return Columns; 120 } 121 122 123 private string Custom(string firstoption, string secondoption) 124 { 125 if (firstoption == "custom") 126 { 127 return secondoption; 128 } 129 else 130 { 131 return firstoption; 132 } 133 } 134 } 135 } 136 137 138 139 140 141 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 142 143 @helper MiniCart() 144 { 145 <div class="dropdown-cart"> 146 @if (GetInteger("Ecom:Order.OrderLines.TotalProductQuantity") > 0) 147 { 148 <div id="full-cart"> 149 <div class="col-md-12 col-sm-12 col-xs-12"> 150 <div class="row" id="minicart-content"> 151 <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> 152 <table class="table table-cart"> 153 <thead> 154 <tr> 155 <th></th> 156 <th>@Translate("Product", "Product")</th> 157 <th class="text-center">@Translate("Qty", "Qty")</th> 158 <th class="text-right">@Translate("Total", "Total")</th> 159 </tr> 160 </thead> 161 <tbody> 162 163 @* Orderlines are rendered from the Ajax template *@ 164 165 </tbody> 166 <tfoot> 167 <tr> 168 <td class="text-center"><i class="fa fa-credit-card"></i></td> 169 <td id="minicart-payment"></td> 170 <td class="text-center"></td> 171 <td class="text-right" id="minicart-paymentfee"></td> 172 </tr> 173 <tr> 174 <td class="text-center"><i class="fa fa-truck"></i></td> 175 <td id="minicart-shipping"></td> 176 <td class="text-center"></td> 177 <td class="text-right" id="minicart-shippingfee"></td> 178 </tr> 179 <tr> 180 <td></td> 181 <td><strong>@Translate("Total", "Total")</strong></td> 182 <td class="text-center" id="minicart-total"></td> 183 <td class="text-right" id="minicart-totalprice"></td> 184 </tr> 185 </tfoot> 186 </table> 187 </div> 188 </div> 189 <div class="col-md-12 col-sm-12 col-xs-12"> 190 <div class="row"> 191 <div class="col-md-8"> 192 <button class="btn btn-xs btn-secondary pull-left" onclick="EmptyCart();">@Translate("Empty cart", "Empty cart")</button> 193 </div> 194 <div class="col-md-4"> 195 @{ 196 var cartid = GetValue("DwAreaCartPageID"); 197 } 198 199 <a href="Default.aspx?ID=@cartid" class="btn btn-xs btn-primary pull-right">@Translate("Proceed to checkout", "Proceed to checkout")</a> 200 <span class="clearfix"></span> 201 </div> 202 </div> 203 <div class="row">&nbsp;</div> 204 </div> 205 </div> 206 } 207 else 208 { 209 <span class="cart-items" id="empty-cart">@Translate("Your shopping cart is empty", "Your shopping cart is empty")</span> 210 } 211 </div> 212 } 213 214 <!DOCTYPE html> 215 <html lang="no"> 216 <head> 217 <meta charset="utf-8"> 218 <title>@GetValue("Title")</title> 219 @GetValue("MetaTags") 220 @GetValue("CopyRightNotice") 221 222 223 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> 224 <meta name="robots" content="index, follow"> 225 226 @{ 227 string MetaDescription = GetString("Meta.Description"); 228 string MetaKeywords = GetString("Meta.Keywords"); 229 string GoogleTagManagerId = GetString("Item.Area.GoogleTagManagerId"); 230 string favicon = GetString("Item.Area.Favicon"); 231 string currentpageid = GetString("DwPageID"); 232 string firstpageid = GetString("DwAreaFirstActivePageID"); 233 string logoutid = GetString("Item.Area.LogOutId"); 234 string searchplaceholder = Translate("Search products", "Search products"); 235 string newsletterid = GetString("Item.Area.NewsletterSignUpFormParagrahId"); 236 string downloadLink = GetString("Item.Area.DowloadsLink"); 237 string pressLink = GetString("Item.Area.PressLink"); 238 } 239 240 241 242 243 @* GOOGLE TAG MANAGER *@ 244 <script> 245 (function (w, d, s, l, i) { 246 w[l] = w[l] || []; w[l].push({ 247 'gtm.start': 248 new Date().getTime(), event: 'gtm.js' 249 }); var f = d.getElementsByTagName(s)[0], 250 j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); 251 })(window, document, 'script', 'dataLayer', '@GoogleTagManagerId'); 252 </script> 253 254 @* FACEBOOK ADMIN *@ 255 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.FacebookCommendAdmin"))) 256 { 257 string fbadmin = GetString("Item.Area.FacebookCommendAdmin"); 258 <meta property="fb:admins" content="@fbadmin"> 259 } 260 261 @* ESSENTIAL STYLES *@ 262 <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.4/css/bootstrap.min.css" type="text/css"> 263 <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css"> 264 <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.20/jquery.fancybox.min.css" media="screen"> 265 <link href="/Files/Templates/Designs/Dwsimple/css/bootstrap-datetimepicker.min.css" rel="stylesheet"> 266 <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/flag-icon-css/2.5.0/css/flag-icon.min.css" type="text/css"> 267 268 @* MOBILE MENU STYLES *@ 269 <link href="//cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/css/jasny-bootstrap.min.css" rel="stylesheet" type="text/css" media="screen"> 270 271 @* FAVICON *@ 272 <link href="@favicon" rel="icon" type="image/png"> 273 274 @* VARIABLES *@ 275 @{ 276 var attrValue = ""; 277 var cartid = GetValue("DwAreaCartPageID"); 278 var searchpage = GetString("Item.Area.ShowSearchPage"); 279 280 //DateTime areaUpdated = (DateTime)Pageview.Area.get_Value("AreaUpdatedDate"); 281 DateTime areaUpdated = DateTime.Now; 282 string cssPath = HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.min.css"); 283 DateTime lastWriteTime = System.IO.File.GetLastWriteTime(cssPath); 284 bool writeCss = false; 285 string css = String.Empty; 286 287 //if (areaUpdated > lastWriteTime) 288 //{ 289 // writeCss = true; 290 //} 291 292 if (areaUpdated > lastWriteTime.AddMinutes(1)) 293 { 294 writeCss = true; 295 } 296 297 bool IsNotLoggedIn = !string.IsNullOrWhiteSpace(GetString("DW_extranet_error_uk")) ? false : true; 298 } 299 300 @* FONT SETTINGS *@ 301 @{ 302 303 } 304 @functions{ 305 public class FontSettings 306 { 307 public class Logo 308 { 309 public static string FontFamily { get; set; } 310 public static string FontSize { get; set; } 311 public static string FontWeight { get; set; } 312 public static string Color { get; set; } 313 public static string LineHeight { get; set; } 314 public static string Casing { get; set; } 315 public static string LetterSpacing { get; set; } 316 } 317 318 public class Slogan 319 { 320 public static string FontFamily { get; set; } 321 public static string FontSize { get; set; } 322 public static string FontWeight { get; set; } 323 public static string Color { get; set; } 324 public static string LineHeight { get; set; } 325 public static string Casing { get; set; } 326 public static string LetterSpacing { get; set; } 327 } 328 329 public class H1 330 { 331 public static string FontFamily { get; set; } 332 public static string FontSize { get; set; } 333 public static string FontWeight { get; set; } 334 public static string Color { get; set; } 335 public static string LineHeight { get; set; } 336 public static string Casing { get; set; } 337 public static string LetterSpacing { get; set; } 338 } 339 340 public class H2 341 { 342 public static string FontFamily { get; set; } 343 public static string FontSize { get; set; } 344 public static string FontWeight { get; set; } 345 public static string Color { get; set; } 346 public static string LineHeight { get; set; } 347 public static string Casing { get; set; } 348 public static string LetterSpacing { get; set; } 349 } 350 public class H3 351 { 352 public static string FontFamily { get; set; } 353 public static string FontSize { get; set; } 354 public static string FontWeight { get; set; } 355 public static string Color { get; set; } 356 public static string LineHeight { get; set; } 357 public static string Casing { get; set; } 358 public static string LetterSpacing { get; set; } 359 } 360 public class H4 361 { 362 public static string FontFamily { get; set; } 363 public static string FontSize { get; set; } 364 public static string FontWeight { get; set; } 365 public static string Color { get; set; } 366 public static string LineHeight { get; set; } 367 public static string Casing { get; set; } 368 public static string LetterSpacing { get; set; } 369 } 370 public class Body 371 { 372 public static string FontFamily { get; set; } 373 public static string FontSize { get; set; } 374 public static string FontWeight { get; set; } 375 public static string Color { get; set; } 376 public static string LineHeight { get; set; } 377 public static string Casing { get; set; } 378 public static string LetterSpacing { get; set; } 379 } 380 } 381 382 private void InitFontSettings() 383 { 384 //LOGO 385 FontSettings.Logo.FontFamily = CustomFont(GetString("Item.Area.LogoFont.Font"), GetString("Item.Area.LogoFont.CustomFont")); 386 FontSettings.Logo.FontSize = GetString("Item.Area.LogoFont.Size") + "px"; 387 FontSettings.Logo.FontWeight = CheckExistence(GetString("Item.Area.LogoFont.Weight"), "normal"); 388 FontSettings.Logo.LineHeight = CheckExistence(GetString("Item.Area.LogoFont.LineHeight"), "1"); 389 FontSettings.Logo.LetterSpacing = GetString("Item.Area.LogoFont.LetterSpacing") + "px"; 390 FontSettings.Logo.Casing = GetString("Item.Area.LogoFont.Casing"); 391 FontSettings.Logo.Color = GetString("Item.Area.LogoFont.Color.Color"); 392 393 394 //SLOGAN 395 FontSettings.Slogan.FontFamily = CustomFont(GetString("Item.Area.LogoSloganFont.Font"), GetString("Item.Area.LogoSloganFont.CustomFont")); 396 FontSettings.Slogan.FontSize = GetString("Item.Area.LogoSloganFont.Size") + "px"; 397 FontSettings.Slogan.FontWeight = CheckExistence(GetString("Item.Area.LogoSloganFont.Weight"), "normal"); 398 FontSettings.Slogan.LineHeight = CheckExistence(GetString("Item.Area.LogoSloganFont.LineHeight"), "1"); 399 FontSettings.Slogan.LetterSpacing = GetString("Item.Area.LogoSloganFont.LetterSpacing") + "px"; 400 FontSettings.Slogan.Casing = GetString("Item.Area.LogoSloganFont.Casing"); 401 FontSettings.Slogan.Color = GetString("Item.Area.LogoSloganFont.Color.Color"); 402 403 404 //HEADINGS 405 FontSettings.H1.FontFamily = CustomFont(GetString("Item.Area.HeadingsH1.Font"), GetString("Item.Area.HeadingsH1.CustomFont")); 406 FontSettings.H1.FontSize = GetString("Item.Area.HeadingsH1.Size") + "px"; 407 FontSettings.H1.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH1.Weight"), "normal"); 408 FontSettings.H1.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH1.LineHeight"), "1"); 409 FontSettings.H1.LetterSpacing = GetString("Item.Area.HeadingsH1.LetterSpacing") + "px"; 410 FontSettings.H1.Casing = GetString("Item.Area.HeadingsH1.Casing"); 411 FontSettings.H1.Color = GetString("Item.Area.HeadingsH1.Color.Color"); 412 413 FontSettings.H2.FontFamily = CustomFont(GetString("Item.Area.HeadingsH2.Font"), GetString("Item.Area.HeadingsH2.CustomFont")); 414 FontSettings.H2.FontSize = GetString("Item.Area.HeadingsH2.Size") + "px"; 415 FontSettings.H2.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH2.Weight"), "normal"); 416 FontSettings.H2.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH2.LineHeight"), "1"); 417 FontSettings.H2.LetterSpacing = GetString("Item.Area.HeadingsH2.LetterSpacing") + "px"; 418 FontSettings.H2.Casing = GetString("Item.Area.HeadingsH2.Casing"); 419 FontSettings.H2.Color = GetString("Item.Area.HeadingsH2.Color.Color"); 420 421 FontSettings.H3.FontFamily = CustomFont(GetString("Item.Area.HeadingsH3.Font"), GetString("Item.Area.HeadingsH3.CustomFont")); 422 FontSettings.H3.FontSize = GetString("Item.Area.HeadingsH3.Size") + "px"; 423 FontSettings.H3.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH3.Weight"), "normal"); 424 FontSettings.H3.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH3.LineHeight"), "1"); 425 FontSettings.H3.LetterSpacing = GetString("Item.Area.HeadingsH3.LetterSpacing") + "px"; 426 FontSettings.H3.Casing = GetString("Item.Area.HeadingsH3.Casing"); 427 FontSettings.H3.Color = GetString("Item.Area.HeadingsH3.Color.Color"); 428 429 FontSettings.H4.FontFamily = CustomFont(GetString("Item.Area.HeadingsH4.Font"), GetString("Item.Area.HeadingsH4.CustomFont")); 430 FontSettings.H4.FontSize = GetString("Item.Area.HeadingsH4.Size") + "px"; 431 FontSettings.H4.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH4.Weight"), "normal"); 432 FontSettings.H4.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH4.LineHeight"), "1"); 433 FontSettings.H4.LetterSpacing = GetString("Item.Area.HeadingsH4.LetterSpacing") + "px"; 434 FontSettings.H4.Casing = GetString("Item.Area.HeadingsH4.Casing"); 435 FontSettings.H4.Color = GetString("Item.Area.HeadingsH4.Color.Color"); 436 437 438 //BODY 439 FontSettings.Body.FontFamily = CustomFont(GetString("Item.Area.BodyFont.Font"), GetString("Item.Area.BodyFont.CustomFont")); 440 FontSettings.Body.FontSize = GetString("Item.Area.BodyFont.Size") + "px"; 441 FontSettings.Body.FontWeight = CheckExistence(GetString("Item.Area.BodyFont.Weight"), "normal"); 442 FontSettings.Body.LineHeight = CheckExistence(GetString("Item.Area.BodyFont.LineHeight"), "1"); 443 FontSettings.Body.LetterSpacing = GetString("Item.Area.BodyFont.LetterSpacing") + "px"; 444 FontSettings.Body.Casing = GetString("Item.Area.BodyFont.Casing"); 445 FontSettings.Body.Color = GetString("Item.Area.BodyFont.Color.Color"); 446 447 448 gfonts.Add(FontSettings.Logo.FontFamily, ""); 449 450 if (!gfonts.ContainsKey(FontSettings.Slogan.FontFamily)) 451 { 452 gfonts.Add(FontSettings.Slogan.FontFamily, ""); 453 } 454 if (!gfonts.ContainsKey(FontSettings.H1.FontFamily)) 455 { 456 gfonts.Add(FontSettings.H1.FontFamily, ""); 457 } 458 if (!gfonts.ContainsKey(FontSettings.H2.FontFamily)) 459 { 460 gfonts.Add(FontSettings.H2.FontFamily, ""); 461 } 462 if (!gfonts.ContainsKey(FontSettings.H3.FontFamily)) 463 { 464 gfonts.Add(FontSettings.H3.FontFamily, ""); 465 } 466 if (!gfonts.ContainsKey(FontSettings.H4.FontFamily)) 467 { 468 gfonts.Add(FontSettings.H4.FontFamily, ""); 469 } 470 if (!gfonts.ContainsKey(FontSettings.Body.FontFamily)) 471 { 472 gfonts.Add(FontSettings.Body.FontFamily, ""); 473 } 474 475 } 476 477 private string CustomFont(string firstfont, string secondfont) 478 { 479 if (firstfont == "custom") 480 { 481 return secondfont; 482 } 483 else 484 { 485 return firstfont; 486 } 487 } 488 489 private string CheckExistence(string stringitem, string defaultvalue) 490 { 491 if (!string.IsNullOrWhiteSpace(stringitem)) 492 { 493 return stringitem; 494 } 495 else 496 { 497 return defaultvalue; 498 } 499 } 500 501 private System.Collections.Generic.Dictionary<string, object> 502 gfonts = new System.Collections.Generic.Dictionary<string, object> 503 (); 504 } 505 506 @{ 507 InitFontSettings(); 508 } 509 510 @helper GoogleFonts() 511 { 512 if (gfonts != null) 513 { 514 foreach (var item in gfonts) 515 { 516 string fontName = item.Key.Replace(" ", "+"); 517 if (fontName.Contains("MetaPro-Norm") || fontName.Contains("MetaPro-Black")) 518 { 519 <link rel="stylesheet" href="/Files/Templates/Designs/Dwsimple/css/font.css" type="text/css"> 520 } 521 else 522 { 523 <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=@item.Key:100,200,300,400,500,600,700,800,900"> 524 } 525 526 } 527 } 528 } 529 530 @functions{ 531 public string FontStylesCSS() 532 { 533 string CssString = @" 534 .dw-logotext { 535 font-family: " + FontSettings.Logo.FontFamily + @", sans-serif; 536 font-size: " + FontSettings.Logo.FontSize + @"; 537 font-weight: " + FontSettings.Logo.FontWeight + @"; 538 line-height: " + FontSettings.Logo.LineHeight + @" !important; 539 letter-spacing: " + FontSettings.Logo.LetterSpacing + @"; 540 text-transform: " + FontSettings.Logo.Casing + @"; 541 color: " + FontSettings.Logo.Color + @"; 542 } 543 544 .dw-slogantext { 545 font-family: " + FontSettings.Slogan.FontFamily + @", sans-serif; 546 font-size: " + FontSettings.Slogan.FontSize + @"; 547 font-weight: " + FontSettings.Slogan.FontWeight + @"; 548 line-height: " + FontSettings.Slogan.LineHeight + @" !important; 549 letter-spacing: " + FontSettings.Slogan.LetterSpacing + @"; 550 text-transform: " + FontSettings.Slogan.Casing + @"; 551 color: " + FontSettings.Slogan.Color + @"; 552 } 553 554 h1 { 555 font-family: " + FontSettings.H1.FontFamily + @", sans-serif !important; 556 font-size: " + FontSettings.H1.FontSize + @"; 557 color: " + FontSettings.H1.Color + @"; 558 line-height: " + FontSettings.H1.LineHeight + @" !important; 559 text-transform: " + FontSettings.H1.Casing + @"; 560 font-weight: " + FontSettings.H1.FontWeight + @"; 561 letter-spacing: " + FontSettings.H1.LetterSpacing + @" !important; 562 } 563 564 h3 { 565 font-family: " + FontSettings.H3.FontFamily + @", sans-serif !important; 566 font-size: " + FontSettings.H3.FontSize + @"; 567 color: " + FontSettings.H3.Color + @"; 568 line-height: " + FontSettings.H3.LineHeight + @" !important; 569 text-transform: " + FontSettings.H3.Casing + @"; 570 font-weight: " + FontSettings.H3.FontWeight + @"; 571 letter-spacing: " + FontSettings.H3.LetterSpacing + @" !important; 572 } 573 h4 { 574 font-family: " + FontSettings.H4.FontFamily + @", sans-serif !important; 575 font-size: " + FontSettings.H4.FontSize + @"; 576 color: " + FontSettings.H4.Color + @"; 577 line-height: " + FontSettings.H4.LineHeight + @" !important; 578 text-transform: " + FontSettings.H4.Casing + @"; 579 font-weight: " + FontSettings.H4.FontWeight + @"; 580 letter-spacing: " + FontSettings.H4.LetterSpacing + @" !important; 581 } 582 583 h2, h5, h6 { 584 margin-top: 0.7em; 585 margin-bottom: 0.7em; 586 587 font-family: " + FontSettings.H2.FontFamily + @", sans-serif !important; 588 font-size: " + FontSettings.H2.FontSize + @"; 589 color: " + FontSettings.H2.Color + @"; 590 line-height: " + FontSettings.H2.LineHeight + @"; 591 text-transform: " + FontSettings.H2.Casing + @" !important; 592 font-weight: " + FontSettings.H2.FontWeight + @" !important; 593 letter-spacing: " + FontSettings.H2.LetterSpacing + @" !important; 594 } 595 596 h5, h6 { 597 font-size: 16px !important; 598 } 599 600 body { 601 font-family: " + FontSettings.Body.FontFamily + @", sans-serif !important; 602 font-size: " + FontSettings.Body.FontSize + @"; 603 color: " + FontSettings.Body.Color + @"; 604 line-height: " + FontSettings.Body.LineHeight + @" !important; 605 text-transform: " + FontSettings.Body.Casing + @"; 606 font-weight: " + FontSettings.Body.FontWeight + @"; 607 letter-spacing: " + FontSettings.Body.LetterSpacing + @" !important; 608 } 609 610 .navbar-wp .navbar-nav > li > a { 611 font-family: " + FontSettings.Body.FontFamily + @", sans-serif !important; 612 } 613 614 .section-title { 615 margin-top: 0; 616 margin-bottom: 0.7em; 617 } 618 "; 619 return CssString; 620 } 621 } 622 623 @GoogleFonts() 624 625 @* GENERAL/COLOR SETTINGS *@ 626 @functions{ 627 public class ColorSettings 628 { 629 public class Color 630 { 631 public static string Primary { get; set; } 632 public static string Secondary { get; set; } 633 public static string NavbarFont { get; set; } 634 public static string Footer { get; set; } 635 public static string Address { get; set; } 636 public static string FooterFont { get; set; } 637 638 public static string Sticker { get; set; } 639 public static string Price { get; set; } 640 public static string Cart { get; set; } 641 } 642 } 643 644 private void InitColorSettings() 645 { 646 ColorSettings.Color.Primary = GetString("Item.Area.ColorsPrimary.Color"); 647 ColorSettings.Color.Secondary = GetString("Item.Area.ColorsSecondary.Color"); 648 649 ColorSettings.Color.NavbarFont = GetString("Item.Area.NavbarFontColor"); 650 651 if (string.IsNullOrWhiteSpace(ColorSettings.Color.NavbarFont)) 652 { 653 ColorSettings.Color.NavbarFont = WrapMethods.getContrastYIQ(ColorSettings.Color.Secondary); 654 } 655 656 ColorSettings.Color.Footer = GetString("Item.Area.ColorsFooterColor.Color"); 657 ColorSettings.Color.Address = GetString("Item.Area.AddressBarBackgroundColor.Color"); 658 ColorSettings.Color.FooterFont = WrapMethods.getContrastYIQ(ColorSettings.Color.Footer); 659 660 ColorSettings.Color.Price = GetString("Item.Area.EcommercePriceColor.Color"); 661 ColorSettings.Color.Sticker = GetString("Item.Area.EcommerceDiscountStickerColor.Color"); 662 ColorSettings.Color.Cart = GetString("Item.Area.EcommerceCartButtonColor.Color"); 663 } 664 665 public string GetColorSettings() 666 { 667 string CssString = @" 668 a:hover, a:focus, a:active { 669 color: @Primary; 670 } 671 672 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { 673 color: @NavbarFont; 674 } 675 676 .navbar-wp .navbar-nav > .active > a, .navbar-wp .navbar-nav > .active > a:hover, .navbar-wp .navbar-nav > .active > a:focus { 677 color: @NavbarFont; 678 } 679 680 .navbar-wp .navbar-nav > li > a:hover, .navbar-wp .navbar-nav > li > a:focus { 681 border-top: 0px solid @Secondary; 682 color: @NavbarFont; 683 } 684 685 .navbar-wp .navbar-nav > li > a span:after { 686 background-color: @Primary; 687 } 688 689 .navbar-wp .megamenu > li:hover > a { 690 color: @Primary !important; 691 } 692 693 .btn-dw-primary { 694 color: #FFF; 695 background-color: @Primary; 696 border-color: @Primary; 697 } 698 699 .btn-dw-secondary { 700 color: @NavbarFont; 701 background-color: @Secondary; 702 border-color: @Secondary; 703 } 704 705 .btn-dw-cart { 706 color: #FFF; 707 background-color: @Cart; 708 border-color: @Cart; 709 } 710 711 .dw-section-title { 712 border-color: @Secondary; 713 } 714 715 .dw-minicart-update { 716 color: #FFF !important; 717 background-color: @Primary; 718 transition: all 0.3s ease-in-out 0s; 719 } 720 721 .pagination > li > a, .pagination > li > a:hover, .pagination > li > a:focus, .pagination > li > a:active { 722 color: @Primary; 723 } 724 725 .form-control:hover, .form-control:focus, .form-control:active { 726 border-color: @Primary !important; 727 } 728 729 .bg-2 { 730 background: @Primary !important; 731 } 732 733 .blockquote-1:hover { 734 border-color: @Primary !important; 735 } 736 737 .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 { 738 color: @Primary; 739 } 740 741 .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 { 742 color: @Primary; 743 } 744 745 .navbar-wp .navbar-nav > li > a:hover, .navbar-wp .navbar-nav > li > a:focus { 746 border: 0px solid @Primary; 747 } 748 749 .navbar-wp .navbar-toggle:hover, .navbar-wp .navbar-toggle:focus { 750 background-color: @Primary !important; 751 border-color: @Primary !important; 752 } 753 754 .navbar-wp .dropdown-menu { 755 border-top: 1px solid @Primary !important; 756 border-bottom: 3px solid @Primary !important; 757 } 758 759 .navbar-wp .dropdown-menu > li > a:hover { 760 background: @Primary !important; 761 color: #fff; 762 } 763 764 .navbar-wp .dropdown-menu .active { 765 background: @Primary !important; 766 color: #fff; 767 } 768 769 .navbar-wp.navbar-contrasted .dropdown-menu > li > a:hover { 770 background: @Primary !important; 771 } 772 773 .nav > ul > li > a:hover { 774 color: @Primary; 775 } 776 777 .lw .w-box.w-box-inverse .thmb-img i { 778 color: @Primary !important; 779 } 780 781 .w-box.w-box-inverse .thmb-img:hover i { 782 background: @Primary !important; 783 } 784 785 .c-box { 786 border: 1px solid @Primary !important; 787 } 788 789 .c-box .c-box-header { 790 background: @Primary !important; 791 } 792 793 .w-section .aside-feature:hover .icon-feature, .w-section .aside-feature:hover h4 { 794 color: @Primary !important; 795 } 796 797 .layer-slider-wrapper .title.title-base { 798 background: @Primary !important; 799 } 800 801 .layer-slider-wrapper .subtitle { 802 color: @Primary !important; 803 } 804 805 .layer-slider-wrapper .list-item { 806 color: @Primary !important; 807 } 808 809 .box-element.box-element-bordered { 810 border: 1px solid @Primary !important; 811 } 812 813 .carousel-2 .carousel-indicators .active { 814 background-color: @Primary !important; 815 } 816 817 .carousel-2 .carousel-nav a { 818 color: @Primary !important; 819 } 820 821 .carousel-2 .carousel-nav a:hover { 822 background: @Primary !important; 823 } 824 825 .carousel-3 .carousel-nav a { 826 color: @Primary !important; 827 } 828 829 .carousel-3 .carousel-nav a:hover { 830 background: @Primary !important; 831 } 832 833 .like-button .button.liked i { 834 color: @Primary !important; 835 } 836 837 ul.list-listings li.featured { 838 border-color: @Primary !important; 839 } 840 841 ul.list-check li i { 842 color: @Primary !important; 843 } 844 845 ul.dw-categories li a:hover, ul.dw-categories a:focus, ul.dw-categories a:active{ 846 color: @NavbarFont; 847 background-color: @Primary; 848 border-color: @Primary; 849 } 850 851 ul.categories li a:hover, ul.categories a:focus, ul.categories a:active{ 852 color: @NavbarFont; 853 background-color: @Primary; 854 border-color: @Primary; 855 } 856 857 .timeline .event:nth-child(2n):before { 858 background-color: @Primary !important; 859 } 860 861 .timeline .event:nth-child(2n-1):before { 862 background-color: @Primary !important; 863 } 864 865 #toTopHover { 866 background-color: @Primary !important; 867 } 868 869 .tags-list li { 870 border: 1px solid @Primary !important; 871 color: @Primary !important; 872 } 873 874 .tags-list li:hover, 875 a.open-panel { 876 background-color: @Primary !important; 877 } 878 879 .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus, 880 .panel-group .panel-heading a i, 881 .tags-list li a { 882 color: @NavbarFont !important; 883 } 884 885 .nav-pills > li > a:hover, .nav-pills > li > a:focus { 886 color: @NavbarFont !important; 887 background: none repeat scroll 0% 0% @Secondary !important; 888 } 889 890 footer { 891 background: @Footer !important; 892 } 893 894 footer h4 { 895 color: @FooterFont !important; 896 } 897 898 footer a { 899 color: @FooterFont !important; 900 } 901 902 footer a:hover, footer a:focus, footer a:active { 903 color: @Secondary !important; 904 } 905 906 footer p { 907 color: @FooterFont !important; 908 } 909 910 footer ul > li { 911 color: @FooterFont !important; 912 } 913 914 footer hr { 915 border-color: @FooterFont 916 } 917 918 919 /* Button colors */ 920 .btn-base { 921 color: @NavbarFont !important; 922 background-color: @Secondary !important; 923 border: 1px solid @Secondary !important; 924 } 925 .btn-dw-cart:focus{ 926 background-color: @Secondary; 927 } 928 .btn-base:before { 929 background-color: @Secondary !important; 930 } 931 932 .btn-base:hover:before, .btn-base:focus:before, .btn-base:active:before { 933 color: @NavbarFont !important; 934 background-color: @Primary !important; 935 border-color: @Primary !important; 936 } 937 938 .btn-icon:before { 939 transition: none !important; 940 } 941 942 .btn-base:hover, .btn-base:focus, .btn-base:active, .btn-base.active, .open .dropdown-toggle.btn-base { 943 color: @NavbarFont !important; 944 background-color: @Primary !important; 945 border-color: @Primary !important; 946 } 947 948 .btn-primary { 949 background-color: @Primary !important; 950 border-color: @Primary !important; 951 } 952 953 .open .dropdown-toggle.btn-primary { 954 background-color: @Primary !important; 955 border-color: @Primary !important; 956 } 957 958 /* Dropdown-menu */ 959 .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { 960 background: @Primary !important; 961 color: #fff !important; 962 } 963 964 /* Ecom settings */ 965 .ribbon.base, .ball { 966 background: @Sticker !important; 967 color: #fff; 968 border-right: 5px solid @Sticker !important; 969 } 970 971 .ribbon.base:before { 972 border-top: 27px solid @Sticker !important; 973 } 974 975 .ribbon.base:after { 976 border-bottom: 27px solid @Sticker !important; 977 } 978 979 .price { 980 color: @Price !important; 981 } 982 983 .discount-sticker { 984 background-color: @Sticker !important; 985 } 986 987 .bs-callout-primary { 988 border-left-color: @Primary !important; 989 } 990 991 .ratings .fa-star { 992 color: @Secondary !important; 993 } 994 995 .feature-label { 996 color: @Secondary !important; 997 } 998 999 1000 .navbar-wp .megamenu.navbar-nav > li.active > a { 1001 border-color: @Primary !important; 1002 } 1003 .dw-section-title { 1004 border-color: @Primary !important; 1005 } 1006 .boxImageTextModule .box-size .desc-wrapper { 1007 border-color: @Primary !important; 1008 } 1009 .qoute .btn, .qoute .btn-span { 1010 border-color: @Primary !important; 1011 } 1012 .Multy-module .section-top h2.line { 1013 border-color: @Primary !important; 1014 } 1015 .row:nth-child(2n+2) .box { 1016 border-color: @Primary !important; 1017 } 1018 .row:nth-child(2n+2) .box .year:before, 1019 .history-module .row .box .box-inner .year:after { 1020 background-color: @Primary !important; 1021 } 1022 1023 .history-module .arrow .fa, 1024 .history-module .row .box .box-inner .year { 1025 color: @Primary !important; 1026 } 1027 1028 .history-module .row .box { 1029 border-color: @Primary !important; 1030 } 1031 .thankyouNewsletter { 1032 background: @Primary !important; 1033 } 1034 1035 .slideToggle { 1036 background-color: @Primary !important; 1037 } 1038 1039 .shere-social { 1040 border-color: @Primary !important; 1041 } 1042 1043 .dw-breadcrumb a, .pg-opt .breadcrumb, .pg-opt .goHome { 1044 color: @NavbarFont !important; 1045 } 1046 .panel-default > .panel-heading { 1047 color: @NavbarFont !important; 1048 } 1049 .panel-group { 1050 border-bottom: 1px solid @Primary !important; 1051 } 1052 .list-news .list-body .read-more, 1053 .news-detail .post-item p a, 1054 .searchContent ul li h3 a { 1055 color: @Primary !important; 1056 } 1057 .searchContent ul li { 1058 border-color: @Primary !important; 1059 } 1060 .searchContent > p { 1061 border-bottom: 1px solid @Primary !important; 1062 } 1063 .nav.nav-pills li.offcanvas-menubtn .mobileMenuFix { 1064 color: @Primary !important; 1065 } 1066 .dealer-shops, 1067 .dynamicweb-map .list { 1068 background: @Address !important; 1069 } 1070 .dealer-shops ul li:hover, 1071 .dynamicweb-map .list ol li:hover, 1072 .dynamicweb-map .list ul li:hover, 1073 .dynamicweb-map .list ol li.current, 1074 .dynamicweb-map .list ul li.current { 1075 background: @Primary !important; 1076 color: #fff !important; 1077 } 1078 1079 1080 .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default, .ui-button, html .ui-button.ui-state-disabled:hover, html .ui-button.ui-state-disabled:active { 1081 background: @Primary !important; 1082 } 1083 .ui-widget-content { 1084 background: @Address !important; 1085 } 1086 .lang-sug .langMenu li:hover { 1087 background: @Primary !important; 1088 } 1089 .btn-dw-primary.searchFieldShow:focus, .btn-dw-primary.searchFieldShow:active{ 1090 background-color: @Primary !important; 1091 } 1092 .customer-info-section{ 1093 border-top: 1px solid @Primary; 1094 border-bottom: 1px solid @Primary; 1095 } 1096 .dealers-customers-user-edit .modal-body input{ 1097 border-color: @Primary; 1098 } 1099 .dealers-customers-user-edit .modal-header{ 1100 background-color: @Primary; 1101 } 1102 #buy-all-modal .modal-header{ 1103 background-color: @Primary; 1104 } 1105 #credit-limit .modal-header{ 1106 background-color: @Primary; 1107 } 1108 .buy-all-modal-btn{ 1109 background-color: @Primary; 1110 } 1111 #buy-all-modal .price{ 1112 border-color: @Primary; 1113 } 1114 #credit-limit .space{ 1115 border-color: @Primary; 1116 } 1117 .dealers-customers-list table tr th { 1118 background-color: @Primary; 1119 } 1120 .dealers-customers-list table tr:nth-of-type(2n+1){ 1121 background: @Address; 1122 } 1123 tr.resultLine:nth-of-type(2n+2){ 1124 background: @Address!important; 1125 } 1126 .QuoteList thead tr, #orderlist thead tr{ 1127 background-color: @Primary; 1128 } 1129 .QuoteList tbody tr.pagging, #orderlist tbody tr.pagging{ 1130 background-color: @Footer !important; 1131 } 1132 .QuoteList tbody tr:nth-of-type(2n+1), #orderlist tbody tr:nth-of-type(2n+1){ 1133 background: @Address; 1134 } 1135 .QuoteDetail .header-tr th{ 1136 background-color: @Primary; 1137 } 1138 .TotalPrice { 1139 background-color: @Footer; 1140 } 1141 .OrderDetailTable tr.headerOrder{ 1142 background-color: @Primary; 1143 } 1144 #invoice .invoice-financials table > tbody > tr:nth-of-type(2n+2){ 1145 background: @Address; 1146 } 1147 .specification .specification-text{ 1148 background: @Address; 1149 } 1150 .navbar-wp .megamenu .dropdown-menu { 1151 background-color: @Address; 1152 } 1153 .list-news{ 1154 background-color: @Address; 1155 } 1156 .modal-header{ 1157 background-color: @Address; 1158 } 1159 .QuoteDetail .SelectFile .fa{ 1160 color: @Primary; 1161 } 1162 .QuoteDetail .AddProductsList .AddProducts input{ 1163 border-color: @Primary!important; 1164 } 1165 .QuoteDetail .EditCustomerInfo{ 1166 background-color: @Primary; 1167 } 1168 .QuoteDetail #editUser .modal-header{ 1169 background-color: @Primary !important; 1170 } 1171 #ProductsModal .modal-header{ 1172 background-color: @Primary !important; 1173 } 1174 .QuoteDetail #editUser .modal-footer{ 1175 border-color: @Primary !important; 1176 } 1177 .QuoteDetail .SelectFile:after{ 1178 background-color: @Primary; 1179 } 1180 .SelectCustomerList select{ 1181 border-color: @Primary; 1182 } 1183 .customer-information-section input, textarea{ 1184 border: 1px solid @Primary; 1185 } 1186 .SelectCustomerList:after{ 1187 background-color: @Primary; 1188 } 1189 .QuoteDetail .SelectFile select{ 1190 border-color: @Primary; 1191 } 1192 .QuoteDetail #editUser textarea{ 1193 border-color: @Primary !important; 1194 } 1195 .QuoteDetail #editUser input{ 1196 border-color: @Primary !important; 1197 } 1198 .QuoteDetail .select-delivery-address{ 1199 border-color: @Primary !important; 1200 } 1201 .modalbtnProducts{ 1202 background-color: @Primary; 1203 } 1204 .productNavigationModal li{ 1205 background-color: @Address; 1206 } 1207 .productNavigation.secondLevel li{ 1208 background-color: @Address; 1209 } 1210 .sectionFiles{ 1211 border-color: @Primary!important; 1212 } 1213 .sectionFiles div.hiddenPrint{ 1214 border-color: @Primary!important; 1215 } 1216 .productNavigationModal li.list-open-active{ 1217 background-color: @Primary; 1218 } 1219 1220 .history-module .row .modal-open { 1221 color: @Primary !important; 1222 }"; 1223 1224 return ParseCSSToString(CssString); 1225 } 1226 1227 private string ParseCSSToString(string TheString) 1228 { 1229 TheString = TheString.Replace("@Primary", ColorSettings.Color.Primary); 1230 TheString = TheString.Replace("@Secondary", ColorSettings.Color.Secondary); 1231 TheString = TheString.Replace("@NavbarFont", ColorSettings.Color.NavbarFont); 1232 TheString = TheString.Replace("@FooterFont", ColorSettings.Color.FooterFont); 1233 TheString = TheString.Replace("@Footer", ColorSettings.Color.Footer); 1234 TheString = TheString.Replace("@Address", ColorSettings.Color.Address); 1235 1236 TheString = TheString.Replace("@Sticker", ColorSettings.Color.Sticker); 1237 TheString = TheString.Replace("@Price", ColorSettings.Color.Price); 1238 TheString = TheString.Replace("@Cart", ColorSettings.Color.Cart); 1239 1240 1241 System.Text.StringBuilder sb = new System.Text.StringBuilder(); 1242 1243 foreach(var item in TheString.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries)) 1244 { 1245 sb.AppendLine(item); 1246 } 1247 1248 return sb.ToString(); 1249 } 1250 } 1251 1252 @{ 1253 InitColorSettings(); 1254 } 1255 1256 1257 1258 @using System.Drawing 1259 @using System.Net 1260 1261 1262 @functions{ 1263 public class GeneralSettings 1264 { 1265 1266 public class Header 1267 { 1268 public static string Mode { get; set; } 1269 public static string Classes { get; set; } 1270 public static bool Show { get; set; } 1271 public static string Background { get; set; } 1272 public static bool ShowFrontpageImage { get; set; } 1273 } 1274 1275 public class Logo 1276 { 1277 public static string Image { get; set; } 1278 public static string ContrastImage { get; set; } 1279 public static string Text { get; set; } 1280 public static string Slogan { get; set; } 1281 public static string SecondaryColor { get; set; } 1282 } 1283 1284 public class Navigation 1285 { 1286 public static string Position { get; set; } 1287 public static bool IsMegamenu { get; set; } 1288 public static bool IsAnimateNavigation { get; set; } 1289 public static string InvertedPosition { get; set; } 1290 public static string StickyMenu { get; set; } 1291 public static string SelectionMode { get; set; } 1292 public static string SelectionStyle { get; set; } 1293 public static int SelectionWeight { get; set; } 1294 public static bool Case { get; set; } 1295 1296 public static string BreadcrumbMode { get; set; } 1297 public static string BreadcrumbAlign { get; set; } 1298 1299 public static string LeftmenuMode { get; set; } 1300 1301 public static string ButtonDesign { get; set; } 1302 } 1303 1304 public class Headings 1305 { 1306 public static string Mode { get; set; } 1307 } 1308 1309 public class Background 1310 { 1311 public static string Color { get; set; } 1312 public static string Image { get; set; } 1313 public static string CustomImage { get; set; } 1314 public static bool GradientColor { get; set; } 1315 public static string GradientPercentage { get; set; } 1316 public static string Style { get; set; } 1317 public static string Position { get; set; } 1318 } 1319 1320 public class Site 1321 { 1322 public static bool Shadow { get; set; } 1323 public static string LayoutMode { get; set; } 1324 } 1325 1326 public class Images 1327 { 1328 public static bool RoundCorners { get; set; } 1329 } 1330 1331 public class Ecommerce 1332 { 1333 public static string EcomListDesign { get; set; } 1334 public static string EcomCardDesign { get; set; } 1335 } 1336 } 1337 1338 private void InitGeneralSettings() 1339 { 1340 //Header settings 1341 GeneralSettings.Header.Mode = GetString("Item.Area.HeaderLayoutMode"); 1342 GeneralSettings.Header.Show = GetBoolean("Item.Area.HeaderShow"); 1343 GeneralSettings.Header.Background = GetString("Item.Area.NavigationNavbarBackground"); 1344 GeneralSettings.Header.ShowFrontpageImage = GetBoolean("Item.Area.HeaderFrontpageImage"); 1345 1346 if (GeneralSettings.Header.Mode == "solid"){ 1347 GeneralSettings.Header.Classes = ""; 1348 } 1349 1350 if (GeneralSettings.Header.Mode == "cover" || GeneralSettings.Header.Mode == "mobile"){ 1351 GeneralSettings.Header.Classes = "header-alpha header-cover"; 1352 } 1353 1354 1355 //Logo settings 1356 GeneralSettings.Logo.Image = GetString("Item.Area.GeneralLogo"); 1357 GeneralSettings.Logo.Text = GetString("Item.Area.GeneralLogoText"); 1358 GeneralSettings.Logo.Slogan = GetString("Item.Area.LogoSlogan"); 1359 GeneralSettings.Logo.SecondaryColor = GetString("Item.Area.LogoSecondColor.Color"); 1360 1361 if (!string.IsNullOrWhiteSpace(GetString("Item.Area.LogoContrastImage"))) { 1362 GeneralSettings.Logo.ContrastImage = GetString("Item.Area.LogoContrastImage"); 1363 } else { 1364 GeneralSettings.Logo.ContrastImage = GetString("Item.Area.GeneralLogo"); 1365 } 1366 1367 1368 //Navigation settings 1369 GeneralSettings.Navigation.Position = GetString("Item.Area.NavigationPosition"); 1370 GeneralSettings.Navigation.StickyMenu = "off"; 1371 GeneralSettings.Navigation.IsMegamenu = GetBoolean("Item.Area.IsMegamenu"); 1372 GeneralSettings.Navigation.IsAnimateNavigation = GetBoolean("Item.Area.IsAnimateNavigation"); 1373 1374 if (GetBoolean("Item.Area.NavigationSticky")) { 1375 if (GeneralSettings.Header.Show) 1376 { 1377 if (GeneralSettings.Header.Mode == "cover") 1378 { 1379 GeneralSettings.Navigation.StickyMenu = "44"; //"data-spy=\"affix\" data-offset-top=\"44\" data-offset-bottom=\"300\""; 1380 } 1381 else 1382 { 1383 int offset = ImageHeight()+28; 1384 1385 GeneralSettings.Navigation.StickyMenu = offset.ToString(); // "data-spy=\"affix\" data-offset-top=\"" + offset.ToString() + "\" data-offset-bottom=\"300\""; 1386 } 1387 } 1388 else 1389 { 1390 GeneralSettings.Navigation.StickyMenu = "5"; // "data-spy=\"affix\" data-offset-top=\"5\" data-offset-bottom=\"300\""; 1391 } 1392 } 1393 1394 if (GeneralSettings.Navigation.Position == "left") { 1395 GeneralSettings.Navigation.InvertedPosition = "right"; 1396 } 1397 else 1398 { 1399 GeneralSettings.Navigation.InvertedPosition = "left"; 1400 } 1401 1402 GeneralSettings.Navigation.SelectionMode = GetString("Item.Area.NavigationSelectionMode"); 1403 GeneralSettings.Navigation.SelectionStyle = ""; 1404 GeneralSettings.Navigation.SelectionWeight = GetInteger("Item.Area.SelectionWeight"); 1405 1406 if (GeneralSettings.Navigation.SelectionMode == "arrow") { 1407 GeneralSettings.Navigation.SelectionStyle = "navbar-arrow"; 1408 } 1409 1410 GeneralSettings.Navigation.Case = GetBoolean("Item.Area.NavigationUppercase"); 1411 1412 GeneralSettings.Navigation.BreadcrumbMode = GetString("Item.Area.NavigationBreadcrumbLayout"); 1413 GeneralSettings.Navigation.BreadcrumbAlign = GetString("Item.Area.NavigationBreadcrumbAlign"); 1414 1415 GeneralSettings.Navigation.LeftmenuMode = GetString("Item.Area.NavigationLeftNavigationMode"); 1416 1417 GeneralSettings.Navigation.ButtonDesign = GetString("Item.Area.NavigationButtonDesign"); 1418 1419 1420 //Background settings 1421 GeneralSettings.Background.Image = GetString("Item.Area.BackgroundImage.Image.Image"); 1422 GeneralSettings.Background.CustomImage = GetString("Item.Area.BackgroundImage.Image.CustomImage"); 1423 GeneralSettings.Background.Color = GetString("Item.Area.BackgroundImage.Color.Color"); 1424 GeneralSettings.Background.GradientColor = GetBoolean("Item.Area.BackroundGradientColor"); 1425 GeneralSettings.Background.GradientPercentage = GetString("Item.Area.GradientPercentage"); 1426 1427 1428 if (@GetString("Item.Area.BackgroundFixed") == "True") 1429 { 1430 GeneralSettings.Background.Position = "fixed"; 1431 } 1432 else 1433 { 1434 GeneralSettings.Background.Position = ""; 1435 } 1436 1437 1438 if (GeneralSettings.Background.Image == "none") 1439 { 1440 GeneralSettings.Background.Style = ""; 1441 } 1442 else if (GeneralSettings.Background.Image == "custom") 1443 { 1444 if (!string.IsNullOrWhiteSpace(GeneralSettings.Background.CustomImage)) 1445 { 1446 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; "; 1447 } 1448 } 1449 else 1450 { 1451 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; "; 1452 } 1453 1454 1455 //Headings settings 1456 GeneralSettings.Headings.Mode = GetString("Item.Area.AdvHeadingsMode"); 1457 1458 1459 //Site settings 1460 GeneralSettings.Site.Shadow = GetBoolean("Item.Area.BackgroundSiteShadow"); 1461 GeneralSettings.Site.LayoutMode = GetString("Item.Area.LayoutMode"); 1462 1463 if (GeneralSettings.Site.LayoutMode == "boxed"){ 1464 GeneralSettings.Site.LayoutMode = "body-" + GeneralSettings.Site.LayoutMode; 1465 GeneralSettings.Header.Classes += " header-boxed"; 1466 } 1467 1468 1469 //Image settings 1470 GeneralSettings.Images.RoundCorners = GetBoolean("Item.Area.LayoutRoundCorners"); 1471 1472 //Ecommerce settings 1473 GeneralSettings.Ecommerce.EcomListDesign = GetString("Item.Area.EcommerceProductCardDesign"); 1474 GeneralSettings.Ecommerce.EcomCardDesign = GetString("Item.Area.EcommerceProductCardDesign"); 1475 } 1476 1477 public string GetGeneralCSS() 1478 { 1479 string CssString = ""; 1480 int SelectionWeight = GeneralSettings.Navigation.SelectionWeight; 1481 1482 //Site settings 1483 if (GetString("Item.Area.LogoFont.Color.Color") == "#FFF" || GetString("Item.Area.LogoFont.Color.Color") == "#FFFFFF") 1484 { 1485 int offset = ImageHeight()+28; 1486 1487 CssString += @" 1488 .dw-offsetmenu-logo { 1489 color: #333 !important; 1490 }"; 1491 } 1492 1493 if (!string.IsNullOrWhiteSpace(GeneralSettings.Background.Color)) 1494 { 1495 CssString += @" 1496 body { 1497 background-color: " + GeneralSettings.Background.Color + @"; 1498 background-size: cover; 1499 overflow-y: scroll; 1500 }"; 1501 } 1502 1503 if (GeneralSettings.Background.GradientColor) 1504 { 1505 CssString += @" 1506 body { 1507 background: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1508 background: -o-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1509 background: -ms-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1510 background: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1511 background: linear-gradient(to top, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1512 background-attachment: fixed; 1513 background-color: " + GeneralSettings.Background.Color + @" !important; 1514 }"; 1515 } 1516 1517 if (GeneralSettings.Site.Shadow) 1518 { 1519 CssString += @" 1520 .shad { 1521 -webkit-box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); 1522 -moz-box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); 1523 box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); 1524 }"; 1525 } 1526 1527 //Image settings 1528 if (GeneralSettings.Images.RoundCorners) 1529 { 1530 CssString += @" 1531 img { 1532 border-radius: 6px; 1533 -webkit-border-radius: 6px; 1534 -moz-border-radius: 6px; 1535 }"; 1536 } 1537 1538 //Navbar and header custom settings 1539 if (GeneralSettings.Header.Mode == "cover") 1540 { 1541 CssString += @" 1542 .navbar-wp { 1543 background-color: none !important; 1544 }"; 1545 1546 if (!GeneralSettings.Header.Show || GeneralSettings.Header.Mode == "mobile") 1547 { 1548 CssString += @" 1549 .header-cover .navbar-wp { 1550 top: 0px !important; 1551 }"; 1552 } 1553 } 1554 else 1555 { 1556 if (GeneralSettings.Header.Show) 1557 { 1558 CssString += @" 1559 .navbar-wp.affix .navbar-nav > li > a { 1560 padding: 16px 16px !important; 1561 }"; 1562 } 1563 } 1564 1565 if (GeneralSettings.Header.Background == "colorline") 1566 { 1567 CssString += @" 1568 .navbar-wp, .navbar-wp.affix { 1569 border-bottom: 4px solid " + ColorSettings.Color.Primary + @" !important; 1570 } 1571 1572 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { 1573 background-color: #FFF; 1574 color: #333; 1575 } 1576 1577 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { 1578 color: " + ColorSettings.Color.NavbarFont + @"; 1579 } 1580 1581 .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo { 1582 color: " + GeneralSettings.Logo.SecondaryColor + @" !important; 1583 }"; 1584 } else if (GeneralSettings.Header.Background == "neutral") 1585 { 1586 CssString += @" 1587 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { 1588 background-color: #f1f1f1; 1589 } 1590 1591 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { 1592 color: #333; 1593 } 1594 1595 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { 1596 color: " + ColorSettings.Color.NavbarFont + @"; 1597 } 1598 1599 .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo { 1600 color: " + GeneralSettings.Logo.SecondaryColor + @" !important; 1601 }"; 1602 } 1603 else if (GeneralSettings.Header.Background == "transparent") 1604 { 1605 CssString += @" 1606 .navbar-wp, .navbar-wp.affix { 1607 background-color: #FFF; 1608 opacity: 0.9; 1609 filter: alpha(opacity=90); /* For IE8 and earlier */ 1610 } 1611 1612 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { 1613 color: #333; 1614 } 1615 1616 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { 1617 color: " + ColorSettings.Color.NavbarFont + @"; 1618 } 1619 1620 .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo { 1621 color: " + GeneralSettings.Logo.SecondaryColor + @" !important; 1622 }"; 1623 } 1624 else 1625 { 1626 CssString += @" 1627 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { 1628 background-color: " + ColorSettings.Color.Secondary + @"; 1629 } 1630 1631 .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo { 1632 color: " + GeneralSettings.Logo.SecondaryColor + @" !important; 1633 }"; 1634 } 1635 1636 if (GeneralSettings.Navigation.SelectionMode == "background" || GeneralSettings.Navigation.SelectionMode == "arrow"){ 1637 CssString += NavbarPosition(false, SelectionWeight); 1638 1639 CssString += @" 1640 .dw-navbar-button > a { 1641 background-color: transparent !important; 1642 } 1643 1644 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1645 background-color: " + ColorSettings.Color.Primary + @" !important; 1646 }"; 1647 } 1648 1649 if (GeneralSettings.Navigation.SelectionMode == "underline"){ 1650 CssString += NavbarPosition(true); 1651 1652 CssString += ClearBackground(); 1653 1654 CssString += @" 1655 .dw-navbar-button > a span:after { 1656 position: absolute; 1657 content: ''; 1658 left: 0px; 1659 bottom: 0px; 1660 height: " + SelectionWeight + @"px; 1661 width: 100%; 1662 transform: scaleX(0); 1663 transition: all 0.3s ease-in-out 0s; 1664 } 1665 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1666 color: " + ColorSettings.Color.Primary + @" !important; 1667 } 1668 1669 .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 { 1670 color: " + ColorSettings.Color.Primary + @" !important; 1671 transform: scaleX(1); 1672 transition: all 0.3s ease-in-out 0s; 1673 }"; 1674 } 1675 1676 if (GeneralSettings.Navigation.SelectionMode == "boxed"){ 1677 CssString += NavbarPosition(true, SelectionWeight); 1678 1679 CssString += @" 1680 .dw-navbar-button > a { 1681 background-color: transparent !important; 1682 } 1683 1684 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1685 background-color: " + ColorSettings.Color.Primary + @" !important; 1686 transition: all 0.3s ease-in-out 0s; 1687 }"; 1688 } 1689 1690 if (GeneralSettings.Navigation.SelectionMode == "border"){ 1691 CssString += NavbarPosition(true, 6, SelectionWeight); 1692 1693 CssString += ClearBackground(); 1694 1695 CssString += @" 1696 .dw-navbar-button > a { 1697 border: " + SelectionWeight + @"px solid transparent !important; transition: None !important; 1698 } 1699 1700 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1701 border-width: " + SelectionWeight + @"px !important; 1702 border-color: " + ColorSettings.Color.Primary + @" !important; 1703 transition: all 0.3s ease-in-out 0s; 1704 }"; 1705 } 1706 1707 if (GeneralSettings.Navigation.SelectionMode == "font"){ 1708 CssString += NavbarPosition(); 1709 1710 CssString += ClearBackground(); 1711 1712 SelectionWeight = (SelectionWeight*100); 1713 1714 CssString += @" 1715 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1716 color: " + ColorSettings.Color.Primary + @" !important; 1717 font-weight: " + SelectionWeight + @" !important; 1718 transition: all 0.3s ease-in-out 0s; 1719 }"; 1720 } 1721 1722 if (GeneralSettings.Navigation.Case){ 1723 CssString += @" 1724 .dw-navbar-button > a { 1725 text-transform: uppercase !important; 1726 }"; 1727 } 1728 else 1729 { 1730 CssString += @" 1731 .dw-navbar-button > a { 1732 text-transform: none !important; 1733 }"; 1734 } 1735 1736 1737 //Breadcrumb custom settings 1738 if (GeneralSettings.Navigation.BreadcrumbMode == "light") 1739 { 1740 CssString += @" 1741 .pg-opt { 1742 border-bottom: 0px; 1743 background: none repeat scroll 0% 0% #FFF; 1744 } 1745 1746 .dw-breadcrumb-title { 1747 font-size: 14px !important; 1748 padding: 5px 0px 5px 0px !important; 1749 } 1750 1751 .dw-breadcrumb { 1752 padding: 5px 0px 5px 0px !important; 1753 }"; 1754 } 1755 1756 if (GeneralSettings.Navigation.BreadcrumbMode == "normal") 1757 { 1758 CssString += @" 1759 .dw-breadcrumb-title { 1760 font-size: 14px !important; 1761 padding: 5px 0px 5px 0px !important; 1762 } 1763 1764 .dw-breadcrumb a, .pg-opt .breadcrumb { 1765 padding: 5px !important; 1766 }"; 1767 } 1768 1769 if (GeneralSettings.Navigation.BreadcrumbMode == "large") 1770 { 1771 CssString += @" 1772 .dw-breadcrumb-title { 1773 font-size: 22px !important; 1774 padding: 15px 0px 15px 0px !important; 1775 } 1776 1777 .dw-breadcrumb { 1778 padding: 15px !important; 1779 }"; 1780 } 1781 1782 1783 if (GeneralSettings.Navigation.BreadcrumbAlign == "right") 1784 { 1785 CssString += @" 1786 .dw-breadcrumb { 1787 float: right !important; 1788 }"; 1789 } 1790 else 1791 { 1792 CssString += @" 1793 .dw-breadcrumb { 1794 float: left !important; 1795 }"; 1796 } 1797 1798 1799 //Left menu custom settings 1800 if (GeneralSettings.Navigation.LeftmenuMode == "light" || GeneralSettings.Navigation.LeftmenuMode == "light-color") 1801 { 1802 CssString += @" 1803 ul.dw-categories, ul.dw-categories > li, ul.dw-categories > li > ul > li { 1804 border: 0px solid #EEE; 1805 } 1806 1807 ul.dw-categories > li > ul { 1808 background: none repeat scroll 0% 0% #FFF; 1809 } 1810 1811 ul.dw-categories li a:hover, ul.dw-categories li a:focus, ul.dw-categories li a:active { 1812 background-color: #FFF !important; 1813 color: " + ColorSettings.Color.Primary + @" !important; 1814 } 1815 1816 .list-active, .list-active > a { 1817 background-color: #FFF; 1818 color: " + ColorSettings.Color.Primary + @" !important; 1819 } 1820 1821 .list-open-active { 1822 background-color: #FFF; 1823 color: " + ColorSettings.Color.Primary + @" !important; 1824 }"; 1825 } 1826 1827 if (GeneralSettings.Navigation.LeftmenuMode == "lines") 1828 { 1829 CssString += @" 1830 ul.dw-categories > li { 1831 border-bottom: 1px solid #EEE; 1832 } 1833 1834 ul.dw-categories { 1835 border: 0px solid #EEE; 1836 } 1837 1838 ul.dw-categories > li > ul { 1839 background: none repeat scroll 0% 0% #FFF; 1840 } 1841 1842 ul.dw-categories li a:hover, a:focus, a:active { 1843 background-color: #FFF !important; 1844 color: " + ColorSettings.Color.Primary + @" !important; 1845 } 1846 1847 .list-active, .list-active > a { 1848 background-color: #FFF; 1849 color: " + ColorSettings.Color.Primary + @" !important; 1850 } 1851 1852 .list-open-active { 1853 background-color: #FFF; 1854 color: " + ColorSettings.Color.Primary + @" !important; 1855 }"; 1856 } 1857 1858 if (GeneralSettings.Navigation.LeftmenuMode == "boxed") 1859 { 1860 CssString += @" 1861 ul.dw-categories, ul.dw-categories > li, ul.dw-categories > li > ul > li { 1862 border: 0px solid #EEE; 1863 } 1864 1865 .list-active, .list-active > a { 1866 background-color: " + ColorSettings.Color.Primary + @" !important; 1867 color: #FFF; 1868 }"; 1869 } 1870 1871 if (GeneralSettings.Navigation.LeftmenuMode == "border") 1872 { 1873 CssString += @" 1874 ul.dw-categories > li { 1875 border: 1px solid #EEE; 1876 } 1877 1878 ul.dw-categories > li > ul > li { 1879 border-top: 1px solid #EEE; 1880 } 1881 1882 .list-active, .list-active > a { 1883 background-color: " + ColorSettings.Color.Primary + @" !important; 1884 color: #FFF; 1885 }"; 1886 } 1887 1888 if (GeneralSettings.Navigation.LeftmenuMode == "light-color") 1889 { 1890 CssString += @" 1891 ul.dw-categories li a:hover, ul.dw-categories a:focus, ul.dw-categories a:active { 1892 border-left: 6px solid " + ColorSettings.Color.Primary + @"; 1893 } 1894 1895 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 { 1896 padding-left: 20px; 1897 } 1898 1899 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 { 1900 padding-left: 30px; 1901 } 1902 1903 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 { 1904 padding-left: 40px; 1905 } 1906 1907 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 { 1908 padding-left: 50px; 1909 } 1910 1911 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 { 1912 padding-left: 50px; 1913 } 1914 1915 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 { 1916 padding-left: 50px; 1917 } 1918 1919 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 { 1920 padding-left: 50px; 1921 } 1922 1923 ul.dw-categories .list-active > a { 1924 border-left: 6px solid " + ColorSettings.Color.Primary + @"; 1925 } 1926 1927 .btn-dw:hover, .btn-dw:focus, .btn-dw:active { 1928 1929 }"; 1930 } 1931 1932 1933 //Buttons custom designs 1934 if (GeneralSettings.Navigation.ButtonDesign == "light-rounded") 1935 { 1936 CssString += @" 1937 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { 1938 border-width: 0px; 1939 } 1940 1941 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 1942 background-color: " + ColorSettings.Color.Secondary + @"; 1943 color: #FFF; 1944 border-width: 0px; 1945 } 1946 1947 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 1948 background-color: " + ColorSettings.Color.Primary + @"; 1949 color: #FFF; 1950 border-width: 0px; 1951 } 1952 1953 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 1954 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 1955 color: #FFF; 1956 border-width: 0px; 1957 }"; 1958 } 1959 1960 if (GeneralSettings.Navigation.ButtonDesign == "corners") 1961 { 1962 CssString += @" 1963 .btn-dw-primary, .btn-dw-secondary, btn-dw-cart , .btn-dw-cart { 1964 border-radius: 0px !important; 1965 border-width: 0px; 1966 } 1967 1968 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 1969 background-color: " + ColorSettings.Color.Secondary + @"; 1970 color: #FFF; 1971 border-width: 0px; 1972 } 1973 1974 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 1975 background-color: " + ColorSettings.Color.Primary + @"; 1976 color: #FFF; 1977 border-width: 0px; 1978 } 1979 1980 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 1981 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 1982 color: #FFF; 1983 border-width: 0px; 1984 }"; 1985 } 1986 1987 if (GeneralSettings.Navigation.ButtonDesign == "round") 1988 { 1989 CssString += @" 1990 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { 1991 padding: 5px 15px; 1992 border-radius: 200px !important; 1993 border-width: 0px !important; 1994 } 1995 1996 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 1997 background-color: " + ColorSettings.Color.Secondary + @"; 1998 color: #FFF; 1999 border-width: 0px !important; 2000 } 2001 2002 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 2003 background-color: " + ColorSettings.Color.Primary + @"; 2004 color: #FFF; 2005 border-width: 0px !important; 2006 } 2007 2008 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 2009 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2010 color: #FFF; 2011 border-width: 0px !important; 2012 }"; 2013 } 2014 2015 if (GeneralSettings.Navigation.ButtonDesign == "border") 2016 { 2017 CssString += @" 2018 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { 2019 background-color: transparent; 2020 } 2021 2022 .btn-dw-primary { 2023 border-width: 4px; 2024 padding: 3px 10px; 2025 color: " + ColorSettings.Color.Primary + @"; 2026 } 2027 2028 .btn-dw-secondary { 2029 border-width: 2px; 2030 color: " + ColorSettings.Color.Secondary + @"; 2031 } 2032 2033 .btn-dw-cart { 2034 border-width: 4px; 2035 padding: 3px 10px; 2036 color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2037 } 2038 2039 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 2040 background-color: " + ColorSettings.Color.Primary + @"; 2041 border-width: 4px; 2042 padding: 3px 10px; 2043 border-color: " + ColorSettings.Color.Primary + @"; 2044 color: #FFF; 2045 } 2046 2047 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 2048 background-color: " + ColorSettings.Color.Primary + @"; 2049 border-width: 2px; 2050 color: #FFF; 2051 border-color: #FFF; 2052 } 2053 2054 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 2055 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2056 border-width: 4px; 2057 padding: 3px 10px; 2058 border-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2059 color: #FFF; 2060 }"; 2061 } 2062 2063 if (GeneralSettings.Navigation.ButtonDesign == "border-sharp" || GeneralSettings.Navigation.ButtonDesign == "border-round") 2064 { 2065 CssString += @" 2066 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { 2067 background-color: transparent; 2068 } 2069 2070 .btn-dw-primary { 2071 border-width: 4px; 2072 padding: 3px 15px; 2073 color: " + ColorSettings.Color.Primary + @"; 2074 } 2075 2076 .btn-dw-secondary { 2077 border-width: 2px; 2078 padding: 5px 15px; 2079 color: " + ColorSettings.Color.Secondary + @"; 2080 } 2081 2082 .btn-dw-cart { 2083 border-width: 4px; 2084 padding: 3px 15px; 2085 color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2086 } 2087 2088 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 2089 background-color: " + ColorSettings.Color.Primary + @"; 2090 border-width: 4px; 2091 color: #FFF; 2092 padding: 3px 15px; 2093 border-color: " + ColorSettings.Color.Primary + @"; 2094 } 2095 2096 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 2097 background-color: " + ColorSettings.Color.Primary + @"; 2098 border-width: 2px; 2099 color: #FFF; 2100 padding: 5px 15px; 2101 border-color: #FFF; 2102 } 2103 2104 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 2105 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2106 border-width: 4px; 2107 color: #FFF; 2108 padding: 3px 15px; 2109 border-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2110 }"; 2111 } 2112 2113 if (GeneralSettings.Navigation.ButtonDesign == "border-sharp") 2114 { 2115 CssString += @" 2116 .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 { 2117 border-radius: 0px !important; 2118 }"; 2119 } 2120 2121 if (GeneralSettings.Navigation.ButtonDesign == "border-round") 2122 { 2123 CssString += @" 2124 .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 { 2125 border-radius: 200px !important; 2126 }"; 2127 } 2128 2129 2130 //Headings custom settings 2131 if (GeneralSettings.Headings.Mode == "underline") 2132 { 2133 CssString += @" 2134 .dw-section-title { 2135 border-bottom: 2px solid; 2136 margin-bottom: 15px; 2137 }"; 2138 } 2139 2140 if (GeneralSettings.Headings.Mode == "boxed" || GeneralSettings.Headings.Mode == "boxed-line") 2141 { 2142 CssString += @" 2143 .dw-section-title span { 2144 background-color: " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; 2145 display: inline-block; 2146 padding: 8px 16px; 2147 color: #FFF; 2148 }"; 2149 2150 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) 2151 { 2152 CssString += @" 2153 .dw-section-title { 2154 background-color: " + ColorSettings.Color.Primary + @"; 2155 }"; 2156 } 2157 } 2158 2159 if (GeneralSettings.Headings.Mode == "boxed-line") 2160 { 2161 CssString += @" 2162 .dw-section-title span { 2163 margin-bottom: 2px; 2164 } 2165 2166 .dw-section-title { 2167 border-bottom: 2px solid " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; 2168 margin-bottom: 10px; 2169 }"; 2170 2171 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) 2172 { 2173 CssString += @" 2174 .dw-section-title { 2175 border-bottom: 2px solid " + ColorSettings.Color.Primary + @"; 2176 }"; 2177 } 2178 } 2179 2180 if (GeneralSettings.Headings.Mode == "outline") 2181 { 2182 CssString += @" 2183 .dw-section-title { 2184 color: #FFF; 2185 text-shadow: 2186 -1px -1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", 2187 1px -1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", 2188 -1px 1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", 2189 1px 1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; 2190 }"; 2191 2192 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) 2193 { 2194 CssString += @" 2195 .dw-section-title { 2196 text-shadow: 2197 -1px -1px 0 #1A1A1A, 2198 1px -1px 0 #1A1A1A, 2199 -1px 1px 0 #1A1A1A, 2200 1px 1px 0 #1A1A1A; 2201 }"; 2202 } 2203 } 2204 2205 if (GeneralSettings.Headings.Mode == "backline") 2206 { 2207 CssString += @" 2208 .dw-section-title { 2209 font-size: 18px; 2210 text-align: center; 2211 border-bottom: 2px solid; 2212 padding: 0; 2213 margin: 8px 0 20px; 2214 line-height: 0em !important; 2215 } 2216 2217 .dw-section-title > span { 2218 background-color: #FFF; 2219 padding: 0 16px; 2220 } 2221 2222 .dw-section-title-small { 2223 margin: 8px 0 20px; 2224 }"; 2225 } 2226 2227 if (GeneralSettings.Ecommerce.EcomCardDesign == "one") 2228 { 2229 2230 } 2231 2232 if (GeneralSettings.Ecommerce.EcomCardDesign == "two") 2233 { 2234 CssString += @" 2235 .product { 2236 border: 1px solid #E5E5E5; 2237 }"; 2238 } 2239 2240 return CssString; 2241 } 2242 2243 private string ClearBackground() { 2244 string CssString = ""; 2245 2246 CssString += @" 2247 .dw-navbar-button > a { 2248 background-color: rgba(0, 0, 0, 0.0) !important; 2249 } 2250 2251 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 2252 background-color: rgba(0, 0, 0, 0.0) !important; 2253 }"; 2254 2255 return CssString; 2256 } 2257 2258 private string NavbarPosition(bool margin=false, int specialpadding=6, int extramargin=0) { 2259 int LogoHeight = 0; 2260 string CssString = ""; 2261 int Centerpos = 0; 2262 2263 if (GeneralSettings.Header.Mode != "solid"){ 2264 if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 2265 { 2266 LogoHeight = ImageHeight(); 2267 } 2268 else 2269 { 2270 LogoHeight = GetInteger("Item.Area.LogoFont.Size"); 2271 } 2272 } 2273 else 2274 { 2275 if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 2276 { 2277 LogoHeight = 18; 2278 } 2279 else 2280 { 2281 LogoHeight = GetInteger("Item.Area.LogoFont.Size")-10; 2282 } 2283 } 2284 2285 if (margin == false) 2286 { 2287 Centerpos = (LogoHeight/2) + 6; 2288 2289 CssString += @" 2290 .dw-navbar-button > a, .navbar-wp.affix .navbar-nav > li > a { 2291 padding: " + Centerpos + @"px " + (specialpadding+4) + @"px " + Centerpos + @"px " + (specialpadding+4) + @"px !important; 2292 margin: " + extramargin + @"px " + extramargin + @"px !important; 2293 }"; 2294 } 2295 else 2296 { 2297 Centerpos = ((LogoHeight/2)+6)-(specialpadding+extramargin); 2298 2299 CssString += @" 2300 .dw-navbar-button > a, .navbar-wp.affix .navbar-nav > li > a { 2301 padding: " + specialpadding + @"px " + (specialpadding+4) + @"px " + specialpadding + @"px " + (specialpadding+4) + @"px !important; 2302 margin: " + Centerpos + @"px 4px 0px 4px !important; 2303 }"; 2304 } 2305 2306 return CssString; 2307 } 2308 2309 private int ImageHeight () 2310 { 2311 int LogoHeight = 0; 2312 2313 if (!string.IsNullOrWhiteSpace(GetString("Item.Area.GeneralLogo"))) 2314 { 2315 string imageUrl = "http://" + HttpContext.Current.Request.Url.Authority + GetString("Item.Area.GeneralLogo"); 2316 2317 WebRequest request = WebRequest.Create(imageUrl); 2318 WebResponse response = request.GetResponse(); 2319 Image image = Image.FromStream(response.GetResponseStream()); 2320 2321 LogoHeight = image.Height; 2322 } 2323 else 2324 { 2325 LogoHeight = 38; 2326 } 2327 2328 return LogoHeight; 2329 } 2330 } 2331 2332 2333 2334 @{ 2335 InitGeneralSettings(); 2336 } 2337 2338 2339 @if (writeCss) 2340 { 2341 css += FontStylesCSS() + "/*Colors*/" + Environment.NewLine + GetColorSettings() + Environment.NewLine + "/*General*/" + Environment.NewLine + GetGeneralCSS(); 2342 Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(css, HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.css"), false); 2343 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); 2344 Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(RemoveWhiteSpaceFromStylesheets(css), cssPath, false); 2345 } 2346 2347 @functions{ 2348 public static string RemoveWhiteSpaceFromStylesheets(string body) 2349 { 2350 body = Regex.Replace(body, @"[a-zA-Z]+#", "#"); 2351 body = Regex.Replace(body, @"[\n\r]+\s*", string.Empty); 2352 body = Regex.Replace(body, @"\s+", " "); 2353 body = Regex.Replace(body, @"\s?([:,;{}])\s?", "$1"); 2354 body = body.Replace(";}", "}"); 2355 body = Regex.Replace(body, @"([\s:]0)(px|pt|%|em)", "$1"); 2356 // Remove comments from CSS 2357 body = Regex.Replace(body, @"/\*[\d\D]*?\*/", string.Empty); 2358 return body; 2359 } 2360 } 2361 2362 @* TEMPLATE STYLES *@ 2363 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/DWGlobalStyles.min.css" id="dwStylesheet" media="screen"> 2364 <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> 2365 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/invoice.min.css"> 2366 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/owl.carousel.min.css"> 2367 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/owl.theme.default.min.css"> 2368 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/print.min.css" media="print"> 2369 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/typeahead.min.css"> 2370 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/fjerdingstad.css"> 2371 2372 2373 @{ 2374 string cssAutoPath = "/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.min.css?t=@areaUpdated.Ticks"; 2375 } 2376 <link rel="stylesheet" type="text/css" href="@cssAutoPath"> 2377 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/product.min.css"> 2378 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/style.min.css"> 2379 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/styles.min.css"> 2380 2381 @* ANALYTICS CODE *@ 2382 @GetValue("Item.Area.OtherAnalyticsCode") 2383 2384 <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> 2385 <script src="//code.jquery.com/ui/1.12.1/jquery-ui.js"></script> 2386 <script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.9.2/jquery.ui.mouse.min.js"></script> 2387 <script src="/Files/Templates/Designs/Dwsimple/js/jquery.ui.touch-punch.min.js"></script> 2388 2389 <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script> 2390 2391 @foreach (var lang in GetLoop("WebsiteLanguages")) 2392 { 2393 bool IsMaster = lang.GetBoolean("IsMaster"); 2394 2395 if (IsMaster) 2396 { 2397 string langCode = lang.GetString("Culture").Substring(3).ToUpper(); 2398 <text> 2399 <script> 2400 var $langCode = "@langCode"; 2401 </script> 2402 </text> 2403 } 2404 } 2405 2406 @if (GeneralSettings.Navigation.IsMegamenu) 2407 { 2408 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/megamenu.min.css"> 2409 } 2410 2411 @* CONFIGURING DYNAMICALLY STYLES WHICH COMES FROM CUSTOM MODULES *@ 2412 <style> 2413 @RenderSnippet("StylesHead") 2414 </style> 2415 @GetValue("Stylesheets") 2416 @GetValue("Javascripts") 2417 </head> 2418 2419 2420 2421 <body style="@GeneralSettings.Background.Style" id="sitecontent"> 2422 @* GOOGLE TAG MANAGER (NOSCRIPT) *@ 2423 <noscript> 2424 <iframe src="https://www.googletagmanager.com/ns.html?id=@GoogleTagManagerId" height="0" width="0" style="display:none;visibility:hidden"></iframe> 2425 </noscript> 2426 @* END GOOGLE TAG MANAGER (NOSCRIPT) *@ 2427 2428 @* MODALS *@ 2429 @{ 2430 var request = HttpContext.Current.Request; 2431 } 2432 <div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="loginLabel" aria-hidden="true"> 2433 <div class="modal-dialog mdl-custom"> 2434 <div class="modal-content"> 2435 <div class="modal-header" id="loginModalDiv"> 2436 <h4 class="modal-title" id="myModalLabel">@Translate("Login", "Login")</h4> 2437 </div> 2438 2439 <form name="form" id="loginform" method="post"> 2440 <div class="modal-body"> 2441 <input type="hidden" name="ID" value="@Pageview.ID"> 2442 <input type="hidden" name="DWExtranetUsernameRemember" value="True"> 2443 <input type="hidden" name="DWExtranetPasswordRemember" value="True"> 2444 <div class="form-group2"> 2445 @{ attrValue = Translate("Enter email", "Enter email"); 2446 var username2 = @GetValue("DWExtranetUsername"); 2447 } 2448 <input type="text" class="form-control" name="username" id="username" placeholder="@attrValue" value="@username2" required=""> 2449 </div> 2450 <div class="form-group2"> 2451 @{ attrValue = Translate("Enter password", "Enter password"); 2452 }<input type="password" class="form-control" name="password" id="password" placeholder="@attrValue" required=""> 2453 </div> 2454 @if (!string.IsNullOrWhiteSpace(GetString("DW_extranet_error_uk")) && !string.IsNullOrWhiteSpace(request["username"])) 2455 { 2456 <h5 class="text-center" id="loginModalValidationMessage">@GetValue("DW_extranet_error_uk")</h5> 2457 } 2458 <div class="form-group2"> 2459 <button type="submit" class="btn btn-xs btn-base login-btn pull-right">@Translate("Sign in", "Sign in")</button> 2460 </div> 2461 </div> 2462 2463 <div class="row"> 2464 <div class="col-md-12 4letter"> 2465 <div class="col-md-6 checkbox pull-left"> 2466 <label> 2467 <input type="checkbox" name="Autologin" checked="checked" value="True"> @Translate("Remember me", "Remember me") 2468 </label> 2469 </div> 2470 <div class="col-md-6"> 2471 <a class="pull-left" href='/Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]&LoginAction=Recovery'>@Translate("Forgot your password?", "Forgot your password?")</a> 2472 2473 <a class="pull-left" href='/Default.aspx?ID=@Pageview.Area.Item["CreateNewUser"]'>@Translate("Create new user", "Create new user")</a> 2474 <p>&nbsp;</p> 2475 <br> 2476 </div> 2477 </div> 2478 </div> 2479 2480 </form> 2481 </div> 2482 </div> 2483 </div> 2484 2485 @* MOBILE MENU *@ 2486 @{ 2487 var offsetmenuplace = "left"; 2488 2489 if (GeneralSettings.Header.Mode == "mobile") 2490 { 2491 offsetmenuplace = GeneralSettings.Navigation.Position; 2492 } 2493 } 2494 2495 <div id="myNavmenu" class="navmenu navmenu-default navmenu-fixed-@offsetmenuplace offcanvas"> 2496 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2497 <div class="row offcanvas-row">&nbsp;</div> 2498 <div class="offcanvas-row pull-right"> 2499 <button type="button" class="btn btn-sm btn-dw-primary close-menu" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body"> 2500 <img src="/Files/Templates/Designs/Dwsimple/images/icons/close.png" alt="close"> 2501 <span> 2502 @Translate("Menu", "Menu") 2503 </span> 2504 </button> 2505 </div> 2506 <div class="row offcanvas-row hidden"> 2507 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2508 <a href="/Default.aspx?ID=@firstpageid" class="brand"> 2509 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 2510 { 2511 <div class="img-responsive dw-offsetmenu-logo pull-left"> 2512 @if (GeneralSettings.Logo.ContrastImage != GeneralSettings.Logo.Image) 2513 { 2514 <img src="@GeneralSettings.Logo.ContrastImage" alt="Logo"> 2515 } 2516 else 2517 { 2518 <img class="img-responsive" src="@GeneralSettings.Logo.Image" alt="Logo"> 2519 } 2520 </div> 2521 } 2522 2523 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text)) 2524 { 2525 <div class="dw-logotext dw-offsetmenu-logo pull-left">@GeneralSettings.Logo.Text</div> 2526 } 2527 </a> 2528 </div> 2529 </div> 2530 <div class="row offcanvas-row">&nbsp;</div> 2531 </div> 2532 2533 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2534 @if (GetBoolean("Item.Area.EcomEnabled")) 2535 { 2536 <div class="row offcanvas-row">&nbsp;</div> 2537 <div class="row offcanvas-row"> 2538 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2539 @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2540 { 2541 <div class="pull-left hidden"> 2542 <a href='Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]' class="btn btn-sm btn-default">@Translate("Sign in", "Sign in")</a> 2543 <a href='Default.aspx?ID=@Pageview.Area.Item["SignUpPageId"]' class="btn btn-sm btn-default">@Translate("Opret brugerprofil", "Opret brugerprofil")</a> 2544 </div> 2545 2546 } 2547 @if (Dynamicweb.Frontend.PageView.Current().Device == Dynamicweb.Frontend.Devices.DeviceType.Desktop) 2548 { 2549 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2550 { 2551 <div class="pull-left"> 2552 <a href='Default.aspx?ID=@Pageview.Area.Item["OrdersPageId"]' class="btn btn-sm btn-default"> 2553 <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong> 2554 </a> 2555 </div> 2556 <div class="pull-left"> 2557 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.ID"><button class="btn btn-sm btn-default"><i class="fa fa-sign-out"></i> @Translate("Sign out", "Sign out")</button></a> 2558 </div> 2559 } 2560 } 2561 @if (GetLoop("DWExtranetSecondaryUsers").Count > 0 || !string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) 2562 { 2563 <p>&nbsp;</p> 2564 <form method="post"> 2565 <div class="pull-left"> 2566 @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) 2567 { 2568 <select id="DWExtranetSecondaryUserSelector" name="DWExtranetSecondaryUserSelector" title="Impersonate selected user"> 2569 @foreach (var user in GetLoop("DWExtranetSecondaryUsers")) 2570 { 2571 <option value='@user.GetValue("UserID")'>@user.GetValue("UserName")</option> 2572 } 2573 </select> 2574 <input type="submit" class="btn btn-xs" tabindex="3" value="OK"> 2575 } 2576 else 2577 { 2578 string impersonateUser = @GetGlobalValue("Global:Extranet.SecondaryUser.UserName") + " is impersonated by " + @Pageview.User.UserName; 2579 <span title="@impersonateUser" class="btn btn-xs impersonation-btn"><i class="fa fa-user-secret"></i> @GetGlobalValue("Global:Extranet.SecondaryUser.UserName")</span> 2580 <input type="submit" class="btn btn-xs" name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" value="Stop impersonation"> 2581 } 2582 </div> 2583 </form> 2584 } 2585 </div> 2586 </div> 2587 <div class="row offcanvas-row">&nbsp;</div> 2588 } 2589 </div> 2590 2591 2592 <div class="row offcanvas-row"> 2593 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2594 @GetValue("DwNavigation(drawernavigation)") 2595 </div> 2596 </div> 2597 2598 @if (!GetBoolean("Item.Area.OnlyOneLanguage")) 2599 { 2600 <div class="langMobile"> 2601 <div class="lang-sug"> 2602 <img class="closeLang" src="/Files/Templates/Designs/Dwsimple/images/icons/close-black.png" alt="close"> 2603 2604 <p>@Translate("Change language", "Change language"):</p> 2605 2606 <ul class="langMenu langMobile" area-labelledby="language"> 2607 2608 @foreach (var lang in GetLoop("WebsiteLanguages")) 2609 { 2610 2611 string isActive = (lang.GetBoolean("IsCurrent") ? "activeArea" : ""); 2612 2613 <li id='@lang.GetValue("ID")area' class="@isActive"> 2614 @*@if (GetInteger("Ecom:Order.OrderLines.Count") <= 0)*@ 2615 @{ 2616 string langCode = lang.GetString("Culture").Substring(0, 2).ToLower(); 2617 2618 if (lang.GetBoolean("IsCurrent")) 2619 { 2620 <a data-lang="current" data-code="@langCode" class="activeArea langSelected" href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'> 2621 @lang.GetString("Culture") 2622 2623 </a> 2624 2625 } 2626 else 2627 { 2628 <a class="langSelected" data-lang="none" data-code="@langCode" href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'> 2629 @lang.GetString("Culture") 2630 2631 </a> 2632 2633 } 2634 } 2635 </li> 2636 } 2637 2638 </ul> 2639 2640 2641 </div> 2642 </div> 2643 } 2644 2645 <div> 2646 <ul class="top-menu"> 2647 @foreach (LoopItem headerLink in GetLoop("Item.Area.HeaderLinks")) 2648 { 2649 string Link = headerLink.GetString("Item.Area.HeaderLinks.Link"); 2650 string LinkText = headerLink.GetString("Item.Area.HeaderLinks.LinkText"); 2651 string LinkIcon = headerLink.GetString("Item.Area.HeaderLinks.LinkIcon"); 2652 string LinkTarget = headerLink.GetString("Item.Area.HeaderLinks.LinkTarget"); 2653 2654 <li> 2655 <a href="@Link" title="@LinkText" target="@LinkTarget"> 2656 <span class="link-icon" style='background-image: url("@LinkIcon")'></span> 2657 <span class="link-txt">@LinkText</span> 2658 </a> 2659 </li> 2660 } 2661 @if (!GetBoolean("Item.Area.OnlyOneLanguage")) 2662 { 2663 <li class="LangLing"> 2664 <a href="#"> 2665 <span class="link-icon" style='background-image: url("@GetString("Item.Area.LanguageIcon")")'></span> 2666 <span class="link-txt">@GetString("Item.Area.LanguageText")</span> 2667 </a> 2668 </li> 2669 } 2670 2671 <!-- Ecommerce user menu --> 2672 @if (GetBoolean("Item.Area.EcomEnabled")) 2673 { 2674 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2675 { 2676 <text> 2677 <li class="LoginLink"> 2678 <a href='Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]'> 2679 2680 <span>@Translate("Login", "Login")</span> 2681 </a> 2682 </li> 2683 2684 </text> 2685 } 2686 2687 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2688 { 2689 <text> 2690 <li class="loggedIn"> 2691 <a href='Default.aspx?ID=@Pageview.Area.Item["UserProfilePageId"]'> 2692 <nobr> 2693 <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong> 2694 </nobr> 2695 </a> 2696 </li> 2697 @if (GetLoop("DWExtranetSecondaryUsers").Count > 0 || !string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) 2698 { 2699 <li> 2700 <form method="post"> 2701 <span> 2702 @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) 2703 { 2704 string impersonateTranslation = Translate("Impersonate selected user"); 2705 <select id="DWExtranetSecondaryUserSelector" name="DWExtranetSecondaryUserSelector" title="@impersonateTranslation"> 2706 @foreach (var user in GetLoop("DWExtranetSecondaryUsers")) 2707 { 2708 <option value='@user.GetValue("UserID")'>@user.GetValue("UserName")</option> 2709 } 2710 </select> 2711 <input type="submit" class="btn btn-xs" tabindex="3" value="OK"> 2712 } 2713 else 2714 { 2715 string impersonateUser = GetGlobalValue("Global:Extranet.SecondaryUser.UserName") + " " + Translate("is impersonated by") + " " + Pageview.User.UserName; 2716 string stopImpersonateTranslation = Translate("Stop impersonation"); 2717 <span title="@impersonateUser" class="btn btn-xs impersonation-btn"><i class="fa fa-user-secret"></i> @GetGlobalValue("Global:Extranet.SecondaryUser.UserName")</span> 2718 <input type="submit" class="btn btn-xs" name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" value="@stopImpersonateTranslation"> 2719 } 2720 </span> 2721 </form> 2722 </li> 2723 } 2724 <li class="LogOut"> 2725 <a href='/Admin/Public/ExtranetLogoff.aspx?ID=@logoutid'>@Translate("Logout", "Logout")</a> 2726 </li> 2727 </text> 2728 } 2729 } 2730 2731 <!-- Ecommerce Cart --> 2732 @if ((Dynamicweb.Frontend.PageView.Current().Device == Dynamicweb.Frontend.Devices.DeviceType.Mobile) || (Dynamicweb.Frontend.PageView.Current().Device == Dynamicweb.Frontend.Devices.DeviceType.Tablet)) 2733 { 2734 if (GetBoolean("Item.Area.EcomEnabled")) 2735 { 2736 <li class="dropdown animate-hover" data-animate="animated fadeInUp"> 2737 <a href="Default.aspx?ID=@cartid" title="" id="minipagecart" class="dw-minicart"><i class="fa fa-shopping-cart"></i> @GetValue("Ecom:Order.OrderLines.TotalProductQuantity") <span>@GetValue("Ecom:Order.OrderLines.Total.PriceWithoutVAT")</span></a> 2738 2739 <ul class="sub-menu"> 2740 <li id="minicart"> 2741 @MiniCart() 2742 </li> 2743 </ul> 2744 </li> 2745 } 2746 } 2747 </ul> 2748 2749 </div> 2750 </div> 2751 2752 @* HEADER AND CONTENT *@ 2753 2754 <div class="body-wrap shad @GeneralSettings.Site.LayoutMode"> 2755 2756 @* HEADER *@ 2757 <div id="divHeaderWrapper"> 2758 <header class="header nav-down @GeneralSettings.Header.Classes"> 2759 <div class="headerLeft pull-left"> 2760 <!-- TOP HEADER --> 2761 @if (GeneralSettings.Header.Show) 2762 { 2763 <div class="top-header"> 2764 <div class="row"> 2765 @if (!GetBoolean("Item.Area.OnlyOneLanguage")) 2766 { 2767 <div class="lang-sug"> 2768 <img class="closeLang" src="/Files/Templates/Designs/Dwsimple/images/icons/close-black.png" alt="close"> 2769 <div class="container"> 2770 2771 <p>@Translate("Change language", "Change language"):</p> 2772 2773 <div id="partnercountry"> 2774 2775 </div> 2776 <ul class="langMenu" area-labelledby="language"> 2777 @foreach (var lang in GetLoop("WebsiteLanguages")) 2778 { 2779 string isActive = (lang.GetBoolean("IsCurrent") ? "activeArea" : ""); 2780 2781 <li id='@lang.GetValue("ID")area' class="@isActive"> 2782 @*@if (GetInteger("Ecom:Order.OrderLines.Count") <= 0)*@ 2783 @{ 2784 string langCode = lang.GetString("Culture").Substring(0, 2).ToLower(); 2785 2786 if (lang.GetBoolean("IsCurrent")) 2787 { 2788 <a data-lang="current" data-code="@langCode" class="activeArea langSelected" href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'> 2789 @lang.GetString("Culture") 2790 </a> 2791 } 2792 else 2793 { 2794 <a class="langSelected" data-lang="none" data-code="@langCode" href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'> 2795 @lang.GetString("Culture") 2796 </a> 2797 } 2798 } 2799 </li> 2800 } 2801 </ul> 2802 </div> 2803 </div> 2804 } 2805 </div> 2806 <div class="row"> 2807 <div class="col-xs-4 col-sm-4 col-md-3 logobox"> 2808 @if (GeneralSettings.Header.Mode == "solid") 2809 { 2810 <a href="/Default.aspx?ID=@firstpageid" class="brand"> 2811 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 2812 { 2813 <img class="img-responsive dw-logoimage pull-left" src="@GeneralSettings.Logo.Image" alt="Logo"> 2814 } 2815 2816 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text)) 2817 { 2818 <div class="dw-logotext pull-left">@GeneralSettings.Logo.Text</div> 2819 } 2820 </a> 2821 2822 if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Slogan)) 2823 { 2824 <div class="dw-slogantext pull-left">@GeneralSettings.Logo.Slogan</div> 2825 } 2826 } 2827 </div> 2828 <div class="col-xs-8 col-sm-8 col-md-9 logobox"> 2829 <div class="row"> 2830 <div class="hidden-xs hidden-sm hidden-md col-lg-12 search-right"> 2831 <div class="searchIcon hidden-xs hidden-sm pull-right"> 2832 <span class="buttonIconSearch"> 2833 <button class="btn btn-dw-primary searchFieldShow" type="submit"> 2834 <img src="/Files/Templates/Designs/Dwsimple/images/icons/search-white.png" class="img-center" alt=""> 2835 <span> 2836 @Translate("Search", "Search") 2837 </span> 2838 </button> 2839 </span> 2840 </div> 2841 <div class="pull-right navBar"> 2842 <nav class="top-header-menu hidden-sm hidden-xs hidden-md"> 2843 <ul class="top-menu"> 2844 @foreach (LoopItem headerLink in GetLoop("Item.Area.HeaderLinks")) 2845 { 2846 string Link = headerLink.GetString("Item.Area.HeaderLinks.Link"); 2847 string LinkText = headerLink.GetString("Item.Area.HeaderLinks.LinkText"); 2848 string LinkIcon = headerLink.GetString("Item.Area.HeaderLinks.LinkIcon"); 2849 string LinkTarget = headerLink.GetString("Item.Area.HeaderLinks.LinkTarget"); 2850 2851 <li> 2852 <a href="@Link" title="@LinkText" target="@LinkTarget"> 2853 <span class="link-icon" style='background-image: url("@LinkIcon")'></span> 2854 <span class="link-txt">@LinkText</span> 2855 </a> 2856 </li> 2857 } 2858 @if (!GetBoolean("Item.Area.OnlyOneLanguage")) 2859 { 2860 <li class="LangLing"> 2861 <a href="#"> 2862 <span class="link-icon" style='background-image: url("@GetString("Item.Area.LanguageIcon")")'></span> 2863 <span class="link-txt">@GetString("Item.Area.LanguageText")</span> 2864 </a> 2865 </li> 2866 } 2867 2868 2869 <!-- Ecommerce user menu --> 2870 @if (GetBoolean("Item.Area.EcomEnabled")) 2871 { 2872 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2873 { 2874 <text> 2875 <li class="LoginLink"> 2876 <a href="#" data-toggle="modal" data-target="#login"> 2877 2878 <span>@Translate("Login", "Login")</span> 2879 </a> 2880 </li> 2881 @*@GetValue("DwNavigation(toolsnavigationNotloggedin)")*@ 2882 </text> 2883 } 2884 2885 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2886 { 2887 <text> 2888 2889 <li class="loggedIn"> 2890 <a id="dLabel" role="button" href='Default.aspx?ID=@Pageview.Area.Item["UserProfilePageId"]'> 2891 2892 <nobr> 2893 <i class="fa fa-user"></i>@GetGlobalValue("Global:Extranet.Name") 2894 </nobr> 2895 </a> 2896 @GetValue("DwNavigation(MyProfileMenu)") 2897 <span class="TitleWelcome" style="display: none;">@Translate("Welcome", "Welcome") @GetGlobalValue("Global:Extranet.Name")</span> 2898 </li><li class="logOut" style="display: none;"> 2899 <a href='/Admin/Public/ExtranetLogoff.aspx?ID=@logoutid'> 2900 @*<i class="fa fa-sign-out"></i>*@ 2901 @Translate("Logout", "Logout") 2902 2903 </a> 2904 </li> 2905 2906 2907 2908 @if (GetLoop("DWExtranetSecondaryUsers").Count > 0 || !string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) 2909 { 2910 <li> 2911 <form method="post"> 2912 <span> 2913 @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) 2914 { 2915 string impersonateTranslation = Translate("Impersonate selected user"); 2916 <select id="DWExtranetSecondaryUserSelector" name="DWExtranetSecondaryUserSelector" title="@impersonateTranslation"> 2917 @foreach (var user in GetLoop("DWExtranetSecondaryUsers")) 2918 { 2919 <option value='@user.GetValue("UserID")'>@user.GetValue("UserName")</option> 2920 } 2921 </select> 2922 <input type="submit" class="btn btn-xs" tabindex="3" value="OK"> 2923 } 2924 else 2925 { 2926 string impersonateUser = GetGlobalValue("Global:Extranet.SecondaryUser.UserName") + " " + Translate("is impersonated by") + " " + Pageview.User.UserName; 2927 string stopImpersonateTranslation = Translate("Stop impersonation"); 2928 <span title="@impersonateUser" class="btn btn-xs impersonation-btn"><i class="fa fa-user-secret"></i> @GetGlobalValue("Global:Extranet.SecondaryUser.UserName")</span> 2929 <input type="submit" class="btn btn-xs" name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" value="@stopImpersonateTranslation"> 2930 } 2931 </span> 2932 </form> 2933 </li> 2934 } 2935 2936 </text> 2937 } 2938 } 2939 2940 <!-- Ecommerce Cart --> 2941 @if (GetBoolean("Item.Area.EcomEnabled")) 2942 { 2943 <li class="dropdown animate-hover hidden" data-animate="animated fadeInUp"> 2944 <a href="Default.aspx?ID=@cartid" title="" id="minipagecart" class="dw-minicart"><i class="fa fa-shopping-cart"></i> @GetValue("Ecom:Order.OrderLines.TotalProductQuantity") <span>@GetValue("Ecom:Order.OrderLines.Total.PriceWithoutVAT")</span></a> 2945 2946 <ul class="sub-menu"> 2947 <li id="minicart"> 2948 @MiniCart() 2949 </li> 2950 </ul> 2951 </li> 2952 } 2953 </ul> 2954 </nav> 2955 <!-- MAIN NAV --> 2956 @{ 2957 var sticky = GeneralSettings.Navigation.StickyMenu; 2958 var stickyTrigger = "affix"; 2959 var navbarpos = GeneralSettings.Navigation.Position; 2960 var selectionstyle = GeneralSettings.Navigation.SelectionStyle; 2961 2962 if (sticky == "off") 2963 { 2964 stickyTrigger = ""; 2965 } 2966 } 2967 2968 <div id="navOne" class="navbar navbar-wp @selectionstyle navbar-fixed affix-top" role="navigation" data-spy="@stickyTrigger" data-offset-top="@sticky" data-offset-bottom="300"> 2969 2970 @if (GeneralSettings.Header.Mode != "solid" || !GeneralSettings.Header.Show) 2971 { 2972 <div class="navbar-header pull-@GeneralSettings.Navigation.InvertedPosition"> 2973 <div class="hidden-sm hidden-xs"> 2974 <a href="/Default.aspx?ID=@firstpageid" class="brand"> 2975 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 2976 { 2977 if (GeneralSettings.Logo.ContrastImage != GeneralSettings.Logo.Image) 2978 { 2979 <img class="img-responsive dw-logoimage dw-logoimage-normal pull-left" src="@GeneralSettings.Logo.Image" alt="Logo"> 2980 <img class="img-responsive dw-logoimage dw-logoimage-contrast pull-left" src="@GeneralSettings.Logo.ContrastImage" alt="Logo"> 2981 } 2982 else 2983 { 2984 <img class="img-responsive dw-logoimage pull-left" src="@GeneralSettings.Logo.Image" alt="Logo"> 2985 } 2986 } 2987 2988 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text)) 2989 { 2990 <div class="dw-logotext pull-left">@GeneralSettings.Logo.Text</div> 2991 } 2992 </a> 2993 2994 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Slogan)) 2995 { 2996 <div class="dw-slogantext pull-left">@GeneralSettings.Logo.Slogan</div> 2997 } 2998 </div> 2999 </div> 3000 } 3001 3002 @if (GeneralSettings.Header.Mode != "mobile") 3003 { 3004 3005 <!-- Big screen header --> 3006 <div class="navbar-navigation"> 3007 <div class="hidden-sm hidden-xs"> 3008 <nav class="col-md-10 col-sm-10 col-xs-10 p-0 navbar-collapse collapse navbar-@navbarpos"> 3009 @if (GeneralSettings.Navigation.IsMegamenu) 3010 { 3011 @GetValue("DwNavigation(topnavigationmegamenu)") 3012 } 3013 else 3014 { 3015 @GetValue("DwNavigation(topnavigation)") 3016 } 3017 3018 <!-- Extra navigation when no header is shown --> 3019 @if (GetBoolean("Item.Area.EcomEnabled")) 3020 { 3021 if (!GeneralSettings.Header.Show) 3022 { 3023 <ul class="nav navbar-nav"> 3024 <li>&nbsp;&nbsp;&nbsp;</li> 3025 @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 3026 { 3027 <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> 3028 <li class="dw-navbar-button"><a href="/not-logged-in/create-user-profile" data-hover="dropdown"><i class="fa fa-user"></i><span></span></a></li> 3029 } 3030 3031 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 3032 { 3033 <li class="dw-navbar-button"> 3034 <a href='Default.aspx?ID=@Pageview.Area.Item["OrdersPageId"]' data-hover="dropdown"> 3035 <nobr> 3036 <strong><i class="fa fa-user"></i></strong> 3037 </nobr> 3038 <span></span> 3039 </a> 3040 </li> 3041 <li class="dw-navbar-button"> 3042 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID" data-hover="dropdown"><i class="fa fa-sign-out"></i><span></span></a> 3043 </li> 3044 } 3045 3046 3047 </ul> 3048 } 3049 3050 if (GeneralSettings.Header.Mode != "solid") 3051 { 3052 <ul class="nav navbar-nav"> 3053 <li class="dropdown dropdown-aux animate-click dw-navbar-button" data-animate-in="animated bounceInUp" data-animate-out="animated fadeOutDown" style="z-index:500;"> 3054 <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown"><i class="fa fa-search"></i><span></span></a> 3055 <ul class="dropdown-menu dropdown-menu-user animate-wr"> 3056 <li id="dropdownForm"> 3057 <div class="dropdown-form"> 3058 <form class="form-light p-15" role="form" method="get" action="Default.aspx"> 3059 <input type="hidden" name="ID" value='@searchpage'> 3060 <div class="input-group remote"> 3061 <input type="text" class="form-control typeahead" name="q" placeholder="@searchplaceholder"> 3062 <span class="input-group-btn" style="top:-1px !important;"> 3063 <button class="btn btn-base" type="submit"><i class="fa fa-search"></i></button> 3064 </span> 3065 </div> 3066 </form> 3067 </div> 3068 </li> 3069 </ul> 3070 </li> 3071 </ul> 3072 } 3073 } 3074 </nav> 3075 </div> 3076 3077 @*@if (GetBoolean("Item.Area.EcomEnabled")) 3078 { 3079 if (GeneralSettings.Header.Mode == "solid" && GeneralSettings.Header.Show) 3080 { 3081 <div class="hidden-sm hidden-xs"> 3082 <div class="col-md-2 col-sm-2 col-xs-2 pull-@GeneralSettings.Navigation.InvertedPosition"> 3083 <form method="get" action="Default.aspx"> 3084 <input type="hidden" name="ID" value='@Pageview.Area.Item["ProductsPageId"]'> 3085 <div id="remote" class="input-group pull-@GeneralSettings.Navigation.InvertedPosition dw-top-search"> 3086 <input type="text" class="form-control typeahead" name="Search" tabindex="1" placeholder="@searchplaceholder"> 3087 <span class="input-group-btn" style="top:0px !important;"> 3088 <button class="btn btn-primary" type="submit"><i class="fa fa-search"></i></button> 3089 </span> 3090 </div> 3091 </form> 3092 </div> 3093 </div> 3094 } 3095 }*@ 3096 </div> 3097 } 3098 else 3099 { 3100 <!-- Using only mobile navigation --> 3101 <div class="pull-@GeneralSettings.Navigation.Position"> 3102 <ul class="nav navbar-nav"> 3103 <li class="dw-navbar-button" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body"> 3104 <a><i class="fa fa-bars fa-2x"></i><span></span></a> 3105 </li> 3106 </ul> 3107 </div> 3108 } 3109 </div> 3110 </div> 3111 3112 </div> 3113 3114 3115 </div> 3116 <div class="col-xs-12 mobileMenu hidden-lg"> 3117 <span class="buttonIconSearch pull-right "> 3118 <button class="btn btn-dw-primary searchFieldShow" type="submit"> 3119 <img src="/Files/Templates/Designs/Dwsimple/images/icons/search-white.png" class="img-center" alt=""> 3120 3121 <span> 3122 @Translate("Search", "Search") 3123 </span> 3124 </button> 3125 </span> 3126 <!-- Small screen header --> 3127 <div class="hidden-lg"> 3128 <div class="pull-right hamb"> 3129 <button type="button" class="btn btn-sm btn-base" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body"> 3130 3131 <i class="fa fa-bars"></i> 3132 <span> 3133 @Translate("Menu", "Menu") 3134 </span> 3135 </button> 3136 </div> 3137 3138 <div class="hidden-xs hidden-sm hidden-md pull-left"> 3139 <h2 class="dw-header-sm-title">@GetGlobalValue("Global:Page.Top.Name")</h2> 3140 </div> 3141 3142 @if (GetBoolean("Item.Area.EcomEnabled")) 3143 { 3144 @*<div class="pull-right hidden-sm"> 3145 <ul class="top-menu"> 3146 <li class="hidden-xs"> 3147 <a href="Default.aspx?ID=@cartid" title="" class="btn btn-sm btn-base dw-minicart " id="minipagecart-mobile"><i class="fa fa-shopping-cart"></i><strong> @GetValue("Ecom:Order.OrderLines.TotalProductQuantity") <span class="amount">@GetValue("Ecom:Order.OrderLines.Total.PriceWithoutVAT")</span></strong></a> 3148 </li> 3149 </ul> 3150 </div>*@ 3151 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 3152 { 3153 <div class="hidden-xs hidden-sm pull-right "> 3154 <a href='/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID'><button class="btn btn-sm btn-base"><i class="fa fa-sign-out"></i></button></a> 3155 &nbsp; 3156 </div> 3157 <div class="hidden-xs pull-right userNameBox"> 3158 <a href='Default.aspx?ID=@Pageview.Area.Item["UserProfilePageId"]' class="btn btn-sm btn-base"> 3159 <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong> 3160 </a> 3161 &nbsp; 3162 </div> 3163 } 3164 3165 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 3166 { 3167 <div class="hidden-xs hidden-sm pull-right"> 3168 <a href='Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]' class="btn btn-sm btn-base"><i class="fa fa-sign-in"></i></a> 3169 &nbsp; 3170 </div> 3171 } 3172 } 3173 </div> 3174 <div class="clearfix"></div> 3175 </div> 3176 3177 </div> 3178 <div class="clearfix"></div> 3179 </div> 3180 3181 </div> 3182 } 3183 3184 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.HeaderLayoutImage"))) 3185 { 3186 if (currentpageid != firstpageid) 3187 { 3188 var coverimage = GetString("Item.Area.HeaderLayoutImage"); 3189 3190 <div class="container-fluid dw-header-image"> 3191 <div class="row"> 3192 <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> 3193 </div> 3194 </div> 3195 } 3196 else if (GeneralSettings.Header.ShowFrontpageImage) 3197 { 3198 var coverimage = GetString("Item.Area.HeaderLayoutImage"); 3199 3200 <div class="container-fluid dw-header-image"> 3201 <div class="row"> 3202 <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> 3203 </div> 3204 </div> 3205 } 3206 } 3207 else if (GeneralSettings.Header.Mode != "solid") 3208 { 3209 if (currentpageid != firstpageid) 3210 { 3211 <div class="container-fluid dw-header-image"> 3212 <div class="row"> 3213 <section class="carousel carousel-1 slice fluid" style="height: 160px !important; background-color: transparent; background-size: cover !important;"></section> 3214 </div> 3215 </div> 3216 } 3217 } 3218 3219 </div> 3220 <div class="clearfix"></div> 3221 3222 3223 @if (GeneralSettings.Header.Mode == "solid" && GeneralSettings.Header.Show) 3224 { 3225 <div class="searchRight clearfix"> 3226 <div class="slideToggle col-md-12 col-sm-12"> 3227 <form method="get" action="Default.aspx"> 3228 <input type="hidden" name="ID" value='@searchpage'> 3229 <div id="remote" class="input-group top-search"> 3230 <div class="remoteR"> 3231 <input type="hidden" name="qurlencoded" id="qurlencoded" value=''> 3232 <input type="text" class="form-control typeahead" name="q" placeholder='@Translate("What are you searching for?")' data-encode=""> 3233 <span class="input-group-btn"> 3234 <button class="btn btn-primary " type="submit"> 3235 <i class="fa fa-angle-double-right"></i> 3236 </button> 3237 </span> 3238 </div> 3239 </div> 3240 </form> 3241 </div> 3242 </div> 3243 <div class="clearfix"></div> 3244 } 3245 </header> 3246 3247 3248 @{ 3249 var current = ""; 3250 var currentWhole = ""; 3251 } 3252 @foreach (var lang in GetLoop("Languages")) 3253 { 3254 if (lang.GetBoolean("IsCurrent")) 3255 { 3256 string input = lang.GetString("Culture"); 3257 int index = input.IndexOf("-"); 3258 if (index > 0) 3259 { 3260 current = input.Substring(0, index); 3261 } 3262 currentWhole = lang.GetString("Culture").ToLower(); 3263 } 3264 } 3265 </div> 3266 3267 @* MAIN CONTENT *@ 3268 3269 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 3270 3271 3272 @GetValue("Title(Full width page)") 3273 @GetValue("Description(Use this page for full width pages with no left navigation.)") 3274 3275 @{ 3276 string siteurl = GetGlobalValue("Global:Request.Url").ToString(); 3277 3278 string navtag = GetGlobalValue("Global:Page.NavigationTag").ToString(); 3279 3280 var request = HttpContext.Current.Request; 3281 3282 var customerCenterId = ""; // Pageview.Area.Item["CustomerCenterId"].ToString().Replace("Default.aspx?Id=", ""); 3283 3284 var hiddenXs = "hidden-xs"; 3285 if (GetGlobalValue("Global:Page.ID") == customerCenterId) 3286 { 3287 hiddenXs = ""; 3288 } 3289 } 3290 3291 <style> 3292 .product-details.left-col { 3293 display: none; 3294 } 3295 .product-details.right-col { 3296 width: 100%; 3297 } 3298 .product-details.right-col .row.product { 3299 margin-left: -15px; 3300 } 3301 </style> 3302 3303 3304 @if (GetBoolean("Item.Page.LayoutShowBreadcrumb")) 3305 { 3306 <div class="pg-opt pin white"> 3307 <div class="container"> 3308 <div class="row"> 3309 @if (!GetBoolean("Item.Page.LayoutHideLeftMenu")) 3310 { 3311 <div class="hidden col-md-3"> 3312 @if (GeneralSettings.Navigation.BreadcrumbMode != "light") 3313 { 3314 <div class="dw-breadcrumb-title">@GetGlobalValue("Global:Page.Top.Name")</div> 3315 } 3316 </div> 3317 } 3318 <div class="col-xs-12"> 3319 @GetValue("DwNavigation(breadcrumb)") 3320 </div> 3321 </div> 3322 </div> 3323 </div> 3324 } 3325 3326 <section class="slice white animate-hover-slide"> 3327 <div class="container"> 3328 <div class="row"> 3329 <div class="col-xs-12"> 3330 <hr> 3331 </div> 3332 @if (!GetBoolean("Item.Page.LayoutHideLeftMenu")) 3333 { 3334 <div class="@hiddenXs col-xs-12 col-sm-4 col-md-3 left-col @navtag"> 3335 <div class="widget affix-top"> @*data-spy="affix" data-offset-top="150" data-offset-bottom="300">*@ 3336 @GetValue("DwNavigation(leftnavigation)") 3337 @RenderSnippet("Facets") 3338 </div> 3339 <p>&nbsp;</p> 3340 </div> 3341 } 3342 @{ 3343 var attributeValue = "col-xs-12 col-sm-8 col-md-9 right-col " + navtag; 3344 3345 if (GetBoolean("Item.Page.LayoutHideLeftMenu")) 3346 { 3347 attributeValue = "col-xs-12"; 3348 } 3349 } 3350 @{ 3351 string listView = "list"; 3352 string productviewtype = "list"; 3353 if (Pageview.Device.ToString() == "Mobile") 3354 { 3355 listView = "box"; 3356 } 3357 else 3358 { 3359 3360 if (HttpContext.Current.Request.Cookies["productviewtype"] != null) 3361 { 3362 if (HttpContext.Current.Request.Cookies["productviewtype"].Value != null) 3363 { 3364 productviewtype = HttpContext.Current.Request.Cookies["productviewtype"].Value.ToString(); 3365 } 3366 } 3367 3368 listView = !String.IsNullOrEmpty(HttpContext.Current.Request["listView"]) ? HttpContext.Current.Request.QueryString.Get("listView") : productviewtype; 3369 } 3370 } 3371 @if (listView != "details") 3372 { 3373 <div class="@attributeValue"> 3374 <div id="maincontent">@GetValue("DwContent(maincontent)")</div> 3375 </div> 3376 } 3377 @if (listView == "details") 3378 { 3379 <div class="@attributeValue"> 3380 <div id="btob">@GetValue("DwContent(btob)")</div> 3381 </div> 3382 } 3383 3384 @if (GetBoolean("Item.Page.FacebookLikeButton")) 3385 { 3386 <div class="container"> 3387 <div class="col-xs-12"> 3388 <div class="row"> 3389 <iframe src="//www.facebook.com/plugins/like.php?href=@siteurl&amp;width=200&amp;layout=button_count&amp;action=recommend&amp;show_faces=true&amp;share=true&amp;height=21" style="border:none; overflow:hidden; height:21px;"></iframe> 3390 </div> 3391 </div> 3392 </div> 3393 } 3394 </div> 3395 </div> 3396 </section> 3397 3398 @* FOOTER *@ 3399 3400 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 3401 3402 @using System 3403 @using System.Web 3404 @using System.Globalization 3405 @using Dynamicweb.Frontend.Devices 3406 @using System.Text.RegularExpressions 3407 @using Dynamicweb.Environment.Helpers 3408 @using Dynamicweb.Rendering 3409 3410 <footer class="footer"> 3411 @if (GetBoolean("Item.Area.FooterShowContactInfo")) 3412 { 3413 <div class="footer-section"> 3414 <div class="container"> 3415 <div class="row"> 3416 <div class="col-xs-12 col-md-4 links"> 3417 <div class="col"> 3418 <h3>@GetString("Item.Area.HeadingColumnOne")</h3> 3419 <ul> 3420 @foreach (LoopItem linksfooter in GetLoop("Item.Area.FooterLinks")) 3421 { 3422 var footertitle = linksfooter.GetString("Item.Area.FooterLinks.Title"); 3423 var footerlinks = linksfooter.GetString("Item.Area.FooterLinks.Link.Value"); 3424 3425 if (footerlinks != "") 3426 { 3427 <li> 3428 <a href="@footerlinks">@footertitle</a> 3429 </li> 3430 } 3431 } 3432 </ul> 3433 </div> 3434 </div> 3435 3436 <div class="col-xs-12 col-md-4 links"> 3437 <div class="col"> 3438 <h3>@GetString("Item.Area.HeadingColumnTwo")</h3> 3439 <ul> 3440 @foreach (LoopItem linksfooter in GetLoop("Item.Area.ServicesLinks")) 3441 { 3442 var footertitle = linksfooter.GetString("Item.Area.ServicesLinks.Title"); 3443 var footerlinks = linksfooter.GetString("Item.Area.ServicesLinks.Link.Value"); 3444 3445 if (footerlinks != "") 3446 { 3447 <li> 3448 <a href="@footerlinks">@footertitle</a> 3449 </li> 3450 } 3451 } 3452 </ul> 3453 </div> 3454 </div> 3455 3456 <div class="col-xs-12 col-md-4 socials"> 3457 <div class="col"> 3458 @if (GetBoolean("Item.Area.SocialLinksInFooter")) 3459 { 3460 string sicon = ""; 3461 string slink = ""; 3462 3463 <h3>@GetString("Item.Area.HeadingColumnThree")</h3> 3464 3465 3466 <p> 3467 @foreach (LoopItem socialitem in GetLoop("Item.Area.SocialIconsInTheFooter")) 3468 { 3469 sicon = socialitem.GetString("Item.Area.SocialIconsInTheFooter.Icon"); 3470 slink = socialitem.GetString("Item.Area.SocialIconsInTheFooter.Link"); 3471 3472 <a href="@slink"><i class="fa @sicon"></i></a> 3473 } 3474 </p> 3475 } 3476 </div> 3477 @if (GetBoolean("Item.Area.FooterNewsletterSignUp")) 3478 { 3479 string NavTag = GetGlobalValue("Global:Page.NavigationTag").ToString(); 3480 string CurrentPageName = GetGlobalValue("Global:Page.Name").ToString(); 3481 3482 if (NavTag != CurrentPageName) 3483 { 3484 int NewsletterInfoParagraphID = System.Convert.ToInt32(Pageview.Area.Item["NewsletterSignUpFormParagraph"].ToString()); 3485 3486 <div class="col"> 3487 <p>@Translate("Sign up if you would like to receive occasional treats from us", "Sign up if you would like to receive occasional treats from us").</p> 3488 @RenderParagraphContent(NewsletterInfoParagraphID) 3489 </div> 3490 } 3491 } 3492 </div> 3493 3494 @if (GetBoolean("Item.Area.FooterShowSitemap")) 3495 { 3496 <div class="col-xs-12 col-md-4"> 3497 <div class="col"> 3498 @GetValue("DwNavigation(footersitemap)") 3499 </div> 3500 <div>&nbsp;</div> 3501 </div> 3502 } 3503 </div> 3504 </div> 3505 </div> 3506 } 3507 3508 @SnippetStart("StylesHead") 3509 footer .footer-badges { 3510 background-color: @GetString("Item.Area.BadgeListBackgroundColor.Color"); 3511 } 3512 footer .footer-menu { 3513 background-color: @GetString("Item.Area.AddressBarBackgroundColor.Color"); 3514 } 3515 @SnippetEnd("StylesHead") 3516 3517 @if (GetBoolean("Item.Area.BadgeList") && GetLoop("Item.Area.BadgeList").Count > 0) 3518 { 3519 string blImage = ""; 3520 string blLink = ""; 3521 string blTarget = ""; 3522 3523 <div class="footer-badges"> 3524 <div class="container"> 3525 <ul> 3526 @foreach (LoopItem badgelistitem in GetLoop("Item.Area.BadgeList")) 3527 { 3528 blImage = badgelistitem.GetString("Item.Area.BadgeList.Image"); 3529 blLink = badgelistitem.GetString("Item.Area.BadgeList.Link"); 3530 blTarget = badgelistitem.GetString("Item.Area.BadgeList.Target"); 3531 3532 <li> 3533 @if (!string.IsNullOrWhiteSpace(blLink)) 3534 { 3535 <a href="@blLink" target="@blTarget"><img src="@blImage" alt=""></a> 3536 } 3537 else 3538 { 3539 <img src="@blImage" alt=""> 3540 } 3541 </li> 3542 } 3543 </ul> 3544 </div> 3545 </div> 3546 } 3547 3548 3549 3550 <div class="footer-menu"> 3551 <div class="container"> 3552 @*<div class="footer-logo"> 3553 @{ 3554 var logofooter = GetString("Item.Area.FooterLogo"); 3555 string firstpageidFooter = GetString("DwAreaFirstActivePageID"); 3556 } 3557 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.FooterLogo"))) 3558 { 3559 <a href="/Default.aspx?ID=@firstpageidFooter" class="brand"> 3560 <img class="img-responsive" src="@logofooter" alt="Logo footer"> 3561 </a> 3562 } 3563 </div>*@ 3564 3565 <div class="footer-links"> 3566 @GetValue("Item.Area.FooterAddress") 3567 3568 @*@{ 3569 string footeremail = GetString("Item.Area.FooterEmail"); 3570 string footerphone = GetString("Item.Area.FooterPhone").Replace(" ", ""); 3571 } 3572 <p> 3573 @Translate("Phone", "Phone"): <a href="tel:@footerphone">@footerphone</a> 3574 @Translate("Email", "Email"): <a href="mailto:@footeremail" title="Email Us">@GetValue("Item.Area.FooterEmail")</a> 3575 </p>*@ 3576 </div> 3577 </div> 3578 </div> 3579 </footer> 3580 <!--[if IE]> 3581 <style> 3582 .widget.affix { width:21% !important; } 3583 </style> 3584 <![endif]--> 3585 @* ESSENTIALS *@ 3586 3587 <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"></script> 3588 <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script> 3589 <script src="//cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.20/jquery.fancybox.min.js"></script> 3590 3591 3592 <script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script> 3593 <script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.min.js"></script> 3594 <script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.4/js/bootstrap.min.js"></script> 3595 @*<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/js/bootstrap.min.js"></script>*@ 3596 3597 @* ASSETS *@ 3598 <script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-hover-dropdown/2.0.10/bootstrap-hover-dropdown.min.js"></script> 3599 <script src="//cdnjs.cloudflare.com/ajax/libs/spin.js/2.0.1/spin.min.js"></script> 3600 @*<script type="text/javascript" src="/Files/Templates/Designs/Dwsimple/js/typeahead.bundle.js"></script>*@ 3601 3602 @* SRIPTS FOR INDIVIDUAL PAGES, DEPENDING ON WHAT PLUG-INS ARE USED *@ 3603 <script src="//cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/js/jasny-bootstrap.min.js" type="text/javascript"></script> 3604 3605 <script src="//connect.facebook.net/en_US/sdk.js"></script> 3606 <script src="/Files/Templates/Designs/Dwsimple/js/typeahead.js"></script> 3607 <script src="/Files/Templates/Designs/Dwsimple/js/jquery.socialfeed.js"></script> 3608 <script src="/Files/Templates/Designs/Dwsimple/js/codebird.js"></script> 3609 <script src="/Files/Templates/Designs/Dwsimple/js/doT.min.js"></script> 3610 <script src="/Files/Templates/Designs/Dwsimple/js/moment.min.js"></script> 3611 3612 <script src="/Files/Templates/Designs/Dwsimple/js/owl.carousel.min.js"></script> 3613 <script src="/Files/Templates/Designs/Dwsimple/js/custom.js"></script> 3614 @*<script src="/Files/Templates/Designs/Dwsimple/js/filter.js"></script>*@ 3615 <script src="/Files/Templates/Designs/Dwsimple/js/GeneralMethods.js"></script> 3616 <script src="/Files/Templates/Designs/Dwsimple/js/cart.js"></script> 3617 <script src="/Files/Templates/Designs/Dwsimple/js/bootstrap-datetimepicker.js"></script> 3618 <script src="/Files/Templates/Designs/Dwsimple/js/jQueryValidation.js"></script> 3619 <script> 3620 3621 $("input.typeahead").on("change", function () { 3622 var qvalue = $(this).val().replace(/æ/g, "&aelig;").replace(/ø/g, "&oslash;").replace(/å/g, "&aring;").replace(/Æ/g, "&AElig;").replace(/Ø/g, "&Oslash;").replace(/Å/g, "&Aring;"); 3623 3624 $('input#qurlencoded').val(qvalue) 3625 }) 3626 3627 </script> 3628 <script type="text/html-template" id="OrderlineAjaxTemplate"> 3629 <tr> 3630 <td class="text-center"><img src="/Admin/Public/GetImage.ashx?width=50&height=50&crop=5&image=Obj.image&Compression=99" class="img-center" alt=""></td> 3631 <td> 3632 <a href="Obj.link"> 3633 Obj.name Obj.variantname 3634 </a> 3635 </td> 3636 <td class="text-center">Obj.quantity</td> 3637 <td class="text-right"> 3638 <nobr> 3639 Obj.totalprice 3640 </nobr> 3641 </td> 3642 </tr> 3643 </script> 3644 @* INITIALIZE SCROLLING NAVIGATION *@ 3645 @if (GeneralSettings.Navigation.IsAnimateNavigation) 3646 { 3647 <script type="text/javascript"> 3648 // Hide Header on on scroll down 3649 var didScroll; 3650 var lastScrollTop = 0; 3651 var delta = 5; 3652 var navbarHeight = $('header').outerHeight(); 3653 3654 $(window).scroll(function (event) { 3655 didScroll = true; 3656 }); 3657 3658 setInterval(function () { 3659 if (didScroll) { 3660 hasScrolled(); 3661 didScroll = false; 3662 } 3663 }, 250); 3664 3665 function hasScrolled() { 3666 var st = $(this).scrollTop(); 3667 var $megamenu = $('#topnavigationmegamenu > li.dropdown.ParentShow .dropdown-menu'), 3668 $search = $('.searchRight .slideToggle'), 3669 $isSearchOpen = ($search.is('.open') ? true : false); 3670 3671 // Make sure they scroll more than delta 3672 if (Math.abs(lastScrollTop - st) <= delta) 3673 return; 3674 3675 // If they scrolled down and are past the navbar, add class .nav-up. 3676 // This is necessary so you never see what is "behind" the navbar. 3677 if (st > lastScrollTop && st > navbarHeight) { 3678 // Scroll Down 3679 $('header').removeClass('nav-down').addClass('nav-up'); 3680 $megamenu.css('top', '0').fadeOut(); 3681 if ($isSearchOpen) $search.fadeOut(); 3682 } else { 3683 // Scroll Up 3684 if (st + $(window).height() < $(document).height()) { 3685 $('header').removeClass('nav-up').addClass('nav-down'); 3686 $megamenu.fadeIn().css('top', '107px'); 3687 if ($isSearchOpen) $search.fadeIn(); 3688 } 3689 } 3690 lastScrollTop = st; 3691 } 3692 </script> 3693 } 3694 3695 @* INITIALIZE FANCYBOX *@ 3696 <script type="text/javascript"> 3697 3698 if ($(".fancybox").length > 0) $(".fancybox") 3699 .fancybox({ 3700 padding: 0 3701 }); 3702 3703 $(document).ready(function () { 3704 MiniCartInit(@Pageview.Area.Item["JSONFeedForCart"], @Pageview.Area.Item["ProductsPageId"]); 3705 if (typeof ProductModal == 'undefined') { 3706 console.log('missing variable'); 3707 } 3708 else ProductModal.init(@Pageview.Area.Item["JSOPNFeedForModal"]); 3709 }); 3710 </script> 3711 3712 @RenderSnippet("JavaScriptBottom") 3713 3714 <script type="text/javascript"> 3715 $(document).ready(function () { 3716 $('.nav-stacked .offcanvas-menubtn').has('ul').addClass('innerMenuMobile'); 3717 $("<i class='fa fa-plus mobileMenuFix' onclick='toggleCheck(this)'></i>").insertAfter(".offcanvas-col>.nav-stacked>.offcanvas-menubtn.innerMenuMobile>a"); 3718 //$("<i class='fa fa-sort-desc mobileMenuFix' onclick='toggleCheck(this)'></i>").insertAfter(".offcanvas-col>.nav-stacked>.offcanvas-menubtn>.M1>.offcanvas-menubtn>a"); 3719 //$("<i class='fa fa-sort-desc mobileMenuFix' onclick='toggleCheck(this)'></i>").insertAfter(".offcanvas-col>.nav-stacked>.offcanvas-menubtn>.M1>.offcanvas-menubtn>.M2>.offcanvas-menubtn>a"); 3720 $(".nav-stacked .0 i").remove(); 3721 }); 3722 3723 function toggleCheck(elem) { 3724 jQuery(elem).parent().children("ul").toggle(); 3725 jQuery(elem).toggleClass('fa-plus fa-minus') 3726 } 3727 3728 function toggleCheckTopNav() { 3729 $("#toggleTopNav").children("ul").toggle(); 3730 } 3731 3732 $('.langMenu li').each(function () { 3733 var group = $(this); 3734 var value = group.children("a"); 3735 var date = new Date(); 3736 var minutes = 1440; 3737 date.setTime(date.getTime() + (minutes * 60 * 1000)); 3738 $(value).on('click', function (e) { 3739 $.cookie('remember_lang', $(this).attr("data-code"), { expires: date, path: '/' });; 3740 3741 }); 3742 }); 3743 3744 function setLangAuto(filterlang) { 3745 var pathname = window.location.pathname; 3746 3747 switch (filterlang) { 3748 case "fr": 3749 pathname = $(".langSelected[data-code='fr']").attr('href'); 3750 if ($(".langSelected[data-code='fr']").hasClass("activeArea") || $.cookie('remember_lang') != null) { 3751 3752 break; 3753 } else { 3754 window.location.href = pathname; 3755 } 3756 3757 case "de": 3758 pathname = $(".langSelected[data-code='de']").attr('href'); 3759 if ($(".langSelected[data-code='de']").hasClass("activeArea") || $.cookie('remember_lang') != null) { 3760 3761 break; 3762 } else { 3763 window.location.href = pathname; 3764 } 3765 case "es": 3766 pathname = $(".langSelected[data-code='es']").attr('href'); 3767 if ($(".langSelected[data-code='es']").hasClass("activeArea") || $.cookie('remember_lang') != null) { 3768 3769 break; 3770 } else { 3771 window.location.href = pathname; 3772 } 3773 case "se": 3774 pathname = $(".langSelected[data-code='se']").attr('href'); 3775 if ($(".langSelected[data-code='se']").hasClass("activeArea") || $.cookie('remember_lang') != null) { 3776 3777 break; 3778 } else { 3779 window.location.href = pathname; 3780 } 3781 case "da": 3782 pathname = $(".langSelected[data-code='da']").attr('href'); 3783 if ($(".langSelected[data-code='da']").hasClass("activeArea") || $.cookie('remember_lang') != null) { 3784 3785 break; 3786 } else { 3787 window.location.href = pathname; 3788 } 3789 default: 3790 pathname = $(".langSelected[data-code='en']").attr('href'); 3791 if ($(".langSelected[data-code='en']").hasClass("activeArea") || $.cookie('remember_lang') != null) { 3792 3793 break; 3794 } else { 3795 window.location.href = pathname; 3796 } 3797 } 3798 } 3799 3800 jQuery(function ($) { 3801 if ($.cookie('remember_lang') != "@current" && $.cookie('remember_lang') != null) { 3802 var href; 3803 $(".langSelected").each(function () { 3804 if ($(this).data("code") == $.cookie('remember_lang')) { 3805 href = $(this).attr("href"); 3806 } 3807 }); 3808 window.location.href = href; 3809 } 3810 }); 3811 3812 3813 $('[data-toggle="dropdown"]').dropdown(); 3814 3815 </script> 3816 <script> 3817 $('.TitleWelcome').clone().prependTo('#MyProfileMenu'); 3818 $('.logOut').clone().appendTo('#MyProfileMenu .M1'); 3819 </script> 3820 @{ 3821 //var productsearch = @Pageview.Area.Item["SearchProductsPage"]; 3822 string productpageidsearch = GetString("Item.Area.SearchAllProductsPage"); 3823 string showedproducts = GetString("Item.Area.ShowedProducts"); 3824 var searchproductitem = Pageview.Area.Item["LinkToSearchProductPageItem"]; 3825 string ItemPageIDproducts = searchproductitem.ToString().TrimStart('/'); 3826 string seoproductsearch = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(ItemPageIDproducts); 3827 string quotecontext = Pageview.Area.Item["QuoteContext"].ToString(); 3828 string cartpage = Pageview.Area.Item["QuoteCart"].ToString(); 3829 } 3830 <script> 3831 var searchproducts = new Bloodhound({ 3832 datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'), 3833 queryTokenizer: Bloodhound.tokenizers.whitespace, 3834 remote: { 3835 url: '/Default.aspx?ID=@seoproductsearch&q=%QUERY', 3836 wildcard: '%QUERY' 3837 3838 }, 3839 3840 }); 3841 3842 searchproducts.initialize(); 3843 3844 $('#text-input').bind('typeahead:render', function () { 3845 $('.tt-suggestion').removeClass('tt-selectable'); 3846 }); 3847 3848 $('#remoteproduct .form-control').typeahead( 3849 { 3850 hint: true, 3851 highlight: false, 3852 minLength: 2 3853 }, 3854 { 3855 limit: 9999, 3856 name: 'name', 3857 display: 'name', 3858 source: searchproducts, 3859 templates: { 3860 empty: '<div class="search-header clearfix"><h4 class="product-title pull-left">@Translate("Ingen produkter fundet")</h4></div>', //optional 3861 suggestion: function (el) { 3862 return '<div class="clearfix">' + '<span class="name-search pull-left">' + el.name + '</span>' + '<span class="price-search pull-left">' + el.price + '</span><button class="btn-dw-cart QuickAdd pull-right" onclick="QuickAddToQuote(\'' + el.number + '\',$(this))"><i class="fa fa-plus"></i> <i class="fa fa-pulse"></i></button></div>'; 3863 } 3864 } 3865 } 3866 ); 3867 3868 // Quickly Add to quote 3869 function QuickAddToQuote(product, elm) { 3870 var url = "@Dynamicweb.Context.Current.Request.RawUrl&CartCmd=Add&ProductID=" + product + "&OrderContext=@quotecontext"; 3871 var allButtons = $('div.QuickAdd'); 3872 var spinner = elm.find($('i.fa-plus')); 3873 3874 spinner.removeClass('fa-plus'); 3875 spinner.addClass('fa-spinner fa-pulse'); 3876 elm.addClass('reducedOpacity'); 3877 elm.attr('disabled', 'disabled'); 3878 allButtons.addClass('reducedOpacity'); 3879 allButtons.attr('disabled', 'disabled'); 3880 document.location.href = url; 3881 //$.ajax({ 3882 // type: "GET", 3883 // url: url, 3884 // success: function () { 3885 // update(); 3886 // } 3887 //}); 3888 } 3889 </script> 3890 </div> 3891 @if (!string.IsNullOrWhiteSpace(GetString("DW_extranet_error_uk"))) 3892 { 3893 <script> 3894 $('#login').modal('show').addClass("in").attr("aria-hidden", "false").css({ 3895 "display": "block", 3896 "padding-left": "17px" 3897 }); 3898 </script> 3899 } 3900 </body> 3901 </html>