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

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