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