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