Error executing template "Designs/Dwsimple/_parsed/Kalenderaftale.parsed.cshtml"
System.Net.WebException: The remote server returned an error: (503) Server Unavailable.
   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_a4915f73c0a44fb4bf93b75796bc28d8.<CalendarItem>b__20_0(TextWriter __razor_helper_writer) in E:\dynamicweb.net\solutions\SkovboData\gloslunde.net.dynamicweb-cms.com\Files\Templates\Designs\Dwsimple\_parsed\Kalenderaftale.parsed.cshtml:line 2563
   at CompiledRazorTemplates.Dynamic.RazorEngine_a4915f73c0a44fb4bf93b75796bc28d8.Execute() in E:\dynamicweb.net\solutions\SkovboData\gloslunde.net.dynamicweb-cms.com\Files\Templates\Designs\Dwsimple\_parsed\Kalenderaftale.parsed.cshtml:line 2542
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

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