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