Exception in template (Designs/Dwsimple/_parsed/servicefullwidth.parsed.cshtml): System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.cdaefaaaaaaacda.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName)
   at Dynamicweb.Rendering.Template.Output()
@using System @using System.Web @inherits RazorTemplateBase<RazorTemplateModel<Template>> @using Dynamicweb.Rendering; @using Dynamicweb.Modules.UserManagement; @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; } } } } @helper MiniCart() { <div class="dropdown-cart"> @if (GetInteger("Ecom:Order.OrderLines.TotalProductQuantity") > 0) { <div class="col-md-12 col-sm-12 col-xs-12"> <div class="row"> <span class="cart-items">@Translate("You have", "You have")<strong> @GetValue("Ecom:Order.OrderLines.TotalProductQuantity")</strong> @Translate("items in your cart", "items in your cart")</span> <table class="table table-cart"> <tbody> <tr> <th></th> <th>@Translate("Product", "Product")</th> <th class="text-center">@Translate("Qty", "Qty")</th> <th>@Translate("Total", "Total")</th> </tr> @foreach (var orderline in GetLoop("OrderLines")) { var image = orderline.GetString("Ecom:Product.ImageLarge.Clean"); <tr> <td><img src="/Admin/Public/GetImage.ashx?width=50&image=@image&Compression=99" class="img-center" alt=""></td> <td><a href="@orderline.GetValue(" ecom:order:orderline.productlink")"="">@orderline.GetValue("Ecom:Order:OrderLine.ProductName")</a><br><small>@orderline.GetString("Ecom:Order:OrderLine.ProductVariantText")</small></td> <td class="text-center">@orderline.GetValue("Ecom:Order:OrderLine.Quantity")</td> <td><nobr>@if(orderline.GetInteger("Ecom:Order:OrderLine.Points")>0){ @orderline.GetDouble("Ecom:Order:OrderLine.Points"); <text> </text>@Translate("orderline_points","points") } else{ @orderline.GetValue("Ecom:Order:olPrice.PriceWithVATFormatted") }</nobr></td> </tr> } <tr> <td class="text-center"><i class="fa fa-credit-card"></i></td> <td>@GetValue("Ecom:Order.PaymentMethod")</td> <td class="text-center"></td> <td>@GetValue("Ecom:Order.PaymentFee")</td> </tr> <tr> <td class="text-center"><i class="fa fa-truck"></i></td> <td>@GetValue("Ecom:Order.ShippingMethod")</td> <td class="text-center"></td> <td>@GetValue("Ecom:Order.ShippingFee")</td> </tr> </tbody> </table> </div> </div> <div class="col-md-12 col-sm-12 col-xs-12"> <div class="row"> <div class="col-md-8"> <!-- @{ var edittextstring = Translate("Edit cart", "Edit cart"); var cartid = GetValue("DwAreaCartPageID"); } <form action="/Default.aspx?ID=@cartid" method="post"> <input type="submit" name="CartV2.GotoStep1" id="CartV2.GotoStep1" value="@edittextstring" class="btn btn-xs btn-base pull-left" /> </form> --> </div> <div class="col-md-4"> <a href="Default.aspx?ID=@cartid" class="btn btn-xs btn-base pull-right">@Translate("Proceed to checkout", "Proceed to checkout")</a> <span class="clearfix"></span> </div> </div> <div class="row">&nbsp;</div> </div> } else { <span class="cart-items">@Translate("Your shopping cart is empty.", "Your shopping cart is empty.")</span> } </div> } <!DOCTYPE html> <html data-ng-app="app"> <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"> <!-- 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 = ""; var userOn = ""; string currentpageid = GetString("DwPageID"); string firstpageid = GetString("DwAreaFirstActivePageID"); string loginpageid = GetString("Item.Area.LoginPage"); string searchplaceholder = Translate("Search products", "Search products"); string mypage = GetString("Item.Area.MyPage"); string createuser = GetString("Item.Area.CreateUserPage"); string orders = GetString("Item.Area.OrderPage"); string catalogue = GetString("Item.Area.CataloguePage"); string newsletterid = GetString("Item.Area.NewsletterId"); var cartid = GetValue("DwAreaCartPageID"); var MiniCartPageID = GetString("Item.Area.MiniCart_Page"); var specialistsearch = GetValue("Item.Area.SearchSpecialistsPage"); var productsearch = GetValue("Item.Area.SearchProductsPage"); var specsearch = GetValue("Item.Area.SearchAllSpecialistPage"); var imagebanner = GetString("Item.Page.HeaderImage"); var showlike = GetString("Item.Page.ShowLike"); var searchproductitem = GetValue("Item.Area.LinkToSearchProductPageItem"); string ItemPageIDspecialists = specialistsearch.ToString().TrimStart('/'); string seospecialistssearch = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(ItemPageIDspecialists); string ItemPageIDproducts = searchproductitem.ToString().TrimStart('/'); string seoproductsearch = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(ItemPageIDproducts); DateTime areaUpdated = (DateTime)Pageview.Area.get_Value("AreaUpdatedDate"); 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 = false; string css = String.Empty; if (areaUpdated > lastWriteTime) { writeCss = true; } if (string.IsNullOrWhiteSpace(GetString("Item.Page.ShowLike"))) { showlike = "sub-page"; } } <!-- COMMON CART --> @using System @using System.Web @inherits RazorTemplateBase<RazorTemplateModel<Template>> @using Dynamicweb.Rendering; @using Dynamicweb.Modules.UserManagement; @{ // common cart redirect User extranetUser = null; if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) { extranetUser = User.GetUserByID(int.Parse(GetGlobalValue("Global:Extranet.UserID"))); if (extranetUser != null) { var commonCart = extranetUser.CustomFieldValues.Find(x => x.CustomField.SystemName == "AccessUser_CommonCart").Value; if (commonCart != null) { if (commonCart.ToString() == "True" && extranetUser.CustomerNumber != "ANONYMOUS" && HttpContext.Current.Request.Headers["X-Requested-With"] != "XMLHttpRequest") { // find mastercart var masterCart = User.GetUserBySql("SELECT TOP 1 * FROM AccessUser AS au WHERE au.AccessUserCustomerNumber = '" + extranetUser.CustomerNumber + "' AND au.AccessUser_MasterCart = 'True' ORDER BY AccessUserID ASC"); if (masterCart == null) { masterCart = User.GetUserBySql("SELECT TOP 1 * FROM AccessUser AS au WHERE au.AccessUserCustomerNumber = '" + extranetUser.CustomerNumber + "' ORDER BY AccessUserID ASC"); } // impersonate mastercart if not master if (masterCart.ID != extranetUser.ID) { // count impersonate relations var users = Dynamicweb.Database.CreateDataReader("SELECT * FROM AccessUserSecondaryRelation WHERE AccessUserSecondaryRelationUserID = '" + extranetUser.ID.ToString() + "' AND AccessUserSecondaryRelationSecondaryUserID = '" + masterCart.ID.ToString() + "'"); var impersonateRelationCount = 0; while (users.Read()) { impersonateRelationCount++; } @impersonateRelationCount // create impersonate relation if missing if (impersonateRelationCount < 1) { Dynamicweb.Database.ExecuteNonQuery("INSERT INTO AccessUserSecondaryRelation (AccessUserSecondaryRelationUserID, AccessUserSecondaryRelationSecondaryUserID) VALUES('" + extranetUser.ID.ToString() + "', '" + masterCart.ID.ToString() + "')"); } // redirect for impersonate HttpContext.Current.Response.Clear(); HttpContext.Current.Response.Status = "302 Found"; HttpContext.Current.Response.AddHeader("Location", "/Default.aspx?ID=" + Pageview.Area.Item["Cart_As"] + "&DWExtranetSecondaryUserSelector=" + masterCart.ID.ToString()); HttpContext.Current.Response.End(); } } } } } // common cart var impersonatedCart = ""; if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) { extranetUser = User.GetUserByID(int.Parse(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))); if (extranetUser != null) { var commonCart = extranetUser.CustomFieldValues.Find(x => x.CustomField.SystemName == "AccessUser_CommonCart").Value; if (commonCart != null) { if (commonCart.ToString() == "True" && extranetUser.CustomerNumber != "ANONYMOUS") { impersonatedCart = commonCart.ToString(); } } } } } @if (HttpContext.Current.Request.Cookies["DW_Extranet"] != null) { if (HttpContext.Current.Request.Cookies["DW_Extranet"].Value.Contains("&AL=True")) { if(HttpContext.Current.Request.Cookies["DW_ExtranetSessionCookie"] != null){ HttpCookie myCookie = new HttpCookie("DW_Extranet"); myCookie.Value = HttpContext.Current.Request.Cookies["DW_ExtranetSessionCookie"].Value + "&AL=True"; myCookie.Expires = DateTime.Now.AddDays(90d); HttpContext.Current.Response.Cookies.Add(myCookie); } } } <!--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 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"); //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.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="//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 + @"; } .top-header{ 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 + @"; } 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.7em; 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 TopHeader { 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.TopHeader = GetString("Item.Area.TopHeader.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 = @" 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; } .top-header{ background: @TopHeader !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-two { color: @NavbarFont !important; border-color: @Secondary !important; background-color: @Secondary !important; border: 1px solid @Secondary !important; } .btn-two:hover, .btn-two:focus, .btn-two:active, .btn-two.active, .open .dropdown-toggle.btn-two { 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; } .btn-one:hover, .btn-one:focus, .btn-one:active, .btn-one.active, .open .dropdown-toggle.btn-one { color: @Primary !important; } .btn-four { border: 2px solid @Primary!important; color: @Primary !important; } .btn-four:hover, .btn-four:focus, .btn-four:active, .btn-four.active, .open .dropdown-toggle.btn-four { background-color: #fff !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; } .list-filtered .table-list table thead{ background-color:@TopHeader; } .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("@TopHeader", ColorSettings.Color.TopHeader); 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 class Logo { public static string Image { get; set; } public static string Text { get; set; } public static string SecondaryColor { get; set; } } public class Navigation { public static string Position { 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"); 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.SecondaryColor = GetString("Item.Area.LogoSecondColor.Color"); //Navigation settings GeneralSettings.Navigation.Position = GetString("Item.Area.NavigationPosition"); GeneralSettings.Navigation.StickyMenu = "off"; 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 + @"; } .navbar-wp.affix .navbar-header .dw-logotext, .dw-header-sm-title { color: " + ColorSettings.Color.NavbarFont + @" !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 + @"; } .navbar-wp.affix .navbar-header .dw-logotext, .dw-header-sm-title { color: " + ColorSettings.Color.NavbarFont + @" !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 + @"; } .navbar-wp.affix .navbar-header .dw-logotext, .dw-header-sm-title { color: " + GeneralSettings.Logo.SecondaryColor + @" !important; }"; } else { CssString += @" .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { background-color: " + ColorSettings.Color.Secondary + @"; } #mobilenavigation{ background-color: " + ColorSettings.Color.Secondary + @"; } .dw-header-sm-title { color: " + ColorSettings.Color.NavbarFont + @" !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 += @" .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 += @" .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 += @" .list-active, .list-active > a { background-color: " + ColorSettings.Color.Primary + @" !important; color: #FFF; }"; } if (GeneralSettings.Navigation.LeftmenuMode == "border") { CssString += @" .list-active, .list-active > a { background-color: " + ColorSettings.Color.Primary + @" !important; color: #FFF; }"; } if (GeneralSettings.Navigation.LeftmenuMode == "light-color") { CssString += @" .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; }"; } 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") + @"; }"; 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 { text-align: center; border-bottom: 2px solid; padding: 0; margin: 50px 0 30px; 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.Base.WriteTextFile(css, HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.css"), false); Dynamicweb.Base.WriteTextFile(RemoveWhiteSpaceFromStylesheets(Dynamicweb.Base.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.Base.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"> @{ string cssAutoPath = "/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.min.css?t=@areaUpdated.Ticks"; } <link type="text/css" href="@cssAutoPath" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/style.tp.css" media="screen"> <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/print.css" media="print"> <!-- Analytics code --> @GetValue("Item.Area.OtherAnalyticsCode") <script> var cartPageId = @cartid; var miniCartPageID = @MiniCartPageID; var currentUserId = "@GetGlobalValue("Global:Extranet.UserID")"; var filterSpecialistProductListLink = "@GetString("Item.Area.AjaxProductListSpecialistFilter")"; </script> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js" type="text/javascript"></script> @GetValue("Stylesheets") @GetValue("Javascripts") </head> <body style="@GeneralSettings.Background.Style" id="sitecontent" class="my"> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <!-- MODALS --> @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> <div class="modal fade hidden-print" id="login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> @{ var loginName = Translate("Name", "Navn"); var loginCompany = Translate("Company", "Firma"); var loginCVR = Translate("CVR nr.", "CVR nr."); var loginEmail = Translate("Email", "Email"); var loginPhone = Translate("Main phone", "Main phone"); var loginAddress = Translate("Address", "Address"); var loginZip = Translate("Zip", "Zip"); var loginCity = Translate("City", "City"); var loginPassword = Translate("Password", "Kodeord"); var loginSalesMan = Translate("SalesManPicture", "user.png"); var loginAlreadyCustomer = Translate("AlreadyCustomer", "Already customer?"); var loginNewCustomer = Translate("NewCustomer", "New customer?"); var loginImage = "/Admin/Public/GetImage.ashx?width=270&amp;Compression=75&amp;image=%2fFiles%2fTemplates%2fDesigns%2fDwsimple%2fimages%2fparagraphs%2f" + loginSalesMan; var pleaseEnterYour = Translate("Please enter your", "Indtast venligst dit"); var createNewUser = Translate("Create new user", "Opret ny bruger"); } <div class="modal-dialog modal-lg modal-md modal-sm modal-xs"> <div class="modal-content"> <div class="modal-body clearfix"> <div class="col-sm-4 login-form-modal"> <h4 class="modal-title" id="myModalLabel">@Translate("Login", "Login")</h4> @{ var loginformAction = Translate("loginformAction", "/Default.aspx?ID=9815"); var loginformRedirect = Translate("loginformRedirect", "/Default.aspx?ID=8403"); } <form role="form" id="loginform" method="post" action="@loginformAction" data-redirect="@loginformRedirect"> @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 username", "Enter username"); var username2 = GetValue("DWExtranetUsername"); } <input type="text" class="form-control" name="username" id="username" placeholder="@attrValue" value="@username2" data-msg-required="@pleaseEnterYour @attrValue" data-rule-required="true" aria-required="true"> <label id="username-error" class="error" style="display: none;" for="username">@pleaseEnterYour @attrValue</label> </div> <div class="form-group"> @{ attrValue = Translate("Enter password", "Enter password"); var password2 = GetString("DWExtranetPassword"); } <input type="password" class="form-control" name="password" id="password" placeholder="@attrValue" value="@password2" data-msg-required="@pleaseEnterYour @loginPassword" data-rule-required="true" aria-required="true"> <label id="password-error" class="error" style="display: none;" for="password">@pleaseEnterYour @loginPassword</label> </div> <div class="checkbox pull-left"> <input id="Autologin" type="checkbox" name="Autologin" checked="checked" value="True"> <label for="Autologin">@Translate("Remember me", "Remember me")</label> </div> <div class="err"></div> <a id="forgot-password-link" class="pull-left" aria-controls="collapseExample" aria-expanded="false" data-targetrewrwer="#forgot-password" data-toggle="collapse">@Translate("Forgot your password?", "Forgot your password?")</a> <button type="submit" class="btn btn-xs btn-yellow pull-right">@Translate("Sign in", "Sign in")</button> </form> </div> <div id="create-form" class="col-sm-8 collapse in"> <h4 id="myModalLabel" class="modal-title">@Translate("Create new user", "Opret ny bruger")</h4> <div class="col-sm-9 col-lg-9 col-xs-12"> <div class="form-body"> @{ var formsenduserAction = Translate("formsenduserAction", "/Default.aspx?ID=9821"); var formsenduserParagraph = Translate("formsenduserParagraph", "12388"); } <div class="hidden-fields"> @RenderParagraphContent(Convert.ToInt32(formsenduserParagraph)) </div> <form id="FormSendUser" class="login-send-password clearfix create" action="@formsenduserAction" role="form" enctype="multipart/form-data" name="Create_Login" method="post"> <div class="form-inputs clearfix"> <div class=""> <div class="select-customer-hidden"> <p>@Translate("Select if you are new or existing customer", "Select if you are new or existing customer"):</p> <div class="col-sm-6 col-xs-12"> <div class="form-group"> <div class="input-group"> <a href="javascript:void(0);" class="btn btn-send select-customer already">@loginAlreadyCustomer</a> </div> </div> </div> <div class="col-sm-6 col-xs-12"> <div class="form-group"> <div class="input-group"> <a href="javascript:void(0);" class="btn btn-send select-customer new">@loginNewCustomer</a> </div> </div> </div> </div> <div class="select-customer-fields"> <p><a href="javascript:void(0);" class="select-customer-back">@Translate("Go back", "< Go back")</a></p> <div class="col-sm-6 col-xs-12"> <div class="form-group"> <div class="input-group"> <input type="text" data-msg-required="@pleaseEnterYour @loginCompany" data-rule-required="true" placeholder="@loginCompany" value="" name="Create_Login_Firma" id="Create_Login_Firma" class="form-control" aria-required="true"> </div> </div> </div> <div class="col-sm-6 col-xs-12 select-new-customer-field"> <div class="form-group"> <div class="input-group"> <input type="text" data-msg-required="@pleaseEnterYour @loginPhone" data-rule-required="true" placeholder="@loginPhone" value="" name="Create_Login_Telefon" id="Create_Login_Telefon" class="form-control" aria-required="true"> </div> </div> </div> <div class="col-sm-6 col-xs-12"> <div class="form-group"> <div class="input-group"> <input type="text" data-msg-required="@pleaseEnterYour @loginCVR" data-rule-required="true" placeholder="@loginCVR" value="" name="Create_Login_CVR" id="Create_Login_CVR" class="form-control" aria-required="true"> </div> </div> </div> <div class="col-sm-6 col-xs-12 select-new-customer-field"> <div class="form-group"> <div class="input-group"> <input type="text" data-msg-required="@pleaseEnterYour @loginAddress" data-rule-required="true" placeholder="@loginAddress" value="" name="Create_Login_Adresse" id="Create_Login_Adresse" class="form-control" aria-required="true"> </div> </div> </div> <div class="col-sm-6 col-xs-12 select-new-customer-field"> <div class="form-group"> <div class="input-group"> <input type="text" data-msg-required="@pleaseEnterYour @loginZip" data-rule-required="true" placeholder="@loginZip" value="" name="Create_Login_Postnr" id="Create_Login_Postnr" class="form-control" aria-required="true"> </div> </div> </div> <div class="col-sm-6 col-xs-12 select-new-customer-field"> <div class="form-group"> <div class="input-group"> <input type="text" data-msg-required="@pleaseEnterYour @loginCity" data-rule-required="true" placeholder="@loginCity" value="" name="Create_Login_By" id="Create_Login_By" class="form-control" aria-required="true"> </div> </div> </div> <div class="col-sm-6 col-xs-12"> <div class="form-group"> <div class="input-group"> <input type="text" data-msg-required="@pleaseEnterYour @loginName" data-rule-required="true" placeholder="@loginName" value="" name="Create_Login_Navn" id="Create_Login_Navn" class="form-control" aria-required="true" aria-invalid="true"> </div> </div> </div> <div class="col-sm-6 col-xs-12"> <div class="form-group"> <div class="input-group"> <input type="email" data-rule-email="true" data-msg-required="@pleaseEnterYour @loginEmail" data-rule-required="true" placeholder="@loginEmail" value="" name="Create_Login_Email" id="Create_Login_Email" class="form-control" aria-required="true"> </div> </div> </div> </div> </div> <div class="select-customer-fields"> <button type="submit" id="submitter-send" class="btn btn-yellow pull-left">@createNewUser</button> </div> </div> </form> <div class="successfull-send hidden"> <p>@Translate("Thanks for signing up", "Tak fordi du oprettede dig som kunde.")</p> </div> </div> </div> <div style="background-image:url(@loginImage); background-repeat:no-repeat; background-position:130% bottom;" class="container-login clearfix"> <div class="col-sm-6 col-xs-12"> @* <div class="text"> "@Translate("Fill out fields", "Udfyld felterne og se dine nettopriser i løbet af 24 timer")" </div> *@ <div class="link-box"> @* <a data-target="#video-paragraph" data-toggle="modal"> <span>@Translate("See more about your benefits", "Se mere om dine fordele")</span> <img src="/Admin/Public/GetImage.ashx?width=30&amp;Compression=75&amp;image=%2fFiles%2fTemplates%2fDesigns%2fDwsimple%2fimages%2fparagraphs%2fplay.png"> </a> *@ </div> </div> </div> <img src="@loginImage" class="figure"> </div> <div id="forgot-password" class="col-xs-12 collapse" aria-expanded="true"> <div class="clearfix"></div> <h4 id="myModalLabel" class="modal-title">@Translate("ForgotAccess", "Få adgang til din konto igen")</h4> <p>@Translate("Write your email here and we will send your password", "Skriv din email her og vi sender dit password")</p> @{ var forgotpasswordAction = Translate("forgotpasswordAction", "/Default.aspx?ID=9466"); } <form action="@forgotpasswordAction" id="forgot-form" method="post" novalidate="novalidate"> <input type="hidden" value="Recovery" name="LoginAction"> <input type="hidden" value="" name="ForgotPasswordMailTemplate"> <input type="hidden" value="" name="ForgotPasswordSenderEmail"> <input type="hidden" value="" name="ForgotPasswordMailSubject"> <div class="pr-field form-group"> <input type="text" placeholder="@loginEmail" style="width:100%;" value="" id="AccessUserEmail" class="form-control forgot-password-input" name="AccessUserEmail"> <label style="width:100%; display:none" class="err-forgot">@Translate("User not found", "Brugeren blev ikke fundet")</label> <div class="clearfix"></div> <button class="btn btn-yellow pull-left forgot-password-send" name="LoginAction" type="submit">@Translate("Resend password", "Gensend kodeord")</button> <div class="clearfix"></div> </div> <div class="pr-field commands "> <button class="btn btn-yellow pull-left forgot-password-back" type="button">@Translate("Back", "Tilbage")</button> </div> </form> <div class="clearfix"></div> </div> </div> </div> </div> </div> <div class="modal fade hidden-print" id="video-paragraph" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog modal-lg modal-md modal-sm modal-xs"> <div class="modal-content"> <div class="modal-body"> <iframe width="560" height="315" src="https://www.youtube.com/embed/PKSMN5VEwXc" frameborder="0" allowfullscreen=""></iframe> </div> </div> </div> </div> @{ var groupid = HttpContext.Current.Request["groupid"]; var ContactPageID = Pageview.Area.Item["ContactPageID"]; var ContactPersonImage = Pageview.Area.Item["ContactPersonImage"]; var ContactPersonName = Pageview.Area.Item["ContactPersonName"]; var ContactPersonEmail = Pageview.Area.Item["ContactPersonEmail"]; var ContactPersonPhone = Pageview.Area.Item["ContactPersonPhone"]; } <div class="contactbox-wrapper hidden-xs"> <div class="contact-box hidden-print default"> <img src="/Admin/Public/GetImage.ashx?width=43&amp;Compression=75&amp;image=/Files/Templates/Designs/Dwsimple/images/icons/kontakt-icon.png"><span>@Translate("Contact", "Kontakt")</span> </div> <div class="contactbox-persons close-box"> <div class="contactbox-text"> <p>@Translate("Call our specialists.", "Ring pa tlf. +45 7633 3333 Eller kontakt vores Specialister.")</p> </div> <div class="specialist-wrapper"> @if (string.IsNullOrWhiteSpace(groupid)) { <div class="person-row" data-email="@ContactPersonEmail"> <div class="user-info"> <img class="" src="/Admin/Public/Getimage.ashx?width=200&amp;compression=85&amp;Crop=7&amp;image=@ContactPersonImage" alt="@ContactPersonName"> <h3>@ContactPersonName</h3> <div class="row person"> <div class="col-sm-12 col-xs-12"> <b>@Translate("Telephone", "Telephone"):</b> <span>@ContactPersonPhone</span> </div> </div> <div class="row person"> <div class="col-sm-12 col-xs-12"> <b>@Translate("Mail", "Mail"):</b> <span><a href="mailto:@ContactPersonEmail">@ContactPersonEmail</a></span> </div> </div> </div> <div class="contactbox-wrapper-form"> <!--@Global:Page.Content(@ContactPageID)--> </div> </div> } </div> </div> </div> <div class="wind-box hidden-print hidden default"> <img src="/Admin/Public/GetImage.ashx?width=52&amp;Compression=75&amp;image=/Files/Templates/Designs/Dwsimple/images/icons/kontakt-icon.png"><span>@Translate("Contact", "Kontakt")</span> </div> <!-- HEADER AND CONTENT--> <div class="body-wrap shad front @GeneralSettings.Site.LayoutMode @showlike"> <!-- HEADER --> <div id="divHeaderWrapper"> <header class="@GeneralSettings.Header.Classes"> @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> <!-- MAIN NAV --> @{ var sticky = GeneralSettings.Navigation.StickyMenu; var stickyTrigger = "affix"; var navbarpos = GeneralSettings.Navigation.Position; var selectionstyle = GeneralSettings.Navigation.SelectionStyle; var frontPageID = GetString("Item.Area.FrontPageID"); var impersonateRedirect = "/Default.aspx?ID=" + GetString("Item.Area.ImpersonatePageID") + "&DwExtranetRemoveSecondaryUser=stop"; if (sticky == "off") { stickyTrigger = ""; } var salesMan = ""; if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) { salesMan = "salesman"; } } <div id="navOne" class="navbar navbar-wp @selectionstyle navbar-fixed default affix-top fixed @salesMan" role="navigation"> <!-- TOP HEADER --> @if (GeneralSettings.Header.Show) { <div class="top-header hidden-print"> <div class="container clearfix"> <nav class="col-sm-7 col-md-7 hidden-xs navbar-@navbarpos"> <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#mobilenavigation" aria-controls="bs-navbar" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> @RenderNavigation(new { template = "Megamenu.xslt", endlevel = "3", id = "topnavigation", expandmode = "all" }) </nav> <div class="col-xs-12 col-sm-12 col-md-5 logobox pull-right"> <nav class="top-header-menu"> <ul class="top-menu"> <!-- Ecommerce user menu --> @if (GetBoolean("Item.Area.EcomEnabled")) { if (!Dynamicweb.Input.FormatBoolean(GetGlobalValue("Global:Extranet.UserName"))) { <text> <li class="my-page-link"> <a href="#" data-toggle="modal" data-target="#login"> <span>@Translate("MyKlingspor", "My Klingspor")</span> </a> </li> <li class="empty-cart"> <a href="#" data-toggle="modal" data-target="#login"> <span>@Translate("Cart", "Cart")</span> <nobr><i class="fa fa-shopping-basket"></i></nobr> </a> </li> </text> } if (Dynamicweb.Input.FormatBoolean(GetGlobalValue("Global:Extranet.UserName"))) { <text> <li class="my-page-logout"> <a href='/Admin/Public/ExtranetLogoff.aspx?ID=@firstpageid'> <span>@Translate("Logout", "Logout")</span> </a> </li> <li class="my-page-link"> <a href="@mypage"> <span>@Translate("MyKlingspor", "My Klingspor") <i class="fa fa-unlock"></i></span> </a> </li> @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Order.OrderLines.TotalProductQuantity"))) { <li class="login-on-user"> <a href="Default.aspx?ID=@cartid" title="" id="minipagecart" class="dw-minicart"> <nobr><i class="fa fa-shopping-basket"></i></nobr> <span>@Translate("Cart", "Cart") @GetValue("Ecom:Order.OrderLines.Total.PriceWithoutVAT")</span> </a> </li> } @if (string.IsNullOrWhiteSpace(GetString("Ecom:Order.OrderLines.TotalProductQuantity"))) { <li class="login-on-user empty-cart"> <a href="Default.aspx?ID=@cartid" title="" id="minipagecart" class="dw-minicart"> <nobr><i class="fa fa-shopping-basket"></i></nobr> <span>@Translate("Cart", "Cart") @GetValue("Ecom:Order.OrderLines.TotalProductQuantity")</span> </a> </li> } </text> } } </ul> @if (Dynamicweb.Input.FormatBoolean(GetGlobalValue("Global:Extranet.UserName"))) { if(GetGlobalValue("Global:Area.ID") == "1" || GetGlobalValue("Global:Area.ID") == "16" || GetGlobalValue("Global:Area.ID") == "17" || GetGlobalValue("Global:Area.ID") == "18" || GetGlobalValue("Global:Area.ID") == "19"){ <div class="dropdown language-select"> <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> @if(GetGlobalValue("Global:Area.ID") == "1"){ <span class="dk">DK</span> } @if(GetGlobalValue("Global:Area.ID") == "16"){ <span class="se">SE</span> } @if(GetGlobalValue("Global:Area.ID") == "17"){ <span class="fi">FI</span> } @if(GetGlobalValue("Global:Area.ID") == "18"){ <span class="en">ENG</span> } @if(GetGlobalValue("Global:Area.ID") == "19"){ <span class="no">NO</span> } <i class="fa fa-angle-down" aria-hidden="true"></i> </button> <ul class="dropdown-menu" aria-labelledby="dropdownMenu1"> @if(GetGlobalValue("Global:Area.ID") == "1"){ <li><a href="http://www.klingspor.dk"><span class="dk">DK</span></a></li> } @if(GetGlobalValue("Global:Area.ID") == "16"){ <li><a href="http://www.klingspor.se"><span class="se">SE</span></a></li> } @if(GetGlobalValue("Global:Area.ID") == "17"){ <li><a href="http://www.klingspor.fi"><span class="fi">FI</span></a></li> } @if(GetGlobalValue("Global:Area.ID") == "19"){ <li><a href="http://www.klingspor.no"><span class="no">NO</span></a></li> } <li><a href="http://eng.klingspor.dk"><span class="en">ENG</span></a></li> </ul> </div> } } @if (!Dynamicweb.Input.FormatBoolean(GetGlobalValue("Global:Extranet.UserName")) && GetGlobalValue("Global:Area.ID") == "18") { <div class="dropdown language-select"> <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> <span class="en">ENG</span> <i class="fa fa-angle-down" aria-hidden="true"></i> </button> <ul class="dropdown-menu" aria-labelledby="dropdownMenu1"> <li><a href="http://www.klingspor.dk"><span class="dk">DK</span></a></li> <li><a href="http://www.klingspor.se"><span class="se">SE</span></a></li> <li><a href="http://www.klingspor.no"><span class="no">NO</span></a></li> <li><a href="http://www.klingspor.fi"><span class="fi">FI</span></a></li> <li><a href="http://eng.klingspor.dk"><span class="en">ENG</span></a></li> </ul> </div> } </nav> </div> </div> </div> } <div class="container @showlike"> @if (GeneralSettings.Header.Mode == "solid" || !GeneralSettings.Header.Show) { <div class="navbar-header pull-left"> <div class=""> <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> </div> </div> } @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)) { <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> </div> </div> } @if (GeneralSettings.Header.Mode != "mobile") { <!-- Big screen header --> <div class="navbar-navigation clearfix @userOn hidden-print"> <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#mobilenavigation" aria-controls="bs-navbar" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> @if (Pageview.Device == Dynamicweb.Frontend.PageView.DeviceType.Desktop) { <div class="clearfix col-sm-offset-2 col-md-offset-2 hidden-xs"> <form method="get" action="Default.aspx" id="product-search"> <input type="hidden" name="ID" value='@productsearch'> <input type="hidden" name="Type" value='Products'> <input type="hidden" name="PageSize" value='10'> <div class="input-group" id="remote-product"> <input type="text" class="form-control search" name="eComQuery" tabindex="1" placeholder="@searchplaceholder"> <button type="submit"><i class="fa fa-search"></i></button> </div> </form> </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> @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) { if (string.IsNullOrEmpty(impersonatedCart)) { <div class="impersonate-box"> <div class="container"> <div class="row"> <div class="col-xs-10 col-sm-8 col-sm-offset-2"> <strong>@GetGlobalValue("Global:Extranet.SecondaryUser.Name")</strong> - <strong>@Translate("Activated client", "Activated client"): </strong> @GetGlobalValue("Global:Extranet.Company"), @Translate("att.:", "att.:") <span>@GetGlobalValue("Global:Extranet.Name")</span> </div> <div class="col-xs-2"> <div class="pull-right"><a class="btn btn-silver" href="@impersonateRedirect">@Translate("Stop", "Stop")</a></div> </div> </div> </div> </div> } } </div> @RenderNavigation(new { template = "MobileMainNavigation.xslt", endlevel = "3", id = "mobilenavigation", expandmode = "all" }) </header> </div> <div class="bisness-area"> <div class="container"> <div class="dropdown site-map clearfix hidden-xs"> @RenderNavigation(new { template = "bisness-area-navigation.xslt", startlevel = "1",endlevel = "2", id = "bisness-navigation"}) </div> @* <div class="clearfix col-xs-12 hidden-sm hidden-lg hidden-md" id="left-menu-mobile"> @RenderNavigation(new { template = "bisness-area-navigation-mobile.xslt", startlevel = "1",endlevel = "2", id = "bisness-navigation-mobile"}) </div>*@ </div> </div> </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.)") @{ // variables string siteurl = GetGlobalValue("Global:Request.Url").ToString(); var openclass = ""; var opencontent = ""; var arrowactive = ""; var request = HttpContext.Current.Request; var company = ""; if (!string.IsNullOrEmpty(GetString("DW_extranet_AccessUserName"))) { company = User.GetCurrentUser().Company; } var UDLPageIDMenu = Pageview.Area.Item["UserDefinedListsPageID"]; } <section class="slice white animate-hover-slide my-klingspor" data-ng-controller="MyKlingsporController"> <div class="container" id="offcanvas-container"> <div class="row"> @if (!GetBoolean("Item.Page.LayoutHideLeftMenu")) { arrowactive = "active"; <div class="pushmenu-left col-sm-3 hidden-print" id="left-menu" data-lists="@UDLPageIDMenu"> <div class="widget"> <p class="welcome">@Translate("Welcome", "Velkommen")</p> @if (string.IsNullOrEmpty(impersonatedCart)) { <p class="name"><strong>@GetString("DW_extranet_AccessUserName")</strong></p> <p class="email">@company</p> } else { <p class="name"><strong>@extranetUser.Name</strong></p> <p class="email">@extranetUser.Company</p> } @RenderNavigation(new { template = "ServiceLeftNavigation.xslt", startlevel = "1", endlevel = "3", id = "leftnavigation", parenttag = "service" }) </div> </div> } @{ var attributeValue = ""; var borderleft = "1px solid #ccc"; if (!GetBoolean("Item.Page.LayoutHideLeftMenu")) { attributeValue = "pushmenu-push col-sm-9 col-xs-12"; } else{ attributeValue = "pushmenu-push col-sm-12 col-xs-12"; } } <div class="@attributeValue"> <div class="content" id="content"> @{ // get query string and url var listName = HttpContext.Current.Request["list_name"]; } @SnippetStart("PageHeader") <div class="header"> <h1 class="kli-section-head-title">@GetValue("DwPageName_2")</h1> <h3 class="kli-section-title">@if(listName == null){ @GetValue("DwPageName") } @if(listName != null){ @listName }</h3> </div> @SnippetEnd("PageHeader") @if (GetBoolean("Item.Page.LayoutShowBreadcrumb")) { <div class="pg-opt pin white"> @if (!GetBoolean("Item.Page.LayoutHideLeftMenu")) { if (GeneralSettings.Navigation.BreadcrumbMode != "light") { <div class="dw-breadcrumb-title">@GetGlobalValue("Global:Page.Top.Name")</div> } } <ul class="breadcrumb dw-breadcrumb" id="breadcrumb"> <li><b>@Translate("You are here", "You are here"):</b></li> <li><a href="/Default.aspx?ID=@this.Pageview.Page.Parent.ID">@GetString("DwPageName_2")</a></li> @RenderNavigation(new { template = "breadcrumb.xslt", expandmode = "pathonly" }) </ul> </div> } <div id="maincontent">@GetValue("DwContent(maincontent)")</div> <div id="spotcontent">@GetValue("DwContent(spotcontent)")</div> </div> </div> @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 --> @if(GetGlobalValue("Global:Area.ID") == "18"){ <div class="body-wrap @GeneralSettings.Site.LayoutMode hidden-print"> <footer class="footer blade-treatment"> <div class="container blade-treatment-footer" id="blade-treatment-footer" title="Footer"> @GetValue("Item.Area.FooterAddress") </div> </footer> <div class="added-to-cart"> <div class="added-to-cart-box"> <i class="fa fa-check-square" aria-hidden="true"></i> </div> </div> </div> } else { <div class="body-wrap @GeneralSettings.Site.LayoutMode hidden-print"> <footer class="footer"> <div class="container"> <div class="row"> @{ string footeremail = GetString("Item.Area.FooterEmail"); string saleslink = GetString("Item.Area.SalesConditionsAndReturnedGoodsLink"); string aboutlink = GetString("Item.Area.About_KlingsporLink"); string contactlink = GetString("Item.Area.ContactUsLink"); string footertext = GetString("Item.Area.FooterText"); } <div class="col-md-6 col-sm-12"> <div class="col"> <div class="footer-txt"> <h4>@footertext</h4> </div> </div> </div> <div class="col-md-6 col-sm-12 col-xs-12"> <div class="col"> <div class="footer-adress"> <h4>@GetValue("Item.Area.FooterCompanyName")</h4> <ul> <li>@GetValue("Item.Area.FooterAddress")</li> </ul> <ul> <li><p>@Translate("Email", "E"): <a href="mailto:@footeremail" title="Email Us">@GetValue("Item.Area.FooterEmail")</a></p></li> <li><p>@Translate("Phone", "T"): @GetValue("Item.Area.FooterPhone")</p></li> <li></li> <li> <p><a href="javascript:void(0)" class="conditions">@Translate("Delivery conditions", "Salgs- og leveringsbetingelser")</a> </p> </li> </ul> </div> </div> </div> </div> </div> </footer> <div class="added-to-cart"> <div class="added-to-cart-box"> <i class="fa fa-check-square" aria-hidden="true"></i> </div> </div> </div> } <!-- includes --> @if(string.IsNullOrEmpty(GetString("DW_extranet_AccessUserName"))){ <div id="user-btn" class="hidden-xs hidden-print" style="display:none;">@Translate("Get a password and watch prices", "Få et password og se dine nettopriser")</div> <div id="user-wrapper" class="user-wrapper hidden-print"> <div id="user-btn-mobile" class="hidden-lg hidden-sm hidden-md">@Translate("Get a password and watch prices", "Få et password og se dine nettopriser")</div> <div class="user-links"> <div onclick="setPopupCookie()" class="close-icon hidden-xs"></div> <div class="user-box" title="User" id="user-yellow"> <section class="slice"> <div class="form-body"> <div class="row"> <div class="hidden-fields"> @RenderParagraphContent(Convert.ToInt32(formsenduserParagraph)) </div> <form id="FormSendUser" class="clearfix col-sm-8 col-xs-12 create" action="@formsenduserAction" role="form" enctype="multipart/form-data" name="Create_Login" method="post"> <div class="form-header col-xs-12"> <h2 class="hidden-xs">@Translate("Get a password and watch prices", "Få et password og se dine nettopriser")</h2> <div class="select-customer-hidden"> <p>@Translate("Select if you are new or existing customer", "Select if you are new or existing customer"):</p> </div> <div class="select-customer-fields hidden-xs"> <p><a href="javascript:void(0);" class="select-customer-back">@Translate("Go back", "< Go back")</a></p> </div> </div> <div class="fields"> <div class="select-customer-hidden"> <div class="col-sm-6 col-xs-12"> <div class="form-group"> <div class="input-group"> <a href="javascript:void(0);" class="btn btn-send select-customer already">@loginAlreadyCustomer</a> </div> </div> </div> <div class="col-sm-6 col-xs-12"> <div class="form-group"> <div class="input-group"> <a href="javascript:void(0);" class="btn btn-send select-customer new">@loginNewCustomer</a> </div> </div> </div> </div> <div class="select-customer-fields"> <div class="col-md-6 col-xs-6"> <div class="form-group"> <div class="input-group"> <input type="text" placeholder="@loginCompany*" value="" name="Create_Login_Firma" class="form-control validate required"> <div class="help-block with-errors"></div> </div> </div> </div> <div class="col-md-6 col-xs-6 select-new-customer-field"> <div class="form-group"> <div class="input-group"> <input type="text" placeholder="@loginPhone*" value="" name="Create_Login_Telefon" class="form-control validate required"> <div class="help-block with-errors"></div> </div> </div> </div> <div class="col-md-6 col-xs-6"> <div class="form-group"> <div class="input-group"> <input type="text" placeholder="@loginCVR*" value="" name="Create_Login_CVR" class="form-control validate required"> <div class="help-block with-errors"></div> </div> </div> </div> <div class="col-md-6 col-xs-6 select-new-customer-field"> <div class="form-group"> <div class="input-group"> <input type="text" placeholder="@loginAddress*" value="" name="Create_Login_Adresse" class="form-control validate required"> <div class="help-block with-errors"></div> </div> </div> </div> <div class="col-md-6 col-xs-6 select-new-customer-field"> <div class="form-group"> <div class="input-group"> <input type="text" placeholder="@loginZip*" value="" name="Create_Login_Postnr" class="form-control validate required"> <div class="help-block with-errors"></div> </div> </div> </div> <div class="col-md-6 col-xs-6 select-new-customer-field"> <div class="form-group"> <div class="input-group"> <input type="text" placeholder="@loginCity*" value="" name="Create_Login_By" class="form-control validate required"> <div class="help-block with-errors"></div> </div> </div> </div> <div class="col-md-6 col-xs-6"> <div class="form-group"> <div class="input-group"> <input type="text" placeholder="@loginName*" name="Create_Login_Navn" class="form-control validate required"> <div class="help-block with-errors"></div> </div> </div> </div> <div class="col-md-6 col-xs-6"> <div class="form-group"> <div class="input-group"> <input type="email" placeholder="@loginEmail*" value="" name="Create_Login_Email" class="form-control validate email"> <div class="help-block with-errors"></div> </div> </div> </div> </div> </div> <div class="select-customer-fields"> <div class="col-xs-12"> <button type="button" id="submitter" class="btn btn-send pull-left">@createNewUser</button> </div> </div> </form> <div class="col-sm-4 col-xs-3 hidden-xs icon-contaner"> <div class="unlock-icon pull-right"> </div> </div> </div> </div> <div class="form-success"> <div class="col-xs-12"> <h4>@Translate("Thanks for your request.", "Tak for din forespørgsel")</h4> <p>@Translate("Your requeast has been send and we will get back to you as soon as pissible.", "Din forespørgsel er afsendt og vi vender tilbage hurtigst muligt.")</p> </div> </div> </section> </div> </div> </div> } <script> function getPopupCookie(name){ var pattern = RegExp(name + "=.[^;]*") matched = document.cookie.match(pattern) if (matched) { var cookie = matched[0].split('=') return cookie[1] } return false } function setPopupCookie(){ document.cookie = "popup=closed"; } function popupCookietest() { if (getPopupCookie("popup")) { if (getPopupCookie("popup") == "closed"){ } }else{ $("#user-btn").show(); } } popupCookietest(); </script> <div class="modal fade" id="video-modal" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog video"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <h5 class="modal-title" id="myModalLabel"></h5> </div> <div class="modal-body"> <iframe width="100%" height="400" frameborder="0" src="" allowfullscreen=""></iframe> </div> </div> </div> </div> @{ var deliveryConditions = "/Default.aspx?ID=" + GetString("Item.Area.DeliveryConditions"); } <div id="modal-conditions" class="modal fade" tabindex="-1" role="dialog" data-url="@deliveryConditions"> <div class="modal-dialog" role="document"> <div class="modal-content conditions"> <!--<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>--> <div class="modal-body"> </div> </div> </div> </div> <!-- Essentials --> <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="//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script> <script src="/Files/Templates/Designs/Dwsimple/js/jquery.validate.min.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/fancybox/2.1.5/jquery.fancybox.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> <script type="text/javascript" src="/Files/Templates/Designs/Dwsimple/js/typeahead.bundle.js"></script> <!--<script type="text/javascript" src="js/custom.js"></script>--> <script type="text/javascript" src="/Files/Templates/Designs/Dwsimple/js/custom.tp.js"></script> <script src="/Files/Templates/Designs/Dwsimple/js/ajax-cart.js?v=1.1"></script> @RenderSnippet("JavascriptBottom") <!-- Initialize sortable tables--> <script src="/Files/Templates/Designs/Dwsimple/js/tablesorter/jquery.tablesorter.min.js"></script> <script src="/Files/Templates/Designs/Dwsimple/js/tablesorter/jquery.metadata.js"></script> <script> function addTableSorter() { $.tablesorter.addParser({ id: "Date", is: function (s) { return false; }, format: function (s, table) { return new Date(s).getTime() || ''; }, type: "numeric" }); $(".tablesorter").tablesorter({ headers: { 9: { sorter: "Date" } } }); } $(document).ready(function () { addTableSorter(); }); </script> <script> var searchproducts = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'), queryTokenizer: Bloodhound.tokenizers.whitespace, remote: { url: '@seoproductsearch?eComQuery=%QUERY&Type=Products&PageSize=10', wildcard: '%QUERY' } }); searchproducts.initialize(); $('#remote-product .form-control').typeahead(null, { limit: 10, name: 'name', display: 'name', source: searchproducts, templates: { header: '<div class="search-header clearfix"><h3 class="product-title pull-left">@Translate("Produktnavn", "Produktnavn")</h3><div class="group-name pull-right"><h3>@Translate("Produktgruppe", "Produktgruppe")</h3></div>', empty: '<div class="not-found">not found</div>', //optional suggestion: function (el) { if(typeof el.name != 'undefined') { return '<div class="row-search clearfix"><div class="test pull-left"><a href="' + el.link + '">' + '<img src="' + el.image + '" />' + '<span>' + el.name + '</span>' + '</a><div class="group-name pull-right"><span>' + el.groupname + '</span></div></div></div>'; } else { return '<div class="row-search clearfix hidden"><div class="test pull-left"><a href="' + el.link + '">' + '<img src="' + el.image + '" />' + '<span>' + el.name + '</span>' + '</a><div class="group-name pull-right"><span>' + el.groupname + '</span></div></div></div>'; } }, footer: function (el) { return '<div class="footer-paging"><span>@Translate("Din søgning gav","Din søgning gav") <b>' + el.suggestions[0].numberofproducts + '</b> @Translate("resultater","resultater") - <a href="/Default.aspx?ID=@productsearch&eComQuery='+ el.query +'&Type=Products&PageSize=10">@Translate("Klik her","Klik her")</a> @Translate("og se søgeresultatet","og se søgeresultatet")</span></div>'; } } }); </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> <!-- Initialize Fancybox --> <script type="text/javascript"> $(document).ready(function () { $(".fancybox").fancybox(); $('#variant-carousel .carousel').carousel({ interval: false }) $('#variant-carousel').on('slid.bs.carousel', function (e) { $("div.custom > div[data-slidenumber!=" + $(e.relatedTarget).index() + "]").removeClass("active"); $("div.custom > div[data-slidenumber=" + $(e.relatedTarget).index() + "]").addClass("active"); }) }); </script> </body> </html>