Error executing template "Designs/Dwsimple/_parsed/fullwidth.parsed.cshtml"
System.IO.IOException: The process cannot access the file 'D:\dynamicweb.net\Solutions\interspiro.cloud.dynamicweb-cms.com\Files\Templates\Designs\Dwsimple\css\DWGlobalStylesSite25_auto.css' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
   at Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(String value, String path, Boolean appendToFile, Encoding encoding)
   at CompiledRazorTemplates.Dynamic.RazorEngine_25532345b16545538c1c68203319cab4.Execute() in D:\dynamicweb.net\Solutions\interspiro.cloud.dynamicweb-cms.com\Files\Templates\Designs\Dwsimple\_parsed\fullwidth.parsed.cshtml:line 2581
   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.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   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 @using Dynamicweb.Frontend.Devices 8 @using Dynamicweb.Extensibility 9 @using Dynamicweb.Content 10 @using Dynamicweb.Security.UserManagement; 11 @using Dynamicweb.Security.UserManagement.Common.CustomFields; 12 @using Dynamicweb 13 @using System.Linq 14 @using System.IO 15 @using Dynamicweb.Rendering; 16 @using Dynamicweb.Ecommerce 17 @using User = Dynamicweb.Security.UserManagement.User 18 @using System.Text.RegularExpressions 19 @using System.Web 20 21 22 @functions{ 23 public class WrapMethods 24 { 25 //Gets the contrasting color 26 public static string getContrastYIQ(string hexcolor) 27 { 28 if (hexcolor != "") 29 { 30 hexcolor = Regex.Replace(hexcolor, "[^0-9a-zA-Z]+", ""); 31 32 int r = Convert.ToByte(hexcolor.Substring(0, 2), 16); 33 int g = Convert.ToByte(hexcolor.Substring(2, 2), 16); 34 int b = Convert.ToByte(hexcolor.Substring(4, 2), 16); 35 int yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000; 36 37 if (yiq >= 128) 38 { 39 return "black"; 40 } 41 else 42 { 43 return "white"; 44 } 45 } 46 else 47 { 48 return "black"; 49 } 50 } 51 52 53 //Truncate text 54 public static string Truncate (string value, int count, bool strip=true) 55 { 56 if (strip == true){ 57 value = StripHtmlTagByCharArray(value); 58 } 59 60 if (value.Length > count) 61 { 62 value = value.Substring(0, count - 1) + "..."; 63 } 64 65 return value; 66 } 67 68 69 //Strip text from HTML 70 public static string StripHtmlTagByCharArray(string htmlString) 71 { 72 char[] array = new char[htmlString.Length]; 73 int arrayIndex = 0; 74 bool inside = false; 75 76 for (int i = 0; i < htmlString.Length; i++) 77 { 78 char let = htmlString[i]; 79 if (let == '<') 80 { 81 inside = true; 82 continue; 83 } 84 if (let == '>') 85 { 86 inside = false; 87 continue; 88 } 89 if (!inside) 90 { 91 array[arrayIndex] = let; 92 arrayIndex++; 93 } 94 } 95 return new string(array, 0, arrayIndex); 96 } 97 98 //Make the correct count of columns 99 public static string ColumnMaker(int Col, string ScreenSize) 100 { 101 string Columns = ""; 102 103 switch (Col) 104 { 105 case 1: 106 Columns = "col-"+ScreenSize+"-12"; 107 break; 108 109 case 2: 110 Columns = "col-"+ScreenSize+"-6"; 111 break; 112 113 case 3: 114 Columns = "col-"+ScreenSize+"-4"; 115 break; 116 117 case 4: 118 Columns = "col-"+ScreenSize+"-3"; 119 break; 120 121 default: 122 Columns = "col-"+ScreenSize+"-3"; 123 break; 124 } 125 126 return Columns; 127 } 128 129 130 private string Custom(string firstoption, string secondoption) 131 { 132 if (firstoption == "custom") 133 { 134 return secondoption; 135 } 136 else 137 { 138 return firstoption; 139 } 140 } 141 } 142 } 143 144 145 146 147 148 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 149 150 @helper MiniCart() 151 { 152 <div class="dropdown-cart"> 153 <div id="full-cart"> 154 <div class="col-md-12 col-sm-12 col-xs-12"> 155 <div class="row" id="minicart-content"> 156 <div class="cart-items"> 157 @Translate("You have", "You have") <span id="mincart-total-items"></span> @Translate("items in your cart", "items in your cart") 158 </div> 159 <div class="clearfix cart-items"> 160 161 <div class=""> 162 <button class="btn btn-xs btn-secondary pull-left" onclick="EmptyCart();">@Translate("Empty cart", "Empty cart")</button> 163 </div> 164 <div class=""> 165 @{ 166 var cartid = GetValue("DwAreaCartPageID"); 167 } 168 169 <a href="Default.aspx?ID=@cartid" class="btn btn-xs btn-primary pull-right">@Translate("Proceed to checkout", "Proceed to checkout")</a> 170 <span class="clearfix"></span> 171 </div> 172 </div> 173 174 175 176 177 178 179 <table class="table table-cart"> 180 181 <thead> 182 <tr> 183 <th></th> 184 <th>@Translate("Product", "Product")</th> 185 <th class="text-center">@Translate("Qty", "Qty")</th> 186 <th class="text-right">@Translate("Total", "Total")</th> 187 </tr> 188 </thead> 189 <tbody> 190 191 @* Orderlines are rendered from the Ajax template *@ 192 193 </tbody> 194 <tfoot> 195 @*<tr> 196 <td class="text-center"><i class="fa fa-credit-card"></i></td> 197 <td id="minicart-payment"></td> 198 <td class="text-center"></td> 199 <td class="text-right" id="minicart-paymentfee"></td> 200 </tr> 201 <tr> 202 <td class="text-center"><i class="fa fa-truck"></i></td> 203 <td id="minicart-shipping"></td> 204 <td class="text-center"></td> 205 <td class="text-right" id="minicart-shippingfee"></td> 206 </tr>*@ 207 208 <tr id="hideDiscount"> 209 <td></td> 210 <td>@Translate("Discount", "Discount")</td> 211 <td class="text-center"></td> 212 <td class="text-right" id="minicart-discount"></td> 213 </tr> 214 215 <tr id="hideTieredDiscount"> 216 <td></td> 217 <td>@Translate("Invoice discount", "Invoice discount")</td> 218 <td class="text-center"></td> 219 <td class="text-right" id="minicart-tiered-discount"></td> 220 </tr> 221 222 <tr> 223 <td></td> 224 <td><strong>@Translate("Total", "Total")</strong></td> 225 <td class="text-center" id="minicart-total"></td> 226 <td class="text-right" id="minicart-totalprice"></td> 227 </tr> 228 229 </tfoot> 230 </table> 231 </div> 232 </div> 233 234 </div> 235 <span class="cart-items" id="empty-cart">@Translate("Your shopping cart is empty", "Your shopping cart is empty")</span> 236 </div> 237 } 238 @{ 239 240 var request = HttpContext.Current.Request; 241 string prodID = request["productid"]; 242 List<Dynamicweb.Content.Page> 243 languages = new List<Dynamicweb.Content.Page> 244 (); 245 if (Pageview.Area.IsMaster) 246 { 247 languages.Add(Pageview.Page); 248 if (Pageview.Page.Languages != null) 249 { 250 foreach (var language in Pageview.Page.Languages) 251 { 252 languages.Add(language); 253 } 254 } 255 } 256 else 257 { 258 languages.Add(Pageview.Page.MasterPage); 259 if (Pageview.Page.MasterPage != null) 260 { 261 if (Pageview.Page.MasterPage.Languages != null) 262 { 263 foreach (var language in Pageview.Page.MasterPage.Languages) 264 { 265 languages.Add(language); 266 } 267 } 268 } 269 } 270 string siteLanguage = Pageview.Area.CultureInfo.Name; 271 Uri url = Dynamicweb.Context.Current.Request.Url; 272 string hostName = url.Host; // domain.com/da-dk or domain.com/en-us 273 if (siteLanguage.Contains("-")) 274 { 275 siteLanguage = siteLanguage.Split('-')[0]; 276 } 277 } 278 279 <!DOCTYPE html> 280 <html lang="@siteLanguage"> 281 282 <head> 283 <meta charset="utf-8"> 284 <title>@GetValue("Title")</title> 285 @GetValue("MetaTags") 286 @GetValue("CopyRightNotice") 287 288 289 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> 290 <meta name="robots" content="index, follow"> 291 @if (siteLanguage == "en") 292 { 293 <link rel="sitemap" type="application/xml" title="Sitemap" href="/files/files/en/sitemap.xml"> 294 } 295 else if (siteLanguage == "de") 296 { 297 <link rel="sitemap" type="application/xml" title="Sitemap" href="/files/files/de/sitemap.xml"> 298 } 299 else if (siteLanguage == "sv") 300 { 301 <link rel="sitemap" type="application/xml" title="Sitemap" href="/files/files/se/sitemap.xml"> 302 } 303 @{ 304 string MetaKeywords = GetString("Meta.Keywords"); 305 } 306 @if (string.IsNullOrWhiteSpace(prodID)) 307 { 308 string MetaDescription = GetString("Meta.Description"); 309 310 } 311 else 312 { 313 @RenderSnippet("MetaDescription") 314 } 315 316 @{ 317 var alreadyWrittenTwoletterIsos = new List<string>(); 318 @* Languages meta data *@ 319 foreach (var language in languages) 320 { 321 hostName = url.Host; 322 if (language?.Area != null) 323 { 324 if (language.Area?.MasterArea != null && !string.IsNullOrEmpty(language.Area.MasterArea.DomainLock)) 325 { 326 hostName = language.Area.MasterArea.DomainLock; //dk.domain.com or dk-domain.dk 327 } 328 if (language != null && language.Published && language.Area.Active && language.Area.Published) 329 { 330 if (!string.IsNullOrEmpty(language.Area.DomainLock)) 331 { 332 hostName = language.Area.DomainLock; //dk.domain.com or dk-domain.dk 333 } 334 string querystring = $"Default.aspx?ID={language.ID}"; 335 if (!string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.QueryString["GroupID"])) 336 { 337 querystring += $"&GroupID={Dynamicweb.Context.Current.Request.QueryString["GroupID"]}"; 338 } 339 if (!string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.QueryString["ProductID"])) 340 { 341 querystring += $"&ProductID={Dynamicweb.Context.Current.Request.QueryString["ProductID"]}"; 342 } 343 if (!string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.QueryString["VariantID"])) 344 { 345 querystring += $"&VariantID={Dynamicweb.Context.Current.Request.QueryString["VariantID"]}"; 346 } 347 string friendlyUrl = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(querystring); 348 if (language.Area.RedirectFirstPage && language.ParentPageId == 0 && language.Sort == 1) 349 { 350 friendlyUrl = "/"; 351 } 352 string href = $"{url.Scheme}://{hostName}{friendlyUrl}"; 353 if (!alreadyWrittenTwoletterIsos.Contains(language.Area.CultureInfo.Name)) 354 { 355 <link rel="alternate" hreflang="@language.Area.CultureInfo.Name.ToLower()" href="@href"> 356 } 357 358 } 359 } 360 } 361 362 } 363 364 365 366 <!-- Facebook Admin --> 367 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.FacebookCommendAdmin"))) 368 { 369 string fbadmin = GetString("Item.Area.FacebookCommendAdmin"); 370 <meta property="fb:admins" content="@fbadmin"> 371 } 372 373 <!-- Essential styles --> 374 <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" type="text/css"> 375 <link rel="stylesheet" href="/Files/Templates/Designs/Dwsimple/css/font-awesome.min.css" type="text/css"> 376 <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css" media="screen"> 377 <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/flag-icon-css/2.5.0/css/flag-icon.min.css" type="text/css"> 378 379 <!-- Mobile menu styles --> 380 <link href="//cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/css/jasny-bootstrap.min.css" rel="stylesheet" type="text/css" media="screen"> 381 382 <!-- Favicon --> 383 @{ 384 var favicon = @GetString("Item.Area.Favicon"); 385 } 386 <link href="@favicon" rel="icon" type="image/png"> 387 388 <!-- Variables --> 389 @{ 390 391 var attrValue = ""; 392 string currentpageid = GetString("DwPageID"); 393 string firstpageid = GetString("DwAreaFirstActivePageID"); 394 string logoutid = GetString("Item.Area.LogOutId"); 395 string searchplaceholder = Translate("Search products", "Search products"); 396 string searchplaceholderAll = Translate("What are you searching for?", "What are you searching for?"); 397 string newsletterid = GetString("Item.Area.NewsletterSignUpFormParagrahId"); 398 var cartid = GetValue("DwAreaCartPageID"); 399 var searchpage = GetString("Item.Area.ShowSearchPage"); 400 int cartPageId = GetPageIdByNavigationTag("CartPage"); 401 string miniCartFeedPageId = GetString("Item.Area.JSONFeedForCart"); 402 string ProductPageId = GetString("Item.Area.ProductPageId"); 403 string ImpersonationPage = GetString("Item.Area.ImpersonationPage"); 404 DateTime areaUpdated = DateTime.Now; 405 string cssPath = HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.min.css"); 406 DateTime lastWriteTime = System.IO.File.GetLastWriteTime(cssPath); 407 bool writeCss = false; 408 string css = String.Empty; 409 string GTM_ID = ""; 410 if (!string.IsNullOrWhiteSpace(GetString("Item.Area.GTM_ID"))) 411 { 412 GTM_ID = GetString("Item.Area.GTM_ID"); 413 414 } 415 416 417 if (areaUpdated > lastWriteTime.AddMinutes(1)) 418 { 419 writeCss = true; 420 } 421 422 string downloadLink = GetString("Item.Area.DowloadsLink"); 423 string pressLink = GetString("Item.Area.PressLink"); 424 string landingPageLink = GetString("Item.Area.LandingPagesLink.Value"); 425 string landingPageText = GetString("Item.Area.LandingPagesText.Value"); 426 string myProductsPage = GetString("Item.Area.MyProductsPage"); 427 string favoritesList = GetString("Item.Area.FavoritePage"); 428 string eLearninglink = GetString("Item.Area.ELearningLink"); 429 var deviceType = Dynamicweb.Frontend.PageView.Current().Device.ToString(); 430 var userId = Dynamicweb.Frontend.PageView.Current().User != null ? Dynamicweb.Frontend.PageView.Current().User.ID : 0; 431 432 if (userId > 0) 433 { 434 var defaultFavList = Dynamicweb.Ecommerce.CustomerCenter.CustomerProductList.GetDefaultList(userId); 435 var defaultFavListId = defaultFavList != null ? defaultFavList.ListId : 0; 436 437 if (defaultFavListId > 0) 438 { 439 myProductsPage = $"{favoritesList}&ListID={defaultFavListId}"; 440 } 441 else 442 { 443 myProductsPage = $"{favoritesList}"; 444 } 445 } 446 447 HttpCookie cookieOptInLevel = HttpContext.Current.Request.Cookies["Dynamicweb.CookieOptInLevel"]; 448 int optInLevel = 0; 449 if (cookieOptInLevel != null) 450 { 451 optInLevel = Int32.Parse(cookieOptInLevel.Value); 452 } 453 454 } 455 456 <!-- Value defining the cookie consent choice of the user. 0 is absolute minimum. 2 is all. Value used in custom.js. --> 457 <script> 458 const optInLevel = @optInLevel; 459 </script> 460 <script> 461 window.dataLayer = window.dataLayer || []; 462 </script> 463 <!-- Google Tag Manager --> 464 <script> 465 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 466 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 467 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 468 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 469 })(window, document, 'script', 'dataLayer', '@(GTM_ID)'); 470 471 function gtag() { dataLayer.push(arguments); } 472 </script> 473 474 <!-- Google tag (gtag.js) --> 475 <script async="" src="https://www.googletagmanager.com/gtag/js?id=G-S9CZK5PR6C"></script> 476 <script> 477 478 function gtag(){dataLayer.push(arguments);} 479 gtag('js', new Date()); 480 481 gtag('config', 'G-S9CZK5PR6C'); 482 </script> 483 484 <!-- End Google Tag Manager --> 485 <!--FONT SETTINGS--> 486 @{ 487 488 } 489 @functions{ 490 public class FontSettings 491 { 492 public class Logo 493 { 494 public static string FontFamily { get; set; } 495 public static string FontSize { get; set; } 496 public static string FontWeight { get; set; } 497 public static string Color { get; set; } 498 public static string LineHeight { get; set; } 499 public static string Casing { get; set; } 500 public static string LetterSpacing { get; set; } 501 } 502 503 public class Slogan 504 { 505 public static string FontFamily { get; set; } 506 public static string FontSize { get; set; } 507 public static string FontWeight { get; set; } 508 public static string Color { get; set; } 509 public static string LineHeight { get; set; } 510 public static string Casing { get; set; } 511 public static string LetterSpacing { get; set; } 512 } 513 514 public class H1 515 { 516 public static string FontFamily { get; set; } 517 public static string FontSize { get; set; } 518 public static string FontWeight { get; set; } 519 public static string Color { get; set; } 520 public static string LineHeight { get; set; } 521 public static string Casing { get; set; } 522 public static string LetterSpacing { get; set; } 523 } 524 525 public class H2 526 { 527 public static string FontFamily { get; set; } 528 public static string FontSize { get; set; } 529 public static string FontWeight { get; set; } 530 public static string Color { get; set; } 531 public static string LineHeight { get; set; } 532 public static string Casing { get; set; } 533 public static string LetterSpacing { get; set; } 534 } 535 public class H3 536 { 537 public static string FontFamily { get; set; } 538 public static string FontSize { get; set; } 539 public static string FontWeight { get; set; } 540 public static string Color { get; set; } 541 public static string LineHeight { get; set; } 542 public static string Casing { get; set; } 543 public static string LetterSpacing { get; set; } 544 } 545 public class H4 546 { 547 public static string FontFamily { get; set; } 548 public static string FontSize { get; set; } 549 public static string FontWeight { get; set; } 550 public static string Color { get; set; } 551 public static string LineHeight { get; set; } 552 public static string Casing { get; set; } 553 public static string LetterSpacing { get; set; } 554 } 555 public class Body 556 { 557 public static string FontFamily { get; set; } 558 public static string FontSize { get; set; } 559 public static string FontWeight { get; set; } 560 public static string Color { get; set; } 561 public static string LineHeight { get; set; } 562 public static string Casing { get; set; } 563 public static string LetterSpacing { get; set; } 564 } 565 } 566 567 private void InitFontSettings() 568 { 569 //LOGO 570 FontSettings.Logo.FontFamily = CustomFont(GetString("Item.Area.LogoFont.Font"), GetString("Item.Area.LogoFont.CustomFont")); 571 FontSettings.Logo.FontSize = GetString("Item.Area.LogoFont.Size") + "px"; 572 FontSettings.Logo.FontWeight = CheckExistence(GetString("Item.Area.LogoFont.Weight"), "normal"); 573 FontSettings.Logo.LineHeight = CheckExistence(GetString("Item.Area.LogoFont.LineHeight"), "1"); 574 FontSettings.Logo.LetterSpacing = GetString("Item.Area.LogoFont.LetterSpacing") + "px"; 575 FontSettings.Logo.Casing = GetString("Item.Area.LogoFont.Casing"); 576 FontSettings.Logo.Color = GetString("Item.Area.LogoFont.Color.Color"); 577 578 579 //SLOGAN 580 FontSettings.Slogan.FontFamily = CustomFont(GetString("Item.Area.LogoSloganFont.Font"), GetString("Item.Area.LogoSloganFont.CustomFont")); 581 FontSettings.Slogan.FontSize = GetString("Item.Area.LogoSloganFont.Size") + "px"; 582 FontSettings.Slogan.FontWeight = CheckExistence(GetString("Item.Area.LogoSloganFont.Weight"), "normal"); 583 FontSettings.Slogan.LineHeight = CheckExistence(GetString("Item.Area.LogoSloganFont.LineHeight"), "1"); 584 FontSettings.Slogan.LetterSpacing = GetString("Item.Area.LogoSloganFont.LetterSpacing") + "px"; 585 FontSettings.Slogan.Casing = GetString("Item.Area.LogoSloganFont.Casing"); 586 FontSettings.Slogan.Color = GetString("Item.Area.LogoSloganFont.Color.Color"); 587 588 589 //HEADINGS 590 FontSettings.H1.FontFamily = CustomFont(GetString("Item.Area.HeadingsH1.Font"), GetString("Item.Area.HeadingsH1.CustomFont")); 591 FontSettings.H1.FontSize = GetString("Item.Area.HeadingsH1.Size") + "px"; 592 FontSettings.H1.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH1.Weight"), "normal"); 593 FontSettings.H1.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH1.LineHeight"), "1"); 594 FontSettings.H1.LetterSpacing = GetString("Item.Area.HeadingsH1.LetterSpacing") + "px"; 595 FontSettings.H1.Casing = GetString("Item.Area.HeadingsH1.Casing"); 596 FontSettings.H1.Color = GetString("Item.Area.HeadingsH1.Color.Color"); 597 598 FontSettings.H2.FontFamily = CustomFont(GetString("Item.Area.HeadingsH2.Font"), GetString("Item.Area.HeadingsH2.CustomFont")); 599 FontSettings.H2.FontSize = GetString("Item.Area.HeadingsH2.Size") + "px"; 600 FontSettings.H2.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH2.Weight"), "normal"); 601 FontSettings.H2.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH2.LineHeight"), "1"); 602 FontSettings.H2.LetterSpacing = GetString("Item.Area.HeadingsH2.LetterSpacing") + "px"; 603 FontSettings.H2.Casing = GetString("Item.Area.HeadingsH2.Casing"); 604 FontSettings.H2.Color = GetString("Item.Area.HeadingsH2.Color.Color"); 605 606 FontSettings.H3.FontFamily = CustomFont(GetString("Item.Area.HeadingsH3.Font"), GetString("Item.Area.HeadingsH3.CustomFont")); 607 FontSettings.H3.FontSize = GetString("Item.Area.HeadingsH3.Size") + "px"; 608 FontSettings.H3.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH3.Weight"), "normal"); 609 FontSettings.H3.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH3.LineHeight"), "1"); 610 FontSettings.H3.LetterSpacing = GetString("Item.Area.HeadingsH3.LetterSpacing") + "px"; 611 FontSettings.H3.Casing = GetString("Item.Area.HeadingsH3.Casing"); 612 FontSettings.H3.Color = GetString("Item.Area.HeadingsH3.Color.Color"); 613 614 FontSettings.H4.FontFamily = CustomFont(GetString("Item.Area.HeadingsH4.Font"), GetString("Item.Area.HeadingsH4.CustomFont")); 615 FontSettings.H4.FontSize = GetString("Item.Area.HeadingsH4.Size") + "px"; 616 FontSettings.H4.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH4.Weight"), "normal"); 617 FontSettings.H4.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH4.LineHeight"), "1"); 618 FontSettings.H4.LetterSpacing = GetString("Item.Area.HeadingsH4.LetterSpacing") + "px"; 619 FontSettings.H4.Casing = GetString("Item.Area.HeadingsH4.Casing"); 620 FontSettings.H4.Color = GetString("Item.Area.HeadingsH4.Color.Color"); 621 622 623 //BODY 624 FontSettings.Body.FontFamily = CustomFont(GetString("Item.Area.BodyFont.Font"), GetString("Item.Area.BodyFont.CustomFont")); 625 FontSettings.Body.FontSize = GetString("Item.Area.BodyFont.Size") + "px"; 626 FontSettings.Body.FontWeight = CheckExistence(GetString("Item.Area.BodyFont.Weight"), "normal"); 627 FontSettings.Body.LineHeight = CheckExistence(GetString("Item.Area.BodyFont.LineHeight"), "1"); 628 FontSettings.Body.LetterSpacing = GetString("Item.Area.BodyFont.LetterSpacing") + "px"; 629 FontSettings.Body.Casing = GetString("Item.Area.BodyFont.Casing"); 630 FontSettings.Body.Color = GetString("Item.Area.BodyFont.Color.Color"); 631 632 633 gfonts.Add(FontSettings.Logo.FontFamily, ""); 634 635 if (!gfonts.ContainsKey(FontSettings.Slogan.FontFamily)) 636 { 637 gfonts.Add(FontSettings.Slogan.FontFamily, ""); 638 } 639 if (!gfonts.ContainsKey(FontSettings.H1.FontFamily)) 640 { 641 gfonts.Add(FontSettings.H1.FontFamily, ""); 642 } 643 if (!gfonts.ContainsKey(FontSettings.H2.FontFamily)) 644 { 645 gfonts.Add(FontSettings.H2.FontFamily, ""); 646 } 647 if (!gfonts.ContainsKey(FontSettings.H3.FontFamily)) 648 { 649 gfonts.Add(FontSettings.H3.FontFamily, ""); 650 } 651 if (!gfonts.ContainsKey(FontSettings.H4.FontFamily)) 652 { 653 gfonts.Add(FontSettings.H4.FontFamily, ""); 654 } 655 if (!gfonts.ContainsKey(FontSettings.Body.FontFamily)) 656 { 657 gfonts.Add(FontSettings.Body.FontFamily, ""); 658 } 659 660 } 661 662 private string CustomFont(string firstfont, string secondfont) 663 { 664 if (firstfont == "custom") 665 { 666 return secondfont; 667 } 668 else 669 { 670 return firstfont; 671 } 672 } 673 674 private string CheckExistence(string stringitem, string defaultvalue) 675 { 676 if (!string.IsNullOrWhiteSpace(stringitem)) 677 { 678 return stringitem; 679 } 680 else 681 { 682 return defaultvalue; 683 } 684 } 685 686 private System.Collections.Generic.Dictionary<string, object> 687 gfonts = new System.Collections.Generic.Dictionary<string, object> 688 (); 689 } 690 691 @{ 692 InitFontSettings(); 693 } 694 695 @helper GoogleFonts() 696 { 697 if (gfonts != null) 698 { 699 foreach (var item in gfonts) 700 { 701 string fontName = item.Key.Replace(" ", "+"); 702 if (fontName.Contains("MetaPro-Norm") || fontName.Contains("MetaPro-Black")) 703 { 704 <link rel="stylesheet" href="/Files/Templates/Designs/Dwsimple/css/font.css" type="text/css"> 705 } 706 else 707 { 708 <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=@item.Key:100,200,300,400,500,600,700,800,900"> 709 } 710 711 } 712 } 713 } 714 715 @functions{ 716 public string FontStylesCSS() 717 { 718 string CssString = @" 719 .dw-logotext { 720 font-family: " + FontSettings.Logo.FontFamily + @", sans-serif; 721 font-size: " + FontSettings.Logo.FontSize + @"; 722 font-weight: " + FontSettings.Logo.FontWeight + @"; 723 line-height: " + FontSettings.Logo.LineHeight + @" !important; 724 letter-spacing: " + FontSettings.Logo.LetterSpacing + @"; 725 text-transform: " + FontSettings.Logo.Casing + @"; 726 color: " + FontSettings.Logo.Color + @"; 727 } 728 729 .dw-slogantext { 730 font-family: " + FontSettings.Slogan.FontFamily + @", sans-serif; 731 font-size: " + FontSettings.Slogan.FontSize + @"; 732 font-weight: " + FontSettings.Slogan.FontWeight + @"; 733 line-height: " + FontSettings.Slogan.LineHeight + @" !important; 734 letter-spacing: " + FontSettings.Slogan.LetterSpacing + @"; 735 text-transform: " + FontSettings.Slogan.Casing + @"; 736 color: " + FontSettings.Slogan.Color + @"; 737 } 738 739 h1 { 740 font-family: " + FontSettings.H1.FontFamily + @", sans-serif !important; 741 font-size: " + FontSettings.H1.FontSize + @"; 742 color: " + FontSettings.H1.Color + @"; 743 line-height: " + FontSettings.H1.LineHeight + @" !important; 744 text-transform: " + FontSettings.H1.Casing + @"; 745 font-weight: " + FontSettings.H1.FontWeight + @"; 746 letter-spacing: " + FontSettings.H1.LetterSpacing + @" !important; 747 } 748 749 h3 { 750 font-family: " + FontSettings.H3.FontFamily + @", sans-serif !important; 751 font-size: " + FontSettings.H3.FontSize + @"; 752 color: " + FontSettings.H3.Color + @"; 753 line-height: " + FontSettings.H3.LineHeight + @" !important; 754 text-transform: " + FontSettings.H3.Casing + @"; 755 font-weight: " + FontSettings.H3.FontWeight + @"; 756 letter-spacing: " + FontSettings.H3.LetterSpacing + @" !important; 757 } 758 h4 { 759 font-family: " + FontSettings.H4.FontFamily + @", sans-serif !important; 760 font-size: " + FontSettings.H4.FontSize + @"; 761 color: " + FontSettings.H4.Color + @"; 762 line-height: " + FontSettings.H4.LineHeight + @" !important; 763 text-transform: " + FontSettings.H4.Casing + @"; 764 font-weight: " + FontSettings.H4.FontWeight + @"; 765 letter-spacing: " + FontSettings.H4.LetterSpacing + @" !important; 766 } 767 768 h2, h5, h6 { 769 margin-top: 0.7em; 770 margin-bottom: 0.7em; 771 772 font-family: " + FontSettings.H2.FontFamily + @", sans-serif !important; 773 font-size: " + FontSettings.H2.FontSize + @"; 774 color: " + FontSettings.H2.Color + @"; 775 line-height: " + FontSettings.H2.LineHeight + @"; 776 text-transform: " + FontSettings.H2.Casing + @" !important; 777 font-weight: " + FontSettings.H2.FontWeight + @" !important; 778 letter-spacing: " + FontSettings.H2.LetterSpacing + @" !important; 779 } 780 781 h5, h6 { 782 font-size: 16px !important; 783 } 784 785 body { 786 font-family: " + FontSettings.Body.FontFamily + @", sans-serif !important; 787 font-size: " + FontSettings.Body.FontSize + @"; 788 color: " + FontSettings.Body.Color + @"; 789 line-height: " + FontSettings.Body.LineHeight + @" !important; 790 text-transform: " + FontSettings.Body.Casing + @"; 791 font-weight: " + FontSettings.Body.FontWeight + @"; 792 letter-spacing: " + FontSettings.Body.LetterSpacing + @" !important; 793 } 794 795 .navbar-wp .navbar-nav > li > a { 796 font-family: " + FontSettings.Body.FontFamily + @", sans-serif !important; 797 } 798 799 .section-title { 800 margin-top: 0; 801 margin-bottom: 0.7em; 802 } 803 "; 804 return CssString; 805 } 806 } 807 808 @GoogleFonts() 809 810 <!-- GENERAL/COLOR SETTINGS --> 811 @functions{ 812 public class ColorSettings 813 { 814 public class Color 815 { 816 public static string Primary { get; set; } 817 public static string Hover { get; set; } 818 public static string Secondary { get; set; } 819 public static string NavbarFont { get; set; } 820 public static string Third { get; set; } 821 public static string Fourth { get; set; } 822 public static string Footer { get; set; } 823 public static string FooterFont { get; set; } 824 825 public static string Sticker { get; set; } 826 public static string Price { get; set; } 827 public static string Cart { get; set; } 828 } 829 } 830 831 832 private void InitColorSettings() 833 { 834 ColorSettings.Color.Hover = GetString("Item.Area.ColorsPrimaryHover.Color"); 835 ColorSettings.Color.Primary = GetString("Item.Area.ColorsPrimary.Color"); 836 ColorSettings.Color.Secondary = GetString("Item.Area.ColorsSecondary.Color"); 837 ColorSettings.Color.Third = GetString("Item.Area.ColorsThird.Color"); 838 ColorSettings.Color.Fourth = GetString("Item.Area.ColorsFourth.Color"); 839 ColorSettings.Color.NavbarFont = GetString("Item.Area.NavbarFontColor"); 840 841 if (string.IsNullOrWhiteSpace(ColorSettings.Color.NavbarFont)) 842 { 843 ColorSettings.Color.NavbarFont = WrapMethods.getContrastYIQ(ColorSettings.Color.Secondary); 844 } 845 846 ColorSettings.Color.Footer = GetString("Item.Area.ColorsFooterColor.Color"); 847 ColorSettings.Color.FooterFont = WrapMethods.getContrastYIQ(ColorSettings.Color.Footer); 848 849 ColorSettings.Color.Price = GetString("Item.Area.EcommercePriceColor.Color"); 850 ColorSettings.Color.Sticker = GetString("Item.Area.EcommerceDiscountStickerColor.Color"); 851 ColorSettings.Color.Cart = GetString("Item.Area.EcommerceCartButtonColor.Color"); 852 } 853 854 public string GetColorSettings() 855 { 856 string CssString = @" 857 a:hover, a:focus, a:active { 858 color: @Primary; 859 } 860 .product-detail .ProductTitle h1{ 861 border-bottom: 4px solid @Primary; 862 } 863 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { 864 color: @NavbarFont; 865 } 866 867 .navbar-wp .navbar-nav > .active > a, .navbar-wp .navbar-nav > .active > a:hover, .navbar-wp .navbar-nav > .active > a:focus { 868 color: @NavbarFont; 869 } 870 871 .navbar-wp .navbar-nav > li > a:hover, .navbar-wp .navbar-nav > li > a:focus { 872 border-top: 0px solid @Secondary; 873 color: @NavbarFont; 874 } 875 876 .navbar-wp .navbar-nav > li > a span:after { 877 background-color: @Primary; 878 } 879 880 .navbar-wp .megamenu > li:hover > a { 881 color: @Primary !important; 882 } 883 884 .btn-dw-primary { 885 color: #FFF; 886 background-color: @Primary; 887 border-color: @Primary; 888 } 889 890 .btn-dw-secondary { 891 color: @NavbarFont; 892 background-color: @Secondary; 893 border-color: @Secondary; 894 } 895 896 .btn-dw-cart { 897 color: #FFF; 898 background-color: @Cart; 899 border-color: @Cart; 900 } 901 902 903 904 .dw-minicart-update { 905 color: #FFF !important; 906 background-color: @Primary; 907 transition: all 0.3s ease-in-out 0s; 908 } 909 910 .pagination > li > a, .pagination > li > a:hover, .pagination > li > a:focus, .pagination > li > a:active { 911 color: @Primary; 912 } 913 914 .form-control:hover, .form-control:focus, .form-control:active { 915 border-color: @Primary !important; 916 } 917 918 .bg-2 { 919 background: @Primary !important; 920 } 921 922 .blockquote-1:hover { 923 border-color: @Primary !important; 924 } 925 926 .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 { 927 color: @Primary; 928 } 929 930 .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 { 931 color: @Primary; 932 } 933 934 .navbar-wp .navbar-nav > li > a:hover, .navbar-wp .navbar-nav > li > a:focus { 935 border: 0px solid @Primary; 936 } 937 938 .navbar-wp .navbar-toggle:hover, .navbar-wp .navbar-toggle:focus { 939 background-color: @Primary !important; 940 border-color: @Primary !important; 941 } 942 943 .navbar-wp .dropdown-menu { 944 border-top: 1px solid @Primary !important; 945 border-bottom: 4px solid @Primary !important; 946 } 947 948 .navbar-wp .dropdown-menu > li > a:hover { 949 background: @Primary !important; 950 color: #fff; 951 } 952 953 .navbar-wp .dropdown-menu .active { 954 background: @Primary !important; 955 color: #fff; 956 } 957 958 .navbar-wp.navbar-contrasted .dropdown-menu > li > a:hover { 959 background: @Primary !important; 960 } 961 962 .nav > ul > li > a:hover { 963 color: @Primary; 964 } 965 966 .lw .w-box.w-box-inverse .thmb-img i { 967 color: @Primary !important; 968 } 969 970 .w-box.w-box-inverse .thmb-img:hover i { 971 background: @Primary !important; 972 } 973 974 .c-box { 975 border: 1px solid @Primary !important; 976 } 977 978 .c-box .c-box-header { 979 background: @Primary !important; 980 } 981 982 .w-section .aside-feature:hover .icon-feature, .w-section .aside-feature:hover h4 { 983 color: @Primary !important; 984 } 985 986 .layer-slider-wrapper .title.title-base { 987 background: @Primary !important; 988 } 989 990 .layer-slider-wrapper .subtitle { 991 color: @Primary !important; 992 } 993 994 .layer-slider-wrapper .list-item { 995 color: @Primary !important; 996 } 997 998 .box-element.box-element-bordered { 999 border: 1px solid @Primary !important; 1000 } 1001 1002 .carousel-2 .carousel-indicators .active { 1003 background-color: @Primary !important; 1004 } 1005 1006 .carousel-2 .carousel-nav a { 1007 color: @Primary !important; 1008 } 1009 1010 .carousel-2 .carousel-nav a:hover { 1011 background: @Primary !important; 1012 } 1013 1014 .carousel-3 .carousel-nav a { 1015 color: @Primary !important; 1016 } 1017 1018 .carousel-3 .carousel-nav a:hover { 1019 background: @Primary !important; 1020 } 1021 1022 .like-button .button.liked i { 1023 color: @Primary !important; 1024 } 1025 1026 ul.list-listings li.featured { 1027 border-color: @Primary !important; 1028 } 1029 1030 ul.list-check li i { 1031 color: @Primary !important; 1032 } 1033 1034 ul.dw-categories li a:hover, ul.dw-categories a:focus, ul.dw-categories a:active{ 1035 color: @NavbarFont; 1036 background-color: @Primary; 1037 border-color: @Primary; 1038 } 1039 1040 ul.categories li a:hover, ul.categories a:focus, ul.categories a:active{ 1041 color: @NavbarFont; 1042 background-color: @Primary; 1043 border-color: @Primary; 1044 } 1045 1046 .timeline .event:nth-child(2n):before { 1047 background-color: @Primary !important; 1048 } 1049 1050 .timeline .event:nth-child(2n-1):before { 1051 background-color: @Primary !important; 1052 } 1053 1054 #toTopHover { 1055 background-color: @Primary !important; 1056 } 1057 1058 .tags-list li { 1059 border: 1px solid @Primary !important; 1060 color: @Primary !important; 1061 } 1062 1063 .tags-list li:hover, 1064 a.open-panel { 1065 background-color: @Primary !important; 1066 } 1067 1068 .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus, 1069 .panel-group .panel-heading a i, 1070 .tags-list li a { 1071 color: @NavbarFont !important; 1072 } 1073 1074 .nav-pills > li > a:hover, .nav-pills > li > a:focus { 1075 color: @NavbarFont !important; 1076 background: none repeat scroll 0% 0% @Secondary !important; 1077 } 1078 1079 footer { 1080 background: @Footer !important; 1081 } 1082 1083 footer h4 { 1084 color: @FooterFont !important; 1085 } 1086 1087 footer a { 1088 color: @FooterFont !important; 1089 } 1090 1091 footer a:hover, footer a:focus, footer a:active { 1092 color: @Secondary !important; 1093 } 1094 1095 footer p { 1096 color: @FooterFont !important; 1097 } 1098 1099 footer ul > li { 1100 color: @FooterFont !important; 1101 } 1102 1103 footer hr { 1104 border-color: @FooterFont 1105 } 1106 1107 1108 /* Button colors */ 1109 .btn-base { 1110 color: @NavbarFont !important; 1111 background-color: @Secondary !important; 1112 border: 1px solid @Secondary !important; 1113 } 1114 1115 .btn-base:before { 1116 background-color: @Secondary !important; 1117 } 1118 1119 .btn-base:hover:before, .btn-base:focus:before, .btn-base:active:before { 1120 color: @NavbarFont !important; 1121 background-color: @Primary !important; 1122 border-color: @Primary !important; 1123 } 1124 1125 .btn-icon:before { 1126 transition: none !important; 1127 } 1128 1129 .btn-base:hover, .btn-base:focus, .btn-base:active, .btn-base.active, .open .dropdown-toggle.btn-base { 1130 color: @NavbarFont !important; 1131 background-color: @Primary !important; 1132 border-color: @Primary !important; 1133 } 1134 1135 .btn-primary { 1136 background-color: @Primary !important; 1137 border-color: @Primary !important; 1138 } 1139 1140 .open .dropdown-toggle.btn-primary { 1141 background-color: @Primary !important; 1142 border-color: @Primary !important; 1143 } 1144 1145 /* Dropdown-menu */ 1146 .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { 1147 background: @Primary !important; 1148 color: #fff !important; 1149 } 1150 1151 /* Ecom settings */ 1152 .ribbon.base, .ball { 1153 background: @Sticker !important; 1154 color: #fff; 1155 border-right: 5px solid @Sticker !important; 1156 } 1157 1158 .ribbon.base:before { 1159 border-top: 27px solid @Sticker !important; 1160 } 1161 1162 .ribbon.base:after { 1163 border-bottom: 27px solid @Sticker !important; 1164 } 1165 1166 .price { 1167 color: @Price !important; 1168 } 1169 1170 .discount-sticker { 1171 background-color: @Sticker !important; 1172 } 1173 1174 .bs-callout-primary { 1175 border-left-color: @Primary !important; 1176 } 1177 1178 .ratings .fa-star { 1179 color: @Secondary !important; 1180 } 1181 1182 1183 1184 1185 1186 /*Innter items and all website colors and background*/ 1187 .productNavigation.dw-categories li.list-active a{ 1188 background-color: @Primary!important; 1189 } 1190 #leftnavigation li.list-open-active a{ 1191 background-color: @Primary!important; 1192 } 1193 .slideToggle{ 1194 background-color: @Primary; 1195 } 1196 .boxImageTextModule .box-size .desc-wrapper { 1197 border-top: 4px solid @Primary; 1198 } 1199 .top-module .BoxWithText .text { 1200 background: @Primary; 1201 } 1202 .qoute .btn, .qoute .btn-span { 1203 border-bottom: 4px solid @Primary; 1204 border-top: 4px solid @Primary; 1205 } 1206 .Multy-module .section-top hr { 1207 background-color: @Primary; 1208 } 1209 .filePageTitle h2.FileTitle { 1210 border-bottom: 4px solid @Primary; 1211 } 1212 .searc-fileFolder .btn{ 1213 background: @Footer!Important; 1214 } 1215 .searc-fileFolder .btn:hover{ 1216 background: @Primary!important; 1217 } 1218 .searc-fileFolder input { 1219 background-color: @Third; 1220 } 1221 .CenterButtonsSocial.ShowSocial .shereLinks{ 1222 border: 1px solid @Fourth; 1223 } 1224 .CenterButtonsSocial.ShowSocial .shereLinks .fa-close{ 1225 color: @Fourth; 1226 } 1227 .social-module .sort .social-content{ 1228 background-color: @Third; 1229 } 1230 .specification .specification-text { 1231 background-color: @Third; 1232 } 1233 .top-moduleQoute{ 1234 background-color: @Third; 1235 } 1236 .searc-file input { 1237 background-color: @Third; 1238 } 1239 .searc-file .btn{ 1240 background: @Footer!Important; 1241 } 1242 .searc-file .btn:hover{ 1243 background: @Primary!important; 1244 } 1245 .downloadImageParth .discription { 1246 background-color: @Third; 1247 } 1248 .history-module .row .box .box-inner .year{ 1249 color: @Primary; 1250 } 1251 .history-module .row .modal-open{ 1252 color: @Primary; 1253 } 1254 .history-module .row .box .box-inner .year::after{ 1255 background-color: @Primary; 1256 } 1257 .history-module .row .box .box-inner .year::before{ 1258 background-color: @Primary; 1259 } 1260 .training-courses .courses-list .list-body{ 1261 background-color: @Third; 1262 } 1263 .training-courses .courses-list .list-body .data { 1264 color: @Primary; 1265 } 1266 .training-courses .courses-list .list-body a{ 1267 color: @Primary; 1268 } 1269 .NoCurses{ 1270 background-color: @Third; 1271 } 1272 .courses-detail .data { 1273 color: @Primary; 1274 } 1275 .courses-detail{ 1276 background-color: @Third; 1277 } 1278 .shere-social{ 1279 border-top: 4px solid @Primary; 1280 } 1281 #backLink{ 1282 color: @Primary; 1283 } 1284 .Map-Contact-Page{ 1285 background-color: @Primary; 1286 } 1287 .SelectParthContacts h2{ 1288 border-bottom: 4px solid @Primary; 1289 } 1290 .contact-person .AllUserBoxs .userBox .PersonBoxDetail a.mail{ 1291 color: @Primary; 1292 } 1293 .contact-person{ 1294 background-color: @Third; 1295 } 1296 .contact-person.contact-person-information .inner-user-box{ 1297 background-color: @Third; 1298 } 1299 .contact-person .AllUserBoxs .userBox .image{ 1300 background-color: @Footer; 1301 } 1302 .list-news{ 1303 background-color: @Third; 1304 } 1305 .list-news .list-body .description p a{ 1306 color: @Primary; 1307 } 1308 .bulletin-list li.list-bulletin h3 a{ 1309 color: @Primary; 1310 } 1311 .bulletin-list li.list-bulletin h3 a:hover{ 1312 color: @Hover; 1313 } 1314 .CenterParagraph h2{ 1315 border-bottom: 4px solid @Primary; 1316 } 1317 .productNavigation.dw-categories li{ 1318 background-color: @Third; 1319 } 1320 .productlist .extracolumn{ 1321 background-color: @Third; 1322 } 1323 .colapse-box button{ 1324 background-color: @Footer; 1325 } 1326 .colapse-box button.collapsed{ 1327 background-color: @Fourth; 1328 } 1329 .productNumberDetailPage{ 1330 background-color: @Third; 1331 } 1332 .colapse-box button.collapsed:active{ 1333 background-color: @Footer; 1334 } 1335 .category .row-catecory .category-elements .fa{ 1336 color: @Primary; 1337 } 1338 .lang-sug{ 1339 background-color: @Third; 1340 } 1341 .lang-sug p{ 1342 color: @Primary; 1343 } 1344 .lang-sug .langMenu li{ 1345 background-color: @Fourth; 1346 } 1347 .lang-sug .langMenu li:hover{ 1348 background-color: @Primary; 1349 } 1350 .e-learning{ 1351 background-color: @Third; 1352 } 1353 .e-learning p{ 1354 color: @Primary; 1355 } 1356 .e-learning .e-learning-menu{ 1357 width:300px 1358 } 1359 .e-learning .e-learning-menu li{ 1360 margin-bottom:10px !important; 1361 background-color: @Fourth; 1362 } 1363 .e-learning .e-learning-menu li:hover{ 1364 background-color: @Primary; 1365 } 1366 .e-learning .e-learning-menu li.active{ 1367 background-color: @Primary; 1368 1369 } 1370 .e-learning .e-learning-menu li.active a{ 1371 color:white !important; 1372 } 1373 .Tabs .nav-tabs li{ 1374 background-color: @Third; 1375 } 1376 .Tabs .nav-tabs li.active{ 1377 background-color: @Fourth; 1378 } 1379 #contentsearch{ 1380 background-color: @Third; 1381 } 1382 .searchContent ul li h3 a { 1383 color: @Primary; 1384 } 1385 .favorite-list .td{ 1386 border-top: 1px solid @Primary; 1387 } 1388 1389 .dw-section-title{ 1390 border-color: @Primary!important; 1391 } 1392 .nav.nav-pills li.offcanvas-menubtn .mobileMenuFix{ 1393 color: @Primary; 1394 } 1395 .navbar-wp .megamenu .dropdown-menu{ 1396 background-color: @Third; 1397 } 1398 .downloadImageParth .table tr td{ 1399 background-color: @Third; 1400 } 1401 .dropdown.open:before{ 1402 border-bottom: 10px solid @Third; 1403 } 1404 .btn-primary:hover{ 1405 background-color: @Hover!important; 1406 } 1407 .navbar-wp .megamenu.navbar-nav > li.active > a{ 1408 border-bottom: 4px solid @Primary; 1409 } 1410 .history-module .arrow .fa-angle-down:before{ 1411 color: @Primary; 1412 } 1413 .top-headerShow{ 1414 border-bottom: 1px solid @Primary; 1415 } 1416 .social-module .twitter-content{ 1417 background-color: @Primary; 1418 } 1419 .ProductTab ul.nav-pills li{ 1420 background-color: @Third; 1421 } 1422 .ProductTab ul.nav-pills li a.checked{ 1423 background-color: @Primary; 1424 } 1425 .ProductTab ul.nav-pills li:hover{ 1426 background-color: @Primary!important; 1427 } 1428 .ProductTab ul.nav-pills > li > a:hover{ 1429 background-color: @Primary!important; 1430 color: #fff!important; 1431 } 1432 .ProductTab ul.nav-pills > li > a:focus{ 1433 background-color: @Primary!important; 1434 color: #fff!important; 1435 } 1436 @media (min-width: 768px) { 1437 .history-module .row:nth-child(2n+2) .box{ 1438 border-left: 2px solid @Primary; 1439 border-right: 0; 1440 } 1441 .history-module .row .box{ 1442 border-right: 2px solid @Primary; 1443 } 1444 } 1445 @media (max-width: 767px) { 1446 .history-module .row .box { 1447 border-right: 2px solid @Primary; 1448 } 1449 } 1450 1451 1452 1453 1454 1455 1456 1457 1458 .feature-label { 1459 color: @Secondary !important; 1460 }"; 1461 1462 return ParseCSSToString(CssString); 1463 } 1464 1465 private string ParseCSSToString(string TheString) 1466 { 1467 TheString = TheString.Replace("@Primary", ColorSettings.Color.Primary); 1468 TheString = TheString.Replace("@Hover", ColorSettings.Color.Hover); 1469 TheString = TheString.Replace("@Secondary", ColorSettings.Color.Secondary); 1470 TheString = TheString.Replace("@Third", ColorSettings.Color.Third); 1471 TheString = TheString.Replace("@Fourth", ColorSettings.Color.Fourth); 1472 TheString = TheString.Replace("@NavbarFont", ColorSettings.Color.NavbarFont); 1473 TheString = TheString.Replace("@FooterFont", ColorSettings.Color.FooterFont); 1474 TheString = TheString.Replace("@Footer", ColorSettings.Color.Footer); 1475 1476 TheString = TheString.Replace("@Sticker", ColorSettings.Color.Sticker); 1477 TheString = TheString.Replace("@Price", ColorSettings.Color.Price); 1478 TheString = TheString.Replace("@Cart", ColorSettings.Color.Cart); 1479 1480 1481 System.Text.StringBuilder sb = new System.Text.StringBuilder(); 1482 1483 foreach (var item in TheString.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries)) 1484 { 1485 sb.AppendLine(item); 1486 } 1487 1488 return sb.ToString(); 1489 } 1490 } 1491 1492 @{ 1493 InitColorSettings(); 1494 } 1495 1496 1497 @using System.Drawing 1498 @using System.Net 1499 1500 1501 @functions{ 1502 public class GeneralSettings 1503 { 1504 1505 public class Header 1506 { 1507 public static string Mode { get; set; } 1508 public static string Classes { get; set; } 1509 public static bool Show { get; set; } 1510 public static string Background { get; set; } 1511 public static bool ShowFrontpageImage { get; set; } 1512 } 1513 1514 public class Logo 1515 { 1516 public static string Image { get; set; } 1517 public static string ContrastImage { get; set; } 1518 public static string Text { get; set; } 1519 public static string Slogan { get; set; } 1520 public static string SecondaryColor { get; set; } 1521 } 1522 1523 public class Navigation 1524 { 1525 public static string Position { get; set; } 1526 public static bool IsMegamenu { get; set; } 1527 public static bool IsAnimateNavigation { get; set; } 1528 public static string InvertedPosition { get; set; } 1529 public static string StickyMenu { get; set; } 1530 public static string SelectionMode { get; set; } 1531 public static string SelectionStyle { get; set; } 1532 public static int SelectionWeight { get; set; } 1533 public static bool Case { get; set; } 1534 1535 public static string BreadcrumbMode { get; set; } 1536 public static string BreadcrumbAlign { get; set; } 1537 1538 public static string LeftmenuMode { get; set; } 1539 1540 public static string ButtonDesign { get; set; } 1541 } 1542 1543 public class Headings 1544 { 1545 public static string Mode { get; set; } 1546 } 1547 1548 public class Background 1549 { 1550 public static string Color { get; set; } 1551 public static string Image { get; set; } 1552 public static string CustomImage { get; set; } 1553 public static bool GradientColor { get; set; } 1554 public static string GradientPercentage { get; set; } 1555 public static string Style { get; set; } 1556 public static string Position { get; set; } 1557 } 1558 1559 public class Site 1560 { 1561 public static bool Shadow { get; set; } 1562 public static string LayoutMode { get; set; } 1563 } 1564 1565 public class Images 1566 { 1567 public static bool RoundCorners { get; set; } 1568 } 1569 1570 public class Ecommerce 1571 { 1572 public static string EcomListDesign { get; set; } 1573 public static string EcomCardDesign { get; set; } 1574 } 1575 } 1576 1577 private void InitGeneralSettings() 1578 { 1579 //Header settings 1580 GeneralSettings.Header.Mode = GetString("Item.Area.HeaderLayoutMode"); 1581 GeneralSettings.Header.Show = GetBoolean("Item.Area.HeaderShow"); 1582 GeneralSettings.Header.Background = GetString("Item.Area.NavigationNavbarBackground"); 1583 GeneralSettings.Header.ShowFrontpageImage = GetBoolean("Item.Area.HeaderFrontpageImage"); 1584 1585 if (GeneralSettings.Header.Mode == "solid"){ 1586 GeneralSettings.Header.Classes = ""; 1587 } 1588 1589 if (GeneralSettings.Header.Mode == "cover" || GeneralSettings.Header.Mode == "mobile"){ 1590 GeneralSettings.Header.Classes = "header-alpha header-cover"; 1591 } 1592 1593 1594 //Logo settings 1595 GeneralSettings.Logo.Image = GetString("Item.Area.GeneralLogo"); 1596 GeneralSettings.Logo.Text = GetString("Item.Area.GeneralLogoText"); 1597 GeneralSettings.Logo.Slogan = GetString("Item.Area.LogoSlogan"); 1598 GeneralSettings.Logo.SecondaryColor = GetString("Item.Area.LogoSecondColor.Color"); 1599 1600 if (!string.IsNullOrWhiteSpace(GetString("Item.Area.LogoContrastImage"))) { 1601 GeneralSettings.Logo.ContrastImage = GetString("Item.Area.LogoContrastImage"); 1602 } else { 1603 GeneralSettings.Logo.ContrastImage = GetString("Item.Area.GeneralLogo"); 1604 } 1605 1606 1607 //Navigation settings 1608 GeneralSettings.Navigation.Position = GetString("Item.Area.NavigationPosition"); 1609 GeneralSettings.Navigation.StickyMenu = "off"; 1610 GeneralSettings.Navigation.IsMegamenu = GetBoolean("Item.Area.IsMegamenu"); 1611 GeneralSettings.Navigation.IsAnimateNavigation = GetBoolean("Item.Area.IsAnimateNavigation"); 1612 1613 if (GetBoolean("Item.Area.NavigationSticky")) { 1614 if (GeneralSettings.Header.Show) 1615 { 1616 if (GeneralSettings.Header.Mode == "cover") 1617 { 1618 GeneralSettings.Navigation.StickyMenu = "44"; //"data-spy=\"affix\" data-offset-top=\"44\" data-offset-bottom=\"300\""; 1619 } 1620 else 1621 { 1622 int offset = ImageHeight()+28; 1623 1624 GeneralSettings.Navigation.StickyMenu = offset.ToString(); // "data-spy=\"affix\" data-offset-top=\"" + offset.ToString() + "\" data-offset-bottom=\"300\""; 1625 } 1626 } 1627 else 1628 { 1629 GeneralSettings.Navigation.StickyMenu = "5"; // "data-spy=\"affix\" data-offset-top=\"5\" data-offset-bottom=\"300\""; 1630 } 1631 } 1632 1633 if (GeneralSettings.Navigation.Position == "left") { 1634 GeneralSettings.Navigation.InvertedPosition = "right"; 1635 } 1636 else 1637 { 1638 GeneralSettings.Navigation.InvertedPosition = "left"; 1639 } 1640 1641 GeneralSettings.Navigation.SelectionMode = GetString("Item.Area.NavigationSelectionMode"); 1642 GeneralSettings.Navigation.SelectionStyle = ""; 1643 GeneralSettings.Navigation.SelectionWeight = GetInteger("Item.Area.SelectionWeight"); 1644 1645 if (GeneralSettings.Navigation.SelectionMode == "arrow") { 1646 GeneralSettings.Navigation.SelectionStyle = "navbar-arrow"; 1647 } 1648 1649 GeneralSettings.Navigation.Case = GetBoolean("Item.Area.NavigationUppercase"); 1650 1651 GeneralSettings.Navigation.BreadcrumbMode = GetString("Item.Area.NavigationBreadcrumbLayout"); 1652 GeneralSettings.Navigation.BreadcrumbAlign = GetString("Item.Area.NavigationBreadcrumbAlign"); 1653 1654 GeneralSettings.Navigation.LeftmenuMode = GetString("Item.Area.NavigationLeftNavigationMode"); 1655 1656 GeneralSettings.Navigation.ButtonDesign = GetString("Item.Area.NavigationButtonDesign"); 1657 1658 1659 //Background settings 1660 GeneralSettings.Background.Image = GetString("Item.Area.BackgroundImage.Image.Image"); 1661 GeneralSettings.Background.CustomImage = GetString("Item.Area.BackgroundImage.Image.CustomImage"); 1662 GeneralSettings.Background.Color = GetString("Item.Area.BackgroundImage.Color.Color"); 1663 GeneralSettings.Background.GradientColor = GetBoolean("Item.Area.BackroundGradientColor"); 1664 GeneralSettings.Background.GradientPercentage = GetString("Item.Area.GradientPercentage"); 1665 1666 1667 if (@GetString("Item.Area.BackgroundFixed") == "True") 1668 { 1669 GeneralSettings.Background.Position = "fixed"; 1670 } 1671 else 1672 { 1673 GeneralSettings.Background.Position = ""; 1674 } 1675 1676 1677 if (GeneralSettings.Background.Image == "none") 1678 { 1679 GeneralSettings.Background.Style = ""; 1680 } 1681 else if (GeneralSettings.Background.Image == "custom") 1682 { 1683 if (!string.IsNullOrWhiteSpace(GeneralSettings.Background.CustomImage)) 1684 { 1685 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; "; 1686 } 1687 } 1688 else 1689 { 1690 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; "; 1691 } 1692 1693 1694 //Headings settings 1695 GeneralSettings.Headings.Mode = GetString("Item.Area.AdvHeadingsMode"); 1696 1697 1698 //Site settings 1699 GeneralSettings.Site.Shadow = GetBoolean("Item.Area.BackgroundSiteShadow"); 1700 GeneralSettings.Site.LayoutMode = GetString("Item.Area.LayoutMode"); 1701 1702 if (GeneralSettings.Site.LayoutMode == "boxed"){ 1703 GeneralSettings.Site.LayoutMode = "body-" + GeneralSettings.Site.LayoutMode; 1704 GeneralSettings.Header.Classes += " header-boxed"; 1705 } 1706 1707 1708 //Image settings 1709 GeneralSettings.Images.RoundCorners = GetBoolean("Item.Area.LayoutRoundCorners"); 1710 1711 //Ecommerce settings 1712 GeneralSettings.Ecommerce.EcomListDesign = GetString("Item.Area.EcommerceProductCardDesign"); 1713 GeneralSettings.Ecommerce.EcomCardDesign = GetString("Item.Area.EcommerceProductCardDesign"); 1714 } 1715 1716 public string GetGeneralCSS() 1717 { 1718 string CssString = ""; 1719 int SelectionWeight = GeneralSettings.Navigation.SelectionWeight; 1720 1721 //Site settings 1722 if (GetString("Item.Area.LogoFont.Color.Color") == "#FFF" || GetString("Item.Area.LogoFont.Color.Color") == "#FFFFFF") 1723 { 1724 int offset = ImageHeight()+28; 1725 1726 CssString += @" 1727 .dw-offsetmenu-logo { 1728 color: #333 !important; 1729 }"; 1730 } 1731 1732 if (!string.IsNullOrWhiteSpace(GeneralSettings.Background.Color)) 1733 { 1734 CssString += @" 1735 body { 1736 background-color: " + GeneralSettings.Background.Color + @"; 1737 background-size: cover; 1738 overflow-y: scroll; 1739 }"; 1740 } 1741 1742 if (GeneralSettings.Background.GradientColor) 1743 { 1744 CssString += @" 1745 body { 1746 background: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1747 background: -o-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1748 background: -ms-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1749 background: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1750 background: linear-gradient(to top, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1751 background-attachment: fixed; 1752 background-color: " + GeneralSettings.Background.Color + @" !important; 1753 }"; 1754 } 1755 1756 if (GeneralSettings.Site.Shadow) 1757 { 1758 CssString += @" 1759 .shad { 1760 -webkit-box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); 1761 -moz-box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); 1762 box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); 1763 }"; 1764 } 1765 1766 //Image settings 1767 if (GeneralSettings.Images.RoundCorners) 1768 { 1769 CssString += @" 1770 .content-image { 1771 border-radius: 6px; 1772 -webkit-border-radius: 6px; 1773 -moz-border-radius: 6px; 1774 }"; 1775 } 1776 1777 //Navbar and header custom settings 1778 if (GeneralSettings.Header.Mode == "cover") 1779 { 1780 CssString += @" 1781 .navbar-wp { 1782 background-color: none !important; 1783 }"; 1784 1785 if (!GeneralSettings.Header.Show || GeneralSettings.Header.Mode == "mobile") 1786 { 1787 CssString += @" 1788 .header-cover .navbar-wp { 1789 top: 0px !important; 1790 }"; 1791 } 1792 } 1793 else 1794 { 1795 if (GeneralSettings.Header.Show) 1796 { 1797 CssString += @" 1798 .navbar-wp.affix .navbar-nav > li > a { 1799 padding: 16px 16px !important; 1800 }"; 1801 } 1802 } 1803 1804 if (GeneralSettings.Header.Background == "colorline") 1805 { 1806 CssString += @" 1807 .navbar-wp, .navbar-wp.affix { 1808 border-bottom: 4px solid " + ColorSettings.Color.Primary + @" !important; 1809 } 1810 1811 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { 1812 background-color: #FFF; 1813 color: #333; 1814 } 1815 1816 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { 1817 color: " + ColorSettings.Color.NavbarFont + @"; 1818 } 1819 1820 .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo { 1821 color: " + GeneralSettings.Logo.SecondaryColor + @" !important; 1822 }"; 1823 } else if (GeneralSettings.Header.Background == "neutral") 1824 { 1825 CssString += @" 1826 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { 1827 background-color: #f1f1f1; 1828 } 1829 1830 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { 1831 color: #333; 1832 } 1833 1834 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { 1835 color: " + ColorSettings.Color.NavbarFont + @"; 1836 } 1837 1838 .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo { 1839 color: " + GeneralSettings.Logo.SecondaryColor + @" !important; 1840 }"; 1841 } 1842 else if (GeneralSettings.Header.Background == "transparent") 1843 { 1844 CssString += @" 1845 .navbar-wp, .navbar-wp.affix { 1846 background-color: #FFF; 1847 opacity: 0.9; 1848 filter: alpha(opacity=90); /* For IE8 and earlier */ 1849 } 1850 1851 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { 1852 color: #333; 1853 } 1854 1855 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { 1856 color: " + ColorSettings.Color.NavbarFont + @"; 1857 } 1858 1859 .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo { 1860 color: " + GeneralSettings.Logo.SecondaryColor + @" !important; 1861 }"; 1862 } 1863 else 1864 { 1865 CssString += @" 1866 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { 1867 background-color: " + ColorSettings.Color.Secondary + @"; 1868 } 1869 1870 .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo { 1871 color: " + GeneralSettings.Logo.SecondaryColor + @" !important; 1872 }"; 1873 } 1874 1875 if (GeneralSettings.Navigation.SelectionMode == "background" || GeneralSettings.Navigation.SelectionMode == "arrow"){ 1876 CssString += NavbarPosition(false, SelectionWeight); 1877 1878 CssString += @" 1879 .dw-navbar-button > a { 1880 background-color: transparent !important; 1881 } 1882 1883 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1884 background-color: " + ColorSettings.Color.Primary + @" !important; 1885 }"; 1886 } 1887 1888 if (GeneralSettings.Navigation.SelectionMode == "underline"){ 1889 CssString += NavbarPosition(true); 1890 1891 CssString += ClearBackground(); 1892 1893 CssString += @" 1894 .dw-navbar-button > a span:after { 1895 position: absolute; 1896 content: ''; 1897 left: 0px; 1898 bottom: 0px; 1899 height: " + SelectionWeight + @"px; 1900 width: 100%; 1901 transform: scaleX(0); 1902 transition: all 0.3s ease-in-out 0s; 1903 } 1904 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1905 color: " + ColorSettings.Color.Primary + @" !important; 1906 } 1907 1908 .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 { 1909 color: " + ColorSettings.Color.Primary + @" !important; 1910 transform: scaleX(1); 1911 transition: all 0.3s ease-in-out 0s; 1912 }"; 1913 } 1914 1915 if (GeneralSettings.Navigation.SelectionMode == "boxed"){ 1916 CssString += NavbarPosition(true, SelectionWeight); 1917 1918 CssString += @" 1919 .dw-navbar-button > a { 1920 background-color: transparent !important; 1921 } 1922 1923 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1924 background-color: " + ColorSettings.Color.Primary + @" !important; 1925 transition: all 0.3s ease-in-out 0s; 1926 }"; 1927 } 1928 1929 if (GeneralSettings.Navigation.SelectionMode == "border"){ 1930 CssString += NavbarPosition(true, 6, SelectionWeight); 1931 1932 CssString += ClearBackground(); 1933 1934 CssString += @" 1935 .dw-navbar-button > a { 1936 border: " + SelectionWeight + @"px solid transparent !important; transition: None !important; 1937 } 1938 1939 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1940 border-width: " + SelectionWeight + @"px !important; 1941 border-color: " + ColorSettings.Color.Primary + @" !important; 1942 transition: all 0.3s ease-in-out 0s; 1943 }"; 1944 } 1945 1946 if (GeneralSettings.Navigation.SelectionMode == "font"){ 1947 CssString += NavbarPosition(); 1948 1949 CssString += ClearBackground(); 1950 1951 SelectionWeight = (SelectionWeight*100); 1952 1953 CssString += @" 1954 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1955 color: " + ColorSettings.Color.Primary + @" !important; 1956 font-weight: " + SelectionWeight + @" !important; 1957 transition: all 0.3s ease-in-out 0s; 1958 }"; 1959 } 1960 1961 if (GeneralSettings.Navigation.Case){ 1962 CssString += @" 1963 .dw-navbar-button > a { 1964 text-transform: uppercase !important; 1965 }"; 1966 } 1967 else 1968 { 1969 CssString += @" 1970 .dw-navbar-button > a { 1971 text-transform: none !important; 1972 }"; 1973 } 1974 1975 1976 //Breadcrumb custom settings 1977 if (GeneralSettings.Navigation.BreadcrumbMode == "light") 1978 { 1979 CssString += @" 1980 .pg-opt { 1981 border-bottom: 0px; 1982 background: none repeat scroll 0% 0% #FFF; 1983 } 1984 1985 .dw-breadcrumb-title { 1986 font-size: 14px !important; 1987 padding: 5px 0px 5px 0px !important; 1988 } 1989 1990 .dw-breadcrumb { 1991 padding: 5px 0px 5px 0px !important; 1992 }"; 1993 } 1994 1995 if (GeneralSettings.Navigation.BreadcrumbMode == "normal") 1996 { 1997 CssString += @" 1998 .dw-breadcrumb-title { 1999 font-size: 14px !important; 2000 padding: 5px 0px 5px 0px !important; 2001 } 2002 2003 .dw-breadcrumb a, .pg-opt .breadcrumb { 2004 padding: 5px !important; 2005 }"; 2006 } 2007 2008 if (GeneralSettings.Navigation.BreadcrumbMode == "large") 2009 { 2010 CssString += @" 2011 .dw-breadcrumb-title { 2012 font-size: 22px !important; 2013 padding: 15px 0px 15px 0px !important; 2014 } 2015 2016 .dw-breadcrumb { 2017 padding: 15px !important; 2018 }"; 2019 } 2020 2021 2022 if (GeneralSettings.Navigation.BreadcrumbAlign == "right") 2023 { 2024 CssString += @" 2025 .dw-breadcrumb { 2026 float: right !important; 2027 }"; 2028 } 2029 else 2030 { 2031 CssString += @" 2032 .dw-breadcrumb { 2033 float: left !important; 2034 }"; 2035 } 2036 2037 2038 //Left menu custom settings 2039 if (GeneralSettings.Navigation.LeftmenuMode == "light" || GeneralSettings.Navigation.LeftmenuMode == "light-color") 2040 { 2041 CssString += @" 2042 ul.dw-categories, ul.dw-categories > li, ul.dw-categories > li > ul > li { 2043 border: 0px solid #EEE; 2044 } 2045 2046 ul.dw-categories > li > ul { 2047 background: none repeat scroll 0% 0% #FFF; 2048 } 2049 2050 ul.dw-categories li a:hover, ul.dw-categories li a:focus, ul.dw-categories li a:active { 2051 background-color: #FFF !important; 2052 color: " + ColorSettings.Color.Primary + @" !important; 2053 } 2054 2055 .list-active, .list-active > a { 2056 background-color: #FFF; 2057 color: " + ColorSettings.Color.Primary + @" !important; 2058 } 2059 2060 .list-open-active { 2061 background-color: #FFF; 2062 color: " + ColorSettings.Color.Primary + @" !important; 2063 }"; 2064 } 2065 2066 if (GeneralSettings.Navigation.LeftmenuMode == "lines") 2067 { 2068 CssString += @" 2069 ul.dw-categories > li { 2070 border-bottom: 1px solid #EEE; 2071 } 2072 2073 ul.dw-categories { 2074 border: 0px solid #EEE; 2075 } 2076 2077 ul.dw-categories > li > ul { 2078 background: none repeat scroll 0% 0% #FFF; 2079 } 2080 2081 ul.dw-categories li a:hover, a:focus, a:active { 2082 background-color: #FFF !important; 2083 color: " + ColorSettings.Color.Primary + @" !important; 2084 } 2085 2086 .list-active, .list-active > a { 2087 background-color: #FFF; 2088 color: " + ColorSettings.Color.Primary + @" !important; 2089 } 2090 2091 .list-open-active { 2092 background-color: #FFF; 2093 color: " + ColorSettings.Color.Primary + @" !important; 2094 }"; 2095 } 2096 2097 if (GeneralSettings.Navigation.LeftmenuMode == "boxed") 2098 { 2099 CssString += @" 2100 ul.dw-categories, ul.dw-categories > li, ul.dw-categories > li > ul > li { 2101 border: 0px solid #EEE; 2102 } 2103 2104 .list-active, .list-active > a { 2105 background-color: " + ColorSettings.Color.Primary + @" !important; 2106 color: #FFF; 2107 }"; 2108 } 2109 2110 if (GeneralSettings.Navigation.LeftmenuMode == "border") 2111 { 2112 CssString += @" 2113 ul.dw-categories > li { 2114 border: 1px solid #EEE; 2115 } 2116 2117 ul.dw-categories > li > ul > li { 2118 border-top: 1px solid #EEE; 2119 } 2120 2121 .list-active, .list-active > a { 2122 background-color: " + ColorSettings.Color.Primary + @" !important; 2123 color: #FFF; 2124 }"; 2125 } 2126 2127 if (GeneralSettings.Navigation.LeftmenuMode == "light-color") 2128 { 2129 CssString += @" 2130 ul.dw-categories li a:hover, ul.dw-categories a:focus, ul.dw-categories a:active { 2131 border-left: 6px solid " + ColorSettings.Color.Primary + @"; 2132 } 2133 2134 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 { 2135 padding-left: 20px; 2136 } 2137 2138 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 { 2139 padding-left: 30px; 2140 } 2141 2142 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 { 2143 padding-left: 40px; 2144 } 2145 2146 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 { 2147 padding-left: 50px; 2148 } 2149 2150 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 { 2151 padding-left: 50px; 2152 } 2153 2154 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 { 2155 padding-left: 50px; 2156 } 2157 2158 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 { 2159 padding-left: 50px; 2160 } 2161 2162 ul.dw-categories .list-active > a { 2163 border-left: 6px solid " + ColorSettings.Color.Primary + @"; 2164 } 2165 2166 .btn-dw:hover, .btn-dw:focus, .btn-dw:active { 2167 2168 }"; 2169 } 2170 2171 2172 //Buttons custom designs 2173 if (GeneralSettings.Navigation.ButtonDesign == "light-rounded") 2174 { 2175 CssString += @" 2176 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { 2177 border-width: 0px; 2178 } 2179 2180 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 2181 background-color: " + ColorSettings.Color.Secondary + @"; 2182 color: #FFF; 2183 border-width: 0px; 2184 } 2185 2186 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 2187 background-color: " + ColorSettings.Color.Primary + @"; 2188 color: #FFF; 2189 border-width: 0px; 2190 } 2191 2192 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 2193 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2194 color: #FFF; 2195 border-width: 0px; 2196 }"; 2197 } 2198 2199 if (GeneralSettings.Navigation.ButtonDesign == "corners") 2200 { 2201 CssString += @" 2202 .btn-dw-primary, .btn-dw-secondary, btn-dw-cart , .btn-dw-cart { 2203 border-radius: 0px !important; 2204 border-width: 0px; 2205 } 2206 2207 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 2208 background-color: " + ColorSettings.Color.Secondary + @"; 2209 color: #FFF; 2210 border-width: 0px; 2211 } 2212 2213 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 2214 background-color: " + ColorSettings.Color.Primary + @"; 2215 color: #FFF; 2216 border-width: 0px; 2217 } 2218 2219 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 2220 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2221 color: #FFF; 2222 border-width: 0px; 2223 }"; 2224 } 2225 2226 if (GeneralSettings.Navigation.ButtonDesign == "round") 2227 { 2228 CssString += @" 2229 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { 2230 padding: 5px 15px; 2231 border-radius: 200px !important; 2232 border-width: 0px !important; 2233 } 2234 2235 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 2236 background-color: " + ColorSettings.Color.Secondary + @"; 2237 color: #FFF; 2238 border-width: 0px !important; 2239 } 2240 2241 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 2242 background-color: " + ColorSettings.Color.Primary + @"; 2243 color: #FFF; 2244 border-width: 0px !important; 2245 } 2246 2247 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 2248 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2249 color: #FFF; 2250 border-width: 0px !important; 2251 }"; 2252 } 2253 2254 if (GeneralSettings.Navigation.ButtonDesign == "border") 2255 { 2256 CssString += @" 2257 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { 2258 background-color: transparent; 2259 } 2260 2261 .btn-dw-primary { 2262 border-width: 4px; 2263 padding: 3px 10px; 2264 color: " + ColorSettings.Color.Primary + @"; 2265 } 2266 2267 .btn-dw-secondary { 2268 border-width: 2px; 2269 color: " + ColorSettings.Color.Secondary + @"; 2270 } 2271 2272 .btn-dw-cart { 2273 border-width: 4px; 2274 padding: 3px 10px; 2275 color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2276 } 2277 2278 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 2279 background-color: " + ColorSettings.Color.Primary + @"; 2280 border-width: 4px; 2281 padding: 3px 10px; 2282 border-color: " + ColorSettings.Color.Primary + @"; 2283 color: #FFF; 2284 } 2285 2286 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 2287 background-color: " + ColorSettings.Color.Primary + @"; 2288 border-width: 2px; 2289 color: #FFF; 2290 border-color: #FFF; 2291 } 2292 2293 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 2294 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2295 border-width: 4px; 2296 padding: 3px 10px; 2297 border-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2298 color: #FFF; 2299 }"; 2300 } 2301 2302 if (GeneralSettings.Navigation.ButtonDesign == "border-sharp" || GeneralSettings.Navigation.ButtonDesign == "border-round") 2303 { 2304 CssString += @" 2305 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { 2306 background-color: transparent; 2307 } 2308 2309 .btn-dw-primary { 2310 border-width: 4px; 2311 padding: 3px 15px; 2312 color: " + ColorSettings.Color.Primary + @"; 2313 } 2314 2315 .btn-dw-secondary { 2316 border-width: 2px; 2317 padding: 5px 15px; 2318 color: " + ColorSettings.Color.Secondary + @"; 2319 } 2320 2321 .btn-dw-cart { 2322 border-width: 4px; 2323 padding: 3px 15px; 2324 color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2325 } 2326 2327 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 2328 background-color: " + ColorSettings.Color.Primary + @"; 2329 border-width: 4px; 2330 color: #FFF; 2331 padding: 3px 15px; 2332 border-color: " + ColorSettings.Color.Primary + @"; 2333 } 2334 2335 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 2336 background-color: " + ColorSettings.Color.Primary + @"; 2337 border-width: 2px; 2338 color: #FFF; 2339 padding: 5px 15px; 2340 border-color: #FFF; 2341 } 2342 2343 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 2344 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2345 border-width: 4px; 2346 color: #FFF; 2347 padding: 3px 15px; 2348 border-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2349 }"; 2350 } 2351 2352 if (GeneralSettings.Navigation.ButtonDesign == "border-sharp") 2353 { 2354 CssString += @" 2355 .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 { 2356 border-radius: 0px !important; 2357 }"; 2358 } 2359 2360 if (GeneralSettings.Navigation.ButtonDesign == "border-round") 2361 { 2362 CssString += @" 2363 .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 { 2364 border-radius: 200px !important; 2365 }"; 2366 } 2367 2368 2369 //Headings custom settings 2370 if (GeneralSettings.Headings.Mode == "underline") 2371 { 2372 CssString += @" 2373 .dw-section-title { 2374 border-bottom: 4px solid; 2375 margin-bottom: 15px; 2376 }"; 2377 } 2378 2379 if (GeneralSettings.Headings.Mode == "boxed" || GeneralSettings.Headings.Mode == "boxed-line") 2380 { 2381 CssString += @" 2382 .dw-section-title span { 2383 background-color: " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; 2384 display: inline-block; 2385 padding: 8px 16px; 2386 color: #FFF; 2387 }"; 2388 2389 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) 2390 { 2391 CssString += @" 2392 .dw-section-title { 2393 background-color: " + ColorSettings.Color.Primary + @"; 2394 }"; 2395 } 2396 } 2397 2398 if (GeneralSettings.Headings.Mode == "boxed-line") 2399 { 2400 CssString += @" 2401 .dw-section-title span { 2402 margin-bottom: 2px; 2403 } 2404 2405 .dw-section-title { 2406 border-bottom: 2px solid " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; 2407 margin-bottom: 10px; 2408 }"; 2409 2410 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) 2411 { 2412 CssString += @" 2413 .dw-section-title { 2414 border-bottom: 2px solid " + ColorSettings.Color.Primary + @"; 2415 }"; 2416 } 2417 } 2418 2419 if (GeneralSettings.Headings.Mode == "outline") 2420 { 2421 CssString += @" 2422 .dw-section-title { 2423 color: #FFF; 2424 text-shadow: 2425 -1px -1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", 2426 1px -1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", 2427 -1px 1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", 2428 1px 1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; 2429 }"; 2430 2431 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) 2432 { 2433 CssString += @" 2434 .dw-section-title { 2435 text-shadow: 2436 -1px -1px 0 #1A1A1A, 2437 1px -1px 0 #1A1A1A, 2438 -1px 1px 0 #1A1A1A, 2439 1px 1px 0 #1A1A1A; 2440 }"; 2441 } 2442 } 2443 2444 if (GeneralSettings.Headings.Mode == "backline") 2445 { 2446 CssString += @" 2447 .dw-section-title { 2448 font-size: 18px; 2449 text-align: center; 2450 border-bottom: 2px solid; 2451 padding: 0; 2452 margin: 8px 0 20px; 2453 line-height: 0em !important; 2454 } 2455 2456 .dw-section-title > span { 2457 background-color: #FFF; 2458 padding: 0 16px; 2459 } 2460 2461 .dw-section-title-small { 2462 margin: 8px 0 20px; 2463 }"; 2464 } 2465 2466 if (GeneralSettings.Ecommerce.EcomCardDesign == "one") 2467 { 2468 2469 } 2470 2471 if (GeneralSettings.Ecommerce.EcomCardDesign == "two") 2472 { 2473 CssString += @" 2474 .product { 2475 border: 1px solid #E5E5E5; 2476 }"; 2477 } 2478 2479 return CssString; 2480 } 2481 2482 private string ClearBackground() { 2483 string CssString = ""; 2484 2485 CssString += @" 2486 .dw-navbar-button > a { 2487 background-color: rgba(0, 0, 0, 0.0) !important; 2488 } 2489 2490 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 2491 background-color: rgba(0, 0, 0, 0.0) !important; 2492 }"; 2493 2494 return CssString; 2495 } 2496 2497 private string NavbarPosition(bool margin=false, int specialpadding=6, int extramargin=0) { 2498 int LogoHeight = 0; 2499 string CssString = ""; 2500 int Centerpos = 0; 2501 2502 if (GeneralSettings.Header.Mode != "solid"){ 2503 if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 2504 { 2505 LogoHeight = ImageHeight(); 2506 } 2507 else 2508 { 2509 LogoHeight = GetInteger("Item.Area.LogoFont.Size"); 2510 } 2511 } 2512 else 2513 { 2514 if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 2515 { 2516 LogoHeight = 18; 2517 } 2518 else 2519 { 2520 LogoHeight = GetInteger("Item.Area.LogoFont.Size")-10; 2521 } 2522 } 2523 2524 if (margin == false) 2525 { 2526 Centerpos = (LogoHeight/2) + 6; 2527 2528 CssString += @" 2529 .dw-navbar-button > a, .navbar-wp.affix .navbar-nav > li > a { 2530 padding: " + Centerpos + @"px " + (specialpadding+4) + @"px " + Centerpos + @"px " + (specialpadding+4) + @"px !important; 2531 margin: " + extramargin + @"px " + extramargin + @"px !important; 2532 }"; 2533 } 2534 else 2535 { 2536 Centerpos = ((LogoHeight/2)+6)-(specialpadding+extramargin); 2537 2538 CssString += @" 2539 .dw-navbar-button > a, .navbar-wp.affix .navbar-nav > li > a { 2540 padding: " + specialpadding + @"px " + (specialpadding+4) + @"px " + specialpadding + @"px " + (specialpadding+4) + @"px !important; 2541 margin: " + Centerpos + @"px 4px 0px 4px !important; 2542 }"; 2543 } 2544 2545 return CssString; 2546 } 2547 2548 private int ImageHeight () 2549 { 2550 int LogoHeight = 0; 2551 2552 if (!string.IsNullOrWhiteSpace(GetString("Item.Area.GeneralLogo"))) 2553 { 2554 string imageUrl = "http://" + HttpContext.Current.Request.Url.Authority + GetString("Item.Area.GeneralLogo"); 2555 2556 WebRequest request = WebRequest.Create(imageUrl); 2557 WebResponse response = request.GetResponse(); 2558 Image image = Image.FromStream(response.GetResponseStream()); 2559 2560 LogoHeight = image.Height; 2561 } 2562 else 2563 { 2564 LogoHeight = 38; 2565 } 2566 2567 return LogoHeight; 2568 } 2569 } 2570 2571 2572 2573 @{ 2574 InitGeneralSettings(); 2575 } 2576 2577 2578 @if (writeCss) 2579 { 2580 css += FontStylesCSS() + "/*Colors*/" + Environment.NewLine + GetColorSettings() + Environment.NewLine + "/*General*/" + Environment.NewLine + GetGeneralCSS(); 2581 Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(css, HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.css"), false); 2582 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); 2583 Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(RemoveWhiteSpaceFromStylesheets(css), cssPath, false); 2584 } 2585 2586 @functions{ 2587 public static string RemoveWhiteSpaceFromStylesheets(string body) 2588 { 2589 body = Regex.Replace(body, @"[a-zA-Z]+#", "#"); 2590 body = Regex.Replace(body, @"[\n\r]+\s*", string.Empty); 2591 body = Regex.Replace(body, @"\s+", " "); 2592 body = Regex.Replace(body, @"\s?([:,;{}])\s?", "$1"); 2593 body = body.Replace(";}", "}"); 2594 body = Regex.Replace(body, @"([\s:]0)(px|pt|%|em)", "$1"); 2595 // Remove comments from CSS 2596 body = Regex.Replace(body, @"/\*[\d\D]*?\*/", string.Empty); 2597 return body; 2598 } 2599 } 2600 2601 <!-- Template styles --> 2602 <link id="dwStylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/DWGlobalStyles.min.css" rel="stylesheet" media="screen"> 2603 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/font.css"> 2604 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/invoice.css"> 2605 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/jquerybxslider.css"> 2606 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/owl.carousel.min.css"> 2607 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/owl.theme.default.min.css"> 2608 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/print.css" media="print"> 2609 @{ string cssAutoPath = "/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.min.css?t=@areaUpdated.Ticks"; } 2610 2611 <link type="text/css" href="@cssAutoPath" rel="stylesheet"> 2612 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/style.min.css?hash=@DateTime.Now"> 2613 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/interspiroStyle.min.css?hash=@DateTime.Now"> 2614 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/styles.min.css"> 2615 2616 <!-- Analytics code --> 2617 @GetValue("Item.Area.OtherAnalyticsCode") 2618 2619 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/typeahead.css"> 2620 2621 <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> 2622 2623 2624 2625 <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script> 2626 2627 @if (GeneralSettings.Navigation.IsMegamenu) 2628 { 2629 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/megamenu.min.css"> 2630 } 2631 2632 2633 @RenderSnippet("TopModule") 2634 @RenderSnippet("TopModuleSize") 2635 @RenderSnippet("TopModuleQuoteHeight") 2636 @RenderSnippet("ImageTextBoxMOdule") 2637 @RenderSnippet("Specification") 2638 @RenderSnippet("TopModuleQuote") 2639 @RenderSnippet("VideoContainer") 2640 @RenderSnippet("FocusElement") 2641 @RenderSnippet("MultyModule") 2642 @RenderSnippet("ImageTextBoxMOduleSize") 2643 @RenderSnippet("360Rotation") 2644 @RenderSnippet("360RotationStyle") 2645 @GetValue("Stylesheets") 2646 @GetValue("Javascripts") 2647 </head> 2648 2649 <body style="@GeneralSettings.Background.Style" id="sitecontent"> 2650 <!-- Google Tag Manager (noscript) --> 2651 <noscript> 2652 <iframe src="https://www.googletagmanager.com/ns.html?id=@GTM_ID" height="0" width="0" style="display:none;visibility:hidden"></iframe> 2653 </noscript> 2654 <!-- End Google Tag Manager (noscript) --> 2655 <!-- MODALS --> 2656 <div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> 2657 <div class="modal-dialog modal-sm"> 2658 <div class="modal-content"> 2659 <div class="modal-header"> 2660 <h4 class="modal-title" id="myModalLabel">@Translate("Login", "Login")</h4> 2661 </div> 2662 <form name="form" id="loginform" method="post"> 2663 <div class="modal-body"> 2664 @if (!string.IsNullOrWhiteSpace(GetString("DW_extranet_error_uk"))) 2665 { 2666 <script>alert("@GetValue("DW_extranet_error_uk")");</script> 2667 } 2668 2669 <input type="hidden" name="ID" value="@Pageview.ID"> 2670 <input type="hidden" name="DWExtranetUsernameRemember" value="True"> 2671 <input type="hidden" name="DWExtranetPasswordRemember" value="True"> 2672 <div class="form-group"> 2673 @{ attrValue = Translate("Enter email", "Enter email"); 2674 var username2 = @GetValue("DWExtranetUsername"); 2675 } 2676 2677 <label for="username">@Translate("Email", "Email")</label> 2678 <input type="text" class="form-control" name="username" id="username" placeholder="@attrValue" value="@username2"> 2679 </div> 2680 <div class="form-group"> 2681 @{ attrValue = Translate("Enter password", "Enter password"); 2682 } 2683 2684 <label for="password">@Translate("Password", "Password")</label> 2685 <input type="password" class="form-control" name="password" id="password" placeholder="@attrValue"> 2686 <p>&nbsp;</p> 2687 <a class="pull-left" href='/Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]&LoginAction=Recovery'>@Translate("Forgot your password?", "Forgot your password?")</a> 2688 &nbsp; 2689 </div> 2690 </div> 2691 <div class="modal-footer"> 2692 <div class="row"> 2693 <div class="col-md-12"> 2694 <div class="checkbox pull-left"> 2695 <label> 2696 <input type="checkbox" name="Autologin" checked="checked" value="True"> @Translate("Remember me", "Remember me") 2697 </label> 2698 </div> 2699 <button type="submit" class="btn btn-xs btn-base pull-right">@Translate("Sign in", "Sign in")</button> 2700 </div> 2701 </div> 2702 </div> 2703 @*@if (GetLoop("DWExtranetExternalLoginProviders").Count != 0) 2704 { 2705 <div class="modal-footer"> 2706 <div class="row"> 2707 <div class="col-md-12"> 2708 <div class="pull-left">@Translate("Or sign in using", "Or sign in using"):</div> 2709 <p>&nbsp;</p> 2710 </div> 2711 </div> 2712 2713 <div class="row"> 2714 <div class="col-md-12"> 2715 @foreach (LoopItem LoginProvider in GetLoop("DWExtranetExternalLoginProviders")) 2716 { 2717 var ProviderName = LoginProvider.GetString("ProviderName").ToLower(); 2718 var ProviderID = LoginProvider.GetValue("ProviderID"); 2719 <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> 2720 } 2721 </div> 2722 </div> 2723 </div> 2724 }*@ 2725 </form> 2726 </div> 2727 </div> 2728 </div> 2729 2730 <!-- MOBILE MENU --> 2731 @{ 2732 var offsetmenuplace = "left"; 2733 2734 if (GeneralSettings.Header.Mode == "mobile") 2735 { 2736 offsetmenuplace = GeneralSettings.Navigation.Position; 2737 } 2738 } 2739 2740 <div id="myNavmenu" class="navmenu navmenu-default navmenu-fixed-@offsetmenuplace offcanvas"> 2741 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2742 <div class="row offcanvas-row">&nbsp;</div> 2743 <div class="offcanvas-row pull-right"> 2744 <button type="button" class="btn btn-sm btn-base close-menu" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body"> 2745 <img src="/Files/Templates/Designs/Dwsimple/images/icons/close.png" alt="close"> 2746 <span> 2747 @Translate("Menu", "Menu") 2748 </span> 2749 </button> 2750 </div> 2751 <div class="row offcanvas-row hidden"> 2752 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2753 <a href="/Default.aspx?ID=@firstpageid" class="brand"> 2754 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 2755 { 2756 <div class="img-responsive dw-offsetmenu-logo pull-left"> 2757 @if (GeneralSettings.Logo.ContrastImage != GeneralSettings.Logo.Image) 2758 { 2759 <img src="@GeneralSettings.Logo.ContrastImage" alt="Logo"> 2760 } 2761 else 2762 { 2763 <img class="img-responsive" src="@GeneralSettings.Logo.Image" alt="Logo"> 2764 } 2765 </div> 2766 } 2767 2768 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text)) 2769 { 2770 <div class="dw-logotext dw-offsetmenu-logo pull-left">@GeneralSettings.Logo.Text</div> 2771 } 2772 </a> 2773 </div> 2774 </div> 2775 <div class="row offcanvas-row">&nbsp;</div> 2776 </div> 2777 2778 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2779 @if (GetBoolean("Item.Area.EcomEnabled")) 2780 { 2781 <div class="row offcanvas-row">&nbsp;</div> 2782 <div class="row offcanvas-row"> 2783 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2784 @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2785 { 2786 <div class="pull-left hidden"> 2787 <a href='Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]' class="btn btn-sm btn-default">@Translate("Sign in", "Sign in")</a> 2788 <a href='Default.aspx?ID=@Pageview.Area.Item["SignUpPageId"]' class="btn btn-sm btn-default">@Translate("Opret brugerprofil", "Opret brugerprofil")</a> 2789 </div> 2790 2791 } 2792 2793 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2794 { 2795 <div class="pull-left"> 2796 <a href='Default.aspx?ID=@Pageview.Area.Item["OrdersPageId"]' class="btn btn-sm btn-default"> 2797 <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong> 2798 </a> 2799 </div> 2800 <div class="pull-left"> 2801 <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> 2802 </div> 2803 } 2804 2805 </div> 2806 </div> 2807 <div class="row offcanvas-row">&nbsp;</div> 2808 } 2809 </div> 2810 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2811 @if (deviceType == "Mobile") 2812 { 2813 if ((GetLoop("DWExtranetSecondaryUsers").Count > 0 || !string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID")))) 2814 { 2815 2816 <div class="impersonation-box" role="navigation"> 2817 <div class=""> 2818 @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) 2819 { 2820 <div class="text-center"> 2821 <span>@Translate("Select the customer to manage", "Select the customer to manage")</span>&nbsp; &nbsp; 2822 &nbsp; 2823 <a href="/Default.aspx?ID=@ImpersonationPage" class="btn btn-dw-primary impresonateButton">@Translate("Impersonation page")</a> 2824 </div> 2825 } 2826 else 2827 { 2828 <form method="post" class="form-inline text-center" id="form-impersonate"> 2829 @{ 2830 User impUser = User.GetUserByID(GetInteger("DW_extranet_AccessUserID")); 2831 string impersonateUser = Translate("You are currently logged in as", "You are currently logged in as") + " " + @GetGlobalValue("Global:Extranet.SecondaryUser.UserName"); 2832 string stopImpersonateTranslation = @Translate("Logout", "Logout"); 2833 } 2834 2835 <span title="@impersonateUser" class="impersonate-user"> 2836 <i class="fa fa-user-secret"></i> @impersonateUser &nbsp; 2837 </span> 2838 <input type="hidden" name="DWExtranetRemoveSecondaryUser" value='Stop+impersonation'> 2839 <input type="submit" class="btn btn-dw-primary impresonateButton" name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" value="@stopImpersonateTranslation"> 2840 </form> 2841 } 2842 2843 </div> 2844 </div> 2845 } 2846 } 2847 2848 </div> 2849 <div class="row offcanvas-row"> 2850 <div class="col-sm-12 col-xs-12 offcanvas-col"> 2851 @GetValue("DwNavigation(drawernavigation)") 2852 2853 2854 </div> 2855 2856 </div> 2857 2858 2859 <div class="langMobile"> 2860 <div class="lang-sug"> 2861 <img class="closeLang" src="/Files/Templates/Designs/Dwsimple/images/icons/close-black.png" alt="close"> 2862 2863 <p>@Translate("Change language", "Change language"):</p> 2864 2865 <ul class="langMenu langMobile"> 2866 2867 @foreach (var lang in GetLoop("WebsiteLanguages")) 2868 { 2869 2870 string isActive = (lang.GetBoolean("IsCurrent") ? "activeArea" : ""); 2871 2872 <li class="@isActive"> 2873 2874 @{ 2875 string langCode = lang.GetString("Culture").Substring(0, 2).ToLower(); 2876 2877 if (lang.GetBoolean("IsCurrent")) 2878 { 2879 <a data-lang="current" data-code="@langCode" class="activeArea langSelected" href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'> 2880 @lang.GetString("Name") 2881 2882 </a> 2883 2884 } 2885 else 2886 { 2887 <a class="langSelected" data-lang="none" data-code="@langCode" href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'> 2888 @lang.GetString("Name") 2889 2890 </a> 2891 2892 } 2893 } 2894 </li> 2895 } 2896 2897 </ul> 2898 2899 <div class="container"> 2900 2901 <p>@Translate("Information for your country", "Information for your country"):</p> 2902 <select class="select-lang" onchange="location = this.value;"> 2903 <option selected="" disabled="" hidden="">@Translate("Select country", "Select country")</option> 2904 @foreach (var lang in GetLoop("Item.Area.LandingPages")) 2905 { 2906 2907 <option value='@lang.GetString("Item.Area.LandingPages.Link")' data-lang='@lang.GetString("Item.Area.LandingPages.Title")'>@lang.GetString("Item.Area.LandingPages.Title")</option> 2908 } 2909 </select> 2910 </div> 2911 2912 2913 </div> 2914 <!--Mobile e-learning container--> 2915 <div class="e-learning"> 2916 <img class="closeLearning" src="/Files/Templates/Designs/Dwsimple/images/icons/close-black.png" alt="close"> 2917 2918 <p>@Translate("E-learning login", "E-learning login")</p> 2919 <ul class="e-learning-menu"> 2920 @RenderNavigation(new 2921 { 2922 id = "topELearningMenu", 2923 cssclass = " dwnavigation", 2924 template = "SpecialNavigationELearning.xslt", 2925 parenttag = "SpecialNavigation1" 2926 }) 2927 </ul> 2928 <div class=""> 2929 2930 <p>@Translate("I'm new. What is this?", "I'm new. What is this?")</p> 2931 <ul class="e-learning-menu"> 2932 @RenderNavigation(new 2933 { 2934 id = "topELearningMenu", 2935 cssclass = " dwnavigation", 2936 template = "SpecialNavigationELearning.xslt", 2937 parenttag = "SpecialNavigation2" 2938 }) 2939 </ul> 2940 2941 </div> 2942 </div> 2943 <!--End Mobile e-learning container--> 2944 2945 </div> 2946 <div> 2947 <ul class="top-menu"> 2948 @if (!string.IsNullOrWhiteSpace(landingPageLink)) 2949 { 2950 <li class="landingpageLink"> 2951 <a href="@landingPageLink" title=""> 2952 <span style="color:red; font-weight:bolder;">@landingPageText</span> 2953 </a> 2954 </li> 2955 } 2956 @if (!string.IsNullOrWhiteSpace(downloadLink)) 2957 { 2958 <li class="downloadsLink"> 2959 2960 <a href="Default.aspx?ID=@downloadLink" title=""> 2961 <span><i class="fa fa-arrow-circle-down" aria-hidden="true"></i> @Translate("Downaloads", "Downaloads")</span> 2962 </a> 2963 </li> 2964 } 2965 2966 <li class="LangLing"> 2967 <a href="#"> 2968 <span><i class="fa fa-globe" aria-hidden="true"></i> @Translate("Languages", "Languages")</span> 2969 </a> 2970 </li> 2971 2972 <!--Mobile e-learning link--> 2973 <li class="eLearninglink"> 2974 <a href="#" title='@Translate("eLearning","eLearning")'> 2975 <span><img src="/Admin/Public/GetImage.ashx?width=30&amp;height=20&amp;crop=7&amp;Compression=99&amp;image=Files/Images/Ecom/eLearning.png" alt='@Translate("eLearning","eLearning")'> @Translate("eLearning", "eLearning")</span> 2976 </a> 2977 </li> 2978 <!--End Mobile e-learning link--> 2979 <!-- Ecommerce user menu --> 2980 @if (GetBoolean("Item.Area.EcomEnabled")) 2981 { 2982 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2983 { 2984 <text> 2985 <li class="LoginLink"> 2986 <a href='Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]'> 2987 2988 <span><i class="fa fa-shopping-cart"></i>@Translate("eCommerce", "eCommerce")</span> 2989 </a> 2990 </li> 2991 2992 </text> 2993 } 2994 2995 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2996 { 2997 <text> 2998 <li class="loggedIn"> 2999 <a href='Default.aspx?ID=@Pageview.Area.Item["UserProfilePageId"]'> 3000 <nobr> 3001 <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong> 3002 </nobr> 3003 </a> 3004 </li> 3005 <li> 3006 <a href='/Admin/Public/ExtranetLogoff.aspx?ID=@logoutid'>@Translate("Logout", "Logout")</a> 3007 </li> 3008 </text> 3009 } 3010 } 3011 3012 <!-- Ecommerce Cart --> 3013 3014 </ul> 3015 3016 </div> 3017 </div> 3018 3019 <!-- HEADER AND CONTENT--> 3020 3021 <div class="body-wrap shad @GeneralSettings.Site.LayoutMode"> 3022 3023 <!-- HEADER --> 3024 <div id="divHeaderWrapper"> 3025 <header class="@GeneralSettings.Header.Classes header"> 3026 <div class="headerLeft pull-left"> 3027 <!-- TOP HEADER --> 3028 @if (GeneralSettings.Header.Show) 3029 { 3030 <div class="top-header"> 3031 <div class="row"> 3032 <div class="lang-sug" style="display: none;"> 3033 <img class="closeLang" src="/Files/Templates/Designs/Dwsimple/images/icons/close-black.png" alt="close"> 3034 <div class="container"> 3035 3036 <p>@Translate("Change language", "Change language"):</p> 3037 3038 <div id="partnercountry"> 3039 3040 </div> 3041 <ul class="langMenu"> 3042 @foreach (var lang in GetLoop("WebsiteLanguages")) 3043 { 3044 3045 string isActive = (lang.GetBoolean("IsCurrent") ? "activeArea" : ""); 3046 3047 <li id='@lang.GetValue("ID")area' class="@isActive"> 3048 3049 @{ 3050 string langCode = lang.GetString("Culture").Substring(0, 2).ToLower(); 3051 3052 if (lang.GetBoolean("IsCurrent")) 3053 { 3054 <a data-lang="current" data-code="@langCode" class="activeArea langSelected" href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'> 3055 @lang.GetString("Name") 3056 3057 </a> 3058 3059 } 3060 else 3061 { 3062 <a class="langSelected" data-lang="none" data-code="@langCode" href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'> 3063 @lang.GetString("Name") 3064 3065 </a> 3066 3067 } 3068 } 3069 </li> 3070 } 3071 3072 </ul> 3073 3074 </div> 3075 3076 <div class="container" style="margin-top: 13px;"> 3077 <p>@Translate("Information for your country", "Information for your country"):</p> 3078 <select style="margin-top: 0px;" class="select-lang" id="select-lang" onchange="location = this.value;"> 3079 <option>@Translate("Select country", "Select country")</option> 3080 @foreach (var lang in GetLoop("Item.Area.LandingPages")) 3081 { 3082 3083 <option value='@lang.GetString("Item.Area.LandingPages.Link")' data-lang='@lang.GetString("Item.Area.LandingPages.Title")'>@lang.GetString("Item.Area.LandingPages.Title")</option> 3084 } 3085 </select> 3086 </div> 3087 3088 </div> 3089 <div class="e-learning" style="display: none;"> 3090 <img class="closeLearning" src="/Files/Templates/Designs/Dwsimple/images/icons/close-black.png" alt="close"> 3091 <div class="container"> 3092 3093 <p>@Translate("E-learning login", "E-learning login")</p> 3094 <ul class="e-learning-menu"> 3095 @RenderNavigation(new 3096 { 3097 id = "topELearningMenu", 3098 cssclass = " dwnavigation", 3099 template = "SpecialNavigationELearning.xslt", 3100 parenttag = "SpecialNavigation1" 3101 }) 3102 </ul> 3103 3104 3105 3106 </div> 3107 <div class="container"> 3108 3109 <p>@Translate("I'm new. What is this?", "I'm new. What is this?")</p> 3110 <ul class="e-learning-menu"> 3111 @RenderNavigation(new 3112 { 3113 id = "topELearningMenu", 3114 cssclass = " dwnavigation", 3115 template = "SpecialNavigationELearning.xslt", 3116 parenttag = "SpecialNavigation2" 3117 }) 3118 </ul> 3119 </div> 3120 </div> 3121 </div> 3122 <div class="row"> 3123 <div class="col-md-1 col-sm-4 col-xs-2 logobox"> 3124 @if (GeneralSettings.Header.Mode == "solid") 3125 { 3126 <a href="/Default.aspx?ID=@firstpageid" class="brand"> 3127 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 3128 { 3129 <img class="img-responsive dw-logoimage pull-left" src="@GeneralSettings.Logo.Image" alt="Logo"> 3130 } 3131 3132 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text)) 3133 { 3134 <div class="dw-logotext pull-left">@GeneralSettings.Logo.Text</div> 3135 } 3136 </a> 3137 3138 if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Slogan)) 3139 { 3140 <div class="dw-slogantext pull-left">@GeneralSettings.Logo.Slogan</div> 3141 } 3142 } 3143 </div> 3144 <div class="col-md-11 col-sm-8 col-xs-10 logobox hidePrint"> 3145 <div class="row"> 3146 <div class="col-md-12 col-xs-2 col-sm-12 col-lg-12 hidden-xs hidden-sm search-right"> 3147 @{ 3148 var columnUser = "col-md-11"; 3149 } 3150 @if (GetGlobalValue("Global:Extranet.UserID") != "0") 3151 { 3152 columnUser = "col-md-10"; 3153 } 3154 <div class="@columnUser pull-left navBar"> 3155 <nav class="top-header-menu hidden-sm hidden-xs"> 3156 3157 <ul class="top-menu"> 3158 @if (!string.IsNullOrWhiteSpace(landingPageLink)) 3159 { 3160 <li class="landingpageLink"> 3161 <a href="@landingPageLink" title=""> 3162 <span style="color:red; font-weight:bolder;">@landingPageText</span> 3163 </a> 3164 </li> 3165 } 3166 3167 @if (!string.IsNullOrWhiteSpace(downloadLink)) 3168 { 3169 <li class="downloadsLink"> 3170 <a href="Default.aspx?ID=@downloadLink" title=""> 3171 <span><i class="fa fa-arrow-circle-down" aria-hidden="true"></i> @Translate("Downaloads", "Downaloads")</span> 3172 </a> 3173 </li> 3174 } 3175 <li class="LangLing"> 3176 <a href="#"> 3177 <span><i class="fa fa-globe" aria-hidden="true"></i> @Translate("Languages", "Languages")</span> 3178 </a> 3179 </li> 3180 <li class="eLearninglink"> 3181 <a href="#" title='@Translate("eLearning","eLearning")'> 3182 <span><img src="/Admin/Public/GetImage.ashx?width=35&amp;height=25&amp;crop=7&amp;Compression=99&amp;image=Files/Images/Ecom/eLearning.png" alt='@Translate("eLearning","eLearning")'> @Translate("eLearning", "eLearning")</span> 3183 </a> 3184 </li> 3185 3186 <!-- Ecommerce user menu --> 3187 @if (GetBoolean("Item.Area.EcomEnabled")) 3188 { 3189 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 3190 { 3191 <text> 3192 <li class="LoginLink"> 3193 <a href='Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]'> 3194 <span><i class="fa fa-shopping-cart"></i>@Translate("eCommerce")</span> 3195 </a> 3196 </li> 3197 </text> 3198 } 3199 3200 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 3201 { 3202 <text> 3203 3204 <li class="loggedIn"> 3205 <a href='Default.aspx?ID=@Pageview.Area.Item["UserProfilePageId"]'> 3206 <nobr> 3207 <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong> 3208 </nobr> 3209 </a> 3210 </li> 3211 <li class="myProductsLink"> 3212 <a href="Default.aspx?ID=@myProductsPage" title=""> 3213 <i class="fa fa-list"></i> 3214 <span>@Translate("My products", "My products")</span> 3215 </a> 3216 </li> 3217 <li class="logOut"> 3218 <a href='/Admin/Public/ExtranetLogoff.aspx?'> 3219 <i class="fa fa-sign-out"></i> 3220 @Translate("Logout", "Logout") 3221 </a> 3222 </li> 3223 </text> 3224 } 3225 } 3226 3227 <!-- Ecommerce Cart --> 3228 3229 </ul></nav> 3230 <!-- MAIN NAV --> 3231 @{ 3232 var sticky = GeneralSettings.Navigation.StickyMenu; 3233 var stickyTrigger = "affix"; 3234 var navbarpos = GeneralSettings.Navigation.Position; 3235 var selectionstyle = GeneralSettings.Navigation.SelectionStyle; 3236 3237 if (sticky == "off") 3238 { 3239 stickyTrigger = ""; 3240 } 3241 } 3242 3243 <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"> 3244 3245 @if (GeneralSettings.Header.Mode != "solid" || !GeneralSettings.Header.Show) 3246 { 3247 <div class="navbar-header pull-@GeneralSettings.Navigation.InvertedPosition"> 3248 <div class="hidden-sm hidden-xs"> 3249 <a href="/Default.aspx?ID=@firstpageid" class="brand"> 3250 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 3251 { 3252 if (GeneralSettings.Logo.ContrastImage != GeneralSettings.Logo.Image) 3253 { 3254 <img class="img-responsive dw-logoimage dw-logoimage-normal pull-left" src="@GeneralSettings.Logo.Image" alt="Logo"> 3255 <img class="img-responsive dw-logoimage dw-logoimage-contrast pull-left" src="@GeneralSettings.Logo.ContrastImage" alt="Logo"> 3256 } 3257 else 3258 { 3259 <img class="img-responsive dw-logoimage pull-left" src="@GeneralSettings.Logo.Image" alt="Logo"> 3260 } 3261 } 3262 3263 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text)) 3264 { 3265 <div class="dw-logotext pull-left">@GeneralSettings.Logo.Text</div> 3266 } 3267 </a> 3268 3269 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Slogan)) 3270 { 3271 <div class="dw-slogantext pull-left">@GeneralSettings.Logo.Slogan</div> 3272 } 3273 </div> 3274 </div> 3275 } 3276 3277 @if (GeneralSettings.Header.Mode != "mobile") 3278 { 3279 3280 <!-- Big screen header --> 3281 <div class="navbar-navigation"> 3282 <div class="hidden-sm hidden-xs"> 3283 <nav class="col-md-10 col-sm-10 col-xs-10 p-0 navbar-collapse collapse navbar-@navbarpos"> 3284 3285 3286 @if (GeneralSettings.Navigation.IsMegamenu) 3287 { 3288 3289 @GetValue("DwNavigation(topnavigationmegamenu)") 3290 } 3291 3292 <!-- Extra navigation when no header is shown --> 3293 @if (GetBoolean("Item.Area.EcomEnabled")) 3294 { 3295 if (!GeneralSettings.Header.Show) 3296 { 3297 <ul class="nav navbar-nav"> 3298 <li>&nbsp;&nbsp;&nbsp;</li> 3299 @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 3300 { 3301 <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> 3302 <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> 3303 } 3304 3305 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 3306 { 3307 <li class="dw-navbar-button"> 3308 <a href='Default.aspx?ID=@Pageview.Area.Item["OrdersPageId"]' data-hover="dropdown"> 3309 <nobr> 3310 <strong><i class="fa fa-user"></i></strong> 3311 </nobr> 3312 <span></span> 3313 </a> 3314 </li> 3315 <li class="dw-navbar-button"> 3316 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID" data-hover="dropdown"><i class="fa fa-sign-out"></i><span></span></a> 3317 </li> 3318 } 3319 3320 </ul> 3321 } 3322 3323 if (GeneralSettings.Header.Mode != "solid") 3324 { 3325 <ul class="nav navbar-nav"> 3326 <li class="dropdown dropdown-aux animate-click dw-navbar-button" data-animate-in="animated bounceInUp" data-animate-out="animated fadeOutDown" style="z-index:500;"> 3327 <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown"><i class="fa fa-search"></i><span></span></a> 3328 <ul class="dropdown-menu dropdown-menu-user animate-wr"> 3329 <li id="dropdownForm"> 3330 <div class="dropdown-form"> 3331 <form class="form-light p-15" role="form" method="get" action="Default.aspx"> 3332 <input type="hidden" name="ID" value='@searchpage'> 3333 <div class="input-group remote"> 3334 <input type="hidden" name="qurlencoded" id="qurlencoded" value=''> 3335 <input type="text" class="form-control typeahead" name="q" placeholder="@searchplaceholder" data-encode=""> 3336 <span class="input-group-btn" style="top:-1px !important;"> 3337 <button class="btn btn-base" type="submit"><i class="fa fa-search"></i></button> 3338 </span> 3339 </div> 3340 </form> 3341 </div> 3342 </li> 3343 </ul> 3344 </li> 3345 </ul> 3346 } 3347 } 3348 </nav> 3349 </div> 3350 3351 </div> 3352 } 3353 else 3354 { 3355 <!-- Using only mobile navigation --> 3356 <div class="pull-@GeneralSettings.Navigation.Position"> 3357 <ul class="nav navbar-nav"> 3358 <li class="dw-navbar-button" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body"> 3359 <a><i class="fa fa-bars fa-2x"></i><span></span></a> 3360 </li> 3361 </ul> 3362 </div> 3363 } 3364 </div> 3365 </div> 3366 @if (GetGlobalValue("Global:Extranet.UserID") != "0") 3367 { 3368 <div class="searchIcon hidden-xs hidden-sm pull-right miniCartHover"> 3369 <span class="buttonIconSearch cart-icon"> 3370 <a href="Default.aspx?ID=@cartid" id="minipagecart-extra" data-hover="dropdown"> 3371 <i class="fa fa-shopping-cart fa-1_5x"></i> 3372 3373 @if (@GetValue("Ecom:Order.OrderLines.TotalProductQuantity") != null) 3374 { 3375 <span>@GetValue("Ecom:Order.OrderLines.TotalProductQuantity")</span> 3376 } 3377 else 3378 { 3379 <span>0</span> 3380 } 3381 3382 </a> 3383 <span class="cartText"> 3384 @Translate("Cart") 3385 </span> 3386 </span> 3387 <div class="minicart"> 3388 @MiniCart() 3389 </div> 3390 </div> 3391 3392 } 3393 3394 <div class="searchIcon hidden-xs hidden-sm pull-right"> 3395 <span class="buttonIconSearch"> 3396 <button class="btn btn-primary searchFieldShow" type="submit"> 3397 <img src="/Files/Templates/Designs/Dwsimple/images/icons/search-white.png" class="img-center" alt=""> 3398 <span> 3399 @Translate("Search", "Search") 3400 </span> 3401 </button> 3402 </span> 3403 </div> 3404 3405 3406 </div> 3407 3408 3409 </div> 3410 3411 <div class="col-xs-12 mobileMenu hidden-md hidden-lg"> 3412 @if (GetGlobalValue("Global:Extranet.UserID") != "0") 3413 { 3414 <span class="buttonIconCart cart-icon"> 3415 <a href="Default.aspx?ID=@cartid" id="minipagecart-extra" data-hover="dropdown"> 3416 <i class="fa fa-shopping-cart fa-1_5x" id="iosCart"></i> 3417 </a> 3418 3419 <span class="cart-quantity" id="miniCartMobile"> 3420 @if (@GetValue("Ecom:Order.OrderLines.TotalProductQuantity") != null) 3421 { 3422 @GetValue("Ecom:Order.OrderLines.TotalProductQuantity") 3423 } 3424 else 3425 { 3426 <text>0</text> 3427 } 3428 </span> 3429 3430 </span> 3431 } 3432 3433 3434 <span class="buttonIconSearch pull-right "> 3435 <button class="btn btn-primary searchFieldShow" type="submit"> 3436 <img src="/Files/Templates/Designs/Dwsimple/images/icons/search-white.png" class="img-center" alt=""> 3437 <span> 3438 @Translate("Search", "Search") 3439 </span> 3440 </button> 3441 </span> 3442 3443 <!-- Small screen header --> 3444 <div class="hidden-md hidden-lg "> 3445 <div class="pull-right hamb"> 3446 <button type="button" class="btn btn-sm btn-base" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body"> 3447 <img src="/Files/Templates/Designs/Dwsimple/images/icons/hamburger.png" class="img-center" alt=""> 3448 <span> 3449 @Translate("Menu", "Menu") 3450 </span> 3451 </button> 3452 </div> 3453 @if (GetGlobalValue("Global:Extranet.UserID") == "0") 3454 { 3455 <span class="pull-right "> 3456 <a href="Default.aspx?ID=8482"> 3457 <span><i class="fa fa-shopping-cart" style="color: #eb0029; font-size: 2.3em; padding: .34em;"></i></span> 3458 </a> 3459 </span> 3460 } 3461 3462 <span class="pull-right "> 3463 <a href="@eLearninglink" title='@Translate("eLearning","eLearning")' target="_blank"> 3464 <span style="display: inline-block;line-height: 60px;vertical-align: middle;width: 60px;padding-left:5px"><img src="/Admin/Public/GetImage.ashx?width=43&amp;height=33&amp;crop=7&amp;Compression=99&amp;image=Files/Images/Ecom/eLearning.png" alt='@Translate("eLearning","eLearning")'> </span> 3465 </a> 3466 </span> 3467 3468 3469 <div class="pull-left hidden-xs hidden-sm"> 3470 <h2 class="dw-header-sm-title">@GetGlobalValue("Global:Page.Top.Name")</h2> 3471 </div> 3472 3473 3474 3475 @if (GetBoolean("Item.Area.EcomEnabled")) 3476 { 3477 3478 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 3479 { 3480 <div class="hidden-xs pull-right hidden-sm"> 3481 <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> 3482 &nbsp; 3483 </div> 3484 <div class="hidden-xs pull-right userNameBox"> 3485 <a href='Default.aspx?ID=@Pageview.Area.Item["UserProfilePageId"]' class="btn btn-sm btn-base"> 3486 <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong> 3487 </a> 3488 &nbsp; 3489 </div> 3490 } 3491 3492 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 3493 { 3494 <div class="hidden-xs pull-right hidden-sm"> 3495 <a href='Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]' class="btn btn-sm btn-base"><i class="fa fa-sign-in"></i></a> 3496 &nbsp; 3497 </div> 3498 } 3499 } 3500 </div> 3501 <div class="clearfix"></div> 3502 </div> 3503 3504 </div> 3505 <div class="clearfix"></div> 3506 </div> 3507 3508 </div> 3509 } 3510 3511 3512 3513 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.HeaderLayoutImage"))) 3514 { 3515 if (currentpageid != firstpageid) 3516 { 3517 var coverimage = GetString("Item.Area.HeaderLayoutImage"); 3518 3519 <div class="container-fluid dw-header-image"> 3520 <div class="row"> 3521 <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> 3522 </div> 3523 </div> 3524 } 3525 else if (GeneralSettings.Header.ShowFrontpageImage) 3526 { 3527 var coverimage = GetString("Item.Area.HeaderLayoutImage"); 3528 3529 <div class="container-fluid dw-header-image"> 3530 <div class="row"> 3531 <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> 3532 </div> 3533 </div> 3534 } 3535 } 3536 else if (GeneralSettings.Header.Mode != "solid") 3537 { 3538 if (currentpageid != firstpageid) 3539 { 3540 <div class="container-fluid dw-header-image"> 3541 <div class="row"> 3542 <section class="carousel carousel-1 slice fluid" style="height: 160px !important; background-color: transparent; background-size: cover !important;"></section> 3543 </div> 3544 </div> 3545 } 3546 } 3547 3548 </div> 3549 <div class="clearfix"></div> 3550 @if (deviceType != "Mobile") 3551 { 3552 if ((GetLoop("DWExtranetSecondaryUsers").Count > 0 || !string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID")))) 3553 { 3554 3555 <div class="impersonation-box" role="navigation"> 3556 <div class=""> 3557 @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) 3558 { 3559 <div class="pull-left"> 3560 <span>@Translate("Select the customer to manage", "Select the customer to manage")</span>&nbsp; &nbsp; 3561 &nbsp; 3562 <a href="/Default.aspx?ID=@ImpersonationPage" class="btn btn-dw-primary impresonateButton">@Translate("Impersonation page")</a> 3563 </div> 3564 } 3565 else 3566 { 3567 <form method="post" class="form-inline" id="form-impersonate"> 3568 @{ 3569 User impUser = User.GetUserByID(GetInteger("DW_extranet_AccessUserID")); 3570 string impersonateUser = Translate("You are currently logged in as", "You are currently logged in as") + " " + @GetGlobalValue("Global:Extranet.Name"); 3571 string stopImpersonateTranslation = @Translate("Logout", "Logout"); 3572 } 3573 3574 <span title="@impersonateUser" class="impersonate-user"> 3575 <i class="fa fa-user-secret"></i> @impersonateUser &nbsp; 3576 </span> 3577 <input type="hidden" name="DWExtranetRemoveSecondaryUser" value='Stop+impersonation'> 3578 <input type="submit" class="btn btn-dw-primary impresonateButton" name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" value="@stopImpersonateTranslation"> 3579 </form> 3580 } 3581 3582 </div> 3583 </div> 3584 } 3585 } 3586 3587 3588 </header> 3589 3590 @if (GetBoolean("Item.Area.EcomEnabled")) 3591 { 3592 if (GeneralSettings.Header.Mode == "solid" && GeneralSettings.Header.Show) 3593 { 3594 <div class="searchRight clearfix"> 3595 <div class="slideToggle col-md-12 col-sm-12"> 3596 <form method="get" action="Default.aspx"> 3597 <input type="hidden" name="ID" value='@searchpage'> 3598 3599 <div id="remote" class="input-group top-search"> 3600 <div class="remoteR"> 3601 <input type="hidden" name="qurlencoded" id="qurlencoded" value=''> 3602 <input type="text" class="form-control typeahead" name="q" tabindex="1" placeholder="@searchplaceholderAll" data-encode=""> 3603 <span class="input-group-btn"> 3604 <button class="btn btn-primary " type="submit"> 3605 <i class="fa fa-angle-double-right"></i> 3606 </button> 3607 </span> 3608 </div> 3609 </div> 3610 </form> 3611 </div> 3612 </div> 3613 <div class="clearfix"></div> 3614 3615 } 3616 3617 } 3618 @{ 3619 var current = ""; 3620 var currentWhole = ""; 3621 } 3622 @foreach (var lang in GetLoop("Languages")) 3623 { 3624 if (lang.GetBoolean("IsCurrent")) 3625 { 3626 string input = lang.GetString("Culture"); 3627 int index = input.IndexOf("-"); 3628 if (index > 0) 3629 { 3630 current = input.Substring(0, index); 3631 } 3632 currentWhole = lang.GetString("Culture").ToLower(); 3633 } 3634 } 3635 </div> 3636 <!-- 3637 </div> 3638 <!-- MAIN CONTENT --> 3639 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 3640 3641 3642 @GetValue("Title(Full width page)") 3643 @GetValue("Description(Use this page for full width pages with no left navigation.)") 3644 3645 3646 @{ 3647 string siteurl = GetGlobalValue("Global:Request.Url").ToString(); 3648 } 3649 3650 @if (GetBoolean("Item.Page.LayoutShowBreadcrumb")) 3651 { 3652 <div class="pg-opt pin white hidden-xs"> 3653 3654 <div class="breadcrumbSection"> 3655 @if (!GetBoolean("Item.Page.LayoutHideLeftMenu")) 3656 { 3657 3658 <div class="col-lg-3 col-md-3 hidden-sm hidden-xs"> 3659 @if (GeneralSettings.Navigation.BreadcrumbMode != "light") 3660 { 3661 <div class="dw-breadcrumb-title">@GetGlobalValue("Global:Page.Top.Name")</div> 3662 } 3663 </div> 3664 } 3665 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 "> 3666 <a href="#" class="goHome">@Translate("Takes you home", "Takes you home"):</a> 3667 @GetValue("DwNavigation(breadcrumb)") 3668 </div> 3669 </div> 3670 3671 </div> 3672 } 3673 3674 3675 <section class="slice white animate-hover-slide"> 3676 <div class="container"> 3677 3678 3679 <div class="row"> 3680 @RenderSnippet("quickBuySearc") 3681 @if (!GetBoolean("Item.Page.LayoutHideLeftMenu")) 3682 { 3683 <br> 3684 <div class="col-md-3 hidden-sm hidden-xs"> 3685 <div class="widget"> 3686 <h3 class="dw-section-title dw-section-title-small"><span>@GetGlobalValue("Global:Page.Top.Name")</span></h3> 3687 &nbsp; 3688 @GetValue("DwNavigation(leftnavigation)") 3689 </div> 3690 <p>&nbsp;</p> 3691 </div> 3692 } 3693 3694 @*The content*@ 3695 @{ 3696 var attributeValue = "col-md-9 col-sm-12 col-xs-12"; 3697 3698 if (GetBoolean("Item.Page.LayoutHideLeftMenu")) 3699 { 3700 attributeValue = "col-md-12 col-sm-12 col-xm-12"; 3701 } 3702 } 3703 3704 <div class="@attributeValue"> 3705 <div class="row" id="maincontent">@GetValue("DwContent(maincontent)")</div> 3706 </div> 3707 3708 @*Facebook like button*@ 3709 @if (GetBoolean("Item.Page.FacebookLikeButton")) 3710 { 3711 <div class="container"> 3712 <div class="col-md-12 col-sm-12 col-xs-12"> 3713 <div class="row"> 3714 <iframe src="//www.facebook.com/plugins/like.php?href=@siteurl&amp;width=200&amp;layout=button_count&amp;action=recommend&amp;show_faces=true&amp;share=true&amp;height=21" style="border:none; overflow:hidden; height:21px;"></iframe> 3715 </div> 3716 </div> 3717 </div> 3718 } 3719 </div> 3720 </div> 3721 </section> 3722 @if (GetBoolean("Item.Page.SkipToBottom")) 3723 { 3724 3725 <a href="javascript:;" id="scrollToTop" class="hidden hidden-sm hidden-xs"><i class="fa fa-angle-double-up" aria-hidden="true"></i></a> 3726 <a href="javascript:;" id="scrollToBottom" class="hidden hidden-sm hidden-xs"><i class="fa fa-angle-double-down" aria-hidden="true"></i></a> 3727 3728 @SnippetStart("JavaScriptBottom") 3729 <script type="text/javascript"> 3730 if ($(window).scrollTop() == 0) { 3731 $('#scrollToTop').addClass("hidden"); 3732 $('#scrollToBottom').removeClass("hidden"); 3733 } 3734 if ($(window).scrollTop() + $(window).height() >= $(document).height()) { 3735 $('#scrollToTop').removeClass("hidden"); 3736 $('#scrollToBottom').addClass("hidden"); 3737 } 3738 $(function () { 3739 $('#scrollToBottom').bind("click", function () { 3740 $('html, body').animate({ scrollTop: $(document).height() }, 1200); 3741 $('#scrollToTop').removeClass("hidden"); 3742 $('#scrollToBottom').addClass("hidden"); 3743 return false; 3744 }); 3745 $('#scrollToTop').bind("click", function () { 3746 $('html, body').animate({ scrollTop: 0 }, 1200); 3747 $('#scrollToTop').addClass("hidden"); 3748 $('#scrollToBottom').removeClass("hidden"); 3749 return false; 3750 }); 3751 }); 3752 </script> 3753 @SnippetEnd("JavaScriptBottom") 3754 } 3755 3756 <!-- FOOTER --> 3757 <div class="body-wrap @GeneralSettings.Site.LayoutMode"> 3758 3759 <footer class="footer"> 3760 <div class="socialFooter"> 3761 <div class="container"> 3762 @if (GetBoolean("Item.Area.SocialLinksInFooter")) 3763 { 3764 string sicon = ""; 3765 string slink = ""; 3766 <p> 3767 @foreach (LoopItem socialitem in GetLoop("Item.Area.SocialIconInFooter")) 3768 { 3769 3770 sicon = socialitem.GetString("Item.Area.SocialIconInFooter.Icon"); 3771 slink = socialitem.GetString("Item.Area.SocialIconInFooter.Link"); 3772 if (slink != "") 3773 { 3774 <a href="@slink" target="_blank"><img class="img-responsive" src="@sicon" alt="Logo"></a> 3775 } 3776 3777 3778 } 3779 </p> 3780 } 3781 3782 </div> 3783 </div> 3784 @if (GetBoolean("Item.Area.FooterShowContactInfo")) 3785 { 3786 <div class="text-footer-section"> 3787 <div class="container"> 3788 <h3>@GetString("Item.Area.FooterCompanyName")</h3> 3789 @GetString("Item.Area.FooterAddress") 3790 3791 </div> 3792 </div> 3793 } 3794 <div class="footer-menu"> 3795 <div class="container"> 3796 <div class="footer-logo"> 3797 @{ 3798 var logofooter = GetString("Item.Area.FooterLogo"); 3799 string firstpageidFooter = GetString("DwAreaFirstActivePageID"); 3800 } 3801 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.FooterLogo"))) 3802 { 3803 <a href="/Default.aspx?ID=@firstpageidFooter" class="brand"> 3804 <img class="img-responsive" src="@logofooter" alt="Logo footer"> 3805 </a> 3806 } 3807 3808 </div> 3809 <div class="footer-links"> 3810 <ul> 3811 @foreach (LoopItem linksfooter in GetLoop("Item.Area.FooterLinks")) 3812 { 3813 3814 var footertitle = linksfooter.GetString("Item.Area.FooterLinks.Title"); 3815 var footerlinks = linksfooter.GetString("Item.Area.FooterLinks.Link.Value"); 3816 3817 if (@footerlinks != "") 3818 { 3819 <li> 3820 3821 3822 <a href="@footerlinks">@footertitle</a> 3823 3824 </li> 3825 } 3826 } 3827 </ul> 3828 3829 </div> 3830 3831 3832 @if (GetBoolean("Item.Area.FooterNewsletterSignUp")) 3833 { 3834 3835 string newsletter = GetString("Item.Area.SignUpId"); 3836 <div class="col-md-3 col-sm-6 col-xs-12"> 3837 <div class="col"> 3838 <h4>@Translate("Mailing list", "Mailing list")</h4> 3839 <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> 3840 <!--$$Global:Paragraph.Content(11828)--> 3841 <div class="newsketterThankYou"> 3842 <div class="newsketterThankYou" style="display: none;">@Translate("Thank you", "Thank you")</div> 3843 </div> 3844 </div> 3845 </div> 3846 } 3847 3848 3849 3850 @if (GetBoolean("Item.Area.FooterShowSitemap")) 3851 { 3852 <div class="col-md-6 col-sm-12 col-xs-12"> 3853 <div class="col"> 3854 @GetValue("DwNavigation(footersitemap)") 3855 </div> 3856 <div>&nbsp;</div> 3857 </div> 3858 } 3859 3860 @*<div class="row"> 3861 @if (GetString("Item.Area.WebmasterLinkCode") != "") 3862 { 3863 <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3"> 3864 <div class="col pull-right"> 3865 @{ 3866 var webmasterlink = GetString("Item.Area.WebmasterLinkCode"); 3867 var username = GetValue("Item.Area.FooterEmail"); 3868 var pagename = GetGlobalValue("Global:Page.Name"); 3869 } 3870 3871 <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> 3872 </div> 3873 </div> 3874 } 3875 </div>*@ 3876 </div> 3877 </div> 3878 </footer> 3879 3880 </div> 3881 3882 3883 <!--[if IE]> 3884 <style> 3885 3886 .widget.affix{ 3887 3888 width:21% !important; 3889 3890 } 3891 3892 3893 </style> 3894 <![endif]--> 3895 3896 <script type="text/javascript"> 3897 $(document).ready(function () { 3898 MiniCartInit(@miniCartFeedPageId, @ProductPageId); 3899 if ($('.fancybox').length) { 3900 $(".fancybox").fancybox(); 3901 } 3902 }); 3903 </script> 3904 3905 3906 <!-- Essentials --> 3907 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"></script> 3908 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script> 3909 <script src="//cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.js"></script> 3910 <script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script> 3911 <script src="//connect.facebook.net/en_US/sdk.js"></script> 3912 <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> 3913 <script src="/Files/Templates/Designs/Dwsimple/js/typeahead.js"></script> 3914 3915 <script src="/Files/Templates/Designs/Dwsimple/js/codebird.js"></script> 3916 <script src="/Files/Templates/Designs/Dwsimple/js/jquery.socialfeed.js"></script> 3917 <script src="/Files/Templates/Designs/Dwsimple/js/doT.min.js"></script> 3918 <script src="/Files/Templates/Designs/Dwsimple/js/moment.min.js"></script> 3919 3920 <script src="/Files/Templates/Designs/Dwsimple/js/owl.carousel.js"></script> 3921 @*<script src="/Files/Templates/Designs/Dwsimple/js/owl.carousel.min.js"></script>*@ 3922 <script src="/Files/Templates/Designs/Dwsimple/js/custom.js"></script> 3923 <script src="/Files/Templates/Designs/Dwsimple/js/filter.js"></script> 3924 <script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.min.js"></script> 3925 <script src="/Files/Templates/Designs/Dwsimple/js/jquerybxslidermin.js"></script> 3926 3927 3928 <!-- Assets --> 3929 <script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-hover-dropdown/2.0.10/bootstrap-hover-dropdown.min.js"></script> 3930 3931 <script src="//cdnjs.cloudflare.com/ajax/libs/spin.js/2.0.1/spin.min.js"></script> 3932 3933 <!-- Sripts for individual pages, depending on what plug-ins are used --> 3934 <script src="//cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/js/jasny-bootstrap.min.js"></script> 3935 <script src="/Files/Templates/Designs/Dwsimple/js/GeneralMethods.js"></script> 3936 <script src="/Files/Templates/Designs/Dwsimple/js/cart.js"></script> 3937 <!-- Replacing the Home text --> 3938 <script> 3939 3940 $("input.typeahead").on("change", function () { 3941 var qvalue = $(this).val().replace(/æ/g, "&aelig;").replace(/ø/g, "&oslash;").replace(/å/g, "&aring;").replace(/Æ/g, "&AElig;").replace(/Ø/g, "&Oslash;").replace(/Å/g, "&Aring;"); 3942 3943 $(this).siblings("#qurlencoded").val(qvalue) 3944 }) 3945 $("input.typeahead").on("change", function () { 3946 $('input#qurlencoded').val($(this).val()); 3947 }); 3948 </script> 3949 3950 <script type="text/html-template" id="OrderlineAjaxTemplate"> 3951 <tr> 3952 <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> 3953 <td> 3954 <a href="Obj.link"> 3955 Obj.name Obj.variantname 3956 </a> 3957 </td> 3958 <td class="text-center">Obj.quantity</td> 3959 <td class="text-right"> 3960 <nobr> 3961 Obj.totalprice 3962 </nobr> 3963 </td> 3964 </tr> 3965 </script> 3966 3967 @* INITIALIZE SCROLLING NAVIGATION *@ 3968 @if (GeneralSettings.Navigation.IsAnimateNavigation && Pageview.Device.ToString() == "Desktop") 3969 { 3970 <script> 3971 // Hide Header on on scroll down 3972 var didScroll; 3973 var lastScrollTop = 0; 3974 var delta = 5; 3975 var navbarHeight = $('header').outerHeight(); 3976 3977 //$(window).scroll(function (event) { 3978 // didScroll = true; 3979 //}); 3980 3981 //setInterval(function () { 3982 // if (didScroll) { 3983 // hasScrolled(); 3984 // didScroll = false; 3985 // } 3986 //}, 250); 3987 3988 function hasScrolled() { 3989 var st = $(this).scrollTop(); 3990 var $megamenu = $('#topnavigationmegamenu > li.dropdown.ParentShow .dropdown-menu'), 3991 $search = $('.searchRight .slideToggle'), 3992 $isSearchOpen = ($search.is('.open') ? true : false); 3993 // Make sure they scroll more than delta 3994 if (Math.abs(lastScrollTop - st) <= delta) 3995 return; 3996 3997 // If they scrolled down and are past the navbar, add class .nav-up. 3998 // This is necessary so you never see what is "behind" the navbar. 3999 if (st > lastScrollTop && st > navbarHeight) { 4000 // Scroll Down 4001 $('header').removeClass('nav-down').addClass('nav-up'); 4002 $megamenu.css('top', '0').fadeOut(); 4003 if ($isSearchOpen) $search.fadeOut(); 4004 } else { 4005 // Scroll Up 4006 if (st + $(window).height() < $(document).height()) { 4007 $('header').removeClass('nav-up').addClass('nav-down'); 4008 $megamenu.fadeIn().css('top', '107px'); 4009 if ($isSearchOpen) $search.fadeIn(); 4010 } 4011 } 4012 lastScrollTop = st; 4013 } 4014 4015 </script> 4016 } 4017 4018 @RenderSnippet("JavaScriptBottom") 4019 4020 4021 <script> 4022 $(document).ready(function () { 4023 $('.nav-stacked .offcanvas-menubtn').has('ul').addClass('innerMenuMobile'); 4024 $("<i class='fa fa-plus mobileMenuFix' onclick='toggleCheck(this)'></i>").insertAfter(".offcanvas-col>.nav-stacked>.offcanvas-menubtn.innerMenuMobile>a"); 4025 $(".nav-stacked .0 i").remove(); 4026 }); 4027 </script> 4028 4029 <script> 4030 function toggleCheck(elem) { 4031 jQuery(elem).parent().children("ul").toggle(); 4032 jQuery(elem).toggleClass('fa-plus fa-minus') 4033 } 4034 4035 function toggleCheckTopNav() { 4036 $("#toggleTopNav").children("ul").toggle(); 4037 } 4038 </script> 4039 4040 <script> 4041 4042 var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; 4043 4044 if (iOS == true) { 4045 document.getElementById('iosCart').classList.add('iosCartFix') 4046 } 4047 4048 </script> 4049 4050 4051 @*<script language="JavaScript" src="http://www.geoplugin.net/javascript.gp" type="text/javascript"></script>*@ 4052 </div></body> 4053 </html>