Error executing template "Designs/Dwsimple/_parsed/Kalenderaftale.parsed.cshtml"
System.Net.WebException: The remote server returned an error: (404) Not Found.
   at System.Net.HttpWebRequest.GetResponse()
   at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
   at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
   at System.Xml.XmlTextReaderImpl.FinishInitUriString()
   at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
   at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
   at CompiledRazorTemplates.Dynamic.RazorEngine_49c055a8387b40e2b06bbfc714f71c7e.b__20_0(TextWriter __razor_helper_writer) in E:\dynamicweb.net\Solutions\SkovboData\borup.dw9.dynamicweb-cms.com\files\Templates\Designs\Dwsimple\_parsed\Kalenderaftale.parsed.cshtml:line 2605
   at CompiledRazorTemplates.Dynamic.RazorEngine_49c055a8387b40e2b06bbfc714f71c7e.Execute() in E:\dynamicweb.net\Solutions\SkovboData\borup.dw9.dynamicweb-cms.com\files\Templates\Designs\Dwsimple\_parsed\Kalenderaftale.parsed.cshtml:line 2584
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

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