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