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

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