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