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