Error compiling template "Designs/Dwsimple/_parsed/product-catalogue.parsed.cshtml"
Line 5786: 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 <div id="myNavmenu" class="navmenu navmenu-default navmenu-fixed-@offsetmenuplace offcanvas"> 2495 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2496 <div class="row offcanvas-row">&nbsp;</div> 2497 <div class="offcanvas-row pull-right"> 2498 <button type="button" class="btn btn-sm btn-dw-primary close-menu" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body"> 2499 <img src="/Files/Templates/Designs/Dwsimple/images/icons/close.png" alt="close"> 2500 <span> 2501 @Translate("Menu", "Menu") 2502 </span> 2503 </button> 2504 </div> 2505 <div class="row offcanvas-row hidden"> 2506 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2507 <a href="/Default.aspx?ID=@firstpageid" class="brand"> 2508 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 2509 { 2510 <div class="img-responsive dw-offsetmenu-logo pull-left"> 2511 @if (GeneralSettings.Logo.ContrastImage != GeneralSettings.Logo.Image) 2512 { 2513 <img src="@GeneralSettings.Logo.ContrastImage" alt="Logo"> 2514 } 2515 else 2516 { 2517 <img class="img-responsive" src="@GeneralSettings.Logo.Image" alt="Logo"> 2518 } 2519 </div> 2520 } 2521 2522 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text)) 2523 { 2524 <div class="dw-logotext dw-offsetmenu-logo pull-left">@GeneralSettings.Logo.Text</div> 2525 } 2526 </a> 2527 </div> 2528 </div> 2529 <div class="row offcanvas-row">&nbsp;</div> 2530 </div> 2531 2532 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2533 @if (GetBoolean("Item.Area.EcomEnabled")) 2534 { 2535 <div class="row offcanvas-row">&nbsp;</div> 2536 <div class="row offcanvas-row"> 2537 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2538 @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2539 { 2540 <div class="pull-left hidden"> 2541 <a href='Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]' class="btn btn-sm btn-default">@Translate("Sign in", "Sign in")</a> 2542 <a href='Default.aspx?ID=@Pageview.Area.Item["SignUpPageId"]' class="btn btn-sm btn-default">@Translate("Opret brugerprofil", "Opret brugerprofil")</a> 2543 </div> 2544 2545 } 2546 @if (Dynamicweb.Frontend.PageView.Current().Device == Dynamicweb.Frontend.Devices.DeviceType.Desktop) 2547 { 2548 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2549 { 2550 <div class="pull-left"> 2551 <a href='Default.aspx?ID=@Pageview.Area.Item["OrdersPageId"]' class="btn btn-sm btn-default"> 2552 <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong> 2553 </a> 2554 </div> 2555 <div class="pull-left"> 2556 <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> 2557 </div> 2558 } 2559 } 2560 @if (GetLoop("DWExtranetSecondaryUsers").Count > 0 || !string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) 2561 { 2562 <p>&nbsp;</p> 2563 <form method="post"> 2564 <div class="pull-left"> 2565 @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) 2566 { 2567 <select id="DWExtranetSecondaryUserSelector" name="DWExtranetSecondaryUserSelector" title="Impersonate selected user"> 2568 @foreach (var user in GetLoop("DWExtranetSecondaryUsers")) 2569 { 2570 <option value='@user.GetValue("UserID")'>@user.GetValue("UserName")</option> 2571 } 2572 </select> 2573 <input type="submit" class="btn btn-xs" tabindex="3" value="OK"> 2574 } 2575 else 2576 { 2577 string impersonateUser = @GetGlobalValue("Global:Extranet.SecondaryUser.UserName") + " is impersonated by " + @Pageview.User.UserName; 2578 <span title="@impersonateUser" class="btn btn-xs impersonation-btn"><i class="fa fa-user-secret"></i> @GetGlobalValue("Global:Extranet.SecondaryUser.UserName")</span> 2579 <input type="submit" class="btn btn-xs" name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" value="Stop impersonation"> 2580 } 2581 </div> 2582 </form> 2583 } 2584 </div> 2585 </div> 2586 <div class="row offcanvas-row">&nbsp;</div> 2587 } 2588 </div> 2589 2590 2591 <div class="row offcanvas-row"> 2592 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2593 @GetValue("DwNavigation(drawernavigation)") 2594 </div> 2595 </div> 2596 2597 @if (!GetBoolean("Item.Area.OnlyOneLanguage")) 2598 { 2599 <div class="langMobile"> 2600 <div class="lang-sug"> 2601 <img class="closeLang" src="/Files/Templates/Designs/Dwsimple/images/icons/close-black.png" alt="close"> 2602 2603 <p>@Translate("Change language", "Change language"):</p> 2604 2605 <ul class="langMenu langMobile" area-labelledby="language"> 2606 2607 @foreach (var lang in GetLoop("WebsiteLanguages")) 2608 { 2609 2610 string isActive = (lang.GetBoolean("IsCurrent") ? "activeArea" : ""); 2611 2612 <li id='@lang.GetValue("ID")area' class="@isActive"> 2613 @*@if (GetInteger("Ecom:Order.OrderLines.Count") <= 0)*@ 2614 @{ 2615 string langCode = lang.GetString("Culture").Substring(0, 2).ToLower(); 2616 2617 if (lang.GetBoolean("IsCurrent")) 2618 { 2619 <a data-lang="current" data-code="@langCode" class="activeArea langSelected" href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'> 2620 @lang.GetString("Culture") 2621 2622 </a> 2623 2624 } 2625 else 2626 { 2627 <a class="langSelected" data-lang="none" data-code="@langCode" href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'> 2628 @lang.GetString("Culture") 2629 2630 </a> 2631 2632 } 2633 } 2634 </li> 2635 } 2636 2637 </ul> 2638 2639 2640 </div> 2641 </div> 2642 } 2643 2644 <div> 2645 <ul class="top-menu"> 2646 @foreach (LoopItem headerLink in GetLoop("Item.Area.HeaderLinks")) 2647 { 2648 string Link = headerLink.GetString("Item.Area.HeaderLinks.Link"); 2649 string LinkText = headerLink.GetString("Item.Area.HeaderLinks.LinkText"); 2650 string LinkIcon = headerLink.GetString("Item.Area.HeaderLinks.LinkIcon"); 2651 string LinkTarget = headerLink.GetString("Item.Area.HeaderLinks.LinkTarget"); 2652 2653 <li> 2654 <a href="@Link" title="@LinkText" target="@LinkTarget"> 2655 <span class="link-icon" style='background-image: url("@LinkIcon")'></span> 2656 <span class="link-txt">@LinkText</span> 2657 </a> 2658 </li> 2659 } 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 2842 <div class="pull-right navBar"> 2843 <nav class="top-header-menu hidden-sm hidden-xs hidden-md"> 2844 <ul class="top-menu"> 2845 <li> 2846 @if(GetInteger("DwAreaFirstPageID") == 8398) 2847 { 2848 <a href="Default.aspx?ID=11424"><img alt="" src="/Files/Images/Ikoner/English.png" style="height:25px; width:50px"></a> 2849 } 2850 @if(GetInteger("DwAreaFirstPageID") == 11424) 2851 { 2852 <a href="Default.aspx?ID=8398"><img alt="" src="/Files/Images/Ikoner/Norwegian.png" style="height:25px; width:50px"></a> 2853 } 2854 </li> 2855 @foreach (LoopItem headerLink in GetLoop("Item.Area.HeaderLinks")) 2856 { 2857 string Link = headerLink.GetString("Item.Area.HeaderLinks.Link"); 2858 string LinkText = headerLink.GetString("Item.Area.HeaderLinks.LinkText"); 2859 string LinkIcon = headerLink.GetString("Item.Area.HeaderLinks.LinkIcon"); 2860 string LinkTarget = headerLink.GetString("Item.Area.HeaderLinks.LinkTarget"); 2861 2862 <li> 2863 <a href="@Link" title="@LinkText" target="@LinkTarget"> 2864 <span class="link-icon" style='background-image: url("@LinkIcon")'></span> 2865 <span class="link-txt">@LinkText</span> 2866 </a> 2867 </li> 2868 } 2869 @if (!GetBoolean("Item.Area.OnlyOneLanguage")) 2870 { 2871 <li class="LangLing"> 2872 <a href="#"> 2873 <span class="link-icon" style='background-image: url("@GetString("Item.Area.LanguageIcon")")'></span> 2874 <span class="link-txt">@GetString("Item.Area.LanguageText")</span> 2875 </a> 2876 </li> 2877 } 2878 2879 2880 <!-- Ecommerce user menu --> 2881 @if (GetBoolean("Item.Area.EcomEnabled")) 2882 { 2883 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2884 { 2885 <text> 2886 <li class="LoginLink"> 2887 <a href="#" data-toggle="modal" data-target="#login"> 2888 2889 <span>@Translate("Login", "Login")</span> 2890 </a> 2891 </li> 2892 @*@GetValue("DwNavigation(toolsnavigationNotloggedin)")*@ 2893 </text> 2894 } 2895 2896 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2897 { 2898 <text> 2899 2900 <li class="loggedIn"> 2901 <a id="dLabel" role="button" href='Default.aspx?ID=@Pageview.Area.Item["UserProfilePageId"]'> 2902 2903 <nobr> 2904 <i class="fa fa-user"></i>@GetGlobalValue("Global:Extranet.Name") 2905 </nobr> 2906 </a> 2907 @GetValue("DwNavigation(MyProfileMenu)") 2908 <span class="TitleWelcome" style="display: none;">@Translate("Welcome", "Welcome") @GetGlobalValue("Global:Extranet.Name")</span> 2909 </li><li class="logOut" style="display: none;"> 2910 <a href='/Admin/Public/ExtranetLogoff.aspx?ID=@logoutid'> 2911 @*<i class="fa fa-sign-out"></i>*@ 2912 @Translate("Logout", "Logout") 2913 2914 </a> 2915 </li> 2916 2917 2918 2919 @if (GetLoop("DWExtranetSecondaryUsers").Count > 0 || !string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) 2920 { 2921 <li> 2922 <form method="post"> 2923 <span> 2924 @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) 2925 { 2926 string impersonateTranslation = Translate("Impersonate selected user"); 2927 <select id="DWExtranetSecondaryUserSelector" name="DWExtranetSecondaryUserSelector" title="@impersonateTranslation"> 2928 @foreach (var user in GetLoop("DWExtranetSecondaryUsers")) 2929 { 2930 <option value='@user.GetValue("UserID")'>@user.GetValue("UserName")</option> 2931 } 2932 </select> 2933 <input type="submit" class="btn btn-xs" tabindex="3" value="OK"> 2934 } 2935 else 2936 { 2937 string impersonateUser = GetGlobalValue("Global:Extranet.SecondaryUser.UserName") + " " + Translate("is impersonated by") + " " + Pageview.User.UserName; 2938 string stopImpersonateTranslation = Translate("Stop impersonation"); 2939 <span title="@impersonateUser" class="btn btn-xs impersonation-btn"><i class="fa fa-user-secret"></i> @GetGlobalValue("Global:Extranet.SecondaryUser.UserName")</span> 2940 <input type="submit" class="btn btn-xs" name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" value="@stopImpersonateTranslation"> 2941 } 2942 </span> 2943 </form> 2944 </li> 2945 } 2946 2947 </text> 2948 } 2949 } 2950 2951 <!-- Ecommerce Cart --> 2952 @if (GetBoolean("Item.Area.EcomEnabled")) 2953 { 2954 <li class="dropdown animate-hover hidden" data-animate="animated fadeInUp"> 2955 <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> 2956 2957 <ul class="sub-menu"> 2958 <li id="minicart"> 2959 @MiniCart() 2960 </li> 2961 </ul> 2962 </li> 2963 } 2964 </ul> 2965 </nav> 2966 <!-- MAIN NAV --> 2967 @{ 2968 var sticky = GeneralSettings.Navigation.StickyMenu; 2969 var stickyTrigger = "affix"; 2970 var navbarpos = GeneralSettings.Navigation.Position; 2971 var selectionstyle = GeneralSettings.Navigation.SelectionStyle; 2972 2973 if (sticky == "off") 2974 { 2975 stickyTrigger = ""; 2976 } 2977 } 2978 2979 <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"> 2980 @if (GeneralSettings.Header.Mode != "solid" || !GeneralSettings.Header.Show) 2981 { 2982 <div class="navbar-header pull-@GeneralSettings.Navigation.InvertedPosition"> 2983 <div class="hidden-sm hidden-xs"> 2984 <a href="/Default.aspx?ID=@firstpageid" class="brand"> 2985 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 2986 { 2987 if (GeneralSettings.Logo.ContrastImage != GeneralSettings.Logo.Image) 2988 { 2989 <img class="img-responsive dw-logoimage dw-logoimage-normal pull-left" src="@GeneralSettings.Logo.Image" alt="Logo"> 2990 <img class="img-responsive dw-logoimage dw-logoimage-contrast pull-left" src="@GeneralSettings.Logo.ContrastImage" alt="Logo"> 2991 } 2992 else 2993 { 2994 <img class="img-responsive dw-logoimage pull-left" src="@GeneralSettings.Logo.Image" alt="Logo"> 2995 } 2996 } 2997 2998 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text)) 2999 { 3000 <div class="dw-logotext pull-left">@GeneralSettings.Logo.Text</div> 3001 } 3002 </a> 3003 3004 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Slogan)) 3005 { 3006 <div class="dw-slogantext pull-left">@GeneralSettings.Logo.Slogan</div> 3007 } 3008 </div> 3009 </div> 3010 } 3011 3012 @if (GeneralSettings.Header.Mode != "mobile") 3013 { 3014 3015 <!-- Big screen header --> 3016 <div class="navbar-navigation"> 3017 <div class="hidden-sm hidden-xs"> 3018 <nav class="col-md-10 col-sm-10 col-xs-10 p-0 navbar-collapse collapse navbar-@navbarpos"> 3019 @if (GeneralSettings.Navigation.IsMegamenu) 3020 { 3021 @GetValue("DwNavigation(topnavigationmegamenu)") 3022 } 3023 else 3024 { 3025 @GetValue("DwNavigation(topnavigation)") 3026 } 3027 3028 <!-- Extra navigation when no header is shown --> 3029 @if (GetBoolean("Item.Area.EcomEnabled")) 3030 { 3031 if (!GeneralSettings.Header.Show) 3032 { 3033 <ul class="nav navbar-nav"> 3034 <li>&nbsp;&nbsp;&nbsp;</li> 3035 @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 3036 { 3037 <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> 3038 <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> 3039 } 3040 3041 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 3042 { 3043 <li class="dw-navbar-button"> 3044 <a href='Default.aspx?ID=@Pageview.Area.Item["OrdersPageId"]' data-hover="dropdown"> 3045 <nobr> 3046 <strong><i class="fa fa-user"></i></strong> 3047 </nobr> 3048 <span></span> 3049 </a> 3050 </li> 3051 <li class="dw-navbar-button"> 3052 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID" data-hover="dropdown"><i class="fa fa-sign-out"></i><span></span></a> 3053 </li> 3054 } 3055 3056 3057 </ul> 3058 } 3059 3060 if (GeneralSettings.Header.Mode != "solid") 3061 { 3062 <ul class="nav navbar-nav"> 3063 <li class="dropdown dropdown-aux animate-click dw-navbar-button" data-animate-in="animated bounceInUp" data-animate-out="animated fadeOutDown" style="z-index:500;"> 3064 <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown"><i class="fa fa-search"></i><span></span></a> 3065 <ul class="dropdown-menu dropdown-menu-user animate-wr"> 3066 <li id="dropdownForm"> 3067 <div class="dropdown-form"> 3068 <form class="form-light p-15" role="form" method="get" action="Default.aspx"> 3069 <input type="hidden" name="ID" value='@searchpage'> 3070 <div class="input-group remote"> 3071 <input type="text" class="form-control typeahead" name="q" placeholder="@searchplaceholder"> 3072 <span class="input-group-btn" style="top:-1px !important;"> 3073 <button class="btn btn-base" type="submit"><i class="fa fa-search"></i></button> 3074 </span> 3075 </div> 3076 </form> 3077 </div> 3078 </li> 3079 </ul> 3080 </li> 3081 </ul> 3082 } 3083 } 3084 </nav> 3085 </div> 3086 3087 @*@if (GetBoolean("Item.Area.EcomEnabled")) 3088 { 3089 if (GeneralSettings.Header.Mode == "solid" && GeneralSettings.Header.Show) 3090 { 3091 <div class="hidden-sm hidden-xs"> 3092 <div class="col-md-2 col-sm-2 col-xs-2 pull-@GeneralSettings.Navigation.InvertedPosition"> 3093 <form method="get" action="Default.aspx"> 3094 <input type="hidden" name="ID" value='@Pageview.Area.Item["ProductsPageId"]'> 3095 <div id="remote" class="input-group pull-@GeneralSettings.Navigation.InvertedPosition dw-top-search"> 3096 <input type="text" class="form-control typeahead" name="Search" tabindex="1" placeholder="@searchplaceholder"> 3097 <span class="input-group-btn" style="top:0px !important;"> 3098 <button class="btn btn-primary" type="submit"><i class="fa fa-search"></i></button> 3099 </span> 3100 </div> 3101 </form> 3102 </div> 3103 </div> 3104 } 3105 }*@ 3106 </div> 3107 } 3108 else 3109 { 3110 <!-- Using only mobile navigation --> 3111 <div class="pull-@GeneralSettings.Navigation.Position"> 3112 <ul class="nav navbar-nav"> 3113 <li class="dw-navbar-button" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body"> 3114 <a><i class="fa fa-bars fa-2x"></i><span></span></a> 3115 </li> 3116 </ul> 3117 </div> 3118 } 3119 </div> 3120 </div> 3121 3122 </div> 3123 3124 3125 </div> 3126 <div class="col-xs-12 mobileMenu hidden-lg"> 3127 <span class="buttonIconSearch pull-right "> 3128 <button class="btn btn-dw-primary searchFieldShow" type="submit"> 3129 <img src="/Files/Templates/Designs/Dwsimple/images/icons/search-white.png" class="img-center" alt=""> 3130 <span> 3131 @Translate("Search", "Search") 3132 </span> 3133 </button> 3134 </span> 3135 <!-- Small screen header --> 3136 <div class="hidden-lg"> 3137 <div class="pull-right hamb"> 3138 <button type="button" class="btn btn-sm btn-base" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body"> 3139 <i class="fa fa-bars"></i> 3140 <span> 3141 @Translate("Menu", "Menu") 3142 </span> 3143 </button> 3144 </div> 3145 <div class="pull-right"> 3146 @if(GetInteger("DwAreaFirstPageID") == 8398) 3147 { 3148 <a href="Default.aspx?ID=11424"><img alt="" src="/Files/Images/Ikoner/English.png" style="height:25px; width:50px"></a> 3149 } 3150 @if(GetInteger("DwAreaFirstPageID") == 11424) 3151 { 3152 <a href="Default.aspx?ID=8398"><img alt="" src="/Files/Images/Ikoner/Norwegian.png" style="height:25px; width:50px"></a> 3153 } 3154 </div> 3155 3156 <div class="hidden-xs hidden-sm hidden-md pull-left"> 3157 <h2 class="dw-header-sm-title">@GetGlobalValue("Global:Page.Top.Name")</h2> 3158 </div> 3159 3160 @if (GetBoolean("Item.Area.EcomEnabled")) 3161 { 3162 @*<div class="pull-right hidden-sm"> 3163 <ul class="top-menu"> 3164 <li class="hidden-xs"> 3165 <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> 3166 </li> 3167 </ul> 3168 </div>*@ 3169 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 3170 { 3171 <div class="hidden-xs hidden-sm pull-right "> 3172 <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> 3173 &nbsp; 3174 </div> 3175 <div class="hidden-xs pull-right userNameBox"> 3176 <a href='Default.aspx?ID=@Pageview.Area.Item["UserProfilePageId"]' class="btn btn-sm btn-base"> 3177 <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong> 3178 </a> 3179 &nbsp; 3180 </div> 3181 } 3182 3183 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 3184 { 3185 <div class="hidden-xs hidden-sm pull-right"> 3186 <a href='Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]' class="btn btn-sm btn-base"><i class="fa fa-sign-in"></i></a> 3187 &nbsp; 3188 </div> 3189 } 3190 } 3191 </div> 3192 <div class="clearfix"></div> 3193 </div> 3194 3195 3196 </div> 3197 <div class="clearfix"></div> 3198 </div> 3199 3200 </div> 3201 } 3202 3203 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.HeaderLayoutImage"))) 3204 { 3205 if (currentpageid != firstpageid) 3206 { 3207 var coverimage = GetString("Item.Area.HeaderLayoutImage"); 3208 3209 <div class="container-fluid dw-header-image"> 3210 <div class="row"> 3211 <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> 3212 </div> 3213 </div> 3214 } 3215 else if (GeneralSettings.Header.ShowFrontpageImage) 3216 { 3217 var coverimage = GetString("Item.Area.HeaderLayoutImage"); 3218 3219 <div class="container-fluid dw-header-image"> 3220 <div class="row"> 3221 <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> 3222 </div> 3223 </div> 3224 } 3225 } 3226 else if (GeneralSettings.Header.Mode != "solid") 3227 { 3228 if (currentpageid != firstpageid) 3229 { 3230 <div class="container-fluid dw-header-image"> 3231 <div class="row"> 3232 <section class="carousel carousel-1 slice fluid" style="height: 160px !important; background-color: transparent; background-size: cover !important;"></section> 3233 </div> 3234 </div> 3235 } 3236 } 3237 3238 </div> 3239 <div class="clearfix"></div> 3240 3241 3242 @if (GeneralSettings.Header.Mode == "solid" && GeneralSettings.Header.Show) 3243 { 3244 <div class="searchRight clearfix"> 3245 <div class="slideToggle col-md-12 col-sm-12"> 3246 <form method="get" action="Default.aspx"> 3247 <input type="hidden" name="ID" value='@searchpage'> 3248 <div id="remote" class="input-group top-search"> 3249 <div class="remoteR"> 3250 <input type="hidden" name="qurlencoded" id="qurlencoded" value=''> 3251 <input type="text" class="form-control typeahead" name="q" placeholder='@Translate("What are you searching for?")' data-encode=""> 3252 <span class="input-group-btn"> 3253 <button class="btn btn-primary " type="submit"> 3254 <i class="fa fa-angle-double-right"></i> 3255 </button> 3256 </span> 3257 </div> 3258 </div> 3259 </form> 3260 </div> 3261 </div> 3262 <div class="clearfix"></div> 3263 } 3264 </header> 3265 3266 3267 @{ 3268 var current = ""; 3269 var currentWhole = ""; 3270 } 3271 @foreach (var lang in GetLoop("Languages")) 3272 { 3273 if (lang.GetBoolean("IsCurrent")) 3274 { 3275 string input = lang.GetString("Culture"); 3276 int index = input.IndexOf("-"); 3277 if (index > 0) 3278 { 3279 current = input.Substring(0, index); 3280 } 3281 currentWhole = lang.GetString("Culture").ToLower(); 3282 } 3283 } 3284 </div> 3285 3286 @* MAIN CONTENT *@ 3287 3288 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 3289 3290 3291 @GetValue("Title(Full width page)") 3292 @GetValue("Description(Use this page for full width pages with no left navigation.)") 3293 3294 @{ 3295 string siteurl = GetGlobalValue("Global:Request.Url").ToString(); 3296 3297 string navtag = GetGlobalValue("Global:Page.NavigationTag").ToString(); 3298 3299 var request = HttpContext.Current.Request; 3300 3301 var customerCenterId = ""; // Pageview.Area.Item["CustomerCenterId"].ToString().Replace("Default.aspx?Id=", ""); 3302 3303 var hiddenXs = "hidden-xs"; 3304 if (GetGlobalValue("Global:Page.ID") == customerCenterId) 3305 { 3306 hiddenXs = ""; 3307 } 3308 } 3309 3310 <style> 3311 .product-details.left-col { 3312 display: none; 3313 } 3314 .product-details.right-col { 3315 width: 100%; 3316 } 3317 .product-details.right-col .row.product { 3318 margin-left: -15px; 3319 } 3320 </style> 3321 3322 3323 @if (GetBoolean("Item.Page.LayoutShowBreadcrumb")) 3324 { 3325 <div class="pg-opt pin white"> 3326 <div class="container"> 3327 <div class="row"> 3328 @if (!GetBoolean("Item.Page.LayoutHideLeftMenu")) 3329 { 3330 <div class="hidden col-md-3"> 3331 @if (GeneralSettings.Navigation.BreadcrumbMode != "light") 3332 { 3333 <div class="dw-breadcrumb-title">@GetGlobalValue("Global:Page.Top.Name")</div> 3334 } 3335 </div> 3336 } 3337 <div class="col-xs-12"> 3338 @GetValue("DwNavigation(breadcrumb)") 3339 </div> 3340 </div> 3341 </div> 3342 </div> 3343 } 3344 3345 <section class="slice white animate-hover-slide"> 3346 <div class="container"> 3347 <div class="row"> 3348 <div class="col-xs-12"> 3349 <hr> 3350 </div> 3351 @if (!GetBoolean("Item.Page.LayoutHideLeftMenu")) 3352 { 3353 <div class="@hiddenXs col-xs-12 col-sm-4 col-md-3 left-col @navtag"> 3354 <div class="widget affix-top"> @*data-spy="affix" data-offset-top="150" data-offset-bottom="300">*@ 3355 @GetValue("DwNavigation(leftnavigation)") 3356 @RenderSnippet("Facets") 3357 </div> 3358 <p>&nbsp;</p> 3359 </div> 3360 } 3361 @{ 3362 var attributeValue = "col-xs-12 col-sm-8 col-md-9 right-col " + navtag; 3363 3364 if (GetBoolean("Item.Page.LayoutHideLeftMenu")) 3365 { 3366 attributeValue = "col-xs-12"; 3367 } 3368 } 3369 @{ 3370 string listView = "list"; 3371 string productviewtype = "list"; 3372 if (Pageview.Device.ToString() == "Mobile") 3373 { 3374 listView = "box"; 3375 } 3376 else 3377 { 3378 3379 if (HttpContext.Current.Request.Cookies["productviewtype"] != null) 3380 { 3381 if (HttpContext.Current.Request.Cookies["productviewtype"].Value != null) 3382 { 3383 productviewtype = HttpContext.Current.Request.Cookies["productviewtype"].Value.ToString(); 3384 } 3385 } 3386 3387 listView = !String.IsNullOrEmpty(HttpContext.Current.Request["listView"]) ? HttpContext.Current.Request.QueryString.Get("listView") : productviewtype; 3388 } 3389 } 3390 @if (listView != "details") 3391 { 3392 <div class="@attributeValue"> 3393 <div id="maincontent">@GetValue("DwContent(maincontent)")</div> 3394 </div> 3395 } 3396 @if (listView == "details") 3397 { 3398 <div class="@attributeValue"> 3399 <div id="btob">@GetValue("DwContent(btob)")</div> 3400 </div> 3401 } 3402 3403 @if (GetBoolean("Item.Page.FacebookLikeButton")) 3404 { 3405 <div class="container"> 3406 <div class="col-xs-12"> 3407 <div class="row"> 3408 <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> 3409 </div> 3410 </div> 3411 </div> 3412 } 3413 </div> 3414 </div> 3415 </section> 3416 3417 @* FOOTER *@ 3418 3419 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 3420 3421 @using System 3422 @using System.Web 3423 @using System.Globalization 3424 @using Dynamicweb.Frontend.Devices 3425 @using System.Text.RegularExpressions 3426 @using Dynamicweb.Environment.Helpers 3427 @using Dynamicweb.Rendering 3428 3429 <footer class="footer"> 3430 @if (GetBoolean("Item.Area.FooterShowContactInfo")) 3431 { 3432 <div class="footer-section"> 3433 <div class="container"> 3434 <div class="row"> 3435 <div class="col-xs-12 col-md-4 links"> 3436 <div class="col"> 3437 <h3>@GetString("Item.Area.HeadingColumnOne")</h3> 3438 <ul> 3439 @foreach (LoopItem linksfooter in GetLoop("Item.Area.FooterLinks")) 3440 { 3441 var footertitle = linksfooter.GetString("Item.Area.FooterLinks.Title"); 3442 var footerlinks = linksfooter.GetString("Item.Area.FooterLinks.Link.Value"); 3443 3444 if (footerlinks != "") 3445 { 3446 <li> 3447 <a href="@footerlinks">@footertitle</a> 3448 </li> 3449 } 3450 } 3451 </ul> 3452 </div> 3453 </div> 3454 3455 <div class="col-xs-12 col-md-4 links"> 3456 <div class="col"> 3457 <h3>@GetString("Item.Area.HeadingColumnTwo")</h3> 3458 <ul> 3459 @foreach (LoopItem linksfooter in GetLoop("Item.Area.ServicesLinks")) 3460 { 3461 var footertitle = linksfooter.GetString("Item.Area.ServicesLinks.Title"); 3462 var footerlinks = linksfooter.GetString("Item.Area.ServicesLinks.Link.Value"); 3463 3464 if (footerlinks != "") 3465 { 3466 <li> 3467 <a href="@footerlinks">@footertitle</a> 3468 </li> 3469 } 3470 } 3471 </ul> 3472 </div> 3473 </div> 3474 3475 <div class="col-xs-12 col-md-4 socials"> 3476 <div class="col"> 3477 @if (GetBoolean("Item.Area.SocialLinksInFooter")) 3478 { 3479 string sicon = ""; 3480 string slink = ""; 3481 3482 <h3>@GetString("Item.Area.HeadingColumnThree")</h3> 3483 3484 3485 <p> 3486 @foreach (LoopItem socialitem in GetLoop("Item.Area.SocialIconsInTheFooter")) 3487 { 3488 sicon = socialitem.GetString("Item.Area.SocialIconsInTheFooter.Icon"); 3489 slink = socialitem.GetString("Item.Area.SocialIconsInTheFooter.Link"); 3490 3491 <a href="@slink"><i class="fa @sicon"></i></a> 3492 } 3493 </p> 3494 } 3495 </div> 3496 @if (GetBoolean("Item.Area.FooterNewsletterSignUp")) 3497 { 3498 string NavTag = GetGlobalValue("Global:Page.NavigationTag").ToString(); 3499 string CurrentPageName = GetGlobalValue("Global:Page.Name").ToString(); 3500 3501 if (NavTag != CurrentPageName) 3502 { 3503 int NewsletterInfoParagraphID = System.Convert.ToInt32(Pageview.Area.Item["NewsletterSignUpFormParagraph"].ToString()); 3504 3505 <div class="col"> 3506 <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> 3507 @RenderParagraphContent(NewsletterInfoParagraphID) 3508 </div> 3509 } 3510 } 3511 </div> 3512 3513 @if (GetBoolean("Item.Area.FooterShowSitemap")) 3514 { 3515 <div class="col-xs-12 col-md-4"> 3516 <div class="col"> 3517 @GetValue("DwNavigation(footersitemap)") 3518 </div> 3519 <div>&nbsp;</div> 3520 </div> 3521 } 3522 </div> 3523 </div> 3524 </div> 3525 } 3526 3527 @SnippetStart("StylesHead") 3528 footer .footer-badges { 3529 background-color: @GetString("Item.Area.BadgeListBackgroundColor.Color"); 3530 } 3531 footer .footer-menu { 3532 background-color: @GetString("Item.Area.AddressBarBackgroundColor.Color"); 3533 } 3534 @SnippetEnd("StylesHead") 3535 3536 @if (GetBoolean("Item.Area.BadgeList") && GetLoop("Item.Area.BadgeList").Count > 0) 3537 { 3538 string blImage = ""; 3539 string blLink = ""; 3540 string blTarget = ""; 3541 3542 <div class="footer-badges"> 3543 <div class="container"> 3544 <ul> 3545 @foreach (LoopItem badgelistitem in GetLoop("Item.Area.BadgeList")) 3546 { 3547 blImage = badgelistitem.GetString("Item.Area.BadgeList.Image"); 3548 blLink = badgelistitem.GetString("Item.Area.BadgeList.Link"); 3549 blTarget = badgelistitem.GetString("Item.Area.BadgeList.Target"); 3550 3551 <li> 3552 @if (!string.IsNullOrWhiteSpace(blLink)) 3553 { 3554 <a href="@blLink" target="@blTarget"><img src="@blImage" alt=""></a> 3555 } 3556 else 3557 { 3558 <img src="@blImage" alt=""> 3559 } 3560 </li> 3561 } 3562 </ul> 3563 </div> 3564 </div> 3565 } 3566 3567 3568 3569 <div class="footer-menu"> 3570 <div class="container"> 3571 @*<div class="footer-logo"> 3572 @{ 3573 var logofooter = GetString("Item.Area.FooterLogo"); 3574 string firstpageidFooter = GetString("DwAreaFirstActivePageID"); 3575 } 3576 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.FooterLogo"))) 3577 { 3578 <a href="/Default.aspx?ID=@firstpageidFooter" class="brand"> 3579 <img class="img-responsive" src="@logofooter" alt="Logo footer"> 3580 </a> 3581 } 3582 </div>*@ 3583 3584 <div class="footer-links"> 3585 @GetValue("Item.Area.FooterAddress") 3586 3587 @*@{ 3588 string footeremail = GetString("Item.Area.FooterEmail"); 3589 string footerphone = GetString("Item.Area.FooterPhone").Replace(" ", ""); 3590 } 3591 <p> 3592 @Translate("Phone", "Phone"): <a href="tel:@footerphone">@footerphone</a> 3593 @Translate("Email", "Email"): <a href="mailto:@footeremail" title="Email Us">@GetValue("Item.Area.FooterEmail")</a> 3594 </p>*@ 3595 </div> 3596 </div> 3597 </div> 3598 </footer> 3599 <!--[if IE]> 3600 <style> 3601 .widget.affix { width:21% !important; } 3602 </style> 3603 <![endif]--> 3604 @* ESSENTIALS *@ 3605 3606 <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"></script> 3607 <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script> 3608 <script src="//cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.20/jquery.fancybox.min.js"></script> 3609 3610 3611 <script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script> 3612 <script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.min.js"></script> 3613 <script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.4/js/bootstrap.min.js"></script> 3614 @*<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/js/bootstrap.min.js"></script>*@ 3615 3616 @* ASSETS *@ 3617 <script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-hover-dropdown/2.0.10/bootstrap-hover-dropdown.min.js"></script> 3618 <script src="//cdnjs.cloudflare.com/ajax/libs/spin.js/2.0.1/spin.min.js"></script> 3619 @*<script type="text/javascript" src="/Files/Templates/Designs/Dwsimple/js/typeahead.bundle.js"></script>*@ 3620 3621 @* SRIPTS FOR INDIVIDUAL PAGES, DEPENDING ON WHAT PLUG-INS ARE USED *@ 3622 <script src="//cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/js/jasny-bootstrap.min.js" type="text/javascript"></script> 3623 3624 <script src="//connect.facebook.net/en_US/sdk.js"></script> 3625 <script src="/Files/Templates/Designs/Dwsimple/js/typeahead.js"></script> 3626 <script src="/Files/Templates/Designs/Dwsimple/js/jquery.socialfeed.js"></script> 3627 <script src="/Files/Templates/Designs/Dwsimple/js/codebird.js"></script> 3628 <script src="/Files/Templates/Designs/Dwsimple/js/doT.min.js"></script> 3629 <script src="/Files/Templates/Designs/Dwsimple/js/moment.min.js"></script> 3630 3631 <script src="/Files/Templates/Designs/Dwsimple/js/owl.carousel.min.js"></script> 3632 <script src="/Files/Templates/Designs/Dwsimple/js/custom.js"></script> 3633 @*<script src="/Files/Templates/Designs/Dwsimple/js/filter.js"></script>*@ 3634 <script src="/Files/Templates/Designs/Dwsimple/js/GeneralMethods.js"></script> 3635 <script src="/Files/Templates/Designs/Dwsimple/js/cart.js"></script> 3636 <script src="/Files/Templates/Designs/Dwsimple/js/bootstrap-datetimepicker.js"></script> 3637 <script src="/Files/Templates/Designs/Dwsimple/js/jQueryValidation.js"></script> 3638 <script> 3639 3640 $("input.typeahead").on("change", function () { 3641 var qvalue = $(this).val().replace(/æ/g, "&aelig;").replace(/ø/g, "&oslash;").replace(/å/g, "&aring;").replace(/Æ/g, "&AElig;").replace(/Ø/g, "&Oslash;").replace(/Å/g, "&Aring;"); 3642 3643 $('input#qurlencoded').val(qvalue) 3644 }) 3645 3646 </script> 3647 <script type="text/html-template" id="OrderlineAjaxTemplate"> 3648 <tr> 3649 <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> 3650 <td> 3651 <a href="Obj.link"> 3652 Obj.name Obj.variantname 3653 </a> 3654 </td> 3655 <td class="text-center">Obj.quantity</td> 3656 <td class="text-right"> 3657 <nobr> 3658 Obj.totalprice 3659 </nobr> 3660 </td> 3661 </tr> 3662 </script> 3663 @* INITIALIZE SCROLLING NAVIGATION *@ 3664 @if (GeneralSettings.Navigation.IsAnimateNavigation) 3665 { 3666 <script type="text/javascript"> 3667 // Hide Header on on scroll down 3668 var didScroll; 3669 var lastScrollTop = 0; 3670 var delta = 5; 3671 var navbarHeight = $('header').outerHeight(); 3672 3673 $(window).scroll(function (event) { 3674 didScroll = true; 3675 }); 3676 3677 setInterval(function () { 3678 if (didScroll) { 3679 hasScrolled(); 3680 didScroll = false; 3681 } 3682 }, 250); 3683 3684 function hasScrolled() { 3685 var st = $(this).scrollTop(); 3686 var $megamenu = $('#topnavigationmegamenu > li.dropdown.ParentShow .dropdown-menu'), 3687 $search = $('.searchRight .slideToggle'), 3688 $isSearchOpen = ($search.is('.open') ? true : false); 3689 3690 // Make sure they scroll more than delta 3691 if (Math.abs(lastScrollTop - st) <= delta) 3692 return; 3693 3694 // If they scrolled down and are past the navbar, add class .nav-up. 3695 // This is necessary so you never see what is "behind" the navbar. 3696 if (st > lastScrollTop && st > navbarHeight) { 3697 // Scroll Down 3698 $('header').removeClass('nav-down').addClass('nav-up'); 3699 $megamenu.css('top', '0').fadeOut(); 3700 if ($isSearchOpen) $search.fadeOut(); 3701 } else { 3702 // Scroll Up 3703 if (st + $(window).height() < $(document).height()) { 3704 $('header').removeClass('nav-up').addClass('nav-down'); 3705 $megamenu.fadeIn().css('top', '107px'); 3706 if ($isSearchOpen) $search.fadeIn(); 3707 } 3708 } 3709 lastScrollTop = st; 3710 } 3711 </script> 3712 } 3713 3714 @* INITIALIZE FANCYBOX *@ 3715 <script type="text/javascript"> 3716 3717 if ($(".fancybox").length > 0) $(".fancybox") 3718 .fancybox({ 3719 padding: 0 3720 }); 3721 3722 $(document).ready(function () { 3723 MiniCartInit(@Pageview.Area.Item["JSONFeedForCart"], @Pageview.Area.Item["ProductsPageId"]); 3724 if (typeof ProductModal == 'undefined') { 3725 console.log('missing variable'); 3726 } 3727 else ProductModal.init(@Pageview.Area.Item["JSOPNFeedForModal"]); 3728 }); 3729 </script> 3730 3731 @RenderSnippet("JavaScriptBottom") 3732 3733 <script type="text/javascript"> 3734 $(document).ready(function () { 3735 $('.nav-stacked .offcanvas-menubtn').has('ul').addClass('innerMenuMobile'); 3736 $("<i class='fa fa-plus mobileMenuFix' onclick='toggleCheck(this)'></i>").insertAfter(".offcanvas-col>.nav-stacked>.offcanvas-menubtn.innerMenuMobile>a"); 3737 //$("<i class='fa fa-sort-desc mobileMenuFix' onclick='toggleCheck(this)'></i>").insertAfter(".offcanvas-col>.nav-stacked>.offcanvas-menubtn>.M1>.offcanvas-menubtn>a"); 3738 //$("<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"); 3739 $(".nav-stacked .0 i").remove(); 3740 }); 3741 3742 function toggleCheck(elem) { 3743 jQuery(elem).parent().children("ul").toggle(); 3744 jQuery(elem).toggleClass('fa-plus fa-minus') 3745 } 3746 3747 function toggleCheckTopNav() { 3748 $("#toggleTopNav").children("ul").toggle(); 3749 } 3750 3751 $('.langMenu li').each(function () { 3752 var group = $(this); 3753 var value = group.children("a"); 3754 var date = new Date(); 3755 var minutes = 1440; 3756 date.setTime(date.getTime() + (minutes * 60 * 1000)); 3757 $(value).on('click', function (e) { 3758 $.cookie('remember_lang', $(this).attr("data-code"), { expires: date, path: '/' });; 3759 3760 }); 3761 }); 3762 3763 function setLangAuto(filterlang) { 3764 var pathname = window.location.pathname; 3765 3766 switch (filterlang) { 3767 case "fr": 3768 pathname = $(".langSelected[data-code='fr']").attr('href'); 3769 if ($(".langSelected[data-code='fr']").hasClass("activeArea") || $.cookie('remember_lang') != null) { 3770 3771 break; 3772 } else { 3773 window.location.href = pathname; 3774 } 3775 3776 case "de": 3777 pathname = $(".langSelected[data-code='de']").attr('href'); 3778 if ($(".langSelected[data-code='de']").hasClass("activeArea") || $.cookie('remember_lang') != null) { 3779 3780 break; 3781 } else { 3782 window.location.href = pathname; 3783 } 3784 case "es": 3785 pathname = $(".langSelected[data-code='es']").attr('href'); 3786 if ($(".langSelected[data-code='es']").hasClass("activeArea") || $.cookie('remember_lang') != null) { 3787 3788 break; 3789 } else { 3790 window.location.href = pathname; 3791 } 3792 case "se": 3793 pathname = $(".langSelected[data-code='se']").attr('href'); 3794 if ($(".langSelected[data-code='se']").hasClass("activeArea") || $.cookie('remember_lang') != null) { 3795 3796 break; 3797 } else { 3798 window.location.href = pathname; 3799 } 3800 case "da": 3801 pathname = $(".langSelected[data-code='da']").attr('href'); 3802 if ($(".langSelected[data-code='da']").hasClass("activeArea") || $.cookie('remember_lang') != null) { 3803 3804 break; 3805 } else { 3806 window.location.href = pathname; 3807 } 3808 default: 3809 pathname = $(".langSelected[data-code='en']").attr('href'); 3810 if ($(".langSelected[data-code='en']").hasClass("activeArea") || $.cookie('remember_lang') != null) { 3811 3812 break; 3813 } else { 3814 window.location.href = pathname; 3815 } 3816 } 3817 } 3818 3819 jQuery(function ($) { 3820 if ($.cookie('remember_lang') != "@current" && $.cookie('remember_lang') != null) { 3821 var href; 3822 $(".langSelected").each(function () { 3823 if ($(this).data("code") == $.cookie('remember_lang')) { 3824 href = $(this).attr("href"); 3825 } 3826 }); 3827 window.location.href = href; 3828 } 3829 }); 3830 3831 3832 $('[data-toggle="dropdown"]').dropdown(); 3833 3834 </script> 3835 <script> 3836 $('.TitleWelcome').clone().prependTo('#MyProfileMenu'); 3837 $('.logOut').clone().appendTo('#MyProfileMenu .M1'); 3838 </script> 3839 @{ 3840 //var productsearch = @Pageview.Area.Item["SearchProductsPage"]; 3841 string productpageidsearch = GetString("Item.Area.SearchAllProductsPage"); 3842 string showedproducts = GetString("Item.Area.ShowedProducts"); 3843 var searchproductitem = Pageview.Area.Item["LinkToSearchProductPageItem"]; 3844 string ItemPageIDproducts = searchproductitem.ToString().TrimStart('/'); 3845 string seoproductsearch = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(ItemPageIDproducts); 3846 string quotecontext = Pageview.Area.Item["QuoteContext"].ToString(); 3847 string cartpage = Pageview.Area.Item["QuoteCart"].ToString(); 3848 } 3849 <script> 3850 var searchproducts = new Bloodhound({ 3851 datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'), 3852 queryTokenizer: Bloodhound.tokenizers.whitespace, 3853 remote: { 3854 url: '/Default.aspx?ID=@seoproductsearch&q=%QUERY', 3855 wildcard: '%QUERY' 3856 3857 }, 3858 3859 }); 3860 3861 searchproducts.initialize(); 3862 3863 $('#text-input').bind('typeahead:render', function () { 3864 $('.tt-suggestion').removeClass('tt-selectable'); 3865 }); 3866 3867 $('#remoteproduct .form-control').typeahead( 3868 { 3869 hint: true, 3870 highlight: false, 3871 minLength: 2 3872 }, 3873 { 3874 limit: 9999, 3875 name: 'name', 3876 display: 'name', 3877 source: searchproducts, 3878 templates: { 3879 empty: '<div class="search-header clearfix"><h4 class="product-title pull-left">@Translate("Ingen produkter fundet")</h4></div>', //optional 3880 suggestion: function (el) { 3881 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>'; 3882 } 3883 } 3884 } 3885 ); 3886 3887 // Quickly Add to quote 3888 function QuickAddToQuote(product, elm) { 3889 var url = "@Dynamicweb.Context.Current.Request.RawUrl&CartCmd=Add&ProductID=" + product + "&OrderContext=@quotecontext"; 3890 var allButtons = $('div.QuickAdd'); 3891 var spinner = elm.find($('i.fa-plus')); 3892 3893 spinner.removeClass('fa-plus'); 3894 spinner.addClass('fa-spinner fa-pulse'); 3895 elm.addClass('reducedOpacity'); 3896 elm.attr('disabled', 'disabled'); 3897 allButtons.addClass('reducedOpacity'); 3898 allButtons.attr('disabled', 'disabled'); 3899 document.location.href = url; 3900 //$.ajax({ 3901 // type: "GET", 3902 // url: url, 3903 // success: function () { 3904 // update(); 3905 // } 3906 //}); 3907 } 3908 </script> 3909 </div> 3910 @if (!string.IsNullOrWhiteSpace(GetString("DW_extranet_error_uk"))) 3911 { 3912 <script> 3913 $('#login').modal('show').addClass("in").attr("aria-hidden", "false").css({ 3914 "display": "block", 3915 "padding-left": "17px" 3916 }); 3917 </script> 3918 } 3919 </body> 3920 </html>