Error compiling template "Designs/australis/_parsed/news-detail.parsed.cshtml"
Line 2545: 'Dynamicweb.Security.UserManagement.User.GetCurrentUser()' is obsolete: 'Use Current() with PagePermissionLevels instead.'
Line 2545: 'Dynamicweb.Security.UserManagement.User.GetCurrentUser()' is obsolete: 'Use Current() with PagePermissionLevels instead.'
Line 4815: The type or namespace name 'Database' does not exist in the namespace 'Dynamicweb' (are you missing an assembly reference?)
Line 4840: The type or namespace name 'Database' does not exist in the namespace 'Dynamicweb' (are you missing an assembly reference?)
Line 4858: The type or namespace name 'Database' does not exist in the namespace 'Dynamicweb' (are you missing an assembly reference?)

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using System 3 @using System.Web 4 @using Dynamicweb.Security.UserManagement 5 @using Dynamicweb.Security.UserManagement.Common.CustomFields 6 @using System.Text.RegularExpressions 7 @using System.Web 8 9 10 @functions{ 11 public class WrapMethods 12 { 13 //Gets the contrasting color 14 public static string getContrastYIQ(string hexcolor) 15 { 16 if (hexcolor != "") 17 { 18 hexcolor = Regex.Replace(hexcolor, "[^0-9a-zA-Z]+", ""); 19 20 int r = Convert.ToByte(hexcolor.Substring(0, 2), 16); 21 int g = Convert.ToByte(hexcolor.Substring(2, 2), 16); 22 int b = Convert.ToByte(hexcolor.Substring(4, 2), 16); 23 int yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000; 24 25 if (yiq >= 128) 26 { 27 return "black"; 28 } 29 else 30 { 31 return "white"; 32 } 33 } 34 else 35 { 36 return "black"; 37 } 38 } 39 40 41 //Truncate text 42 public static string Truncate (string value, int count, bool strip=true) 43 { 44 if (strip == true){ 45 value = StripHtmlTagByCharArray(value); 46 } 47 48 if (value.Length > count) 49 { 50 value = value.Substring(0, count - 1) + "..."; 51 } 52 53 return value; 54 } 55 56 57 //Strip text from HTML 58 public static string StripHtmlTagByCharArray(string htmlString) 59 { 60 char[] array = new char[htmlString.Length]; 61 int arrayIndex = 0; 62 bool inside = false; 63 64 for (int i = 0; i < htmlString.Length; i++) 65 { 66 char let = htmlString[i]; 67 if (let == '<') 68 { 69 inside = true; 70 continue; 71 } 72 if (let == '>') 73 { 74 inside = false; 75 continue; 76 } 77 if (!inside) 78 { 79 array[arrayIndex] = let; 80 arrayIndex++; 81 } 82 } 83 return new string(array, 0, arrayIndex); 84 } 85 86 //Make the correct count of columns 87 public static string ColumnMaker(int Col, string ScreenSize) 88 { 89 string Columns = ""; 90 91 switch (Col) 92 { 93 case 1: 94 Columns = "col-"+ScreenSize+"-12"; 95 break; 96 97 case 2: 98 Columns = "col-"+ScreenSize+"-6"; 99 break; 100 101 case 3: 102 Columns = "col-"+ScreenSize+"-4"; 103 break; 104 105 case 4: 106 Columns = "col-"+ScreenSize+"-3"; 107 break; 108 109 case 6: 110 Columns = "col-"+ScreenSize+"-2"; 111 break; 112 113 default: 114 Columns = "col-"+ScreenSize+"-3"; 115 break; 116 } 117 118 return Columns; 119 } 120 121 122 private string Custom(string firstoption, string secondoption) 123 { 124 if (firstoption == "custom") 125 { 126 return secondoption; 127 } 128 else 129 { 130 return firstoption; 131 } 132 } 133 } 134 } 135 @helper MiniCart() 136 { 137 138 <div class="dropdown-cart"> 139 @if (GetInteger("Ecom:Order.OrderLines.TotalProductQuantity") > 0) 140 { 141 <div class="col-md-12 col-sm-12 col-xs-12"> 142 <div class="row"> 143 <span class="cart-items">@Translate("You have", "You have") 144 <strong> @GetValue("Ecom:Order.OrderLines.TotalProductQuantity")</strong> 145 @Translate("items in your cart", "items in your cart") 146 </span> 147 <table class="table table-cart"> 148 <tbody> 149 <tr class="miniCartProduct"> 150 <th></th> 151 <th>@Translate("Product", "Product")</th> 152 <th class="text-center">@Translate("Qty", "Qty")</th> 153 <th>@Translate("Total", "Total")</th> 154 155 </tr> 156 @{var list=new List<String>();} 157 @foreach(LoopItem orderline1 in GetLoop("OrderLines")) 158 { 159 if(orderline1.GetInteger("Ecom:Order:OrderLine.Type") == 3) 160 { 161 var string1 = orderline1.GetString("Ecom:Order:OrderLine.ParentLineID")+"|"+orderline1.GetValue("Ecom:Order:olPrice.PriceWithoutVATFormatted"); 162 list.Add(string1); 163 } 164 } 165 @foreach(LoopItem orderline in GetLoop("OrderLines")) 166 { 167 168 var image = "files/Images/Australis/Products/"+orderline.GetString("Ecom:Product.Number")+"-small.jpg"; 169 170 //var image = orderline.GetString("Ecom:Product.ImageLarge.Clean"); 171 172 if(orderline.GetInteger("Ecom:Order:OrderLine.Type") != 1 && orderline.GetInteger("Ecom:Order:OrderLine.Type") != 3) 173 { 174 <tr class="miniCartProduct" style="font-weight:normal;"> 175 <td style="width:20%" class="miniCartProductThumb"> 176 <div> 177 <a href="@orderline.GetValue(" ecom:order:orderline.productlink")"=""> 178 <img src="@image" class="img-center" onerror="imgError(this);" style="width:50px;" alt=""> 179 <!--<img src="/Admin/Public/GetImage.ashx?width=50&image=@image&Compression=99" class="img-center" alt="">--> 180 181 </a> 182 </div> 183 </td> 184 <td> 185 <div class="miniCartDescription"> 186 <a href="@orderline.GetValue(" ecom:order:orderline.productlink")"="">@orderline.GetValue("Ecom:Order:OrderLine.ProductName")</a><br> 187 </div> 188 </td> 189 <td style="width:10%;text-align:right!important;padding-right:10px;" class="miniCartQuantity">@orderline.GetString("Ecom:Order:OrderLine.Quantity")</td> 190 <td style="width:20%;padding-right:15px;"> 191 <nobr> 192 @if(orderline.GetInteger("Ecom:Order:OrderLine.Points")>0){ 193 @orderline.GetDouble("Ecom:Order:OrderLine.Points"); 194 <text> </text>@Translate("orderline_points","points") 195 } 196 else{ 197 foreach (LoopItem OrderLineFields in orderline.GetLoop("Order.OrderLineFields")) 198 { 199 200 var buyPrice= OrderLineFields.GetString("Ecom:Order:OrderLine.OrderLineField.Name"); 201 var buyPriceValue = OrderLineFields.GetValue("Ecom:Order:OrderLine.OrderLineField.Value"); 202 203 204 if(buyPrice=="OrderLineBuyPriceWithoutVAT") 205 { 206 <text>$</text>@buyPriceValue 207 } 208 209 210 211 } 212 213 214 } 215 </nobr> 216 </td> 217 </tr> 218 219 for (int j=0; j<@list.Count;j++){ 220 string[] stringlist = list[j].Split('|'); 221 222 @*if(@stringlist[0]==@orderline.GetString("Ecom:Order:OrderLine.ID")){ 223 <text> 224 <tr class="miniCartProduct" style="font-weight:normal;"> 225 <td style="width:20%" class="miniCartProductThumb"><strong>(Discount) </strong></td> 226 <td style="width:45%;"> 227 <div class="miniCartDescription"> 228 Discount 229 </div> 230 </td> 231 <td style="width:10%" class="miniCartQuantity" style="padding-right:10px;"></td> 232 <td style="width:20%;padding-right:15px;"> 233 <nobr> 234 235 @stringlist[1] 236 237 </nobr> 238 </td> 239 </tr> 240 </text> 241 }*@ 242 } 243 } 244 245 else if(orderline.GetInteger("Ecom:Order:OrderLine.Type") == 1){ 246 <tr class="miniCartProduct" style="font-weight:normal;"> 247 <td style="width:20%" class="miniCartProductThumb"><strong>(Discount) </strong></td> 248 <td style="width:45%;"> 249 <div class="miniCartDescription"> 250 @orderline.GetValue("Ecom:Order:OrderLine.ProductName") 251 </div> 252 </td> 253 <td style="width:10%" class="miniCartQuantity" style="text-align:right!important;padding-right:10px;"></td> 254 <td style="width:20%;text-align:right!important;padding-right:15px;"> 255 <nobr> 256 @if(orderline.GetInteger("Ecom:Order:OrderLine.Points")>0){ 257 @orderline.GetDouble("Ecom:Order:OrderLine.Points"); 258 <text> </text>@Translate("orderline_points","points") 259 } 260 else{ 261 @orderline.GetValue("Ecom:Order:OrderLine.UnitPrice") 262 } 263 </nobr> 264 </td> 265 </tr> 266 267 } 268 269 } 270 <tr> 271 <td class="text-center"><i class="fa fa-credit-card"></i></td> 272 <td>@GetValue("Ecom:Order.PaymentMethod")</td> 273 <td class="text-center"></td> 274 <td>@GetValue("Ecom:Order.PaymentFee")</td> 275 </tr> 276 <tr> 277 <td class="text-center"><i class="fa fa-truck"></i></td> 278 <td>@GetValue("Ecom:Order.ShippingMethod")</td> 279 <td class="text-center"></td> 280 <td>@GetValue("Ecom:Order.ShippingFee")</td> 281 </tr> 282 283 </tbody> 284 </table> 285 </div> 286 </div> 287 288 <div class="col-md-12 col-sm-12 col-xs-12"> 289 <div class="row"> 290 <div class=""> 291 <!-- 292 @{ 293 var edittextstring = Translate("Edit cart", "Edit cart"); 294 var cartid = GetValue("DwAreaCartPageID"); 295 } 296 297 <form action="/Default.aspx?ID=@cartid" method="post"> 298 <input type="submit" name="CartV2.GotoStep1" id="CartV2.GotoStep1" value="@edittextstring" class="btn btn-xs btn-base pull-left" /> 299 </form> 300 --> 301 </div> 302 303 <div class="col-md-12 col-xs-12"> 304 <a href="Default.aspx?ID=@cartid" class="btn btn-xs btn-base pull-right">@Translate("Proceed to checkout", "Proceed to checkout")</a> 305 <a onclick="clearcart();" href="Default.aspx?ID=9086&cartcmd=emptycart" class="btn btn-xs btn-base pull-right">@Translate("Cancel Order", "Cancel Order")</a> 306 </div> 307 308 </div> 309 <div class="row">&nbsp;</div> 310 </div> 311 } 312 else 313 { 314 <span class="cart-items">@Translate("Your shopping cart is empty.", "Your shopping cart is empty.")</span> 315 } 316 </div> 317 318 319 } 320 321 322 <!DOCTYPE html> 323 <html> 324 <head> 325 <!--Start of Zendesk Chat Script--> 326 <script type="text/javascript"> 327 window.$zopim || (function (d, s) { 328 var z = $zopim = function (c) { z._.push(c) }, $ = z.s = 329 d.createElement(s), e = d.getElementsByTagName(s)[0]; z.set = function (o) { 330 z.set. 331 _.push(o) 332 }; z._ = []; z.set._ = []; $.async = !0; $.setAttribute("charset", "utf-8"); 333 $.src = "https://v2.zopim.com/?5bSoZOp91PEa5nUuljyAJOQilZFzC08m"; z.t = +new Date; $. 334 type = "text/javascript"; e.parentNode.insertBefore($, e) 335 })(document, "script"); 336 </script> 337 <!--End of Zendesk Chat Script--> 338 <script> 339 var userInterest = ""; 340 </script> 341 <meta charset="utf-8"> 342 <title>@GetValue("Title")</title> 343 @GetValue("MetaTags") 344 @GetValue("CopyRightNotice") 345 346 347 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> 348 <meta name="robots" content="index, follow"> 349 350 @{ 351 string MetaDescription = GetString("Meta.Description"); 352 string MetaKeywords = GetString("Meta.Keywords"); 353 string googleTrackingId = GetString("Item.Area.GA_Tracking_ID"); 354 string searchpageID = GetString("Item.Area.Search_Page"); 355 searchpageID = (searchpageID.Split('='))[1]; 356 var users = User.GetCurrentUser() == null ? null : Pageview.User.CurrentSecondaryUser == null ? User.GetCurrentUser().GetUsersICanSetAsSecondary() : Pageview.User.CurrentSecondaryUser.GetUsersICanSetAsSecondary(); 357 } 358 359 360 361 362 363 <!-- Facebook Admin --> 364 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.FacebookCommendAdmin"))) 365 { 366 string fbadmin = GetString("Item.Area.FacebookCommendAdmin"); 367 <meta property="fb:admins" content="@fbadmin"> 368 } 369 370 <!-- Essential styles --> 371 <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" type="text/css"> 372 <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" type="text/css"> 373 <link rel="stylesheet" href="/Files/Templates/Designs/australis/css/jquery.fancybox.min.css" media="screen"> 374 <link href='https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300' rel='stylesheet' type='text/css'> 375 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/australis/assets/css/slick/slick.css"> 376 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/australis/assets/css/slick/slick-theme.css"> 377 378 <!-- Mobile menu styles --> 379 <link href="/Files/Templates/Designs/australis/css/jasny-bootstrap.min.css" rel="stylesheet" type="text/css" media="screen"> 380 381 <!-- Favicon --> 382 @{ 383 var favicon = @GetString("Item.Area.Favicon"); 384 } 385 <link href="@favicon" rel="icon" type="image/png"> 386 387 <!-- Variables --> 388 @{ 389 var attrValue = ""; 390 string currentpageid = GetString("DwPageID"); 391 string firstpageid = GetString("DwAreaFirstActivePageID"); 392 string searchplaceholder = Translate("Search products", "Search products"); 393 394 var cartid = GetValue("DwAreaCartPageID"); 395 396 DateTime areaUpdated = (DateTime)Pageview.Area.get_Value("AreaUpdatedDate"); 397 string cssPath = HttpContext.Current.Server.MapPath("/Files/Templates/Designs/australis/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.min.css"); 398 DateTime lastWriteTime = System.IO.File.GetLastWriteTime(cssPath); 399 bool writeCss = false; 400 string css = String.Empty; 401 if (areaUpdated > lastWriteTime) 402 { 403 writeCss = true; 404 } 405 } 406 407 <!--FONT SETTINGS--> 408 @functions{ 409 public class FontSettings 410 { 411 public class Logo 412 { 413 public static string FontFamily { get; set; } 414 public static string FontSize { get; set; } 415 public static string FontWeight { get; set; } 416 public static string Color { get; set; } 417 public static string LineHeight { get; set; } 418 public static string Casing { get; set; } 419 public static string LetterSpacing { get; set; } 420 } 421 422 public class H1 423 { 424 public static string FontFamily { get; set; } 425 public static string FontSize { get; set; } 426 public static string FontWeight { get; set; } 427 public static string Color { get; set; } 428 public static string LineHeight { get; set; } 429 public static string Casing { get; set; } 430 public static string LetterSpacing { get; set; } 431 } 432 433 public class H2 434 { 435 public static string FontFamily { get; set; } 436 public static string FontSize { get; set; } 437 public static string FontWeight { get; set; } 438 public static string Color { get; set; } 439 public static string LineHeight { get; set; } 440 public static string Casing { get; set; } 441 public static string LetterSpacing { get; set; } 442 } 443 444 public class Body 445 { 446 public static string FontFamily { get; set; } 447 public static string FontSize { get; set; } 448 public static string FontWeight { get; set; } 449 public static string Color { get; set; } 450 public static string LineHeight { get; set; } 451 public static string Casing { get; set; } 452 public static string LetterSpacing { get; set; } 453 } 454 } 455 456 private void InitFontSettings() 457 { 458 //LOGO 459 FontSettings.Logo.FontFamily = CustomFont(GetString("Item.Area.LogoFont.Font"), GetString("Item.Area.LogoFont.CustomFont")); 460 FontSettings.Logo.FontSize = GetString("Item.Area.LogoFont.Size")+"px"; 461 FontSettings.Logo.FontWeight = CheckExistence(GetString("Item.Area.LogoFont.Weight"), "normal"); 462 FontSettings.Logo.LineHeight = CheckExistence(GetString("Item.Area.LogoFont.LineHeight"), "1"); 463 FontSettings.Logo.LetterSpacing = GetString("Item.Area.LogoFont.LetterSpacing") + "px"; 464 FontSettings.Logo.Casing = GetString("Item.Area.LogoFont.Casing"); 465 FontSettings.Logo.Color = GetString("Item.Area.LogoFont.Color.Color"); 466 467 468 //HEADINGS 469 FontSettings.H1.FontFamily = CustomFont(GetString("Item.Area.HeadingsH1.Font"), GetString("Item.Area.HeadingsH1.CustomFont")); 470 FontSettings.H1.FontSize = GetString("Item.Area.HeadingsH1.Size")+"px"; 471 FontSettings.H1.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH1.Weight"), "normal"); 472 FontSettings.H1.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH1.LineHeight"), "1"); 473 FontSettings.H1.LetterSpacing = GetString("Item.Area.HeadingsH1.LetterSpacing") + "px"; 474 FontSettings.H1.Casing = GetString("Item.Area.HeadingsH1.Casing"); 475 FontSettings.H1.Color = GetString("Item.Area.HeadingsH1.Color.Color"); 476 477 FontSettings.H2.FontFamily = CustomFont(GetString("Item.Area.HeadingsH2.Font"), GetString("Item.Area.HeadingsH2.CustomFont")); 478 FontSettings.H2.FontSize = GetString("Item.Area.HeadingsH2.Size")+"px"; 479 FontSettings.H2.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH2.Weight"), "normal"); 480 FontSettings.H2.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH2.LineHeight"), "1"); 481 FontSettings.H2.LetterSpacing = GetString("Item.Area.HeadingsH2.LetterSpacing") + "px"; 482 FontSettings.H2.Casing = GetString("Item.Area.HeadingsH2.Casing"); 483 FontSettings.H2.Color = GetString("Item.Area.HeadingsH2.Color.Color"); 484 485 486 //BODY 487 FontSettings.Body.FontFamily = CustomFont(GetString("Item.Area.BodyFont.Font"), GetString("Item.Area.BodyFont.CustomFont")); 488 FontSettings.Body.FontSize = GetString("Item.Area.BodyFont.Size") + "px"; 489 FontSettings.Body.FontWeight = CheckExistence(GetString("Item.Area.BodyFont.Weight"), "normal"); 490 FontSettings.Body.LineHeight = CheckExistence(GetString("Item.Area.BodyFont.LineHeight"), "1"); 491 FontSettings.Body.LetterSpacing = GetString("Item.Area.BodyFont.LetterSpacing") + "px"; 492 FontSettings.Body.Casing = GetString("Item.Area.BodyFont.Casing"); 493 FontSettings.Body.Color = GetString("Item.Area.BodyFont.Color.Color"); 494 495 496 gfonts.Add(FontSettings.Logo.FontFamily, ""); 497 if (!gfonts.ContainsKey(FontSettings.H1.FontFamily)) 498 { 499 gfonts.Add(FontSettings.H1.FontFamily, ""); 500 } 501 if (!gfonts.ContainsKey(FontSettings.H2.FontFamily)) 502 { 503 gfonts.Add(FontSettings.H2.FontFamily, ""); 504 } 505 if (!gfonts.ContainsKey(FontSettings.Body.FontFamily)) 506 { 507 gfonts.Add(FontSettings.Body.FontFamily, ""); 508 } 509 510 } 511 512 private string CustomFont (string firstfont, string secondfont) 513 { 514 if (firstfont == "custom") 515 { 516 return secondfont; 517 } 518 else 519 { 520 return firstfont; 521 } 522 } 523 524 private string CheckExistence (string stringitem, string defaultvalue) 525 { 526 if (!string.IsNullOrWhiteSpace(stringitem)) { 527 return stringitem; 528 } else { 529 return defaultvalue; 530 } 531 } 532 533 private System.Collections.Generic.Dictionary<string, object> gfonts = new System.Collections.Generic.Dictionary<string, object>(); 534 } 535 536 @{ 537 InitFontSettings(); 538 } 539 540 @helper GoogleFonts() 541 { 542 if (gfonts != null) 543 { 544 foreach (var item in gfonts) 545 { 546 <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=@item.Key:100,200,300,400,500,600,700,800,900"> 547 } 548 } 549 } 550 551 @functions{ 552 public string FontStylesCSS() 553 { 554 string CssString = @" 555 .dw-logotext { 556 font-family: " + FontSettings.Logo.FontFamily + @"; 557 font-size: " + FontSettings.Logo.FontSize + @"; 558 font-weight: " + FontSettings.Logo.FontWeight + @"; 559 line-height: " + FontSettings.Logo.LineHeight + @" !important; 560 letter-spacing: " + FontSettings.Logo.LetterSpacing + @"; 561 text-transform: " + FontSettings.Logo.Casing + @"; 562 color: " + FontSettings.Logo.Color + @"; 563 } 564 565 h1 { 566 font-family: " + FontSettings.H1.FontFamily + @" !important; 567 font-size: " + FontSettings.H1.FontSize + @"; 568 color: " + FontSettings.H1.Color + @"; 569 line-height: " + FontSettings.H1.LineHeight + @" !important; 570 text-transform: " + FontSettings.H1.Casing + @"; 571 font-weight: " + FontSettings.H1.FontWeight + @"; 572 letter-spacing: " + FontSettings.H1.LetterSpacing + @" !important; 573 } 574 575 576 h2, h3, h4, h5, h6 { 577 margin-top: 0.7em; 578 margin-bottom: 0.7em; 579 580 font-family: " + FontSettings.H2.FontFamily + @" !important; 581 font-size: " + FontSettings.H2.FontSize + @"; 582 color: " + FontSettings.H2.Color + @"; 583 line-height: " + FontSettings.H2.LineHeight + @"; 584 text-transform: " + FontSettings.H2.Casing + @" !important; 585 font-weight: " + FontSettings.H2.FontWeight + @" !important; 586 letter-spacing: " + FontSettings.H2.LetterSpacing + @" !important; 587 } 588 589 h4, h5, h6 { 590 font-size: 16px !important; 591 } 592 593 body { 594 font-family: " + FontSettings.Body.FontFamily + @" !important; 595 font-size: " + FontSettings.Body.FontSize + @"; 596 color: " + FontSettings.Body.Color + @"; 597 line-height: " + FontSettings.Body.LineHeight + @" !important; 598 text-transform: " + FontSettings.Body.Casing + @"; 599 font-weight: " + FontSettings.Body.FontWeight + @"; 600 letter-spacing: " + FontSettings.Body.LetterSpacing + @" !important; 601 } 602 .navbar-wp .navbar-nav > li > a { 603 font-family: " + FontSettings.Body.FontFamily + @" !important; 604 } 605 606 .section-title { 607 margin-top: 0.7em; 608 margin-bottom: 0.7em; 609 } 610 "; 611 return CssString; 612 } 613 } 614 @GoogleFonts() 615 <!-- GENERAL/COLOR SETTINGS --> 616 @functions{ 617 public class ColorSettings 618 { 619 public class Color 620 { 621 public static string Primary { get; set; } 622 public static string Secondary { get; set; } 623 public static string NavbarFont { get; set; } 624 public static string Footer { get; set; } 625 public static string FooterFont { get; set; } 626 627 public static string Sticker { get; set; } 628 public static string Price { get; set; } 629 public static string Cart { get; set; } 630 } 631 } 632 633 private void InitColorSettings() 634 { 635 ColorSettings.Color.Primary = GetString("Item.Area.ColorsPrimary.Color"); 636 ColorSettings.Color.Secondary = GetString("Item.Area.ColorsSecondary.Color"); 637 638 ColorSettings.Color.NavbarFont = GetString("Item.Area.NavbarFontColor"); 639 640 if (string.IsNullOrWhiteSpace(ColorSettings.Color.NavbarFont)) 641 { 642 ColorSettings.Color.NavbarFont = WrapMethods.getContrastYIQ(ColorSettings.Color.Secondary); 643 } 644 645 ColorSettings.Color.Footer = GetString("Item.Area.ColorsFooterColor.Color"); 646 ColorSettings.Color.FooterFont = WrapMethods.getContrastYIQ(ColorSettings.Color.Footer); 647 648 ColorSettings.Color.Price = GetString("Item.Area.EcommercePriceColor.Color"); 649 ColorSettings.Color.Sticker = GetString("Item.Area.EcommerceDiscountStickerColor.Color"); 650 ColorSettings.Color.Cart = GetString("Item.Area.EcommerceCartButtonColor.Color"); 651 } 652 653 public string GetColorSettings() 654 { 655 string CssString = @" 656 /******************************************************************************/ 657 a:hover, a:focus, a:active { 658 color: @Primary; 659 } 660 .btn:hover, 661 .btn1:hover, 662 .btn3, 663 .btn2:hover, 664 .btn:focus, 665 input[type='submit']:hover, 666 .carousel-indicators .active, 667 .top-header a:focus, 668 .top-header a:hover, 669 .top-header a.active, 670 .pagination > li > a:hover, 671 .pagination > li > a:focus, 672 .pagination > li > a:active, 673 #product_part .grayback .addto .btn-dw-cart:hover, 674 #SecondMenu li:hover >a, 675 #topnavigation #products .M1, 676 #topnavigation #products .M2, 677 .wishlist_wrapper a.btn:hover, 678 .retaillocater input[type='submit']:hover, 679 .retaillocater input.btn3, 680 .about-tab>li>a:hover, 681 .about-tab > li.active > a, 682 .about-tab>li.active>a, 683 .about-tab>li.active>a:focus, 684 .about-tab>li.active>a:hover, 685 button.article-btn:hover, 686 #news-wrapper .modal-footer button:hover, 687 .mbprolist-btn button:hover, 688 .form-body button:hover, 689 #mboabouttabs .panel-heading:hover, 690 #mboproducttabs .panel-heading:hover, 691 #mboabouttabs .panel .active, 692 #mboproducttabs .panel .active, 693 #ordersubmit .input-group-btn:last-child>.btn:hover, 694 .profile_wrapper .maincontent-wrapper input[type='submit']:hover, 695 .m-addr a:hover, 696 .m-addr a:active, 697 .fullwidth_wrapper .nav > li > a:focus, 698 .nav > li > a:hover, 699 #loadmore:hover, 700 .impersonatebar .dropdown-menu, 701 .impersonatebar, 702 .ribbon.base1, 703 #product_part .nav-tabs > li.active > a, 704 #product_part .nav-tabs > li:hover a, 705 .search-form-wrapper input[type='submit']:hover, 706 .search-form-wrapper input[type='submit']:focus, 707 #scrollbuttontext:hover 708 { 709 background: @Primary!important; 710 } 711 hr.redcolors, 712 hr.redcolor, 713 .navigation > li > .meg, 714 .about-tab-content::-webkit-scrollbar-thumb, 715 #brands .ss:hover, 716 #brands .sss:hover, 717 #interests::-webkit-scrollbar-thumb, 718 #maindiv #collapseREFINEPRODUCTS::-webkit-scrollbar-thumb, 719 #maindiv #collapseREFINEBRAND::-webkit-scrollbar-thumb, 720 .link-tab a:hover 721 { 722 background: @Primary !important; 723 } 724 .carousel-indicators .active, 725 #ordersubmit .input-group-btn:last-child>.btn:hover 726 { 727 border-color: @Primary !important; 728 } 729 .scroll-top:hover p, 730 a.btn-more:hover, 731 .breadcrumb > li + li::before, 732 .icon , 733 .fa, 734 .about-arrow, 735 .directory-wrapper h1, 736 .directory-wrapper a, 737 #orderlist td a:hover .fa, 738 #sitemap a:hover, 739 .brand-arrow, 740 .news-white .news-loadmore a:hover, 741 #accordionThree .panel-heading .fa, 742 .profile_wrapper .profile_leftsidebar ul.dw-categories > li > a::after, 743 #productListBlock a:hover .fa, 744 #collapseREFINEPRODUCTS .fa, 745 .impersonatebar .open .dropdown-menu input[type='submit']:hover, 746 footer .col p a:hover, 747 .footermenu a:hover, 748 .footermenu a:focus, 749 .footermenu a:active, 750 .text_redcolor, 751 #orderlist thead td .cart a .fa, 752 #orderlist tbody td .cart a .fa, 753 .price, 754 .search-pagination p a:hover, 755 .search-pagination p a b, 756 #countryform input[placeholder] 757 { 758 color: @Primary !important; 759 } 760 761 .dw-section-title span, 762 hr.redcolors, 763 hr.redcolor 764 { 765 border-bottom: 3px solid @Primary !important; 766 } 767 /****************************************************************************/ 768 .btn-dw-primary, 769 .btn-dw-secondary, 770 .btn-dw-cart, 771 .btn-base, 772 button, 773 html input[type='button'], 774 input[type='reset'], 775 input[type='submit'], 776 .btn1, 777 .btn1:hover, 778 .btn1:visited, 779 .btn1:hover .more, 780 .btn2:hover, 781 .top-header .top-header-menu > ul.top-menu > li > a, 782 .top-header .logobox1 ul.top-menu li a, 783 .top-header .logobox1 ul.top-menu li a:hover .fa, 784 #topnavigation li.dw-navbar-button a:hover, 785 .navbar-wp .navbar-nav > .active > a, 786 #topnavigation #products .M1 li a, 787 .myNavmenu-wrapper input.search_box, 788 #myNavmenu .panel-title, 789 #searchForm1 .fa, 790 .top-header .top-header-menu > ul.top-menu > li.dw-navbar-button > a, 791 .modal-footer .btn-base:hover, 792 .modal-footer .btn-base:hover .fa, 793 .top-header a, 794 .top-header a:focus, 795 .top-header a:hover, 796 .top-header a.active, 797 .products-wrapper a, 798 .pagination > li > a:hover, 799 .pagination > li > a:focus, 800 .pagination > li > a:active, 801 .ribbon.base1, 802 #product_part li.active .icon, 803 #product_part .nav-tabs > li.active > a, 804 #product_part .nav-tabs > li:hover a, 805 #product_part .nav-tabs > li:hover .icon, 806 #product_part .nav-tabs > li.active .icon, 807 #minipagecart .fa, 808 .supportlink:hover p, 809 .product-tab li a:hover {} .nav-tabs > li.active > a, 810 .nav-tabs > li.active > a:focus, 811 .nav-tabs > li.active > a:hover, 812 .nav-tabs > li.active > a .brand-arrow, 813 .nav-tabs > li.active > a:focus .brand-arrow, 814 .nav-tabs > li.active > a:hover .brand-arrow, 815 .wishlist_wrapper a.btn, 816 .wishlist_wrapper a.btn:hover, 817 .description, 818 .description_content, 819 .description h2, 820 .description_content p span, 821 .description_content span, 822 .description_content h3, 823 .btn-more, 824 .btn-more1, 825 .btn-more1:hover, 826 .btn-more1:hover span.icon, 827 #SecondMenu li:hover .dropdown-menu a, 828 #SecondMenu li:hover >a, 829 .facebooklike h4, 830 #myCarousel .carousel-caption h2, 831 #myCarousel .carousel-caption span, 832 .about-tab > li.active > a .about-arrow, 833 .about-tab > li.active > a:focus .about-arrow, 834 .about-tab > li.active > a:hover .about-arrow, 835 .about-tab > li > a:hover .about-arrow, 836 .about-tab>li>a:hover, 837 .about-tab > li.active > a, 838 .about-tab>li.active>a, 839 .about-tab>li.active>a:focus, 840 .about-tab>li.active>a:hover, 841 .insidediv .counterspan, 842 .insidedivselected .counterspan, 843 #scrollbuttontext, 844 .brand-btn a, 845 .fullwidth_wrapper .nav > li > a:focus, 846 .nav > li > a:hover, 847 .nav-tabs > li:hover > a .brand-arrow, 848 .news-white .news-loadmore, 849 .news-white .news-loadmore a, 850 #news-wrapper .nav-tabs>li>a:hover, 851 #news-wrapper .nav-tabs>li>a:hover .arrow, 852 #news-wrapper .nav-tabs>li.active >a, 853 #news-wrapper .nav-tabs>li.active >a .arrow, 854 #loadmore:hover .fa, 855 .profile_wrapper .dw-section-title span, 856 .profile_wrapper .profile_leftsidebar ul.dw-categories a, 857 .profile_wrapper .mbprofile_leftsidebar ul.dw-categories a, 858 .m-addr a, 859 .m-addr a:hover, 860 .m-addr a:active, 861 .edit_profile_wrapper input#submitter:hover, 862 .impersonatebar .open .dropdown-menu li label, 863 .impersonatebar, 864 .impersonatebar a, 865 .impersonatebar a .fa, 866 .impersonatebar a:hover, 867 .impersonatebar a:active, 868 .dropdown-cart .btn-base, 869 .dropdown-cart .btn-base:hover, 870 #ordersubmit .fa, 871 #ordersubmit .input-group-btn:last-child>.btn, 872 #ordersubmit .input-group-btn:last-child>.btn:hover, 873 .dw-header-sm button:visited .fa, 874 .dw-header-sm .btn-base:hover .fa, 875 #myNavmenu .input-group-btn .fa, 876 #mboabouttabs .panel-heading:hover .about-arrow, 877 #mboabouttabs .panel .active .about-arrow, 878 #mboproducttabs .panel-heading:hover .icon, 879 #mboproducttabs .panel .active .icon, 880 #mboabouttabs .panel-heading:hover a, 881 #mboabouttabs .panel .active a, 882 #mboproducttabs .panel-heading:hover a, 883 #mboproducttabs .panel .active a, 884 .mbprolist-btn button:hover .icon, 885 .prolist-content #loadmore a, 886 .dw-header-sm .btn-base:hover, 887 #news-wrapper .modal-body .nav li a:hover span, 888 button.article-btn:hover, 889 #news-wrapper .modal-footer button:hover, 890 button.article-btn:hover span, 891 .visit-tab li a 892 { 893 color: @Secondary !important; 894 } 895 .order_wrapper #orderlist tbody tr, 896 .m-addr-table tbody tr, 897 #dw-form-3 span, 898 #dw-form-3 #interests, 899 .news-white, 900 .scroll-top p, 901 .prolist-sidebar, 902 .productlist-wrapper .btn-group button, 903 #product_part .white, 904 #product_part .product-tab, 905 #product_part .white .tab-content, 906 .wishlist-form tbody tr, 907 .description_content .more 908 { 909 background: @Secondary !important; 910 } 911 912 .wishlist-form input[type='text'], 913 .wishlist-form textarea, 914 .wishlist-form select, 915 #ordersubmit .form-control 916 { 917 background-color: @Secondary; 918 } 919 /*******************************************************************************************/ 920 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { 921 color: @NavbarFont; 922 } 923 924 .navbar-wp .navbar-nav > .active > a, .navbar-wp .navbar-nav > .active > a:hover, .navbar-wp .navbar-nav > .active > a:focus { 925 color: @NavbarFont; 926 } 927 928 .navbar-wp .navbar-nav > li > a:hover, .navbar-wp .navbar-nav > li > a:focus { 929 border-top: 0px solid @Secondary; 930 color: @NavbarFont; 931 } 932 933 .navbar-wp .navbar-nav > li > a span:after { 934 background-color: @Primary; 935 } 936 937 .btn-dw-primary { 938 color: #FFF; 939 background-color: @Primary; 940 border-color: @Primary; 941 } 942 943 .btn-dw-secondary { 944 color: @NavbarFont; 945 background-color: @Secondary; 946 border-color: @Secondary; 947 } 948 949 .btn-dw-cart { 950 color: #FFF; 951 background-color: @Cart; 952 border-color: @Cart; 953 } 954 955 .dw-section-title { 956 border-color: @Secondary; 957 } 958 959 .dw-minicart-update { 960 color: #FFF !important; 961 background-color: @Primary; 962 transition: all 0.3s ease-in-out 0s; 963 } 964 965 .pagination > li > a, .pagination > li > a:hover, .pagination > li > a:focus, .pagination > li > a:active { 966 color: @Primary; 967 } 968 969 .form-control:hover, .form-control:focus, .form-control:active { 970 border-color: @Primary !important; 971 } 972 973 .bg-2 { 974 background: @Primary !important; 975 } 976 977 .blockquote-1:hover { 978 border-color: @Primary !important; 979 } 980 981 .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 { 982 color: @Primary; 983 } 984 985 .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 { 986 color: @Primary; 987 } 988 989 .navbar-wp .navbar-nav > li > a:hover, .navbar-wp .navbar-nav > li > a:focus { 990 border: 0px solid @Primary; 991 } 992 993 .navbar-wp .navbar-toggle:hover, .navbar-wp .navbar-toggle:focus { 994 background-color: @Primary !important; 995 border-color: @Primary !important; 996 } 997 998 .navbar-wp .dropdown-menu { 999 border-top: 1px solid @Primary !important; 1000 border-bottom: 3px solid @Primary !important; 1001 } 1002 1003 .navbar-wp .dropdown-menu > li > a:hover { 1004 background: @Primary !important; 1005 color: #fff; 1006 } 1007 1008 .navbar-wp .dropdown-menu .active { 1009 background: @Primary !important; 1010 color: #fff; 1011 } 1012 1013 .navbar-wp.navbar-contrasted .dropdown-menu > li > a:hover { 1014 background: @Primary !important; 1015 } 1016 1017 .nav > ul > li > a:hover { 1018 color: @Primary; 1019 } 1020 1021 .lw .w-box.w-box-inverse .thmb-img i { 1022 color: @Primary !important; 1023 } 1024 1025 .w-box.w-box-inverse .thmb-img:hover i { 1026 background: @Primary !important; 1027 } 1028 1029 .c-box { 1030 border: 1px solid @Primary !important; 1031 } 1032 1033 .c-box .c-box-header { 1034 background: @Primary !important; 1035 } 1036 1037 .w-section .aside-feature:hover .icon-feature, .w-section .aside-feature:hover h4 { 1038 color: @Primary !important; 1039 } 1040 1041 .layer-slider-wrapper .title.title-base { 1042 background: @Primary !important; 1043 } 1044 1045 .layer-slider-wrapper .subtitle { 1046 color: @Primary !important; 1047 } 1048 1049 .layer-slider-wrapper .list-item { 1050 color: @Primary !important; 1051 } 1052 1053 .box-element.box-element-bordered { 1054 border: 1px solid @Primary !important; 1055 } 1056 1057 .carousel-2 .carousel-indicators .active { 1058 background-color: @Primary !important; 1059 } 1060 1061 .carousel-2 .carousel-nav a { 1062 color: @Primary !important; 1063 } 1064 1065 .carousel-2 .carousel-nav a:hover { 1066 background: @Primary !important; 1067 } 1068 1069 .carousel-3 .carousel-nav a { 1070 color: @Primary !important; 1071 } 1072 1073 .carousel-3 .carousel-nav a:hover { 1074 background: @Primary !important; 1075 } 1076 1077 .like-button .button.liked i { 1078 color: @Primary !important; 1079 } 1080 1081 ul.list-listings li.featured { 1082 border-color: @Primary !important; 1083 } 1084 1085 ul.list-check li i { 1086 color: @Primary !important; 1087 } 1088 1089 ul.dw-categories li a:hover, ul.dw-categories a:focus, ul.dw-categories a:active{ 1090 color: @NavbarFont; 1091 background-color: @Primary; 1092 border-color: @Primary; 1093 } 1094 1095 ul.categories li a:hover, ul.categories a:focus, ul.categories a:active{ 1096 color: @NavbarFont; 1097 background-color: @Primary; 1098 border-color: @Primary; 1099 } 1100 1101 .timeline .event:nth-child(2n):before { 1102 background-color: @Primary !important; 1103 } 1104 1105 .timeline .event:nth-child(2n-1):before { 1106 background-color: @Primary !important; 1107 } 1108 1109 #toTopHover { 1110 background-color: @Primary !important; 1111 } 1112 1113 .tags-list li { 1114 border: 1px solid @Primary !important; 1115 color: @Primary !important; 1116 } 1117 1118 .tags-list li:hover, 1119 a.open-panel { 1120 background-color: @Primary !important;} 1121 1122 1123 .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus, 1124 .panel-group .panel-heading a i, 1125 .tags-list li a { 1126 color: @NavbarFont !important; 1127 } 1128 1129 .nav-pills > li > a:hover, .nav-pills > li > a:focus { 1130 color: @NavbarFont !important; 1131 background: none repeat scroll 0% 0% @Secondary !important; 1132 } 1133 1134 footer { 1135 background: @Footer !important; 1136 } 1137 1138 footer h4 { 1139 color: @FooterFont !important; 1140 } 1141 1142 footer a { 1143 color: @FooterFont !important; 1144 } 1145 1146 footer a:hover, footer a:focus, footer a:active { 1147 color: @Secondary !important; 1148 } 1149 1150 footer p { 1151 color: @FooterFont !important; 1152 } 1153 1154 footer ul > li { 1155 color: @FooterFont !important; 1156 } 1157 1158 1159 /* Button colors */ 1160 .btn-base { 1161 color: @NavbarFont !important; 1162 background-color: @Secondary !important; 1163 border: 1px solid @Secondary !important; 1164 } 1165 1166 .btn-base:before { 1167 background-color: @Secondary !important; 1168 } 1169 1170 .btn-base:hover:before, .btn-base:focus:before, .btn-base:active:before { 1171 color: @NavbarFont !important; 1172 background-color: @Primary !important; 1173 border-color: @Primary !important; 1174 } 1175 1176 .btn-icon:before { 1177 transition: none !important; 1178 } 1179 1180 .btn-base:hover, .btn-base:focus, .btn-base:active, .btn-base.active, .open .dropdown-toggle.btn-base { 1181 color: @NavbarFont !important; 1182 background-color: @Primary !important; 1183 border-color: @Primary !important; 1184 } 1185 1186 .btn-two { 1187 color: @NavbarFont !important; 1188 border-color: @Secondary !important; 1189 background-color: @Secondary !important; 1190 border: 1px solid @Secondary !important; 1191 } 1192 1193 .btn-two:hover, .btn-two:focus, .btn-two:active, .btn-two.active, .open .dropdown-toggle.btn-two { 1194 color: @NavbarFont !important; 1195 background-color: @Primary !important; 1196 border-color: @Primary !important; 1197 } 1198 1199 .btn-primary { 1200 background-color: @Primary !important; 1201 border-color: @Primary !important; 1202 } 1203 1204 .open .dropdown-toggle.btn-primary { 1205 background-color: @Primary !important; 1206 border-color: @Primary !important; 1207 } 1208 1209 .btn-one:hover, .btn-one:focus, .btn-one:active, .btn-one.active, .open .dropdown-toggle.btn-one { 1210 color: @Primary !important; 1211 } 1212 1213 .btn-four { 1214 border: 2px solid @Primary!important; 1215 color: @Primary !important; 1216 } 1217 1218 .btn-four:hover, .btn-four:focus, .btn-four:active, .btn-four.active, .open .dropdown-toggle.btn-four { 1219 background-color: #fff !important; 1220 } 1221 1222 1223 /* Dropdown-menu */ 1224 .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { 1225 background: @Primary !important; 1226 color: #fff !important; 1227 } 1228 1229 /* Ecom settings */ 1230 .ribbon.base { 1231 background: @Sticker !important; 1232 color: #fff; 1233 border-right: 5px solid @Sticker !important; 1234 } 1235 1236 .ribbon.base:before { 1237 border-top: 27px solid @Sticker !important; 1238 } 1239 1240 .ribbon.base:after { 1241 border-bottom: 27px solid @Sticker !important; 1242 } 1243 1244 .price { 1245 color: @Price !important; 1246 } 1247 1248 .discount-sticker { 1249 background-color: @Sticker !important; 1250 } 1251 1252 .bs-callout-primary { 1253 border-left-color: @Primary !important; 1254 } 1255 "; 1256 1257 return ParseCSSToString(CssString); 1258 } 1259 1260 private string ParseCSSToString(string TheString) 1261 { 1262 TheString = TheString.Replace("@Primary", ColorSettings.Color.Primary); 1263 TheString = TheString.Replace("@Secondary", ColorSettings.Color.Secondary); 1264 TheString = TheString.Replace("@NavbarFont", ColorSettings.Color.NavbarFont); 1265 TheString = TheString.Replace("@FooterFont", ColorSettings.Color.FooterFont); 1266 TheString = TheString.Replace("@Footer", ColorSettings.Color.Footer); 1267 1268 TheString = TheString.Replace("@Sticker", ColorSettings.Color.Sticker); 1269 TheString = TheString.Replace("@Price", ColorSettings.Color.Price); 1270 TheString = TheString.Replace("@Cart", ColorSettings.Color.Cart); 1271 1272 1273 System.Text.StringBuilder sb = new System.Text.StringBuilder(); 1274 1275 foreach(var item in TheString.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries)) 1276 { 1277 sb.AppendLine(item); 1278 } 1279 1280 return sb.ToString(); 1281 } 1282 } 1283 1284 @{ 1285 InitColorSettings(); 1286 } 1287 1288 1289 1290 @using System.Drawing 1291 @using System.Net 1292 1293 1294 @functions{ 1295 public class GeneralSettings 1296 { 1297 1298 public class Header 1299 { 1300 public static string Mode { get; set; } 1301 public static string Classes { get; set; } 1302 public static bool Show { get; set; } 1303 public static string Background { get; set; } 1304 } 1305 1306 public class Logo 1307 { 1308 public static string Image { get; set; } 1309 public static string Text { get; set; } 1310 public static string SecondaryColor { get; set; } 1311 } 1312 1313 public class Navigation 1314 { 1315 public static string Position { get; set; } 1316 public static string InvertedPosition { get; set; } 1317 public static string StickyMenu { get; set; } 1318 public static string SelectionMode { get; set; } 1319 public static string SelectionStyle { get; set; } 1320 public static int SelectionWeight { get; set; } 1321 public static bool Case { get; set; } 1322 1323 public static string BreadcrumbMode { get; set; } 1324 public static string BreadcrumbAlign { get; set; } 1325 1326 public static string LeftmenuMode { get; set; } 1327 1328 public static string ButtonDesign { get; set; } 1329 } 1330 1331 public class Headings 1332 { 1333 public static string Mode { get; set; } 1334 } 1335 1336 public class Background 1337 { 1338 public static string Color { get; set; } 1339 public static string Image { get; set; } 1340 public static string CustomImage { get; set; } 1341 public static bool GradientColor { get; set; } 1342 public static string GradientPercentage { get; set; } 1343 public static string Style { get; set; } 1344 public static string Position { get; set; } 1345 } 1346 1347 public class Site 1348 { 1349 public static bool Shadow { get; set; } 1350 public static string LayoutMode { get; set; } 1351 } 1352 1353 public class Images 1354 { 1355 public static bool RoundCorners { get; set; } 1356 } 1357 } 1358 1359 private void InitGeneralSettings() 1360 { 1361 //Header settings 1362 GeneralSettings.Header.Mode = GetString("Item.Area.HeaderLayoutMode"); 1363 GeneralSettings.Header.Show = GetBoolean("Item.Area.HeaderShow"); 1364 GeneralSettings.Header.Background = GetString("Item.Area.NavigationNavbarBackground"); 1365 1366 if (GeneralSettings.Header.Mode == "solid"){ 1367 GeneralSettings.Header.Classes = ""; 1368 } 1369 1370 if (GeneralSettings.Header.Mode == "cover" || GeneralSettings.Header.Mode == "mobile"){ 1371 GeneralSettings.Header.Classes = "header-alpha header-cover"; 1372 } 1373 1374 1375 //Logo settings 1376 GeneralSettings.Logo.Image = GetString("Item.Area.GeneralLogo"); 1377 GeneralSettings.Logo.Text = GetString("Item.Area.GeneralLogoText"); 1378 GeneralSettings.Logo.SecondaryColor = GetString("Item.Area.LogoSecondColor.Color"); 1379 1380 1381 //Navigation settings 1382 GeneralSettings.Navigation.Position = GetString("Item.Area.NavigationPosition"); 1383 GeneralSettings.Navigation.StickyMenu = "off"; 1384 1385 if (GetBoolean("Item.Area.NavigationSticky")) { 1386 if (GeneralSettings.Header.Show) 1387 { 1388 if (GeneralSettings.Header.Mode == "cover") 1389 { 1390 GeneralSettings.Navigation.StickyMenu = "44"; //"data-spy=\"affix\" data-offset-top=\"44\" data-offset-bottom=\"300\""; 1391 } 1392 else 1393 { 1394 int offset = ImageHeight()+28; 1395 1396 GeneralSettings.Navigation.StickyMenu = offset.ToString(); // "data-spy=\"affix\" data-offset-top=\"" + offset.ToString() + "\" data-offset-bottom=\"300\""; 1397 } 1398 } 1399 else 1400 { 1401 GeneralSettings.Navigation.StickyMenu = "5"; // "data-spy=\"affix\" data-offset-top=\"5\" data-offset-bottom=\"300\""; 1402 } 1403 } 1404 1405 if (GeneralSettings.Navigation.Position == "left") { 1406 GeneralSettings.Navigation.InvertedPosition = "right"; 1407 } 1408 else 1409 { 1410 GeneralSettings.Navigation.InvertedPosition = "left"; 1411 } 1412 1413 GeneralSettings.Navigation.SelectionMode = GetString("Item.Area.NavigationSelectionMode"); 1414 GeneralSettings.Navigation.SelectionStyle = ""; 1415 GeneralSettings.Navigation.SelectionWeight = GetInteger("Item.Area.SelectionWeight"); 1416 1417 if (GeneralSettings.Navigation.SelectionMode == "arrow") { 1418 GeneralSettings.Navigation.SelectionStyle = "navbar-arrow"; 1419 } 1420 1421 GeneralSettings.Navigation.Case = GetBoolean("Item.Area.NavigationUppercase"); 1422 1423 GeneralSettings.Navigation.BreadcrumbMode = GetString("Item.Area.NavigationBreadcrumbLayout"); 1424 GeneralSettings.Navigation.BreadcrumbAlign = GetString("Item.Area.NavigationBreadcrumbAlign"); 1425 1426 GeneralSettings.Navigation.LeftmenuMode = GetString("Item.Area.NavigationLeftNavigationMode"); 1427 1428 GeneralSettings.Navigation.ButtonDesign = GetString("Item.Area.NavigationButtonDesign"); 1429 1430 1431 //Background settings 1432 GeneralSettings.Background.Image = GetString("Item.Area.BackgroundImage.Image.Image"); 1433 GeneralSettings.Background.CustomImage = GetString("Item.Area.BackgroundImage.Image.CustomImage"); 1434 GeneralSettings.Background.Color = GetString("Item.Area.BackgroundImage.Color.Color"); 1435 GeneralSettings.Background.GradientColor = GetBoolean("Item.Area.BackroundGradientColor"); 1436 GeneralSettings.Background.GradientPercentage = GetString("Item.Area.GradientPercentage"); 1437 1438 1439 if (@GetString("Item.Area.BackgroundFixed") == "True") 1440 { 1441 GeneralSettings.Background.Position = "fixed"; 1442 } 1443 else 1444 { 1445 GeneralSettings.Background.Position = ""; 1446 } 1447 1448 1449 if (GeneralSettings.Background.Image == "none") 1450 { 1451 GeneralSettings.Background.Style = ""; 1452 } 1453 else if (GeneralSettings.Background.Image == "custom") 1454 { 1455 if (!string.IsNullOrWhiteSpace(GeneralSettings.Background.CustomImage)) 1456 { 1457 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; "; 1458 } 1459 } 1460 else 1461 { 1462 GeneralSettings.Background.Style = "background: url('/Admin/Public/GetImage.ashx?width=1920&amp;Crop=1&amp;Compression=75&amp;image=/Files/Templates/Designs/Breadtalk/images/background/" + GeneralSettings.Background.Image + "') " + GeneralSettings.Background.Position + " !important; "; 1463 } 1464 1465 1466 //Headings settings 1467 GeneralSettings.Headings.Mode = GetString("Item.Area.AdvHeadingsMode"); 1468 1469 1470 //Site settings 1471 GeneralSettings.Site.Shadow = GetBoolean("Item.Area.BackgroundSiteShadow"); 1472 GeneralSettings.Site.LayoutMode = GetString("Item.Area.LayoutMode"); 1473 1474 if (GeneralSettings.Site.LayoutMode == "boxed"){ 1475 GeneralSettings.Site.LayoutMode = "body-" + GeneralSettings.Site.LayoutMode; 1476 GeneralSettings.Header.Classes += " header-boxed"; 1477 } 1478 1479 1480 //Image settings 1481 GeneralSettings.Images.RoundCorners = GetBoolean("Item.Area.LayoutRoundCorners"); 1482 } 1483 1484 public string GetGeneralCSS() 1485 { 1486 string CssString = ""; 1487 int SelectionWeight = GeneralSettings.Navigation.SelectionWeight; 1488 1489 //Site settings 1490 if (GetString("Item.Area.LogoFont.Color.Color") == "#FFF" || GetString("Item.Area.LogoFont.Color.Color") == "#FFFFFF") 1491 { 1492 int offset = ImageHeight()+28; 1493 1494 CssString += @" 1495 .dw-offsetmenu-logo { 1496 color: #333 !important; 1497 }"; 1498 } 1499 1500 if (!string.IsNullOrWhiteSpace(GeneralSettings.Background.Color)) 1501 { 1502 CssString += @" 1503 body { 1504 background-color: " + GeneralSettings.Background.Color + @"; 1505 background-size: cover; 1506 overflow-y: scroll; 1507 }"; 1508 } 1509 1510 if (GeneralSettings.Background.GradientColor) 1511 { 1512 CssString += @" 1513 body { 1514 background: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1515 background: -o-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1516 background: -ms-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1517 background: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1518 background: linear-gradient(to top, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%); 1519 background-attachment: fixed; 1520 background-color: " + GeneralSettings.Background.Color + @" !important; 1521 }"; 1522 } 1523 1524 if (GeneralSettings.Site.Shadow) 1525 { 1526 CssString += @" 1527 .shad { 1528 -webkit-box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); 1529 -moz-box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); 1530 box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75); 1531 }"; 1532 } 1533 1534 //Image settings 1535 if (GeneralSettings.Images.RoundCorners) 1536 { 1537 CssString += @" 1538 .content-image { 1539 border-radius: 6px; 1540 -webkit-border-radius: 6px; 1541 -moz-border-radius: 6px; 1542 }"; 1543 } 1544 1545 //Navbar and header custom settings 1546 if (GeneralSettings.Header.Mode == "cover") 1547 { 1548 CssString += @" 1549 .navbar-wp { 1550 background-color: none !important; 1551 }"; 1552 1553 if (!GeneralSettings.Header.Show || GeneralSettings.Header.Mode == "mobile") 1554 { 1555 CssString += @" 1556 .header-cover .navbar-wp { 1557 top: 0px !important; 1558 }"; 1559 } 1560 } 1561 else 1562 { 1563 if (GeneralSettings.Header.Show) 1564 { 1565 CssString += @" 1566 .navbar-wp.affix .navbar-nav > li > a { 1567 padding: 16px 16px !important; 1568 }"; 1569 } 1570 } 1571 1572 if (GeneralSettings.Header.Background == "colorline") 1573 { 1574 CssString += @" 1575 .navbar-wp, .navbar-wp.affix { 1576 border-bottom: 4px solid " + ColorSettings.Color.Primary + @" !important; 1577 } 1578 1579 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { 1580 background-color: #FFF; 1581 color: #333; 1582 } 1583 1584 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { 1585 color: " + ColorSettings.Color.NavbarFont + @"; 1586 } 1587 1588 .navbar-wp.affix .navbar-header .dw-logotext, .dw-header-sm-title { 1589 color: " + ColorSettings.Color.NavbarFont + @" !important; 1590 }"; 1591 } else if (GeneralSettings.Header.Background == "neutral") 1592 { 1593 CssString += @" 1594 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { 1595 background-color: #f1f1f1; 1596 } 1597 1598 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { 1599 color: #333; 1600 } 1601 1602 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { 1603 color: " + ColorSettings.Color.NavbarFont + @"; 1604 } 1605 1606 .navbar-wp.affix .navbar-header .dw-logotext, .dw-header-sm-title { 1607 color: " + ColorSettings.Color.NavbarFont + @" !important; 1608 }"; 1609 } 1610 else if (GeneralSettings.Header.Background == "transparent") 1611 { 1612 CssString += @" 1613 .navbar-wp, .navbar-wp.affix { 1614 background-color: #FFF; 1615 opacity: 0.9; 1616 filter: alpha(opacity=90); /* For IE8 and earlier */ 1617 } 1618 1619 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a { 1620 color: #333; 1621 } 1622 1623 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus { 1624 color: " + ColorSettings.Color.NavbarFont + @"; 1625 } 1626 1627 .navbar-wp.affix .navbar-header .dw-logotext, .dw-header-sm-title { 1628 color: " + GeneralSettings.Logo.SecondaryColor + @" !important; 1629 }"; 1630 } 1631 else 1632 { 1633 CssString += @" 1634 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a { 1635 background-color: " + ColorSettings.Color.Secondary + @"; 1636 } 1637 1638 .dw-header-sm-title { 1639 color: " + ColorSettings.Color.NavbarFont + @" !important; 1640 }"; 1641 } 1642 1643 if (GeneralSettings.Navigation.SelectionMode == "background" || GeneralSettings.Navigation.SelectionMode == "arrow"){ 1644 CssString += NavbarPosition(false, SelectionWeight); 1645 1646 CssString += @" 1647 .dw-navbar-button > a { 1648 background-color: transparent !important; 1649 } 1650 1651 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1652 background-color: " + ColorSettings.Color.Primary + @" !important; 1653 }"; 1654 } 1655 1656 if (GeneralSettings.Navigation.SelectionMode == "underline"){ 1657 CssString += NavbarPosition(true); 1658 1659 CssString += ClearBackground(); 1660 1661 CssString += @" 1662 .dw-navbar-button > a span:after { 1663 position: absolute; 1664 content: ''; 1665 left: 0px; 1666 bottom: 0px; 1667 height: " + SelectionWeight + @"px; 1668 width: 100%; 1669 transform: scaleX(0); 1670 transition: all 0.3s ease-in-out 0s; 1671 } 1672 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1673 color: " + ColorSettings.Color.Primary + @" !important; 1674 } 1675 1676 .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 { 1677 color: " + ColorSettings.Color.Primary + @" !important; 1678 transform: scaleX(1); 1679 transition: all 0.3s ease-in-out 0s; 1680 }"; 1681 } 1682 1683 if (GeneralSettings.Navigation.SelectionMode == "boxed"){ 1684 CssString += NavbarPosition(true, SelectionWeight); 1685 1686 CssString += @" 1687 .dw-navbar-button > a { 1688 background-color: transparent !important; 1689 } 1690 1691 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1692 background-color: " + ColorSettings.Color.Primary + @" !important; 1693 transition: all 0.3s ease-in-out 0s; 1694 }"; 1695 } 1696 1697 if (GeneralSettings.Navigation.SelectionMode == "border"){ 1698 CssString += NavbarPosition(true, 6, SelectionWeight); 1699 1700 CssString += ClearBackground(); 1701 1702 CssString += @" 1703 .dw-navbar-button > a { 1704 border: " + SelectionWeight + @"px solid transparent !important; transition: None !important; 1705 } 1706 1707 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1708 border-width: " + SelectionWeight + @"px !important; 1709 border-color: " + ColorSettings.Color.Primary + @" !important; 1710 transition: all 0.3s ease-in-out 0s; 1711 }"; 1712 } 1713 1714 if (GeneralSettings.Navigation.SelectionMode == "font"){ 1715 CssString += NavbarPosition(); 1716 1717 CssString += ClearBackground(); 1718 1719 SelectionWeight = (SelectionWeight*100); 1720 1721 CssString += @" 1722 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 1723 color: " + ColorSettings.Color.Primary + @" !important; 1724 font-weight: " + SelectionWeight + @" !important; 1725 transition: all 0.3s ease-in-out 0s; 1726 }"; 1727 } 1728 1729 if (GeneralSettings.Navigation.Case){ 1730 CssString += @" 1731 .dw-navbar-button > a { 1732 text-transform: uppercase !important; 1733 }"; 1734 } 1735 else 1736 { 1737 CssString += @" 1738 .dw-navbar-button > a { 1739 text-transform: none !important; 1740 }"; 1741 } 1742 1743 1744 //Breadcrumb custom settings 1745 if (GeneralSettings.Navigation.BreadcrumbMode == "light") 1746 { 1747 CssString += @" 1748 .pg-opt { 1749 border-bottom: 0px; 1750 background: none repeat scroll 0% 0% #FFF; 1751 } 1752 1753 .dw-breadcrumb-title { 1754 font-size: 14px !important; 1755 padding: 5px 0px 5px 0px !important; 1756 } 1757 1758 .dw-breadcrumb { 1759 padding: 5px !important; 1760 }"; 1761 } 1762 1763 if (GeneralSettings.Navigation.BreadcrumbMode == "normal") 1764 { 1765 CssString += @" 1766 .dw-breadcrumb-title { 1767 font-size: 14px !important; 1768 padding: 5px 0px 5px 0px !important; 1769 } 1770 1771 .dw-breadcrumb a, .pg-opt .breadcrumb { 1772 padding: 5px !important; 1773 }"; 1774 } 1775 1776 if (GeneralSettings.Navigation.BreadcrumbMode == "large") 1777 { 1778 CssString += @" 1779 .dw-breadcrumb-title { 1780 font-size: 22px !important; 1781 padding: 15px 0px 15px 0px !important; 1782 } 1783 1784 .dw-breadcrumb { 1785 padding: 15px !important; 1786 }"; 1787 } 1788 1789 1790 if (GeneralSettings.Navigation.BreadcrumbAlign == "right") 1791 { 1792 CssString += @" 1793 .dw-breadcrumb { 1794 float: right !important; 1795 }"; 1796 } 1797 else 1798 { 1799 CssString += @" 1800 .dw-breadcrumb { 1801 float: left !important; 1802 }"; 1803 } 1804 1805 1806 //Left menu custom settings 1807 if (GeneralSettings.Navigation.LeftmenuMode == "light" || GeneralSettings.Navigation.LeftmenuMode == "light-color") 1808 { 1809 CssString += @" 1810 ul.dw-categories > li > ul > li > a { 1811 padding: 5px 35px; 1812 } 1813 1814 ul.dw-categories, ul.dw-categories > li, ul.dw-categories > li > ul > li { 1815 border: 0px solid #EEE; 1816 } 1817 1818 ul.dw-categories > li > ul { 1819 background: none repeat scroll 0% 0% #FFF; 1820 } 1821 1822 ul.dw-categories li a:hover, ul.dw-categories li a:focus, ul.dw-categories li a:active { 1823 background-color: #FFF !important; 1824 color: " + ColorSettings.Color.Primary + @" !important; 1825 } 1826 1827 .list-active, .list-active > a { 1828 background-color: #FFF; 1829 color: " + ColorSettings.Color.Primary + @" !important; 1830 } 1831 1832 .list-open-active { 1833 background-color: #FFF; 1834 color: " + ColorSettings.Color.Primary + @" !important; 1835 }"; 1836 } 1837 1838 if (GeneralSettings.Navigation.LeftmenuMode == "lines") 1839 { 1840 CssString += @" 1841 ul.dw-categories > li { 1842 border-bottom: 1px solid #EEE; 1843 } 1844 1845 ul.dw-categories { 1846 border: 0px solid #EEE; 1847 } 1848 1849 ul.dw-categories > li > ul { 1850 background: none repeat scroll 0% 0% #FFF; 1851 } 1852 1853 ul.dw-categories li a:hover, a:focus, a:active { 1854 background-color: #FFF !important; 1855 color: " + ColorSettings.Color.Primary + @" !important; 1856 } 1857 1858 .list-active, .list-active > a { 1859 background-color: #FFF; 1860 color: " + ColorSettings.Color.Primary + @" !important; 1861 } 1862 1863 .list-open-active { 1864 background-color: #FFF; 1865 color: " + ColorSettings.Color.Primary + @" !important; 1866 }"; 1867 } 1868 1869 if (GeneralSettings.Navigation.LeftmenuMode == "boxed") 1870 { 1871 CssString += @" 1872 ul.dw-categories, ul.dw-categories > li, ul.dw-categories > li > ul > li { 1873 border: 0px solid #EEE; 1874 } 1875 1876 .list-active, .list-active > a { 1877 background-color: " + ColorSettings.Color.Primary + @" !important; 1878 color: #FFF; 1879 }"; 1880 } 1881 1882 if (GeneralSettings.Navigation.LeftmenuMode == "border") 1883 { 1884 CssString += @" 1885 ul.dw-categories > li { 1886 border: 1px solid #EEE; 1887 } 1888 1889 ul.dw-categories > li > ul > li { 1890 border-top: 1px solid #EEE; 1891 } 1892 1893 .list-active, .list-active > a { 1894 background-color: " + ColorSettings.Color.Primary + @" !important; 1895 color: #FFF; 1896 }"; 1897 } 1898 1899 if (GeneralSettings.Navigation.LeftmenuMode == "light-color") 1900 { 1901 CssString += @" 1902 ul.dw-categories li a:hover, ul.dw-categories a:focus, ul.dw-categories a:active { 1903 border-left: 6px solid " + ColorSettings.Color.Primary + @"; 1904 } 1905 1906 ul.dw-categories .list-active > a { 1907 border-left: 6px solid " + ColorSettings.Color.Primary + @"; 1908 } 1909 1910 .btn-dw:hover, .btn-dw:focus, .btn-dw:active { 1911 1912 }"; 1913 } 1914 1915 1916 //Buttons custom designs 1917 if (GeneralSettings.Navigation.ButtonDesign == "light-rounded") 1918 { 1919 CssString += @" 1920 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { 1921 border-width: 0px; 1922 } 1923 1924 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 1925 background-color: " + ColorSettings.Color.Secondary + @"; 1926 color: #FFF; 1927 border-width: 0px; 1928 } 1929 1930 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 1931 background-color: " + ColorSettings.Color.Primary + @"; 1932 color: #FFF; 1933 border-width: 0px; 1934 } 1935 1936 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 1937 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 1938 color: #FFF; 1939 border-width: 0px; 1940 }"; 1941 } 1942 1943 if (GeneralSettings.Navigation.ButtonDesign == "corners") 1944 { 1945 CssString += @" 1946 .btn-dw-primary, .btn-dw-secondary, btn-dw-cart , .btn-dw-cart { 1947 border-radius: 0px !important; 1948 border-width: 0px; 1949 } 1950 1951 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 1952 background-color: " + ColorSettings.Color.Secondary + @"; 1953 color: #FFF; 1954 border-width: 0px; 1955 } 1956 1957 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 1958 background-color: " + ColorSettings.Color.Primary + @"; 1959 color: #FFF; 1960 border-width: 0px; 1961 } 1962 1963 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 1964 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 1965 color: #FFF; 1966 border-width: 0px; 1967 }"; 1968 } 1969 1970 if (GeneralSettings.Navigation.ButtonDesign == "round") 1971 { 1972 CssString += @" 1973 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { 1974 padding: 5px 15px; 1975 border-radius: 200px !important; 1976 border-width: 0px !important; 1977 } 1978 1979 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 1980 background-color: " + ColorSettings.Color.Secondary + @"; 1981 color: #FFF; 1982 border-width: 0px !important; 1983 } 1984 1985 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 1986 background-color: " + ColorSettings.Color.Primary + @"; 1987 color: #FFF; 1988 border-width: 0px !important; 1989 } 1990 1991 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 1992 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 1993 color: #FFF; 1994 border-width: 0px !important; 1995 }"; 1996 } 1997 1998 if (GeneralSettings.Navigation.ButtonDesign == "border") 1999 { 2000 CssString += @" 2001 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { 2002 background-color: transparent; 2003 } 2004 2005 .btn-dw-primary { 2006 border-width: 4px; 2007 padding: 3px 10px; 2008 color: " + ColorSettings.Color.Primary + @"; 2009 } 2010 2011 .btn-dw-secondary { 2012 border-width: 2px; 2013 color: " + ColorSettings.Color.Secondary + @"; 2014 } 2015 2016 .btn-dw-cart { 2017 border-width: 4px; 2018 padding: 3px 10px; 2019 color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2020 } 2021 2022 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 2023 background-color: " + ColorSettings.Color.Primary + @"; 2024 border-width: 4px; 2025 padding: 3px 10px; 2026 border-color: " + ColorSettings.Color.Primary + @"; 2027 color: #FFF; 2028 } 2029 2030 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 2031 background-color: " + ColorSettings.Color.Primary + @"; 2032 border-width: 2px; 2033 color: #FFF; 2034 border-color: #FFF; 2035 } 2036 2037 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 2038 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2039 border-width: 4px; 2040 padding: 3px 10px; 2041 border-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2042 color: #FFF; 2043 }"; 2044 } 2045 2046 if (GeneralSettings.Navigation.ButtonDesign == "border-sharp" || GeneralSettings.Navigation.ButtonDesign == "border-round") 2047 { 2048 CssString += @" 2049 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart { 2050 background-color: transparent; 2051 } 2052 2053 .btn-dw-primary { 2054 border-width: 4px; 2055 padding: 3px 15px; 2056 color: " + ColorSettings.Color.Primary + @"; 2057 } 2058 2059 .btn-dw-secondary { 2060 border-width: 2px; 2061 padding: 5px 15px; 2062 color: " + ColorSettings.Color.Secondary + @"; 2063 } 2064 2065 .btn-dw-cart { 2066 border-width: 4px; 2067 padding: 3px 15px; 2068 color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2069 } 2070 2071 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active { 2072 background-color: " + ColorSettings.Color.Primary + @"; 2073 border-width: 4px; 2074 color: #FFF; 2075 padding: 3px 15px; 2076 border-color: " + ColorSettings.Color.Primary + @"; 2077 } 2078 2079 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active { 2080 background-color: " + ColorSettings.Color.Primary + @"; 2081 border-width: 2px; 2082 color: #FFF; 2083 padding: 5px 15px; 2084 border-color: #FFF; 2085 } 2086 2087 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active { 2088 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2089 border-width: 4px; 2090 color: #FFF; 2091 padding: 3px 15px; 2092 border-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @"; 2093 }"; 2094 } 2095 2096 if (GeneralSettings.Navigation.ButtonDesign == "border-sharp") 2097 { 2098 CssString += @" 2099 .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 { 2100 border-radius: 0px !important; 2101 }"; 2102 } 2103 2104 if (GeneralSettings.Navigation.ButtonDesign == "border-round") 2105 { 2106 CssString += @" 2107 .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 { 2108 border-radius: 200px !important; 2109 }"; 2110 } 2111 2112 2113 //Headings custom settings 2114 if (GeneralSettings.Headings.Mode == "underline") 2115 { 2116 CssString += @" 2117 .dw-section-title { 2118 border-bottom: 2px solid; 2119 }"; 2120 } 2121 2122 if (GeneralSettings.Headings.Mode == "boxed" || GeneralSettings.Headings.Mode == "boxed-line") 2123 { 2124 CssString += @" 2125 .dw-section-title span { 2126 background-color: " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; 2127 display: inline-block; 2128 padding: 8px 16px; 2129 color: #FFF; 2130 }"; 2131 2132 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) 2133 { 2134 CssString += @" 2135 .dw-section-title { 2136 background-color: " + ColorSettings.Color.Primary + @"; 2137 }"; 2138 } 2139 } 2140 2141 if (GeneralSettings.Headings.Mode == "boxed-line") 2142 { 2143 CssString += @" 2144 .dw-section-title span { 2145 margin-bottom: 2px; 2146 } 2147 2148 .dw-section-title { 2149 border-bottom: 2px solid " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; 2150 }"; 2151 2152 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) 2153 { 2154 CssString += @" 2155 .dw-section-title { 2156 border-bottom: 2px solid " + ColorSettings.Color.Primary + @"; 2157 }"; 2158 } 2159 } 2160 2161 if (GeneralSettings.Headings.Mode == "outline") 2162 { 2163 CssString += @" 2164 .dw-section-title { 2165 color: #FFF; 2166 text-shadow: 2167 -1px -1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", 2168 1px -1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", 2169 -1px 1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @", 2170 1px 1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @"; 2171 }"; 2172 2173 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color"))) 2174 { 2175 CssString += @" 2176 .dw-section-title { 2177 text-shadow: 2178 -1px -1px 0 #1A1A1A, 2179 1px -1px 0 #1A1A1A, 2180 -1px 1px 0 #1A1A1A, 2181 1px 1px 0 #1A1A1A; 2182 }"; 2183 } 2184 } 2185 2186 return CssString; 2187 } 2188 2189 private string ClearBackground() { 2190 string CssString = ""; 2191 2192 CssString += @" 2193 .dw-navbar-button > a { 2194 background-color: rgba(0, 0, 0, 0.0) !important; 2195 } 2196 2197 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a { 2198 background-color: rgba(0, 0, 0, 0.0) !important; 2199 }"; 2200 2201 return CssString; 2202 } 2203 2204 private string NavbarPosition(bool margin=false, int specialpadding=6, int extramargin=0) { 2205 int LogoHeight = 0; 2206 string CssString = ""; 2207 int Centerpos = 0; 2208 2209 if (GeneralSettings.Header.Mode != "solid"){ 2210 if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 2211 { 2212 LogoHeight = ImageHeight(); 2213 } 2214 else 2215 { 2216 LogoHeight = GetInteger("Item.Area.LogoFont.Size"); 2217 } 2218 } 2219 else 2220 { 2221 if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 2222 { 2223 LogoHeight = 18; 2224 } 2225 else 2226 { 2227 LogoHeight = GetInteger("Item.Area.LogoFont.Size")-10; 2228 } 2229 } 2230 2231 if (margin == false) 2232 { 2233 Centerpos = (LogoHeight/2) + 6; 2234 2235 CssString += @" 2236 .dw-navbar-button > a, .navbar-wp.affix .navbar-nav > li > a { 2237 padding: " + Centerpos + @"px " + (specialpadding+4) + @"px " + Centerpos + @"px " + (specialpadding+4) + @"px !important; 2238 margin: " + extramargin + @"px " + extramargin + @"px !important; 2239 }"; 2240 } 2241 else 2242 { 2243 Centerpos = ((LogoHeight/2)+6)-(specialpadding+extramargin); 2244 2245 CssString += @" 2246 .dw-navbar-button > a, .navbar-wp.affix .navbar-nav > li > a { 2247 padding: " + specialpadding + @"px " + (specialpadding+4) + @"px " + specialpadding + @"px " + (specialpadding+4) + @"px !important; 2248 margin: " + Centerpos + @"px 4px 0px 4px !important; 2249 }"; 2250 } 2251 2252 return CssString; 2253 } 2254 2255 private int ImageHeight () 2256 { 2257 int LogoHeight = 0; 2258 2259 if (!string.IsNullOrWhiteSpace(GetString("Item.Area.GeneralLogo"))) 2260 { 2261 string imageUrl = System.Web.HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Authority + GetString("Item.Area.GeneralLogo"); 2262 2263 WebRequest request = WebRequest.Create(imageUrl); 2264 WebResponse response = request.GetResponse(); 2265 Image image = Image.FromStream(response.GetResponseStream()); 2266 2267 LogoHeight = image.Height; 2268 } 2269 else 2270 { 2271 LogoHeight = 38; 2272 } 2273 2274 return LogoHeight; 2275 } 2276 } 2277 2278 2279 2280 @{ 2281 InitGeneralSettings(); 2282 } 2283 2284 @if (writeCss) 2285 { 2286 css += FontStylesCSS() + "/*Colors*/" + Environment.NewLine + GetColorSettings() + Environment.NewLine + "/*General*/" + Environment.NewLine + GetGeneralCSS(); 2287 Dynamicweb.Base.WriteTextFile(css, HttpContext.Current.Server.MapPath("/Files/Templates/Designs/australis/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.css"), false); 2288 //Dynamicweb.Base.WriteTextFile(RemoveWhiteSpaceFromStylesheets(Dynamicweb.Base.ReadTextFile(HttpContext.Current.Server.MapPath("/Files/Templates/Designs/australis/css/DWGlobalStyles.css"))), HttpContext.Current.Server.MapPath("/Files/Templates/Designs/australis/css/DWGlobalStyles.min.css"), false); 2289 //Dynamicweb.Base.WriteTextFile(RemoveWhiteSpaceFromStylesheets(css), cssPath, false); 2290 } 2291 2292 @functions{ 2293 public static string RemoveWhiteSpaceFromStylesheets(string body) 2294 { 2295 body = Regex.Replace(body, @"[a-zA-Z]+#", "#"); 2296 body = Regex.Replace(body, @"[\n\r]+\s*", string.Empty); 2297 body = Regex.Replace(body, @"\s+", " "); 2298 body = Regex.Replace(body, @"\s?([:,;{}])\s?", "$1"); 2299 body = body.Replace(";}", "}"); 2300 body = Regex.Replace(body, @"([\s:]0)(px|pt|%|em)", "$1"); 2301 // Remove comments from CSS 2302 body = Regex.Replace(body, @"/\*[\d\D]*?\*/", string.Empty); 2303 return body; 2304 } 2305 } 2306 2307 <!-- Template styles --> 2308 <link id="dwStylesheet" type="text/css" href="/Files/Templates/Designs/australis/css/DWGlobalStyles.min.css" rel="stylesheet" media="screen"> 2309 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/australis/css/invoice.css"> 2310 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/australis/assets/css/style.css"> 2311 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/australis/assets/css/jquery-ui.css"> 2312 @{ string cssAutoPath = "/Files/Templates/Designs/australis/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.min.css?t=@areaUpdated.Ticks"; } 2313 2314 <link type="text/css" href="@cssAutoPath" rel="stylesheet"> 2315 <!-- Analytics code --> 2316 @GetValue("Item.Area.OtherAnalyticsCode") 2317 2318 <script type="text/javascript" src="/Files/Templates/Designs/australis/assets/js/jquery-1.10.1.min.js"></script> 2319 <script src="/Files/Templates/Designs/australis/assets/js/jquery.js"></script> 2320 <script src="/Files/Templates/Designs/australis/assets/js/jquery-ui.js"></script> 2321 2322 <script type="text/javascript" src="/Files/Templates/Designs/australis/js/jquery-migrate.js"></script> 2323 <script type="text/javascript" src="/Files/Templates/Designs/australis/js/slick.min.js"></script> 2324 <link rel="stylesheet" href="/Files/Templates/Designs/australis/assets/css/needsharebutton.css"> 2325 <link rel="stylesheet" href="/Files/Templates/Designs/australis/assets/css/mkg-share.css"> 2326 <script src="/Files/Templates/Designs/australis/assets/js/mkg-share.js"></script> 2327 <script src="/Files/Templates/Designs/australis/assets/js/needsharebutton.js"></script> 2328 2329 @if (Dynamicweb.Input.FormatBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2330 { 2331 <!--Start of Zendesk Chat Script--> 2332 2333 2334 <script type="text/javascript"> 2335 2336 window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s= 2337 2338 d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set. 2339 2340 _.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute("charset","utf-8" ); 2341 2342 $.src="https://v2.zopim.com/?5bSoZOp91PEa5nUuljyAJOQilZFzC08m";z.t=+new Date;$. 2343 2344 type="text/javascript";e.parentNode.insertBefore($,e)})(document,"script" ); 2345 2346 $zopim(function() { 2347 $zopim.livechat.setName('@GetString("DWextranet_AccessUserUserName")'); 2348 $zopim.livechat.setEmail('@GetString("DW_extranet_AccessUserEmail")'); 2349 $zopim.livechat.addTags('default'); 2350 }); 2351 2352 </script> 2353 <!--End of Zopim Live Chat Script--> 2354 } 2355 <!--B2b test--> 2356 @{ 2357 string usergroups = GetGlobalValue("Global:Extranet.Groups"); 2358 2359 bool b2b = false; 2360 bool salerep = false; 2361 if (!string.IsNullOrEmpty(usergroups)) 2362 { 2363 List<string> usergrouplist = new List<string>(usergroups.Split(',')); 2364 if (usergrouplist.Count > 0) 2365 { 2366 foreach (var group in usergrouplist) 2367 { 2368 2369 if (Convert.ToInt32(group) == 416) 2370 { 2371 b2b = true; 2372 break; 2373 } 2374 else if (Convert.ToInt32(group) == 419) 2375 { 2376 salerep = true; 2377 break; 2378 } 2379 } 2380 } 2381 } 2382 } 2383 <!--End of B2b test--> 2384 @*if (!Dynamicweb.Input.FormatBoolean(GetGlobalValue("Global:Extranet.UserName"))) { 2385 <!--Start of Zopim Live Chat Script for anonymous visitor--> 2386 <text><script type="text/javascript"> 2387 window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s= 2388 d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set. 2389 _.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute("charset","utf-8"); 2390 $.src="//v2.zopim.com/?3wKYEYmRdSVBmMJN7bQLJQGLBDDMiNqZ";z.t=+new Date;$. 2391 type="text/javascript";e.parentNode.insertBefore($,e)})(document,"script"); 2392 2393 $zopim(function() { 2394 $zopim.livechat.setName('Anonymous'); 2395 $zopim.livechat.setEmail('user@somewhere.com'); 2396 $zopim.livechat.addTags('Anonymous'); 2397 }); 2398 2399 </script></text> 2400 <!--End of Zopim Live Chat Script--> 2401 }*@ 2402 2403 @if (!string.IsNullOrWhiteSpace(googleTrackingId)) 2404 { 2405 <script> 2406 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 2407 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 2408 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 2409 })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); 2410 2411 ga('create', '@googleTrackingId', 'auto'); 2412 ga('set', 'userId', '@GetGlobalValue("Global:Extranet.UserName")'); // Set the user ID using signed-in user_id. 2413 ga('send', 'pageview'); 2414 2415 </script> 2416 } 2417 2418 @GetValue("Stylesheets") 2419 @GetValue("Javascripts") 2420 </head> 2421 <body id="sitecontent"> 2422 2423 <!-- Script controlling website entry start--> 2424 <script> 2425 function checkloggedin() { 2426 var localcookie = getCookie("loggedin"); 2427 return localcookie; 2428 } 2429 function logincheck() { 2430 var usernamejs = document.forms["testform"]["username1"].value; 2431 var passwordjs = document.forms["testform"]["password1"].value; 2432 if ((usernamejs == "dwuser") && (passwordjs == "dw12345")) { 2433 setCookie("loggedin", "1", "1"); 2434 return true; 2435 } 2436 2437 } 2438 2439 2440 2441 function getCookie(cname) { 2442 var name = cname + "="; 2443 var ca = document.cookie.split(';'); 2444 for (var i = 0; i < ca.length; i++) { 2445 var c = ca[i]; 2446 while (c.charAt(0) == ' ') c = c.substring(1); 2447 if (c.indexOf(name) == 0) { 2448 return c.substring(name.length, c.length); 2449 } 2450 } 2451 return ""; 2452 } 2453 function setCookie(cname, cvalue, exdays) { 2454 var d = new Date(); 2455 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 2456 var expires = "expires=" + d.toGMTString(); 2457 document.cookie = cname + "=" + cvalue + "; " + expires + "; path=/"; 2458 } 2459 </script> 2460 <script> 2461 //auto logs out after idling 2462 var localcookie = checkloggedin(); 2463 var reset; 2464 if (localcookie == 1) { resetTimer(); } 2465 document.body.addEventListener('mousemove', function (e) { if (localcookie == 1) { resetTimer(); } }, false); 2466 document.body.addEventListener('click', function (e) { if (localcookie == 1) { resetTimer(); } }, false); 2467 2468 function resetTimer() { 2469 2470 clearTimeout(reset); 2471 reset = 0; 2472 reset = window.setTimeout( 2473 function () { 2474 $('#logoutlocalmodal').modal('show'); 2475 2476 }, 5000);//10*60*1000); 2477 } 2478 2479 2480 </script> 2481 <script language="JavaScript"> 2482 2483 2484 2485 function deleteCookie(name) { 2486 var d = new Date(); 2487 var expired = new Date(d.getTime() - (10 * 1000)); // less 30 seconds 2488 document.cookie = name + "=null; path=/; expires=" + expired.toGMTString(); 2489 } 2490 function checkCookie() { 2491 var localloggedin = checkloggedin(); 2492 if (localloggedin == 0 | localloggedin == null) { 2493 document.getElementById("test1").click(); 2494 } 2495 2496 } 2497 2498 2499 2500 </script> 2501 <!-- Script controlling website entry end--> 2502 <!-- MODALS --> 2503 <!--REALLOGIN modal --> 2504 <div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> 2505 <div class="modal-dialog modal-sm"> 2506 <div class="modal-content"> 2507 <div class="modal-header"> 2508 <h4 class="modal-title" id="myModalLabel">@Translate("Login", "Login")</h4> 2509 </div> 2510 <form role="form" id="loginform" method="post"> 2511 <div class="modal-body"> 2512 @if (!string.IsNullOrWhiteSpace(GetString("DW_extranet_error_uk"))) 2513 { 2514 2515 } 2516 2517 <input type="hidden" name="ID" value="@Pageview.ID"> 2518 <input type="hidden" name="DWExtranetUsernameRemember" value="True"> 2519 <input type="hidden" name="DWExtranetPasswordRemember" value="True"> 2520 <div class="form-group"> 2521 @{ attrValue = Translate("Enter username", "Enter username"); 2522 var username2 = @GetValue("DWExtranetUsername"); 2523 } 2524 2525 <label for="username">@Translate("Username", "Username")</label> 2526 <input type="text" class="form-control" name="username" id="username" placeholder="@attrValue" value="@username2"> 2527 </div> 2528 <div class="form-group"> 2529 @{ attrValue = Translate("Enter password", "Enter password"); 2530 } 2531 2532 <label for="password">@Translate("Password", "Password")</label> 2533 <input type="password" class="form-control" name="password" id="password" placeholder="@attrValue"> 2534 <p>&nbsp;</p> 2535 <a class="pull-left" href="/Default.aspx?ID=9170&LoginAction=Recovery">@Translate("Forgot your password?", "Forgot your password?")</a> 2536 &nbsp; 2537 </div> 2538 </div> 2539 <div class="modal-footer"> 2540 <div class="row"> 2541 <div class="col-md-12"> 2542 <div class="checkbox pull-left"> 2543 <label> 2544 <input type="checkbox" name="Autologin" checked="checked" value="True"> @Translate("Remember me", "Remember me") 2545 </label> 2546 </div> 2547 <button type="submit" class="btn btn-xs btn-base pull-right">@Translate("Sign in", "Sign in")</button> 2548 </div> 2549 </div> 2550 </div> 2551 @if (GetLoop("DWExtranetExternalLoginProviders").Count != 0) 2552 { 2553 <div class="modal-footer"> 2554 <div class="row"> 2555 <div class="col-md-12"> 2556 <div class="pull-left">@Translate("Or sign in using", "Or sign in using"):</div> 2557 <p>&nbsp;</p> 2558 </div> 2559 </div> 2560 2561 <div class="row"> 2562 <div class="col-md-12"> 2563 @foreach (LoopItem LoginProvider in GetLoop("DWExtranetExternalLoginProviders")) 2564 { 2565 var ProviderName = LoginProvider.GetString("ProviderName").ToLower(); 2566 var ProviderID = LoginProvider.GetValue("ProviderID"); 2567 <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> 2568 } 2569 </div> 2570 </div> 2571 </div> 2572 } 2573 </form> 2574 </div> 2575 </div> 2576 </div> 2577 <!--REALLOGIN --> 2578 <!--LOGOUT modal--> 2579 <div class="modal fade" id="logoutlocalmodal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> 2580 <div class="modal-dialog modal-sm"> 2581 <div class="modal-content"> 2582 <div class="modal-header"> 2583 <h4 class="modal-title" id="myModalLabel">@Translate("You are logged in", "You are logged in")</h4> 2584 </div> 2585 <form name="testform" onsubmit="logincheck();" method="post"></form> 2586 <div class="modal-body"> 2587 2588 <p>You have been idling for awhile. Please press the button below to leave the website.</p> 2589 2590 <button type="button" class="btn btn-xs btn-base pull-right" onclick='logoutlocal();'>Press to leave website</button> 2591 </div> 2592 </div> 2593 </div> 2594 2595 <form></form> 2596 </div> 2597 2598 2599 <!--LOGOUT --> 2600 <!-- MOBILE MENU --> 2601 @{ 2602 var offsetmenuplace = "left"; 2603 2604 if (GeneralSettings.Header.Mode == "mobile") 2605 { 2606 offsetmenuplace = GeneralSettings.Navigation.Position; 2607 } 2608 } 2609 2610 <!-- HEADER AND CONTENT--> 2611 2612 <div class="body-wrap shad @GeneralSettings.Site.LayoutMode"> 2613 2614 <!-- HEADER --> 2615 <div id="divHeaderWrapper"> 2616 <header class="@GeneralSettings.Header.Classes"> 2617 <!-- TOP HEADER --> 2618 @if (GeneralSettings.Header.Show) 2619 { 2620 <div class="top-header"> 2621 <div class="container"> 2622 <div class=""> 2623 <div class="logobox logobox" style="width:40%;"> 2624 <p style="margin:0"> 2625 @GetValue("DwNavigation(topleftmenu)") 2626 @* @if (GetBoolean("Item.Area.SocialLinksInFooter")) 2627 { 2628 string sicon = ""; 2629 string slink = ""; 2630 2631 foreach (LoopItem socialitem in GetLoop("Item.Area.SocialIconInFooter")) 2632 { 2633 sicon = socialitem.GetString("Item.Area.SocialIconInFooter.Icon"); 2634 slink = socialitem.GetString("Item.Area.SocialIconInFooter.Link"); 2635 2636 <a href="@slink"><i class="fa @sicon fa-2x"></i>&nbsp;</a> 2637 } 2638 2639 2640 }*@ 2641 </p> 2642 </div> 2643 <div class="logobox1" style="width:60%;"> 2644 <nav class="top-header-menu"> 2645 <ul class="top-menu"> 2646 2647 <!-- Ecommerce user menu --> 2648 @if (GetBoolean("Item.Area.EcomEnabled")) 2649 { 2650 if (!Dynamicweb.Input.FormatBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2651 { 2652 <text> 2653 <li class="dw-navbar-button"><a href='@GetValue("Item.Area.Login")'>@Translate("Login", "Login")</a> <!--| <a href="Default.aspx?ID=9202" data-hover="dropdown">Register<span></span></a>--></li> 2654 2655 </text> 2656 2657 2658 } 2659 2660 if (Dynamicweb.Input.FormatBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2661 { 2662 <text> 2663 <li> 2664 <a href='@GetValue("Item.Area.MyAcccount")'> 2665 <nobr> 2666 <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong> 2667 </nobr> 2668 </a> 2669 </li> 2670 <li> 2671 <!-- <a href='@GetValue("Item.Area.QuoteCart")'>@Translate("Quote Cart", "Quote Cart")</a> --> 2672 </li> 2673 <li> 2674 <a href='@GetValue("Item.Area.WhistList")'>@Translate("Favourites", "Favourites")</a> 2675 </li> 2676 <li> 2677 <a href='/Admin/Public/ExtranetLogoff.aspx?ID=@GetString("DwAreaFirstActivePageID")'>@Translate("Logout", "Logout")</a> 2678 </li> 2679 2680 2681 </text> 2682 2683 } 2684 } 2685 2686 2687 <!-- Ecommerce Cart --> 2688 @if (GetBoolean("Item.Area.EcomEnabled")) 2689 { 2690 <li class="dropdown animate-hover hidden-sm hidden-xs" data-animate="animated fadeInUp"> 2691 @if (Dynamicweb.Input.FormatBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2692 { 2693 if (b2b || salerep) 2694 { 2695 <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> 2696 } 2697 else 2698 { 2699 <a href="#" title="" id="minipagecart" class="dw-minicart"><i class="fa fa-shopping-cart"></i> @GetValue("Ecom:Order.OrderLines.TotalProductQuantity") <span>@GetValue("Ecom:Order.OrderLines.Total.PriceWithoutVAT")</span></a> 2700 2701 } 2702 } 2703 <ul class="sub-menu"> 2704 <li id="minicart"> 2705 @MiniCart() 2706 </li> 2707 </ul> 2708 </li> 2709 } 2710 2711 </ul> 2712 </nav> 2713 </div> 2714 </div> 2715 </div> 2716 </div> 2717 } 2718 2719 2720 <!-- MAIN NAV --> 2721 @{ 2722 var sticky = GeneralSettings.Navigation.StickyMenu; 2723 var stickyTrigger = "affix"; 2724 var navbarpos = GeneralSettings.Navigation.Position; 2725 var selectionstyle = GeneralSettings.Navigation.SelectionStyle; 2726 2727 if (sticky == "off") 2728 { 2729 stickyTrigger = ""; 2730 } 2731 } 2732 2733 2734 <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"> 2735 2736 2737 2738 @if (GeneralSettings.Header.Mode != "solid" || !GeneralSettings.Header.Show) 2739 { 2740 2741 <div class="navbar-header pull-@GeneralSettings.Navigation.InvertedPosition"> 2742 <div class="hidden-sm hidden-xs"> 2743 <a href="/Default.aspx?ID=@firstpageid" class="brand"> 2744 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image)) 2745 { 2746 <img class="img-responsive dw-logoimage pull-left" src="@GeneralSettings.Logo.Image" alt="Logo"> 2747 } 2748 2749 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text)) 2750 { 2751 <div class="dw-logotext pull-left">@GeneralSettings.Logo.Text</div> 2752 } 2753 </a> 2754 </div> 2755 </div> 2756 2757 } 2758 <div class="container"> 2759 @if (GeneralSettings.Header.Mode != "mobile") 2760 { 2761 <!-- Small screen header --> 2762 <div class="hidden-md hidden-lg row"> 2763 <div class="dw-header-sm"> 2764 <a href="/home"> 2765 <img src="/Files/Images/australis/Australis-Logo.png" alt="Logo" style="margin-left:10px"> 2766 </a> 2767 <div class="pull-right"> 2768 <button id="menuOn" style="background:none" onclick="showToggle('#myNavmenu')"> 2769 <i class="fa fa-bars"></i> 2770 <i class="fa fa-times hide"></i> 2771 </button> 2772 &nbsp;&nbsp;&nbsp; 2773 </div> 2774 2775 <div class="pull-right"> 2776 <h2 class="dw-header-sm-title">@GetGlobalValue("Global:Page.Top.Name")</h2> 2777 </div> 2778 2779 @if (GetBoolean("Item.Area.EcomEnabled")) 2780 { 2781 2782 <div class="pull-right"> 2783 <ul class="top-menu"> 2784 <li> 2785 @if (Dynamicweb.Input.FormatBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2786 { 2787 <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> 2788 } 2789 <ul class="sub-menu hidden-xs"> 2790 <li id="smallscreen-minicart"> 2791 @MiniCart() 2792 </li> 2793 </ul> 2794 </li> 2795 </ul> 2796 </div> 2797 2798 2799 if (Dynamicweb.Input.FormatBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2800 { 2801 <div class="hidden-xs pull-left"> 2802 <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> 2803 &nbsp; 2804 </div> 2805 <div class="hidden-xs pull-right"> 2806 <a href="Default.aspx?ID=9169" class="btn btn-sm btn-base"> 2807 <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong> 2808 </a> 2809 &nbsp; 2810 </div> 2811 } 2812 2813 if (!Dynamicweb.Input.FormatBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2814 { 2815 <div class="hidden-xs pull-right"> 2816 <a href="/my-account/login" class="btn btn-sm btn-base"><i class="fa fa-sign-in"></i></a> 2817 &nbsp; 2818 </div> 2819 } 2820 } 2821 </div> 2822 <div id="myNavmenu" class="showon navmenu" style="position: absolute;"> 2823 <div class="row"> 2824 <div class="col-sm-12 col-xs-12"> 2825 <form id="mobosearch" method="get" action='@GetValue("Item.Area.Search_Page")'> 2826 <input type="hidden" name="ID" value='@searchpageID'> 2827 <div class="input-group"> 2828 <input class="form-control search_box" style="border: none !important;background-color: #f3f3f3;" type="search" name="q" tabindex="1" autocomplete="off" placeholder="SEARCH..."> 2829 <span class="input-group-btn"> 2830 <button class="btn btn-primary btn-search" type="submit"><i class="fa fa-search" style="color:gray!important"></i></button> 2831 </span> 2832 </div> 2833 </form> 2834 @GetValue("DwNavigation(drawernavigation)") 2835 </div> 2836 </div> 2837 </div> 2838 </div> 2839 2840 <!-- Big screen header --> 2841 <div class="navbar-navigation"> 2842 <!--Currently in Use--> 2843 <div class="container hidden-sm hidden-xs"> 2844 <nav class="row"> 2845 2846 @GetValue("DwNavigation(topnavigation)") 2847 <div class="hidden-sm hidden-xs"> 2848 <style> 2849 .btn-search { 2850 background: transparent !important; 2851 color: #bbb; 2852 } 2853 2854 .search_box input { 2855 border: 1px solid #000; 2856 color: #B2B2B2; 2857 font-family: 'roboto'; 2858 font-size: 12px; 2859 font-weight: 300; 2860 height: 35px; 2861 outline: medium none; 2862 padding-left: 10px; 2863 /* width:400px; 2864 background-image: url(/Files/Templates/Designs/australis/../images/home/searchicon.png); 2865 background-repeat: no-repeat; 2866 background-position: 380px;*/ 2867 } 2868 </style> 2869 <form id="searchForm1" method="get" action='@GetValue("Item.Area.Search_Page")'> 2870 <input type="hidden" name="ID" value='@searchpageID'> 2871 <div class="input-group dw-top-search1 hidden-sm hidden-xs"> 2872 <input class="form-control search_box" style="border: none !important;background-color: #f3f3f3;" type="search" name="q" tabindex="1" autocomplete="off" placeholder="SEARCH..."> 2873 <span class="input-group-btn"> 2874 <button class="btn btn-primary btn-search" type="submit"><i class="fa fa-search" style="color:gray!important"></i></button> 2875 </span> 2876 </div> 2877 </form> 2878 </div> 2879 <!-- navigation container row dwnavigation--> 2880 <!-- Extra navigation when no header is shown --> 2881 @if (GetBoolean("Item.Area.EcomEnabled")) 2882 { 2883 if (!GeneralSettings.Header.Show) 2884 { 2885 <ul class="nav navbar-nav "> 2886 <li>&nbsp;&nbsp;&nbsp;</li> 2887 @if (!Dynamicweb.Input.FormatBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2888 { 2889 <li class="dw-navbar-button"><a href="#" data-toggle="modal" data-target="#login" data-hover="dropdown">Login3<span></span></a></li> 2890 <li class="dw-navbar-button"><a href="Default.aspx?ID=9202" data-hover="dropdown"><span></span></a></li> 2891 2892 <form></form> 2893 } 2894 2895 @if (Dynamicweb.Input.FormatBoolean(GetGlobalValue("Global:Extranet.UserName"))) 2896 { 2897 <li class="dw-navbar-button"> 2898 <a href="Default.aspx?ID=9169" data-hover="dropdown"> 2899 <nobr> 2900 <strong><i class="fa fa-user"></i></strong> 2901 </nobr> 2902 <span></span> 2903 </a> 2904 </li> 2905 <li class="dw-navbar-button"> 2906 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID" data-hover="dropdown"><i class="fa fa-sign-out"></i><span></span></a> 2907 </li> 2908 } 2909 2910 <li class="dw-navbar-button"> 2911 <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> 2912 </li> 2913 2914 </ul> 2915 } 2916 2917 if (GeneralSettings.Header.Mode != "solid") 2918 { 2919 <ul class="nav navbar-nav"> 2920 <li class="dropdown dropdown-aux animate-click dw-navbar-button" data-animate-in="animated bounceInUp" data-animate-out="animated fadeOutDown" style="z-index:500;"> 2921 <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown"><i class="fa fa-search"></i><span></span></a> 2922 <ul class="dropdown-menu dropdown-menu-user animate-wr"></ul> 2923 </li> 2924 </ul> 2925 } 2926 } 2927 2928 </nav> 2929 2930 </div> 2931 2932 @if (GetBoolean("Item.Area.EcomEnabled")) 2933 { 2934 if (GeneralSettings.Header.Mode == "solid" && GeneralSettings.Header.Show) 2935 { 2936 <div class="hidden-sm hidden-xs"> 2937 <div class="col-md-2 col-sm-2 col-xs-2 pull-@GeneralSettings.Navigation.InvertedPosition"> 2938 2939 </div> 2940 </div> 2941 } 2942 } 2943 </div> 2944 } 2945 else 2946 { 2947 <!-- Using only mobile navigation --> 2948 <div class="pull-@GeneralSettings.Navigation.Position"> 2949 <ul class="nav navbar-nav"> 2950 <li class="dw-navbar-button" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body"> 2951 <a><i class="fa fa-bars fa-2x"></i><span></span></a> 2952 </li> 2953 </ul> 2954 </div> 2955 } 2956 </div> 2957 </div> 2958 2959 2960 2961 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.HeaderLayoutImage"))) 2962 { 2963 if (currentpageid != firstpageid) 2964 { 2965 var coverimage = GetString("Item.Area.HeaderLayoutImage"); 2966 2967 <div class="container-fluid dw-header-image"> 2968 <div class="row"> 2969 <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> 2970 </div> 2971 </div> 2972 } 2973 } 2974 else if (GeneralSettings.Header.Mode != "solid") 2975 { 2976 if (currentpageid != firstpageid) 2977 { 2978 <div class="container-fluid dw-header-image"> 2979 <div class="row"> 2980 <section class="carousel carousel-1 slice fluid" style="height: 160px !important; background-color: transparent; background-size: cover !important;"></section> 2981 </div> 2982 </div> 2983 } 2984 } 2985 </header> 2986 </div> 2987 2988 <!-- MAIN CONTENT --> 2989 2990 @GetValue("Title(Full width page)") 2991 @GetValue("Description(Use this page for full width pages with no left navigation.)") 2992 2993 @{ 2994 string siteurl = GetGlobalValue("Global:Request.Url").ToString(); 2995 2996 } 2997 2998 <script> 2999 function logoutlocal(){ 3000 setCookie("loggedin","0","1"); 3001 location.reload(); 3002 } 3003 var link = window.location.href; 3004 if (link.contains("/news")){ 3005 document.getElementById("News").setAttribute("style","background-color:#CE171F;padding:10px 8px 19px 10px"); 3006 } 3007 </script> 3008 3009 <!--Start Impersonation--> 3010 @if(salerep){ 3011 <div class="clearfix"></div> 3012 <div class="impersonatebar"> 3013 <div class="container"> 3014 @if(Dynamicweb.Input.FormatBoolean(GetGlobalValue("Global:Extranet.SecondaryUser.UserName"))) 3015 { 3016 <a data-toggle="dropdown"> 3017 <i class="fa fa-user"></i> 3018 <strong>Logged in as ( @GetGlobalValue("Global:Extranet.SecondaryUser.Company") ) </strong> 3019 <span class="caret"></span> 3020 </a> 3021 3022 <ul class="dropdown-menu"> 3023 <form method="post" name="impersonateForm" id="impersonateForm"> 3024 @*@foreach (var user in GetLoop("DWExtranetSecondaryUsers")) { 3025 3026 <li><label style="cursor:pointer;"><input type="radio" hidden="" id="DWExtranetSecondaryUserSelector" name="DWExtranetSecondaryUserSelector" value='@user.GetValue("UserID")' onclick="this.form.submit()">@user.GetValue("UserName")<label></label></label></li> 3027 3028 3029 <div class="clearfix"></div> 3030 }*@ 3031 <li><input type="submit" name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" value="Stop impersonation" onclick="OnSubmitForm()"></li> 3032 </form> 3033 </ul> 3034 <script type="text/javascript"> 3035 function OnSubmitForm() 3036 { 3037 setTimeout(function() { 3038 window.location.href = ('http://s3.services.dynamicweb.dk/news?cartcmd=emptycart'); 3039 3040 }, 1); 3041 jQuery('form#impersonateForm').submit(); 3042 3043 } 3044 </script> 3045 } 3046 else 3047 { 3048 <a data-toggle="dropdown"> 3049 <i class="fa fa-user"></i> 3050 <strong>Login as </strong> 3051 <span class="caret"></span> 3052 </a> 3053 3054 <ul class="dropdown-menu"> 3055 <li> 3056 <form method="post" id="jsform"> 3057 @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) { 3058 3059 if (users.Any()){ 3060 3061 foreach (User user in users) 3062 { 3063 3064 <label style="cursor:pointer;" for='@user.ID'> 3065 <input hidden="" onclick="this.form.submit()" type="radio" id='@user.ID' name="DWExtranetSecondaryUserSelector" value='@user.ID'>@user.Company 3066 3067 </label> 3068 3069 } 3070 3071 } 3072 3073 @*foreach (var user in GetLoop("DWExtranetSecondaryUsers")) { 3074 <label style="cursor:pointer;" for='@user.GetValue("UserID")'> 3075 <input hidden="" onclick="this.form.submit()" type="radio" id='@user.GetValue("UserID")' name="DWExtranetSecondaryUserSelector" value='@user.GetValue("UserID")'>@user.GetValue("UserName")<option></option> 3076 3077 </label> 3078 }*@ 3079 3080 3081 <input type="submit" tabindex="3" value="OK" style="visibility: hidden;"> 3082 3083 } else { 3084 <h3>@GetGlobalValue("Global:Extranet.SecondaryUser.UserName") is impersonated by @Pageview.User.UserName.</h3> 3085 <br> 3086 <input type="submit" name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" value="Stop impersonation"> 3087 } 3088 3089 3090 3091 3092 </form> 3093 </li> 3094 </ul> 3095 3096 } 3097 </div> 3098 </div> 3099 } 3100 <!--End Impersonation--> 3101 3102 <div class="clearfix"></div> 3103 <div class="news-white"> 3104 @if(GetBoolean("Item.Page.LayoutShowBreadcrumb")){ 3105 <div class="pg-opt pin"> 3106 <div class="container"> 3107 3108 <div class=""> 3109 @*<div class="col-lg-3 col-md-3 hidden-sm hidden-xs"> 3110 @if (GeneralSettings.Navigation.BreadcrumbMode != "light") 3111 { 3112 <div class="dw-breadcrumb-title">@GetGlobalValue("Global:Page.Top.Name")</div> 3113 } 3114 </div>*@ 3115 <div class=""> 3116 @GetValue("DwNavigation(breadcrumb)") 3117 </div> 3118 </div> 3119 </div> 3120 </div> 3121 } 3122 @{ 3123 string backgroundImage = @GetString("Item.Page.BackgroundImage"); 3124 } 3125 <div class="white"> 3126 <div class="container"> 3127 <div class=""> 3128 <div class="maincontent-wrapper col-md-8 col-sm-12 col-xm-12"> 3129 3130 @* Test *@ 3131 3132 <script> 3133 var breadcrumb = document.getElementById("breadcrumb"); 3134 var newsname = document.createElement("li"); 3135 var newstext = document.createTextNode('@GetString("Item.Heading")'); 3136 newsname.appendChild(newstext); 3137 breadcrumb.appendChild(newsname); 3138 v 3139 </script> 3140 3141 @{ 3142 string nextNewsId = ""; 3143 string previousNewsId = ""; 3144 int newsSort = GetInteger("Item.Sort"); 3145 int newsSortNext = newsSort+1; 3146 int newsSortPrevious = newsSort -1; 3147 Dictionary<int,string> dictionary=new Dictionary<int,string>(); 3148 string newsTypeString = GetString("Item.NewsType"); 3149 string [] newsType = newsTypeString.Split(' '); 3150 string sqlnews = "SELECT * FROM ItemType_News WHERE NewsType like'%"+newsType[0]+"%'"; 3151 using (System.Data.IDataReader myImageReader = Dynamicweb.Database.CreateDataReader(sqlnews.ToString())) 3152 { 3153 while (myImageReader.Read()) 3154 { 3155 if (!dictionary.ContainsKey(Int32.Parse(myImageReader["Sort"].ToString()))){ 3156 dictionary.Add(Int32.Parse(myImageReader["Sort"].ToString()),myImageReader["Id"].ToString()); 3157 } 3158 } 3159 3160 } 3161 3162 if (dictionary.ContainsKey(newsSortNext)) 3163 { 3164 nextNewsId = dictionary[newsSortNext]; 3165 } 3166 3167 if(dictionary.ContainsKey(newsSortPrevious)) 3168 { 3169 previousNewsId = dictionary[newsSortPrevious]; 3170 } 3171 3172 3173 3174 string sqlImage = string.Format("select top 1 rn from (SELECT *, rn=Rank() over (partition by NewsType order by [Date] desc, Id desc) FROM ItemType_News where NewsType is not null) as tblTest where Id={0}", GetInteger("Item.Id")); 3175 int rank = 0; 3176 using (System.Data.IDataReader myImageReader = Dynamicweb.Database.CreateDataReader(sqlImage.ToString())) 3177 { 3178 while (myImageReader.Read()) 3179 { 3180 rank=int.Parse(myImageReader["rn"].ToString()); 3181 } 3182 3183 } 3184 3185 if(rank!=0){ 3186 sqlImage = string.Format("select top 3 * from (SELECT *, rn=Rank() over (partition by NewsType order by [Date] desc, Id desc) FROM ItemType_News where NewsType is not null) as tblTest where rn in ({0},{1},{2}) and NewsType like '{3}%'", rank, rank+1, rank-1, @GetString("Item.NewsType.Value").Split(' ')[0] ); 3187 <!-- <text>@sqlImage</text> --> 3188 using (System.Data.IDataReader myImageReader = Dynamicweb.Database.CreateDataReader(sqlImage.ToString())) 3189 { 3190 while (myImageReader.Read()) 3191 { 3192 <!--<text>@myImageReader["Id"].ToString()</text>--> 3193 } 3194 3195 } 3196 } 3197 } 3198 3199 <div class="w-section white inverse blog-grid"> 3200 <div class="w-box blog-post"> 3201 <div class="figure"> 3202 3203 @if (!string.IsNullOrWhiteSpace("Item.GeneralImage")){ 3204 var image = GetString("Item.GeneralImage"); 3205 3206 3207 <img src="/Admin/Public/GetImage.ashx?image=@image&width=940&compression=90" style="width:100%;" class="img-responsive"> 3208 } 3209 <h2>@GetString("Item.Heading")</h2> 3210 <ul class="meta-list clearfix"> 3211 <li> 3212 @{DateTime date=GetDate("Item.Date");}<a href="#">@date.ToString("dddd dd MMMM yyyy") | </a> 3213 </li> 3214 <li class="list-line"> 3215 Tagged: <a href="#"> @GetString("Item.NewsType") | </a> 3216 </li> 3217 3218 @if (!string.IsNullOrWhiteSpace("Item.GeneralAuthor")){ 3219 <li class="list-line"> 3220 By&nbsp; <a href="#">@GetString("Item.GeneralAuthor") <a> 3221 </a></a></li> 3222 } 3223 3224 </ul> 3225 3226 <p class="clearfix">@GetString("Item.Text")</p> 3227 <div id="maincontent">@GetValue("DwContent(maincontent)")</div> 3228 <div class="clearfix"></div> 3229 <div class="detail-share text-center"> 3230 <h6>SHARE ARTICLE</h6> 3231 <hr class="linegray"> 3232 <ul class="social"> 3233 <!-- AddToAny BEGIN --> 3234 <div class="a2a_kit a2a_kit_size_32 a2a_default_style"> 3235 <!--<a class="a2a_dd" href="https://www.addtoany.com/share"></a>--> 3236 <a class="a2a_button_facebook"><img class="socialimg" src="/Files/Images/australis/fb-gray.jpg"></a> 3237 <a class="a2a_button_twitter"><img class="socialimg" src="/Files/Images/australis/twitter-gray.jpg"></a> 3238 <a class="a2a_button_google_plus"><img class="socialimg" src="/Files/Images/australis/google-gray.jpg"></a> 3239 <a class="a2a_button_linkedin"><img class="socialimg" src="/Files/Images/australis/linked-gray.jpg"></a> 3240 <a class="a2a_button_gmail"><img class="socialimg" src="/Files/Images/australis/mail-gray.jpg"></a> 3241 </div> 3242 <script async="" src="https://static.addtoany.com/menu/page.js"></script> 3243 <!-- AddToAny END --> 3244 </ul> 3245 </div> 3246 </div> 3247 <div class="news-loadmore"> 3248 @if(previousNewsId !=""){ 3249 <a href="/Default.aspx?ID=9083&itemId=News:@previousNewsId&PID=11223"><span class="arrow">&lsaquo;</span>&nbsp;LOAD PREVIOUS | </a> 3250 } 3251 @if(nextNewsId != ""){ 3252 <a href="/Default.aspx?ID=9083&itemId=News:@nextNewsId&PID=11223">LOAD NEXT&nbsp;<span class="arrow">&rsaquo;</span></a> 3253 } 3254 </div> 3255 3256 </div> 3257 </div> 3258 <script> 3259 $( document ).ready(function() { 3260 $( ".socialimg" ).hover( 3261 function() { 3262 $(this).attr('src',function(index,attr){ 3263 return attr.replace('gray','hover'); 3264 }); 3265 }, function() { 3266 $(this).attr('src',function(index,attr){ 3267 return attr.replace('hover','gray'); 3268 }); 3269 } 3270 ); 3271 }); 3272 function loadnext(){ 3273 3274 //var type=@GetString("Item.NewsType.Value"); //for news types 3275 //var sort=@GetString("Item.Sort.Value");//which is next? 3276 3277 // $.get( url, function( data ) { }); 3278 3279 } 3280 function loadlast(){ 3281 //Item.NewsType.Value 3282 } 3283 </script> 3284 3285 @* Test *@ 3286 3287 3288 3289 </div> 3290 <div class="news-rightbar col-md-4 col-sm-12 col-xs-12"> 3291 <div id="sidebar">@GetValue("DwContent(sidebar)")</div> 3292 </div> 3293 3294 3295 3296 @if (GetBoolean("Item.Page.FacebookLikeButton")){ 3297 <div class="container"> 3298 <div class="col-md-12 col-sm-12 col-xs-12"> 3299 <div class=""> 3300 <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> 3301 </div> 3302 </div> 3303 </div> 3304 } 3305 </div> 3306 </div> 3307 </div> 3308 3309 3310 @foreach(var language in GetLoop("WebsiteLanguages")){ 3311 <text> 3312 <script> 3313 var languageID = '@language.GetString("ID")'; 3314 </script> 3315 </text> 3316 } 3317 </div> 3318 <!-- FOOTER --> 3319 <!-- FOOTER --> 3320 <div class="body-wrap @GeneralSettings.Site.LayoutMode footer-container"> 3321 <div class="container-fluid"> 3322 <div class="row"> 3323 <!-- /////////////////////////////////////////////////////////////////////// --> 3324 <style> 3325 .footermenu { 3326 width: 100%; 3327 background: #333; 3328 } 3329 3330 .footermenu div { 3331 line-height: 50px; 3332 } 3333 3334 .footermenu li { 3335 list-style: none; 3336 padding-left: 15px; 3337 } 3338 3339 .footermenu a { 3340 color: white; 3341 font-size: large; 3342 } 3343 </style> 3344 <div class="hidden-md hidden-lg scroll-top" onclick="$('html, body').animate({ scrollTop: 0 }, 'fast');"><p>BACK UP TO TOP <i class="fa fa-long-arrow-up" aria-hidden="true"></i></p></div> 3345 <div class='footermenu hidden-md hidden-lg col-sm-12 col-xs-12'> 3346 3347 <div id="productLnkF" data-toggle="collapse" data-target="#ftmn1" class="outline"> 3348 <a>PRODUCTS<i style="line-height:50px;font-size:large;color:#cc1010;float:right" class="fa fa-fw" aria-hidden="true" title="Copy to use angle-down"></i></a> 3349 </div> 3350 3351 <div id="ftmn1" class="collapse"> 3352 <ul id="ftmn1ul"></ul> 3353 </div> 3354 3355 <div id="brandLnkF" data-toggle="collapse" data-target="#ftmn2" class="outline"> 3356 <a>BRANDS<i style="line-height:50px;font-size:large;color:#cc1010;float:right" class="fa fa-fw" aria-hidden="true" title="Copy to use angle-down"></i></a> 3357 </div> 3358 3359 <div id="ftmn2" class="collapse"> 3360 <ul id="ftmn2ul"></ul> 3361 </div> 3362 3363 <div id="otherLnkF" data-toggle="collapse" data-target="#ftmn3" class="outline"> 3364 <a>OTHER LINKS<i style="line-height:50px;font-size:large;color:#cc1010;float:right" class="fa fa-fw" aria-hidden="true" title="Copy to use angle-down"></i></a> 3365 </div> 3366 3367 <div id="ftmn3" class="collapse"> 3368 <ul id="ftmn3ul"></ul> 3369 </div> 3370 3371 </div> 3372 <!-- /////////////////////////////////////////////////////////////////////// --> 3373 <footer class="footer"> 3374 3375 <div class="copyright"> 3376 <div class="container"> 3377 <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12"> 3378 <div class="col"> 3379 <p>Copyright &copy; @GetValue("Item.Area.FooterCompanyName") @GetGlobalValue("Global:Server.Date.Year")</p> 3380 </div> 3381 </div> 3382 <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12"> 3383 <div id="footerwrap" class="col pull-right" style="text-transform: uppercase !important;"> 3384 <p> 3385 @GetValue("DwNavigation(footermenu)") 3386 </p> 3387 </div> 3388 </div> 3389 </div> 3390 </div> 3391 <div class="clearfix"></div> 3392 <div class="index_wrapper"> 3393 <div class="container"> 3394 <div class="hidden-sm hidden-xs col-md-12 sitemap"> 3395 <a id="viewsitemap">SITE INDEX<span><i class="fa fa-fw" aria-hidden="true" title="Copy to use angle-down"></i></span></a> 3396 </div> 3397 <script type="text/javascript"> 3398 $(document).ready(function () { 3399 $("#sitemap").hide(); 3400 $("#viewsitemap").click(function () { 3401 $("#sitemap").slideToggle(); 3402 $(this).addClass("expanded"); 3403 $("html, body").animate({ scrollTop: $(document).height() }, 1000); 3404 3405 3406 }); 3407 }); 3408 3409 </script> 3410 </div> 3411 <div id="sitemap"> 3412 <div class="container"> 3413 @if (GetBoolean("Item.Area.FooterShowSitemap")) 3414 { } 3415 <div class="col-md-12 col-sm-12 col-xs-12"> 3416 <div class="col"> 3417 @GetValue("DwNavigation(footersitemap)") 3418 </div> 3419 <div>&nbsp;</div> 3420 </div> 3421 3422 </div> 3423 </div> 3424 </div> 3425 3426 </footer> 3427 3428 @if (Dynamicweb.Input.FormatBoolean(GetGlobalValue("Global:Extranet.UserName"))) 3429 { 3430 int i = Convert.ToInt32(GetGlobalValue("Global:Extranet.UserID")); 3431 User u = User.GetUserByID(i); 3432 3433 foreach (CustomFieldValue val in u.CustomFieldValues) 3434 { 3435 CustomField field = val.CustomField; 3436 string fieldValue = (val.Value).ToString(); 3437 string ff = field.Name; 3438 if (ff == "AccessUser_Interest") 3439 { 3440 3441 <script> 3442 userInterest='@fieldValue'; 3443 console.log('@fieldValue'); 3444 console.log('@ff'); 3445 console.log(userInterest); 3446 </script> 3447 3448 } 3449 } 3450 } 3451 else 3452 { 3453 <script> 3454 userInterest = ''; 3455 console.log(userInterest); 3456 </script> 3457 } 3458 3459 <!-- Essentials --> 3460 @*<script src="/Files/Templates/Designs/australis/assets/js/jquery.min.js"></script>*@ 3461 <script src="/Files/Templates/Designs/australis/assets/js/modernizr.min.js"></script> 3462 <script src="/Files/Templates/Designs/australis/assets/js/bootstrap.min.js"></script> 3463 <script src="/Files/Templates/Designs/australis/assets/js/jquery.mousewheel.min.js"></script> 3464 <script src="/Files/Templates/Designs/australis/assets/js/jquery.easing.1.3.js"></script> 3465 3466 <!-- Assets --> 3467 <script src="/Files/Templates/Designs/australis/assets/js/bootstrap-hover-dropdown.min.js"></script> 3468 <script src="/Files/Templates/Designs/australis/assets/js/jquery.fancybox.min.js"></script> 3469 <script src="/Files/Templates/Designs/australis/assets/js/spin.min.js"></script> 3470 3471 <!-- Sripts for individual pages, depending on what plug-ins are used --> 3472 <script type="text/javascript" src="/Files/Templates/Designs/australis/assets/js/jasny-bootstrap.min.js"></script> 3473 3474 <!-- Replacing the Home text --> 3475 <script> 3476 3477 </script> 3478 3479 <!-- Initialize Fancybox --> 3480 <script type="text/javascript"> 3481 $("#homelogo").attr("src","@GeneralSettings.Logo.Image"); 3482 function footermenu(){ 3483 var productTypeList=document.getElementById("products").querySelectorAll("#products>ul>li"); 3484 var container=document.getElementById("ftmn1ul"); 3485 3486 for(var i=0;i<productTypeList.length;i++){ 3487 var div = document.createElement('li'); 3488 var atag = document.createElement('a'); 3489 atag.name = "pFootMenu"; 3490 atag.href = productTypeList[i].firstElementChild.href; 3491 var t = document.createTextNode(productTypeList[i].firstElementChild.innerHTML.replace("&amp;", "&")); 3492 atag.appendChild(t); 3493 div.appendChild(atag); 3494 container.appendChild(div); 3495 } 3496 var brandList=document.getElementById("mega").getElementsByClassName("M1")[0].getElementsByTagName("a"); 3497 var container2=document.getElementById("ftmn2ul"); 3498 for(var i=0;i<brandList.length;i++){ 3499 var div = document.createElement('li'); 3500 var atag = document.createElement('a'); 3501 atag.href = brandList[i].href; 3502 atag.name = "bFootMenu"; 3503 var t = document.createTextNode(brandList[i].innerHTML.replace("&amp;", "&")); 3504 atag.appendChild(t); 3505 div.appendChild(atag); 3506 container2.appendChild(div); 3507 } 3508 var otherList=$(document.getElementById("sitemap")).find(".other")[0].getElementsByTagName("a"); 3509 var container3=document.getElementById("ftmn3ul"); 3510 for(var i=0;i<otherList.length;i++){ 3511 var div = document.createElement('li'); 3512 var atag = document.createElement('a'); 3513 atag.innerHTML= otherList[i].innerHTML; 3514 atag.name = "oFootMenu"; 3515 3516 div.appendChild(atag); 3517 container3.appendChild(div); 3518 } 3519 } 3520 footermenu(); 3521 3522 3523 3524 3525 3526 $(document).ready(function () { 3527 $(".fancybox").fancybox(); 3528 3529 }); 3530 3531 var breadcrumb = document.getElementById("breadcrumb"); 3532 if(breadcrumb != null){ 3533 var itag = document.createElement("i"); 3534 itag.setAttribute("class","fa fa-home"); 3535 itag.setAttribute("aria-hidden","true"); 3536 3537 3538 var home = document.createElement("li"); 3539 var linkelement = document.createElement("a"); 3540 linkelement.href = "/"; 3541 var text = document.createTextNode("HOME"); 3542 linkelement.appendChild(itag); 3543 linkelement.appendChild(text); 3544 3545 home.appendChild(linkelement); 3546 breadcrumb.insertBefore(home,breadcrumb.childNodes[0]); 3547 } 3548 function showToggle(id){ 3549 console.log(id+"has shown or hidden"); 3550 if(!($(id).hasClass('showon'))) 3551 {$(id).addClass('showon');} 3552 else{$(id).removeClass('showon');} 3553 } 3554 3555 // var linklist = document.getElementById("products").getElementsByTagName("a"); 3556 //linklist[1].href += "?MainType=MI"; 3557 //linklist[2].href += "?MainType=PA"; 3558 </script> 3559 3560 </div></div></div></div></body> 3561 </html> 3562 <script> 3563 $(document).ready(function () { 3564 3565 $('#menuOn').click(function () {//for mobile menu close 3566 $('#menuOn > .fa-bars').toggleClass('hide'); 3567 $('#menuOn > .fa-times').toggleClass('hide'); 3568 }); 3569 3570 //footer min-height 3571 var innerheight = $(window).innerHeight(); 3572 $(".fullwidth_wrapper").attr('style', 'min-height:' + (innerheight - 223) + 'px'); 3573 3574 $("#myNavmenu .panel-group").attr('style', 'height:' + (innerheight - 58) + 'px;background:#252525'); 3575 3576 document.getElementById("testslick").removeAttribute("style"); 3577 $('.testslick').slick({ 3578 3579 }); 3580 }); 3581 </script> 3582 <style> 3583 .footer .col p { 3584 padding: 5px 0 10px 0; 3585 text-transform: uppercase; 3586 font-size: 12px; 3587 } 3588 </style> 3589