Exception in template (Designs/Dwsimple/_parsed/fullwidth.parsed.cshtml): System.IO.IOException: The process cannot access the file 'E:\Dynamicweb.net\Solutions\EGBrandsoft\hallbergsplantskola.dw9.dynamicweb-cms.com\files\Templates\Designs\Dwsimple\css\DWGlobalStylesSite1_auto.css' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
   at Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(String value, String path, Boolean appendToFile, Encoding encoding)
   at CompiledRazorTemplates.Dynamic.bbabfdbeebfbaa.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
   at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag)
   at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName)
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()
@inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @using System.Text.RegularExpressions @using System @using System.Web @using System.Globalization; @using System.Text.RegularExpressions @using System.Web @functions{ public class WrapMethods { //Gets the contrasting color public static string getContrastYIQ(string hexcolor) { if (hexcolor != "") { hexcolor = Regex.Replace(hexcolor, "[^0-9a-zA-Z]+", ""); int r = Convert.ToByte(hexcolor.Substring(0, 2), 16); int g = Convert.ToByte(hexcolor.Substring(2, 2), 16); int b = Convert.ToByte(hexcolor.Substring(4, 2), 16); int yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000; if (yiq >= 128) { return "black"; } else { return "white"; } } else { return "black"; } } //Truncate text public static string Truncate (string value, int count, bool strip=true) { if (strip == true){ value = StripHtmlTagByCharArray(value); } if (value.Length > count) { value = value.Substring(0, count - 1) + "..."; } return value; } //Strip text from HTML public static string StripHtmlTagByCharArray(string htmlString) { char[] array = new char[htmlString.Length]; int arrayIndex = 0; bool inside = false; for (int i = 0; i < htmlString.Length; i++) { char let = htmlString[i]; if (let == '<') { inside = true; continue; } if (let == '>') { inside = false; continue; } if (!inside) { array[arrayIndex] = let; arrayIndex++; } } return new string(array, 0, arrayIndex); } //Make the correct count of columns public static string ColumnMaker(int Col, string ScreenSize) { string Columns = ""; switch (Col) { case 1: Columns = "col-"+ScreenSize+"-12"; break; case 2: Columns = "col-"+ScreenSize+"-6"; break; case 3: Columns = "col-"+ScreenSize+"-4"; break; case 4: Columns = "col-"+ScreenSize+"-3"; break; default: Columns = "col-"+ScreenSize+"-3"; break; } return Columns; } private string Custom(string firstoption, string secondoption) { if (firstoption == "custom") { return secondoption; } else { return firstoption; } } } } @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @helper MiniCart() { <div class="dropdown-cart"> <div id="full-cart"> <div class="col-md-12 col-sm-12 col-xs-12"> <div class="row" id="minicart-content"> <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> <table class="table table-cart"> <thead> <tr> <th></th> <th>@Translate("Product", "Product")</th> <th class="text-center">@Translate("Qty", "Qty")</th> <th class="text-right">@Translate("Total", "Total")</th> </tr> </thead> <tbody> @* Orderlines are rendered from the Ajax template *@ </tbody> <tfoot> <tr> <td class="text-center"><i class="fa fa-credit-card"></i></td> <td id="minicart-payment"></td> <td class="text-center"></td> <td class="text-right" id="minicart-paymentfee"></td> </tr> <tr> <td class="text-center"><i class="fa fa-truck"></i></td> <td id="minicart-shipping"></td> <td class="text-center"></td> <td class="text-right" id="minicart-shippingfee"></td> </tr> <tr> <td></td> <td><strong>@Translate("Total", "Total")</strong></td> <td class="text-center" id="minicart-total"></td> <td class="text-right" id="minicart-totalprice"></td> </tr> </tfoot> </table> </div> </div> <div class="col-md-12 col-sm-12 col-xs-12"> <div class="row"> <div class="col-md-8"> <button class="btn btn-xs btn-secondary pull-left" onclick="EmptyCart();">@Translate("Empty cart", "Empty cart")</button> </div> <div class="col-md-4"> @{ var cartid = GetValue("DwAreaCartPageID"); } <a href="Default.aspx?ID=@cartid" class="btn btn-xs btn-primary pull-right">@Translate("Proceed to checkout", "Proceed to checkout")</a> <span class="clearfix"></span> </div> </div> <div class="row">&nbsp;</div> </div> </div> <span class="cart-items" id="empty-cart">@Translate("Your shopping cart is empty", "Your shopping cart is empty")</span> </div> } <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>@GetValue("Title")</title> @GetValue("MetaTags") @GetValue("CopyRightNotice") <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> <meta name="robots" content="index, follow"> @{ string MetaDescription = GetString("Meta.Description"); string MetaKeywords = GetString("Meta.Keywords"); } <!-- Facebook Admin --> @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.FacebookCommendAdmin"))) { string fbadmin = GetString("Item.Area.FacebookCommendAdmin"); <meta property="fb:admins" content="@fbadmin"> } <!-- Essential styles --> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" type="text/css"> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" type="text/css"> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css" media="screen"> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/flag-icon-css/2.5.0/css/flag-icon.min.css" type="text/css"> <!-- Custom styles --> <link rel="stylesheet" href="/Files/Templates/Designs/Dwsimple/css/custom.css" type="text/css"> <!-- Mobile menu styles --> <link href="//cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/css/jasny-bootstrap.min.css" rel="stylesheet" type="text/css" media="screen"> <!-- Favicon --> @{ var favicon = @GetString("Item.Area.Favicon"); } <link href="@favicon" rel="icon" type="image/png"> <!-- Variables --> @{ var attrValue = ""; string currentpageid = GetString("DwPageID"); string firstpageid = GetString("DwAreaFirstActivePageID"); string searchplaceholder = Translate("Search products", "Search products"); var cartid = GetValue("DwAreaCartPageID"); //DateTime areaUpdated = (DateTime)Pageview.Area.get_Value("AreaUpdatedDate"); DateTime areaUpdated = DateTime.Now; string cssPath = HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.min.css"); DateTime lastWriteTime = System.IO.File.GetLastWriteTime(cssPath); bool writeCss = true; string css = String.Empty; //if (areaUpdated > lastWriteTime) //{ // writeCss = true; //} if (areaUpdated > lastWriteTime.AddMinutes(5)) { writeCss = true; } } <!--FONT SETTINGS--> @functions{ public class FontSettings { public class Logo { public static string FontFamily { get; set; } public static string FontSize { get; set; } public static string FontWeight { get; set; } public static string Color { get; set; } public static string LineHeight { get; set; } public static string Casing { get; set; } public static string LetterSpacing { get; set; } } public class Slogan { public static string FontFamily { get; set; } public static string FontSize { get; set; } public static string FontWeight { get; set; } public static string Color { get; set; } public static string LineHeight { get; set; } public static string Casing { get; set; } public static string LetterSpacing { get; set; } } public class H1 { public static string FontFamily { get; set; } public static string FontSize { get; set; } public static string FontWeight { get; set; } public static string Color { get; set; } public static string LineHeight { get; set; } public static string Casing { get; set; } public static string LetterSpacing { get; set; } } public class H2 { public static string FontFamily { get; set; } public static string FontSize { get; set; } public static string FontWeight { get; set; } public static string Color { get; set; } public static string LineHeight { get; set; } public static string Casing { get; set; } public static string LetterSpacing { get; set; } } public class Body { public static string FontFamily { get; set; } public static string FontSize { get; set; } public static string FontWeight { get; set; } public static string Color { get; set; } public static string LineHeight { get; set; } public static string Casing { get; set; } public static string LetterSpacing { get; set; } } } private void InitFontSettings() { //LOGO FontSettings.Logo.FontFamily = CustomFont(GetString("Item.Area.LogoFont.Font"), GetString("Item.Area.LogoFont.CustomFont")); FontSettings.Logo.FontSize = GetString("Item.Area.LogoFont.Size")+"px"; FontSettings.Logo.FontWeight = CheckExistence(GetString("Item.Area.LogoFont.Weight"), "normal"); FontSettings.Logo.LineHeight = CheckExistence(GetString("Item.Area.LogoFont.LineHeight"), "1"); FontSettings.Logo.LetterSpacing = GetString("Item.Area.LogoFont.LetterSpacing") + "px"; FontSettings.Logo.Casing = GetString("Item.Area.LogoFont.Casing"); FontSettings.Logo.Color = GetString("Item.Area.LogoFont.Color.Color"); //SLOGAN FontSettings.Slogan.FontFamily = CustomFont(GetString("Item.Area.LogoSloganFont.Font"), GetString("Item.Area.LogoSloganFont.CustomFont")); FontSettings.Slogan.FontSize = GetString("Item.Area.LogoSloganFont.Size")+"px"; FontSettings.Slogan.FontWeight = CheckExistence(GetString("Item.Area.LogoSloganFont.Weight"), "normal"); FontSettings.Slogan.LineHeight = CheckExistence(GetString("Item.Area.LogoSloganFont.LineHeight"), "1"); FontSettings.Slogan.LetterSpacing = GetString("Item.Area.LogoSloganFont.LetterSpacing") + "px"; FontSettings.Slogan.Casing = GetString("Item.Area.LogoSloganFont.Casing"); FontSettings.Slogan.Color = GetString("Item.Area.LogoSloganFont.Color.Color"); //HEADINGS FontSettings.H1.FontFamily = CustomFont(GetString("Item.Area.HeadingsH1.Font"), GetString("Item.Area.HeadingsH1.CustomFont")); FontSettings.H1.FontSize = GetString("Item.Area.HeadingsH1.Size")+"px"; FontSettings.H1.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH1.Weight"), "normal"); FontSettings.H1.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH1.LineHeight"), "1"); FontSettings.H1.LetterSpacing = GetString("Item.Area.HeadingsH1.LetterSpacing") + "px"; FontSettings.H1.Casing = GetString("Item.Area.HeadingsH1.Casing"); FontSettings.H1.Color = GetString("Item.Area.HeadingsH1.Color.Color"); FontSettings.H2.FontFamily = CustomFont(GetString("Item.Area.HeadingsH2.Font"), GetString("Item.Area.HeadingsH2.CustomFont")); FontSettings.H2.FontSize = GetString("Item.Area.HeadingsH2.Size")+"px"; FontSettings.H2.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH2.Weight"), "normal"); FontSettings.H2.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH2.LineHeight"), "1"); FontSettings.H2.LetterSpacing = GetString("Item.Area.HeadingsH2.LetterSpacing") + "px"; FontSettings.H2.Casing = GetString("Item.Area.HeadingsH2.Casing"); FontSettings.H2.Color = GetString("Item.Area.HeadingsH2.Color.Color"); //BODY FontSettings.Body.FontFamily = CustomFont(GetString("Item.Area.BodyFont.Font"), GetString("Item.Area.BodyFont.CustomFont")); FontSettings.Body.FontSize = GetString("Item.Area.BodyFont.Size") + "px"; FontSettings.Body.FontWeight = CheckExistence(GetString("Item.Area.BodyFont.Weight"), "normal"); FontSettings.Body.LineHeight = CheckExistence(GetString("Item.Area.BodyFont.LineHeight"), "1"); FontSettings.Body.LetterSpacing = GetString("Item.Area.BodyFont.LetterSpacing") + "px"; FontSettings.Body.Casing = GetString("Item.Area.BodyFont.Casing"); FontSettings.Body.Color = GetString("Item.Area.BodyFont.Color.Color"); gfonts.Add(FontSettings.Logo.FontFamily, ""); if (!gfonts.ContainsKey(FontSettings.Slogan.FontFamily)) { gfonts.Add(FontSettings.Slogan.FontFamily, ""); } if (!gfonts.ContainsKey(FontSettings.H1.FontFamily)) { gfonts.Add(FontSettings.H1.FontFamily, ""); } if (!gfonts.ContainsKey(FontSettings.H2.FontFamily)) { gfonts.Add(FontSettings.H2.FontFamily, ""); } if (!gfonts.ContainsKey(FontSettings.Body.FontFamily)) { gfonts.Add(FontSettings.Body.FontFamily, ""); } } private string CustomFont (string firstfont, string secondfont) { if (firstfont == "custom") { return secondfont; } else { return firstfont; } } private string CheckExistence (string stringitem, string defaultvalue) { if (!string.IsNullOrWhiteSpace(stringitem)) { return stringitem; } else { return defaultvalue; } } private System.Collections.Generic.Dictionary<string, object> gfonts = new System.Collections.Generic.Dictionary<string, object>(); } @{ InitFontSettings(); } @helper GoogleFonts() { if (gfonts != null) { foreach (var item in gfonts) { <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=@item.Key:100,200,300,400,500,600,700,800,900"> } } } @functions{ public string FontStylesCSS() { string CssString = @" .dw-logotext { font-family: " + FontSettings.Logo.FontFamily + @"; font-size: " + FontSettings.Logo.FontSize + @"; font-weight: " + FontSettings.Logo.FontWeight + @"; line-height: " + FontSettings.Logo.LineHeight + @" !important; letter-spacing: " + FontSettings.Logo.LetterSpacing + @"; text-transform: " + FontSettings.Logo.Casing + @"; color: " + FontSettings.Logo.Color + @"; } .dw-slogantext { font-family: " + FontSettings.Slogan.FontFamily + @"; font-size: " + FontSettings.Slogan.FontSize + @"; font-weight: " + FontSettings.Slogan.FontWeight + @"; line-height: " + FontSettings.Slogan.LineHeight + @" !important; letter-spacing: " + FontSettings.Slogan.LetterSpacing + @"; text-transform: " + FontSettings.Slogan.Casing + @"; color: " + FontSettings.Slogan.Color + @"; } h1 { font-family: " + FontSettings.H1.FontFamily + @" !important; font-size: " + FontSettings.H1.FontSize + @"; color: " + FontSettings.H1.Color + @"; line-height: " + FontSettings.H1.LineHeight + @" !important; text-transform: " + FontSettings.H1.Casing + @"; font-weight: " + FontSettings.H1.FontWeight + @"; letter-spacing: " + FontSettings.H1.LetterSpacing + @" !important; } h2, h3, h4, h5, h6 { margin-top: 0.7em; margin-bottom: 0.7em; font-family: " + FontSettings.H2.FontFamily + @" !important; font-size: " + FontSettings.H2.FontSize + @"; color: " + FontSettings.H2.Color + @"; line-height: " + FontSettings.H2.LineHeight + @"; text-transform: " + FontSettings.H2.Casing + @" !important; font-weight: " + FontSettings.H2.FontWeight + @" !important; letter-spacing: " + FontSettings.H2.LetterSpacing + @" !important; } h4, h5, h6 { font-size: 16px !important; } body { font-family: " + FontSettings.Body.FontFamily + @" !important; font-size: " + FontSettings.Body.FontSize + @"; color: " + FontSettings.Body.Color + @"; line-height: " + FontSettings.Body.LineHeight + @" !important; text-transform: " + FontSettings.Body.Casing + @"; font-weight: " + FontSettings.Body.FontWeight + @"; letter-spacing: " + FontSettings.Body.LetterSpacing + @" !important; } .navbar-wp .navbar-nav > li > a { font-family: " + FontSettings.Body.FontFamily + @" !important; } .section-title { margin-top: 0; margin-bottom: 0.7em; } "; return CssString; } } @GoogleFonts() <!-- GENERAL/COLOR SETTINGS --> @functions{ public class ColorSettings { public class Color { public static string Primary { get; set; } public static string Secondary { get; set; } public static string NavbarFont { get; set; } public static string Footer { get; set; } public static string FooterFont { get; set; } public static string Sticker { get; set; } public static string Price { get; set; } public static string Cart { get; set; } } } private void InitColorSettings() { ColorSettings.Color.Primary = GetString("Item.Area.ColorsPrimary.Color"); ColorSettings.Color.Secondary = GetString("Item.Area.ColorsSecondary.Color"); ColorSettings.Color.NavbarFont = GetString("Item.Area.NavbarFontColor"); if (string.IsNullOrWhiteSpace(ColorSettings.Color.NavbarFont)) { ColorSettings.Color.NavbarFont = WrapMethods.getContrastYIQ(ColorSettings.Color.Secondary); } ColorSettings.Color.Footer = GetString("Item.Area.ColorsFooterColor.Color"); ColorSettings.Color.FooterFont = WrapMethods.getContrastYIQ(ColorSettings.Color.Footer); ColorSettings.Color.Price = GetString("Item.Area.EcommercePriceColor.Color"); ColorSettings.Color.Sticker = GetString("Item.Area.EcommerceDiscountStickerColor.Color"); ColorSettings.Color.Cart = GetString("Item.Area.EcommerceCartButtonColor.Color"); } public string GetColorSettings() { string CssString = @" .color-primary { color: @Primary; } .color-secondary { color: @Secondary; } .bg-primary { background-color: @Primary; } .bg-secondary { background-color: @Secondary; } a:hover, a:focus, a:active { color: @Primary; } .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { color: @NavbarFont; } .navbar-wp .navbar-nav > .active > a, .navbar-wp .navbar-nav > .active > a:hover, .navbar-wp .navbar-nav > .active > a:focus { color: @NavbarFont; } .navbar-wp .navbar-nav > li > a:hover, .navbar-wp .navbar-nav > li > a:focus { border-top: 0px solid @Secondary; color: @NavbarFont; } .navbar-wp .navbar-nav > li > a span:after { background-color: @Primary; } .navbar-wp .megamenu > li:hover > a { color: @Primary !important; } .btn-dw-primary { color: #FFF; background-color: @Primary; border-color: @Primary; } .btn-dw-secondary { color: @NavbarFont; background-color: @Secondary; border-color: @Secondary; } .btn-dw-cart { color: #FFF; background-color: @Cart; border-color: @Cart; } .dw-section-title { border-color: @Secondary; } .dw-minicart-update { color: #FFF !important; background-color: @Primary; transition: all 0.3s ease-in-out 0s; } .pagination > li > a, .pagination > li > a:hover, .pagination > li > a:focus, .pagination > li > a:active { color: @Primary; } .form-control:hover, .form-control:focus, .form-control:active { border-color: @Primary !important; } .bg-2 { background: @Primary !important; } .blockquote-1:hover { border-color: @Primary !important; } .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 { color: @Primary; } .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 { color: @Primary; } .navbar-wp .navbar-nav > li > a:hover, .navbar-wp .navbar-nav > li > a:focus { border: 0px solid @Primary; } .navbar-wp .navbar-toggle:hover, .navbar-wp .navbar-toggle:focus { background-color: @Primary !important; border-color: @Primary !important; } .navbar-wp .dropdown-menu { border-top: 1px solid @Primary !important; border-bottom: 3px solid @Primary !important; } .navbar-wp .dropdown-menu > li > a:hover { background: @Primary !important; color: #fff; } .navbar-wp .dropdown-menu .active { background: @Primary !important; color: #fff; } .navbar-wp.navbar-contrasted .dropdown-menu > li > a:hover { background: @Primary !important; } .nav > ul > li > a:hover { color: @Primary; } .lw .w-box.w-box-inverse .thmb-img i { color: @Primary !important; } .w-box.w-box-inverse .thmb-img:hover i { background: @Primary !important; } .c-box { border: 1px solid @Primary !important; } .c-box .c-box-header { background: @Primary !important; } .w-section .aside-feature:hover .icon-feature, .w-section .aside-feature:hover h4 { color: @Primary !important; } .layer-slider-wrapper .title.title-base { background: @Primary !important; } .layer-slider-wrapper .subtitle { color: @Primary !important; } .layer-slider-wrapper .list-item { color: @Primary !important; } .box-element.box-element-bordered { border: 1px solid @Primary !important; } .carousel-2 .carousel-indicators .active { background-color: @Primary !important; } .carousel-2 .carousel-nav a { color: @Primary !important; } .carousel-2 .carousel-nav a:hover { background: @Primary !important; } .carousel-3 .carousel-nav a { color: @Primary !important; } .carousel-3 .carousel-nav a:hover { background: @Primary !important; } .like-button .button.liked i { color: @Primary !important; } ul.list-listings li.featured { border-color: @Primary !important; } ul.list-check li i { color: @Primary !important; } ul.dw-categories li a:hover, ul.dw-categories a:focus, ul.dw-categories a:active{ color: @NavbarFont; background-color: @Primary; border-color: @Primary; } ul.categories li a:hover, ul.categories a:focus, ul.categories a:active{ color: @NavbarFont; background-color: @Primary; border-color: @Primary; } .timeline .event:nth-child(2n):before { background-color: @Primary !important; } .timeline .event:nth-child(2n-1):before { background-color: @Primary !important; } #toTopHover { background-color: @Primary !important; } .tags-list li { border: 1px solid @Primary !important; color: @Primary !important; } .tags-list li:hover, a.open-panel { background-color: @Primary !important; } .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus, .panel-group .panel-heading a i, .tags-list li a { color: @NavbarFont !important; } .nav-pills > li > a:hover, .nav-pills > li > a:focus { color: @NavbarFont !important; background: none repeat scroll 0% 0% @Secondary !important; } footer { background: @Footer !important; } footer h4 { color: @FooterFont !important; } footer a { color: @FooterFont !important; } footer a:hover, footer a:focus, footer a:active { color: @Secondary !important; } footer p { color: @FooterFont !important; } footer ul > li { color: @FooterFont !important; } footer hr { border-color: @FooterFont } /* Button colors */ .btn-base { color: @NavbarFont !important; background-color: @Secondary !important; border: 1px solid @Secondary !important; } .btn-base:before { background-color: @Secondary !important; } .btn-base:hover:before, .btn-base:focus:before, .btn-base:active:before { color: @NavbarFont !important; background-color: @Primary !important; border-color: @Primary !important; } .btn-icon:before { transition: none !important; } .btn-base:hover, .btn-base:focus, .btn-base:active, .btn-base.active, .open .dropdown-toggle.btn-base { color: @NavbarFont !important; background-color: @Primary !important; border-color: @Primary !important; } .btn-primary { background-color: @Primary !important; border-color: @Primary !important; } .open .dropdown-toggle.btn-primary { background-color: @Primary !important; border-color: @Primary !important; } /* Dropdown-menu */ .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { background: @Primary !important; color: #fff !important; } /* Ecom settings */ .ribbon.base, .ball { background: @Sticker !important; color: #fff; border-right: 5px solid @Sticker !important; } .ribbon.base:before { border-top: 27px solid @Sticker !important; } .ribbon.base:after { border-bottom: 27px solid @Sticker !important; } .price { color: @Price !important; } .discount-sticker { background-color: @Sticker !important; } .bs-callout-primary { border-left-color: @Primary !important; } .ratings .fa-star { color: @Secondary !important; } .feature-label { color: @Secondary !important; }"; return ParseCSSToString(CssString); } private string ParseCSSToString(string TheString) { TheString = TheString.Replace("@Primary", ColorSettings.Color.Primary); TheString = TheString.Replace("@Secondary", ColorSettings.Color.Secondary); TheString = TheString.Replace("@NavbarFont", ColorSettings.Color.NavbarFont); TheString = TheString.Replace("@FooterFont", ColorSettings.Color.FooterFont); TheString = TheString.Replace("@Footer", ColorSettings.Color.Footer); TheString = TheString.Replace("@Sticker", ColorSettings.Color.Sticker); TheString = TheString.Replace("@Price", ColorSettings.Color.Price); TheString = TheString.Replace("@Cart", ColorSettings.Color.Cart); System.Text.StringBuilder sb = new System.Text.StringBuilder(); foreach(var item in TheString.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries)) { sb.AppendLine(item); } return sb.ToString(); } } @{ InitColorSettings(); } @using System.Drawing @using System.Net @functions{ public class GeneralSettings { public class Header { public static string Mode { get; set; } public static string Classes { get; set; } public static bool Show { get; set; } public static string Background { get; set; } public static bool ShowFrontpageImage { get; set; } } public class Logo { public static string Image { get; set; } public static string ContrastImage { get; set; } public static string Text { get; set; } public static string Slogan { get; set; } public static string SecondaryColor { get; set; } } public class Navigation { public static string Position { get; set; } public static bool IsMegamenu { get; set; } public static string InvertedPosition { get; set; } public static string StickyMenu { get; set; } public static string SelectionMode { get; set; } public static string SelectionStyle { get; set; } public static int SelectionWeight { get; set; } public static bool Case { get; set; } public static string BreadcrumbMode { get; set; } public static string BreadcrumbAlign { get; set; } public static string LeftmenuMode { get; set; } public static string ButtonDesign { get; set; } } public class Headings { public static string Mode { get; set; } } public class Background { public static string Color { get; set; } public static string Image { get; set; } public static string CustomImage { get; set; } public static bool GradientColor { get; set; } public static string GradientPercentage { get; set; } public static string Style { get; set; } public static string Position { get; set; } } public class Site { public static bool Shadow { get; set; } public static string LayoutMode { get; set; } } public class Images { public static bool RoundCorners { get; set; } } public class Ecommerce { public static string EcomListDesign { get; set; } public static string EcomCardDesign { get; set; } } } private void InitGeneralSettings() { //Header settings GeneralSettings.Header.Mode = GetString("Item.Area.HeaderLayoutMode"); GeneralSettings.Header.Show = GetBoolean("Item.Area.HeaderShow"); GeneralSettings.Header.Background = GetString("Item.Area.NavigationNavbarBackground"); GeneralSettings.Header.ShowFrontpageImage = GetBoolean("Item.Area.HeaderFrontpageImage"); if (GeneralSettings.Header.Mode == "solid"){ GeneralSettings.Header.Classes = ""; } if (GeneralSettings.Header.Mode == "cover" || GeneralSettings.Header.Mode == "mobile"){ GeneralSettings.Header.Classes = "header-alpha header-cover"; } //Logo settings GeneralSettings.Logo.Image = GetString("Item.Area.GeneralLogo"); GeneralSettings.Logo.Text = GetString("Item.Area.GeneralLogoText"); GeneralSettings.Logo.Slogan = GetString("Item.Area.LogoSlogan"); GeneralSettings.Logo.SecondaryColor = GetString("Item.Area.LogoSecondColor.Color"); if (!string.IsNullOrWhiteSpace(GetString("Item.Area.LogoContrastImage"))) { GeneralSettings.Logo.ContrastImage = GetString("Item.Area.LogoContrastImage"); } else { GeneralSettings.Logo.ContrastImage = GetString("Item.Area.GeneralLogo"); } //Navigation settings GeneralSettings.Navigation.Position = GetString("Item.Area.NavigationPosition"); GeneralSettings.Navigation.StickyMenu = "off"; GeneralSettings.Navigation.IsMegamenu = GetBoolean("Item.Area.IsMegamenu"); if (GetBoolean("Item.Area.NavigationSticky")) { if (GeneralSettings.Header.Show) { if (GeneralSettings.Header.Mode == "cover") { GeneralSettings.Navigation.StickyMenu = "44"; //"data-spy=\"affix\" data-offset-top=\"44\" data-offset-bottom=\"300\""; } else { int offset = ImageHeight()+28; GeneralSettings.Navigation.StickyMenu = offset.ToString(); // "data-spy=\"affix\" data-offset-top=\"" + offset.ToString() + "\" data-offset-bottom=\"300\""; } } else { GeneralSettings.Navigation.StickyMenu = "5"; // "data-spy=\"affix\" data-offset-top=\"5\" data-offset-bottom=\"300\""; } } if (GeneralSettings.Navigation.Position == "left") { GeneralSettings.Navigation.InvertedPosition = "right"; } else { GeneralSettings.Navigation.InvertedPosition = "left"; } GeneralSettings.Navigation.SelectionMode = GetString("Item.Area.NavigationSelectionMode"); GeneralSettings.Navigation.SelectionStyle = ""; GeneralSettings.Navigation.SelectionWeight = GetInteger("Item.Area.SelectionWeight"); if (GeneralSettings.Navigation.SelectionMode == "arrow") { GeneralSettings.Navigation.SelectionStyle = "navbar-arrow"; } GeneralSettings.Navigation.Case = GetBoolean("Item.Area.NavigationUppercase"); GeneralSettings.Navigation.BreadcrumbMode = GetString("Item.Area.NavigationBreadcrumbLayout"); GeneralSettings.Navigation.BreadcrumbAlign = GetString("Item.Area.NavigationBreadcrumbAlign"); GeneralSettings.Navigation.LeftmenuMode = GetString("Item.Area.NavigationLeftNavigationMode"); GeneralSettings.Navigation.ButtonDesign = GetString("Item.Area.NavigationButtonDesign"); //Background settings GeneralSettings.Background.Image = GetString("Item.Area.BackgroundImage.Image.Image"); GeneralSettings.Background.CustomImage = GetString("Item.Area.BackgroundImage.Image.CustomImage"); GeneralSettings.Background.Color = GetString("Item.Area.BackgroundImage.Color.Color"); GeneralSettings.Background.GradientColor = GetBoolean("Item.Area.BackroundGradientColor"); GeneralSettings.Background.GradientPercentage = GetString("Item.Area.GradientPercentage"); if (@GetString("Item.Area.BackgroundFixed") == "True") { GeneralSettings.Background.Position = "fixed"; } else { GeneralSettings.Background.Position = ""; } if (GeneralSettings.Background.Image == "none") { GeneralSettings.Background.Style = ""; } else if (GeneralSettings.Background.Image == "custom") { if (!string.IsNullOrWhiteSpace(GeneralSettings.Background.CustomImage)) { 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; "; } } else { 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; "; } //Headings settings GeneralSettings.Headings.Mode = GetString("Item.Area.AdvHeadingsMode"); //Site settings GeneralSettings.Site.Shadow = GetBoolean("Item.Area.BackgroundSiteShadow"); GeneralSettings.Site.LayoutMode = GetString("Item.Area.LayoutMode"); if (GeneralSettings.Site.LayoutMode == "boxed"){ GeneralSettings.Site.LayoutMode = "body-" + GeneralSettings.Site.LayoutMode; GeneralSettings.Header.Classes += " header-boxed"; } //Image settings GeneralSettings.Images.RoundCorners = GetBoolean("Item.Area.LayoutRoundCorners"); //Ecommerce settings GeneralSettings.Ecommerce.EcomListDesign = GetString("Item.Area.EcommerceProductCardDesign"); GeneralSettings.Ecommerce.EcomCardDesign = GetString("Item.Area.EcommerceProductCardDesign"); } public string GetGeneralCSS() { string CssString = ""; int SelectionWeight = GeneralSettings.Navigation.SelectionWeight; //Site settings if (GetString("Item.Area.LogoFont.Color.Color") == "#FFF" || GetString("Item.Area.LogoFont.Color.Color") == "#FFFFFF") { int offset = ImageHeight()+28; CssString += @" .dw-offsetmenu-logo { color: #333 !important; }"; } if (!string.IsNullOrWhiteSpace(GeneralSettings.Background.Color)) { CssString += @" body { background-color: " + GeneralSettings.Background.Color + @"; background-size: cover; overflow-y: scroll; }"; } if (GeneralSettings.Background.GradientColor) { CssString += @" body { background: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); background: -o-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); background: -ms-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); background: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); background: linear-gradient(to top, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); background-attachment: fixed; background-color: " + GeneralSettings.Background.Color + @" !important; }"; } if (GeneralSettings.Site.Shadow) { CssString += @" .shad { -webkit-box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); -moz-box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); }"; } //Image settings if (GeneralSettings.Images.RoundCorners) { CssString += @" .content-image { border-radius: 6px; -webkit-border-radius: 6px; -moz-border-radius: 6px; }"; } //Navbar and header custom settings if (GeneralSettings.Header.Mode == "cover") { CssString += @" .navbar-wp { background-color: none !important; }"; if (!GeneralSettings.Header.Show || GeneralSettings.Header.Mode == "mobile") { CssString += @" .header-cover .navbar-wp { top: 0px !important; }"; } } else { if (GeneralSettings.Header.Show) { CssString += @" .navbar-wp.affix .navbar-nav > li > a { padding: 16px 16px !important; }"; } } if (GeneralSettings.Header.Background == "colorline") { CssString += @" .navbar-wp, .navbar-wp.affix { border-bottom: 4px solid " + ColorSettings.Color.Primary + @" !important; } .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { background-color: #FFF; color: #333; } .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { color: " + ColorSettings.Color.NavbarFont + @"; } .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo { color: " + GeneralSettings.Logo.SecondaryColor + @" !important; }"; } else if (GeneralSettings.Header.Background == "neutral") { CssString += @" .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { background-color: #f1f1f1; } .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { color: #333; } .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { color: " + ColorSettings.Color.NavbarFont + @"; } .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo { color: " + GeneralSettings.Logo.SecondaryColor + @" !important; }"; } else if (GeneralSettings.Header.Background == "transparent") { CssString += @" .navbar-wp, .navbar-wp.affix { background-color: #FFF; opacity: 0.9; filter: alpha(opacity=90); /* For IE8 and earlier */ } .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { color: #333; } .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { color: " + ColorSettings.Color.NavbarFont + @"; } .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo { color: " + GeneralSettings.Logo.SecondaryColor + @" !important; }"; } else { CssString += @" .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { background-color: " + ColorSettings.Color.Secondary + @"; } .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo { color: " + GeneralSettings.Logo.SecondaryColor + @" !important; }"; } if (GeneralSettings.Navigation.SelectionMode == "background" || GeneralSettings.Navigation.SelectionMode == "arrow"){ CssString += NavbarPosition(false, SelectionWeight); CssString += @" .dw-navbar-button > a { background-color: transparent !important; } .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { background-color: " + ColorSettings.Color.Primary + @" !important; }"; } if (GeneralSettings.Navigation.SelectionMode == "underline"){ CssString += NavbarPosition(true); CssString += ClearBackground(); CssString += @" .dw-navbar-button > a span:after { position: absolute; content: ''; left: 0px; bottom: 0px; height: " + SelectionWeight + @"px; width: 100%; transform: scaleX(0); transition: all 0.3s ease-in-out 0s; } .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { color: " + ColorSettings.Color.Primary + @" !important; } .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 { color: " + ColorSettings.Color.Primary + @" !important; transform: scaleX(1); transition: all 0.3s ease-in-out 0s; }"; } if (GeneralSettings.Navigation.SelectionMode == "boxed"){ CssString += NavbarPosition(true, SelectionWeight); CssString += @" .dw-navbar-button > a { background-color: transparent !important; } .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { background-color: " + ColorSettings.Color.Primary + @" !important; transition: all 0.3s ease-in-out 0s; }"; } if (GeneralSettings.Navigation.SelectionMode == "border"){ CssString += NavbarPosition(true, 6, SelectionWeight); CssString += ClearBackground(); CssString += @" .dw-navbar-button > a { border: " + SelectionWeight + @"px solid transparent !important; transition: None !important; } .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { border-width: " + SelectionWeight + @"px !important; border-color: " + ColorSettings.Color.Primary + @" !important; transition: all 0.3s ease-in-out 0s; }"; } if (GeneralSettings.Navigation.SelectionMode == "font"){ CssString += NavbarPosition(); CssString += ClearBackground(); SelectionWeight = (SelectionWeight*100); CssString += @" .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { color: " + ColorSettings.Color.Primary + @" !important; font-weight: " + SelectionWeight + @" !important; transition: all 0.3s ease-in-out 0s; }"; } if (GeneralSettings.Navigation.Case){ CssString += @" .dw-navbar-button > a { text-transform: uppercase !important; }"; } else { CssString += @" .dw-navbar-button > a { text-transform: none !important; }"; } //Breadcrumb custom settings if (GeneralSettings.Navigation.BreadcrumbMode == "light") { CssString += @" .pg-opt { border-bottom: 0px; background: none repeat scroll 0% 0% #FFF; } .dw-breadcrumb-title { font-size: 14px !important; padding: 5px 0px 5px 0px !important; } .dw-breadcrumb { padding: 5px 0px 5px 0px !important; }"; } if (GeneralSettings.Navigation.BreadcrumbMode == "normal") { CssString += @" .dw-breadcrumb-title { font-size: 14px !important; padding: 5px 0px 5px 0px !important; } .dw-breadcrumb a, .pg-opt .breadcrumb { padding: 5px !important; }"; } if (GeneralSettings.Navigation.BreadcrumbMode == "large") { CssString += @" .dw-breadcrumb-title { font-size: 22px !important; padding: 15px 0px 15px 0px !important; } .dw-breadcrumb { padding: 15px !important; }"; } if (GeneralSettings.Navigation.BreadcrumbAlign == "right") { CssString += @" .dw-breadcrumb { float: right !important; }"; } else { CssString += @" .dw-breadcrumb { float: left !important; }"; } //Left menu custom settings if (GeneralSettings.Navigation.LeftmenuMode == "light" || GeneralSettings.Navigation.LeftmenuMode == "light-color") { CssString += @" ul.dw-categories, ul.dw-categories > li, ul.dw-categories > li > ul > li { border: 0px solid #EEE; } ul.dw-categories > li > ul { background: none repeat scroll 0% 0% #FFF; } ul.dw-categories li a:hover, ul.dw-categories li a:focus, ul.dw-categories li a:active { background-color: #FFF !important; color: " + ColorSettings.Color.Primary + @" !important; } .list-active, .list-active > a { background-color: #FFF; color: " + ColorSettings.Color.Primary + @" !important; } .list-open-active { background-color: #FFF; color: " + ColorSettings.Color.Primary + @" !important; }"; } if (GeneralSettings.Navigation.LeftmenuMode == "lines") { CssString += @" ul.dw-categories > li { border-bottom: 1px solid #EEE; } ul.dw-categories { border: 0px solid #EEE; } ul.dw-categories > li > ul { background: none repeat scroll 0% 0% #FFF; } ul.dw-categories li a:hover, a:focus, a:active { background-color: #FFF !important; color: " + ColorSettings.Color.Primary + @" !important; } .list-active, .list-active > a { background-color: #FFF; color: " + ColorSettings.Color.Primary + @" !important; } .list-open-active { background-color: #FFF; color: " + ColorSettings.Color.Primary + @" !important; }"; } if (GeneralSettings.Navigation.LeftmenuMode == "boxed") { CssString += @" ul.dw-categories, ul.dw-categories > li, ul.dw-categories > li > ul > li { border: 0px solid #EEE; } .list-active, .list-active > a { background-color: " + ColorSettings.Color.Primary + @" !important; color: #FFF; }"; } if (GeneralSettings.Navigation.LeftmenuMode == "border") { CssString += @" ul.dw-categories > li { border: 1px solid #EEE; } ul.dw-categories > li > ul > li { border-top: 1px solid #EEE; } .list-active, .list-active > a { background-color: " + ColorSettings.Color.Primary + @" !important; color: #FFF; }"; } if (GeneralSettings.Navigation.LeftmenuMode == "light-color") { CssString += @" ul.dw-categories li a:hover, ul.dw-categories a:focus, ul.dw-categories a:active { border-left: 6px solid " + ColorSettings.Color.Primary + @"; } 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 { padding-left: 20px; } 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 { padding-left: 30px; } 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 { padding-left: 40px; } 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 { padding-left: 50px; } 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 { padding-left: 50px; } 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 { padding-left: 50px; } 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 { padding-left: 50px; } ul.dw-categories .list-active > a { border-left: 6px solid " + ColorSettings.Color.Primary + @"; } .btn-dw:hover, .btn-dw:focus, .btn-dw:active { }"; } //Buttons custom designs if (GeneralSettings.Navigation.ButtonDesign == "light-rounded") { CssString += @" .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { border-width: 0px; } .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { background-color: " + ColorSettings.Color.Secondary + @"; color: #FFF; border-width: 0px; } .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { background-color: " + ColorSettings.Color.Primary + @"; color: #FFF; border-width: 0px; } .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; color: #FFF; border-width: 0px; }"; } if (GeneralSettings.Navigation.ButtonDesign == "corners") { CssString += @" .btn-dw-primary, .btn-dw-secondary, btn-dw-cart , .btn-dw-cart { border-radius: 0px !important; border-width: 0px; } .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { background-color: " + ColorSettings.Color.Secondary + @"; color: #FFF; border-width: 0px; } .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { background-color: " + ColorSettings.Color.Primary + @"; color: #FFF; border-width: 0px; } .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; color: #FFF; border-width: 0px; }"; } if (GeneralSettings.Navigation.ButtonDesign == "round") { CssString += @" .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { padding: 5px 15px; border-radius: 200px !important; border-width: 0px !important; } .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { background-color: " + ColorSettings.Color.Secondary + @"; color: #FFF; border-width: 0px !important; } .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { background-color: " + ColorSettings.Color.Primary + @"; color: #FFF; border-width: 0px !important; } .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; color: #FFF; border-width: 0px !important; }"; } if (GeneralSettings.Navigation.ButtonDesign == "border") { CssString += @" .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { background-color: transparent; } .btn-dw-primary { border-width: 4px; padding: 3px 10px; color: " + ColorSettings.Color.Primary + @"; } .btn-dw-secondary { border-width: 2px; color: " + ColorSettings.Color.Secondary + @"; } .btn-dw-cart { border-width: 4px; padding: 3px 10px; color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; } .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { background-color: " + ColorSettings.Color.Primary + @"; border-width: 4px; padding: 3px 10px; border-color: " + ColorSettings.Color.Primary + @"; color: #FFF; } .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { background-color: " + ColorSettings.Color.Primary + @"; border-width: 2px; color: #FFF; border-color: #FFF; } .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; border-width: 4px; padding: 3px 10px; border-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; color: #FFF; }"; } if (GeneralSettings.Navigation.ButtonDesign == "border-sharp" || GeneralSettings.Navigation.ButtonDesign == "border-round") { CssString += @" .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { background-color: transparent; } .btn-dw-primary { border-width: 4px; padding: 3px 15px; color: " + ColorSettings.Color.Primary + @"; } .btn-dw-secondary { border-width: 2px; padding: 5px 15px; color: " + ColorSettings.Color.Secondary + @"; } .btn-dw-cart { border-width: 4px; padding: 3px 15px; color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; } .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { background-color: " + ColorSettings.Color.Primary + @"; border-width: 4px; color: #FFF; padding: 3px 15px; border-color: " + ColorSettings.Color.Primary + @"; } .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { background-color: " + ColorSettings.Color.Primary + @"; border-width: 2px; color: #FFF; padding: 5px 15px; border-color: #FFF; } .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; border-width: 4px; color: #FFF; padding: 3px 15px; border-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; }"; } if (GeneralSettings.Navigation.ButtonDesign == "border-sharp") { CssString += @" .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 { border-radius: 0px !important; }"; } if (GeneralSettings.Navigation.ButtonDesign == "border-round") { CssString += @" .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 { border-radius: 200px !important; }"; } //Headings custom settings if (GeneralSettings.Headings.Mode == "underline") { CssString += @" .dw-section-title { border-bottom: 2px solid; margin-bottom: 15px; }"; } if (GeneralSettings.Headings.Mode == "boxed" || GeneralSettings.Headings.Mode == "boxed-line") { CssString += @" .dw-section-title span { background-color: " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; display: inline-block; padding: 8px 16px; color: #FFF; }"; if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) { CssString += @" .dw-section-title { background-color: " + ColorSettings.Color.Primary + @"; }"; } } if (GeneralSettings.Headings.Mode == "boxed-line") { CssString += @" .dw-section-title span { margin-bottom: 2px; } .dw-section-title { border-bottom: 2px solid " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; margin-bottom: 10px; }"; if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) { CssString += @" .dw-section-title { border-bottom: 2px solid " + ColorSettings.Color.Primary + @"; }"; } } if (GeneralSettings.Headings.Mode == "outline") { CssString += @" .dw-section-title { color: #FFF; text-shadow: -1px -1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", 1px -1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", -1px 1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", 1px 1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; }"; if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) { CssString += @" .dw-section-title { text-shadow: -1px -1px 0 #1A1A1A, 1px -1px 0 #1A1A1A, -1px 1px 0 #1A1A1A, 1px 1px 0 #1A1A1A; }"; } } if (GeneralSettings.Headings.Mode == "backline") { CssString += @" .dw-section-title { font-size: 18px; text-align: center; border-bottom: 2px solid; padding: 0; margin: 8px 0 20px; line-height: 0em !important; } .dw-section-title > span { background-color: #FFF; padding: 0 16px; } .dw-section-title-small { margin: 8px 0 20px; }"; } if (GeneralSettings.Ecommerce.EcomCardDesign == "one") { } if (GeneralSettings.Ecommerce.EcomCardDesign == "two") { CssString += @" .product { border: 1px solid #E5E5E5; }"; } return CssString; } private string ClearBackground() { string CssString = ""; CssString += @" .dw-navbar-button > a { background-color: rgba(0, 0, 0, 0.0) !important; } .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { background-color: rgba(0, 0, 0, 0.0) !important; }"; return CssString; } private string NavbarPosition(bool margin=false, int specialpadding=6, int extramargin=0) { int LogoHeight = 0; string CssString = ""; int Centerpos = 0; if (GeneralSettings.Header.Mode != "solid"){ if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) { LogoHeight = ImageHeight(); } else { LogoHeight = GetInteger("Item.Area.LogoFont.Size"); } } else { if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) { LogoHeight = 18; } else { LogoHeight = GetInteger("Item.Area.LogoFont.Size")-10; } } if (margin == false) { Centerpos = (LogoHeight/2) + 6; CssString += @" .dw-navbar-button > a, .navbar-wp.affix .navbar-nav > li > a { padding: " + Centerpos + @"px " + (specialpadding+4) + @"px " + Centerpos + @"px " + (specialpadding+4) + @"px !important; margin: " + extramargin + @"px " + extramargin + @"px !important; }"; } else { Centerpos = ((LogoHeight/2)+6)-(specialpadding+extramargin); CssString += @" .dw-navbar-button > a, .navbar-wp.affix .navbar-nav > li > a { padding: " + specialpadding + @"px " + (specialpadding+4) + @"px " + specialpadding + @"px " + (specialpadding+4) + @"px !important; margin: " + Centerpos + @"px 4px 0px 4px !important; }"; } return CssString; } private int ImageHeight () { int LogoHeight = 0; if (!string.IsNullOrWhiteSpace(GetString("Item.Area.GeneralLogo"))) { string imageUrl = "http://" + HttpContext.Current.Request.Url.Authority + GetString("Item.Area.GeneralLogo"); WebRequest request = WebRequest.Create(imageUrl); WebResponse response = request.GetResponse(); Image image = Image.FromStream(response.GetResponseStream()); LogoHeight = image.Height; } else { LogoHeight = 38; } return LogoHeight; } } @{ InitGeneralSettings(); } @if (writeCss) { css += FontStylesCSS() + "/*Colors*/" + Environment.NewLine + GetColorSettings() + Environment.NewLine + "/*General*/" + Environment.NewLine + GetGeneralCSS(); Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(css, HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.css"), false); 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); Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(RemoveWhiteSpaceFromStylesheets(css), cssPath, false); } @functions{ public static string RemoveWhiteSpaceFromStylesheets(string body) { body = Regex.Replace(body, @"[a-zA-Z]+#", "#"); body = Regex.Replace(body, @"[\n\r]+\s*", string.Empty); body = Regex.Replace(body, @"\s+", " "); body = Regex.Replace(body, @"\s?([:,;{}])\s?", "$1"); body = body.Replace(";}", "}"); body = Regex.Replace(body, @"([\s:]0)(px|pt|%|em)", "$1"); // Remove comments from CSS body = Regex.Replace(body, @"/\*[\d\D]*?\*/", string.Empty); return body; } } <!-- Template styles --> <link id="dwStylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/DWGlobalStyles.min.css" rel="stylesheet" media="screen"> <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/invoice.css"> <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/jquerybxslider.css"> <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/print.css" media="print"> @{ string cssAutoPath = "/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.min.css?t=@areaUpdated.Ticks"; } <link type="text/css" href="@cssAutoPath" rel="stylesheet"> <!-- Analytics code --> @GetValue("Item.Area.OtherAnalyticsCode") <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/typeahead.css"> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> @if (GeneralSettings.Navigation.IsMegamenu) { <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/megamenu.css"> } @GetValue("Stylesheets") @GetValue("Javascripts") </head> <body style="@GeneralSettings.Background.Style" id="sitecontent"> <div id="fb-root"></div> <script> (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/da_DK/sdk.js#xfbml=1&version=v2.5"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> <!-- MODALS --> <div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog modal-sm"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title" id="myModalLabel">@Translate("Login", "Login")</h4> </div> <form role="form" id="loginform" method="post"> <div class="modal-body"> @if (!string.IsNullOrWhiteSpace(GetString("DW_extranet_error_uk"))) { <script>alert("@GetValue("DW_extranet_error_uk")");</script> } <input type="hidden" name="ID" value="@Pageview.ID"> <input type="hidden" name="DWExtranetUsernameRemember" value="True"> <input type="hidden" name="DWExtranetPasswordRemember" value="True"> <div class="form-group"> @{ attrValue = Translate("Enter email", "Enter email"); var username2 = @GetValue("DWExtranetUsername"); } <label for="username">@Translate("Email", "Email")</label> <input type="text" class="form-control" name="username" id="username" placeholder="@attrValue" value="@username2"> </div> <div class="form-group"> @{ attrValue = Translate("Enter password", "Enter password"); } <label for="password">@Translate("Password", "Password")</label> <input type="password" class="form-control" name="password" id="password" placeholder="@attrValue"> <p>&nbsp;</p> <a class="pull-left" href='/Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]&LoginAction=Recovery'>@Translate("Forgot your password?", "Forgot your password?")</a> &nbsp; </div> </div> <div class="modal-footer"> <div class="row"> <div class="col-md-12"> <div class="checkbox pull-left"> <label> <input type="checkbox" name="Autologin" checked="checked" value="True"> @Translate("Remember me", "Remember me") </label> </div> <button type="submit" class="btn btn-xs btn-base pull-right">@Translate("Sign in", "Sign in")</button> </div> </div> </div> @if (GetLoop("DWExtranetExternalLoginProviders").Count != 0) { <div class="modal-footer"> <div class="row"> <div class="col-md-12"> <div class="pull-left">@Translate("Or sign in using", "Or sign in using"):</div> <p>&nbsp;</p> </div> </div> <div class="row"> <div class="col-md-12"> @foreach (LoopItem LoginProvider in GetLoop("DWExtranetExternalLoginProviders")) { var ProviderName = LoginProvider.GetString("ProviderName").ToLower(); var ProviderID = LoginProvider.GetValue("ProviderID"); <a href='/Admin/Public/Social/ExternalLogin.aspx?action=login&amp;providerID=@ProviderID' class="btn btn-xs btn-base pull-left"><i class="fa fa-@ProviderName"></i>@LoginProvider.GetString("ProviderName")</a><text>&nbsp;&nbsp;&nbsp;</text> } </div> </div> </div> } </form> </div> </div> </div> <!-- MOBILE MENU --> @{ var offsetmenuplace = "left"; if (GeneralSettings.Header.Mode == "mobile") { offsetmenuplace = GeneralSettings.Navigation.Position; } } <div id="myNavmenu" class="navmenu navmenu-default navmenu-fixed-@offsetmenuplace offcanvas"> <div class="col-sm-12 col-xs-12 offcanvas-col"> <div class="row offcanvas-row">&nbsp;</div> <div class="row offcanvas-row"> <div class="col-sm-12 col-xs-12 offcanvas-col"> <a href="/Default.aspx?ID=@firstpageid" class="brand"> @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) { <div class="img-responsive dw-offsetmenu-logo pull-left"> @if (GeneralSettings.Logo.ContrastImage != GeneralSettings.Logo.Image) { <img src="@GeneralSettings.Logo.ContrastImage" alt="Logo"> } else { <img class="img-responsive" src="@GeneralSettings.Logo.Image" alt="Logo"> } </div> } @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text)) { <div class="dw-logotext dw-offsetmenu-logo pull-left">@GeneralSettings.Logo.Text</div> } </a> </div> </div> <div class="row offcanvas-row">&nbsp;</div> </div> <div class="col-sm-12 col-xs-12 offcanvas-col"> @if (GetBoolean("Item.Area.EcomEnabled")) { <div class="row offcanvas-row"> <div class="col-sm-12 col-xs-12 offcanvas-col"> <form method="get" action="Default.aspx"> <input type="hidden" name="ID" value='@Pageview.Area.Item["ProductsPageId"]'> <div id="remote" class="input-group"> <input type="text" class="form-control typeahead" name="Search" tabindex="1" placeholder="Søg"> <span class="input-group-btn" style="top:-1px!important;"> <button class="btn btn-primary" type="submit"><i class="fa fa-search"></i></button> </span> </div> </form> </div> </div> <div class="row offcanvas-row">&nbsp;</div> <div class="row offcanvas-row"> <div class="col-sm-12 col-xs-12 offcanvas-col"> @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) { <div class="pull-left"> <a href='Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]' class="btn btn-sm btn-default"><i class="fa fa-sign-in"></i> @Translate("Sign in", "Sign in")</a> </div> } @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) { <div class="pull-left"> <a href='Default.aspx?ID=@Pageview.Area.Item["OrdersPageId"]' class="btn btn-sm btn-default"> <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong> </a> </div> <div class="pull-left"> <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.ID"><button class="btn btn-sm btn-default"><i class="fa fa-sign-out"></i> @Translate("Sign out", "Sign out")</button></a> </div> } @if (GetLoop("DWExtranetSecondaryUsers").Count > 0 || !string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) { <p>&nbsp;</p> <form method="post"> <div class="pull-left"> @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) { <select id="DWExtranetSecondaryUserSelector" name="DWExtranetSecondaryUserSelector" title="Impersonate selected user"> @foreach (var user in GetLoop("DWExtranetSecondaryUsers")) { <option value='@user.GetValue("UserID")'>@user.GetValue("UserName")</option> } </select> <input type="submit" class="btn btn-xs" tabindex="3" value="OK"> } else { string impersonateUser = @GetGlobalValue("Global:Extranet.SecondaryUser.UserName") + " is impersonated by " + @Pageview.User.UserName; <span title="@impersonateUser" class="btn btn-xs impersonation-btn"><i class="fa fa-user-secret"></i> @GetGlobalValue("Global:Extranet.SecondaryUser.UserName")</span> <input type="submit" class="btn btn-xs" name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" value="Stop impersonation"> } </div> </form> } </div> </div> <div class="row offcanvas-row">&nbsp;</div> } </div> <div class="row offcanvas-row"> <div class="col-sm-12 col-xs-12 offcanvas-col"> @GetValue("DwNavigation(drawernavigation)") </div> </div> </div> <!-- HEADER AND CONTENT--> <div class="body-wrap shad @GeneralSettings.Site.LayoutMode"> <!-- HEADER --> <div id="divHeaderWrapper"> <header class="@GeneralSettings.Header.Classes"> <!-- TOP HEADER --> @if (GeneralSettings.Header.Show) { <div class="top-header"> <div class="container"> <div class="row"> <div class="col-md-4 logobox"> @if (GeneralSettings.Header.Mode == "solid") { <a href="/Default.aspx?ID=@firstpageid" class="brand"> @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) { <img class="img-responsive dw-logoimage pull-left" src="@GeneralSettings.Logo.Image" alt="Logo"> } @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text)) { <div class="dw-logotext pull-left">@GeneralSettings.Logo.Text</div> } </a> if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Slogan)) { <div class="dw-slogantext pull-left">@GeneralSettings.Logo.Slogan</div> } } </div> <div class="col-md-8 logobox"> <nav class="top-header-menu hidden-sm hidden-xs"> <ul class="top-menu"> @foreach (var lang in GetLoop("WebsiteLanguages")) { <li id='@lang.GetValue("ID")area'> @if (GetInteger("Ecom:Order.OrderLines.Count") <= 0) { string langCode = "flag-icon" + lang.GetString("Culture").Substring(2, 3).ToLower(); <a href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'><span class="flag-icon @langCode"></span></a> } </li> } <!-- Ecommerce user menu --> @if (GetBoolean("Item.Area.EcomEnabled")) { if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) { <text> <li><a href="#" data-toggle="modal" data-target="#login">@Translate("Login", "Login")</a></li> @GetValue("DwNavigation(toolsnavigationNotloggedin)") </text> } if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) { <text> <li> <a href='Default.aspx?ID=@Pageview.Area.Item["UserProfilePageId"]'> <nobr> <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong> </nobr> </a> </li> @if (GetLoop("DWExtranetSecondaryUsers").Count > 0 || !string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) { <li> <form method="post"> <span> @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) { string impersonateTranslation = Translate("Impersonate selected user"); <select id="DWExtranetSecondaryUserSelector" name="DWExtranetSecondaryUserSelector" title="@impersonateTranslation"> @foreach (var user in GetLoop("DWExtranetSecondaryUsers")) { <option value='@user.GetValue("UserID")'>@user.GetValue("UserName")</option> } </select> <input type="submit" class="btn btn-xs" tabindex="3" value="OK"> } else { string impersonateUser = GetGlobalValue("Global:Extranet.SecondaryUser.UserName") + " " + Translate("is impersonated by") + " " + Pageview.User.UserName; string stopImpersonateTranslation = Translate("Stop impersonation"); <span title="@impersonateUser" class="btn btn-xs impersonation-btn"><i class="fa fa-user-secret"></i> @GetGlobalValue("Global:Extranet.SecondaryUser.UserName")</span> <input type="submit" class="btn btn-xs" name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" value="@stopImpersonateTranslation"> } </span> </form> </li> } <li> <a href='/Admin/Public/ExtranetLogoff.aspx?ID=@currentpageid'>@Translate("Logout", "Logout")</a> </li> </text> } } <!-- Ecommerce Cart --> @if (GetBoolean("Item.Area.EcomEnabled")) { <li class="dropdown animate-hover" data-animate="animated fadeInUp"> <a href="Default.aspx?ID=@cartid" title="" id="minipagecart" class="dw-minicart"><i class="fa fa-shopping-cart"></i> @GetValue("Ecom:Order.OrderLines.TotalProductQuantity") <span>@GetValue("Ecom:Order.OrderLines.Total.PriceWithoutVAT")</span></a> <ul class="sub-menu"> <li id="minicart"> @MiniCart() </li> </ul> </li> } </ul> <ul style="list-style-type: none; margin-right: 10px; padding-bottom:10px; font-size:12px; float:right;"> @foreach (var currency in GetLoop("Currencies")) { <li style="display:inline; padding:5px;" id='@currency.GetValue("Currency.IsCurrent")currency'><a href='/?ID=@currentpageid&currencycode=@currency.GetString("CurrencyCode")'>@currency.GetString("CurrencyCode")</a></li> } </ul> </nav> </div> </div> </div> </div> } <!-- MAIN NAV --> @{ var sticky = GeneralSettings.Navigation.StickyMenu; var stickyTrigger = "affix"; var navbarpos = GeneralSettings.Navigation.Position; var selectionstyle = GeneralSettings.Navigation.SelectionStyle; if (sticky == "off") { stickyTrigger = ""; } } <div id="navOne" class="navbar navbar-wp @selectionstyle navbar-fixed affix-top" role="navigation" data-spy="@stickyTrigger" data-offset-top="@sticky" data-offset-bottom="300"> <div class="container"> @if (GeneralSettings.Header.Mode != "solid" || !GeneralSettings.Header.Show) { <div class="navbar-header pull-@GeneralSettings.Navigation.InvertedPosition"> <div class="hidden-sm hidden-xs"> <a href="/Default.aspx?ID=@firstpageid" class="brand"> @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) { if (GeneralSettings.Logo.ContrastImage != GeneralSettings.Logo.Image) { <img class="img-responsive dw-logoimage dw-logoimage-normal pull-left" src="@GeneralSettings.Logo.Image" alt="Logo"> <img class="img-responsive dw-logoimage dw-logoimage-contrast pull-left" src="@GeneralSettings.Logo.ContrastImage" alt="Logo"> } else { <img class="img-responsive dw-logoimage pull-left" src="@GeneralSettings.Logo.Image" alt="Logo"> } } @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text)) { <div class="dw-logotext pull-left">@GeneralSettings.Logo.Text</div> } </a> @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Slogan)) { <div class="dw-slogantext pull-left">@GeneralSettings.Logo.Slogan</div> } </div> </div> } @if (GeneralSettings.Header.Mode != "mobile") { <!-- Small screen header --> <div class="hidden-md hidden-lg row"> <div class="dw-header-sm"> <div class="pull-left"> <button type="button" class="btn btn-sm btn-base" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body"> <i class="fa fa-bars"></i> </button> &nbsp;&nbsp;&nbsp; </div> <div class="pull-left"> <h2 class="dw-header-sm-title">@GetGlobalValue("Global:Page.Top.Name")</h2> </div> @if (GetBoolean("Item.Area.EcomEnabled")) { <div class="pull-right"> <ul class="top-menu"> <li> <a href="Default.aspx?ID=@cartid" title="" class="btn btn-sm btn-base dw-minicart" id="minipagecart-mobile"><i class="fa fa-shopping-cart"></i><strong> @GetValue("Ecom:Order.OrderLines.TotalProductQuantity") <span class="amount">@GetValue("Ecom:Order.OrderLines.Total.PriceWithoutVAT")</span></strong></a> </li> </ul> </div> if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) { <div class="hidden-xs pull-right"> <a href='/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID'><button class="btn btn-sm btn-base"><i class="fa fa-sign-out"></i></button></a> &nbsp; </div> <div class="hidden-xs pull-right"> <a href='Default.aspx?ID=@Pageview.Area.Item["UserProfilePageId"]' class="btn btn-sm btn-base"> <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong> </a> &nbsp; </div> } if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) { <div class="hidden-xs pull-right"> <a href='Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]' class="btn btn-sm btn-base"><i class="fa fa-sign-in"></i></a> &nbsp; </div> } } </div> </div> <!-- Big screen header --> <div class="navbar-navigation"> <div class="hidden-sm hidden-xs"> <nav class="col-md-10 col-sm-10 col-xs-10 p-0 navbar-collapse collapse navbar-@navbarpos"> @if (GeneralSettings.Navigation.IsMegamenu) { @GetValue("DwNavigation(topnavigationmegamenu)") } else { @GetValue("DwNavigation(topnavigation)") } <!-- Extra navigation when no header is shown --> @if (GetBoolean("Item.Area.EcomEnabled")) { if (!GeneralSettings.Header.Show) { <ul class="nav navbar-nav"> <li>&nbsp;&nbsp;&nbsp;</li> @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) { <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> <li class="dw-navbar-button"><a href="/not-logged-in/create-user-profile" data-hover="dropdown"><i class="fa fa-user"></i><span></span></a></li> } @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) { <li class="dw-navbar-button"> <a href='Default.aspx?ID=@Pageview.Area.Item["OrdersPageId"]' data-hover="dropdown"> <nobr> <strong><i class="fa fa-user"></i></strong> </nobr> <span></span> </a> </li> <li class="dw-navbar-button"> <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID" data-hover="dropdown"><i class="fa fa-sign-out"></i><span></span></a> </li> } <li class="dw-navbar-button"> <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> </li> </ul> } if (GeneralSettings.Header.Mode != "solid") { <ul class="nav navbar-nav"> <li class="dropdown dropdown-aux animate-click dw-navbar-button" data-animate-in="animated bounceInUp" data-animate-out="animated fadeOutDown" style="z-index:500;"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown"><i class="fa fa-search"></i><span></span></a> <ul class="dropdown-menu dropdown-menu-user animate-wr"> <li id="dropdownForm"> <div class="dropdown-form"> <form class="form-light p-15" role="form" method="get" action="Default.aspx"> <input type="hidden" name="ID" value='@Pageview.Area.Item["ProductsPageId"]'> <div class="input-group" id="remote"> <input type="text" class="form-control typeahead" name="Search" placeholder="@searchplaceholder"> <span class="input-group-btn" style="top:-1px !important;"> <button class="btn btn-base" type="submit"><i class="fa fa-search"></i></button> </span> </div> </form> </div> </li> </ul> </li> </ul> } } </nav> </div> @if (GetBoolean("Item.Area.EcomEnabled")) { if (GeneralSettings.Header.Mode == "solid" && GeneralSettings.Header.Show) { <div class="hidden-sm hidden-xs"> <div class="col-md-2 col-sm-2 col-xs-2 pull-@GeneralSettings.Navigation.InvertedPosition"> <form method="get" action="Default.aspx"> <input type="hidden" name="ID" value='@Pageview.Area.Item["ProductsPageId"]'> <div id="remote" class="input-group pull-@GeneralSettings.Navigation.InvertedPosition dw-top-search"> <input type="text" class="form-control typeahead" name="Search" tabindex="1" placeholder="@searchplaceholder"> <span class="input-group-btn" style="top:-1px !important;"> <button class="btn btn-primary" type="submit"><i class="fa fa-search"></i></button> </span> </div> </form> </div> </div> } } </div> } else { <!-- Using only mobile navigation --> <div class="pull-@GeneralSettings.Navigation.Position"> <ul class="nav navbar-nav"> <li class="dw-navbar-button" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body"> <a><i class="fa fa-bars fa-2x"></i><span></span></a> </li> </ul> </div> } </div> </div> @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.HeaderLayoutImage"))) { if (currentpageid != firstpageid) { var coverimage = GetString("Item.Area.HeaderLayoutImage"); <div class="container-fluid dw-header-image"> <div class="row"> <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> </div> </div> } else if (GeneralSettings.Header.ShowFrontpageImage) { var coverimage = GetString("Item.Area.HeaderLayoutImage"); <div class="container-fluid dw-header-image"> <div class="row"> <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> </div> </div> } } else if (GeneralSettings.Header.Mode != "solid") { if (currentpageid != firstpageid) { <div class="container-fluid dw-header-image"> <div class="row"> <section class="carousel carousel-1 slice fluid" style="height: 160px !important; background-color: transparent; background-size: cover !important;"></section> </div> </div> } } </header> </div> <!-- MAIN CONTENT --> @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @GetValue("Title(Full width page)") @GetValue("Description(Use this page for full width pages with no left navigation.)") @{ string siteurl = GetGlobalValue("Global:Request.Url").ToString(); } @if(GetBoolean("Item.Page.LayoutShowBreadcrumb")){ <div class="pg-opt pin white"> <div class="container"> <div class="row"> @if (!GetBoolean("Item.Page.LayoutHideLeftMenu")){ <div class="col-lg-3 col-md-3 hidden-sm hidden-xs"> @if (GeneralSettings.Navigation.BreadcrumbMode != "light") { <div class="dw-breadcrumb-title">@GetGlobalValue("Global:Page.Top.Name")</div> } </div> } <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> @GetValue("DwNavigation(breadcrumb)") </div> </div> </div> </div> } <section class="slice white animate-hover-slide"> <div class="container"> @*Impersonation warning*@ @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID")) && GetString("DwPageID") != GetString("DwAreaFirstActivePageID")) { <div class="row"> <div class="col-md-12"> <div class="info-block"><i class="fa fa-user-secret"></i> @GetGlobalValue("Global:Extranet.SecondaryUser.UserName") @Translate("is impersonated by") @Pageview.User.UserName</div> </div> </div> } <div class="row"> @if (!GetBoolean("Item.Page.LayoutHideLeftMenu")) { <div class="col-md-3 hidden-sm hidden-xs"> <div class="widget"> <h3 class="dw-section-title dw-section-title-small"><span>@GetGlobalValue("Global:Page.Top.Name")</span></h3> &nbsp; @GetValue("DwNavigation(leftnavigation)") </div> <p>&nbsp;</p> </div> } @*The content*@ @{ var attributeValue = "col-md-9 col-sm-12 col-xs-12"; if (GetBoolean("Item.Page.LayoutHideLeftMenu")) { attributeValue = "col-md-12 col-sm-12 col-xm-12"; } } <div class="@attributeValue"> <div class="row" id="maincontent">@GetValue("DwContent(maincontent)")</div> </div> @*Facebook like button*@ @if (GetBoolean("Item.Page.FacebookLikeButton")) { <div class="container"> <div class="col-md-12 col-sm-12 col-xs-12"> <div class="row"> <iframe src="//www.facebook.com/plugins/like.php?href=@siteurl&amp;width=200&amp;layout=button_count&amp;action=recommend&amp;show_faces=true&amp;share=true&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:21px;" allowtransparency="true"></iframe> </div> </div> </div> } </div> </div> </section> <!-- FOOTER --> <div class="body-wrap @GeneralSettings.Site.LayoutMode"> <footer class="footer"> <div class="container"> <div class="row"> @if (GetBoolean("Item.Area.FooterShowContactInfo")) { <div class="col-md-3 col-sm-6 col-xs-12"> <div class="col"> <h4>@Translate("Contact us", "Contact us")</h4> @{ string footeremail = GetString("Item.Area.FooterEmail"); string footerphone = GetString("Item.Area.FooterPhone"); } <ul> <li>@GetValue("Item.Area.FooterCompanyName")</li> <li>@GetValue("Item.Area.FooterAddress")</li> <li>@Translate("Phone", "Phone"): <a href="tel:@footerphone">@footerphone</a></li> <li>@Translate("Email", "Email"): <a href="mailto:@footeremail" title="Email Us">@GetValue("Item.Area.FooterEmail")</a></li> </ul> <div>&nbsp;</div> </div> </div> } @if (GetBoolean("Item.Area.FooterNewsletterSignUp")) { <div class="col-md-3 col-sm-6 col-xs-12"> <div class="col"> <h4>@Translate("Mailing list", "Mailing list")</h4> <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> <form name="UserManagementEditForm" action='/Default.aspx?ID=@GetString("Item.Area.SignUpPageId")' method="post" enctype="multipart/form-data"> <input name="UserManagementForm" value="1" type="hidden"> <input id="UserManagementForm.DeleteImage" name="UserManagementForm.DeleteImage" type="hidden"> <div style="display: none;"> <input name="UserManagement_Form_EmailAllowed" id="UserManagement_Form_EmailAllowed" value="True" checked="checked" type="checkbox"> <input name="UserManagement_Form_EmailAllowed_ApplyValue" id="UserManagement_Form_EmailAllowed_ApplyValue" value="AllowEmail" type="hidden"> </div> <div class="input-group"> @{ attrValue = Translate("Your email address", "Your email address");} <input name="UserManagement_Form_Email" id="UserManagement_Form_Email" type="text" class="form-control" placeholder="@attrValue"> <span class="input-group-btn"> <input class="btn btn-base" type="submit" id="submitter" value="Go"> </span> </div> <div>&nbsp;</div> </form> </div> </div> } @if (GetBoolean("Item.Area.SocialLinksInFooter")) { string sicon = ""; string slink = ""; <div class="col-md-3 col-sm-6 col-xs-12"> <div class="col"> <h4>@Translate("Social links", "Social links")</h4> <p> @foreach (LoopItem socialitem in GetLoop("Item.Area.SocialIconInFooter")) { sicon = socialitem.GetString("Item.Area.SocialIconInFooter.Icon"); slink = socialitem.GetString("Item.Area.SocialIconInFooter.Link"); <a href="@slink"><i class="fa @sicon fa-2x"></i>&nbsp;&nbsp;</a> } </p> </div> </div> } @if (GetBoolean("Item.Area.FooterShowSitemap")) { <div class="col-md-6 col-sm-12 col-xs-12"> <div class="col"> @GetValue("DwNavigation(footersitemap)") </div> <div>&nbsp;</div> </div> } </div> <hr> <div class="row"> <div class="col-lg-9 col-md-9 col-sm-9 col-xs-9 copyright"> <div class="col"> <p>@GetGlobalValue("Global:Server.Date.Year") &copy; @GetValue("Item.Area.FooterCompanyName"). @Translate("All rights reserved.", "All rights reserved.")</p> </div> </div> @if (GetString("Item.Area.WebmasterLinkCode") != "") { <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3"> <div class="col pull-right"> @{ var webmasterlink = GetString("Item.Area.WebmasterLinkCode"); var username = GetValue("Item.Area.FooterEmail"); var pagename = GetGlobalValue("Global:Page.Name"); } <p><a href="javascript:void(0);" rel="nofollow" onclick="window.open('@webmasterlink?un=@username&amp;pn=@pagename&amp;url=' + encodeURI(location),'_blank','width=1050,height=750,resizable=yes,scrollbars=yes');">Webmaster</a></p> </div> </div> } </div> </div> </footer> </div> <!--[if IE]> <style> .widget.affix{ width:21% !important; } </style> <![endif]--> <!-- Essentials --> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> <script src="/Files/Templates/Designs/Dwsimple/js/typeahead.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.min.js"></script> <script src="/Files/Templates/Designs/Dwsimple/js/jquerybxslidermin.js"></script> <script src="/Files/Templates/Designs/Dwsimple/js/GeneralMethods.js"></script> <script src="/Files/Templates/Designs/Dwsimple/js/cart.js"></script> <!-- Assets --> <script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-hover-dropdown/2.0.10/bootstrap-hover-dropdown.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/spin.js/2.0.1/spin.min.js"></script> <!-- Sripts for individual pages, depending on what plug-ins are used --> <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/js/jasny-bootstrap.min.js"></script> <!-- Replacing the Home text --> <script> if (document.getElementById("homemenubtn")) { document.getElementById("homemenubtn").innerHTML = "<i class='fa fa-home fa-2'></i><span></span>"; } </script> <script type="text/html-template" id="OrderlineAjaxTemplate"> <tr> <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> <td> <a href="Obj.link"> Obj.name Obj.variantname </a> </td> <td class="text-center">Obj.quantity</td> <td class="text-right"> <nobr> Obj.totalprice </nobr> </td> </tr> </script> <!-- Initialize Fancybox --> <script type="text/javascript"> $(document).ready(function () { MiniCartInit(@Pageview.Area.Item["JSONFeedForCart"], @Pageview.Area.Item["ProductsPageId"]); $(".fancybox").fancybox(); }); </script> <script> function underlineActiveArea(){ var areaId = @GetString("DwAreaID")+"area"; document.getElementById(areaId).className = "activeArea"; } underlineActiveArea(); function underlineActiveCurrency(){ var currency = "id"+"currency"; document.getElementById(currency).className = "activeArea"; } underlineActiveCurrency() </script> <script> var bestPictures = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'), queryTokenizer: Bloodhound.tokenizers.whitespace, remote: { url: '/Default.aspx?ID=@Pageview.Area.Item["ProductsAjaxPageId"]&Search=%QUERY', wildcard: '%QUERY' } }); $('#remote .typeahead').typeahead(null, { name: 'name', display: 'name', source: bestPictures, templates: { empty: [ '<div class="empty-message">', 'unable to find any Best Picture winners that match the current query', '</div>' ].join('\n'), suggestion: Handlebars.compile('<div><a href="{{link}}" title="{{name}}"><img class="tt-img" src="{{image}}" /><strong class="name">{{name}}</strong><div class="tt-price">{{price}}</div><div class="clearfix"></div></a></div>') } }); $('.bxslider').bxSlider({ mode: 'fade', captions: true }); </script> @RenderSnippet("JavaScriptBottom") </div></body> </html>