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