Error executing template "Designs/Dwsimple/_parsed/catalogueProduct.parsed.cshtml"
System.IO.IOException: The process cannot access the file 'D:\dynamicweb.net\Solutions\interspiro.cloud.dynamicweb-cms.com\Files\Templates\Designs\Dwsimple\css\DWGlobalStylesSite1_auto.css' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
at Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(String value, String path, Boolean appendToFile, Encoding encoding)
at CompiledRazorTemplates.Dynamic.RazorEngine_a0be1515c0b34a31b336c800e1a5e0ab.Execute() in D:\dynamicweb.net\Solutions\interspiro.cloud.dynamicweb-cms.com\Files\Templates\Designs\Dwsimple\_parsed\catalogueProduct.parsed.cshtml:line 2582
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 @using Dynamicweb.Frontend.Devices
8 @using Dynamicweb.Extensibility
9 @using Dynamicweb.Content
10 @using Dynamicweb.Security.UserManagement;
11 @using Dynamicweb.Security.UserManagement.Common.CustomFields;
12 @using Dynamicweb
13 @using System.Linq
14 @using System.IO
15 @using Dynamicweb.Rendering;
16 @using Dynamicweb.Ecommerce
17 @using User = Dynamicweb.Security.UserManagement.User
18 @using System.Text.RegularExpressions
19 @using System.Web
20
21
22 @functions{
23 public class WrapMethods
24 {
25 //Gets the contrasting color
26 public static string getContrastYIQ(string hexcolor)
27 {
28 if (hexcolor != "")
29 {
30 hexcolor = Regex.Replace(hexcolor, "[^0-9a-zA-Z]+", "");
31
32 int r = Convert.ToByte(hexcolor.Substring(0, 2), 16);
33 int g = Convert.ToByte(hexcolor.Substring(2, 2), 16);
34 int b = Convert.ToByte(hexcolor.Substring(4, 2), 16);
35 int yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;
36
37 if (yiq >= 128)
38 {
39 return "black";
40 }
41 else
42 {
43 return "white";
44 }
45 }
46 else
47 {
48 return "black";
49 }
50 }
51
52
53 //Truncate text
54 public static string Truncate (string value, int count, bool strip=true)
55 {
56 if (strip == true){
57 value = StripHtmlTagByCharArray(value);
58 }
59
60 if (value.Length > count)
61 {
62 value = value.Substring(0, count - 1) + "...";
63 }
64
65 return value;
66 }
67
68
69 //Strip text from HTML
70 public static string StripHtmlTagByCharArray(string htmlString)
71 {
72 char[] array = new char[htmlString.Length];
73 int arrayIndex = 0;
74 bool inside = false;
75
76 for (int i = 0; i < htmlString.Length; i++)
77 {
78 char let = htmlString[i];
79 if (let == '<')
80 {
81 inside = true;
82 continue;
83 }
84 if (let == '>')
85 {
86 inside = false;
87 continue;
88 }
89 if (!inside)
90 {
91 array[arrayIndex] = let;
92 arrayIndex++;
93 }
94 }
95 return new string(array, 0, arrayIndex);
96 }
97
98 //Make the correct count of columns
99 public static string ColumnMaker(int Col, string ScreenSize)
100 {
101 string Columns = "";
102
103 switch (Col)
104 {
105 case 1:
106 Columns = "col-"+ScreenSize+"-12";
107 break;
108
109 case 2:
110 Columns = "col-"+ScreenSize+"-6";
111 break;
112
113 case 3:
114 Columns = "col-"+ScreenSize+"-4";
115 break;
116
117 case 4:
118 Columns = "col-"+ScreenSize+"-3";
119 break;
120
121 default:
122 Columns = "col-"+ScreenSize+"-3";
123 break;
124 }
125
126 return Columns;
127 }
128
129
130 private string Custom(string firstoption, string secondoption)
131 {
132 if (firstoption == "custom")
133 {
134 return secondoption;
135 }
136 else
137 {
138 return firstoption;
139 }
140 }
141 }
142 }
143
144
145
146
147
148 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
149
150 @helper MiniCart()
151 {
152 <div class="dropdown-cart">
153 <div id="full-cart">
154 <div class="col-md-12 col-sm-12 col-xs-12">
155 <div class="row" id="minicart-content">
156 <div class="cart-items">
157 @Translate("You have", "You have") <span id="mincart-total-items"></span> @Translate("items in your cart", "items in your cart")
158 </div>
159 <div class="clearfix cart-items">
160
161 <div class="">
162 <button class="btn btn-xs btn-secondary pull-left" onclick="EmptyCart();">@Translate("Empty cart", "Empty cart")</button>
163 </div>
164 <div class="">
165 @{
166 var cartid = GetValue("DwAreaCartPageID");
167 }
168
169 <a href="Default.aspx?ID=@cartid" class="btn btn-xs btn-primary pull-right">@Translate("Proceed to checkout", "Proceed to checkout")</a>
170 <span class="clearfix"></span>
171 </div>
172 </div>
173
174
175
176
177
178
179 <table class="table table-cart">
180
181 <thead>
182 <tr>
183 <th></th>
184 <th>@Translate("Product", "Product")</th>
185 <th class="text-center">@Translate("Qty", "Qty")</th>
186 <th class="text-right">@Translate("Total", "Total")</th>
187 </tr>
188 </thead>
189 <tbody>
190
191 @* Orderlines are rendered from the Ajax template *@
192
193 </tbody>
194 <tfoot>
195 @*<tr>
196 <td class="text-center"><i class="fa fa-credit-card"></i></td>
197 <td id="minicart-payment"></td>
198 <td class="text-center"></td>
199 <td class="text-right" id="minicart-paymentfee"></td>
200 </tr>
201 <tr>
202 <td class="text-center"><i class="fa fa-truck"></i></td>
203 <td id="minicart-shipping"></td>
204 <td class="text-center"></td>
205 <td class="text-right" id="minicart-shippingfee"></td>
206 </tr>*@
207
208 <tr id="hideDiscount">
209 <td></td>
210 <td>@Translate("Discount", "Discount")</td>
211 <td class="text-center"></td>
212 <td class="text-right" id="minicart-discount"></td>
213 </tr>
214
215 <tr id="hideTieredDiscount">
216 <td></td>
217 <td>@Translate("Invoice discount", "Invoice discount")</td>
218 <td class="text-center"></td>
219 <td class="text-right" id="minicart-tiered-discount"></td>
220 </tr>
221
222 <tr>
223 <td></td>
224 <td><strong>@Translate("Total", "Total")</strong></td>
225 <td class="text-center" id="minicart-total"></td>
226 <td class="text-right" id="minicart-totalprice"></td>
227 </tr>
228
229 </tfoot>
230 </table>
231 </div>
232 </div>
233
234 </div>
235 <span class="cart-items" id="empty-cart">@Translate("Your shopping cart is empty", "Your shopping cart is empty")</span>
236 </div>
237 }
238 @{
239
240 var request = HttpContext.Current.Request;
241 string prodID = request["productid"];
242 List<Dynamicweb.Content.Page>
243 languages = new List<Dynamicweb.Content.Page>
244 ();
245 if (Pageview.Area.IsMaster)
246 {
247 languages.Add(Pageview.Page);
248 if (Pageview.Page.Languages != null)
249 {
250 foreach (var language in Pageview.Page.Languages)
251 {
252 languages.Add(language);
253 }
254 }
255 }
256 else
257 {
258 languages.Add(Pageview.Page.MasterPage);
259 if (Pageview.Page.MasterPage != null)
260 {
261 if (Pageview.Page.MasterPage.Languages != null)
262 {
263 foreach (var language in Pageview.Page.MasterPage.Languages)
264 {
265 languages.Add(language);
266 }
267 }
268 }
269 }
270 string siteLanguage = Pageview.Area.CultureInfo.Name;
271 Uri url = Dynamicweb.Context.Current.Request.Url;
272 string hostName = url.Host; // domain.com/da-dk or domain.com/en-us
273 if (siteLanguage.Contains("-"))
274 {
275 siteLanguage = siteLanguage.Split('-')[0];
276 }
277 }
278
279 <!DOCTYPE html>
280 <html lang="@siteLanguage">
281
282 <head>
283 <meta charset="utf-8">
284 <title>@GetValue("Title")</title>
285 @GetValue("MetaTags")
286 @GetValue("CopyRightNotice")
287
288
289 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
290 <meta name="robots" content="index, follow">
291 @if (siteLanguage == "en")
292 {
293 <link rel="sitemap" type="application/xml" title="Sitemap" href="/files/files/en/sitemap.xml">
294 }
295 else if (siteLanguage == "de")
296 {
297 <link rel="sitemap" type="application/xml" title="Sitemap" href="/files/files/de/sitemap.xml">
298 }
299 else if (siteLanguage == "sv")
300 {
301 <link rel="sitemap" type="application/xml" title="Sitemap" href="/files/files/se/sitemap.xml">
302 }
303 @{
304 string MetaKeywords = GetString("Meta.Keywords");
305 }
306 @if (string.IsNullOrWhiteSpace(prodID))
307 {
308 string MetaDescription = GetString("Meta.Description");
309
310 }
311 else
312 {
313 @RenderSnippet("MetaDescription")
314 }
315
316 @{
317 var alreadyWrittenTwoletterIsos = new List<string>();
318 @* Languages meta data *@
319 foreach (var language in languages)
320 {
321 hostName = url.Host;
322 if (language?.Area != null)
323 {
324 if (language.Area?.MasterArea != null && !string.IsNullOrEmpty(language.Area.MasterArea.DomainLock))
325 {
326 hostName = language.Area.MasterArea.DomainLock; //dk.domain.com or dk-domain.dk
327 }
328 if (language != null && language.Published && language.Area.Active && language.Area.Published)
329 {
330 if (!string.IsNullOrEmpty(language.Area.DomainLock))
331 {
332 hostName = language.Area.DomainLock; //dk.domain.com or dk-domain.dk
333 }
334 string querystring = $"Default.aspx?ID={language.ID}";
335 if (!string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.QueryString["GroupID"]))
336 {
337 querystring += $"&GroupID={Dynamicweb.Context.Current.Request.QueryString["GroupID"]}";
338 }
339 if (!string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.QueryString["ProductID"]))
340 {
341 querystring += $"&ProductID={Dynamicweb.Context.Current.Request.QueryString["ProductID"]}";
342 }
343 if (!string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.QueryString["VariantID"]))
344 {
345 querystring += $"&VariantID={Dynamicweb.Context.Current.Request.QueryString["VariantID"]}";
346 }
347 string friendlyUrl = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(querystring);
348 if (language.Area.RedirectFirstPage && language.ParentPageId == 0 && language.Sort == 1)
349 {
350 friendlyUrl = "/";
351 }
352 string href = $"{url.Scheme}://{hostName}{friendlyUrl}";
353 if (!alreadyWrittenTwoletterIsos.Contains(language.Area.CultureInfo.Name))
354 {
355 <link rel="alternate" hreflang="@language.Area.CultureInfo.Name.ToLower()" href="@href">
356 }
357
358 }
359 }
360 }
361
362 }
363
364
365
366 <!-- Facebook Admin -->
367 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.FacebookCommendAdmin")))
368 {
369 string fbadmin = GetString("Item.Area.FacebookCommendAdmin");
370 <meta property="fb:admins" content="@fbadmin">
371 }
372
373 <!-- Essential styles -->
374 <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" type="text/css">
375 <link rel="stylesheet" href="/Files/Templates/Designs/Dwsimple/css/font-awesome.min.css" type="text/css">
376 <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css" media="screen">
377 <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/flag-icon-css/2.5.0/css/flag-icon.min.css" type="text/css">
378
379 <!-- Mobile menu styles -->
380 <link href="//cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/css/jasny-bootstrap.min.css" rel="stylesheet" type="text/css" media="screen">
381
382 <!-- Favicon -->
383 @{
384 var favicon = @GetString("Item.Area.Favicon");
385 }
386 <link href="@favicon" rel="icon" type="image/png">
387
388 <!-- Variables -->
389 @{
390
391 var attrValue = "";
392 string currentpageid = GetString("DwPageID");
393 string firstpageid = GetString("DwAreaFirstActivePageID");
394 string logoutid = GetString("Item.Area.LogOutId");
395 string searchplaceholder = Translate("Search products", "Search products");
396 string searchplaceholderAll = Translate("What are you searching for?", "What are you searching for?");
397 string newsletterid = GetString("Item.Area.NewsletterSignUpFormParagrahId");
398 var cartid = GetValue("DwAreaCartPageID");
399 var searchpage = GetString("Item.Area.ShowSearchPage");
400 int cartPageId = GetPageIdByNavigationTag("CartPage");
401 int quickOrder = GetPageIdByNavigationTag("QuickOrder");
402 string miniCartFeedPageId = GetString("Item.Area.JSONFeedForCart");
403 string ProductPageId = GetString("Item.Area.ProductPageId");
404 string ImpersonationPage = GetString("Item.Area.ImpersonationPage");
405 DateTime areaUpdated = DateTime.Now;
406 string cssPath = HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.min.css");
407 DateTime lastWriteTime = System.IO.File.GetLastWriteTime(cssPath);
408 bool writeCss = false;
409 string css = String.Empty;
410 string GTM_ID = "";
411 if (!string.IsNullOrWhiteSpace(GetString("Item.Area.GTM_ID")))
412 {
413 GTM_ID = GetString("Item.Area.GTM_ID");
414
415 }
416
417
418 if (areaUpdated > lastWriteTime.AddMinutes(1))
419 {
420 writeCss = true;
421 }
422
423 string downloadLink = GetString("Item.Area.DowloadsLink");
424 string pressLink = GetString("Item.Area.PressLink");
425 string landingPageLink = GetString("Item.Area.LandingPagesLink.Value");
426 string landingPageText = GetString("Item.Area.LandingPagesText.Value");
427 string myProductsPage = GetString("Item.Area.MyProductsPage");
428 string favoritesList = GetString("Item.Area.FavoritePage");
429 string eLearninglink = GetString("Item.Area.ELearningLink");
430 var deviceType = Dynamicweb.Frontend.PageView.Current().Device.ToString();
431 var userId = Dynamicweb.Frontend.PageView.Current().User != null ? Dynamicweb.Frontend.PageView.Current().User.ID : 0;
432
433 if (userId > 0)
434 {
435 var defaultFavList = Dynamicweb.Ecommerce.CustomerCenter.CustomerProductList.GetDefaultList(userId);
436 var defaultFavListId = defaultFavList != null ? defaultFavList.ListId : 0;
437
438 if (defaultFavListId > 0)
439 {
440 myProductsPage = $"{favoritesList}&ListID={defaultFavListId}";
441 }
442 else
443 {
444 myProductsPage = $"{favoritesList}";
445 }
446 }
447
448 HttpCookie cookieOptInLevel = HttpContext.Current.Request.Cookies["Dynamicweb.CookieOptInLevel"];
449 int optInLevel = 0;
450 if (cookieOptInLevel != null)
451 {
452 optInLevel = Int32.Parse(cookieOptInLevel.Value);
453 }
454
455 }
456
457 <!-- Value defining the cookie consent choice of the user. 0 is absolute minimum. 2 is all. Value used in custom.js. -->
458 <script>
459 const optInLevel = @optInLevel;
460 </script>
461 <script>
462 window.dataLayer = window.dataLayer || [];
463 </script>
464 <!-- Google Tag Manager -->
465 <script>
466 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
467 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
468 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
469 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
470 })(window, document, 'script', 'dataLayer', '@(GTM_ID)');
471
472 function gtag() { dataLayer.push(arguments); }
473 </script>
474
475 <!-- Google tag (gtag.js) -->
476 <script async="" src="https://www.googletagmanager.com/gtag/js?id=G-S9CZK5PR6C"></script>
477 <script>
478
479 function gtag(){dataLayer.push(arguments);}
480 gtag('js', new Date());
481
482 gtag('config', 'G-S9CZK5PR6C');
483 </script>
484
485 <!-- End Google Tag Manager -->
486 <!--FONT SETTINGS-->
487 @{
488
489 }
490 @functions{
491 public class FontSettings
492 {
493 public class Logo
494 {
495 public static string FontFamily { get; set; }
496 public static string FontSize { get; set; }
497 public static string FontWeight { get; set; }
498 public static string Color { get; set; }
499 public static string LineHeight { get; set; }
500 public static string Casing { get; set; }
501 public static string LetterSpacing { get; set; }
502 }
503
504 public class Slogan
505 {
506 public static string FontFamily { get; set; }
507 public static string FontSize { get; set; }
508 public static string FontWeight { get; set; }
509 public static string Color { get; set; }
510 public static string LineHeight { get; set; }
511 public static string Casing { get; set; }
512 public static string LetterSpacing { get; set; }
513 }
514
515 public class H1
516 {
517 public static string FontFamily { get; set; }
518 public static string FontSize { get; set; }
519 public static string FontWeight { get; set; }
520 public static string Color { get; set; }
521 public static string LineHeight { get; set; }
522 public static string Casing { get; set; }
523 public static string LetterSpacing { get; set; }
524 }
525
526 public class H2
527 {
528 public static string FontFamily { get; set; }
529 public static string FontSize { get; set; }
530 public static string FontWeight { get; set; }
531 public static string Color { get; set; }
532 public static string LineHeight { get; set; }
533 public static string Casing { get; set; }
534 public static string LetterSpacing { get; set; }
535 }
536 public class H3
537 {
538 public static string FontFamily { get; set; }
539 public static string FontSize { get; set; }
540 public static string FontWeight { get; set; }
541 public static string Color { get; set; }
542 public static string LineHeight { get; set; }
543 public static string Casing { get; set; }
544 public static string LetterSpacing { get; set; }
545 }
546 public class H4
547 {
548 public static string FontFamily { get; set; }
549 public static string FontSize { get; set; }
550 public static string FontWeight { get; set; }
551 public static string Color { get; set; }
552 public static string LineHeight { get; set; }
553 public static string Casing { get; set; }
554 public static string LetterSpacing { get; set; }
555 }
556 public class Body
557 {
558 public static string FontFamily { get; set; }
559 public static string FontSize { get; set; }
560 public static string FontWeight { get; set; }
561 public static string Color { get; set; }
562 public static string LineHeight { get; set; }
563 public static string Casing { get; set; }
564 public static string LetterSpacing { get; set; }
565 }
566 }
567
568 private void InitFontSettings()
569 {
570 //LOGO
571 FontSettings.Logo.FontFamily = CustomFont(GetString("Item.Area.LogoFont.Font"), GetString("Item.Area.LogoFont.CustomFont"));
572 FontSettings.Logo.FontSize = GetString("Item.Area.LogoFont.Size") + "px";
573 FontSettings.Logo.FontWeight = CheckExistence(GetString("Item.Area.LogoFont.Weight"), "normal");
574 FontSettings.Logo.LineHeight = CheckExistence(GetString("Item.Area.LogoFont.LineHeight"), "1");
575 FontSettings.Logo.LetterSpacing = GetString("Item.Area.LogoFont.LetterSpacing") + "px";
576 FontSettings.Logo.Casing = GetString("Item.Area.LogoFont.Casing");
577 FontSettings.Logo.Color = GetString("Item.Area.LogoFont.Color.Color");
578
579
580 //SLOGAN
581 FontSettings.Slogan.FontFamily = CustomFont(GetString("Item.Area.LogoSloganFont.Font"), GetString("Item.Area.LogoSloganFont.CustomFont"));
582 FontSettings.Slogan.FontSize = GetString("Item.Area.LogoSloganFont.Size") + "px";
583 FontSettings.Slogan.FontWeight = CheckExistence(GetString("Item.Area.LogoSloganFont.Weight"), "normal");
584 FontSettings.Slogan.LineHeight = CheckExistence(GetString("Item.Area.LogoSloganFont.LineHeight"), "1");
585 FontSettings.Slogan.LetterSpacing = GetString("Item.Area.LogoSloganFont.LetterSpacing") + "px";
586 FontSettings.Slogan.Casing = GetString("Item.Area.LogoSloganFont.Casing");
587 FontSettings.Slogan.Color = GetString("Item.Area.LogoSloganFont.Color.Color");
588
589
590 //HEADINGS
591 FontSettings.H1.FontFamily = CustomFont(GetString("Item.Area.HeadingsH1.Font"), GetString("Item.Area.HeadingsH1.CustomFont"));
592 FontSettings.H1.FontSize = GetString("Item.Area.HeadingsH1.Size") + "px";
593 FontSettings.H1.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH1.Weight"), "normal");
594 FontSettings.H1.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH1.LineHeight"), "1");
595 FontSettings.H1.LetterSpacing = GetString("Item.Area.HeadingsH1.LetterSpacing") + "px";
596 FontSettings.H1.Casing = GetString("Item.Area.HeadingsH1.Casing");
597 FontSettings.H1.Color = GetString("Item.Area.HeadingsH1.Color.Color");
598
599 FontSettings.H2.FontFamily = CustomFont(GetString("Item.Area.HeadingsH2.Font"), GetString("Item.Area.HeadingsH2.CustomFont"));
600 FontSettings.H2.FontSize = GetString("Item.Area.HeadingsH2.Size") + "px";
601 FontSettings.H2.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH2.Weight"), "normal");
602 FontSettings.H2.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH2.LineHeight"), "1");
603 FontSettings.H2.LetterSpacing = GetString("Item.Area.HeadingsH2.LetterSpacing") + "px";
604 FontSettings.H2.Casing = GetString("Item.Area.HeadingsH2.Casing");
605 FontSettings.H2.Color = GetString("Item.Area.HeadingsH2.Color.Color");
606
607 FontSettings.H3.FontFamily = CustomFont(GetString("Item.Area.HeadingsH3.Font"), GetString("Item.Area.HeadingsH3.CustomFont"));
608 FontSettings.H3.FontSize = GetString("Item.Area.HeadingsH3.Size") + "px";
609 FontSettings.H3.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH3.Weight"), "normal");
610 FontSettings.H3.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH3.LineHeight"), "1");
611 FontSettings.H3.LetterSpacing = GetString("Item.Area.HeadingsH3.LetterSpacing") + "px";
612 FontSettings.H3.Casing = GetString("Item.Area.HeadingsH3.Casing");
613 FontSettings.H3.Color = GetString("Item.Area.HeadingsH3.Color.Color");
614
615 FontSettings.H4.FontFamily = CustomFont(GetString("Item.Area.HeadingsH4.Font"), GetString("Item.Area.HeadingsH4.CustomFont"));
616 FontSettings.H4.FontSize = GetString("Item.Area.HeadingsH4.Size") + "px";
617 FontSettings.H4.FontWeight = CheckExistence(GetString("Item.Area.HeadingsH4.Weight"), "normal");
618 FontSettings.H4.LineHeight = CheckExistence(GetString("Item.Area.HeadingsH4.LineHeight"), "1");
619 FontSettings.H4.LetterSpacing = GetString("Item.Area.HeadingsH4.LetterSpacing") + "px";
620 FontSettings.H4.Casing = GetString("Item.Area.HeadingsH4.Casing");
621 FontSettings.H4.Color = GetString("Item.Area.HeadingsH4.Color.Color");
622
623
624 //BODY
625 FontSettings.Body.FontFamily = CustomFont(GetString("Item.Area.BodyFont.Font"), GetString("Item.Area.BodyFont.CustomFont"));
626 FontSettings.Body.FontSize = GetString("Item.Area.BodyFont.Size") + "px";
627 FontSettings.Body.FontWeight = CheckExistence(GetString("Item.Area.BodyFont.Weight"), "normal");
628 FontSettings.Body.LineHeight = CheckExistence(GetString("Item.Area.BodyFont.LineHeight"), "1");
629 FontSettings.Body.LetterSpacing = GetString("Item.Area.BodyFont.LetterSpacing") + "px";
630 FontSettings.Body.Casing = GetString("Item.Area.BodyFont.Casing");
631 FontSettings.Body.Color = GetString("Item.Area.BodyFont.Color.Color");
632
633
634 gfonts.Add(FontSettings.Logo.FontFamily, "");
635
636 if (!gfonts.ContainsKey(FontSettings.Slogan.FontFamily))
637 {
638 gfonts.Add(FontSettings.Slogan.FontFamily, "");
639 }
640 if (!gfonts.ContainsKey(FontSettings.H1.FontFamily))
641 {
642 gfonts.Add(FontSettings.H1.FontFamily, "");
643 }
644 if (!gfonts.ContainsKey(FontSettings.H2.FontFamily))
645 {
646 gfonts.Add(FontSettings.H2.FontFamily, "");
647 }
648 if (!gfonts.ContainsKey(FontSettings.H3.FontFamily))
649 {
650 gfonts.Add(FontSettings.H3.FontFamily, "");
651 }
652 if (!gfonts.ContainsKey(FontSettings.H4.FontFamily))
653 {
654 gfonts.Add(FontSettings.H4.FontFamily, "");
655 }
656 if (!gfonts.ContainsKey(FontSettings.Body.FontFamily))
657 {
658 gfonts.Add(FontSettings.Body.FontFamily, "");
659 }
660
661 }
662
663 private string CustomFont(string firstfont, string secondfont)
664 {
665 if (firstfont == "custom")
666 {
667 return secondfont;
668 }
669 else
670 {
671 return firstfont;
672 }
673 }
674
675 private string CheckExistence(string stringitem, string defaultvalue)
676 {
677 if (!string.IsNullOrWhiteSpace(stringitem))
678 {
679 return stringitem;
680 }
681 else
682 {
683 return defaultvalue;
684 }
685 }
686
687 private System.Collections.Generic.Dictionary<string, object>
688 gfonts = new System.Collections.Generic.Dictionary<string, object>
689 ();
690 }
691
692 @{
693 InitFontSettings();
694 }
695
696 @helper GoogleFonts()
697 {
698 if (gfonts != null)
699 {
700 foreach (var item in gfonts)
701 {
702 string fontName = item.Key.Replace(" ", "+");
703 if (fontName.Contains("MetaPro-Norm") || fontName.Contains("MetaPro-Black"))
704 {
705 <link rel="stylesheet" href="/Files/Templates/Designs/Dwsimple/css/font.css" type="text/css">
706 }
707 else
708 {
709 <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=@item.Key:100,200,300,400,500,600,700,800,900">
710 }
711
712 }
713 }
714 }
715
716 @functions{
717 public string FontStylesCSS()
718 {
719 string CssString = @"
720 .dw-logotext {
721 font-family: " + FontSettings.Logo.FontFamily + @", sans-serif;
722 font-size: " + FontSettings.Logo.FontSize + @";
723 font-weight: " + FontSettings.Logo.FontWeight + @";
724 line-height: " + FontSettings.Logo.LineHeight + @" !important;
725 letter-spacing: " + FontSettings.Logo.LetterSpacing + @";
726 text-transform: " + FontSettings.Logo.Casing + @";
727 color: " + FontSettings.Logo.Color + @";
728 }
729
730 .dw-slogantext {
731 font-family: " + FontSettings.Slogan.FontFamily + @", sans-serif;
732 font-size: " + FontSettings.Slogan.FontSize + @";
733 font-weight: " + FontSettings.Slogan.FontWeight + @";
734 line-height: " + FontSettings.Slogan.LineHeight + @" !important;
735 letter-spacing: " + FontSettings.Slogan.LetterSpacing + @";
736 text-transform: " + FontSettings.Slogan.Casing + @";
737 color: " + FontSettings.Slogan.Color + @";
738 }
739
740 h1 {
741 font-family: " + FontSettings.H1.FontFamily + @", sans-serif !important;
742 font-size: " + FontSettings.H1.FontSize + @";
743 color: " + FontSettings.H1.Color + @";
744 line-height: " + FontSettings.H1.LineHeight + @" !important;
745 text-transform: " + FontSettings.H1.Casing + @";
746 font-weight: " + FontSettings.H1.FontWeight + @";
747 letter-spacing: " + FontSettings.H1.LetterSpacing + @" !important;
748 }
749
750 h3 {
751 font-family: " + FontSettings.H3.FontFamily + @", sans-serif !important;
752 font-size: " + FontSettings.H3.FontSize + @";
753 color: " + FontSettings.H3.Color + @";
754 line-height: " + FontSettings.H3.LineHeight + @" !important;
755 text-transform: " + FontSettings.H3.Casing + @";
756 font-weight: " + FontSettings.H3.FontWeight + @";
757 letter-spacing: " + FontSettings.H3.LetterSpacing + @" !important;
758 }
759 h4 {
760 font-family: " + FontSettings.H4.FontFamily + @", sans-serif !important;
761 font-size: " + FontSettings.H4.FontSize + @";
762 color: " + FontSettings.H4.Color + @";
763 line-height: " + FontSettings.H4.LineHeight + @" !important;
764 text-transform: " + FontSettings.H4.Casing + @";
765 font-weight: " + FontSettings.H4.FontWeight + @";
766 letter-spacing: " + FontSettings.H4.LetterSpacing + @" !important;
767 }
768
769 h2, h5, h6 {
770 margin-top: 0.7em;
771 margin-bottom: 0.7em;
772
773 font-family: " + FontSettings.H2.FontFamily + @", sans-serif !important;
774 font-size: " + FontSettings.H2.FontSize + @";
775 color: " + FontSettings.H2.Color + @";
776 line-height: " + FontSettings.H2.LineHeight + @";
777 text-transform: " + FontSettings.H2.Casing + @" !important;
778 font-weight: " + FontSettings.H2.FontWeight + @" !important;
779 letter-spacing: " + FontSettings.H2.LetterSpacing + @" !important;
780 }
781
782 h5, h6 {
783 font-size: 16px !important;
784 }
785
786 body {
787 font-family: " + FontSettings.Body.FontFamily + @", sans-serif !important;
788 font-size: " + FontSettings.Body.FontSize + @";
789 color: " + FontSettings.Body.Color + @";
790 line-height: " + FontSettings.Body.LineHeight + @" !important;
791 text-transform: " + FontSettings.Body.Casing + @";
792 font-weight: " + FontSettings.Body.FontWeight + @";
793 letter-spacing: " + FontSettings.Body.LetterSpacing + @" !important;
794 }
795
796 .navbar-wp .navbar-nav > li > a {
797 font-family: " + FontSettings.Body.FontFamily + @", sans-serif !important;
798 }
799
800 .section-title {
801 margin-top: 0;
802 margin-bottom: 0.7em;
803 }
804 ";
805 return CssString;
806 }
807 }
808
809 @GoogleFonts()
810
811 <!-- GENERAL/COLOR SETTINGS -->
812 @functions{
813 public class ColorSettings
814 {
815 public class Color
816 {
817 public static string Primary { get; set; }
818 public static string Hover { get; set; }
819 public static string Secondary { get; set; }
820 public static string NavbarFont { get; set; }
821 public static string Third { get; set; }
822 public static string Fourth { get; set; }
823 public static string Footer { get; set; }
824 public static string FooterFont { get; set; }
825
826 public static string Sticker { get; set; }
827 public static string Price { get; set; }
828 public static string Cart { get; set; }
829 }
830 }
831
832
833 private void InitColorSettings()
834 {
835 ColorSettings.Color.Hover = GetString("Item.Area.ColorsPrimaryHover.Color");
836 ColorSettings.Color.Primary = GetString("Item.Area.ColorsPrimary.Color");
837 ColorSettings.Color.Secondary = GetString("Item.Area.ColorsSecondary.Color");
838 ColorSettings.Color.Third = GetString("Item.Area.ColorsThird.Color");
839 ColorSettings.Color.Fourth = GetString("Item.Area.ColorsFourth.Color");
840 ColorSettings.Color.NavbarFont = GetString("Item.Area.NavbarFontColor");
841
842 if (string.IsNullOrWhiteSpace(ColorSettings.Color.NavbarFont))
843 {
844 ColorSettings.Color.NavbarFont = WrapMethods.getContrastYIQ(ColorSettings.Color.Secondary);
845 }
846
847 ColorSettings.Color.Footer = GetString("Item.Area.ColorsFooterColor.Color");
848 ColorSettings.Color.FooterFont = WrapMethods.getContrastYIQ(ColorSettings.Color.Footer);
849
850 ColorSettings.Color.Price = GetString("Item.Area.EcommercePriceColor.Color");
851 ColorSettings.Color.Sticker = GetString("Item.Area.EcommerceDiscountStickerColor.Color");
852 ColorSettings.Color.Cart = GetString("Item.Area.EcommerceCartButtonColor.Color");
853 }
854
855 public string GetColorSettings()
856 {
857 string CssString = @"
858 a:hover, a:focus, a:active {
859 color: @Primary;
860 }
861 .product-detail .ProductTitle h1{
862 border-bottom: 4px solid @Primary;
863 }
864 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a {
865 color: @NavbarFont;
866 }
867
868 .navbar-wp .navbar-nav > .active > a, .navbar-wp .navbar-nav > .active > a:hover, .navbar-wp .navbar-nav > .active > a:focus {
869 color: @NavbarFont;
870 }
871
872 .navbar-wp .navbar-nav > li > a:hover, .navbar-wp .navbar-nav > li > a:focus {
873 border-top: 0px solid @Secondary;
874 color: @NavbarFont;
875 }
876
877 .navbar-wp .navbar-nav > li > a span:after {
878 background-color: @Primary;
879 }
880
881 .navbar-wp .megamenu > li:hover > a {
882 color: @Primary !important;
883 }
884
885 .btn-dw-primary {
886 color: #FFF;
887 background-color: @Primary;
888 border-color: @Primary;
889 }
890
891 .btn-dw-secondary {
892 color: @NavbarFont;
893 background-color: @Secondary;
894 border-color: @Secondary;
895 }
896
897 .btn-dw-cart {
898 color: #FFF;
899 background-color: @Cart;
900 border-color: @Cart;
901 }
902
903
904
905 .dw-minicart-update {
906 color: #FFF !important;
907 background-color: @Primary;
908 transition: all 0.3s ease-in-out 0s;
909 }
910
911 .pagination > li > a, .pagination > li > a:hover, .pagination > li > a:focus, .pagination > li > a:active {
912 color: @Primary;
913 }
914
915 .form-control:hover, .form-control:focus, .form-control:active {
916 border-color: @Primary !important;
917 }
918
919 .bg-2 {
920 background: @Primary !important;
921 }
922
923 .blockquote-1:hover {
924 border-color: @Primary !important;
925 }
926
927 .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 {
928 color: @Primary;
929 }
930
931 .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 {
932 color: @Primary;
933 }
934
935 .navbar-wp .navbar-nav > li > a:hover, .navbar-wp .navbar-nav > li > a:focus {
936 border: 0px solid @Primary;
937 }
938
939 .navbar-wp .navbar-toggle:hover, .navbar-wp .navbar-toggle:focus {
940 background-color: @Primary !important;
941 border-color: @Primary !important;
942 }
943
944 .navbar-wp .dropdown-menu {
945 border-top: 1px solid @Primary !important;
946 border-bottom: 4px solid @Primary !important;
947 }
948
949 .navbar-wp .dropdown-menu > li > a:hover {
950 background: @Primary !important;
951 color: #fff;
952 }
953
954 .navbar-wp .dropdown-menu .active {
955 background: @Primary !important;
956 color: #fff;
957 }
958
959 .navbar-wp.navbar-contrasted .dropdown-menu > li > a:hover {
960 background: @Primary !important;
961 }
962
963 .nav > ul > li > a:hover {
964 color: @Primary;
965 }
966
967 .lw .w-box.w-box-inverse .thmb-img i {
968 color: @Primary !important;
969 }
970
971 .w-box.w-box-inverse .thmb-img:hover i {
972 background: @Primary !important;
973 }
974
975 .c-box {
976 border: 1px solid @Primary !important;
977 }
978
979 .c-box .c-box-header {
980 background: @Primary !important;
981 }
982
983 .w-section .aside-feature:hover .icon-feature, .w-section .aside-feature:hover h4 {
984 color: @Primary !important;
985 }
986
987 .layer-slider-wrapper .title.title-base {
988 background: @Primary !important;
989 }
990
991 .layer-slider-wrapper .subtitle {
992 color: @Primary !important;
993 }
994
995 .layer-slider-wrapper .list-item {
996 color: @Primary !important;
997 }
998
999 .box-element.box-element-bordered {
1000 border: 1px solid @Primary !important;
1001 }
1002
1003 .carousel-2 .carousel-indicators .active {
1004 background-color: @Primary !important;
1005 }
1006
1007 .carousel-2 .carousel-nav a {
1008 color: @Primary !important;
1009 }
1010
1011 .carousel-2 .carousel-nav a:hover {
1012 background: @Primary !important;
1013 }
1014
1015 .carousel-3 .carousel-nav a {
1016 color: @Primary !important;
1017 }
1018
1019 .carousel-3 .carousel-nav a:hover {
1020 background: @Primary !important;
1021 }
1022
1023 .like-button .button.liked i {
1024 color: @Primary !important;
1025 }
1026
1027 ul.list-listings li.featured {
1028 border-color: @Primary !important;
1029 }
1030
1031 ul.list-check li i {
1032 color: @Primary !important;
1033 }
1034
1035 ul.dw-categories li a:hover, ul.dw-categories a:focus, ul.dw-categories a:active{
1036 color: @NavbarFont;
1037 background-color: @Primary;
1038 border-color: @Primary;
1039 }
1040
1041 ul.categories li a:hover, ul.categories a:focus, ul.categories a:active{
1042 color: @NavbarFont;
1043 background-color: @Primary;
1044 border-color: @Primary;
1045 }
1046
1047 .timeline .event:nth-child(2n):before {
1048 background-color: @Primary !important;
1049 }
1050
1051 .timeline .event:nth-child(2n-1):before {
1052 background-color: @Primary !important;
1053 }
1054
1055 #toTopHover {
1056 background-color: @Primary !important;
1057 }
1058
1059 .tags-list li {
1060 border: 1px solid @Primary !important;
1061 color: @Primary !important;
1062 }
1063
1064 .tags-list li:hover,
1065 a.open-panel {
1066 background-color: @Primary !important;
1067 }
1068
1069 .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus,
1070 .panel-group .panel-heading a i,
1071 .tags-list li a {
1072 color: @NavbarFont !important;
1073 }
1074
1075 .nav-pills > li > a:hover, .nav-pills > li > a:focus {
1076 color: @NavbarFont !important;
1077 background: none repeat scroll 0% 0% @Secondary !important;
1078 }
1079
1080 footer {
1081 background: @Footer !important;
1082 }
1083
1084 footer h4 {
1085 color: @FooterFont !important;
1086 }
1087
1088 footer a {
1089 color: @FooterFont !important;
1090 }
1091
1092 footer a:hover, footer a:focus, footer a:active {
1093 color: @Secondary !important;
1094 }
1095
1096 footer p {
1097 color: @FooterFont !important;
1098 }
1099
1100 footer ul > li {
1101 color: @FooterFont !important;
1102 }
1103
1104 footer hr {
1105 border-color: @FooterFont
1106 }
1107
1108
1109 /* Button colors */
1110 .btn-base {
1111 color: @NavbarFont !important;
1112 background-color: @Secondary !important;
1113 border: 1px solid @Secondary !important;
1114 }
1115
1116 .btn-base:before {
1117 background-color: @Secondary !important;
1118 }
1119
1120 .btn-base:hover:before, .btn-base:focus:before, .btn-base:active:before {
1121 color: @NavbarFont !important;
1122 background-color: @Primary !important;
1123 border-color: @Primary !important;
1124 }
1125
1126 .btn-icon:before {
1127 transition: none !important;
1128 }
1129
1130 .btn-base:hover, .btn-base:focus, .btn-base:active, .btn-base.active, .open .dropdown-toggle.btn-base {
1131 color: @NavbarFont !important;
1132 background-color: @Primary !important;
1133 border-color: @Primary !important;
1134 }
1135
1136 .btn-primary {
1137 background-color: @Primary !important;
1138 border-color: @Primary !important;
1139 }
1140
1141 .open .dropdown-toggle.btn-primary {
1142 background-color: @Primary !important;
1143 border-color: @Primary !important;
1144 }
1145
1146 /* Dropdown-menu */
1147 .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus {
1148 background: @Primary !important;
1149 color: #fff !important;
1150 }
1151
1152 /* Ecom settings */
1153 .ribbon.base, .ball {
1154 background: @Sticker !important;
1155 color: #fff;
1156 border-right: 5px solid @Sticker !important;
1157 }
1158
1159 .ribbon.base:before {
1160 border-top: 27px solid @Sticker !important;
1161 }
1162
1163 .ribbon.base:after {
1164 border-bottom: 27px solid @Sticker !important;
1165 }
1166
1167 .price {
1168 color: @Price !important;
1169 }
1170
1171 .discount-sticker {
1172 background-color: @Sticker !important;
1173 }
1174
1175 .bs-callout-primary {
1176 border-left-color: @Primary !important;
1177 }
1178
1179 .ratings .fa-star {
1180 color: @Secondary !important;
1181 }
1182
1183
1184
1185
1186
1187 /*Innter items and all website colors and background*/
1188 .productNavigation.dw-categories li.list-active a{
1189 background-color: @Primary!important;
1190 }
1191 #leftnavigation li.list-open-active a{
1192 background-color: @Primary!important;
1193 }
1194 .slideToggle{
1195 background-color: @Primary;
1196 }
1197 .boxImageTextModule .box-size .desc-wrapper {
1198 border-top: 4px solid @Primary;
1199 }
1200 .top-module .BoxWithText .text {
1201 background: @Primary;
1202 }
1203 .qoute .btn, .qoute .btn-span {
1204 border-bottom: 4px solid @Primary;
1205 border-top: 4px solid @Primary;
1206 }
1207 .Multy-module .section-top hr {
1208 background-color: @Primary;
1209 }
1210 .filePageTitle h2.FileTitle {
1211 border-bottom: 4px solid @Primary;
1212 }
1213 .searc-fileFolder .btn{
1214 background: @Footer!Important;
1215 }
1216 .searc-fileFolder .btn:hover{
1217 background: @Primary!important;
1218 }
1219 .searc-fileFolder input {
1220 background-color: @Third;
1221 }
1222 .CenterButtonsSocial.ShowSocial .shereLinks{
1223 border: 1px solid @Fourth;
1224 }
1225 .CenterButtonsSocial.ShowSocial .shereLinks .fa-close{
1226 color: @Fourth;
1227 }
1228 .social-module .sort .social-content{
1229 background-color: @Third;
1230 }
1231 .specification .specification-text {
1232 background-color: @Third;
1233 }
1234 .top-moduleQoute{
1235 background-color: @Third;
1236 }
1237 .searc-file input {
1238 background-color: @Third;
1239 }
1240 .searc-file .btn{
1241 background: @Footer!Important;
1242 }
1243 .searc-file .btn:hover{
1244 background: @Primary!important;
1245 }
1246 .downloadImageParth .discription {
1247 background-color: @Third;
1248 }
1249 .history-module .row .box .box-inner .year{
1250 color: @Primary;
1251 }
1252 .history-module .row .modal-open{
1253 color: @Primary;
1254 }
1255 .history-module .row .box .box-inner .year::after{
1256 background-color: @Primary;
1257 }
1258 .history-module .row .box .box-inner .year::before{
1259 background-color: @Primary;
1260 }
1261 .training-courses .courses-list .list-body{
1262 background-color: @Third;
1263 }
1264 .training-courses .courses-list .list-body .data {
1265 color: @Primary;
1266 }
1267 .training-courses .courses-list .list-body a{
1268 color: @Primary;
1269 }
1270 .NoCurses{
1271 background-color: @Third;
1272 }
1273 .courses-detail .data {
1274 color: @Primary;
1275 }
1276 .courses-detail{
1277 background-color: @Third;
1278 }
1279 .shere-social{
1280 border-top: 4px solid @Primary;
1281 }
1282 #backLink{
1283 color: @Primary;
1284 }
1285 .Map-Contact-Page{
1286 background-color: @Primary;
1287 }
1288 .SelectParthContacts h2{
1289 border-bottom: 4px solid @Primary;
1290 }
1291 .contact-person .AllUserBoxs .userBox .PersonBoxDetail a.mail{
1292 color: @Primary;
1293 }
1294 .contact-person{
1295 background-color: @Third;
1296 }
1297 .contact-person.contact-person-information .inner-user-box{
1298 background-color: @Third;
1299 }
1300 .contact-person .AllUserBoxs .userBox .image{
1301 background-color: @Footer;
1302 }
1303 .list-news{
1304 background-color: @Third;
1305 }
1306 .list-news .list-body .description p a{
1307 color: @Primary;
1308 }
1309 .bulletin-list li.list-bulletin h3 a{
1310 color: @Primary;
1311 }
1312 .bulletin-list li.list-bulletin h3 a:hover{
1313 color: @Hover;
1314 }
1315 .CenterParagraph h2{
1316 border-bottom: 4px solid @Primary;
1317 }
1318 .productNavigation.dw-categories li{
1319 background-color: @Third;
1320 }
1321 .productlist .extracolumn{
1322 background-color: @Third;
1323 }
1324 .colapse-box button{
1325 background-color: @Footer;
1326 }
1327 .colapse-box button.collapsed{
1328 background-color: @Fourth;
1329 }
1330 .productNumberDetailPage{
1331 background-color: @Third;
1332 }
1333 .colapse-box button.collapsed:active{
1334 background-color: @Footer;
1335 }
1336 .category .row-catecory .category-elements .fa{
1337 color: @Primary;
1338 }
1339 .lang-sug{
1340 background-color: @Third;
1341 }
1342 .lang-sug p{
1343 color: @Primary;
1344 }
1345 .lang-sug .langMenu li{
1346 background-color: @Fourth;
1347 }
1348 .lang-sug .langMenu li:hover{
1349 background-color: @Primary;
1350 }
1351 .e-learning{
1352 background-color: @Third;
1353 }
1354 .e-learning p{
1355 color: @Primary;
1356 }
1357 .e-learning .e-learning-menu{
1358 width:300px
1359 }
1360 .e-learning .e-learning-menu li{
1361 margin-bottom:10px !important;
1362 background-color: @Fourth;
1363 }
1364 .e-learning .e-learning-menu li:hover{
1365 background-color: @Primary;
1366 }
1367 .e-learning .e-learning-menu li.active{
1368 background-color: @Primary;
1369
1370 }
1371 .e-learning .e-learning-menu li.active a{
1372 color:white !important;
1373 }
1374 .Tabs .nav-tabs li{
1375 background-color: @Third;
1376 }
1377 .Tabs .nav-tabs li.active{
1378 background-color: @Fourth;
1379 }
1380 #contentsearch{
1381 background-color: @Third;
1382 }
1383 .searchContent ul li h3 a {
1384 color: @Primary;
1385 }
1386 .favorite-list .td{
1387 border-top: 1px solid @Primary;
1388 }
1389
1390 .dw-section-title{
1391 border-color: @Primary!important;
1392 }
1393 .nav.nav-pills li.offcanvas-menubtn .mobileMenuFix{
1394 color: @Primary;
1395 }
1396 .navbar-wp .megamenu .dropdown-menu{
1397 background-color: @Third;
1398 }
1399 .downloadImageParth .table tr td{
1400 background-color: @Third;
1401 }
1402 .dropdown.open:before{
1403 border-bottom: 10px solid @Third;
1404 }
1405 .btn-primary:hover{
1406 background-color: @Hover!important;
1407 }
1408 .navbar-wp .megamenu.navbar-nav > li.active > a{
1409 border-bottom: 4px solid @Primary;
1410 }
1411 .history-module .arrow .fa-angle-down:before{
1412 color: @Primary;
1413 }
1414 .top-headerShow{
1415 border-bottom: 1px solid @Primary;
1416 }
1417 .social-module .twitter-content{
1418 background-color: @Primary;
1419 }
1420 .ProductTab ul.nav-pills li{
1421 background-color: @Third;
1422 }
1423 .ProductTab ul.nav-pills li a.checked{
1424 background-color: @Primary;
1425 }
1426 .ProductTab ul.nav-pills li:hover{
1427 background-color: @Primary!important;
1428 }
1429 .ProductTab ul.nav-pills > li > a:hover{
1430 background-color: @Primary!important;
1431 color: #fff!important;
1432 }
1433 .ProductTab ul.nav-pills > li > a:focus{
1434 background-color: @Primary!important;
1435 color: #fff!important;
1436 }
1437 @media (min-width: 768px) {
1438 .history-module .row:nth-child(2n+2) .box{
1439 border-left: 2px solid @Primary;
1440 border-right: 0;
1441 }
1442 .history-module .row .box{
1443 border-right: 2px solid @Primary;
1444 }
1445 }
1446 @media (max-width: 767px) {
1447 .history-module .row .box {
1448 border-right: 2px solid @Primary;
1449 }
1450 }
1451
1452
1453
1454
1455
1456
1457
1458
1459 .feature-label {
1460 color: @Secondary !important;
1461 }";
1462
1463 return ParseCSSToString(CssString);
1464 }
1465
1466 private string ParseCSSToString(string TheString)
1467 {
1468 TheString = TheString.Replace("@Primary", ColorSettings.Color.Primary);
1469 TheString = TheString.Replace("@Hover", ColorSettings.Color.Hover);
1470 TheString = TheString.Replace("@Secondary", ColorSettings.Color.Secondary);
1471 TheString = TheString.Replace("@Third", ColorSettings.Color.Third);
1472 TheString = TheString.Replace("@Fourth", ColorSettings.Color.Fourth);
1473 TheString = TheString.Replace("@NavbarFont", ColorSettings.Color.NavbarFont);
1474 TheString = TheString.Replace("@FooterFont", ColorSettings.Color.FooterFont);
1475 TheString = TheString.Replace("@Footer", ColorSettings.Color.Footer);
1476
1477 TheString = TheString.Replace("@Sticker", ColorSettings.Color.Sticker);
1478 TheString = TheString.Replace("@Price", ColorSettings.Color.Price);
1479 TheString = TheString.Replace("@Cart", ColorSettings.Color.Cart);
1480
1481
1482 System.Text.StringBuilder sb = new System.Text.StringBuilder();
1483
1484 foreach (var item in TheString.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries))
1485 {
1486 sb.AppendLine(item);
1487 }
1488
1489 return sb.ToString();
1490 }
1491 }
1492
1493 @{
1494 InitColorSettings();
1495 }
1496
1497
1498 @using System.Drawing
1499 @using System.Net
1500
1501
1502 @functions{
1503 public class GeneralSettings
1504 {
1505
1506 public class Header
1507 {
1508 public static string Mode { get; set; }
1509 public static string Classes { get; set; }
1510 public static bool Show { get; set; }
1511 public static string Background { get; set; }
1512 public static bool ShowFrontpageImage { get; set; }
1513 }
1514
1515 public class Logo
1516 {
1517 public static string Image { get; set; }
1518 public static string ContrastImage { get; set; }
1519 public static string Text { get; set; }
1520 public static string Slogan { get; set; }
1521 public static string SecondaryColor { get; set; }
1522 }
1523
1524 public class Navigation
1525 {
1526 public static string Position { get; set; }
1527 public static bool IsMegamenu { get; set; }
1528 public static bool IsAnimateNavigation { get; set; }
1529 public static string InvertedPosition { get; set; }
1530 public static string StickyMenu { get; set; }
1531 public static string SelectionMode { get; set; }
1532 public static string SelectionStyle { get; set; }
1533 public static int SelectionWeight { get; set; }
1534 public static bool Case { get; set; }
1535
1536 public static string BreadcrumbMode { get; set; }
1537 public static string BreadcrumbAlign { get; set; }
1538
1539 public static string LeftmenuMode { get; set; }
1540
1541 public static string ButtonDesign { get; set; }
1542 }
1543
1544 public class Headings
1545 {
1546 public static string Mode { get; set; }
1547 }
1548
1549 public class Background
1550 {
1551 public static string Color { get; set; }
1552 public static string Image { get; set; }
1553 public static string CustomImage { get; set; }
1554 public static bool GradientColor { get; set; }
1555 public static string GradientPercentage { get; set; }
1556 public static string Style { get; set; }
1557 public static string Position { get; set; }
1558 }
1559
1560 public class Site
1561 {
1562 public static bool Shadow { get; set; }
1563 public static string LayoutMode { get; set; }
1564 }
1565
1566 public class Images
1567 {
1568 public static bool RoundCorners { get; set; }
1569 }
1570
1571 public class Ecommerce
1572 {
1573 public static string EcomListDesign { get; set; }
1574 public static string EcomCardDesign { get; set; }
1575 }
1576 }
1577
1578 private void InitGeneralSettings()
1579 {
1580 //Header settings
1581 GeneralSettings.Header.Mode = GetString("Item.Area.HeaderLayoutMode");
1582 GeneralSettings.Header.Show = GetBoolean("Item.Area.HeaderShow");
1583 GeneralSettings.Header.Background = GetString("Item.Area.NavigationNavbarBackground");
1584 GeneralSettings.Header.ShowFrontpageImage = GetBoolean("Item.Area.HeaderFrontpageImage");
1585
1586 if (GeneralSettings.Header.Mode == "solid"){
1587 GeneralSettings.Header.Classes = "";
1588 }
1589
1590 if (GeneralSettings.Header.Mode == "cover" || GeneralSettings.Header.Mode == "mobile"){
1591 GeneralSettings.Header.Classes = "header-alpha header-cover";
1592 }
1593
1594
1595 //Logo settings
1596 GeneralSettings.Logo.Image = GetString("Item.Area.GeneralLogo");
1597 GeneralSettings.Logo.Text = GetString("Item.Area.GeneralLogoText");
1598 GeneralSettings.Logo.Slogan = GetString("Item.Area.LogoSlogan");
1599 GeneralSettings.Logo.SecondaryColor = GetString("Item.Area.LogoSecondColor.Color");
1600
1601 if (!string.IsNullOrWhiteSpace(GetString("Item.Area.LogoContrastImage"))) {
1602 GeneralSettings.Logo.ContrastImage = GetString("Item.Area.LogoContrastImage");
1603 } else {
1604 GeneralSettings.Logo.ContrastImage = GetString("Item.Area.GeneralLogo");
1605 }
1606
1607
1608 //Navigation settings
1609 GeneralSettings.Navigation.Position = GetString("Item.Area.NavigationPosition");
1610 GeneralSettings.Navigation.StickyMenu = "off";
1611 GeneralSettings.Navigation.IsMegamenu = GetBoolean("Item.Area.IsMegamenu");
1612 GeneralSettings.Navigation.IsAnimateNavigation = GetBoolean("Item.Area.IsAnimateNavigation");
1613
1614 if (GetBoolean("Item.Area.NavigationSticky")) {
1615 if (GeneralSettings.Header.Show)
1616 {
1617 if (GeneralSettings.Header.Mode == "cover")
1618 {
1619 GeneralSettings.Navigation.StickyMenu = "44"; //"data-spy=\"affix\" data-offset-top=\"44\" data-offset-bottom=\"300\"";
1620 }
1621 else
1622 {
1623 int offset = ImageHeight()+28;
1624
1625 GeneralSettings.Navigation.StickyMenu = offset.ToString(); // "data-spy=\"affix\" data-offset-top=\"" + offset.ToString() + "\" data-offset-bottom=\"300\"";
1626 }
1627 }
1628 else
1629 {
1630 GeneralSettings.Navigation.StickyMenu = "5"; // "data-spy=\"affix\" data-offset-top=\"5\" data-offset-bottom=\"300\"";
1631 }
1632 }
1633
1634 if (GeneralSettings.Navigation.Position == "left") {
1635 GeneralSettings.Navigation.InvertedPosition = "right";
1636 }
1637 else
1638 {
1639 GeneralSettings.Navigation.InvertedPosition = "left";
1640 }
1641
1642 GeneralSettings.Navigation.SelectionMode = GetString("Item.Area.NavigationSelectionMode");
1643 GeneralSettings.Navigation.SelectionStyle = "";
1644 GeneralSettings.Navigation.SelectionWeight = GetInteger("Item.Area.SelectionWeight");
1645
1646 if (GeneralSettings.Navigation.SelectionMode == "arrow") {
1647 GeneralSettings.Navigation.SelectionStyle = "navbar-arrow";
1648 }
1649
1650 GeneralSettings.Navigation.Case = GetBoolean("Item.Area.NavigationUppercase");
1651
1652 GeneralSettings.Navigation.BreadcrumbMode = GetString("Item.Area.NavigationBreadcrumbLayout");
1653 GeneralSettings.Navigation.BreadcrumbAlign = GetString("Item.Area.NavigationBreadcrumbAlign");
1654
1655 GeneralSettings.Navigation.LeftmenuMode = GetString("Item.Area.NavigationLeftNavigationMode");
1656
1657 GeneralSettings.Navigation.ButtonDesign = GetString("Item.Area.NavigationButtonDesign");
1658
1659
1660 //Background settings
1661 GeneralSettings.Background.Image = GetString("Item.Area.BackgroundImage.Image.Image");
1662 GeneralSettings.Background.CustomImage = GetString("Item.Area.BackgroundImage.Image.CustomImage");
1663 GeneralSettings.Background.Color = GetString("Item.Area.BackgroundImage.Color.Color");
1664 GeneralSettings.Background.GradientColor = GetBoolean("Item.Area.BackroundGradientColor");
1665 GeneralSettings.Background.GradientPercentage = GetString("Item.Area.GradientPercentage");
1666
1667
1668 if (@GetString("Item.Area.BackgroundFixed") == "True")
1669 {
1670 GeneralSettings.Background.Position = "fixed";
1671 }
1672 else
1673 {
1674 GeneralSettings.Background.Position = "";
1675 }
1676
1677
1678 if (GeneralSettings.Background.Image == "none")
1679 {
1680 GeneralSettings.Background.Style = "";
1681 }
1682 else if (GeneralSettings.Background.Image == "custom")
1683 {
1684 if (!string.IsNullOrWhiteSpace(GeneralSettings.Background.CustomImage))
1685 {
1686 GeneralSettings.Background.Style = "background: url('/Admin/Public/GetImage.ashx?width=1920&Crop=1&Compression=75&image=" + GeneralSettings.Background.CustomImage + "') " + GeneralSettings.Background.Position + " !important; ";
1687 }
1688 }
1689 else
1690 {
1691 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; ";
1692 }
1693
1694
1695 //Headings settings
1696 GeneralSettings.Headings.Mode = GetString("Item.Area.AdvHeadingsMode");
1697
1698
1699 //Site settings
1700 GeneralSettings.Site.Shadow = GetBoolean("Item.Area.BackgroundSiteShadow");
1701 GeneralSettings.Site.LayoutMode = GetString("Item.Area.LayoutMode");
1702
1703 if (GeneralSettings.Site.LayoutMode == "boxed"){
1704 GeneralSettings.Site.LayoutMode = "body-" + GeneralSettings.Site.LayoutMode;
1705 GeneralSettings.Header.Classes += " header-boxed";
1706 }
1707
1708
1709 //Image settings
1710 GeneralSettings.Images.RoundCorners = GetBoolean("Item.Area.LayoutRoundCorners");
1711
1712 //Ecommerce settings
1713 GeneralSettings.Ecommerce.EcomListDesign = GetString("Item.Area.EcommerceProductCardDesign");
1714 GeneralSettings.Ecommerce.EcomCardDesign = GetString("Item.Area.EcommerceProductCardDesign");
1715 }
1716
1717 public string GetGeneralCSS()
1718 {
1719 string CssString = "";
1720 int SelectionWeight = GeneralSettings.Navigation.SelectionWeight;
1721
1722 //Site settings
1723 if (GetString("Item.Area.LogoFont.Color.Color") == "#FFF" || GetString("Item.Area.LogoFont.Color.Color") == "#FFFFFF")
1724 {
1725 int offset = ImageHeight()+28;
1726
1727 CssString += @"
1728 .dw-offsetmenu-logo {
1729 color: #333 !important;
1730 }";
1731 }
1732
1733 if (!string.IsNullOrWhiteSpace(GeneralSettings.Background.Color))
1734 {
1735 CssString += @"
1736 body {
1737 background-color: " + GeneralSettings.Background.Color + @";
1738 background-size: cover;
1739 overflow-y: scroll;
1740 }";
1741 }
1742
1743 if (GeneralSettings.Background.GradientColor)
1744 {
1745 CssString += @"
1746 body {
1747 background: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%);
1748 background: -o-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%);
1749 background: -ms-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%);
1750 background: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%);
1751 background: linear-gradient(to top, rgba(0, 0, 0, 0." + GeneralSettings.Background.GradientPercentage + @") 0%, rgba(0, 0, 0, 0) 100%);
1752 background-attachment: fixed;
1753 background-color: " + GeneralSettings.Background.Color + @" !important;
1754 }";
1755 }
1756
1757 if (GeneralSettings.Site.Shadow)
1758 {
1759 CssString += @"
1760 .shad {
1761 -webkit-box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75);
1762 -moz-box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75);
1763 box-shadow: 0px 0px 8px 0px rgba(50, 50, 50, 0.75);
1764 }";
1765 }
1766
1767 //Image settings
1768 if (GeneralSettings.Images.RoundCorners)
1769 {
1770 CssString += @"
1771 .content-image {
1772 border-radius: 6px;
1773 -webkit-border-radius: 6px;
1774 -moz-border-radius: 6px;
1775 }";
1776 }
1777
1778 //Navbar and header custom settings
1779 if (GeneralSettings.Header.Mode == "cover")
1780 {
1781 CssString += @"
1782 .navbar-wp {
1783 background-color: none !important;
1784 }";
1785
1786 if (!GeneralSettings.Header.Show || GeneralSettings.Header.Mode == "mobile")
1787 {
1788 CssString += @"
1789 .header-cover .navbar-wp {
1790 top: 0px !important;
1791 }";
1792 }
1793 }
1794 else
1795 {
1796 if (GeneralSettings.Header.Show)
1797 {
1798 CssString += @"
1799 .navbar-wp.affix .navbar-nav > li > a {
1800 padding: 16px 16px !important;
1801 }";
1802 }
1803 }
1804
1805 if (GeneralSettings.Header.Background == "colorline")
1806 {
1807 CssString += @"
1808 .navbar-wp, .navbar-wp.affix {
1809 border-bottom: 4px solid " + ColorSettings.Color.Primary + @" !important;
1810 }
1811
1812 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a {
1813 background-color: #FFF;
1814 color: #333;
1815 }
1816
1817 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus {
1818 color: " + ColorSettings.Color.NavbarFont + @";
1819 }
1820
1821 .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo {
1822 color: " + GeneralSettings.Logo.SecondaryColor + @" !important;
1823 }";
1824 } else if (GeneralSettings.Header.Background == "neutral")
1825 {
1826 CssString += @"
1827 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a {
1828 background-color: #f1f1f1;
1829 }
1830
1831 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a {
1832 color: #333;
1833 }
1834
1835 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus {
1836 color: " + ColorSettings.Color.NavbarFont + @";
1837 }
1838
1839 .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo {
1840 color: " + GeneralSettings.Logo.SecondaryColor + @" !important;
1841 }";
1842 }
1843 else if (GeneralSettings.Header.Background == "transparent")
1844 {
1845 CssString += @"
1846 .navbar-wp, .navbar-wp.affix {
1847 background-color: #FFF;
1848 opacity: 0.9;
1849 filter: alpha(opacity=90); /* For IE8 and earlier */
1850 }
1851
1852 .navbar-wp.affix, .navbar-wp.affix .navbar-nav > li > a {
1853 color: #333;
1854 }
1855
1856 .navbar-wp.affix .navbar-nav > .active > a, .navbar-wp.affix .navbar-nav > li > a:hover, .navbar-wp.affix .navbar-nav > li > a:focus {
1857 color: " + ColorSettings.Color.NavbarFont + @";
1858 }
1859
1860 .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo {
1861 color: " + GeneralSettings.Logo.SecondaryColor + @" !important;
1862 }";
1863 }
1864 else
1865 {
1866 CssString += @"
1867 .navbar-wp, .navbar-wp.affix, .navbar-wp .navbar-nav > li > a {
1868 background-color: " + ColorSettings.Color.Secondary + @";
1869 }
1870
1871 .affix .dw-logotext, .affix .dw-slogantext, .dw-header-sm-title, .dw-offsetmenu-logo {
1872 color: " + GeneralSettings.Logo.SecondaryColor + @" !important;
1873 }";
1874 }
1875
1876 if (GeneralSettings.Navigation.SelectionMode == "background" || GeneralSettings.Navigation.SelectionMode == "arrow"){
1877 CssString += NavbarPosition(false, SelectionWeight);
1878
1879 CssString += @"
1880 .dw-navbar-button > a {
1881 background-color: transparent !important;
1882 }
1883
1884 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a {
1885 background-color: " + ColorSettings.Color.Primary + @" !important;
1886 }";
1887 }
1888
1889 if (GeneralSettings.Navigation.SelectionMode == "underline"){
1890 CssString += NavbarPosition(true);
1891
1892 CssString += ClearBackground();
1893
1894 CssString += @"
1895 .dw-navbar-button > a span:after {
1896 position: absolute;
1897 content: '';
1898 left: 0px;
1899 bottom: 0px;
1900 height: " + SelectionWeight + @"px;
1901 width: 100%;
1902 transform: scaleX(0);
1903 transition: all 0.3s ease-in-out 0s;
1904 }
1905 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a {
1906 color: " + ColorSettings.Color.Primary + @" !important;
1907 }
1908
1909 .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 {
1910 color: " + ColorSettings.Color.Primary + @" !important;
1911 transform: scaleX(1);
1912 transition: all 0.3s ease-in-out 0s;
1913 }";
1914 }
1915
1916 if (GeneralSettings.Navigation.SelectionMode == "boxed"){
1917 CssString += NavbarPosition(true, SelectionWeight);
1918
1919 CssString += @"
1920 .dw-navbar-button > a {
1921 background-color: transparent !important;
1922 }
1923
1924 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a {
1925 background-color: " + ColorSettings.Color.Primary + @" !important;
1926 transition: all 0.3s ease-in-out 0s;
1927 }";
1928 }
1929
1930 if (GeneralSettings.Navigation.SelectionMode == "border"){
1931 CssString += NavbarPosition(true, 6, SelectionWeight);
1932
1933 CssString += ClearBackground();
1934
1935 CssString += @"
1936 .dw-navbar-button > a {
1937 border: " + SelectionWeight + @"px solid transparent !important; transition: None !important;
1938 }
1939
1940 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a {
1941 border-width: " + SelectionWeight + @"px !important;
1942 border-color: " + ColorSettings.Color.Primary + @" !important;
1943 transition: all 0.3s ease-in-out 0s;
1944 }";
1945 }
1946
1947 if (GeneralSettings.Navigation.SelectionMode == "font"){
1948 CssString += NavbarPosition();
1949
1950 CssString += ClearBackground();
1951
1952 SelectionWeight = (SelectionWeight*100);
1953
1954 CssString += @"
1955 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a {
1956 color: " + ColorSettings.Color.Primary + @" !important;
1957 font-weight: " + SelectionWeight + @" !important;
1958 transition: all 0.3s ease-in-out 0s;
1959 }";
1960 }
1961
1962 if (GeneralSettings.Navigation.Case){
1963 CssString += @"
1964 .dw-navbar-button > a {
1965 text-transform: uppercase !important;
1966 }";
1967 }
1968 else
1969 {
1970 CssString += @"
1971 .dw-navbar-button > a {
1972 text-transform: none !important;
1973 }";
1974 }
1975
1976
1977 //Breadcrumb custom settings
1978 if (GeneralSettings.Navigation.BreadcrumbMode == "light")
1979 {
1980 CssString += @"
1981 .pg-opt {
1982 border-bottom: 0px;
1983 background: none repeat scroll 0% 0% #FFF;
1984 }
1985
1986 .dw-breadcrumb-title {
1987 font-size: 14px !important;
1988 padding: 5px 0px 5px 0px !important;
1989 }
1990
1991 .dw-breadcrumb {
1992 padding: 5px 0px 5px 0px !important;
1993 }";
1994 }
1995
1996 if (GeneralSettings.Navigation.BreadcrumbMode == "normal")
1997 {
1998 CssString += @"
1999 .dw-breadcrumb-title {
2000 font-size: 14px !important;
2001 padding: 5px 0px 5px 0px !important;
2002 }
2003
2004 .dw-breadcrumb a, .pg-opt .breadcrumb {
2005 padding: 5px !important;
2006 }";
2007 }
2008
2009 if (GeneralSettings.Navigation.BreadcrumbMode == "large")
2010 {
2011 CssString += @"
2012 .dw-breadcrumb-title {
2013 font-size: 22px !important;
2014 padding: 15px 0px 15px 0px !important;
2015 }
2016
2017 .dw-breadcrumb {
2018 padding: 15px !important;
2019 }";
2020 }
2021
2022
2023 if (GeneralSettings.Navigation.BreadcrumbAlign == "right")
2024 {
2025 CssString += @"
2026 .dw-breadcrumb {
2027 float: right !important;
2028 }";
2029 }
2030 else
2031 {
2032 CssString += @"
2033 .dw-breadcrumb {
2034 float: left !important;
2035 }";
2036 }
2037
2038
2039 //Left menu custom settings
2040 if (GeneralSettings.Navigation.LeftmenuMode == "light" || GeneralSettings.Navigation.LeftmenuMode == "light-color")
2041 {
2042 CssString += @"
2043 ul.dw-categories, ul.dw-categories > li, ul.dw-categories > li > ul > li {
2044 border: 0px solid #EEE;
2045 }
2046
2047 ul.dw-categories > li > ul {
2048 background: none repeat scroll 0% 0% #FFF;
2049 }
2050
2051 ul.dw-categories li a:hover, ul.dw-categories li a:focus, ul.dw-categories li a:active {
2052 background-color: #FFF !important;
2053 color: " + ColorSettings.Color.Primary + @" !important;
2054 }
2055
2056 .list-active, .list-active > a {
2057 background-color: #FFF;
2058 color: " + ColorSettings.Color.Primary + @" !important;
2059 }
2060
2061 .list-open-active {
2062 background-color: #FFF;
2063 color: " + ColorSettings.Color.Primary + @" !important;
2064 }";
2065 }
2066
2067 if (GeneralSettings.Navigation.LeftmenuMode == "lines")
2068 {
2069 CssString += @"
2070 ul.dw-categories > li {
2071 border-bottom: 1px solid #EEE;
2072 }
2073
2074 ul.dw-categories {
2075 border: 0px solid #EEE;
2076 }
2077
2078 ul.dw-categories > li > ul {
2079 background: none repeat scroll 0% 0% #FFF;
2080 }
2081
2082 ul.dw-categories li a:hover, a:focus, a:active {
2083 background-color: #FFF !important;
2084 color: " + ColorSettings.Color.Primary + @" !important;
2085 }
2086
2087 .list-active, .list-active > a {
2088 background-color: #FFF;
2089 color: " + ColorSettings.Color.Primary + @" !important;
2090 }
2091
2092 .list-open-active {
2093 background-color: #FFF;
2094 color: " + ColorSettings.Color.Primary + @" !important;
2095 }";
2096 }
2097
2098 if (GeneralSettings.Navigation.LeftmenuMode == "boxed")
2099 {
2100 CssString += @"
2101 ul.dw-categories, ul.dw-categories > li, ul.dw-categories > li > ul > li {
2102 border: 0px solid #EEE;
2103 }
2104
2105 .list-active, .list-active > a {
2106 background-color: " + ColorSettings.Color.Primary + @" !important;
2107 color: #FFF;
2108 }";
2109 }
2110
2111 if (GeneralSettings.Navigation.LeftmenuMode == "border")
2112 {
2113 CssString += @"
2114 ul.dw-categories > li {
2115 border: 1px solid #EEE;
2116 }
2117
2118 ul.dw-categories > li > ul > li {
2119 border-top: 1px solid #EEE;
2120 }
2121
2122 .list-active, .list-active > a {
2123 background-color: " + ColorSettings.Color.Primary + @" !important;
2124 color: #FFF;
2125 }";
2126 }
2127
2128 if (GeneralSettings.Navigation.LeftmenuMode == "light-color")
2129 {
2130 CssString += @"
2131 ul.dw-categories li a:hover, ul.dw-categories a:focus, ul.dw-categories a:active {
2132 border-left: 6px solid " + ColorSettings.Color.Primary + @";
2133 }
2134
2135 ul.dw-categories .M2 > li > a:hover, ul.dw-categories .M2 > li > a:focus, ul.dw-categories .M2 > li > a:active, ul.dw-categories .M2 > .list-active > a {
2136 padding-left: 20px;
2137 }
2138
2139 ul.dw-categories .M3 > li > a:hover, ul.dw-categories .M3 > li > a:focus, ul.dw-categories .M3 > li > a:active, ul.dw-categories .M3 > .list-active > a {
2140 padding-left: 30px;
2141 }
2142
2143 ul.dw-categories .M4 > li > a:hover, ul.dw-categories .M4 > li > a:focus, ul.dw-categories .M4 > li > a:active, ul.dw-categories .M4 > .list-active > a {
2144 padding-left: 40px;
2145 }
2146
2147 ul.dw-categories .M5 > li > a:hover, ul.dw-categories .M5 > li > a:focus, ul.dw-categories .M5 > li > a:active, ul.dw-categories .M5 > .list-active > a {
2148 padding-left: 50px;
2149 }
2150
2151 ul.dw-categories .M6 > li > a:hover, ul.dw-categories .M6 > li > a:focus, ul.dw-categories .M6 > li > a:active, ul.dw-categories .M6 > .list-active > a {
2152 padding-left: 50px;
2153 }
2154
2155 ul.dw-categories .M7 > li > a:hover, ul.dw-categories .M7 > li > a:focus, ul.dw-categories .M7 > li > a:active, ul.dw-categories .M7 > .list-active > a {
2156 padding-left: 50px;
2157 }
2158
2159 ul.dw-categories .M8 > li > a:hover, ul.dw-categories .M8 > li > a:focus, ul.dw-categories .M8 > li > a:active, ul.dw-categories .M8 > .list-active > a {
2160 padding-left: 50px;
2161 }
2162
2163 ul.dw-categories .list-active > a {
2164 border-left: 6px solid " + ColorSettings.Color.Primary + @";
2165 }
2166
2167 .btn-dw:hover, .btn-dw:focus, .btn-dw:active {
2168
2169 }";
2170 }
2171
2172
2173 //Buttons custom designs
2174 if (GeneralSettings.Navigation.ButtonDesign == "light-rounded")
2175 {
2176 CssString += @"
2177 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart {
2178 border-width: 0px;
2179 }
2180
2181 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active {
2182 background-color: " + ColorSettings.Color.Secondary + @";
2183 color: #FFF;
2184 border-width: 0px;
2185 }
2186
2187 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active {
2188 background-color: " + ColorSettings.Color.Primary + @";
2189 color: #FFF;
2190 border-width: 0px;
2191 }
2192
2193 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active {
2194 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @";
2195 color: #FFF;
2196 border-width: 0px;
2197 }";
2198 }
2199
2200 if (GeneralSettings.Navigation.ButtonDesign == "corners")
2201 {
2202 CssString += @"
2203 .btn-dw-primary, .btn-dw-secondary, btn-dw-cart , .btn-dw-cart {
2204 border-radius: 0px !important;
2205 border-width: 0px;
2206 }
2207
2208 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active {
2209 background-color: " + ColorSettings.Color.Secondary + @";
2210 color: #FFF;
2211 border-width: 0px;
2212 }
2213
2214 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active {
2215 background-color: " + ColorSettings.Color.Primary + @";
2216 color: #FFF;
2217 border-width: 0px;
2218 }
2219
2220 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active {
2221 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @";
2222 color: #FFF;
2223 border-width: 0px;
2224 }";
2225 }
2226
2227 if (GeneralSettings.Navigation.ButtonDesign == "round")
2228 {
2229 CssString += @"
2230 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart {
2231 padding: 5px 15px;
2232 border-radius: 200px !important;
2233 border-width: 0px !important;
2234 }
2235
2236 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active {
2237 background-color: " + ColorSettings.Color.Secondary + @";
2238 color: #FFF;
2239 border-width: 0px !important;
2240 }
2241
2242 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active {
2243 background-color: " + ColorSettings.Color.Primary + @";
2244 color: #FFF;
2245 border-width: 0px !important;
2246 }
2247
2248 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active {
2249 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @";
2250 color: #FFF;
2251 border-width: 0px !important;
2252 }";
2253 }
2254
2255 if (GeneralSettings.Navigation.ButtonDesign == "border")
2256 {
2257 CssString += @"
2258 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart {
2259 background-color: transparent;
2260 }
2261
2262 .btn-dw-primary {
2263 border-width: 4px;
2264 padding: 3px 10px;
2265 color: " + ColorSettings.Color.Primary + @";
2266 }
2267
2268 .btn-dw-secondary {
2269 border-width: 2px;
2270 color: " + ColorSettings.Color.Secondary + @";
2271 }
2272
2273 .btn-dw-cart {
2274 border-width: 4px;
2275 padding: 3px 10px;
2276 color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @";
2277 }
2278
2279 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active {
2280 background-color: " + ColorSettings.Color.Primary + @";
2281 border-width: 4px;
2282 padding: 3px 10px;
2283 border-color: " + ColorSettings.Color.Primary + @";
2284 color: #FFF;
2285 }
2286
2287 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active {
2288 background-color: " + ColorSettings.Color.Primary + @";
2289 border-width: 2px;
2290 color: #FFF;
2291 border-color: #FFF;
2292 }
2293
2294 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active {
2295 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @";
2296 border-width: 4px;
2297 padding: 3px 10px;
2298 border-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @";
2299 color: #FFF;
2300 }";
2301 }
2302
2303 if (GeneralSettings.Navigation.ButtonDesign == "border-sharp" || GeneralSettings.Navigation.ButtonDesign == "border-round")
2304 {
2305 CssString += @"
2306 .btn-dw-primary, .btn-dw-secondary, .btn-dw-cart {
2307 background-color: transparent;
2308 }
2309
2310 .btn-dw-primary {
2311 border-width: 4px;
2312 padding: 3px 15px;
2313 color: " + ColorSettings.Color.Primary + @";
2314 }
2315
2316 .btn-dw-secondary {
2317 border-width: 2px;
2318 padding: 5px 15px;
2319 color: " + ColorSettings.Color.Secondary + @";
2320 }
2321
2322 .btn-dw-cart {
2323 border-width: 4px;
2324 padding: 3px 15px;
2325 color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @";
2326 }
2327
2328 .btn-dw-primary:hover, .btn-dw-primary:focus, .btn-dw-primary:active {
2329 background-color: " + ColorSettings.Color.Primary + @";
2330 border-width: 4px;
2331 color: #FFF;
2332 padding: 3px 15px;
2333 border-color: " + ColorSettings.Color.Primary + @";
2334 }
2335
2336 .btn-dw-secondary:hover, .btn-dw-secondary:focus, .btn-dw-secondary:active {
2337 background-color: " + ColorSettings.Color.Primary + @";
2338 border-width: 2px;
2339 color: #FFF;
2340 padding: 5px 15px;
2341 border-color: #FFF;
2342 }
2343
2344 .btn-dw-cart:hover, .btn-dw-cart:focus, .btn-dw-cart:active {
2345 background-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @";
2346 border-width: 4px;
2347 color: #FFF;
2348 padding: 3px 15px;
2349 border-color: " + GetString("Item.Area.EcommerceCartButtonColor.Color") + @";
2350 }";
2351 }
2352
2353 if (GeneralSettings.Navigation.ButtonDesign == "border-sharp")
2354 {
2355 CssString += @"
2356 .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 {
2357 border-radius: 0px !important;
2358 }";
2359 }
2360
2361 if (GeneralSettings.Navigation.ButtonDesign == "border-round")
2362 {
2363 CssString += @"
2364 .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 {
2365 border-radius: 200px !important;
2366 }";
2367 }
2368
2369
2370 //Headings custom settings
2371 if (GeneralSettings.Headings.Mode == "underline")
2372 {
2373 CssString += @"
2374 .dw-section-title {
2375 border-bottom: 4px solid;
2376 margin-bottom: 15px;
2377 }";
2378 }
2379
2380 if (GeneralSettings.Headings.Mode == "boxed" || GeneralSettings.Headings.Mode == "boxed-line")
2381 {
2382 CssString += @"
2383 .dw-section-title span {
2384 background-color: " + GetString("Item.Area.HeadingsH1.Color.Color") + @";
2385 display: inline-block;
2386 padding: 8px 16px;
2387 color: #FFF;
2388 }";
2389
2390 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color")))
2391 {
2392 CssString += @"
2393 .dw-section-title {
2394 background-color: " + ColorSettings.Color.Primary + @";
2395 }";
2396 }
2397 }
2398
2399 if (GeneralSettings.Headings.Mode == "boxed-line")
2400 {
2401 CssString += @"
2402 .dw-section-title span {
2403 margin-bottom: 2px;
2404 }
2405
2406 .dw-section-title {
2407 border-bottom: 2px solid " + GetString("Item.Area.HeadingsH1.Color.Color") + @";
2408 margin-bottom: 10px;
2409 }";
2410
2411 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color")))
2412 {
2413 CssString += @"
2414 .dw-section-title {
2415 border-bottom: 2px solid " + ColorSettings.Color.Primary + @";
2416 }";
2417 }
2418 }
2419
2420 if (GeneralSettings.Headings.Mode == "outline")
2421 {
2422 CssString += @"
2423 .dw-section-title {
2424 color: #FFF;
2425 text-shadow:
2426 -1px -1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @",
2427 1px -1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @",
2428 -1px 1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @",
2429 1px 1px 0 " + GetString("Item.Area.HeadingsH1.Color.Color") + @";
2430 }";
2431
2432 if (string.IsNullOrWhiteSpace(GetString("Item.Area.HeadingsH1.Color.Color")))
2433 {
2434 CssString += @"
2435 .dw-section-title {
2436 text-shadow:
2437 -1px -1px 0 #1A1A1A,
2438 1px -1px 0 #1A1A1A,
2439 -1px 1px 0 #1A1A1A,
2440 1px 1px 0 #1A1A1A;
2441 }";
2442 }
2443 }
2444
2445 if (GeneralSettings.Headings.Mode == "backline")
2446 {
2447 CssString += @"
2448 .dw-section-title {
2449 font-size: 18px;
2450 text-align: center;
2451 border-bottom: 2px solid;
2452 padding: 0;
2453 margin: 8px 0 20px;
2454 line-height: 0em !important;
2455 }
2456
2457 .dw-section-title > span {
2458 background-color: #FFF;
2459 padding: 0 16px;
2460 }
2461
2462 .dw-section-title-small {
2463 margin: 8px 0 20px;
2464 }";
2465 }
2466
2467 if (GeneralSettings.Ecommerce.EcomCardDesign == "one")
2468 {
2469
2470 }
2471
2472 if (GeneralSettings.Ecommerce.EcomCardDesign == "two")
2473 {
2474 CssString += @"
2475 .product {
2476 border: 1px solid #E5E5E5;
2477 }";
2478 }
2479
2480 return CssString;
2481 }
2482
2483 private string ClearBackground() {
2484 string CssString = "";
2485
2486 CssString += @"
2487 .dw-navbar-button > a {
2488 background-color: rgba(0, 0, 0, 0.0) !important;
2489 }
2490
2491 .dw-navbar-button > a:hover, dw-navbar-button > a:active, dw-navbar-button > a:focus, .active > a {
2492 background-color: rgba(0, 0, 0, 0.0) !important;
2493 }";
2494
2495 return CssString;
2496 }
2497
2498 private string NavbarPosition(bool margin=false, int specialpadding=6, int extramargin=0) {
2499 int LogoHeight = 0;
2500 string CssString = "";
2501 int Centerpos = 0;
2502
2503 if (GeneralSettings.Header.Mode != "solid"){
2504 if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image))
2505 {
2506 LogoHeight = ImageHeight();
2507 }
2508 else
2509 {
2510 LogoHeight = GetInteger("Item.Area.LogoFont.Size");
2511 }
2512 }
2513 else
2514 {
2515 if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image))
2516 {
2517 LogoHeight = 18;
2518 }
2519 else
2520 {
2521 LogoHeight = GetInteger("Item.Area.LogoFont.Size")-10;
2522 }
2523 }
2524
2525 if (margin == false)
2526 {
2527 Centerpos = (LogoHeight/2) + 6;
2528
2529 CssString += @"
2530 .dw-navbar-button > a, .navbar-wp.affix .navbar-nav > li > a {
2531 padding: " + Centerpos + @"px " + (specialpadding+4) + @"px " + Centerpos + @"px " + (specialpadding+4) + @"px !important;
2532 margin: " + extramargin + @"px " + extramargin + @"px !important;
2533 }";
2534 }
2535 else
2536 {
2537 Centerpos = ((LogoHeight/2)+6)-(specialpadding+extramargin);
2538
2539 CssString += @"
2540 .dw-navbar-button > a, .navbar-wp.affix .navbar-nav > li > a {
2541 padding: " + specialpadding + @"px " + (specialpadding+4) + @"px " + specialpadding + @"px " + (specialpadding+4) + @"px !important;
2542 margin: " + Centerpos + @"px 4px 0px 4px !important;
2543 }";
2544 }
2545
2546 return CssString;
2547 }
2548
2549 private int ImageHeight ()
2550 {
2551 int LogoHeight = 0;
2552
2553 if (!string.IsNullOrWhiteSpace(GetString("Item.Area.GeneralLogo")))
2554 {
2555 string imageUrl = "http://" + HttpContext.Current.Request.Url.Authority + GetString("Item.Area.GeneralLogo");
2556
2557 WebRequest request = WebRequest.Create(imageUrl);
2558 WebResponse response = request.GetResponse();
2559 Image image = Image.FromStream(response.GetResponseStream());
2560
2561 LogoHeight = image.Height;
2562 }
2563 else
2564 {
2565 LogoHeight = 38;
2566 }
2567
2568 return LogoHeight;
2569 }
2570 }
2571
2572
2573
2574 @{
2575 InitGeneralSettings();
2576 }
2577
2578
2579 @if (writeCss)
2580 {
2581 css += FontStylesCSS() + "/*Colors*/" + Environment.NewLine + GetColorSettings() + Environment.NewLine + "/*General*/" + Environment.NewLine + GetGeneralCSS();
2582 Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(css, HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.css"), false);
2583 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);
2584 Dynamicweb.Core.Helpers.TextFileHelper.WriteTextFile(RemoveWhiteSpaceFromStylesheets(css), cssPath, false);
2585 }
2586
2587 @functions{
2588 public static string RemoveWhiteSpaceFromStylesheets(string body)
2589 {
2590 body = Regex.Replace(body, @"[a-zA-Z]+#", "#");
2591 body = Regex.Replace(body, @"[\n\r]+\s*", string.Empty);
2592 body = Regex.Replace(body, @"\s+", " ");
2593 body = Regex.Replace(body, @"\s?([:,;{}])\s?", "$1");
2594 body = body.Replace(";}", "}");
2595 body = Regex.Replace(body, @"([\s:]0)(px|pt|%|em)", "$1");
2596 // Remove comments from CSS
2597 body = Regex.Replace(body, @"/\*[\d\D]*?\*/", string.Empty);
2598 return body;
2599 }
2600 }
2601
2602 <!-- Template styles -->
2603 <link id="dwStylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/DWGlobalStyles.min.css" rel="stylesheet" media="screen">
2604 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/font.css">
2605 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/invoice.css">
2606 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/jquerybxslider.css">
2607 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/owl.carousel.min.css">
2608 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/owl.theme.default.min.css">
2609 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/print.css" media="print">
2610 @{ string cssAutoPath = "/Files/Templates/Designs/Dwsimple/css/DWGlobalStylesSite" + GetString("DwAreaID") + "_auto.min.css?t=@areaUpdated.Ticks"; }
2611
2612 <link type="text/css" href="@cssAutoPath" rel="stylesheet">
2613 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/style.min.css?hash=@DateTime.Now">
2614 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/interspiroStyle.min.css?hash=@DateTime.Now">
2615 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/styles.min.css">
2616
2617 <!-- Analytics code -->
2618 @GetValue("Item.Area.OtherAnalyticsCode")
2619
2620 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/typeahead.css">
2621
2622 <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
2623
2624
2625
2626 <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
2627
2628 @if (GeneralSettings.Navigation.IsMegamenu)
2629 {
2630 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Dwsimple/css/megamenu.min.css">
2631 }
2632
2633
2634 @RenderSnippet("TopModule")
2635 @RenderSnippet("TopModuleSize")
2636 @RenderSnippet("TopModuleQuoteHeight")
2637 @RenderSnippet("ImageTextBoxMOdule")
2638 @RenderSnippet("Specification")
2639 @RenderSnippet("TopModuleQuote")
2640 @RenderSnippet("VideoContainer")
2641 @RenderSnippet("FocusElement")
2642 @RenderSnippet("MultyModule")
2643 @RenderSnippet("ImageTextBoxMOduleSize")
2644 @RenderSnippet("360Rotation")
2645 @RenderSnippet("360RotationStyle")
2646 @GetValue("Stylesheets")
2647 @GetValue("Javascripts")
2648 </head>
2649
2650 <body style="@GeneralSettings.Background.Style" id="sitecontent">
2651 <!-- Google Tag Manager (noscript) -->
2652 <noscript>
2653 <iframe src="https://www.googletagmanager.com/ns.html?id=@GTM_ID" height="0" width="0" style="display:none;visibility:hidden"></iframe>
2654 </noscript>
2655 <!-- End Google Tag Manager (noscript) -->
2656 <!-- MODALS -->
2657 <div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
2658 <div class="modal-dialog modal-sm">
2659 <div class="modal-content">
2660 <div class="modal-header">
2661 <h4 class="modal-title" id="myModalLabel">@Translate("Login", "Login")</h4>
2662 </div>
2663 <form name="form" id="loginform" method="post">
2664 <div class="modal-body">
2665 @if (!string.IsNullOrWhiteSpace(GetString("DW_extranet_error_uk")))
2666 {
2667 <script>alert("@GetValue("DW_extranet_error_uk")");</script>
2668 }
2669
2670 <input type="hidden" name="ID" value="@Pageview.ID">
2671 <input type="hidden" name="DWExtranetUsernameRemember" value="True">
2672 <input type="hidden" name="DWExtranetPasswordRemember" value="True">
2673 <div class="form-group">
2674 @{ attrValue = Translate("Enter email", "Enter email");
2675 var username2 = @GetValue("DWExtranetUsername");
2676 }
2677
2678 <label for="username">@Translate("Email", "Email")</label>
2679 <input type="text" class="form-control" name="username" id="username" placeholder="@attrValue" value="@username2">
2680 </div>
2681 <div class="form-group">
2682 @{ attrValue = Translate("Enter password", "Enter password");
2683 }
2684
2685 <label for="password">@Translate("Password", "Password")</label>
2686 <input type="password" class="form-control" name="password" id="password" placeholder="@attrValue">
2687 <p> </p>
2688 <a class="pull-left" href='/Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]&LoginAction=Recovery'>@Translate("Forgot your password?", "Forgot your password?")</a>
2689
2690 </div>
2691 </div>
2692 <div class="modal-footer">
2693 <div class="row">
2694 <div class="col-md-12">
2695 <div class="checkbox pull-left">
2696 <label>
2697 <input type="checkbox" name="Autologin" checked="checked" value="True"> @Translate("Remember me", "Remember me")
2698 </label>
2699 </div>
2700 <button type="submit" class="btn btn-xs btn-base pull-right">@Translate("Sign in", "Sign in")</button>
2701 </div>
2702 </div>
2703 </div>
2704 @*@if (GetLoop("DWExtranetExternalLoginProviders").Count != 0)
2705 {
2706 <div class="modal-footer">
2707 <div class="row">
2708 <div class="col-md-12">
2709 <div class="pull-left">@Translate("Or sign in using", "Or sign in using"):</div>
2710 <p> </p>
2711 </div>
2712 </div>
2713
2714 <div class="row">
2715 <div class="col-md-12">
2716 @foreach (LoopItem LoginProvider in GetLoop("DWExtranetExternalLoginProviders"))
2717 {
2718 var ProviderName = LoginProvider.GetString("ProviderName").ToLower();
2719 var ProviderID = LoginProvider.GetValue("ProviderID");
2720 <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>
2721 }
2722 </div>
2723 </div>
2724 </div>
2725 }*@
2726 </form>
2727 </div>
2728 </div>
2729 </div>
2730
2731 <!-- MOBILE MENU -->
2732 @{
2733 var offsetmenuplace = "left";
2734
2735 if (GeneralSettings.Header.Mode == "mobile")
2736 {
2737 offsetmenuplace = GeneralSettings.Navigation.Position;
2738 }
2739 }
2740
2741 <div id="myNavmenu" class="navmenu navmenu-default navmenu-fixed-@offsetmenuplace offcanvas">
2742 <div class="col-sm-12 col-xs-12 offcanvas-col">
2743 <div class="row offcanvas-row"> </div>
2744 <div class="offcanvas-row pull-right">
2745 <button type="button" class="btn btn-sm btn-base close-menu" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body">
2746 <img src="/Files/Templates/Designs/Dwsimple/images/icons/close.png" alt="close">
2747 <span>
2748 @Translate("Menu", "Menu")
2749 </span>
2750 </button>
2751 </div>
2752 <div class="row offcanvas-row hidden">
2753 <div class="col-sm-12 col-xs-12 offcanvas-col">
2754 <a href="/Default.aspx?ID=@firstpageid" class="brand">
2755 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image))
2756 {
2757 <div class="img-responsive dw-offsetmenu-logo pull-left">
2758 @if (GeneralSettings.Logo.ContrastImage != GeneralSettings.Logo.Image)
2759 {
2760 <img src="@GeneralSettings.Logo.ContrastImage" alt="Logo">
2761 }
2762 else
2763 {
2764 <img class="img-responsive" src="@GeneralSettings.Logo.Image" alt="Logo">
2765 }
2766 </div>
2767 }
2768
2769 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text))
2770 {
2771 <div class="dw-logotext dw-offsetmenu-logo pull-left">@GeneralSettings.Logo.Text</div>
2772 }
2773 </a>
2774 </div>
2775 </div>
2776 <div class="row offcanvas-row"> </div>
2777 </div>
2778
2779 <div class="col-sm-12 col-xs-12 offcanvas-col">
2780 @if (GetBoolean("Item.Area.EcomEnabled"))
2781 {
2782 <div class="row offcanvas-row"> </div>
2783 <div class="row offcanvas-row">
2784 <div class="col-sm-12 col-xs-12 offcanvas-col">
2785 @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
2786 {
2787 <div class="pull-left hidden">
2788 <a href='Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]' class="btn btn-sm btn-default">@Translate("Sign in", "Sign in")</a>
2789 <a href='Default.aspx?ID=@Pageview.Area.Item["SignUpPageId"]' class="btn btn-sm btn-default">@Translate("Opret brugerprofil", "Opret brugerprofil")</a>
2790 </div>
2791
2792 }
2793
2794 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
2795 {
2796 <div class="pull-left">
2797 <a href='Default.aspx?ID=@Pageview.Area.Item["OrdersPageId"]' class="btn btn-sm btn-default">
2798 <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong>
2799 </a>
2800 </div>
2801 <div class="pull-left">
2802 <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>
2803 </div>
2804 }
2805
2806 </div>
2807 </div>
2808 <div class="row offcanvas-row"> </div>
2809 }
2810 </div>
2811 <div class="col-sm-12 col-xs-12 offcanvas-col">
2812 @if (deviceType == "Mobile")
2813 {
2814 if ((GetLoop("DWExtranetSecondaryUsers").Count > 0 || !string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))))
2815 {
2816
2817 <div class="impersonation-box" role="navigation">
2818 <div class="">
2819 @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID")))
2820 {
2821 <div class="text-center">
2822 <span>@Translate("Select the customer to manage", "Select the customer to manage")</span>
2823
2824 <a href="/Default.aspx?ID=@ImpersonationPage" class="btn btn-dw-primary impresonateButton">@Translate("Impersonation page")</a>
2825 </div>
2826 }
2827 else
2828 {
2829 <form method="post" class="form-inline text-center" id="form-impersonate">
2830 @{
2831 User impUser = User.GetUserByID(GetInteger("DW_extranet_AccessUserID"));
2832 string impersonateUser = Translate("You are currently logged in as", "You are currently logged in as") + " " + @GetGlobalValue("Global:Extranet.SecondaryUser.UserName");
2833 string stopImpersonateTranslation = @Translate("Logout", "Logout");
2834 }
2835
2836 <span title="@impersonateUser" class="impersonate-user">
2837 <i class="fa fa-user-secret"></i> @impersonateUser
2838 </span>
2839 <input type="hidden" name="DWExtranetRemoveSecondaryUser" value='Stop+impersonation'>
2840 <input type="submit" class="btn btn-dw-primary impresonateButton" name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" value="@stopImpersonateTranslation">
2841 </form>
2842 }
2843
2844 </div>
2845 </div>
2846 }
2847 }
2848
2849 </div>
2850 <div class="row offcanvas-row">
2851 <div class="col-sm-12 col-xs-12 offcanvas-col">
2852 @GetValue("DwNavigation(drawernavigation)")
2853
2854
2855 </div>
2856
2857 </div>
2858
2859
2860 <div class="langMobile">
2861 <div class="lang-sug">
2862 <img class="closeLang" src="/Files/Templates/Designs/Dwsimple/images/icons/close-black.png" alt="close">
2863
2864 <p>@Translate("Change language", "Change language"):</p>
2865
2866 <ul class="langMenu langMobile">
2867
2868 @foreach (var lang in GetLoop("WebsiteLanguages"))
2869 {
2870
2871 string isActive = (lang.GetBoolean("IsCurrent") ? "activeArea" : "");
2872
2873 <li class="@isActive">
2874
2875 @{
2876 string langCode = lang.GetString("Culture").Substring(0, 2).ToLower();
2877
2878 if (lang.GetBoolean("IsCurrent"))
2879 {
2880 <a data-lang="current" data-code="@langCode" class="activeArea langSelected" href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'>
2881 @lang.GetString("Name")
2882
2883 </a>
2884
2885 }
2886 else
2887 {
2888 <a class="langSelected" data-lang="none" data-code="@langCode" href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'>
2889 @lang.GetString("Name")
2890
2891 </a>
2892
2893 }
2894 }
2895 </li>
2896 }
2897
2898 </ul>
2899
2900 <div class="container">
2901
2902 <p>@Translate("Information for your country", "Information for your country"):</p>
2903 <select class="select-lang" onchange="location = this.value;">
2904 <option selected="" disabled="" hidden="">@Translate("Select country", "Select country")</option>
2905 @foreach (var lang in GetLoop("Item.Area.LandingPages"))
2906 {
2907
2908 <option value='@lang.GetString("Item.Area.LandingPages.Link")' data-lang='@lang.GetString("Item.Area.LandingPages.Title")'>@lang.GetString("Item.Area.LandingPages.Title")</option>
2909 }
2910 </select>
2911 </div>
2912
2913
2914 </div>
2915 <!--Mobile e-learning container-->
2916 <div class="e-learning">
2917 <img class="closeLearning" src="/Files/Templates/Designs/Dwsimple/images/icons/close-black.png" alt="close">
2918
2919 <p>@Translate("E-learning login", "E-learning login")</p>
2920 <ul class="e-learning-menu">
2921 @RenderNavigation(new
2922 {
2923 id = "topELearningMenu",
2924 cssclass = " dwnavigation",
2925 template = "SpecialNavigationELearning.xslt",
2926 parenttag = "SpecialNavigation1"
2927 })
2928 </ul>
2929 <div class="">
2930
2931 <p>@Translate("I'm new. What is this?", "I'm new. What is this?")</p>
2932 <ul class="e-learning-menu">
2933 @RenderNavigation(new
2934 {
2935 id = "topELearningMenu",
2936 cssclass = " dwnavigation",
2937 template = "SpecialNavigationELearning.xslt",
2938 parenttag = "SpecialNavigation2"
2939 })
2940 </ul>
2941
2942 </div>
2943 </div>
2944 <!--End Mobile e-learning container-->
2945
2946 </div>
2947 <div>
2948 <ul class="top-menu">
2949 @if (!string.IsNullOrWhiteSpace(landingPageLink))
2950 {
2951 <li class="landingpageLink">
2952 <a href="@landingPageLink" title="">
2953 <span style="color:red; font-weight:bolder;">@landingPageText</span>
2954 </a>
2955 </li>
2956 }
2957 @if (!string.IsNullOrWhiteSpace(downloadLink))
2958 {
2959 <li class="downloadsLink">
2960
2961 <a href="Default.aspx?ID=@downloadLink" title="">
2962 <span><i class="fa fa-arrow-circle-down" aria-hidden="true"></i> @Translate("Downaloads", "Downaloads")</span>
2963 </a>
2964 </li>
2965 }
2966
2967 <li class="LangLing">
2968 <a href="#">
2969 <span><i class="fa fa-globe" aria-hidden="true"></i> @Translate("Languages", "Languages")</span>
2970 </a>
2971 </li>
2972
2973 <!--Mobile e-learning link-->
2974 <li class="eLearninglink">
2975 <a href="#" title='@Translate("eLearning","eLearning")'>
2976 <span><img src="/Admin/Public/GetImage.ashx?width=30&height=20&crop=7&Compression=99&image=Files/Images/Ecom/eLearning.png" alt='@Translate("eLearning","eLearning")'> @Translate("eLearning", "eLearning")</span>
2977 </a>
2978 </li>
2979 <!--End Mobile e-learning link-->
2980 <!-- Ecommerce user menu -->
2981 @if (GetBoolean("Item.Area.EcomEnabled"))
2982 {
2983 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
2984 {
2985 <text>
2986 <li class="LoginLink">
2987 <a href='Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]'>
2988
2989 <span><i class="fa fa-shopping-cart"></i>@Translate("eCommerce", "eCommerce")</span>
2990 </a>
2991 </li>
2992
2993 </text>
2994 }
2995
2996 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
2997 {
2998 <text>
2999 <li class="loggedIn">
3000 <a href='Default.aspx?ID=@Pageview.Area.Item["UserProfilePageId"]'>
3001 <nobr>
3002 <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong>
3003 </nobr>
3004 </a>
3005 </li>
3006 <li>
3007 <a href='/Admin/Public/ExtranetLogoff.aspx?ID=@logoutid'>@Translate("Logout", "Logout")</a>
3008 </li>
3009 </text>
3010 }
3011 }
3012
3013 <!-- Ecommerce Cart -->
3014
3015 </ul>
3016
3017 </div>
3018 </div>
3019
3020 <!-- HEADER AND CONTENT-->
3021
3022 <div class="body-wrap shad @GeneralSettings.Site.LayoutMode">
3023
3024 <!-- HEADER -->
3025 <div id="divHeaderWrapper">
3026 <header class="@GeneralSettings.Header.Classes header">
3027 <div class="headerLeft pull-left">
3028 <!-- TOP HEADER -->
3029 @if (GeneralSettings.Header.Show)
3030 {
3031 <div class="top-header">
3032 <div class="row">
3033 <div class="lang-sug" style="display: none;">
3034 <img class="closeLang" src="/Files/Templates/Designs/Dwsimple/images/icons/close-black.png" alt="close">
3035 <div class="container">
3036
3037 <p>@Translate("Change language", "Change language"):</p>
3038
3039 <div id="partnercountry">
3040
3041 </div>
3042 <ul class="langMenu">
3043 @foreach (var lang in GetLoop("WebsiteLanguages"))
3044 {
3045
3046 string isActive = (lang.GetBoolean("IsCurrent") ? "activeArea" : "");
3047
3048 <li id='@lang.GetValue("ID")area' class="@isActive">
3049
3050 @{
3051 string langCode = lang.GetString("Culture").Substring(0, 2).ToLower();
3052
3053 if (lang.GetBoolean("IsCurrent"))
3054 {
3055 <a data-lang="current" data-code="@langCode" class="activeArea langSelected" href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'>
3056 @lang.GetString("Name")
3057
3058 </a>
3059
3060 }
3061 else
3062 {
3063 <a class="langSelected" data-lang="none" data-code="@langCode" href='Default.aspx?ID=@lang.GetValue("FirstActivePageID")'>
3064 @lang.GetString("Name")
3065
3066 </a>
3067
3068 }
3069 }
3070 </li>
3071 }
3072
3073 </ul>
3074
3075 </div>
3076
3077 <div class="container" style="margin-top: 13px;">
3078 <p>@Translate("Information for your country", "Information for your country"):</p>
3079 <select style="margin-top: 0px;" class="select-lang" id="select-lang" onchange="location = this.value;">
3080 <option>@Translate("Select country", "Select country")</option>
3081 @foreach (var lang in GetLoop("Item.Area.LandingPages"))
3082 {
3083
3084 <option value='@lang.GetString("Item.Area.LandingPages.Link")' data-lang='@lang.GetString("Item.Area.LandingPages.Title")'>@lang.GetString("Item.Area.LandingPages.Title")</option>
3085 }
3086 </select>
3087 </div>
3088
3089 </div>
3090 <div class="e-learning" style="display: none;">
3091 <img class="closeLearning" src="/Files/Templates/Designs/Dwsimple/images/icons/close-black.png" alt="close">
3092 <div class="container">
3093
3094 <p>@Translate("E-learning login", "E-learning login")</p>
3095 <ul class="e-learning-menu">
3096 @RenderNavigation(new
3097 {
3098 id = "topELearningMenu",
3099 cssclass = " dwnavigation",
3100 template = "SpecialNavigationELearning.xslt",
3101 parenttag = "SpecialNavigation1"
3102 })
3103 </ul>
3104
3105
3106
3107 </div>
3108 <div class="container">
3109
3110 <p>@Translate("I'm new. What is this?", "I'm new. What is this?")</p>
3111 <ul class="e-learning-menu">
3112 @RenderNavigation(new
3113 {
3114 id = "topELearningMenu",
3115 cssclass = " dwnavigation",
3116 template = "SpecialNavigationELearning.xslt",
3117 parenttag = "SpecialNavigation2"
3118 })
3119 </ul>
3120 </div>
3121 </div>
3122 </div>
3123 <div class="row">
3124 <div class="col-md-1 col-sm-4 col-xs-2 logobox">
3125 @if (GeneralSettings.Header.Mode == "solid")
3126 {
3127 <a href="/Default.aspx?ID=@firstpageid" class="brand">
3128 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image))
3129 {
3130 <img class="img-responsive dw-logoimage pull-left" src="@GeneralSettings.Logo.Image" alt="Logo">
3131 }
3132
3133 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text))
3134 {
3135 <div class="dw-logotext pull-left">@GeneralSettings.Logo.Text</div>
3136 }
3137 </a>
3138
3139 if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Slogan))
3140 {
3141 <div class="dw-slogantext pull-left">@GeneralSettings.Logo.Slogan</div>
3142 }
3143 }
3144 </div>
3145 <div class="col-md-11 col-sm-8 col-xs-10 logobox hidePrint">
3146 <div class="row">
3147 <div class="col-md-12 col-xs-2 col-sm-12 col-lg-12 hidden-xs hidden-sm search-right">
3148 @{
3149 var columnUser = "col-md-11";
3150 }
3151 @if (GetGlobalValue("Global:Extranet.UserID") != "0")
3152 {
3153 columnUser = "col-md-10";
3154 }
3155 <div class="@columnUser pull-left navBar">
3156 <nav class="top-header-menu hidden-sm hidden-xs">
3157
3158 <ul class="top-menu">
3159 @if (!string.IsNullOrWhiteSpace(landingPageLink))
3160 {
3161 <li class="landingpageLink">
3162 <a href="@landingPageLink" title="">
3163 <span style="color:red; font-weight:bolder;">@landingPageText</span>
3164 </a>
3165 </li>
3166 }
3167
3168 @if (!string.IsNullOrWhiteSpace(downloadLink))
3169 {
3170 <li class="downloadsLink">
3171 <a href="Default.aspx?ID=@downloadLink" title="">
3172 <span><i class="fa fa-arrow-circle-down" aria-hidden="true"></i> @Translate("Downaloads", "Downaloads")</span>
3173 </a>
3174 </li>
3175 }
3176 <li class="LangLing">
3177 <a href="#">
3178 <span><i class="fa fa-globe" aria-hidden="true"></i> @Translate("Languages", "Languages")</span>
3179 </a>
3180 </li>
3181 <li class="eLearninglink">
3182 <a href="#" title='@Translate("eLearning","eLearning")'>
3183 <span><img src="/Admin/Public/GetImage.ashx?width=35&height=25&crop=7&Compression=99&image=Files/Images/Ecom/eLearning.png" alt='@Translate("eLearning","eLearning")'> @Translate("eLearning", "eLearning")</span>
3184 </a>
3185 </li>
3186
3187 <!-- Ecommerce user menu -->
3188 @if (GetBoolean("Item.Area.EcomEnabled"))
3189 {
3190 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
3191 {
3192 <text>
3193 <li class="LoginLink">
3194 <a href='Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]'>
3195 <span><i class="fa fa-shopping-cart"></i>@Translate("eCommerce")</span>
3196 </a>
3197 </li>
3198 </text>
3199 }
3200
3201 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
3202 {
3203 <text>
3204
3205 <li class="loggedIn">
3206 <a href='Default.aspx?ID=@Pageview.Area.Item["UserProfilePageId"]'>
3207 <nobr>
3208 <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong>
3209 </nobr>
3210 </a>
3211 </li>
3212 <li class="QuickOrder">
3213 <a href="Default.aspx?ID=@quickOrder" title="">
3214 <i class="fa fa-cart-plus"></i>
3215 <span>@Translate("Quick order", "Quick order")</span>
3216 </a>
3217 </li>
3218 <li class="myProductsLink">
3219 <a href="Default.aspx?ID=@myProductsPage" title="">
3220 <i class="fa fa-list"></i>
3221 <span>@Translate("My products", "My products")</span>
3222 </a>
3223 </li>
3224 <li class="logOut">
3225 <a href='/Admin/Public/ExtranetLogoff.aspx?'>
3226 <i class="fa fa-sign-out"></i>
3227 @Translate("Logout", "Logout")
3228 </a>
3229 </li>
3230 </text>
3231 }
3232 }
3233
3234 <!-- Ecommerce Cart -->
3235
3236 </ul></nav>
3237 <!-- MAIN NAV -->
3238 @{
3239 var sticky = GeneralSettings.Navigation.StickyMenu;
3240 var stickyTrigger = "affix";
3241 var navbarpos = GeneralSettings.Navigation.Position;
3242 var selectionstyle = GeneralSettings.Navigation.SelectionStyle;
3243
3244 if (sticky == "off")
3245 {
3246 stickyTrigger = "";
3247 }
3248 }
3249
3250 <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">
3251
3252 @if (GeneralSettings.Header.Mode != "solid" || !GeneralSettings.Header.Show)
3253 {
3254 <div class="navbar-header pull-@GeneralSettings.Navigation.InvertedPosition">
3255 <div class="hidden-sm hidden-xs">
3256 <a href="/Default.aspx?ID=@firstpageid" class="brand">
3257 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Image))
3258 {
3259 if (GeneralSettings.Logo.ContrastImage != GeneralSettings.Logo.Image)
3260 {
3261 <img class="img-responsive dw-logoimage dw-logoimage-normal pull-left" src="@GeneralSettings.Logo.Image" alt="Logo">
3262 <img class="img-responsive dw-logoimage dw-logoimage-contrast pull-left" src="@GeneralSettings.Logo.ContrastImage" alt="Logo">
3263 }
3264 else
3265 {
3266 <img class="img-responsive dw-logoimage pull-left" src="@GeneralSettings.Logo.Image" alt="Logo">
3267 }
3268 }
3269
3270 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Text))
3271 {
3272 <div class="dw-logotext pull-left">@GeneralSettings.Logo.Text</div>
3273 }
3274 </a>
3275
3276 @if (!string.IsNullOrWhiteSpace(GeneralSettings.Logo.Slogan))
3277 {
3278 <div class="dw-slogantext pull-left">@GeneralSettings.Logo.Slogan</div>
3279 }
3280 </div>
3281 </div>
3282 }
3283
3284 @if (GeneralSettings.Header.Mode != "mobile")
3285 {
3286
3287 <!-- Big screen header -->
3288 <div class="navbar-navigation">
3289 <div class="hidden-sm hidden-xs">
3290 <nav class="col-md-10 col-sm-10 col-xs-10 p-0 navbar-collapse collapse navbar-@navbarpos">
3291
3292
3293 @if (GeneralSettings.Navigation.IsMegamenu)
3294 {
3295
3296 @GetValue("DwNavigation(topnavigationmegamenu)")
3297 }
3298
3299 <!-- Extra navigation when no header is shown -->
3300 @if (GetBoolean("Item.Area.EcomEnabled"))
3301 {
3302 if (!GeneralSettings.Header.Show)
3303 {
3304 <ul class="nav navbar-nav">
3305 <li> </li>
3306 @if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
3307 {
3308 <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>
3309 <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>
3310 }
3311
3312 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
3313 {
3314 <li class="dw-navbar-button">
3315 <a href='Default.aspx?ID=@Pageview.Area.Item["OrdersPageId"]' data-hover="dropdown">
3316 <nobr>
3317 <strong><i class="fa fa-user"></i></strong>
3318 </nobr>
3319 <span></span>
3320 </a>
3321 </li>
3322 <li class="dw-navbar-button">
3323 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID" data-hover="dropdown"><i class="fa fa-sign-out"></i><span></span></a>
3324 </li>
3325 }
3326
3327 </ul>
3328 }
3329
3330 if (GeneralSettings.Header.Mode != "solid")
3331 {
3332 <ul class="nav navbar-nav">
3333 <li class="dropdown dropdown-aux animate-click dw-navbar-button" data-animate-in="animated bounceInUp" data-animate-out="animated fadeOutDown" style="z-index:500;">
3334 <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown"><i class="fa fa-search"></i><span></span></a>
3335 <ul class="dropdown-menu dropdown-menu-user animate-wr">
3336 <li id="dropdownForm">
3337 <div class="dropdown-form">
3338 <form class="form-light p-15" role="form" method="get" action="Default.aspx">
3339 <input type="hidden" name="ID" value='@searchpage'>
3340 <div class="input-group remote">
3341 <input type="hidden" name="qurlencoded" id="qurlencoded" value=''>
3342 <input type="text" class="form-control typeahead" name="q" placeholder="@searchplaceholder" data-encode="">
3343 <span class="input-group-btn" style="top:-1px !important;">
3344 <button class="btn btn-base" type="submit"><i class="fa fa-search"></i></button>
3345 </span>
3346 </div>
3347 </form>
3348 </div>
3349 </li>
3350 </ul>
3351 </li>
3352 </ul>
3353 }
3354 }
3355 </nav>
3356 </div>
3357
3358 </div>
3359 }
3360 else
3361 {
3362 <!-- Using only mobile navigation -->
3363 <div class="pull-@GeneralSettings.Navigation.Position">
3364 <ul class="nav navbar-nav">
3365 <li class="dw-navbar-button" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body">
3366 <a><i class="fa fa-bars fa-2x"></i><span></span></a>
3367 </li>
3368 </ul>
3369 </div>
3370 }
3371 </div>
3372 </div>
3373 @if (GetGlobalValue("Global:Extranet.UserID") != "0")
3374 {
3375 <div class="searchIcon hidden-xs hidden-sm pull-right miniCartHover">
3376 <span class="buttonIconSearch cart-icon">
3377 <a href="Default.aspx?ID=@cartid" id="minipagecart-extra" data-hover="dropdown">
3378 <i class="fa fa-shopping-cart fa-1_5x"></i>
3379
3380 @if (@GetValue("Ecom:Order.OrderLines.TotalProductQuantity") != null)
3381 {
3382 <span>@GetValue("Ecom:Order.OrderLines.TotalProductQuantity")</span>
3383 }
3384 else
3385 {
3386 <span>0</span>
3387 }
3388
3389 </a>
3390 <span class="cartText">
3391 @Translate("Cart")
3392 </span>
3393 </span>
3394 <div class="minicart">
3395 @MiniCart()
3396 </div>
3397 </div>
3398
3399 }
3400
3401 <div class="searchIcon hidden-xs hidden-sm pull-right">
3402 <span class="buttonIconSearch">
3403 <button class="btn btn-primary searchFieldShow" type="submit">
3404 <img src="/Files/Templates/Designs/Dwsimple/images/icons/search-white.png" class="img-center" alt="">
3405 <span>
3406 @Translate("Search", "Search")
3407 </span>
3408 </button>
3409 </span>
3410 </div>
3411
3412
3413 </div>
3414
3415
3416 </div>
3417
3418 <div class="col-xs-12 mobileMenu hidden-md hidden-lg">
3419 @if (GetGlobalValue("Global:Extranet.UserID") != "0")
3420 {
3421 <span class="buttonIconCart cart-icon">
3422 <a href="Default.aspx?ID=@cartid" id="minipagecart-extra" data-hover="dropdown">
3423 <i class="fa fa-shopping-cart fa-1_5x" id="iosCart"></i>
3424 </a>
3425
3426 <span class="cart-quantity" id="miniCartMobile">
3427 @if (@GetValue("Ecom:Order.OrderLines.TotalProductQuantity") != null)
3428 {
3429 @GetValue("Ecom:Order.OrderLines.TotalProductQuantity")
3430 }
3431 else
3432 {
3433 <text>0</text>
3434 }
3435 </span>
3436
3437 </span>
3438 }
3439
3440
3441 <span class="buttonIconSearch pull-right ">
3442 <button class="btn btn-primary searchFieldShow" type="submit">
3443 <img src="/Files/Templates/Designs/Dwsimple/images/icons/search-white.png" class="img-center" alt="">
3444 <span>
3445 @Translate("Search", "Search")
3446 </span>
3447 </button>
3448 </span>
3449
3450 <!-- Small screen header -->
3451 <div class="hidden-md hidden-lg ">
3452 <div class="pull-right hamb">
3453 <button type="button" class="btn btn-sm btn-base" data-toggle="offcanvas" data-target="#myNavmenu" data-canvas="body">
3454 <img src="/Files/Templates/Designs/Dwsimple/images/icons/hamburger.png" class="img-center" alt="">
3455 <span>
3456 @Translate("Menu", "Menu")
3457 </span>
3458 </button>
3459 </div>
3460 @if (GetGlobalValue("Global:Extranet.UserID") == "0")
3461 {
3462 <span class="pull-right ">
3463 <a href="Default.aspx?ID=8482">
3464 <span><i class="fa fa-shopping-cart" style="color: #eb0029; font-size: 2.3em; padding: .34em;"></i></span>
3465 </a>
3466 </span>
3467 }
3468
3469 <span class="pull-right ">
3470 <a href="@eLearninglink" title='@Translate("eLearning","eLearning")' target="_blank">
3471 <span style="display: inline-block;line-height: 60px;vertical-align: middle;width: 60px;padding-left:5px"><img src="/Admin/Public/GetImage.ashx?width=43&height=33&crop=7&Compression=99&image=Files/Images/Ecom/eLearning.png" alt='@Translate("eLearning","eLearning")'> </span>
3472 </a>
3473 </span>
3474 <span class="pull-right QuickOrder">
3475 <a href="Default.aspx?ID=@quickOrder" title="">
3476 <span style="display: inline-block;line-height: 72px;vertical-align: middle;padding-left:5px;margin-bottom:-12px;">
3477 <i class="fa fa-cart-plus" style="font-size: 1.7em;"></i>
3478 </span>
3479 </a>
3480 </span>
3481
3482 <div class="pull-left hidden-xs hidden-sm">
3483 <h2 class="dw-header-sm-title">@GetGlobalValue("Global:Page.Top.Name")</h2>
3484 </div>
3485
3486
3487
3488 @if (GetBoolean("Item.Area.EcomEnabled"))
3489 {
3490
3491 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
3492 {
3493 <div class="hidden-xs pull-right hidden-sm">
3494 <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>
3495
3496 </div>
3497 <div class="hidden-xs pull-right userNameBox">
3498 <a href='Default.aspx?ID=@Pageview.Area.Item["UserProfilePageId"]' class="btn btn-sm btn-base">
3499 <i class="fa fa-user"></i> <strong>@GetGlobalValue("Global:Extranet.Name")</strong>
3500 </a>
3501
3502 </div>
3503 }
3504
3505 if (!Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")))
3506 {
3507 <div class="hidden-xs pull-right hidden-sm">
3508 <a href='Default.aspx?ID=@Pageview.Area.Item["SignInPageId"]' class="btn btn-sm btn-base"><i class="fa fa-sign-in"></i></a>
3509
3510 </div>
3511 }
3512 }
3513 </div>
3514 <div class="clearfix"></div>
3515 </div>
3516
3517 </div>
3518 <div class="clearfix"></div>
3519 </div>
3520
3521 </div>
3522 }
3523
3524
3525
3526 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.HeaderLayoutImage")))
3527 {
3528 if (currentpageid != firstpageid)
3529 {
3530 var coverimage = GetString("Item.Area.HeaderLayoutImage");
3531
3532 <div class="container-fluid dw-header-image">
3533 <div class="row">
3534 <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>
3535 </div>
3536 </div>
3537 }
3538 else if (GeneralSettings.Header.ShowFrontpageImage)
3539 {
3540 var coverimage = GetString("Item.Area.HeaderLayoutImage");
3541
3542 <div class="container-fluid dw-header-image">
3543 <div class="row">
3544 <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>
3545 </div>
3546 </div>
3547 }
3548 }
3549 else if (GeneralSettings.Header.Mode != "solid")
3550 {
3551 if (currentpageid != firstpageid)
3552 {
3553 <div class="container-fluid dw-header-image">
3554 <div class="row">
3555 <section class="carousel carousel-1 slice fluid" style="height: 160px !important; background-color: transparent; background-size: cover !important;"></section>
3556 </div>
3557 </div>
3558 }
3559 }
3560
3561 </div>
3562 <div class="clearfix"></div>
3563 @if (deviceType != "Mobile")
3564 {
3565 if ((GetLoop("DWExtranetSecondaryUsers").Count > 0 || !string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))))
3566 {
3567
3568 <div class="impersonation-box" role="navigation">
3569 <div class="">
3570 @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID")))
3571 {
3572 <div class="pull-left">
3573 <span>@Translate("Select the customer to manage", "Select the customer to manage")</span>
3574
3575 <a href="/Default.aspx?ID=@ImpersonationPage" class="btn btn-dw-primary impresonateButton">@Translate("Impersonation page")</a>
3576 </div>
3577 }
3578 else
3579 {
3580 <form method="post" class="form-inline" id="form-impersonate">
3581 @{
3582 User impUser = User.GetUserByID(GetInteger("DW_extranet_AccessUserID"));
3583 string impersonateUser = Translate("You are currently logged in as", "You are currently logged in as") + " " + @GetGlobalValue("Global:Extranet.Name");
3584 string stopImpersonateTranslation = @Translate("Logout", "Logout");
3585 }
3586
3587 <span title="@impersonateUser" class="impersonate-user">
3588 <i class="fa fa-user-secret"></i> @impersonateUser
3589 </span>
3590 <input type="hidden" name="DWExtranetRemoveSecondaryUser" value='Stop+impersonation'>
3591 <input type="submit" class="btn btn-dw-primary impresonateButton" name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" value="@stopImpersonateTranslation">
3592 </form>
3593 }
3594
3595 </div>
3596 </div>
3597 }
3598 }
3599
3600
3601 </header>
3602
3603 @if (GetBoolean("Item.Area.EcomEnabled"))
3604 {
3605 if (GeneralSettings.Header.Mode == "solid" && GeneralSettings.Header.Show)
3606 {
3607 <div class="searchRight clearfix">
3608 <div class="slideToggle col-md-12 col-sm-12">
3609 <form method="get" action="Default.aspx">
3610 <input type="hidden" name="ID" value='@searchpage'>
3611
3612 <div id="remote" class="input-group top-search">
3613 <div class="remoteR">
3614 <input type="hidden" name="qurlencoded" id="qurlencoded" value=''>
3615 <input type="text" class="form-control typeahead" name="q" tabindex="1" placeholder="@searchplaceholderAll" data-encode="">
3616 <span class="input-group-btn">
3617 <button class="btn btn-primary " type="submit">
3618 <i class="fa fa-angle-double-right"></i>
3619 </button>
3620 </span>
3621 </div>
3622 </div>
3623 </form>
3624 </div>
3625 </div>
3626 <div class="clearfix"></div>
3627
3628 }
3629
3630 }
3631 @{
3632 var current = "";
3633 var currentWhole = "";
3634 }
3635 @foreach (var lang in GetLoop("Languages"))
3636 {
3637 if (lang.GetBoolean("IsCurrent"))
3638 {
3639 string input = lang.GetString("Culture");
3640 int index = input.IndexOf("-");
3641 if (index > 0)
3642 {
3643 current = input.Substring(0, index);
3644 }
3645 currentWhole = lang.GetString("Culture").ToLower();
3646 }
3647 }
3648 </div>
3649 <!--
3650 </div>
3651 <!-- MAIN CONTENT -->
3652 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
3653
3654
3655 @GetValue("Title(Full width page)")
3656 @GetValue("Description(Use this page for full width pages with no left navigation.)")
3657
3658
3659 @{
3660 string siteurl = GetGlobalValue("Global:Request.Url").ToString();
3661 string App = HttpContext.Current.Request.QueryString.Get("App");
3662 }
3663
3664
3665 @if (GetBoolean("Item.Page.LayoutShowBreadcrumb"))
3666 {
3667 <div class="pg-opt pin white hidden-xs">
3668
3669 <div class="breadcrumbSection">
3670 @if (!GetBoolean("Item.Page.LayoutHideLeftMenu"))
3671 {
3672 <div class="col-lg-3 col-md-3 hidden-sm hidden-xs">
3673 @if (GeneralSettings.Navigation.BreadcrumbMode != "light")
3674 {
3675 <div class="dw-breadcrumb-title">@GetGlobalValue("Global:Page.Top.Name")</div>
3676 }
3677 </div>}
3678 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 breadcrumbSection">
3679 <a href="#" class="goHome">@Translate("Takes you home", "Takes you home"):</a>
3680 @GetValue("DwNavigation(breadcrumb)")
3681 </div>
3682 </div>
3683
3684 </div>
3685 }
3686
3687 <section class="slice white animate-hover-slide" id="content">
3688 <div class="container">
3689 <div class="row">
3690 <div class="col-md-12 col-sm-12 col-xm-12 groupTitleProduct"></div>
3691 </div>
3692 <div class="row">
3693 @RenderSnippet("quickBuySearc")
3694 @*<div class="col-md-3 hidden-sm hidden-xs ">
3695 <div class="widget affix-top" data-spy="affix" data-offset-top="250" data-offset-bottom="300">
3696 @RenderSnippet("Facets")
3697
3698 </div>
3699 <p> </p>
3700 </div>*@
3701 @{var attributeValue = "col-md-9 col-sm-12 col-xs-12";
3702
3703 if (GetBoolean("Item.Page.LayoutHideLeftMenu"))
3704 {
3705 attributeValue = "col-md-12 col-sm-12 col-xm-12";
3706 }
3707 }
3708 <div class="@attributeValue">
3709 <div class="row" id="productlistDescription">@GetValue("DwContent(productlistDescription)")</div>
3710 </div>
3711 <div class="col-md-12 ">
3712 <div class="widget ProductTopMenu" style="display:none;">
3713 @GetValue("DwNavigation(leftnavigation)")
3714 </div>
3715 <p> </p>
3716 @{
3717 var fav = GetString("Item.Area.FavoritePage");
3718 }
3719
3720
3721 @{
3722 string productPageID = Pageview.Area.Item["ProductPageId"].ToString();
3723 }
3724 @if (App != "True")
3725 {
3726 <ul>
3727 <li class="approvedBtn"><a href="/Default.aspx?ID=@productPageID&App=True&SortBy=Name&SortOrder=asc">@Translate("Approved products", "Approved products")</a></li>
3728 </ul>
3729 }
3730 @if (App == "True")
3731 {
3732 <ul>
3733 <li class="approvedBtn list-active"><a href="/Default.aspx?ID=@productPageID&App=True&SortBy=Name&SortOrder=asc">@Translate("Approved products", "Approved products")</a></li>
3734 </ul>
3735 }
3736 @RenderSnippet("favoriteTab")
3737 </div>
3738 <div class="@attributeValue">
3739 @if (App != "True")
3740 {
3741 <div class="row" id="maincontent">@GetValue("DwContent(maincontent)")</div>
3742 }
3743 <div class="row" id="maincontentFav" style="">@GetValue("DwContent(maincontentFav)")</div>
3744
3745 @if (App == "True")
3746 {
3747 <div class="row" id="arr" style="">@GetValue("DwContent(arr)")</div>
3748 }
3749 </div>
3750
3751 @if (GetBoolean("Item.Page.FacebookLikeButton"))
3752 {
3753 <div class="container">
3754 <div class="col-md-12 col-sm-12 col-xs-12">
3755 <div class="row">
3756 <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>
3757 </div>
3758 </div>
3759 </div>
3760 }
3761 </div>
3762 </div>
3763
3764 </section>
3765 @if (GetBoolean("Item.Page.SkipToBottom"))
3766 {
3767
3768 <a href="javascript:;" id="scrollToTop" class="hidden hidden-sm hidden-xs"><i class="fa fa-angle-double-up" aria-hidden="true"></i></a>
3769 <a href="javascript:;" id="scrollToBottom" class="hidden hidden-sm hidden-xs"><i class="fa fa-angle-double-down" aria-hidden="true"></i></a>
3770
3771 @SnippetStart("JavaScriptBottom")
3772 <script type="text/javascript">
3773 if ($(window).scrollTop() == 0) {
3774 $('#scrollToTop').addClass("hidden");
3775 $('#scrollToBottom').removeClass("hidden");
3776 }
3777 if ($(window).scrollTop() + $(window).height() >= $(document).height()) {
3778 $('#scrollToTop').removeClass("hidden");
3779 $('#scrollToBottom').addClass("hidden");
3780 }
3781 $(function () {
3782 $('#scrollToBottom').bind("click", function () {
3783 $('html, body').animate({ scrollTop: $(document).height() }, 1200);
3784 $('#scrollToTop').removeClass("hidden");
3785 $('#scrollToBottom').addClass("hidden");
3786 return false;
3787 });
3788 $('#scrollToTop').bind("click", function () {
3789 $('html, body').animate({ scrollTop: 0 }, 1200);
3790 $('#scrollToTop').addClass("hidden");
3791 $('#scrollToBottom').removeClass("hidden");
3792 return false;
3793 });
3794 });
3795 </script>
3796 @SnippetEnd("JavaScriptBottom")
3797 }
3798 <!-- FOOTER -->
3799 <div class="body-wrap @GeneralSettings.Site.LayoutMode">
3800
3801 <footer class="footer">
3802 <div class="socialFooter">
3803 <div class="container">
3804 @if (GetBoolean("Item.Area.SocialLinksInFooter"))
3805 {
3806 string sicon = "";
3807 string slink = "";
3808 <p>
3809 @foreach (LoopItem socialitem in GetLoop("Item.Area.SocialIconInFooter"))
3810 {
3811
3812 sicon = socialitem.GetString("Item.Area.SocialIconInFooter.Icon");
3813 slink = socialitem.GetString("Item.Area.SocialIconInFooter.Link");
3814 if (slink != "")
3815 {
3816 <a href="@slink" target="_blank"><img class="img-responsive" src="@sicon" alt="Logo"></a>
3817 }
3818
3819
3820 }
3821 </p>
3822 }
3823
3824 </div>
3825 </div>
3826 @if (GetBoolean("Item.Area.FooterShowContactInfo"))
3827 {
3828 <div class="text-footer-section">
3829 <div class="container">
3830 <h3>@GetString("Item.Area.FooterCompanyName")</h3>
3831 @GetString("Item.Area.FooterAddress")
3832
3833 </div>
3834 </div>
3835 }
3836 <div class="footer-menu">
3837 <div class="container">
3838 <div class="footer-logo">
3839 @{
3840 var logofooter = GetString("Item.Area.FooterLogo");
3841 string firstpageidFooter = GetString("DwAreaFirstActivePageID");
3842 }
3843 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.FooterLogo")))
3844 {
3845 <a href="/Default.aspx?ID=@firstpageidFooter" class="brand">
3846 <img class="img-responsive" src="@logofooter" alt="Logo footer">
3847 </a>
3848 }
3849
3850 </div>
3851 <div class="footer-links">
3852 <ul>
3853 @foreach (LoopItem linksfooter in GetLoop("Item.Area.FooterLinks"))
3854 {
3855
3856 var footertitle = linksfooter.GetString("Item.Area.FooterLinks.Title");
3857 var footerlinks = linksfooter.GetString("Item.Area.FooterLinks.Link.Value");
3858
3859 if (@footerlinks != "")
3860 {
3861 <li>
3862
3863
3864 <a href="@footerlinks">@footertitle</a>
3865
3866 </li>
3867 }
3868 }
3869 </ul>
3870
3871 </div>
3872
3873
3874 @if (GetBoolean("Item.Area.FooterNewsletterSignUp"))
3875 {
3876
3877 string newsletter = GetString("Item.Area.SignUpId");
3878 <div class="col-md-3 col-sm-6 col-xs-12">
3879 <div class="col">
3880 <h4>@Translate("Mailing list", "Mailing list")</h4>
3881 <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>
3882 <!--$$Global:Paragraph.Content(11828)-->
3883 <div class="newsketterThankYou">
3884 <div class="newsketterThankYou" style="display: none;">@Translate("Thank you", "Thank you")</div>
3885 </div>
3886 </div>
3887 </div>
3888 }
3889
3890
3891
3892 @if (GetBoolean("Item.Area.FooterShowSitemap"))
3893 {
3894 <div class="col-md-6 col-sm-12 col-xs-12">
3895 <div class="col">
3896 @GetValue("DwNavigation(footersitemap)")
3897 </div>
3898 <div> </div>
3899 </div>
3900 }
3901
3902 @*<div class="row">
3903 @if (GetString("Item.Area.WebmasterLinkCode") != "")
3904 {
3905 <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
3906 <div class="col pull-right">
3907 @{
3908 var webmasterlink = GetString("Item.Area.WebmasterLinkCode");
3909 var username = GetValue("Item.Area.FooterEmail");
3910 var pagename = GetGlobalValue("Global:Page.Name");
3911 }
3912
3913 <p><a href="javascript:void(0);" rel="nofollow" onclick="window.open('@webmasterlink?un=@username&pn=@pagename&url=' + encodeURI(location),'_blank','width=1050,height=750,resizable=yes,scrollbars=yes');">Webmaster</a></p>
3914 </div>
3915 </div>
3916 }
3917 </div>*@
3918 </div>
3919 </div>
3920 </footer>
3921
3922 </div>
3923
3924
3925 <!--[if IE]>
3926 <style>
3927
3928 .widget.affix{
3929
3930 width:21% !important;
3931
3932 }
3933
3934
3935 </style>
3936 <![endif]-->
3937
3938 <script type="text/javascript">
3939 $(document).ready(function () {
3940 MiniCartInit(@miniCartFeedPageId, @ProductPageId);
3941 if ($('.fancybox').length) {
3942 $(".fancybox").fancybox();
3943 }
3944 });
3945 </script>
3946
3947
3948 <!-- Essentials -->
3949 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"></script>
3950 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
3951 <script src="//cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.js"></script>
3952 <script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>
3953 <script src="//connect.facebook.net/en_US/sdk.js"></script>
3954 <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
3955 <script src="/Files/Templates/Designs/Dwsimple/js/typeahead.js"></script>
3956
3957 <script src="/Files/Templates/Designs/Dwsimple/js/codebird.js"></script>
3958 <script src="/Files/Templates/Designs/Dwsimple/js/jquery.socialfeed.js"></script>
3959 <script src="/Files/Templates/Designs/Dwsimple/js/doT.min.js"></script>
3960 <script src="/Files/Templates/Designs/Dwsimple/js/moment.min.js"></script>
3961
3962 <script src="/Files/Templates/Designs/Dwsimple/js/owl.carousel.js"></script>
3963 @*<script src="/Files/Templates/Designs/Dwsimple/js/owl.carousel.min.js"></script>*@
3964 <script src="/Files/Templates/Designs/Dwsimple/js/custom.js"></script>
3965 <script src="/Files/Templates/Designs/Dwsimple/js/filter.js"></script>
3966 <script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.min.js"></script>
3967 <script src="/Files/Templates/Designs/Dwsimple/js/jquerybxslidermin.js"></script>
3968
3969
3970 <!-- Assets -->
3971 <script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-hover-dropdown/2.0.10/bootstrap-hover-dropdown.min.js"></script>
3972
3973 <script src="//cdnjs.cloudflare.com/ajax/libs/spin.js/2.0.1/spin.min.js"></script>
3974
3975 <!-- Sripts for individual pages, depending on what plug-ins are used -->
3976 <script src="//cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/js/jasny-bootstrap.min.js"></script>
3977 <script src="/Files/Templates/Designs/Dwsimple/js/GeneralMethods.js"></script>
3978 <script src="/Files/Templates/Designs/Dwsimple/js/cart.js"></script>
3979 <!-- Replacing the Home text -->
3980 <script>
3981
3982 $("input.typeahead").on("change", function () {
3983 var qvalue = $(this).val().replace(/æ/g, "æ").replace(/ø/g, "ø").replace(/Ã¥/g, "å").replace(/Æ/g, "Æ").replace(/Ø/g, "Ø").replace(/Ã…/g, "Å");
3984
3985 $(this).siblings("#qurlencoded").val(qvalue)
3986 })
3987 $("input.typeahead").on("change", function () {
3988 $('input#qurlencoded').val($(this).val());
3989 });
3990 </script>
3991
3992 <script type="text/html-template" id="OrderlineAjaxTemplate">
3993 <tr>
3994 <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>
3995 <td>
3996 <a href="Obj.link">
3997 Obj.name Obj.variantname
3998 </a>
3999 </td>
4000 <td class="text-center">Obj.quantity</td>
4001 <td class="text-right">
4002 <nobr>
4003 Obj.totalprice
4004 </nobr>
4005 </td>
4006 </tr>
4007 </script>
4008
4009 @* INITIALIZE SCROLLING NAVIGATION *@
4010 @if (GeneralSettings.Navigation.IsAnimateNavigation && Pageview.Device.ToString() == "Desktop")
4011 {
4012 <script>
4013 // Hide Header on on scroll down
4014 var didScroll;
4015 var lastScrollTop = 0;
4016 var delta = 5;
4017 var navbarHeight = $('header').outerHeight();
4018
4019 //$(window).scroll(function (event) {
4020 // didScroll = true;
4021 //});
4022
4023 //setInterval(function () {
4024 // if (didScroll) {
4025 // hasScrolled();
4026 // didScroll = false;
4027 // }
4028 //}, 250);
4029
4030 function hasScrolled() {
4031 var st = $(this).scrollTop();
4032 var $megamenu = $('#topnavigationmegamenu > li.dropdown.ParentShow .dropdown-menu'),
4033 $search = $('.searchRight .slideToggle'),
4034 $isSearchOpen = ($search.is('.open') ? true : false);
4035 // Make sure they scroll more than delta
4036 if (Math.abs(lastScrollTop - st) <= delta)
4037 return;
4038
4039 // If they scrolled down and are past the navbar, add class .nav-up.
4040 // This is necessary so you never see what is "behind" the navbar.
4041 if (st > lastScrollTop && st > navbarHeight) {
4042 // Scroll Down
4043 $('header').removeClass('nav-down').addClass('nav-up');
4044 $megamenu.css('top', '0').fadeOut();
4045 if ($isSearchOpen) $search.fadeOut();
4046 } else {
4047 // Scroll Up
4048 if (st + $(window).height() < $(document).height()) {
4049 $('header').removeClass('nav-up').addClass('nav-down');
4050 $megamenu.fadeIn().css('top', '107px');
4051 if ($isSearchOpen) $search.fadeIn();
4052 }
4053 }
4054 lastScrollTop = st;
4055 }
4056
4057 </script>
4058 }
4059
4060 @RenderSnippet("JavaScriptBottom")
4061
4062
4063 <script>
4064 $(document).ready(function () {
4065 $('.nav-stacked .offcanvas-menubtn').has('ul').addClass('innerMenuMobile');
4066 $("<i class='fa fa-plus mobileMenuFix' onclick='toggleCheck(this)'></i>").insertAfter(".offcanvas-col>.nav-stacked>.offcanvas-menubtn.innerMenuMobile>a");
4067 $(".nav-stacked .0 i").remove();
4068 });
4069 </script>
4070
4071 <script>
4072 function toggleCheck(elem) {
4073 jQuery(elem).parent().children("ul").toggle();
4074 jQuery(elem).toggleClass('fa-plus fa-minus')
4075 }
4076
4077 function toggleCheckTopNav() {
4078 $("#toggleTopNav").children("ul").toggle();
4079 }
4080 </script>
4081
4082 <script>
4083
4084 var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
4085
4086 if (iOS == true) {
4087 document.getElementById('iosCart').classList.add('iosCartFix')
4088 }
4089
4090 </script>
4091
4092
4093 @*<script language="JavaScript" src="http://www.geoplugin.net/javascript.gp" type="text/javascript"></script>*@
4094 </div></body>
4095 </html>