Error executing template "Designs/Dwsimple/_parsed/news.parsed.cshtml"
System.InvalidCastException: Specified cast is not valid.
   at CompiledRazorTemplates.Dynamic.RazorEngine_51fca25e7de04b0c91a3feed338ea9e4.Execute() in D:\dynamicweb.net\Solutions\Skovbodata\sdkirkerne.dw9.dynamicweb-cms.com\files\Templates\Designs\Dwsimple\_parsed\news.parsed.cshtml:line 2636
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

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