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