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