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