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