Error executing template "Designs/Eldorado/_parsed/catalogue.parsed.cshtml"
System.IO.IOException: The process cannot access the file 'D:\dynamicweb.net\Solutions\eldorado.LIVE\Files\Templates\Designs\Dwsimple\css\DWGlobalStylesSite1_auto.css' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
   at Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(String value, String path, Boolean appendToFile, Encoding encoding)
   at CompiledRazorTemplates.Dynamic.RazorEngine_d4676930a4f94ab78c4fa047832eb250.Execute() in D:\dynamicweb.net\Solutions\eldorado.LIVE\Files\Templates\Designs\Eldorado\_parsed\catalogue.parsed.cshtml:line 2065
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

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