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