Error executing template "Designs/Eldorado/_parsed/fullwidth.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_056db01d0db448169a4441cb93464864.Execute() in D:\dynamicweb.net\Solutions\eldorado.LIVE\Files\Templates\Designs\Eldorado\_parsed\fullwidth.parsed.cshtml:line 215
at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
2 @using System.Text.RegularExpressions
3
4 @using Dynamicweb.Frontend.Devices
5 @using System
6 @using System.Web
7 @using System.Globalization
8 @using System.Text.RegularExpressions
9 @using Dynamicweb.Environment.Helpers
10
11 @using System.Text.RegularExpressions
12 @using System.Web
13
14
15 @functions{
16 public class WrapMethods
17 {
18 //Gets the contrasting color
19 public static string getContrastYIQ(string hexcolor)
20 {
21 if (hexcolor != "")
22 {
23 hexcolor = Regex.Replace(hexcolor, "[^0-9a-zA-Z]+", "");
24
25 int r = Convert.ToByte(hexcolor.Substring(0, 2), 16);
26 int g = Convert.ToByte(hexcolor.Substring(2, 2), 16);
27 int b = Convert.ToByte(hexcolor.Substring(4, 2), 16);
28 int yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;
29
30 if (yiq >= 128)
31 {
32 return "black";
33 }
34 else
35 {
36 return "white";
37 }
38 }
39 else
40 {
41 return "black";
42 }
43 }
44
45
46 //Truncate text
47 public static string Truncate (string value, int count, bool strip=true)
48 {
49 if (strip == true){
50 value = StripHtmlTagByCharArray(value);
51 }
52
53 if (value.Length > count)
54 {
55 value = value.Substring(0, count - 1) + "...";
56 }
57
58 return value;
59 }
60
61
62 //Strip text from HTML
63 public static string StripHtmlTagByCharArray(string htmlString)
64 {
65 char[] array = new char[htmlString.Length];
66 int arrayIndex = 0;
67 bool inside = false;
68
69 for (int i = 0; i < htmlString.Length; i++)
70 {
71 char let = htmlString[i];
72 if (let == '<')
73 {
74 inside = true;
75 continue;
76 }
77 if (let == '>')
78 {
79 inside = false;
80 continue;
81 }
82 if (!inside)
83 {
84 array[arrayIndex] = let;
85 arrayIndex++;
86 }
87 }
88 return new string(array, 0, arrayIndex);
89 }
90
91 //Make the correct count of columns
92 public static string ColumnMaker(int Col, string ScreenSize)
93 {
94 string Columns = "";
95
96 switch (Col)
97 {
98 case 1:
99 Columns = "col-"+ScreenSize+"-12";
100 break;
101
102 case 2:
103 Columns = "col-"+ScreenSize+"-6";
104 break;
105
106 case 3:
107 Columns = "col-"+ScreenSize+"-4";
108 break;
109
110 case 4:
111 Columns = "col-"+ScreenSize+"-3";
112 break;
113
114 default:
115 Columns = "col-"+ScreenSize+"-3";
116 break;
117 }
118
119 return Columns;
120 }
121
122
123 private string Custom(string firstoption, string secondoption)
124 {
125 if (firstoption == "custom")
126 {
127 return secondoption;
128 }
129 else
130 {
131 return firstoption;
132 }
133 }
134 }
135 }
136
137
138
139
140
141 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
142
143 @helper MiniCart()
144 {
145 <div class="dropdown-cart">
146 <span class="cart-items" id="fetched-cart">@Translate("Henter varekurv", "Henter varekurv")</span>
147 <div id="full-cart" style="display:none">
148
149 <div class="col-md-12 col-sm-12 col-xs-12">
150 <div class="" id="minicart-content">
151 <span class="cart-items">@Translate("You have", "You have") <span id="mincart-total-items"></span> @Translate("items in your cart", "items in your cart")</span>
152
153 <table class="table table-cart">
154
155 <tbody>
156
157 @* Orderlines are rendered from the Ajax template *@
158
159 </tbody>
160 <tfoot>
161 <tr>
162 <td><strong>@Translate("Total", "Total")</strong></td>
163 <td class="text-right" id="minicart-totalprice"></td>
164 </tr>
165 </tfoot>
166 </table>
167 </div>
168 </div>
169 <div class="col-md-12 col-sm-12 col-xs-12">
170 <div class="row">
171 <div class="col-md-8">
172 <button class="btn btn-xs btn-secondary pull-left" id="opener">@Translate("Empty cart", "Empty cart")</button>
173 </div>
174 <div class="col-md-4">
175 @{
176 var cartid = GetPageIdByNavigationTag("cart");
177 }
178
179 <a href="Default.aspx?ID=@cartid" class="btn btn-xs btn-primary pull-right">@Translate("Proceed to checkout", "Proceed to checkout")</a>
180 <span class="clearfix"></span>
181 </div>
182 </div>
183 <div class="row"> </div>
184 </div>
185 </div>
186
187 <span class="cart-items" id="empty-cart" style="display:none">@Translate("Your shopping cart is empty", "Your shopping cart is empty")</span>
188
189 </div>
190 }
191
192 @{
193 Regex r = new Regex(@"\d+");
194 string ordersPageId = r.Match(Pageview.Area.Item["OrdersPageId"].ToString()).Value;
195 string productsPageId = r.Match(Pageview.Area.Item["ProductsPageId"].ToString()).Value;
196 string signInPageId = r.Match(Pageview.Area.Item["SignInPageId"].ToString()).Value;
197 string signUpPageId = r.Match(Pageview.Area.Item["SignUpPageId"].ToString()).Value;
198 string userProfilePageId = r.Match(Pageview.Area.Item["UserProfilePageId"].ToString()).Value;
199 string productsAjaxPageId = r.Match(Pageview.Area.Item["ProductsAjaxPageId"].ToString()).Value;
200 string JSONFeedForCart = r.Match(Pageview.Area.Item["JSONFeedForCart"].ToString()).Value;
201 var QuickJSONFeedForCart = GetPageIdByNavigationTag("quickbuyjsoncart").ToString();
202 string ImpersonationPageId = r.Match(Pageview.Area.Item["ImpersonationPageId"].ToString()).Value;
203 string HomePetId = r.Match(Pageview.Area.Item["HomePetId"].ToString()).Value;
204 string HomeRidingId = r.Match(Pageview.Area.Item["HomeRidingId"].ToString()).Value;
205 string HomePetRidingId = r.Match(Pageview.Area.Item["HomePetRidingId"].ToString()).Value;
206 string checkuserpageid = r.Match(Pageview.Area.Item["CheckUserPageId"].ToString()).Value;
207 string newsletterid = "0";
208 string GTMID = Pageview.Area.Item["GTM_ID"].ToString();
209 string quickbuyplaceholder = Translate("Product Number");
210 if (GetBoolean("Item.Area.ShowNewsletterPopup"))
211 {
212 newsletterid = GetString("Item.Area.NewsletterSignupParagraphId");
213 }
214
215 string ShutDownLink = Pageview.Area.Item["ShutDownLink"].ToString();
216 }
217
218 <!DOCTYPE html>
219 <html>
220 <head>
221 <meta charset="utf-8">
222 <title>@GetValue("Title")</title>
223 @GetValue("MetaTags")
224 @GetValue("CopyRightNotice")
225
226
227 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
228 <meta name="robots" content="index, follow">
229
230 @{
231 string MetaDescription = GetString("Meta.Description");
232 string MetaKeywords = GetString("Meta.Keywords");
233 }
234
235
236
237 @if (!string.IsNullOrWhiteSpace(GTMID))
238 {
239 <!-- Google Tag Manager -->
240 <script>
241 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
242 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
243 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
244 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
245 })(window,document,'script','dataLayer','@GTMID');</script>
246 <!-- End Google Tag Manager -->
247 }
248
249 <!-- Facebook Admin -->
250 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.FacebookCommendAdmin")))
251 {
252 string fbadmin = GetString("Item.Area.FacebookCommendAdmin");
253 <meta property="fb:admins" content="@fbadmin">
254 }
255
256 <!-- Essential styles -->
257 <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" type="text/css">
258 <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css">
259 <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css" media="screen">
260 <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/flag-icon-css/2.5.0/css/flag-icon.min.css" type="text/css">
261 <link href="https://fonts.googleapis.com/css?family=Oswald" rel="stylesheet">
262 <link href="/Files/Templates/Designs/Eldorado/css/lightslider.min.css" rel="stylesheet">
263 <!-- Mobile menu styles -->
264 <link href="/Files/Templates/Designs/Eldorado/css/jasny-bootstrap.min.css" rel="stylesheet" type="text/css" media="screen">
265
266 <!-- Favicon -->
267 @{
268 var favicon = @GetString("Item.Area.Favicon");
269 }
270 <link href="@favicon" rel="icon" type="image/png">
271
272 <!-- Variables -->
273 @{
274 var attrValue = "";
275 string currentpageid = GetString("DwPageID");
276 string firstpageid = GetString("DwAreaFirstActivePageID");
277 string favListpageId = GetString("Item.Area.FavoritesPageId");
278 string searchplaceholder = Translate("Search products", "Search products");
279 string searchpage = GetString("Item.Area.ShowSearchPage");
280
281 var cartid = GetPageIdByNavigationTag("cart").ToString();
282
283
284 DateTime areaUpdated = (DateTime)Pageview.Area.Audit.LastModifiedAt;
285 string cssPath = HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.min.css");
286 DateTime lastWriteTime = System.IO.File.GetLastWriteTime(cssPath);
287 bool writeCss = false;
288 string css = String.Empty;
289 if (areaUpdated > lastWriteTime)
290 {
291 writeCss = true;
292 }
293
294 string bgbuttonnews = GetString("Item.Area.BackgroundColorButtonSignup");
295 string colorbuttonnews = GetString("Item.Area.ColorTextOnButtonSignupNewsletter");
296 string bgwrapnews = GetString("Item.Area.BackgroundColorSignUp");
297 string colorwrapnews = GetString("Item.Area.ColorTextOnButtonSignupContainerNewsletter");
298 string colorbtnnbox = GetString("Item.Area.ColorTextButtonInsidePopupBox");
299 string bgbtnnbox = GetString("Item.Area.BackgroundButtonInsidePopupBox");
300
301
302 }
303 @if (GetString("DW_extranet_Groups").Contains("6828"))
304 {
305 firstpageid = HomePetId;
306 }
307 @if (GetString("DW_extranet_Groups").Contains("6829"))
308 {
309 firstpageid = HomeRidingId;
310 }
311 @if (GetString("DW_extranet_Groups").Contains("6830"))
312 {
313 firstpageid = HomePetRidingId;
314 }
315 <!--FONT SETTINGS-->
316 @functions{
317 public class FontSettings
318 {
319 public class Logo
320 {
321 public static string FontFamily { get; set; }
322 public static string FontSize { get; set; }
323 public static string FontWeight { get; set; }
324 public static string Color { get; set; }
325 public static string LineHeight { get; set; }
326 public static string Casing { get; set; }
327 public static string LetterSpacing { get; set; }
328 }
329
330 public class Slogan
331 {
332 public static string FontFamily { get; set; }
333 public static string FontSize { get; set; }
334 public static string FontWeight { get; set; }
335 public static string Color { get; set; }
336 public static string LineHeight { get; set; }
337 public static string Casing { get; set; }
338 public static string LetterSpacing { get; set; }
339 }
340
341 public class H1
342 {
343 public static string FontFamily { get; set; }
344 public static string FontSize { get; set; }
345 public static string FontWeight { get; set; }
346 public static string Color { get; set; }
347 public static string LineHeight { get; set; }
348 public static string Casing { get; set; }
349 public static string LetterSpacing { get; set; }
350 }
351
352 public class H2
353 {
354 public static string FontFamily { get; set; }
355 public static string FontSize { get; set; }
356 public static string FontWeight { get; set; }
357 public static string Color { get; set; }
358 public static string LineHeight { get; set; }
359 public static string Casing { get; set; }
360 public static string LetterSpacing { get; set; }
361 }
362
363 public class Body
364 {
365 public static string FontFamily { get; set; }
366 public static string FontSize { get; set; }
367 public static string FontWeight { get; set; }
368 public static string Color { get; set; }
369 public static string LineHeight { get; set; }
370 public static string Casing { get; set; }
371 public static string LetterSpacing { get; set; }
372 }
373 }
374
375 private void InitFontSettings()
376 {
377 //LOGO
378 FontSettings.Logo.FontFamily = CustomFont(GetString("Item.Area.LogoFont.Font"), GetString("Item.Area.LogoFont.CustomFont"));
379 FontSettings.Logo.FontSize = GetString("Item.Area.LogoFont.Size")+"px";
380 FontSettings.Logo.FontWeight = CheckExistence(GetString("Item.Area.LogoFont.Weight"), "normal");
381 FontSettings.Logo.LineHeight = CheckExistence(GetString("Item.Area.LogoFont.LineHeight"), "1");
382 FontSettings.Logo.LetterSpacing = GetString("Item.Area.LogoFont.LetterSpacing") + "px";
383 FontSettings.Logo.Casing = GetString("Item.Area.LogoFont.Casing");
384 FontSettings.Logo.Color = GetString("Item.Area.LogoFont.Color.Color");
385
386
387 //SLOGAN
388 FontSettings.Slogan.FontFamily = CustomFont(GetString("Item.Area.LogoSloganFont.Font"), GetString("Item.Area.LogoSloganFont.CustomFont"));
389 FontSettings.Slogan.FontSize = GetString("Item.Area.LogoSloganFont.Size")+"px";
390 FontSettings.Slogan.FontWeight = CheckExistence(GetString("Item.Area.LogoSloganFont.Weight"), "normal");
391 FontSettings.Slogan.LineHeight = CheckExistence(GetString("Item.Area.LogoSloganFont.LineHeight"), "1");
392 FontSettings.Slogan.LetterSpacing = GetString("Item.Area.LogoSloganFont.LetterSpacing") + "px";
393 FontSettings.Slogan.Casing = GetString("Item.Area.LogoSloganFont.Casing");
394 FontSettings.Slogan.Color = GetString("Item.Area.LogoSloganFont.Color.Color");
395
396
397 //HEADINGS
398 FontSettings.H1.FontFamily = CustomFont(GetString("Item.Area.HeadingsH1.Font"), GetString("Item.Area.HeadingsH1.CustomFont"));
399 FontSettings.H1.FontSize = GetString("Item.Area.HeadingsH1.Size")+"px";
400 FontSettings.H1.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH1.Weight"), "normal");
401 FontSettings.H1.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH1.LineHeight"), "1");
402 FontSettings.H1.LetterSpacing = GetString("Item.Area.HeadingsH1.LetterSpacing") + "px";
403 FontSettings.H1.Casing = GetString("Item.Area.HeadingsH1.Casing");
404 FontSettings.H1.Color = GetString("Item.Area.HeadingsH1.Color.Color");
405
406 FontSettings.H2.FontFamily = CustomFont(GetString("Item.Area.HeadingsH2.Font"), GetString("Item.Area.HeadingsH2.CustomFont"));
407 FontSettings.H2.FontSize = GetString("Item.Area.HeadingsH2.Size")+"px";
408 FontSettings.H2.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH2.Weight"), "normal");
409 FontSettings.H2.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH2.LineHeight"), "1");
410 FontSettings.H2.LetterSpacing = GetString("Item.Area.HeadingsH2.LetterSpacing") + "px";
411 FontSettings.H2.Casing = GetString("Item.Area.HeadingsH2.Casing");
412 FontSettings.H2.Color = GetString("Item.Area.HeadingsH2.Color.Color");
413
414
415 //BODY
416 FontSettings.Body.FontFamily = CustomFont(GetString("Item.Area.BodyFont.Font"), GetString("Item.Area.BodyFont.CustomFont"));
417 FontSettings.Body.FontSize = GetString("Item.Area.BodyFont.Size") + "px";
418 FontSettings.Body.FontWeight = CheckExistence(GetString("Item.Area.BodyFont.Weight"), "normal");
419 FontSettings.Body.LineHeight = CheckExistence(GetString("Item.Area.BodyFont.LineHeight"), "1");
420 FontSettings.Body.LetterSpacing = GetString("Item.Area.BodyFont.LetterSpacing") + "px";
421 FontSettings.Body.Casing = GetString("Item.Area.BodyFont.Casing");
422 FontSettings.Body.Color = GetString("Item.Area.BodyFont.Color.Color");
423
424
425 gfonts.Add(FontSettings.Logo.FontFamily, "");
426
427 if (!gfonts.ContainsKey(FontSettings.Slogan.FontFamily))
428 {
429 gfonts.Add(FontSettings.Slogan.FontFamily, "");
430 }
431 if (!gfonts.ContainsKey(FontSettings.H1.FontFamily))
432 {
433 gfonts.Add(FontSettings.H1.FontFamily, "");
434 }
435 if (!gfonts.ContainsKey(FontSettings.H2.FontFamily))
436 {
437 gfonts.Add(FontSettings.H2.FontFamily, "");
438 }
439 if (!gfonts.ContainsKey(FontSettings.Body.FontFamily))
440 {
441 gfonts.Add(FontSettings.Body.FontFamily, "");
442 }
443
444 }
445
446 private string CustomFont (string firstfont, string secondfont)
447 {
448 if (firstfont == "custom")
449 {
450 return secondfont;
451 }
452 else
453 {
454 return firstfont;
455 }
456 }
457
458 private string CheckExistence (string stringitem, string defaultvalue)
459 {
460 if (!string.IsNullOrWhiteSpace(stringitem)) {
461 return stringitem;
462 } else {
463 return defaultvalue;
464 }
465 }
466
467 private System.Collections.Generic.Dictionary<string, object> gfonts = new System.Collections.Generic.Dictionary<string, object>();
468 }
469
470 @{
471 InitFontSettings();
472 }
473
474 @helper GoogleFonts()
475 {
476 if (gfonts != null)
477 {
478 foreach (var item in gfonts)
479 {
480 string fontName = @item.Key.Replace(" ", "+");
481 <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=@fontName:100,200,300,400,500,600,700,800,900">
482 }
483 }
484 }
485
486 @functions{
487 public string FontStylesCSS()
488 {
489 string CssString = @"
490 .dw-logotext {
491 font-family: " + FontSettings.Logo.FontFamily + @";
492 font-size: " + FontSettings.Logo.FontSize + @";
493 font-weight: " + FontSettings.Logo.FontWeight + @";
494 line-height: " + FontSettings.Logo.LineHeight + @" !important;
495 letter-spacing: " + FontSettings.Logo.LetterSpacing + @";
496 text-transform: " + FontSettings.Logo.Casing + @";
497 color: " + FontSettings.Logo.Color + @";
498 }
499
500 .dw-slogantext {
501 font-family: " + FontSettings.Slogan.FontFamily + @";
502 font-size: " + FontSettings.Slogan.FontSize + @";
503 font-weight: " + FontSettings.Slogan.FontWeight + @";
504 line-height: " + FontSettings.Slogan.LineHeight + @" !important;
505 letter-spacing: " + FontSettings.Slogan.LetterSpacing + @";
506 text-transform: " + FontSettings.Slogan.Casing + @";
507 color: " + FontSettings.Slogan.Color + @";
508 }
509
510 h1 {
511 font-family: " + FontSettings.H1.FontFamily + @" !important;
512 font-size: " + FontSettings.H1.FontSize + @";
513 color: " + FontSettings.H1.Color + @";
514 line-height: " + FontSettings.H1.LineHeight + @" !important;
515 text-transform: " + FontSettings.H1.Casing + @";
516 font-weight: " + FontSettings.H1.FontWeight + @";
517 letter-spacing: " + FontSettings.H1.LetterSpacing + @" !important;
518 }
519
520
521 h2, h3, h4, h5, h6 {
522 margin-top: 0.7em;
523 margin-bottom: 0.7em;
524
525 font-family: " + FontSettings.H2.FontFamily + @" !important;
526 font-size: " + FontSettings.H2.FontSize + @";
527 color: " + FontSettings.H2.Color + @";
528 line-height: " + FontSettings.H2.LineHeight + @";
529 text-transform: " + FontSettings.H2.Casing + @" !important;
530 font-weight: " + FontSettings.H2.FontWeight + @" !important;
531 letter-spacing: " + FontSettings.H2.LetterSpacing + @" !important;
532 }
533
534 h4, h5, h6 {
535 font-size: 16px !important;
536 }
537
538 body {
539 font-family: " + FontSettings.Body.FontFamily + @" !important;
540 font-size: " + FontSettings.Body.FontSize + @";
541 color: " + FontSettings.Body.Color + @";
542 line-height: " + FontSettings.Body.LineHeight + @" !important;
543 text-transform: " + FontSettings.Body.Casing + @";
544 font-weight: " + FontSettings.Body.FontWeight + @";
545 letter-spacing: " + FontSettings.Body.LetterSpacing + @" !important;
546 }
547
548 .navbar-wp .navbar-nav > li > a {
549 font-family: " + FontSettings.Body.FontFamily + @" !important;
550 }
551
552 .section-title {
553 margin-top: 0;
554 margin-bottom: 0.7em;
555 }
556 ";
557 return CssString;
558 }
559 }
560 @GoogleFonts()
561
562 <!-- GENERAL/COLOR SETTINGS -->
563 @functions{
564 public class ColorSettings
565 {
566 public class Color
567 {
568 public static string Primary { get; set; }
569 public static string Secondary { get; set; }
570 public static string NavbarFont { get; set; }
571
572
573 public static string Header { get; set; }
574
575 public static string Footer { get; set; }
576 public static string FooterFont { get; set; }
577
578 public static string Sticker { get; set; }
579 public static string Price { get; set; }
580 public static string Cart { get; set; }
581 }
582 }
583
584 private void InitColorSettings()
585 {
586 ColorSettings.Color.Primary = GetString("Item.Area.ColorsPrimary.Color");
587 ColorSettings.Color.Secondary = GetString("Item.Area.ColorsSecondary.Color");
588
589 ColorSettings.Color.NavbarFont = GetString("Item.Area.NavbarFontColor");
590
591 if (string.IsNullOrWhiteSpace(ColorSettings.Color.NavbarFont))
592 {
593 ColorSettings.Color.NavbarFont = WrapMethods.getContrastYIQ(ColorSettings.Color.Secondary);
594 }
595
596 ColorSettings.Color.Header = GetString("Item.Area.ColorsHeaderColor.Color");
597
598 ColorSettings.Color.Footer = GetString("Item.Area.ColorsFooterColor.Color");
599 ColorSettings.Color.FooterFont = WrapMethods.getContrastYIQ(ColorSettings.Color.Footer);
600
601 ColorSettings.Color.Price = GetString("Item.Area.EcommercePriceColor.Color");
602 ColorSettings.Color.Sticker = GetString("Item.Area.EcommerceDiscountStickerColor.Color");
603 ColorSettings.Color.Cart = GetString("Item.Area.EcommerceCartButtonColor.Color");
604 }
605
606 public string GetColorSettings()
607 {
608 string CssString = @"
609 .top-header-service {
610 background-color: @Header !important;
611 }
612
613
614 a:hover, a:focus, a:active {
615 color: @Primary;
616 }
617
618 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a {
619 color: @NavbarFont;
620 }
621 ul.dw-categories li > a {
622 display: block;
623 padding: 7px 15px;
624 color: @NavbarFont;
625 }
626 ul.M3 li > a {
627
628 }
629 .navbar-wp .navbar-nav > li > a span::after, .navbar-wp .navbar-nav > div > a.dropdown-toggle span::after {
630 background-color:@Primary !important;
631 }
632 ul.dw-categories li:hover > a {
633 color: inherit;
634 }
635 ul.dw-categories li:hover > a:hover {
636 color: inherit;
637 }
638 .navbar-wp .navbar-nav > .active > a, .navbar-wp .navbar-nav > .active > a:hover, .navbar-wp .navbar-nav > .active > a:focus {
639 color: @NavbarFont;
640 }
641
642 .navbar-wp .navbar-nav > li > a:hover, .navbar-wp .navbar-nav > li > a:focus {
643 border-top: 0px solid @Secondary;
644 color: @NavbarFont;
645 }
646
647 .navbar-wp .navbar-nav > li > a span:after, .navbar-wp .navbar-nav > div > a.dropdown-toggle span:after{
648 background-color: @NavbarFont;
649 }
650
651 .navbar-wp .megamenu > li:hover > a {
652 color: @Primary !important;
653 }
654
655 .btn-dw-primary {
656 color: #FFF;
657 background-color: @Primary;
658 border-color: @Primary;
659 }
660
661 .btn-dw-secondary {
662 color: @NavbarFont;
663 background-color: @Secondary;
664 border-color: @Secondary;
665 }
666
667 .btn-dw-cart {
668 color: #FFF;
669 background-color: @Cart;
670 border-color: @Cart;
671 }
672
673 .dw-section-title {
674 border-color: @Secondary;
675 }
676
677 .dw-minicart-update {
678 color: #FFF !important;
679 background-color: @Primary;
680 transition: all 0.3s ease-in-out 0s;
681 }
682
683 .pagination > li > a, .pagination > li > a:hover, .pagination > li > a:focus, .pagination > li > a:active {
684 color: @Primary !important;
685 }
686
687 .form-control:hover, .form-control:focus, .form-control:active, .pagination > .active > a {
688 border-color: @Primary !important;
689 }
690
691 .bg-2 {
692 background: @Primary !important;
693 }
694
695 .blockquote-1:hover {
696 border-color: @Primary !important;
697 }
698
699 .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 {
700 color: @Primary;
701 }
702
703 .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 {
704 color: @Primary;
705 }
706
707 .navbar-wp .navbar-nav > li > a:hover, .navbar-wp .navbar-nav > li > a:focus {
708 border: 0px solid @Primary;
709 }
710
711 .navbar-wp .navbar-toggle:hover, .navbar-wp .navbar-toggle:focus {
712 background-color: @Primary !important;
713 border-color: @Primary !important;
714 }
715
716 .navbar-wp .dropdown-menu {
717 border-top: 1px solid @Primary !important;
718 border-bottom: 3px solid @Primary !important;
719 }
720
721 .navbar-wp .dropdown-menu > li > a:hover {
722 text-decoration:underline;
723 }
724
725 .navbar-wp .dropdown-menu .active {
726 background: @Primary !important;
727 color: #fff;
728 }
729
730 .navbar-wp.navbar-contrasted .dropdown-menu > li > a:hover {
731 background: @Primary !important;
732 }
733
734 .nav > ul > li > a:hover {
735 color: @Primary;
736 }
737
738 .lw .w-box.w-box-inverse .thmb-img i {
739 color: @Primary !important;
740 }
741
742 .w-box.w-box-inverse .thmb-img:hover i {
743 background: @Primary !important;
744 }
745
746 .c-box {
747 border: 1px solid @Primary !important;
748 }
749
750 .c-box .c-box-header {
751 background: @Primary !important;
752 }
753
754 .w-section .aside-feature:hover .icon-feature, .w-section .aside-feature:hover h4 {
755 color: @Primary !important;
756 }
757
758 .layer-slider-wrapper .title.title-base {
759 background: @Primary !important;
760 }
761
762 .layer-slider-wrapper .subtitle {
763 color: @Primary !important;
764 }
765
766 .layer-slider-wrapper .list-item {
767 color: @Primary !important;
768 }
769
770 .box-element.box-element-bordered {
771 border: 1px solid @Primary !important;
772 }
773
774 .carousel-2 .carousel-indicators .active {
775 background-color: @Primary !important;
776 }
777
778 .carousel-2 .carousel-nav a {
779 color: @Primary !important;
780 }
781
782 .carousel-2 .carousel-nav a:hover {
783 background: @Primary !important;
784 }
785
786 .carousel-3 .carousel-nav a {
787 color: @Primary !important;
788 }
789
790 .carousel-3 .carousel-nav a:hover {
791 background: @Primary !important;
792 }
793
794 .like-button .button.liked i {
795 color: @Primary !important;
796 }
797
798 ul.list-listings li.featured {
799 border-color: @Primary !important;
800 }
801
802 ul.list-check li i {
803 color: @Primary !important;
804 }
805
806 ul.dw-categories li a:hover, ul.dw-categories a:focus, ul.dw-categories a:active{
807 color: @NavbarFont;
808 background-color: @Primary;
809 border-color: @Primary;
810 }
811
812 ul.categories li a:hover, ul.categories a:focus, ul.categories a:active{
813 color: @NavbarFont;
814 background-color: @Primary;
815 border-color: @Primary;
816 }
817
818 .timeline .event:nth-child(2n):before {
819 background-color: @Primary !important;
820 }
821
822 .timeline .event:nth-child(2n-1):before {
823 background-color: @Primary !important;
824 }
825
826 #toTopHover {
827 background-color: @Primary !important;
828 }
829
830 .tags-list li {
831 border: 1px solid @Primary !important;
832 color: @Primary !important;
833 }
834
835 .tags-list li:hover,
836 a.open-panel {
837 background-color: @Primary !important;
838 }
839
840 .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus,
841 .panel-group .panel-heading a i,
842 .tags-list li a {
843 color: @NavbarFont !important;
844 }
845
846 .nav-pills > li > a:hover, .nav-pills > li > a:focus {
847 color: @NavbarFont !important;
848 background: none repeat scroll 0% 0% @Secondary !important;
849 }
850
851 footer {
852 background: @Footer !important;
853 }
854
855 footer h4 {
856 color: @FooterFont !important;
857 }
858
859 footer a {
860 color: @FooterFont !important;
861 }
862
863 footer a:hover, footer a:focus, footer a:active {
864 color: @Primary !important;
865 }
866
867 footer p {
868 color: @FooterFont !important;
869 }
870
871 footer ul > li {
872 color: @FooterFont !important;
873 }
874
875 footer hr {
876 border-color: @FooterFont
877 }
878
879
880 /* Button colors */
881 .btn-base {
882 color: @NavbarFont !important;
883 background-color: @Secondary !important;
884 border: 1px solid @Secondary !important;
885 }
886
887 .btn-base:before {
888 background-color: @Secondary !important;
889 }
890
891 .btn-base:hover:before, .btn-base:focus:before, .btn-base:active:before {
892 color: @NavbarFont !important;
893 background-color: @Primary !important;
894 border-color: @Primary !important;
895 }
896
897 .btn-icon:before {
898 transition: none !important;
899 }
900
901 .btn-base:hover, .btn-base:focus, .btn-base:active, .btn-base.active, .open .dropdown-toggle.btn-base {
902 color: @NavbarFont !important;
903 background-color: @Primary !important;
904 border-color: @Primary !important;
905 }
906
907 .btn-primary {
908 background-color: @Primary !important;
909 border-color: @Primary !important;
910 }
911
912 .open .dropdown-toggle.btn-primary {
913 background-color: @Primary !important;
914 border-color: @Primary !important;
915 }
916
917 /* Dropdown-menu */
918 .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus {
919 background: @Primary !important;
920 color: #fff !important;
921 }
922
923 /* Ecom settings */
924 .ribbon.base, .ball {
925 background: @Sticker !important;
926 color: #fff;
927 border-right: 5px solid @Sticker !important;
928 }
929
930 .ribbon.base:before {
931 border-top: 27px solid @Sticker !important;
932 }
933
934 .ribbon.base:after {
935 border-bottom: 27px solid @Sticker !important;
936 }
937
938 .price {
939 color: @Price !important;
940 }
941
942 .discount-sticker {
943 background-color: @Sticker !important;
944 }
945
946 .bs-callout-primary {
947 border-left-color: @Primary !important;
948 }
949
950 .ratings .fa-star {
951 color: @Secondary !important;
952 }
953
954 .feature-label {
955 color: @Secondary !important;
956 }";
957
958 return ParseCSSToString(CssString);
959 }
960
961 private string ParseCSSToString(string TheString)
962 {
963 TheString = TheString.Replace("@Primary", ColorSettings.Color.Primary);
964 TheString = TheString.Replace("@Secondary", ColorSettings.Color.Secondary);
965 TheString = TheString.Replace("@NavbarFont", ColorSettings.Color.NavbarFont);
966 TheString = TheString.Replace("@FooterFont", ColorSettings.Color.FooterFont);
967 TheString = TheString.Replace("@Footer", ColorSettings.Color.Footer);
968
969 TheString = TheString.Replace("@Header", ColorSettings.Color.Header);
970
971 TheString = TheString.Replace("@Sticker", ColorSettings.Color.Sticker);
972 TheString = TheString.Replace("@Price", ColorSettings.Color.Price);
973 TheString = TheString.Replace("@Cart", ColorSettings.Color.Cart);
974
975
976 System.Text.StringBuilder sb = new System.Text.StringBuilder();
977
978 foreach(var item in TheString.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries))
979 {
980 sb.AppendLine(item);
981 }
982
983 return sb.ToString();
984 }
985 }
986
987 @{
988 InitColorSettings();
989 }
990
991
992
993 @using System.Drawing
994 @using System.Net
995
996
997 @functions{
998 public class GeneralSettings
999 {
1000
1001 public class Header
1002 {
1003 public static string Mode { get; set; }
1004 public static string Classes { get; set; }
1005 public static bool Show { get; set; }
1006 public static string Background { get; set; }
1007 public static bool ShowFrontpageImage { get; set; }
1008 }
1009
1010 public class Logo
1011 {
1012 public static string Image { get; set; }
1013 public static string ContrastImage { get; set; }
1014 public static string Text { get; set; }
1015 public static string Slogan { get; set; }
1016 public static string SecondaryColor { get; set; }
1017 }
1018
1019 public class Navigation
1020 {
1021 public static string Position { get; set; }
1022 public static bool IsMegamenu { get; set; }
1023 public static string InvertedPosition { get; set; }
1024 public static string StickyMenu { get; set; }
1025 public static string SelectionMode { get; set; }
1026 public static string SelectionStyle { get; set; }
1027 public static int SelectionWeight { get; set; }
1028 public static bool Case { get; set; }
1029
1030 public static string BreadcrumbMode { get; set; }
1031 public static string BreadcrumbAlign { get; set; }
1032
1033 public static string LeftmenuMode { get; set; }
1034
1035 public static string ButtonDesign { get; set; }
1036 }
1037
1038 public class Headings
1039 {
1040 public static string Mode { get; set; }
1041 }
1042
1043 public class Background
1044 {
1045 public static string Color { get; set; }
1046 public static string Image { get; set; }
1047 public static string CustomImage { get; set; }
1048 public static bool GradientColor { get; set; }
1049 public static string GradientPercentage { get; set; }
1050 public static string Style { get; set; }
1051 public static string Position { get; set; }
1052 }
1053
1054 public class Site
1055 {
1056 public static bool Shadow { get; set; }
1057 public static string LayoutMode { get; set; }
1058 }
1059
1060 public class Images
1061 {
1062 public static bool RoundCorners { get; set; }
1063 }
1064
1065 public class Ecommerce
1066 {
1067 public static string EcomListDesign { get; set; }
1068 public static string EcomCardDesign { get; set; }
1069 }
1070 }
1071
1072 private void InitGeneralSettings()
1073 {
1074 //Header settings
1075 GeneralSettings.Header.Mode = GetString("Item.Area.HeaderLayoutMode");
1076 GeneralSettings.Header.Show = GetBoolean("Item.Area.HeaderShow");
1077 GeneralSettings.Header.Background = GetString("Item.Area.NavigationNavbarBackground");
1078 GeneralSettings.Header.ShowFrontpageImage = GetBoolean("Item.Area.HeaderFrontpageImage");
1079
1080 if (GeneralSettings.Header.Mode == "solid"){
1081 GeneralSettings.Header.Classes = "";
1082 }
1083
1084 if (GeneralSettings.Header.Mode == "cover" || GeneralSettings.Header.Mode == "mobile"){
1085 GeneralSettings.Header.Classes = "header-alpha header-cover";
1086 }
1087
1088
1089 //Logo settings
1090 GeneralSettings.Logo.Image = GetString("Item.Area.GeneralLogo");
1091 GeneralSettings.Logo.Text = GetString("Item.Area.GeneralLogoText");
1092 GeneralSettings.Logo.Slogan = GetString("Item.Area.LogoSlogan");
1093 GeneralSettings.Logo.SecondaryColor = GetString("Item.Area.LogoSecondColor.Color");
1094
1095 if (!string.IsNullOrWhiteSpace(GetString("Item.Area.LogoContrastImage"))) {
1096 GeneralSettings.Logo.ContrastImage = GetString("Item.Area.LogoContrastImage");
1097 } else {
1098 GeneralSettings.Logo.ContrastImage = GetString("Item.Area.GeneralLogo");
1099 }
1100
1101
1102 //Navigation settings
1103 GeneralSettings.Navigation.Position = GetString("Item.Area.NavigationPosition");
1104 GeneralSettings.Navigation.StickyMenu = "off";
1105 GeneralSettings.Navigation.IsMegamenu = GetBoolean("Item.Area.IsMegamenu");
1106
1107 if (GetBoolean("Item.Area.NavigationSticky")) {
1108 if (GeneralSettings.Header.Show)
1109 {
1110 if (GeneralSettings.Header.Mode == "cover")
1111 {
1112 GeneralSettings.Navigation.StickyMenu = "44"; //"data-spy=\"affix\" data-offset-top=\"44\" data-offset-bottom=\"300\"";
1113 }
1114 else
1115 {
1116 int offset = ImageHeight()+28;
1117
1118 GeneralSettings.Navigation.StickyMenu = offset.ToString(); // "data-spy=\"affix\" data-offset-top=\"" + offset.ToString() + "\" data-offset-bottom=\"300\"";
1119 }
1120 }
1121 else
1122 {
1123 GeneralSettings.Navigation.StickyMenu = "5"; // "data-spy=\"affix\" data-offset-top=\"5\" data-offset-bottom=\"300\"";
1124 }
1125 }
1126
1127 if (GeneralSettings.Navigation.Position == "left") {
1128 GeneralSettings.Navigation.InvertedPosition = "right";
1129 }
1130 else
1131 {
1132 GeneralSettings.Navigation.InvertedPosition = "left";
1133 }
1134
1135 GeneralSettings.Navigation.SelectionMode = GetString("Item.Area.NavigationSelectionMode");
1136 GeneralSettings.Navigation.SelectionStyle = "";
1137 GeneralSettings.Navigation.SelectionWeight = GetInteger("Item.Area.SelectionWeight");
1138
1139 if (GeneralSettings.Navigation.SelectionMode == "arrow") {
1140 GeneralSettings.Navigation.SelectionStyle = "navbar-arrow";
1141 }
1142
1143 GeneralSettings.Navigation.Case = GetBoolean("Item.Area.NavigationUppercase");
1144
1145 GeneralSettings.Navigation.BreadcrumbMode = GetString("Item.Area.NavigationBreadcrumbLayout");
1146 GeneralSettings.Navigation.BreadcrumbAlign = GetString("Item.Area.NavigationBreadcrumbAlign");
1147
1148 GeneralSettings.Navigation.LeftmenuMode = GetString("Item.Area.NavigationLeftNavigationMode");
1149
1150 GeneralSettings.Navigation.ButtonDesign = GetString("Item.Area.NavigationButtonDesign");
1151
1152
1153 //Background settings
1154 GeneralSettings.Background.Image = GetString("Item.Area.BackgroundImage.Image.Image");
1155 GeneralSettings.Background.CustomImage = GetString("Item.Area.BackgroundImage.Image.CustomImage");
1156 GeneralSettings.Background.Color = GetString("Item.Area.BackgroundImage.Color.Color");
1157 GeneralSettings.Background.GradientColor = GetBoolean("Item.Area.BackroundGradientColor");
1158 GeneralSettings.Background.GradientPercentage = GetString("Item.Area.GradientPercentage");
1159
1160
1161 if (@GetString("Item.Area.BackgroundFixed") == "True")
1162 {
1163 GeneralSettings.Background.Position = "fixed";
1164 }
1165 else
1166 {
1167 GeneralSettings.Background.Position = "";
1168 }
1169
1170
1171 if (GeneralSettings.Background.Image == "none")
1172 {
1173 GeneralSettings.Background.Style = "";
1174 }
1175 else if (GeneralSettings.Background.Image == "custom")
1176 {
1177 if (!string.IsNullOrWhiteSpace(GeneralSettings.Background.CustomImage))
1178 {
1179 GeneralSettings.Background.Style = "background: url('/Admin/Public/GetImage.ashx?width=1920&Crop=1&Compression=75&image=" + GeneralSettings.Background.CustomImage + "') " + GeneralSettings.Background.Position + " !important; ";
1180 }
1181 }
1182 else
1183 {
1184 GeneralSettings.Background.Style = "background: url('/Admin/Public/GetImage.ashx?width=1920&Crop=1&Compression=75&image=/Files/Templates/Designs/Dwsimple/images/background/" + GeneralSettings.Background.Image + "') " + GeneralSettings.Background.Position + " !important; ";
1185 }
1186
1187
1188 //Headings settings
1189 GeneralSettings.Headings.Mode = GetString("Item.Area.AdvHeadingsMode");
1190
1191
1192 //Site settings
1193 GeneralSettings.Site.Shadow = GetBoolean("Item.Area.BackgroundSiteShadow");
1194 GeneralSettings.Site.LayoutMode = GetString("Item.Area.LayoutMode");
1195
1196 if (GeneralSettings.Site.LayoutMode == "boxed"){
1197 GeneralSettings.Site.LayoutMode = "body-" + GeneralSettings.Site.LayoutMode;
1198 GeneralSettings.Header.Classes += " header-boxed";
1199 }
1200
1201
1202 //Image settings
1203 GeneralSettings.Images.RoundCorners = GetBoolean("Item.Area.LayoutRoundCorners");
1204
1205 //Ecommerce settings
1206 GeneralSettings.Ecommerce.EcomListDesign = GetString("Item.Area.EcommerceProductCardDesign");
1207 GeneralSettings.Ecommerce.EcomCardDesign = GetString("Item.Area.EcommerceProductCardDesign");
1208 }
1209
1210 public string GetGeneralCSS()
1211 {
1212 string CssString = "";
1213 int SelectionWeight = GeneralSettings.Navigation.SelectionWeight;
1214
1215 //Site settings
1216 if (GetString("Item.Area.LogoFont.Color.Color") == "#FFF" || GetString("Item.Area.LogoFont.Color.Color") == "#FFFFFF")
1217 {
1218 int offset = ImageHeight()+28;
1219
1220 CssString += @"
1221 .dw-offsetmenu-logo {
1222 color: #333 !important;
1223 }";
1224 }
1225
1226 if (!string.IsNullOrWhiteSpace(GeneralSettings.Background.Color))
1227 {
1228 CssString += @"
1229 body {
1230 background-color: " + GeneralSettings.Background.Color + @";
1231 background-size: cover;
1232 overflow-y: scroll;
1233 }";
1234 }
1235
1236 if (GeneralSettings.Background.GradientColor)
1237 {
1238 CssString += @"
1239 body {
1240 background: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%);
1241 background: -o-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%);
1242 background: -ms-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%);
1243 background: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%);
1244 background: linear-gradient(to top, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%);
1245 background-attachment: fixed;
1246 background-color: " + GeneralSettings.Background.Color + @" !important;
1247 }";
1248 }
1249
1250 if (GeneralSettings.Site.Shadow)
1251 {
1252 CssString += @"
1253 .shad {
1254 -webkit-box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75);
1255 -moz-box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75);
1256 box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75);
1257 }";
1258 }
1259
1260 //Image settings
1261 if (GeneralSettings.Images.RoundCorners)
1262 {
1263 CssString += @"
1264 .content-image {
1265 border-radius: 6px;
1266 -webkit-border-radius: 6px;
1267 -moz-border-radius: 6px;
1268 }";
1269 }
1270
1271 //Navbar and header custom settings
1272 if (GeneralSettings.Header.Mode == "cover")
1273 {
1274 CssString += @"
1275 .navbar-wp {
1276 background-color: none !important;
1277 }";
1278
1279 if (!GeneralSettings.Header.Show || GeneralSettings.Header.Mode == "mobile")
1280 {
1281 CssString += @"
1282 .header-cover .navbar-wp {
1283 top: 0px !important;
1284 }";
1285 }
1286 }
1287 else
1288 {
1289 if (GeneralSettings.Header.Show)
1290 {
1291 CssString += @"
1292 .navbar-wp.affix .navbar-nav > li > a {
1293 padding: 16px 16px !important;
1294 }";
1295 }
1296 }
1297
1298 if (GeneralSettings.Header.Background == "colorline")
1299 {
1300 CssString += @"
1301 .first-level, .second-level{
1302 border-bottom: 1px solid " + ColorSettings.Color.Primary + @" !important;
1303 }
1304
1305 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a {
1306 background-color: #FFF;
1307 color: #333;
1308 }
1309
1310 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus {
1311 color: " + ColorSettings.Color.NavbarFont + @";
1312 }
1313
1314 .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo {
1315 color: " + GeneralSettings.Logo.SecondaryColor + @" !important;
1316 }";
1317 } else if (GeneralSettings.Header.Background == "neutral")
1318 {
1319 CssString += @"
1320 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a {
1321 background-color: #f1f1f1;
1322 }
1323
1324 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a {
1325 color: #333;
1326 }
1327
1328 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus {
1329 color: " + ColorSettings.Color.NavbarFont + @";
1330 }
1331
1332 .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo {
1333 color: " + GeneralSettings.Logo.SecondaryColor + @" !important;
1334 }";
1335 }
1336 else if (GeneralSettings.Header.Background == "transparent")
1337 {
1338 CssString += @"
1339 .navbar-wp, .navbar-wp.affix {
1340 background-color: #FFF;
1341 opacity: 0.9;
1342 filter: alpha(opacity=90); /* For IE8 and earlier */
1343 }
1344
1345 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a {
1346 color: #333;
1347 }
1348
1349 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus {
1350 color: " + ColorSettings.Color.NavbarFont + @";
1351 }
1352
1353 .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo {
1354 color: " + GeneralSettings.Logo.SecondaryColor + @" !important;
1355 }";
1356 }
1357 else
1358 {
1359 CssString += @"
1360 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a {
1361 background-color: " + ColorSettings.Color.Secondary + @";
1362 }
1363
1364 .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo {
1365 color: " + GeneralSettings.Logo.SecondaryColor + @" !important;
1366 }";
1367 }
1368
1369 if (GeneralSettings.Navigation.SelectionMode == "background" || GeneralSettings.Navigation.SelectionMode == "arrow"){
1370 CssString += NavbarPosition(false, SelectionWeight);
1371
1372 CssString += @"
1373 .dw-navbar-button > a {
1374 background-color: transparent !important;
1375 }
1376
1377 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a {
1378 background-color: " + ColorSettings.Color.Primary + @" !important;
1379 }";
1380 }
1381
1382 if (GeneralSettings.Navigation.SelectionMode == "underline"){
1383 CssString += NavbarPosition(true);
1384
1385 CssString += ClearBackground();
1386
1387 CssString += @"
1388 .dw-navbar-button > a span:after {
1389 position: absolute;
1390 content: '';
1391 left: 0px;
1392 bottom: 0px;
1393 height: " + SelectionWeight + @"px;
1394 width: 100%;
1395 transform: scaleX(0);
1396 transition: all 0.3s ease-in-out 0s;
1397 }
1398 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a {
1399 color: " + ColorSettings.Color.NavbarFont + @" !important;
1400 }
1401
1402 .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 {
1403 color: " + ColorSettings.Color.Primary + @" !important;
1404 transform: scaleX(1);
1405 transition: all 0.3s ease-in-out 0s;
1406 }";
1407 }
1408
1409 if (GeneralSettings.Navigation.SelectionMode == "boxed"){
1410 CssString += NavbarPosition(true, SelectionWeight);
1411
1412 CssString += @"
1413 .dw-navbar-button > a {
1414 background-color: transparent !important;
1415 }
1416
1417 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a {
1418 background-color: " + ColorSettings.Color.Primary + @" !important;
1419 transition: all 0.3s ease-in-out 0s;
1420 }";
1421 }
1422
1423 if (GeneralSettings.Navigation.SelectionMode == "border"){
1424 CssString += NavbarPosition(true, 6, SelectionWeight);
1425
1426 CssString += ClearBackground();
1427
1428 CssString += @"
1429 .dw-navbar-button > a {
1430 border: " + SelectionWeight + @"px solid transparent !important; transition: None !important;
1431 }
1432
1433 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a {
1434 border-width: " + SelectionWeight + @"px !important;
1435 border-color: " + ColorSettings.Color.Primary + @" !important;
1436 transition: all 0.3s ease-in-out 0s;
1437 }";
1438 }
1439
1440 if (GeneralSettings.Navigation.SelectionMode == "font"){
1441 CssString += NavbarPosition();
1442
1443 CssString += ClearBackground();
1444
1445 SelectionWeight = (SelectionWeight*100);
1446
1447 CssString += @"
1448 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a {
1449 color: " + ColorSettings.Color.Primary + @" !important;
1450 font-weight: " + SelectionWeight + @" !important;
1451 transition: all 0.3s ease-in-out 0s;
1452 }";
1453 }
1454
1455 if (GeneralSettings.Navigation.Case){
1456 CssString += @"
1457 .dw-navbar-button > a {
1458 text-transform: uppercase !important;
1459 }";
1460 }
1461 else
1462 {
1463 CssString += @"
1464 .dw-navbar-button > a {
1465 text-transform: none !important;
1466 }";
1467 }
1468
1469
1470 //Breadcrumb custom settings
1471 if (GeneralSettings.Navigation.BreadcrumbMode == "light")
1472 {
1473 CssString += @"
1474 .pg-opt {
1475 border-bottom: 0px;
1476 background: none repeat scroll 0% 0% #FFF;
1477 }
1478
1479 .dw-breadcrumb-title {
1480 font-size: 14px !important;
1481 padding: 5px 0px 5px 0px !important;
1482 }
1483
1484 .dw-breadcrumb {
1485 padding: 10px 0px 10px 0px !important;
1486 }";
1487 }
1488
1489 if (GeneralSettings.Navigation.BreadcrumbMode == "normal")
1490 {
1491 CssString += @"
1492 .dw-breadcrumb-title {
1493 font-size: 14px !important;
1494 padding: 5px 0px 5px 0px !important;
1495 }
1496
1497 .dw-breadcrumb a, .pg-opt .breadcrumb {
1498 padding: 5px !important;
1499 }";
1500 }
1501
1502 if (GeneralSettings.Navigation.BreadcrumbMode == "large")
1503 {
1504 CssString += @"
1505 .dw-breadcrumb-title {
1506 font-size: 22px !important;
1507 padding: 15px 0px 15px 0px !important;
1508 }
1509
1510 .dw-breadcrumb {
1511 padding: 15px !important;
1512 }";
1513 }
1514
1515
1516 if (GeneralSettings.Navigation.BreadcrumbAlign == "right")
1517 {
1518 CssString += @"
1519 .dw-breadcrumb {
1520 float: right !important;
1521 }";
1522 }
1523 else
1524 {
1525 CssString += @"
1526 .dw-breadcrumb {
1527 float: left !important;
1528 }";
1529 }
1530
1531
1532 //Left menu custom settings
1533 if (GeneralSettings.Navigation.LeftmenuMode == "light" || GeneralSettings.Navigation.LeftmenuMode == "light-color")
1534 {
1535 CssString += @"
1536 ul.dw-categories, ul.dw-categories > li, ul.dw-categories > li > ul > li {
1537 border: 0px solid #EEE;
1538 }
1539
1540 ul.dw-categories > li > ul {
1541 background: none repeat scroll 0% 0% #FFF;
1542 }
1543
1544 ul.dw-categories li a:hover, ul.dw-categories li a:focus, ul.dw-categories li a:active {
1545 background-color: #FFF !important;
1546 color: " + ColorSettings.Color.Primary + @" !important;
1547 }
1548 ul.dw-categories li a:hover span, ul.dw-categories li a:focus span, ul.dw-categories li a:active span {
1549
1550 color: " + ColorSettings.Color.Primary + @" !important;
1551 }
1552 .list-active, .list-active > a {
1553 background-color: #FFF;
1554 color: " + ColorSettings.Color.Primary + @" !important;
1555 }
1556 .list-active span, .list-active > a span{
1557
1558 color: " + ColorSettings.Color.Primary + @" !important;
1559 }
1560 .list-open-active {
1561 background-color: #FFF;
1562 color: " + ColorSettings.Color.Primary + @" !important;
1563 }";
1564 }
1565
1566 if (GeneralSettings.Navigation.LeftmenuMode == "lines")
1567 {
1568 CssString += @"
1569 ul.dw-categories > li {
1570 border-bottom: 1px solid #EEE;
1571 }
1572
1573 ul.dw-categories {
1574 border: 0px solid #EEE;
1575 }
1576
1577 ul.dw-categories > li > ul {
1578 background: none repeat scroll 0% 0% #FFF;
1579 }
1580
1581 ul.dw-categories li a:hover, a:focus, a:active {
1582 background-color: #FFF !important;
1583 color: " + ColorSettings.Color.Primary + @" !important;
1584 }
1585
1586 .list-active, .list-active > a {
1587 background-color: #FFF;
1588 color: " + ColorSettings.Color.Primary + @" !important;
1589 }
1590
1591 .list-open-active {
1592 background-color: #FFF;
1593 color: " + ColorSettings.Color.Primary + @" !important;
1594 }";
1595 }
1596
1597 if (GeneralSettings.Navigation.LeftmenuMode == "boxed")
1598 {
1599 CssString += @"
1600 ul.dw-categories, ul.dw-categories > li, ul.dw-categories > li > ul > li {
1601 border: 0px solid #EEE;
1602 }
1603
1604 .list-active, .list-active > a {
1605 background-color: " + ColorSettings.Color.Primary + @" !important;
1606 color: #FFF !important;
1607 }";
1608 }
1609
1610 if (GeneralSettings.Navigation.LeftmenuMode == "border")
1611 {
1612 CssString += @"
1613 ul.dw-categories > li {
1614 border: 1px solid #EEE;
1615 }
1616
1617 ul.dw-categories > li > ul > li {
1618 border-top: 1px solid #EEE;
1619 }
1620
1621 .list-active, .list-active > a {
1622 background-color: " + ColorSettings.Color.Primary + @" !important;
1623 color: #FFF;
1624 }";
1625 }
1626
1627 if (GeneralSettings.Navigation.LeftmenuMode == "light-color")
1628 {
1629 CssString += @"
1630 ul.dw-categories li a:hover, ul.dw-categories a:focus, ul.dw-categories a:active {
1631 border-left: 6px solid " + ColorSettings.Color.Primary + @";
1632 }
1633
1634 ul.dw-categories .M4 > li > a:hover, ul.dw-categories .M4 > li > a:focus, ul.dw-categories .M4 > li > a:active {
1635 padding-left: 30px;
1636 }
1637
1638 ul.dw-categories .M5 > li > a:hover{
1639 padding-left: 30px;
1640 }
1641
1642 ul.dw-categories .M6 > li > a:hover{
1643 padding-left: 40px;
1644 }
1645
1646
1647
1648 ul.dw-categories .M7 > li > a:hover, ul.dw-categories .M7 > li > a:focus, ul.dw-categories .M7 > li > a:active{
1649 / padding-left: 50px;
1650 //}
1651
1652 // ul.dw-categories .M8 > li > a:hover, ul.dw-categories .M8 > li > a:focus, ul.dw-categories .M8 > li > a:active {
1653 // padding-left: 50px;
1654 //}
1655
1656 ul.dw-categories .list-active > a {
1657 border-left: 6px solid " + ColorSettings.Color.Primary + @";
1658 }
1659
1660 .btn-dw:hover, .btn-dw:focus, .btn-dw:active {
1661
1662 }";
1663 }
1664
1665
1666 //Buttons custom designs
1667 if (GeneralSettings.Navigation.ButtonDesign == "light-rounded")
1668 {
1669 CssString += @"
1670 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart {
1671 border-width: 0px;
1672 }
1673
1674 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active {
1675 background-color: " + ColorSettings.Color.Primary + @";
1676 color: #FFF;
1677 border-width: 0px;
1678 opacity: 0.8;
1679 }
1680
1681 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active {
1682 background-color: " + ColorSettings.Color.Primary + @";
1683 color: #FFF;
1684 border-width: 0px;
1685 }
1686
1687 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active {
1688 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @";
1689 color: #FFF;
1690 border-width: 0px;
1691 }";
1692 }
1693
1694 if (GeneralSettings.Navigation.ButtonDesign == "corners")
1695 {
1696 CssString += @"
1697 .btn-dw-primary, .btn-dw-secondary, btn-dw-cart , .btn-dw-cart {
1698 border-radius: 0px !important;
1699 border-width: 0px;
1700 }
1701
1702 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active {
1703 background-color: " + ColorSettings.Color.Primary + @";
1704 color: #FFF;
1705 border-width: 0px;
1706 opacity: 0.8;
1707 }
1708
1709 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active {
1710 background-color: " + ColorSettings.Color.Primary + @";
1711 color: #FFF;
1712 border-width: 0px;
1713 }
1714
1715 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active {
1716 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @";
1717 color: #FFF;
1718 border-width: 0px;
1719 }";
1720 }
1721
1722 if (GeneralSettings.Navigation.ButtonDesign == "round")
1723 {
1724 CssString += @"
1725 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart {
1726 padding: 5px 15px;
1727 border-radius: 200px !important;
1728 border-width: 0px !important;
1729 }
1730
1731 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active {
1732 background-color: " + ColorSettings.Color.Primary + @";
1733 color: #FFF;
1734 border-width: 0px !important;
1735 opacity: 0.8;
1736
1737 }
1738
1739 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active {
1740 background-color: " + ColorSettings.Color.Primary + @";
1741 color: #FFF;
1742 border-width: 0px !important;
1743 }
1744
1745 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active {
1746 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @";
1747 color: #FFF;
1748 border-width: 0px !important;
1749 }";
1750 }
1751
1752 if (GeneralSettings.Navigation.ButtonDesign == "border")
1753 {
1754 CssString += @"
1755 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart {
1756 background-color: transparent;
1757 }
1758
1759 .btn-dw-primary {
1760 border-width: 4px;
1761 padding: 3px 10px;
1762 color: " + ColorSettings.Color.Primary + @";
1763 }
1764
1765 .btn-dw-secondary {
1766 border-width: 2px;
1767 color: " + ColorSettings.Color.Secondary + @";
1768 }
1769
1770 .btn-dw-cart {
1771 border-width: 4px;
1772 padding: 3px 10px;
1773 color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @";
1774 }
1775
1776 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active {
1777 background-color: " + ColorSettings.Color.Primary + @";
1778 border-width: 4px;
1779 padding: 3px 10px;
1780 border-color: " + ColorSettings.Color.Primary + @";
1781 color: #FFF;
1782 }
1783
1784 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active {
1785 background-color: " + ColorSettings.Color.Primary + @";
1786 border-width: 2px;
1787 color: #FFF;
1788 border-color: #FFF;
1789 }
1790
1791 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active {
1792 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @";
1793 border-width: 4px;
1794 padding: 3px 10px;
1795 border-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @";
1796 color: #FFF;
1797 }";
1798 }
1799
1800 if (GeneralSettings.Navigation.ButtonDesign == "border-sharp" || GeneralSettings.Navigation.ButtonDesign == "border-round")
1801 {
1802 CssString += @"
1803 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart {
1804 background-color: transparent;
1805 }
1806
1807 .btn-dw-primary {
1808 border-width: 4px;
1809 padding: 3px 15px;
1810 color: " + ColorSettings.Color.Primary + @";
1811 }
1812
1813 .btn-dw-secondary {
1814 border-width: 2px;
1815 padding: 5px 15px;
1816 color: " + ColorSettings.Color.Secondary + @";
1817 }
1818
1819 .btn-dw-cart {
1820 border-width: 4px;
1821 padding: 3px 15px;
1822 color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @";
1823 }
1824
1825 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active {
1826 background-color: " + ColorSettings.Color.Primary + @";
1827 border-width: 4px;
1828 color: #FFF;
1829 padding: 3px 15px;
1830 border-color: " + ColorSettings.Color.Primary + @";
1831 }
1832
1833 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active {
1834 background-color: " + ColorSettings.Color.Primary + @";
1835 border-width: 2px;
1836 color: #FFF;
1837 padding: 5px 15px;
1838 border-color: #FFF;
1839 }
1840
1841 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active {
1842 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @";
1843 border-width: 4px;
1844 color: #FFF;
1845 padding: 3px 15px;
1846 border-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @";
1847 }";
1848 }
1849
1850 if (GeneralSettings.Navigation.ButtonDesign == "border-sharp")
1851 {
1852 CssString += @"
1853 .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 {
1854 border-radius: 0px !important;
1855 }";
1856 }
1857
1858 if (GeneralSettings.Navigation.ButtonDesign == "border-round")
1859 {
1860 CssString += @"
1861 .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 {
1862 border-radius: 200px !important;
1863 }";
1864 }
1865
1866
1867 //Headings custom settings
1868 if (GeneralSettings.Headings.Mode == "underline")
1869 {
1870 CssString += @"
1871 .dw-section-title {
1872 border-bottom: 2px solid;
1873 margin-bottom: 15px;
1874 }";
1875 }
1876
1877 if (GeneralSettings.Headings.Mode == "boxed" || GeneralSettings.Headings.Mode == "boxed-line")
1878 {
1879 CssString += @"
1880 .dw-section-title span {
1881 background-color: " + GetString("Item.Area.HeadingsH1.Color.Color") + @";
1882 display: inline-block;
1883 padding: 8px 16px;
1884 color: #FFF;
1885 }";
1886
1887 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color")))
1888 {
1889 CssString += @"
1890 .dw-section-title {
1891 background-color: " + ColorSettings.Color.Primary + @";
1892 }";
1893 }
1894 }
1895
1896 if (GeneralSettings.Headings.Mode == "boxed-line")
1897 {
1898 CssString += @"
1899 .dw-section-title span {
1900 margin-bottom: 2px;
1901 }
1902
1903 .dw-section-title {
1904 border-bottom: 2px solid " + GetString("Item.Area.HeadingsH1.Color.Color") + @";
1905 margin-bottom: 10px;
1906 }";
1907
1908 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color")))
1909 {
1910 CssString += @"
1911 .dw-section-title {
1912 border-bottom: 2px solid " + ColorSettings.Color.Primary + @";
1913 }";
1914 }
1915 }
1916
1917 if (GeneralSettings.Headings.Mode == "outline")
1918 {
1919 CssString += @"
1920 .dw-section-title {
1921 color: #FFF;
1922 text-shadow:
1923 -1px -1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @",
1924 1px -1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @",
1925 -1px 1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @",
1926 1px 1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @";
1927 }";
1928
1929 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color")))
1930 {
1931 CssString += @"
1932 .dw-section-title {
1933 text-shadow:
1934 -1px -1px 0 #1A1A1A,
1935 1px -1px 0 #1A1A1A,
1936 -1px 1px 0 #1A1A1A,
1937 1px 1px 0 #1A1A1A;
1938 }";
1939 }
1940 }
1941
1942 if (GeneralSettings.Headings.Mode == "backline")
1943 {
1944 CssString += @"
1945 .dw-section-title {
1946 font-size: 18px;
1947 text-align: center;
1948 border-bottom: 2px solid;
1949 padding: 0;
1950 margin: 25px 10px 20px;
1951 line-height: 0em !important;
1952 }
1953
1954 .dw-section-title > span {
1955 background-color: #FFF;
1956 padding: 0 16px;
1957 }
1958
1959 .dw-section-title-small {
1960 margin: 8px 10px 20px;
1961 }";
1962 }
1963
1964 if (GeneralSettings.Ecommerce.EcomCardDesign == "one")
1965 {
1966
1967 }
1968
1969 if (GeneralSettings.Ecommerce.EcomCardDesign == "two")
1970 {
1971 CssString += @"
1972 .product {
1973 border: 1px solid #E5E5E5;
1974 }";
1975 }
1976
1977 return CssString;
1978 }
1979
1980 private string ClearBackground() {
1981 string CssString = "";
1982
1983 CssString += @"
1984 .dw-navbar-button > a {
1985 background-color: rgba(0, 0, 0, 0.0) !important;
1986 }
1987
1988 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a {
1989 background-color: rgba(0, 0, 0, 0.0) !important;
1990 }";
1991
1992 return CssString;
1993 }
1994
1995 private string NavbarPosition(bool margin=false, int specialpadding=6, int extramargin=0) {
1996 int LogoHeight = 0;
1997 string CssString = "";
1998 int Centerpos = 0;
1999
2000 if (GeneralSettings.Header.Mode != "solid"){
2001 if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image))
2002 {
2003 LogoHeight = ImageHeight();
2004 }
2005 else
2006 {
2007 LogoHeight = GetInteger("Item.Area.LogoFont.Size");
2008 }
2009 }
2010 else
2011 {
2012 if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image))
2013 {
2014 LogoHeight = 18;
2015 }
2016 else
2017 {
2018 LogoHeight = GetInteger("Item.Area.LogoFont.Size")-10;
2019 }
2020 }
2021
2022 if (margin == false)
2023 {
2024 Centerpos = (LogoHeight/2) + 6;
2025
2026 CssString += @"
2027 .dw-navbar-button > a, .navbar-wp.affix .navbar-nav > li > a {
2028 padding: " + Centerpos + @"px " + (specialpadding+4) + @"px " + Centerpos + @"px " + (specialpadding+4) + @"px !important;
2029 margin: " + extramargin + @"px " + extramargin + @"px !important;
2030 }";
2031 }
2032 else
2033 {
2034 Centerpos = ((LogoHeight/2)+6)-(specialpadding+extramargin);
2035
2036 CssString += @"
2037 .dw-navbar-button > a, .navbar-wp.affix .navbar-nav > li > a {
2038 padding: " + specialpadding + @"px " + (specialpadding+4) + @"px " + specialpadding + @"px " + (specialpadding+4) + @"px !important;
2039 margin: " + Centerpos + @"px 4px 0px 4px !important;
2040 }";
2041 }
2042
2043 return CssString;
2044 }
2045
2046 private int ImageHeight ()
2047 {
2048 int LogoHeight = 0;
2049
2050 try
2051 {
2052 if (!string.IsNullOrWhiteSpace(GetString("Item.Area.GeneralLogo")))
2053 {
2054 string imageUrl = "http://" + HttpContext.Current.Request.Url.Authority + GetString("Item.Area.GeneralLogo");
2055
2056 WebRequest request = WebRequest.Create(imageUrl);
2057 WebResponse response = request.GetResponse();
2058 Image image = Image.FromStream(response.GetResponseStream());
2059
2060 LogoHeight = image.Height;
2061 }
2062 else
2063 {
2064 LogoHeight = 38;
2065 }
2066 }
2067 catch (Exception ex)
2068 {
2069 LogoHeight = 38;
2070 }
2071
2072 return LogoHeight;
2073 }
2074 }
2075
2076
2077
2078 @{
2079 InitGeneralSettings();
2080 }
2081
2082
2083 @if (writeCss)
2084 {
2085 css += FontStylesCSS() + "/*Colors*/" + Environment.NewLine + GetColorSettings() + Environment.NewLine + "/*General*/" + Environment.NewLine + GetGeneralCSS();
2086 Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(css, HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.css"), false);
2087 Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(RemoveWhiteSpaceFromStylesheets(Dynamicweb.Core.Helpers.TextFileHelper.ReadTextFile(HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStyles.css"))), HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStyles.min.css"), false);
2088 Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(RemoveWhiteSpaceFromStylesheets(css), cssPath, false);
2089 }
2090
2091 @functions{
2092 public static string RemoveWhiteSpaceFromStylesheets(string body)
2093 {
2094 body = Regex.Replace(body, @"[a-zA-Z]+#", "#");
2095 body = Regex.Replace(body, @"[\n\r]+\s*", string.Empty);
2096 body = Regex.Replace(body, @"\s+", " ");
2097 body = Regex.Replace(body, @"\s?([:,;{}])\s?", "$1");
2098 body = body.Replace(";}", "}");
2099 body = Regex.Replace(body, @"([\s:]0)(px|pt|%|em)", "$1");
2100 // Remove comments from CSS
2101 body = Regex.Replace(body, @"/\*[\d\D]*?\*/", string.Empty);
2102 return body;
2103 }
2104 }
2105
2106 <!-- Template styles -->
2107 <link id="dwStylesheet" type="text/css" href="/Files/Templates/Designs/Eldorado/css/DWGlobalStyles.min.css" rel="stylesheet" media="screen">
2108 <link type="text/css" href="/Files/Templates/Designs/Eldorado/css/styles.min.css" rel="stylesheet">
2109
2110 @{ string cssAutoPath = "/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.min.css?t=" + areaUpdated.Ticks; }
2111
2112 <link type="text/css" href="@cssAutoPath" rel="stylesheet">
2113
2114 <!-- Analytics code -->
2115 @GetValue("Item.Area.OtherAnalyticsCode")
2116 <link href="/Files/Templates/Designs/Eldorado/css/checkbox.css" rel="stylesheet">
2117 <link href="/Files/Templates/Designs/Eldorado/css/magic-check.css" rel="stylesheet">
2118 <link type="text/css" href="/Files/Templates/Designs/Eldorado/css/style.css?v=1.3" rel="stylesheet">
2119
2120
2121 <script src="/Files/Templates/Designs/Eldorado/js/jquery.min.js"></script>
2122
2123 @if (GeneralSettings.Navigation.IsMegamenu)
2124 {
2125 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Eldorado/css/megamenu.css">
2126
2127 }
2128 <style>
2129 .newsletter-popup--teaser{
2130 background:@bgbuttonnews;
2131
2132 }
2133 .newsletter-popup--teaser a{
2134 color:@colorbuttonnews;
2135 }
2136 .newsletter-popup--wrap .newsletter-popup{
2137 background:@bgwrapnews;
2138 color:@colorwrapnews;
2139 }
2140 .newsletter-popup--wrap .newsletter-popup h2{
2141 color:@colorwrapnews;
2142 }
2143 .popup-btn{
2144 background:@bgbtnnbox;
2145 color:@colorbtnnbox;
2146 -webkit-transition: all 0.2s ease-in-out;
2147 -moz-transition: all 0.2s ease-in-out;
2148 -o-transition: all 0.2s ease-in-out;
2149 transition: all 0.2s ease-in-out;
2150 }
2151 .popup-btn:hover{
2152 color:@bgbtnnbox;
2153 background:@colorbtnnbox;
2154 border:1px solid @bgbtnnbox;
2155 }
2156 </style>
2157 @GetValue("Stylesheets")
2158 @GetValue("Javascripts")
2159 </head>
2160 <body style="@GeneralSettings.Background.Style" id="sitecontent" data-currency="@Dynamicweb.Ecommerce.Common.Context.Currency.Code" data-currencysetbycystomer="@Dynamicweb.Ecommerce.Common.Context.CurrencySetByCustomer">
2161
2162 @if (!string.IsNullOrWhiteSpace(GTMID))
2163 {
2164 <!-- Google Tag Manager (noscript) -->
2165 <noscript>
2166 <iframe src="https://www.googletagmanager.com/ns.html?id=@GTMID" height="0" width="0" style="display:none;visibility:hidden"></iframe>
2167 </noscript>
2168 <!-- End Google Tag Manager (noscript) -->
2169 }
2170 <div id="fb-root"></div>
2171
2172
2173 <!-- MODALS -->
2174 <div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
2175 <div class="modal-dialog modal-sm">
2176 <div class="modal-content">
2177 <div class="modal-header">
2178 <h4 class="modal-title" id="myModalLabel">@Translate("Login", "Login")</h4>
2179 </div>
2180 <form role="form" id="loginform" class="form-horizontal" method="post">
2181
2182 <div class="modal-body">
2183 <div class="err"></div>
2184 @if (!string.IsNullOrWhiteSpace(GetString("DW_extranet_error_uk")))
2185 {
2186 <script>alert("@GetValue("DW_extranet_error_uk")");</script>
2187 }
2188 <input type="hidden" name="ID" value="@Pageview.ID">
2189 <input type="hidden" name="DWExtranetUsernameRemember" value="True">
2190 <input type="hidden" name="DWExtranetPasswordRemember" value="True">
2191
2192 <div class="form-group">
2193 @{
2194 attrValue = Translate("Skriv kundenr.", "Skriv kundenr.");
2195 var username2 = @GetValue("DWExtranetUsername");
2196 }
2197 <label for="username" class="control-label">@Translate("Kundenr.", "Kundenr.")</label>
2198 <input type="text" class="form-control" name="username" id="username" placeholder="@attrValue" value="@username2">
2199 </div>
2200 <div class="form-group">
2201 @{
2202 attrValue = Translate("Enter password", "Enter password");
2203 }
2204 <label for="password" class="control-label">@Translate("Password", "Password")</label>
2205 <input type="password" class="form-control" name="password" id="password" placeholder="@attrValue">
2206 </div>
2207 <a class="forgot-pass" href="/Default.aspx?ID=@signInPageId&LoginAction=Recovery">@Translate("Forgot your password?", "Forgot your password?")</a>
2208 </div>
2209
2210 <a href="https://shop.eldorado.dk"><img src="/Files/Images/PressShop.png" style="margin-left:15px;margin-bottom:15px;"></a>
2211 <div class="modal-footer">
2212 <div class="checkbox pull-left">
2213 <label>
2214 <input type="checkbox" name="autologin" id="autologin" checked="checked" value="True">
2215 @Translate("Remember me", "Remember me")
2216 </label>
2217 </div>
2218 <button type="submit" class="btn btn-sm btn-dw-primary pull-right">@Translate("Login", "Login")</button>
2219 </div>
2220 @if (GetLoop("DWExtranetExternalLoginProviders").Count != 0)
2221 {
2222 <div class="modal-footer">
2223 <div class="text-left">@Translate("Or sign in using", "Or sign in using"):</div>
2224 <ul class="providers">
2225 @foreach (LoopItem LoginProvider in GetLoop("DWExtranetExternalLoginProviders"))
2226 {
2227 var ProviderName = LoginProvider.GetString("ProviderName").ToLower();
2228 var ProviderID = LoginProvider.GetValue("ProviderID");
2229 <li><a href='/Admin/Public/Social/ExternalLogin.aspx?action=login&providerID=@ProviderID' class="btn btn-xs btn-dw-primary pull-left"><i class="fa fa-@ProviderName"></i> @LoginProvider.GetString("ProviderName")</a></li>
2230 }
2231 </ul>
2232 </div>
2233 }
2234 </form>
2235 </div>
2236 </div>
2237 </div>
2238
2239 <!-- MOBILE MENU -->
2240 @{
2241 var offsetmenuplace = "left";
2242
2243 if (GeneralSettings.Header.Mode == "mobile")
2244 {
2245 offsetmenuplace = GeneralSettings.Navigation.Position;
2246 }
2247 }
2248
2249 @if ((Pageview.Device.ToString() == "Mobile") || (Pageview.Device.ToString() == "Tablet"))
2250 {
2251 <div id="myNavmenu" class="navmenu navmenu-default navmenu-fixed-@offsetmenuplace offcanvas">
2252 <div class="col-sm-12 col-xs-12 offcanvas-col">
2253 <div class="row offcanvas-row"> </div>
2254 <div class="row offcanvas-row">
2255 <div class="col-sm-12 col-xs-12 offcanvas-col">
2256 <a href="/Default.aspx?ID=@firstpageid" class="brand">
2257 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image))
2258 {
2259 <div class="img-responsive dw-offsetmenu-logo pull-left">
2260 @if (GeneralSettings.Logo.ContrastImage != GeneralSettings.Logo.Image)
2261 {
2262 <img src="@GeneralSettings.Logo.ContrastImage" alt="Logo">
2263 }
2264 else
2265 {
2266 <img class="img-responsive" src="@GeneralSettings.Logo.Image" alt="Logo">
2267 }
2268 </div>
2269 }
2270
2271 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text))
2272 {
2273 <div class="dw-logotext dw-offsetmenu-logo pull-left">@GeneralSettings.Logo.Text</div>
2274
2275
2276
2277 }
2278 </a>
2279 <div class="closeBtn btn btn-sm btn-base" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body">
2280 <i class="fa fa-times"></i>
2281 </div>
2282
2283 </div>
2284 </div>
2285 <div class="row offcanvas-row"> </div>
2286 </div>
2287
2288 <div class="col-sm-12 col-xs-12 offcanvas-col">
2289 @if (GetBoolean("Item.Area.EcomEnabled"))
2290 {
2291 <div class="row offcanvas-row">
2292 <div class="col-sm-12 col-xs-12 offcanvas-col search-mobile">
2293 <form method="get" action="Default.aspx">
2294 <input type="hidden" name="ID" value='@Pageview.Area.Item["ProductsPageId"]'>
2295 <div class="input-group">
2296 <input type="text" class="form-control typeahead-products" name="Search" tabindex="1" placeholder="Søg">
2297 <span class="input-group-btn">
2298 <button class="btn btn-primary" type="submit"><i class="fa fa-search"></i></button>
2299 </span>
2300 </div>
2301 </form>
2302 </div>
2303 </div>
2304 <div class="user-sm-block">
2305 <ul class="top-menu">
2306 @foreach (var lang in GetLoop("WebsiteLanguages"))
2307 {
2308 <li id='@lang.GetValue("ID")area'>
2309 @{
2310 string langCode = "flag-icon" + lang.GetString("Culture").Substring(2, 3).ToLower();
2311 <a href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'><span class="flag-icon @langCode"></span></a>
2312 }
2313 </li>
2314 }
2315 </ul>
2316
2317 @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
2318 {
2319 <a href='Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]' class="btn btn-sm btn-default"><i class="fa fa-sign-in"></i> @Translate("Sign in", "Sign in")</a>
2320 }
2321 else
2322 {
2323 <a href='/Default.aspx?ID=@Pageview.Area.Item["OrdersPageId"]' class="btn btn-sm btn-default">
2324 <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong>
2325 </a>
2326
2327 <a href='/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID' class="btn btn-sm btn-default pull-right">
2328 <i class="fa fa-sign-out"></i> @Translate("Sign out", "Sign out")
2329 </a>
2330 }
2331
2332 </div>
2333 }
2334 </div>
2335
2336 <div class="row offcanvas-row">
2337 <div class="col-sm-12 col-xs-12 offcanvas-col">
2338 @if (Dynamicweb.Frontend.PageView.Current().Device == Dynamicweb.Frontend.Devices.DeviceType.Mobile || Dynamicweb.Frontend.PageView.Current().Device == Dynamicweb.Frontend.Devices.DeviceType.Tablet)
2339 {
2340
2341 <text>
2342 @RenderNavigation(new { StartLevel = 1, EndLevel = 6, Template = "MobileNavigation.xslt", ExpandMode = "All" })
2343 </text>
2344
2345 }
2346
2347
2348 </div>
2349 </div>
2350 </div>
2351 }
2352
2353 <!-- HEADER AND CONTENT-->
2354
2355 <div class="body-wrap shad @GeneralSettings.Site.LayoutMode">
2356
2357 <!-- HEADER -->
2358 <div id="divHeaderWrapper">
2359 <header class="@GeneralSettings.Header.Classes">
2360
2361 <!-- TOP HEADER -->
2362 @if (GeneralSettings.Header.Show)
2363 {
2364 <div class="top-header">
2365 <div class="top-header-service">
2366 <div class="container logobox">
2367 <nav class="top-header-menu hidden-sm hidden-xs">
2368 <ul class="top-menu">
2369 @foreach (var lang in GetLoop("WebsiteLanguages"))
2370 {
2371 if ( lang.GetString("Name") !="Eldorado-DE" )
2372 {
2373 <li id='@lang.GetValue("ID")area'>
2374 @{
2375 string langCode = "flag-icon" + lang.GetString("Culture").Substring(2, 3).ToLower();
2376 <a href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'><span class="flag-icon @langCode"></span></a>
2377 }
2378 </li>
2379 }
2380 }
2381
2382 <!-- Ecommerce user menu -->
2383 @if (GetBoolean("Item.Area.EcomEnabled"))
2384 {
2385
2386 <text>
2387 @GetValue("DwNavigation(servicenavigation)")
2388 </text>
2389
2390 }
2391 </ul>
2392 </nav>
2393 </div>
2394 </div>
2395 <div class="container">
2396 <div class="row">
2397 <div class="col-sm-6 logobox hidden-lg hidden-md customMob">
2398 <div class="pull-left customMobileMenu">
2399 <button type="button" class=" btn btn-sm btn-base" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body">
2400 <i class="fa fa-bars"></i>
2401 </button>
2402 </div>
2403
2404
2405
2406 @if (GeneralSettings.Header.Mode == "solid")
2407 {
2408 <a href="/Default.aspx?ID=@firstpageid" class="brand">
2409 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image))
2410 {
2411 <img class="img-responsive dw-logoimage pull-left" src="@GeneralSettings.Logo.Image" alt="Logo">
2412 }
2413
2414 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text))
2415 {
2416 <div class="dw-logotext pull-left">@GeneralSettings.Logo.Text</div>
2417 }
2418 </a>
2419
2420 if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Slogan))
2421 {
2422 <div class="dw-slogantext pull-left">@GeneralSettings.Logo.Slogan</div>
2423 }
2424 }
2425
2426 @if (GetBoolean("Item.Area.EcomEnabled"))
2427 {
2428 <div class="pull-right customMobIcons">
2429 <ul class="top-menu">
2430 @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
2431 {
2432 <li>
2433 <a href="Default.aspx?ID=@signInPageId" title="" class="btn btn-sm btn-base dw-minicart "><i class="fa fa-sign-in"></i></a>
2434 </li>
2435 }
2436 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
2437 {
2438 <li>
2439 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID" title="" class="btn btn-sm btn-base dw-minicart mobileFixPadding"><i class="fa fa-sign-out"></i></a>
2440 </li>
2441 <li>
2442 <a href="@favListpageId" title="" class="btn btn-sm btn-base dw-minicart mobileFixPadding"><i class="fa fa-heart-o"></i></a>
2443 </li>
2444 }
2445 <li>
2446 <a href="Default.aspx?ID=@cartid" title="" class="btn btn-sm btn-base dw-minicart mobileFixPadding" id="minipagecart-mobile"><i class="fa fa-shopping-cart"></i><strong> @GetValue("Ecom:Order.OrderLines.TotalProductQuantity") </strong></a>
2447 </li>
2448 </ul>
2449 </div>
2450
2451 }
2452 </div>
2453 </div>
2454 </div>
2455
2456
2457 </div>
2458 }
2459
2460 <!-- MAIN NAV -->
2461 @{
2462 var sticky = GeneralSettings.Navigation.StickyMenu;
2463 var stickyTrigger = "affix";
2464 var navbarpos = GeneralSettings.Navigation.Position;
2465 var selectionstyle = GeneralSettings.Navigation.SelectionStyle;
2466
2467 if (sticky == "off")
2468 {
2469 stickyTrigger = "";
2470 }
2471 }
2472
2473 <div id="navOne" class="navbar navbar-wp @selectionstyle navbar-fixed affix" role="navigation" data-spy="@stickyTrigger" data-offset-top="@sticky" data-offset-bottom="300">
2474 <div class="">
2475 @if (GeneralSettings.Header.Mode != "solid" || !GeneralSettings.Header.Show)
2476 {
2477 <div class="navbar-header">
2478 <div>
2479 <a href="/Default.aspx?ID=@firstpageid" class="brand">
2480 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image))
2481 {
2482 if (GeneralSettings.Logo.ContrastImage != GeneralSettings.Logo.Image)
2483 {
2484 <img class="img-responsive dw-logoimage dw-logoimage-normal pull-left" src="@GeneralSettings.Logo.Image" alt="Logo">
2485 <img class="img-responsive dw-logoimage dw-logoimage-contrast pull-left" src="@GeneralSettings.Logo.ContrastImage" alt="Logo">
2486 }
2487 else
2488 {
2489 <img class="img-responsive dw-logoimage pull-left" src="@GeneralSettings.Logo.Image" alt="Logo">
2490 }
2491 }
2492
2493 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text))
2494 {
2495 <div class="dw-logotext pull-left">@GeneralSettings.Logo.Text</div>
2496 }
2497 </a>
2498
2499 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Slogan))
2500 {
2501 <div class="dw-slogantext pull-left">@GeneralSettings.Logo.Slogan</div>
2502 }
2503 </div>
2504 </div>
2505 }
2506
2507 <!-- Small screen header -->
2508
2509 <div class="hidden-lg hidden-md">
2510 <div class="dw-header-sm">
2511 @*<div class="pull-left">
2512
2513
2514 </div>*@
2515
2516 <div class="pull-left hidden-xs">
2517 <h2 class="dw-header-sm-title">@GetGlobalValue("Global:Page.Top.Name")</h2>
2518 </div>
2519
2520
2521 </div>
2522 </div>
2523
2524 <!-- Big screen header -->
2525 <div class="navbar-navigation hidden-sm hidden-xs">
2526
2527 <nav class="col-md-12 col-sm-12 col-xs-12 p-0 navbar-@navbarpos">
2528 @if (GeneralSettings.Navigation.IsMegamenu)
2529 {
2530 <div class="row first-level">
2531 <div class="container">
2532 <form method="get" action="Default.aspx">
2533 <input type="hidden" name="ID" value='@searchpage'>
2534 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
2535 {
2536 <input type="hidden" name="listView" value='details'>
2537 }
2538 else
2539 {
2540 <input type="hidden" name="listView" value='box'>
2541 }
2542 <div class="input-group pull-@GeneralSettings.Navigation.InvertedPosition dw-top-search">
2543 <input type="text" class="form-control typeahead-products" name="q" tabindex="1" placeholder="@searchplaceholder">
2544 <span class="input-group-btn">
2545 <button class="btn btn-primary btn-search" type="submit"><i class="fa fa-search"></i></button>
2546 </span>
2547 </div>
2548 </form>
2549 </div>
2550
2551 <div class="container">
2552 <div class="col-md-4 logobox hidden-sm">
2553 @if (GeneralSettings.Header.Mode == "solid")
2554 {
2555 <a href="/Default.aspx?ID=@firstpageid" class="brand">
2556 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image))
2557 {
2558 <img class="img-responsive dw-logoimage pull-left" src="@GeneralSettings.Logo.Image" alt="Logo">
2559 }
2560
2561 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text))
2562 {
2563 <div class="dw-logotext pull-left">@GeneralSettings.Logo.Text</div>
2564 }
2565 </a>
2566
2567 if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Slogan))
2568 {
2569 <div class="dw-slogantext pull-left">@GeneralSettings.Logo.Slogan</div>
2570 }
2571 }
2572 </div>
2573 @GetValue("DwNavigation(topnavigationtop)")
2574
2575 @SnippetStart("customNav")
2576 @GetValue("DwNavigation(topnavigationtopcustom)")
2577 @SnippetEnd("customNav")
2578
2579 <!-- Ecommerce user menu -->
2580 <ul class="icons-wrapper">
2581
2582 <li><a style="background-color: #4d9a47;color: white;padding: 4px 10px;font-weight: bold;margin-right: 20px;" href="@ShutDownLink">@Pageview.Area.Item["ShutDownLinkText"]</a></li>
2583
2584 <!-- Ecommerce Cart -->
2585 @if (GetBoolean("Item.Area.EcomEnabled"))
2586 {
2587 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
2588 {
2589 <li>
2590 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID" title="" class="btn btn-sm btn-base dw-minicart mobileFixPadding"><i class="fa fa-sign-out"></i></a>
2591 </li>
2592
2593 <li class="dropdown flickerTrigger icons-li">
2594 <a href="Default.aspx?ID=@cartid" title="" id="minipagecart" class="dw-minicart"><i class="fa fa-cart-plus"></i><span class="cart-quantity"> @GetValue("Ecom:Order.OrderLines.TotalProductQuantity")</span></a>
2595 @if (currentpageid != cartid && currentpageid != GetPageIdByNavigationTag("expressbuy").ToString())
2596 {
2597 <ul class="sub-menu flickerFix">
2598 <li id="minicart">
2599
2600 @MiniCart()
2601
2602
2603 </li>
2604 </ul>
2605 }
2606 </li>
2607 }
2608 }
2609 </ul>
2610 </div>
2611
2612 </div>
2613
2614
2615 @GetValue("DwNavigation(topnavigationmegamenu)")
2616
2617
2618 }
2619 else
2620 {
2621 @GetValue("DwNavigation(topnavigation)")
2622 }
2623
2624 <!-- Extra navigation when no header is shown -->
2625 @if (GetBoolean("Item.Area.EcomEnabled"))
2626 {
2627 if (!GeneralSettings.Header.Show)
2628 {
2629 <ul class="nav navbar-nav">
2630 <li> </li>
2631 @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
2632 {
2633 <li class="dw-navbar-button"><a href="#" data-toggle="modal" data-target="#login" data-hover="dropdown"><i class="fa fa-sign-in"></i><span></span></a></li>
2634 <li class="dw-navbar-button"><a href="/not-logged-in/create-user-profile" data-hover="dropdown"><i class="fa fa-user"></i><span></span></a></li>
2635 }
2636
2637 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
2638 {
2639 <li class="dw-navbar-button">
2640 <a href='Default.aspx?ID=@Pageview.Area.Item["OrdersPageId"]' data-hover="dropdown">
2641 <nobr>
2642 <strong><i class="fa fa-user"></i></strong>
2643 </nobr>
2644 <span></span>
2645 </a>
2646 </li>
2647 <li class="dw-navbar-button">
2648 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID" data-hover="dropdown"><i class="fa fa-sign-out"></i><span></span></a>
2649 </li>
2650 }
2651
2652 <li class="dw-navbar-button">
2653 <a href="Default.aspx?ID=@cartid" title="" id="minipagecart-extra" 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>
2654 </li>
2655 </ul>
2656 }
2657
2658 if (GeneralSettings.Header.Mode != "solid")
2659 {
2660 <ul class="nav navbar-nav">
2661 <li class="dropdown dropdown-aux animate-click dw-navbar-button" data-animate-in="animated bounceInUp" data-animate-out="animated fadeOutDown" style="z-index:500;">
2662 <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown"><i class="fa fa-search"></i><span></span></a>
2663 <ul class="dropdown-menu dropdown-menu-user animate-wr">
2664 <li id="dropdownForm">
2665 <div class="dropdown-form">
2666 <form class="form-light p-15" role="form" method="get" action="Default.aspx">
2667 <input type="hidden" name="ID" value='@searchpage'>
2668 <div class="input-group">
2669 <input type="text" class="form-control typeahead-products" name="search" placeholder="@searchplaceholder">
2670 <span class="input-group-btn">
2671 <button class="btn btn-base" type="submit"><i class="fa fa-search"></i></button>
2672 </span>
2673 </div>
2674 </form>
2675 </div>
2676 </li>
2677 </ul>
2678 </li>
2679 </ul>
2680 }
2681 }
2682 </nav>
2683 </div>
2684
2685
2686 </div>
2687 </div>
2688
2689 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.HeaderLayoutImage")))
2690 {
2691 if (currentpageid != firstpageid)
2692 {
2693 var coverimage = GetString("Item.Area.HeaderLayoutImage");
2694
2695 <div class="container-fluid dw-header-image">
2696 <div class="row">
2697 <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>
2698 </div>
2699 </div>
2700 }
2701 else if (GeneralSettings.Header.ShowFrontpageImage)
2702 {
2703 var coverimage = GetString("Item.Area.HeaderLayoutImage");
2704
2705 <div class="container-fluid dw-header-image">
2706 <div class="row">
2707 <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>
2708 </div>
2709 </div>
2710 }
2711 }
2712 else if (GeneralSettings.Header.Mode != "solid")
2713 {
2714 if (currentpageid != firstpageid)
2715 {
2716 <div class="container-fluid dw-header-image">
2717 <div class="row">
2718 <section class="carousel carousel-1 slice fluid" style="height: 160px !important; background-color: transparent; background-size: cover !important;"></section>
2719 </div>
2720 </div>
2721 }
2722 }
2723
2724 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")) && GetLoop("DWExtranetSecondaryUsers").Count > 0)
2725 {
2726 var active = "";
2727 if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID")) && GetString("DwPageID") != GetString("DwAreaFirstActivePageID"))
2728 {
2729 active = "active-impersonating";
2730 }
2731 <div class="impersonation-panel @active">
2732 @*Impersonation*@
2733 <div class="container">
2734 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID")) && GetString("DwPageID") != GetString("DwAreaFirstActivePageID"))
2735 {
2736 string stopImpersonateTranslation = Translate("Stop impersonation", "Stop impersonation");
2737 <i class="fa fa-user-secret"></i>
2738 @Pageview.User.Name<text> </text>@Translate("is impersonated by")<text> </text>@GetGlobalValue("Global:Extranet.SecondaryUser.UserName")
2739
2740 <
2741 <form method="post">
2742 <input type="submit" class="btn btn-default" name="DwExtranetRemoveSecondaryUser" value="@stopImpersonateTranslation">
2743 </form>
2744 }
2745 else
2746 {
2747 <a href="/Default.aspx?ID=@ImpersonationPageId" title="View the list of users you can impersonate"><i class="fa fa-user-secret"></i>@Translate("View the list of users you can impersonate", "View the list of users you can impersonate")</a>
2748 }
2749 </div>
2750 </div>
2751 }
2752 @RenderSnippet("ErrorQuantity")
2753 </header>
2754 </div>
2755
2756 <!-- MAIN CONTENT -->
2757 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
2758
2759
2760 @GetValue("Title(Full width page)")
2761 @GetValue("Description(Use this page for full width pages with no left navigation.)")
2762
2763 @{
2764 string siteurl = GetGlobalValue("Global:Request.Url").ToString();
2765 string userGroup = "0";
2766 var b2bview = GetString("Item.Page.ListViewPage");
2767 var boxview = GetString("Item.Page.BoxViewPage");
2768 var request = HttpContext.Current.Request;
2769 }
2770 @SnippetStart("listviewpageid")@b2bview@SnippetEnd("listviewpageid")
2771 @SnippetStart("boxviewpageid")@boxview@SnippetEnd("boxviewpageid")
2772 <div class="userid hidden">@GetGlobalValue("Global:Extranet.UserID")</div>
2773 @if (GetLoop("DWExtranetSecondaryUsers").Count > 0)
2774 {
2775 <div class="check-user hidden">1</div>
2776 }
2777 else{
2778 <div class="check-user hidden">0</div>
2779 }
2780 @if (GetString("DW_extranet_Groups").Contains("6828"))
2781 {
2782 userGroup = "pets";
2783 }
2784 @if (GetString("DW_extranet_Groups").Contains("6829"))
2785 {
2786 userGroup = "riding";
2787 }
2788 @if (GetString("DW_extranet_Groups").Contains("6830"))
2789 {
2790 userGroup = "petRiding";
2791 }
2792 <div class="userGroup hidden">@userGroup</div>
2793
2794 @if(GetBoolean("Item.Page.LayoutShowBreadcrumb") && string.IsNullOrWhiteSpace(request["c"]))
2795 {
2796 <div class="pg-opt pin white">
2797 <div class="container">
2798 <div class="">
2799 @if (!GetBoolean("Item.Page.LayoutHideLeftMenu")){
2800 <div class="col-lg-3 col-md-3 hidden-sm hidden-xs">
2801 @if (GeneralSettings.Navigation.BreadcrumbMode != "light")
2802 {
2803 <div class="dw-breadcrumb-title">@GetGlobalValue("Global:Page.Top.Name")</div>
2804 }
2805 </div>
2806 }
2807 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
2808 @RenderNavigation(new
2809 {
2810 template = "breadcrumb.xslt"
2811 })
2812 </div>
2813 </div>
2814 </div>
2815 </div>
2816 }
2817
2818 else if (request["c"]=="cart")
2819 {
2820 if (GetBoolean("Item.Page.LayoutShowBreadcrumb"))
2821 {
2822 <div class="pg-opt pin white">
2823 <div class="container">
2824 <div class="">
2825 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
2826 @RenderSnippet("CustomBreadcrumb")
2827 </div>
2828 </div>
2829 </div>
2830 </div>
2831 }
2832 }
2833
2834 <section class="slice white animate-hover-slide">
2835 <div class="container">
2836
2837 <div class="row">
2838 @if (!GetBoolean("Item.Page.LayoutHideLeftMenu"))
2839 {
2840 <div class="col-md-3 hidden-sm hidden-xs">
2841 <div class="widget">
2842 <h3 class="dw-section-title dw-section-title-small"><span>@GetGlobalValue("Global:Page.Top.Name")</span></h3>
2843
2844 @RenderNavigation(new
2845 {
2846 startLevel = 1,
2847 expandmode = "all",
2848 endlevel = 6,
2849 template = "LeftNavigationEcom.xslt"
2850
2851
2852
2853 })
2854 <!--
2855 <ul class="dw-categories dwnavigation" id="leftnavigation" data-settings="startlevel:1;endlevel:10;template:LeftNavigationEcom.xslt;">
2856 <li><a href="#">Laptops <i> (20)</i></a></li>
2857 <li><a href="#">Tablets <i> (8)</i></a></li>
2858 <li><a href="#">Phones <i> (16)</i></a></li>
2859 </ul>
2860 -->
2861 </div>
2862 <p> </p>
2863 </div>
2864 }
2865
2866 @*The content*@
2867 @{
2868 var attributeValue = "col-md-9 col-sm-12 col-xs-12";
2869
2870 if (GetBoolean("Item.Page.LayoutHideLeftMenu"))
2871 {
2872 attributeValue = "col-md-12 col-sm-12 col-xm-12";
2873 }
2874 }
2875
2876 <div class="@attributeValue">
2877 <div class="row clearfix" id="maincontent">@GetValue("DwContent(maincontent)")</div>
2878 </div>
2879
2880 @*Facebook like button*@
2881 @if (GetBoolean("Item.Page.FacebookLikeButton"))
2882 {
2883 <div class="container">
2884 <div class="col-md-12 col-sm-12 col-xs-12">
2885 <div class="row">
2886 <iframe src="//www.facebook.com/plugins/like.php?href=@siteurl&width=200&layout=button_count&action=recommend&show_faces=true&share=true&height=21" style="border:none; overflow:hidden; height:21px;"></iframe>
2887 </div>
2888 </div>
2889 </div>
2890 }
2891 </div>
2892 </div>
2893 </section>
2894
2895
2896
2897
2898 <!-- FOOTER -->
2899 <div class="body-wrap @GeneralSettings.Site.LayoutMode">
2900 <footer class="footer">
2901 <div class="container">
2902 <div class="row">
2903 @if (GetBoolean("Item.Area.FooterShowContactInfo"))
2904 {
2905 <div class="col-md-3 col-sm-6 col-xs-12">
2906 <div class="col">
2907 <h4>@Translate("Contact us", "Contact us")</h4>
2908
2909 @{
2910 string footeremail = GetString("Item.Area.FooterEmail");
2911 string footerphone = GetString("Item.Area.FooterPhone").Replace(" ", "");
2912 }
2913
2914 <ul>
2915 <li>@GetValue("Item.Area.FooterCompanyName")</li>
2916 <li>@GetValue("Item.Area.FooterAddress")</li>
2917 <li>@Translate("Phone", "Phone"): <a href="tel:@footerphone">@footerphone</a></li>
2918 <li>@Translate("Email", "Email"): <a href="mailto:@footeremail" title="Email Us">@GetValue("Item.Area.FooterEmail")</a></li>
2919 </ul>
2920 <div> </div>
2921 </div>
2922 </div>
2923 }
2924
2925 @if (GetBoolean("Item.Area.FooterNewsletterSignUp"))
2926 {
2927 <div class="col-md-3 col-sm-6 col-xs-12">
2928 <div class="col">
2929 <h4>@Translate("Mailing list", "Mailing list")</h4>
2930 <p>@Translate("Sign up if you would like to receive occasional treats from us", "Sign up if you would like to receive occasional treats from us").</p>
2931 <form name="UserManagementEditForm" action="/Default.aspx?ID=@signUpPageId" method="POST" enctype="multipart/form-data">
2932 <input name="UserManagementForm" value="1" type="hidden">
2933 <input id="UserManagementForm.DeleteImage" name="UserManagementForm.DeleteImage" type="hidden">
2934 <div style="display: none;">
2935 <input name="UserManagement_Form_EmailAllowed" id="UserManagement_Form_EmailAllowed" value="True" checked="checked" type="checkbox">
2936 <input name="UserManagement_Form_EmailAllowed_ApplyValue" id="UserManagement_Form_EmailAllowed_ApplyValue" value="AllowEmail" type="hidden">
2937 </div>
2938 <div class="input-group">
2939 @{ attrValue = Translate("Your email address", "Your email address");}
2940
2941 <input name="UserManagement_Form_Email" id="UserManagement_Form_Email" type="email" class="form-control" placeholder="@attrValue" required="required">
2942 <span class="input-group-btn">
2943 <input class="btn btn-base" type="submit" id="submitter" value="Go">
2944 </span>
2945 </div>
2946 <div> </div>
2947 </form>
2948 </div>
2949 </div>
2950
2951 }
2952
2953
2954
2955
2956
2957 <div class="col-md-3 col-sm-6 col-xs-12">
2958 <div class="col">
2959 <h4>@Translate("Social links", "Social links")</h4>
2960 <p>
2961 <!--Hardcoded because of bad performance in Social List-->
2962 <a href="https://www.linkedin.com/company/eldorado-a-s/"><i class="fa fa-linkedin-square fa-2x"></i> </a>
2963 <a href="https://www.facebook.com/eldoradohaderslev/"><i class="fa fa-facebook-square fa-2x"></i> </a>
2964 <a href="https://instagram.com/eldorado_pet?igshid=wc8siauyd8zl"><i class="fa fa-instagram fa-2x"></i> </a>
2965 </p>
2966 </div>
2967 </div>
2968
2969
2970 @if (GetBoolean("Item.Area.FooterShowSitemap"))
2971 {
2972 <div class="col-md-6 col-sm-12 col-xs-12">
2973 <div class="col">
2974 @GetValue("DwNavigation(footersitemap)")
2975 </div>
2976 <div> </div>
2977 </div>
2978 }
2979 </div>
2980
2981 <hr>
2982 <div class="row">
2983 <div class="col-lg-9 col-md-9 col-sm-9 col-xs-9 copyright">
2984 <div class="col">
2985 <p>@GetGlobalValue("Global:Server.Date.Year") © @GetValue("Item.Area.FooterCompanyName"). @Translate("All rights reserved.", "All rights reserved.")</p>
2986 </div>
2987 </div>
2988 @if (GetString("Item.Area.WebmasterLinkCode") != "")
2989 {
2990 <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
2991 <div class="col pull-right">
2992 @{
2993 var webmasterlink = GetString("Item.Area.WebmasterLinkCode");
2994 var username = GetValue("Item.Area.FooterEmail");
2995 var pagename = GetGlobalValue("Global:Page.Name");
2996 }
2997
2998 <p><a href="javascript:void(0);" rel="nofollow" onclick="window.open('@webmasterlink?un=@username&pn=@pagename&url=' + encodeURI(location),'_blank','width=1050,height=750,resizable=yes,scrollbars=yes');">Webmaster</a></p>
2999 </div>
3000 </div>
3001 }
3002 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image))
3003 {
3004 <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
3005 <div class="col pull-right">
3006 <a href="/Default.aspx?ID=@firstpageid" class="brand" title="@Translate(" eldorado")"="">
3007 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image))
3008 {
3009 <img class="img-responsive pull-right" src="@GeneralSettings.Logo.Image" alt="@Translate(" eldorado")"="">
3010 }
3011
3012 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text))
3013 {
3014 <div class="dw-logotext pull-left">@GeneralSettings.Logo.Text</div>
3015 }
3016 </a>
3017 </div>
3018 </div>
3019 }
3020 </div>
3021 </div>
3022 </footer>
3023 </div>
3024 </div>
3025 @if (GetBoolean("Item.Area.ShowNewsletterPopup"))
3026 {
3027 <div class="newsletter-popup--wrap closed">
3028 <div class="newsletter-popup">
3029 <a class="close-popup" href="javascript:void(0);" title="Close"><i class="fa fa-times" aria-hidden="true" style="top: 0px; position: relative;"></i></a>
3030 <h2>@Translate("Signup newsletter", "Signup newsletter")</h2>
3031
3032
3033 <div class="row">
3034
3035 <div class="col-md-12">
3036 <!--$$Global:Paragraph.Content(@newsletterid)-->
3037 </div>
3038 </div>
3039
3040
3041 </div>
3042 <div class="comfirm-msg" style="display:none;">
3043 Thank you!<br>
3044
3045 </div>
3046 </div>
3047 <div class="newsletter-popup--teaser opened" style="bottom: 0px; display: block;">
3048 <a href="javascript:void(0);" title="">
3049 @Translate("SIGNUP NEWSLETTER", "SIGNUP NEWSLETTER")
3050 </a>
3051 </div>
3052 }
3053 <!--[if IE]>
3054 <style>
3055
3056 .widget.affix{
3057
3058 width:21% !important;
3059
3060 }
3061
3062
3063 </style>
3064 <![endif]-->
3065 <!-- Essentials -->
3066
3067 <script src="/Files/Templates/Designs/Eldorado/js/jquery.mousewheel.min.js"></script>
3068 <script src="/Files/Templates/Designs/Eldorado/js/jquery.easing.min.js"></script>
3069 <script src="/Files/Templates/Designs/Eldorado/js/jquery.fancybox.min.js"></script>
3070 <script src="/Files/Templates/Designs/Eldorado/js/modernizr.min.js"></script>
3071 <script src="/Files/Templates/Designs/Eldorado/js/bootstrap.min.js"></script>
3072 <script src="/Files/Templates/Designs/Dwsimple/js/typeahead.js"></script>
3073 <script src="/Files/Templates/Designs/Eldorado/js/blazy.js"></script>
3074 <script src="/Files/Templates/Designs/Eldorado/js/MatchVariants.js"></script>
3075 <script src="/Files/Templates/Designs/Eldorado/js/handlebars-v4.0.11.js"></script>
3076 <script src="/Files/Templates/Designs/Eldorado/js/Request.js"></script>
3077
3078 <script src="/Files/Templates/Designs/Eldorado/js/HandlebarsBolt.js"></script>
3079 <script src="/Files/Templates/Designs/Eldorado/js/master.min.js"></script>
3080 <script src="/Files/Templates/Designs/Dwsimple/js/jquerybxslidermin.js"></script>
3081 <script src="/Files/Templates/Designs/Eldorado/js/jquery.form.js"></script>
3082 <script src="/Files/Templates/Designs/Eldorado/js/spin.min.js"></script>
3083 <script src="/Files/Templates/Designs/Eldorado/js/GeneralMethods.js"></script>
3084 <script src="/Files/Templates/Designs/Eldorado/js/cart.js?v=1"></script>
3085
3086 <!-- Assets -->
3087 <script src="/Files/Templates/Designs/Eldorado/js/bootstrap-hover-dropdown.min.js"></script>
3088
3089 <script src="/Files/Templates/Designs/Eldorado/js/spin.min.js"></script>
3090
3091 <!-- Sripts for individual pages, depending on what plug-ins are used -->
3092 <script type="text/javascript" src="/Files/Templates/Designs/Eldorado/js/jasny-bootstrap.min.js"></script>
3093
3094 <script src="/Files/Templates/Designs/Eldorado/js/ProductVariantsAjax.js"></script>
3095 <script src="/Files/Templates/Designs/Eldorado/js/custom.js?v=1.3"></script>
3096 <script>
3097 $(document).ready(function () {
3098 if (window.location.href.indexOf("?CreatedProfile=True") > -1) {
3099 $(".newsletter-popup--wrap").addClass("open").removeClass("closed");
3100 }
3101 });
3102 </script>
3103 <!-- Replacing the Home text -->
3104 <script>
3105 if (document.getElementById("homemenubtn")) {
3106 document.getElementById("homemenubtn").innerHTML = "<i class='fa fa-home fa-2'></i><span></span>";
3107 }
3108 </script>
3109
3110 <script type="text/html-template" id="OrderlineAjaxTemplate">
3111 <tr>
3112 <td class="text-center">
3113 <div class="image">
3114 <img src="/Admin/Public/GetImage.ashx?width=50&height=50&crop=5&image=Obj.image&Compression=99&altFmImage_path=/Files/Images/Ecom/missing_image.jpg" class="img-center" alt="">
3115 </div>
3116 </td>
3117 <td>
3118 <a href="Obj.productlink">
3119 Obj.name
3120 </a>
3121 </td>
3122 <td class="text-right">Obj.quantity</td>
3123 <td class="text-right">
3124 <nobr>
3125 Obj.totalprice
3126 </nobr>
3127 </td>
3128 </tr>
3129 </script>
3130
3131 <script type="text/html-template" id="NotProductAjaxTemplate">
3132 <tr class="Obj.discountclass">
3133 <td class="text-center">
3134 <i class="fa Obj.icon"></i>
3135 </td>
3136 <td>
3137 <a href="Obj.productlink">
3138 Obj.name
3139 </a>
3140 </td>
3141 <td colspan="2" class="text-right">
3142 <nobr>
3143 Obj.totalprice
3144 </nobr>
3145 </td>
3146 </tr>
3147 </script>
3148
3149
3150 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")) && currentpageid != cartid && currentpageid != GetPageIdByNavigationTag("expressbuy").ToString())
3151 {
3152 <!-- Initialize Fancybox -->
3153 <script type="text/javascript">
3154 $(document).ready(function () {
3155
3156 MiniCartInit(@JSONFeedForCart, @productsPageId);
3157
3158
3159
3160 });
3161 </script>
3162 }
3163 <script>
3164 $(document).ready(function () {
3165
3166 function Confirm(title, msg, $true, $false, $link) { /*change*/
3167 var $content = "<div class='dialog-ovelay'>" +
3168 "<div class='dialog'><header>" +
3169 " <h3> " + title + " </h3> " +
3170 "<i class='fa fa-close'></i>" +
3171 "</header>" +
3172 "<div class='dialog-msg'>" +
3173 " <p> " + msg + " </p> " +
3174 "</div>" +
3175 "<footer>" +
3176 "<div class='controls'>" +
3177 " <button class='button btn btn-dw-primary doAction'>" + $true + "</button> " +
3178 " <button class='button btn btn-secondary cancelAction'>" + $false + "</button> " +
3179 "</div>" +
3180 "</footer>" +
3181 "</div>" +
3182 "</div>";
3183 $('body').prepend($content);
3184 $('.doAction').click(function () {
3185 window.location.href=$link; /*new*/
3186 $(this).parents('.dialog-ovelay').fadeOut(500, function () {
3187 $(this).remove();
3188 });
3189 });
3190 $('.cancelAction, .fa-close').click(function () {
3191 $(this).parents('.dialog-ovelay').fadeOut(500, function () {
3192 $(this).remove();
3193 });
3194 });
3195
3196 }
3197 $('#opener').click(function (e) {
3198 e.preventDefault();
3199 Confirm('@Translate("Empty cart")', '@Translate("Are you sure that you want to empty your cart?")', '@Translate("Yes")', '@Translate("Cancel")', "/Default.aspx?ID=@GetGlobalValue("Global:Page.ID")&cartcmd=emptycart"); /*change*/
3200 });
3201
3202 if ($('.fancybox').length) {
3203 $(".fancybox").fancybox();
3204 }
3205 if ($(window).width() > 991) {
3206 $('.product').each(function (i) {
3207 var group = $(this);
3208 var groupchild = group.find(".thumbs");
3209 var groupchildID = groupchild.find("a").attr("data-id");
3210 var groupchildstock = groupchild.find(".stock-wrapper");
3211 var groupnumber = groupchild.find("a").attr("data-varnumber");
3212 var groupname = groupchild.find("a").attr("data-name");
3213 var groupchildimage = group.find(".large-image");
3214 var groupImageLarge = groupchildimage.find(".largeImage");
3215 var groupvariantid = groupchild.find(".variantid").attr("data-id");
3216 var varainttext = "";
3217 var groupSizesID = groupchild.find(".variantid").attr("data-id");
3218 var sizes = group.find(".listproductinfo").find(".sizes");
3219 var sizesbox = group.find(".large-image").find(".sizes");
3220 var defaultsizesbox = group.find(".large-image").find(".default-sizes");
3221 var defaultsizes = group.find(".listproductinfo").find(".default-sizes");
3222 var defaultnumber = group.find(".listproductinfo").find("p.name");
3223 var defaultstock = group.find(".listproductinfo").find(".stock-change");
3224 var defaultname = group.find(".listproductinfo").find(".longproductdescription").find("p.text-center");
3225 var defaultnamelist = group.find(".extracolumn ").find(".product-title").find("a.link-name");
3226 var defaultnumberlist = group.find(".shortproductdescription").find("p.name");
3227 var defaultlink = group.find(".listproductinfo").find(".longproductdescription").find("a");
3228 var defaultlinkimg = group.find(".listproductright").find(".gallery-container").find("a");
3229
3230 groupchild.delegate('img', 'mouseover', function () {
3231 groupImageLarge.attr('src', $(this).attr('src').replace('&height=150&width=150&crop=5', '&height=300&width=300&crop=5&&altFmImage_path=/Files/Images/Ecom/missing_image.gif'));
3232 groupchildID = $(this).closest("a").attr('data-id');
3233
3234 $(this).closest("a").addClass("current");
3235 $(this).closest('.thumbs').children('.variantid').removeClass('selected');
3236 $(this).closest('.thumbs').children('.variantid[data-id= ' + groupchildID + ']').toggleClass('selected');
3237 groupvariantid = $(this).closest('.thumbs').children(".variantid.selected");
3238 varainttext = groupvariantid.html();
3239 groupchildnumber = $(this).closest("a").attr('data-varnumber');
3240 groupchildname = $(this).closest("a").attr('data-name');
3241 groupchildlink = $(this).closest("a").attr('data-link');
3242
3243 defaultnumber.text(groupchildnumber);
3244 defaultname.text(groupchildname);
3245
3246 defaultnumberlist.text(groupchildnumber);
3247 defaultnamelist.text(groupchildname);
3248 defaultlink.attr("href", groupchildlink);
3249 defaultlinkimg.attr("href", groupchildlink);
3250 sizes.removeClass("hidden");
3251 sizesbox.removeClass("hidden")
3252 sizes.html(varainttext);
3253 sizesbox.html(varainttext);
3254 defaultsizes.addClass("hidden");
3255 defaultsizesbox.addClass("hidden");
3256 if (sizes.children(".wrapper-ellisis").height() > 25) {
3257 sizes.children(".wrapper-ellisis").css({
3258 'overflow': 'hidden',
3259 'width': '170px',
3260 'height': '25px'
3261 })
3262 sizes.children(".read-more").removeClass('hidden').css({
3263 'display:': 'inline-block'
3264 })
3265 $('[data-toggle="tooltip"]').tooltip();
3266 }
3267
3268 });
3269
3270 group.mouseleave(function (event) {
3271 var src = $(this).find(".large-image").find(".largeImage");
3272 var number = $(this).find(".listproductinfo").children(".extracolumn").find("p.name");
3273 var name = $(this).find(".listproductinfo").children(".extracolumn").children(".longproductdescription").find("p.text-center");
3274 var link = $(this).find(".listproductinfo").children(".extracolumn").children(".longproductdescription").find("a.link-name");
3275 var linkimg = $(this).find(".listproductright").children(".gallery-container").find("a.link-name");
3276 var numberlist = $(this).find(".extracolumn").children(".shortproductdescription").find("p.name");
3277 var namelist = $(this).find(".extracolumn").children(".product-title").find("a.link-name");
3278
3279 src.attr('src', src.attr('data-src').replace('&height=150&width=150&crop=5', '&height=300&width=300&crop=5&&altFmImage_path=/Files/Images/Ecom/missing_image.gif'));;
3280 number.text(number.attr('data-defnumber'));
3281 name.text(name.attr('data-defname'));
3282 link.attr('href', link.attr('data-deflink'));
3283 linkimg.attr('href', link.attr('data-deflink'));
3284 numberlist.text(numberlist.attr('data-defnumber'));
3285 namelist.text(namelist.attr('data-defname'));
3286 namelist.attr('href', namelist.attr('data-deflink'));
3287 defaultsizes.removeClass("hidden");
3288 sizes.addClass("hidden");
3289 sizesbox.addClass("hidden");
3290 $('[data-toggle="tooltip"]').tooltip();
3291 defaultsizesbox.removeClass("hidden");
3292 });
3293 group.click(function () {
3294 $(this).off('mouseover').off('mouseleave')
3295 });
3296 });
3297 }
3298
3299 })
3300 function underlineActiveArea(){
3301 var areaId = @GetString("DwAreaID")+"area";
3302 document.getElementById(areaId).className = "activeArea";
3303 }
3304 underlineActiveArea();
3305 </script>
3306
3307 @{
3308 var typeaheadWithPrice = "<div class='clearfix'><div class='col-xs-8 text-left'><a href='{{link}}' title='{{name}}'><img class='tt-img' src='/Files/Templates/Designs/Eldorado/%7B%7Bimage%7D%7D'><div class='left-col'><strong class='name'>{{name}}</strong><br><div class='tt-number'>{{number}}</div><div class='tt-price'>{{price}}</div></div></a></div><div class='col-xs-4'><div class='sug-size name {{size}}'>{{size}}</div><div class='sug-color {{color}}'>{{color}}</div><div class='clearfix'></div></div>";
3309 var typeaheadWithoutPrice = "<div class='clearfix'><div class='col-xs-12 text-left'><a href='{{link}}' title='{{name}}'><img class='tt-img' src='/Files/Templates/Designs/Eldorado/%7B%7Bimage%7D%7D' data-test='{{image}}'><div class='left-col'><strong class='name'>{{name}}</strong><br><div class='tt-number'>{{number}}</div></div></a></div><div class='col-xs-4'><div class='sug-size name {{size}}'>{{size}}</div><div class='sug-color {{color}}'>{{color}}</div><div class='clearfix'></div></div>";
3310 var typeaheadCompileString = !Dynamicweb.Core.Converter.ToBoolean(@GetGlobalValue("Global:Extranet.UserName")) ? typeaheadWithoutPrice : typeaheadWithPrice;
3311 }
3312
3313 <script>
3314 $(".flickerTrigger").hover(function () {
3315 $(".flickerFix").toggleClass("active");
3316 });
3317 var searchProducts = new Bloodhound({
3318 datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
3319 queryTokenizer: Bloodhound.tokenizers.whitespace,
3320 remote: {
3321 url: '/Default.aspx?ID=@productsAjaxPageId&Search=%QUERY',
3322 wildcard: '%QUERY'
3323 }
3324 });
3325 if ($('#topnavigationmegamenu').children().length == 0){
3326 $('#topnavigationmegamenu').removeClass("second-level")
3327 }
3328 //Typeahead search//
3329 var searchProducts = new Bloodhound({
3330 datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
3331 queryTokenizer: Bloodhound.tokenizers.whitespace,
3332 remote: {
3333 url: '/Default.aspx?ID=@productsAjaxPageId&q=%QUERY',
3334 wildcard: '%QUERY',
3335 filter: function (searchProducts) {
3336 self.resultsCount = searchProducts.length;
3337 console.log(searchProducts)
3338 return searchProducts;
3339
3340 }
3341 }
3342 });
3343
3344 $('.typeahead-products').typeahead(null, {
3345 name: 'name',
3346 display: 'name',
3347 source: searchProducts,
3348 templates: {
3349 empty: [
3350 '<div class="empty-message">',
3351 'No results found',
3352 '</div>'
3353 ].join('\n'),
3354 suggestion: Handlebars.compile('@typeaheadCompileString.Replace("%7B","{").Replace("%7D","}").Replace("'","\"").Replace("/Files/Templates/Designs/Eldorado/", "")')
3355 }
3356 }).on('blur', function () {
3357 ev = $.Event("keydown");
3358 ev.keyCode = ev.which = 40;
3359 $('.typeahead-products').trigger(ev);
3360 return true;
3361
3362 });
3363
3364
3365
3366 $(".quickbuy-dropdown .input-group-btn button").on("click", function(){
3367
3368
3369 });
3370
3371
3372 $('.bxslider').bxSlider({
3373 mode: 'fade',
3374 captions: true
3375 });
3376
3377
3378 </script>
3379
3380 @RenderSnippet("JavaScriptBottom")
3381
3382
3383 <script>
3384 $(document).ready(function () {
3385 $('.icons-li').on('show.bs.dropdown', function () {
3386 setTimeout(function () { $('.typeahead-products.tt-input').focus(); }, 10);
3387 });
3388 $('.nav-stacked .offcanvas-menubtn').has('ul').addClass('innerMenuMobile');
3389 $("<div class='mobileMenuFix' onclick='toggleCheck(this)'><i class='fa fa-plus'></i></div>").insertBefore(".is-innerMenu");
3390 $(".nav-stacked .0 i").remove();
3391 $("#loginform").on("submit", function () {
3392 $('<div class=loadingDiv><img src="/files/templates/designs/Eldorado/images/spinner.gif" alt="" /><p style="margin-top:20px;">@Translate("Du logges ind og evt. varekurv hentes")</p></div>').prependTo($("#loginform"));
3393 });
3394 });
3395 </script>
3396
3397 <script>
3398 function toggleCheck(elem) {
3399 jQuery(elem).parent().children("ul").toggle();
3400 jQuery(elem).find(".fa").toggleClass('fa-plus fa-minus');
3401 }
3402
3403 function toggleCheckTopNav() {
3404 $("#toggleTopNav").children("ul").toggle();
3405 }
3406 </script>
3407
3408 <script src="/Files/Templates/Designs/Eldorado/js/lightslider.min.js"></script>
3409 </div></div></body>
3410 </html>
3411