Error parsing template "Designs/Dwsimple/_parsed/Kalenderaftale.parsed.cshtml"
Line 2668: (2667:5) - Expected a "{" but found a "el".  Block statements must be enclosed in "{" and "}".  You cannot use single-statement control-flow statements in CSHTML pages. For example, the following is not allowed:

@if(isLoggedIn)
    

Hello, @user

Instead, wrap the contents of the block in "{}": @if(isLoggedIn) {

Hello, @user

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