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