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