Error executing template "Designs/SealingSystem20/_parsed/Page.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_86ba5318c1ea413098e49167522ae6c3.Execute() in D:\dynamicweb.net\Solutions\DesignFordi\sealing-system20.dw9.dynamicweb-cms.com\Files\Templates\Designs\SealingSystem20\_parsed\Page.parsed.cshtml:line 926
at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @using System;
2 @using Dynamicweb.Content.Items;
3 @using Dynamicweb.Frontend;
4 @using System.IO
5 6 @{
7 8 @functions
{ //}
// Shared image renderer
string RenderImageUrl(string ImageFile = null, int ImageCustomWidth = 0, int ImageCustomHeight = 0, bool CropImage = false, string Crop = "0", bool Fillcanvas = false, string Resolution = "72", string FocalPointParameters = null, string ColorSpace = "rgb", string Compression = "99", string Background = null)
{
// -------------------------------
// -- Set image parameters --
// -------------------------------
// Find image dimensions
var ImagePath = System.Web.HttpContext.Current.Server.MapPath(ImageFile);
var Dimensions = Dynamicweb.Imaging.Image.GetDimensions(ImagePath);
double ImgWidth = Dimensions.X;
double ImgHeight = Dimensions.Y;
string ImgParameters = "";
string ImgFormat = "";
// Check if image should be resized – and calculate correct aspect ratio
if(ImageCustomHeight != 0 || ImageCustomWidth != 0)
{
double calcNewWidth, calcNewHeight;
if(ImageCustomHeight != 0 && ImageCustomWidth == 0)
{
// Custom height is set
ImgHeight = ImageCustomHeight;
if(!CropImage){
// Image should be resized - calculate new width
calcNewWidth = (Convert.ToDouble(Dimensions.X)/Convert.ToDouble(Dimensions.Y))*Convert.ToDouble(ImageCustomHeight);
//if(Dimensions.Y > Dimensions.X){
//}else{
// calcNewWidth = (Convert.ToDouble(Dimensions.Y)/Convert.ToDouble(Dimensions.X))*Convert.ToDouble(ImageCustomHeight);
//}
ImgWidth = int.Parse(Math.Round(calcNewWidth, 0).ToString());
}
}
else if(ImageCustomWidth != 0 && ImageCustomHeight == 0)
{
// Custom width is set
ImgWidth = ImageCustomWidth;
if(!CropImage){
// Image should be resized - calculate new height
// calcNewHeight = (172.0d/523.0d)*150.0d;
calcNewHeight = (Convert.ToDouble(Dimensions.Y)/Convert.ToDouble(Dimensions.X))*Convert.ToDouble(ImageCustomWidth);
//if(Dimensions.Y > Dimensions.X){
//}else{
// calcNewHeight = (Convert.ToDouble(Dimensions.X)/Convert.ToDouble(Dimensions.Y))*Convert.ToDouble(ImageCustomWidth);
//}
ImgHeight = int.Parse(Math.Round(calcNewHeight, 0).ToString());
}
}else{
// Both custom dimensions is set
ImgWidth = ImageCustomWidth;
ImgHeight = ImageCustomHeight;
}
}
ImgParameters = ImgParameters + "&Width=" + ImgWidth.ToString();
ImgParameters = ImgParameters + "&Height=" + ImgHeight.ToString();
// Set image cropping
ImgParameters = ImgParameters + "&Crop="+Crop;
// Fillcanvas
if(Fillcanvas){
ImgParameters = ImgParameters + "&fillcanvas=1";
}
// Set focalpoint
if(!string.IsNullOrEmpty(FocalPointParameters)){
ImgParameters = ImgParameters + "&"+FocalPointParameters;
}
// Set resolution
if(!string.IsNullOrEmpty(Resolution) && Resolution != "72"){
ImgParameters = ImgParameters + "&Resolution="+Resolution;
}
// Set color space
if(!string.IsNullOrEmpty(ColorSpace) && ColorSpace != "rgb"){
ImgParameters = ImgParameters + "&ColorSpace="+ColorSpace;
}
// Set compression
if(!string.IsNullOrEmpty(Compression) && Compression != "90"){
ImgParameters = ImgParameters + "&Compression="+Compression;
}
// Set background color
if(!string.IsNullOrEmpty(Background)){
ImgParameters = ImgParameters + "&Background="+Background.Replace("#","");
// Set image format (image with background should be jpg)
ImgFormat = "&Format=jpg";
}//else{
// Find image extension
// string ImgExtension = Path.GetExtension(ImagePath);
// Set image format (jpg, png ...)
// ImgFormat = "&Format="+ImgExtension.Replace(".","");
//}
// -- Make final url - render image or give original image
// ImageFile = System.Web.HttpContext.Current.Server.UrlEncode(ImageFile);
ImageFile = ImageFile.Replace(" ","%20");
ImageFile = ImageFile.Replace("æ","%C3%A6");
ImageFile = ImageFile.Replace("ø","%C3%B8");
ImageFile = ImageFile.Replace("å","%C3%A5");
ImageFile = ImageFile.Replace("Æ","%C3%86");
ImageFile = ImageFile.Replace("Ø","%C3%98");
ImageFile = ImageFile.Replace("Å","%C3%85");
// Merge all parameters and set final image url
if(!string.IsNullOrEmpty(ImgParameters) && (ImageCustomHeight != 0 || ImageCustomWidth != 0) && (ImageCustomWidth != Dimensions.X && ImageCustomHeight != Dimensions.Y))
{
ImageFile = "/Admin/Public/GetImage.ashx?Image=" + ImageFile + ImgParameters + ImgFormat;
}
return ImageFile;
}
}
9 10 @* GENEREL VARIABLS
11 -------------------*@
12 13 string pageTag = "";
14 15 if(!string.IsNullOrEmpty(GetGlobalValue("Global:Page.NavigationTag"))){
16 pageTag = GetGlobalValue("Global:Page.NavigationTag");
17 }else{
18 if(GetInteger("DwPageID") == GetInteger("DwAreaFirstActivePageID")){
19 pageTag = "front-page";
20 }else{
21 pageTag = "sub-page ";
22 }
23 }
24 25 if(GetBoolean("Item.WithLeftMenu")){
26 pageTag = pageTag + " with-left-menu";
27 }
28 29 var langTag = GetGlobalValue("Global:Area.Lang"); @*da/en/de*@
30 31 var host = GetGlobalValue("Global:Request.Scheme") + "://" + GetGlobalValue("Global:Request.Host");
32 33 var DesignBaseUrl = GetString("Template:DesignBaseUrl");
34 35 36 // Client devices
37 var clientDevice = "";
38 39 if(GetGlobalValue("Global:Device.IsMobile") == "True"){
40 clientDevice = "is-mobile";
41 }else if(GetGlobalValue("Global:Device.IsTablet") == "True"){
42 clientDevice = "is-tablet";
43 }else{
44 clientDevice = "is-desktop";
45 }
46 47 48 // Contact page
49 string contactPage = GetString("Item.Area.ContactPage");
50 string contactPageId = "4";
51 52 if(!string.IsNullOrEmpty(contactPage)){
53 string[] parts = contactPage.Split('=');
54 contactPageId = parts[1];
55 }
56 57 // Person data page
58 string PersondataPage = !string.IsNullOrEmpty(GetString("Item.Area.PersondataPage")) ? GetString("Item.Area.PersondataPage") : "";
59 // Terms and conditions
60 string TermsAndConditions = !string.IsNullOrEmpty(GetString("Item.Area.TermsAndConditions")) ? GetString("Item.Area.TermsAndConditions") : "";
61 // Control reports
62 string ControlReport = !string.IsNullOrEmpty(GetString("Item.Area.ControlReport")) ? GetString("Item.Area.ControlReport") : "";
63 // Search page
64 string SearchPage = !string.IsNullOrEmpty(GetString("Item.Area.SearchPage")) ? GetString("Item.Area.SearchPage") : "";
65 string SearchPageId = "";
66 string[] SearchParts = SearchPage.Split('=');
67 SearchPageId = SearchParts[1];
68 69 string PageContactItemID = "1";
70 if(langTag == "en"){
71 PageContactItemID = "2";
72 }
73 74 Item contactInfo = ItemManager.Storage.GetById("PageContact", PageContactItemID);
75 76 var businessMail = contactInfo["ContactEmail"];
77 var businessPhone = contactInfo["ContactPhone"];
78 var businessPhoneMin = businessPhone.ToString().Replace(" ", "");
79 var businessPhoneExtended = "+45 " + businessPhone;
80 var businessPhoneExtendedMin= businessPhoneExtended.ToString().Replace(" ", "");
81 var cvrNumber = contactInfo["CVRNumber"].ToString();
82 var cvrNumberText = langTag != "dk" ? "DK-" + contactInfo["CVRNumber"]:contactInfo["CVRNumber"];
83 84 var businessName = contactInfo["BusinessName"].ToString().Replace("&", "& ");
85 //var businessAlias = contactInfo["BusinessAlias"].ToString().Replace("&", "& ");
86 var businessRoad = contactInfo["BusinessRoad"];
87 var businessNumber = contactInfo["BusinessNumber"];
88 var businessZip = contactInfo["BusinessZip"];
89 var businessCity = contactInfo["BusinessCity"].ToString();
90 91 var facebookLink = (string) contactInfo["FacebookLink"];
92 var linkedinLink = (string) contactInfo["LinkedInLink"];
93 94 var footerText = (string) contactInfo["FooterText"];
95 96 @* For pagenames on subpages *@
97 @SnippetStart("PageName");
98 @GetString("Item.PageName");
99 @SnippetEnd("PageName");
100101102 @* Check if email is sent *@
103 bool emailSend = false;
104 if(GetGlobalValue("Global:Request.Url").Contains("s=")){
105 emailSend = true;
106 }
107108109 @*------------------------*@
110111112113 @* GET NOTIFICATION-TOP
114 --------------------------*@
115 // Get first page
116 // Dynamicweb.Content.PageService ps = new Dynamicweb.Content.PageService();
117 // var FirstPage = ps.GetFirstPageForArea(1);
118 // int FirstPageID = FirstPage.ID; // 1
119120 @* Item NewsItem = ItemManager.Storage.GetById("PageFrontpage", "88"); *@
121 @* Dynamicweb.Content.Items.Item NewsItem = Dynamicweb.Content.Items.Item.GetItemById("IpsElement",IpsElement.Id); *@
122123 string FirstPageItemID = "88";
124 if(langTag == "en"){
125 FirstPageItemID = "95";
126 }
127 else if(langTag == "nb")
128 {
129 FirstPageItemID = "289";
130 }
131132 Item NewsItem = Item.GetItemById("PageFrontpage",FirstPageItemID);
133134 var today = DateTime.Today;
135 var now = DateTime.Now;
136137 // Reading the value of the "NewsSnip"-fields
138 var newsSnipDate = NewsItem["NewsSnipDate"];
139 var newsSnipDateAllowedTo = DateTime.Parse(newsSnipDate.ToString());
140 bool ShowNotification = bool.Parse(NewsItem["ShowNotification"].ToString());
141142 string preNewsSnipText = NewsItem["PreNewsSnipText"].ToString();
143 preNewsSnipText = !string.IsNullOrEmpty(preNewsSnipText) ? preNewsSnipText : null;
144 string newsSnipText = NewsItem["NewsSnipText"].ToString();
145 string newsSnipLinkText = NewsItem["NewsSnipLinkText"].ToString();
146 newsSnipLinkText = !string.IsNullOrEmpty(newsSnipLinkText) ? newsSnipLinkText : Translate("Read more", "Læs mere");
147 string newsSnipLink = NewsItem["NewsSnipLink"].ToString(); //(!string.IsNullOrEmpty(i["NewsSnipLink"].ToString()) && DateTime.Now < newsSnipDateAllowedTo)?i["NewsSnipLink"].ToString():"Default.aspx?ID=10";
148149150 @*------------------------*@
151152153154 @* GET NOTIFICATION-MODAL
155 --------------------------*@
156 // Reading the value of the "Modal"-fields
157 var ModalDate = NewsItem["ModalDate"];
158 var ModalDateAllowedTo = DateTime.Parse(ModalDate.ToString());
159 bool ShowModal = bool.Parse(NewsItem["ShowModal"].ToString());
160 string ModalText = NewsItem["ModalText"].ToString();
161 string ModalButtonText = NewsItem["ModalButtonText"].ToString();
162 ModalButtonText = !string.IsNullOrEmpty(ModalButtonText) ? ModalButtonText : Translate("CloseBtnText", "Luk");
163164165 string CloseBtnRevealAria = Translate("CloseAria", "Luk overlæg");
166167168 @* GET NEWSLETTER POP-UP
169 --------------------------*@
170 Item NewsLetterPopUp = Item.GetItemById("PageFrontpage",FirstPageItemID);
171 bool ShowNewsletterPopUp = bool.Parse(NewsLetterPopUp["ActivateNewsletterPopUp"].ToString());
172 }
173 <!doctype html>
174 <html class="no-js @pageTag @clientDevice" lang="@langTag">
175176 <head>
177178 <meta charset="utf-8">
179 @*<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">*@
180 <meta name="viewport" content="width=device-width, initial-scale=1.0">
181 <meta name="generator" content="Dynamicweb 9">
182183 @{
184 //<base href="@host">
185186 var pageMetaDescription = GetString("Meta.Description");
187188 if(GetString("Item.SystemName") == "NewsSubPage" && GetGlobalValue("Global:Pageview.Url.Raw").Contains("NewsElement")){
189 @RenderSnippet("MetaTitle")
190 @RenderSnippet("MetaDescription")
191 }else{
192 @*this.Model.Template.SetTag("Title", pageMetaTitle);*@
193 <title>@GetValue("Title")</title>
194 <meta name="description" content="@pageMetaDescription">
195 }
196197 @* Google Variables
198 ----------------- *@
199 var GoogleSiteVerification = GetString("Item.Area.GoogleSiteVerification");
200 var GoogleMapsID = GetString("Item.Area.GoogleMapsID");
201 var GoogleAnalyticsID = GetString("Item.Area.GoogleAnalyticsID");
202203 if(!string.IsNullOrWhiteSpace(GoogleSiteVerification)){
204 <meta name="google-site-verification" content="@GoogleSiteVerification">
205 }
206 }
207208 <script>
209 var lightgallery_array = [];
210 var dfvideo = [];
211 </script>
212213214215216 @* ----------------------------------------- *@
217 @* --------- OPEN GRAPH SOCIAL TAGS -------- *@
218 @* ----------------------------------------- *@
219 @{
220 var currentUrl = host;//"http://"+GetGlobalValue("Global:Request.Host");
221 var ogTitle = (!string.IsNullOrWhiteSpace(GetString("Item.Page.OG_Title")))?GetString("Item.Page.OG_Title"):GetString("Title");
222 var ogUrl = host+GetGlobalValue("Global:Pageview.Url");
223 var ogDesc = (!string.IsNullOrWhiteSpace(GetString("Item.Page.OG_Description")))?GetString("Item.Page.OG_Description"):GetString("Meta.Description");
224 var ogImage = "";
225226 if(!string.IsNullOrWhiteSpace(GetString("Item.Page.OG_Image"))){
227 //ogImage = "/Admin/Public/GetImage.ashx?Image=" + GetString("Item.Page.OG_Image") + "&Format=jpg&Width=1200&Height=630&Crop=0";
228 //DesignBaseUrl+"assets/img/SOME-Images/default.jpg";
229 //ogImage = host+ogImage;
230 ogImage = host+GetString("Item.Page.OG_Image");
231 }
232 }
233234 @if(GetString("Item.SystemName") == "NewsSubPage" && GetGlobalValue("Global:Pageview.Url.Raw").Contains("NewsElement")){
235 @RenderSnippet("OgTitle")
236 }else{
237 <meta property="og:title" content="@ogTitle">
238 }
239 <meta property="og:type" content="website">
240 <meta property="og:url" content="@ogUrl">
241 <meta property="og:site_name" content="@host">
242 @if(GetString("Item.SystemName") == "NewsSubPage" && GetGlobalValue("Global:Pageview.Url.Raw").Contains("NewsElement")){
243 @RenderSnippet("OgDescription")
244 }else{
245 <meta property="og:description" content="@ogDesc">
246 }
247 @if(GetString("Item.SystemName") == "NewsSubPage" && GetGlobalValue("Global:Pageview.Url.Raw").Contains("NewsElement")){
248 @RenderSnippet("OgImage")
249 }else if(!string.IsNullOrWhiteSpace(GetString("Item.Page.OG_Image"))){
250 // Make OG image
251 <meta property="og:image" content="@ogImage">
252 <meta property="og:image:width" content="1200">
253 <meta property="og:image:height" content="630">
254 }
255256 @*------------------------*@
257258259260 @RenderSnippet("ExtraCSS") @* Render extra css for e.x. Paragraph/LightboxGallery.cshtml *@
261262 @{
263 @* FAVICON *@
264 var iconDir = DesignBaseUrl+"assets/img/touchicons/";
265 }
266267 <link rel="apple-touch-icon" sizes="57x57" href="@(iconDir)apple-icon-57x57.png">
268 <link rel="apple-touch-icon" sizes="60x60" href="@(iconDir)apple-icon-60x60.png">
269 <link rel="apple-touch-icon" sizes="72x72" href="@(iconDir)apple-icon-72x72.png">
270 <link rel="apple-touch-icon" sizes="76x76" href="@(iconDir)apple-icon-76x76.png">
271 <link rel="apple-touch-icon" sizes="114x114" href="@(iconDir)apple-icon-114x114.png">
272 <link rel="apple-touch-icon" sizes="120x120" href="@(iconDir)apple-icon-120x120.png">
273 <link rel="apple-touch-icon" sizes="144x144" href="@(iconDir)apple-icon-144x144.png">
274 <link rel="apple-touch-icon" sizes="152x152" href="@(iconDir)apple-icon-152x152.png">
275 <link rel="apple-touch-icon" sizes="180x180" href="@(iconDir)apple-icon-180x180.png">
276 <link rel="icon" type="image/png" sizes="192x192" href="@(iconDir)android-icon-192x192.png">
277 <link rel="icon" type="image/png" sizes="32x32" href="@(iconDir)favicon-32x32.png">
278 <link rel="icon" type="image/png" sizes="96x96" href="@(iconDir)favicon-96x96.png">
279 <link rel="icon" type="image/png" sizes="16x16" href="@(iconDir)favicon-16x16.png">
280 <link rel="manifest" href="@(iconDir)manifest.json">
281 <meta name="msapplication-TileColor" content="#ffffff">
282 <meta name="msapplication-TileImage" content="@(iconDir)ms-icon-144x144.png">
283 <meta name="theme-color" content="#ffffff">
284285286 @* ------------------------------------- *@
287 @* --------- Google Tag Manager -------- *@
288 @* ------------------------------------- *@
289290 <!-- Google Tag Manager -->
291 <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
292 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
293 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
294 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
295 })(window,document,'script','dataLayer','GTM-5K6VH57');</script>
296297 <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
298 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
299 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
300 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
301 })(window,document,'script','dataLayer','GTM-5MC7PZJ2');</script>
302 <!-- End Google Tag Manager -->
303304305 <!-- Facebook Pixel Code -->
306 <script>
307 !function(f,b,e,v,n,t,s)
308 {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
309 n.callMethod.apply(n,arguments):n.queue.push(arguments)};
310 if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
311 n.queue=[];t=b.createElement(e);t.async=!0;
312 t.src=v;s=b.getElementsByTagName(e)[0];
313 s.parentNode.insertBefore(t,s)}(window,document,'script',
314 'https://connect.facebook.net/en_US/fbevents.js');
315 fbq('init', '336941160876565');
316 fbq('track', 'PageView');
317 </script>
318 <!-- End Facebook Pixel Code -->
319320321322 @* -------------------------------------- *@
323 @* --------- Alternate hreflinks -------- *@
324 @* -------------------------------------- *@
325326 @if (GetLoop("Languages").Count > 1)
327 {
328 foreach (var HreflangElement in GetLoop("Languages"))
329 {
330 // Check if Page is published
331 if(!string.IsNullOrEmpty(HreflangElement.GetString("PageIsHidden")))
332 {
333 string PageID = HreflangElement.GetString("PageID");
334 string Culture = HreflangElement.GetString("Culture");
335336 // Check if page is current
337 if(HreflangElement.GetBoolean("IsCurrent"))
338 {
339 PageID = GetString("DwPageID");
340 }
341342 string HreflangPageUrl = "Default.aspx?ID=" + PageID;
343344 string SearchEngineFriendlyURL = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(HreflangPageUrl);
345346 string PrimaryDomain = HreflangElement.GetString("PrimaryDomain");
347348 var altLangUrl = GetGlobalValue("Global:Request.Scheme") + "://" + PrimaryDomain + SearchEngineFriendlyURL;
349350 <link rel="alternate" href="@(altLangUrl)" hreflang="@Culture">
351 }
352 }
353 }
354355 <!--<script src="https://www.google.com/recaptcha/api.js?render=6LcZ7KcaAAAAAPpjmstwWVyXOHKhSnocNWsuu1Kf" defer></script>-->
356357 <!-- STYLES -->
358 @* <link rel="stylesheet" href="https://use.typekit.net/jxe5vor.css"> *@
359 <!--<link rel="preconnect" as="style" href="https://use.typekit.net/jxe5vor.css">-->
360 <link rel="stylesheet" href="/Files/Templates/Designs/SealingSystem20/assets/css/app_v8.css">
361362 <meta name="google-site-verification" content="Bbp6t5prEhrxA4aMC3bqUbmpvZHfunJRi9fXmrYx7pM">
363 </head>
364365 <body id="top">
366367 <!-- Facebook (No Script) Pixel Code -->
368 <noscript>
369 <img height="1" width="1" src="https://www.facebook.com/tr?id=336941160876565&ev=PageView&noscript=1" alt="">
370 </noscript>
371 <!-- /Facebook (No Script) Pixel Code -->
372373 @if(host.Contains("dynamicweb") && GetGlobalValue("Global:Device.IsMobile") != "True"){// && GetGlobalValue("Global:Device.IsMobile") == "False"){
374 <div class="screen-size"></div>
375 }
376377378 <!-- Google Tag Manager (noscript) -->
379 <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5K6VH57" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
380381 <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5MC7PZJ2" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
382 <!-- End Google Tag Manager (noscript) -->
383384 @{
385386 if(ShowNotification && (DateTime.Now < newsSnipDateAllowedTo))
387 {
388 // Notification in top
389 string newsSnipLinkElement = !string.IsNullOrEmpty(newsSnipLink) ? "<span class='notification-spacer'> | </span><strong><a href='/" + newsSnipLink + "'>" + newsSnipLinkText + "</a></strong>" : String.Empty;
390391 <div id="top-notification" class="transparent-background">
392 <div>
393 <span class="bell"></span>
394395 <p>
396 <span class="subheader">@preNewsSnipText</span>
397 <span class="notification-text"><span class="notification-spacer"> | </span>@newsSnipText@newsSnipLinkElement</span>
398 </p>
399400 <span class="close">×</span>
401 </div>
402 </div>
403404 }
405406 // Modal
407 if(ShowModal && (DateTime.Now < ModalDateAllowedTo) && !string.IsNullOrEmpty(ModalText))
408 {
409 <div class="reveal" id="reveal-messsage" data-reveal="" data-close-on-click="false" data-animation-in="fade-in fast" data-animation-in="fade-out fast">
410411 @ModalText
412413 <div class="button-container text-center">
414 <button class="button hollow" data-close="" aria-label="Luk knap" type="button">@ModalButtonText</button>
415 </div>
416 </div>
417 }
418 }
419420 <div id="off-canvas-full-screen" class="off-canvas-full-screen" data-off-canvas="" data-transition="overlap" data-content-scroll="false">
421422 <div class="close-button">
423 <button class="hamburger hamburger--squeeze" id="open-off-canvas-menu" type="button" data-toggle="off-canvas-full-screen" aria-label="Åben menu" aria-haspopup="true" aria-controls="main-nav">
424 <span class="hamburger-box">
425 <span class="hamburger-inner"></span>
426 </span>
427 </button>
428 </div>
429430 <div class="off-canvas-full-screen-menu" aria-labelledby="open-off-canvas-menu">
431432 <nav id="main-nav">
433 @RenderNavigation(
434 new{
435 StartLevel = 1,
436 Expandmode = "all",
437 Template = "drilldown-menu-ssy.xslt"
438 }
439 )
440 <button data-toggle="language-overlay" id="language-changer-menu">@Translate("ChangeLanguageMenu", "Language")</button>
441 </nav>
442443 <div class="menu-contact-info">
444 @if(!string.IsNullOrEmpty(linkedinLink) || !string.IsNullOrEmpty(facebookLink)){
445 <div class="some-icons-container">
446 @if(!string.IsNullOrEmpty(linkedinLink)){
447 <a href="@linkedinLink" class="icon-linkedin__white" aria-label="Besøg os på linkedIn"></a>
448 }
449 @if(!string.IsNullOrEmpty(facebookLink)){
450 <a href="@facebookLink" class="icon-facebook__white" aria-label="Besøg os på Facebook"></a>
451 }
452 </div>
453 }
454 <div class="menu-contact-details">
455 @{
456 string businessCityInMenu = langTag != "da" ? businessCity + " <span class='bullet'></span> " + @Translate("Danmark") : businessCity;
457 }
458 <strong>@businessName</strong> <span class="bullet"></span> @businessRoad @businessNumber <span class="bullet"></span> @businessZip @businessCityInMenu <span class='bullet'></span>
459 <a href="tel:@businessPhoneExtendedMin">@Translate("Danmark") @businessPhoneExtended</a> <span class="bullet"></span> <a href="mailto:@businessMail">@businessMail</a>
460 </div>
461 </div>
462463 </div>
464465 <div class="sidebar">
466 <div class="top">
467 <button class="hamburger hamburger--squeeze" type="button" id="close-off-canvas-menu" data-toggle="off-canvas-full-screen" aria-label="Luk menu">
468 <span class="hamburger-box">
469 <span class="hamburger-inner"></span>
470 </span>
471 </button>
472473 @if(!string.IsNullOrEmpty(SearchPage))
474 {
475 <button class="search-button" data-toggle="reveal-search"> <!-- href="@SearchPage" -->
476 <span class="show-for-sr">Søg på side: </span>
477 <img src="/Files/Templates/Designs/SealingSystem20/assets/img/magglass__white.svg" alt="Søg">
478 </button>
479480 @* Modal*@
481 <div class="reveal" id="reveal-search" data-reveal="" data-animation-in="fade-in fast" data-animation-out="fade-out fast">
482 @{
483 string SearchFor = Translate("SearchFor");
484 string SearchBtnText = Translate("SearchBtnText");
485486 }
487 <button class="close-button" data-close="" aria-label="@CloseBtnRevealAria" type="button">
488 <span aria-hidden="true">×</span>
489 </button>
490 <form action="/Default.aspx" method="get" name="SearchForm1">
491 <input type="text" name="q" placeholder="@SearchFor">
492 <input type="hidden" name="ID" value="@SearchPageId">
493 <input type="submit" class="button hollow" value="@SearchBtnText">
494 </form>
495 </div>
496497 }
498499 </div>
500501 <div class="bottom">
502 @{
503 string FirstPageID = GetString("DwAreaFirstActivePageID");
504 //Default.aspx?ID=@FirstPageID
505 }
506 <a href="/" class="logo-link show-for-medium"><img src="/Files/Templates/Designs/SealingSystem20/assets/img/logos/logo-sealing-system-ips-high__white.svg" alt="Sealing System logo"></a>
507 </div>
508 </div>
509510 </div> <!-- /#off-canvas-full-screen -->
511512513 <script>
514 var lightgallery_array = [];
515 </script>
516517 <header id="page-header">
518 <button class="hamburger hamburger--squeeze" type="button" data-toggle="off-canvas-full-screen">
519 <span class="hamburger-box">
520 <span class="hamburger-inner"></span>
521 </span>
522 </button>
523 @RenderNavigation(
524 new{
525 StartLevel = 1,
526 Endlevel = 1,
527 Expandmode = "all",
528 Template = "top-menu-ssy.xslt"
529 }
530 )
531532533 <a href="@contactPage" class="button hollow secondary" id="header-button">
534 @Translate("ContactBtnText", "Kontakt")
535 </a>
536537 @{
538 string ChangeLanguage = Translate("ChangeLanguage", "Skift sprog");
539 }
540 <a id="language-changer" title="@ChangeLanguage" data-toggle="toggle-languages"></a>
541 <div class="dropdown-pane" data-position="bottom" data-alignment="center" id="toggle-languages" data-dropdown="" data-auto-focus="true" data-v-offset="-31">
542543 @{
544 string gbLangLink = "https://sealing-system.com";//"/en";
545 string daLangLink = "https://sealing-system.dk";
546 string noLangLink = "https://sealing-system.no";
547 string langLinkPageId = "";
548 string langLinkFirstActivePageId = "";
549 string daLangLinkClass = langTag == "da" ? "active ":null;
550 string enLangLinkClass = langTag == "en" ? "active ":null;
551 string noLangLinkClass = langTag == "nb" ? "active ":null;
552553 foreach (var Language in GetLoop("Languages"))
554 {
555556 langLinkFirstActivePageId = Language.GetString("FirstActivePageID");
557 langLinkPageId = Language.GetString("PageID");
558559 if(!string.IsNullOrEmpty(Language.GetString("PageIsHidden")))
560 {
561562 string LangPageUrl = "Default.aspx?ID=" + langLinkPageId;
563564 string SearchEngineFriendlyURL = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(LangPageUrl);
565566 string PrimaryDomain = Language.GetString("PrimaryDomain");
567568 var altLangUrl = GetGlobalValue("Global:Request.Scheme") + "://" + PrimaryDomain + SearchEngineFriendlyURL;
569570 // check if the two id's are the same. Keep the variable above, if they are.
571 if(langLinkPageId != langLinkFirstActivePageId)
572 {
573574 if(Language.GetString("Culture") == "en-GB")
575 {
576 gbLangLink = altLangUrl;
577 }
578 else if(Language.GetString("Culture") == "da-DK")
579 {
580 daLangLink = altLangUrl;
581 }
582 else if(Language.GetString("Culture") == "nb-NO")
583 {
584 //noLangLink = noLangLink + "/Default.aspx?ID=" + langLinkPageId;
585 noLangLink = altLangUrl;
586 }
587588 }
589 }
590 }
591 }
592593594 <a href="@daLangLink" title="Skift til dansk" class="@daLangLinkClass">DA</a>
595 <a href="@gbLangLink" title="Switch to English" class="@enLangLinkClass">EN</a>
596 <a href="@noLangLink" title="Endre språk til norsk" class="@noLangLinkClass">NO</a>
597 </div>
598 </header>
599600601602 <!-- Page Content -->
603 <div class="main-content"> <!-- data-off-canvas-content -->
604605 <div class="sidebar headroom headroom--top headroom--pinned">
606 @if(langTag == "da")
607 {
608 <a href="Default.aspx?ID=1061" id="anniversary-logo"></a>
609 }
610 else if(langTag == "en")
611 {
612 <a href="Default.aspx?ID=1062" id="anniversary-logo"></a>
613 }
614 else if(langTag == "nb")
615 {
616 <a href="Default.aspx?ID=1060" id="anniversary-logo"></a>
617 }
618 else
619 {
620 <div id="anniversary-logo"></div>
621 }
622 <div class="top">
623 <button class="hamburger hamburger--squeeze" type="button" data-toggle="off-canvas-full-screen">
624 <span class="hamburger-box">
625 <span class="hamburger-inner"></span>
626 </span>
627 </button>
628629 <div class="logo-container hide-for-medium">
630 <a href="/"><img src="/Files/Templates/Designs/SealingSystem20/assets/img/logos/logo-sealing-system-ips-wide__white.svg" alt="Sealing System - Intelligent Packageing Solutions"></a>
631 </div>
632633 @if(!string.IsNullOrEmpty(SearchPage))
634 {
635 string SearchOnPage = Translate("SearchOnPage", "Søg på denne side");
636 string SearchAltText = Translate("Search", "Søg");
637638 <button class="search-button" data-toggle="reveal-search"> <!-- href="@SearchPage" -->
639 <span class="show-for-sr">@SearchOnPage </span>
640 <img src="/Files/Templates/Designs/SealingSystem20/assets/img/magglass__white.svg" alt="@SearchAltText">
641 </button>
642 }
643644 <div id="page-navigation">
645 <h6>@Translate("PageContent", "Sideindhold")</h6>
646 <h5>@GetGlobalValue("Global:Page.Name")</h5>
647 <ul class="magellan">
648 </ul>
649 </div>
650 </div>
651652 <div class="bottom">
653 <a href="/" class="logo-link show-for-medium"><img src="/Files/Templates/Designs/SealingSystem20/assets/img/logos/logo-sealing-system-ips-high__white.svg" alt="Sealing System logo"></a>
654 </div>
655 </div>
656657658659 <div class="loader-wrapper">
660 <div class="loader-ellipsis"><div></div><div></div><div></div><div></div></div>
661 </div>
662663664 <div id="scroll-down">
665 <svg xmlns="http://www.w3.org/2000/svg" width="26.5" height="353" viewbox="0 0 26.5 353"> <!-- height="153" viewBox="0 0 26.5 153"-->
666 <g id="scroll-for-more" transform="translate(-329.25 -421.75)"> <!-- translate(-329.25 -621.75) -->
667 <text id="sfm_text" transform="translate(346.5 738.75) rotate(-90)"><tspan x="0" y="0">@Translate("ScrollToSeeMore", "Scroll for at se mere")</tspan></text>
668 <g id="sfm_icon" transform="translate(-85 1479) rotate(-90)">
669 <g id="sfm_arrow" transform="translate(723.365 431.019) rotate(180)">
670 <path id="sfm_chevron" d="M14,9l3.519,3.519L14,16.037" transform="translate(-5.79 -9)"></path>
671 <line id="sfm_line" x1="11.729" transform="translate(0 3.519)"></line>
672 </g>
673 <circle id="sfm_circle" cx="12.5" cy="12.5" r="12.5" transform="translate(705 415)"></circle>
674 </g>
675 </g>
676 </svg>
677 </div>
678679680681 @if(emailSend){
682 <div id="top-notification">
683 <div class="row">
684 <div class="small-8 small-centered medium-4 large-8 columns text-center">
685 <h3>@Translate("FormSendtMsgThankYou", "Thank you for your inquiry")</h3>
686 <p><strong>@Translate("FormSendtMsgWeWillContactYou", "We will contact you as soon as possible")</strong></p>
687 <button class="button large white hollow" id="top-close">@Translate("FormSendtMsgBtnOk", "OK")</button>
688 </div>
689 </div>
690 </div>
691 }
692693694695 @using Dynamicweb.Security.UserManagement
696 @using Dynamicweb.News.Common
697698699 @if(GetBoolean("Item.InsertPageIcon")){
700 string IconCatSrc = GetString("Item.PageCatIcon");
701 string IconCatSrcName = GetString("Item.PageCatIcon");
702703 if(!string.IsNullOrEmpty(IconCatSrc)){
704 IconCatSrc = GetString("Template:DesignBaseUrl") + "assets/img/categories/" + IconCatSrc + ".svg";
705706 <div class="page-icon">
707 <object type="image/svg+xml" data="@IconCatSrc">
708 <!-- image fallback -->
709 <img src="@IconCatSrc" alt="Page icon @IconCatSrcName">
710 </object>
711 </div>
712 }
713 }
714715 <main id="main" class="default-page">
716717 <section class="transparent-background breadcrumb-container">
718 <div class="grid-container">
719 <div id="breadcrumb-line">
720 @{
721 string BreadcrumbsAriaLabel = Translate("YouAreHere", "Du er her:");
722 }
723 <nav aria-label="@BreadcrumbsAriaLabel">
724 @GetValue("DwNavigation(breadcrumb)")</nav>
725 </div>
726 </div>
727 </section>
728729730731732 @* @{
733 var Contacts = GetLoop("Item.PageContacts");
734 int TotalContacts = Contacts.Count;
735736 if(TotalContacts > 0)
737 {
738 int LoopCounter = 1;
739740 //Choose a random contact if there's more than one image
741 if(TotalContacts > 1)
742 {
743 TotalContacts = TotalContacts+1;
744745 Random rnd = new Random();
746 LoopCounter = rnd.Next(1, TotalContacts);
747 }
748749 foreach (var Contact in Contacts)
750 {
751 //<p>
752 if(Contact.GetInteger("Item.PageContacts.LoopCounter") == LoopCounter){
753 //<strong>Udvalgt Kontakt: </strong>
754 // System.Web.HttpContext.Current.Items["PageContactID"] = Contact.GetString("UserManagement:User.ID");
755 //System.Web.HttpContext.Current.Items["PageContactID"] = Contact.GetString("UserManagement:User.ID");
756 }else{
757 //<strong>Kontakt: </strong>
758 }
759 //@Contact.GetString("UserManagement:User.FirstName")
760 //@Contact.GetString("UserManagement:User.Email")
761 //@Contact.GetString("UserManagement:User.ID")
762 //@Contact.GetString("UserManagement:User.Image.Clean")
763764765 //</p>
766 }
767 }
768 } *@
769770 @GetValue("DwContent(content)")
771772 @{
773 //-- Display contactbubble, if pagecontacts have been added
774 // System.Web.HttpContext.Current.Items["PageContactID"] is added in paragraph/ContentElementContainer_ssy.cshtml
775 int PageContactId = Convert.ToInt32(System.Web.HttpContext.Current.Items["PageContactID"]);
776777 // there's no pagecontact if set to 0
778 if(PageContactId != 0){
779 User user = Dynamicweb.Security.UserManagement.User.GetUserByID(PageContactId);
780 string ContactName = user.Name.ToString();
781 string ContactFirstName = user.FirstName.ToString();
782 string ContactImage = user.Image.ToString();
783 string ContactEmail = user.Email.ToString();
784 string ContactBusinessPhone = user.PhoneBusiness.ToString();
785 string ContactBusinessPhoneMin = ContactBusinessPhone.Replace(" ", "");
786 string AreaName = GetString("DwAreaName");
787 string PageName = GetString("DwPageName");
788789790 if(!string.IsNullOrEmpty(ContactImage)){
791792 <div id="contact-bubble" title="Kontakt @ContactFirstName">
793 <span class="close">×</span>
794 <div data-open="contact-modal" style="background-image:url('/Admin/Public/GetImage.ashx?Image=@(ContactImage)&Format=jpg&Width=90&Height=90&Compression=99&Crop=2')">
795 <div class="speech-bubble">@Translate("bookMeetingBubble", "Skal vi booke <br> et møde?")</div>
796 </div>
797 </div>
798799 <div class="reveal" id="contact-modal" data-reveal="" data-animation-in="fade-in fast" data-animation-in="fade-out fast">
800 <h1 class="h4">
801 <span class="contact-image" style="background-image:url('/Admin/Public/GetImage.ashx?Image=@(ContactImage)&Format=jpg&Width=90&Height=90&Compression=99&Crop=2')"></span>
802 <span><span class="subheader secondary-color">@Translate("Contact")</span> @ContactName</span>
803 </h1>
804 <p class="lead">
805 <a href="tel:@(ContactBusinessPhoneMin)" class="button phone">@Translate("CallOn", "Ring på") @ContactBusinessPhone</a>
806 <a href="mailto:@ContactEmail" class="button mail">@Translate("SendAMail", "Send mig en mail")</a>
807 </p>
808809 <form id="contact-form" data-abide="" novalidate="">
810 <p class="lead"> @Translate("OrFillOutTheFormBelow", "– eller udfyld nedenstående, så vender jeg tilbage hurtigst muligt")</p>
811 <label for="name">@Translate("YourName")</label>
812 <input type="text" name="name" value="" id="nameInput" required="">
813 <label for="email">@Translate("YourEmail")</label>
814 <input type="email" name="email" value="" id="emailInput" required="">
815 <label for="organization">@Translate("Organization")</label>
816 <input type="text" name="organization" value="" id="organizationInput" required="">
817 <input type="hidden" name="contactperson" value="@ContactName" id="contactpersonInput">
818 <input type="hidden" name="pagename" value="@PageName" id="pagenameInput">
819 <input type="hidden" name="personid" value="@PageContactId" id="personidInput">
820 <input type="hidden" name="area" value="@AreaName" id="areaInput">
821 <label for="message">@Translate("YourMessage")</label>
822 <textarea name="message" rows="8" cols="80" id="messageInput" required=""></textarea>
823 <div data-abide-error="" class="alert">
824 @Translate("FillAllInput", "Udfyld venligst alle felter.")
825 </div>
826 <input type="submit" class="button hollow" name="" id="sendMail" value="Send">
827 </form>
828829 <div id="ajax-response" role="alert"></div>
830831 <button class="close-button" data-close="" aria-label="Close" type="button">
832 <span aria-hidden="true">×</span>
833 </button>
834 </div>
835 }
836837 //Dynamicweb.News.Common.Email.SendMail("Morten", "morten@designfordi.dk", "Tester email", "Tester", "info@sealing-system.dk", "Test body", "utf-8");
838 }
839 }
840 </main>
841842843844845 <footer class="primary-background gradient" id="footer">
846 <div class="grid-container">
847 <div class="grid-x grid-margin-x">
848 <div class="cell small-12 large-7">
849850 <div class="footer-grid">
851852 <div class="footer-item">
853 <h2>@Translate("ContactHeader", "Kontakt")</h2>
854 <p>
855 <strong>@businessName</strong>
856 <br>@businessRoad @businessNumber
857 <br>@businessZip @businessCity
858 @if(langTag != "da"){ <text><br>@Translate("Danmark")<br></text>;}
859 <br><a href="tel:@businessPhoneExtendedMin">@Translate("TelShort", "Tlf.") @businessPhoneExtended</a>
860 <br><a href="mailto:@businessMail">@businessMail</a>
861 </p>
862 @if(!string.IsNullOrEmpty(linkedinLink) || !string.IsNullOrEmpty(facebookLink)){
863 <div class="some-icons-container">
864 @if(!string.IsNullOrEmpty(linkedinLink)){
865 <a href="@linkedinLink" class="icon-linkedin__white" aria-label="Besøg os på linkedIn"></a>
866 }
867 @if(!string.IsNullOrEmpty(facebookLink)){
868 <a href="@facebookLink" class="icon-facebook__white" aria-label="Besøg os på Facebook"></a>
869 }
870 </div>
871 }
872 </div>
873874 @*
875 <div class="footer-item">
876 <h2>Information</h2>
877 <h6>Åbningstider</h6>
878879 <table class="no-style">
880 <tr>
881 <td>mandag</td>
882 <td>07–16.00</td>
883 </tr>
884 <tr>
885 <td>tirsdag</td>
886 <td>07–16.00</td>
887 </tr>
888 <tr>
889 <td>onsdag</td>
890 <td>07–16.00</td>
891 </tr>
892 <tr>
893 <td>torsdag</td>
894 <td>07–16.00</td>
895 </tr>
896 <tr>
897 <td>fredag</td>
898 <td>07–13.30</td>
899 </tr>
900 </table>
901 </div>
902 *@
903904 <div class="footer-item"> <!-- cell small-12 medium-3 -->
905 <h2>Information</h2>
906 <p>
907 @{
908 if(!string.IsNullOrEmpty(PersondataPage)){
909 <a href="@PersondataPage">@Translate("ReadOurPrivacyPolicy", "Læs vores privatlivspolitik")</a>
910 <br>
911 }
912 if(!string.IsNullOrEmpty(TermsAndConditions)){
913 <a href="@TermsAndConditions">@Translate("TermsAndConditions", "Salgs- og leveringsbetingelser")</a>
914 <br>
915 }
916 if(!string.IsNullOrEmpty(ControlReport)){
917 <a href="@ControlReport" target="_blank" rel="noopener">@Translate("ControlReports", "Kontrolrapporter")</a>
918 }
919 }
920 </p>
921 <div class="we-made-this"><a href="https://www.designfordi.dk">@Translate("designed-by-us", "Design og udvikling af Design Fordi")</a></div>
922 </div>
923 </div>
924 </div>
925 <div class="cell small-12 large-5 special">
926927 <div class="footer-grid">
928 @{
929 string YourNameText = @Translate("YourName", "Dit navn");
930 string YourEmail = @Translate("YourEmail", "Din e-mail");
931 string SubscribeText = @Translate("Subscribe", "Tilmeld");
932 }
933 <h2>@Translate("Newsletter", "Nyhedsbrev")</h2>
934 <form method="POST" action="https://sealing-system.activehosted.com/proc.php" id="_form_1_" class="_form _form_1 _inline-form _inline-style " novalidate="">
935 <input type="hidden" name="u" value="1">
936 <input type="hidden" name="f" value="1">
937 <input type="hidden" name="s">
938 <input type="hidden" name="c" value="0">
939 <input type="hidden" name="m" value="0">
940 <input type="hidden" name="act" value="sub">
941 <input type="hidden" name="v" value="2">
942 <div>
943 <!-- <label>Fornavn</label> -->
944 <input name="fullname" type="text" placeholder="@YourNameText">
945 </div>
946 <div>
947 <!-- <label>Email</label> -->
948 <input name="email" type="text" placeholder="@YourEmail">
949 </div>
950 <div>
951 <input id="_form_1_submit" class="button hollow secondary" type="submit" value="@SubscribeText">
952 </div>
953 </form>
954955 @*
956 <form>
957 <div class="grid-x grid-padding-x">
958 <div class="large-12 cell">
959 <label>Input Label</label>
960 <input type="text" placeholder="large-12.cell">
961 </div>
962 </div>
963 <div class="grid-x grid-padding-x">
964 <div class="large-4 medium-4 cell">
965 <label>Input Label</label>
966 <input type="text" placeholder="large-4.cell">
967 </div>
968 <div class="large-4 medium-4 cell">
969 <label>Input Label</label>
970 <input type="text" placeholder="large-4.cell">
971 </div>
972 <div class="large-4 medium-4 cell">
973 <div class="grid-x">
974 <label>Input Label</label>
975 <div class="input-group">
976 <input type="text" placeholder="small-9.cell" class="input-group-field">
977 <span class="input-group-label">.com</span>
978 </div>
979 </div>
980 </div>
981 </div>
982 <div class="grid-x grid-padding-x">
983 <div class="large-12 cell">
984 <label>Select Box</label>
985 <select>
986 <option value="husker">Husker</option>
987 <option value="starbuck">Starbuck</option>
988 <option value="hotdog">Hot Dog</option>
989 <option value="apollo">Apollo</option>
990 </select>
991 </div>
992 </div>
993 <div class="grid-x grid-padding-x">
994 <div class="large-6 medium-6 cell">
995 <label>Choose Your Favorite</label>
996 <input type="radio" name="pokemon" value="Red" id="pokemonRed"><label for="pokemonRed">Radio 1</label>
997 <input type="radio" name="pokemon" value="Blue" id="pokemonBlue"><label for="pokemonBlue">Radio 2</label>
998 </div>
999 <div class="large-6 medium-6 cell">
1000 <label>Check these out</label>
1001 <input id="checkbox1" type="checkbox"><label for="checkbox1">Checkbox 1</label>
1002 <input id="checkbox2" type="checkbox"><label for="checkbox2">Checkbox 2</label>
1003 </div>
1004 </div>
1005 <div class="grid-x grid-padding-x">
1006 <div class="large-12 cell">
1007 <label>Textarea Label</label>
1008 <textarea placeholder="small-12.cell"></textarea>
1009 </div>
1010 </div>
1011 </form>
1012 *@
1013 </div>
101410151016 </div>
1017 </div>
1018 </div>
1019 </footer>
10201021 @* Newsletter signup *@
1022 @if(ShowNewsletterPopUp){
10231024 string InputPlaceholderFullName = Translate("Input_PlaceholderFullName", "Dit navn");
1025 string InputPlaceholderFirstName = Translate("Input_PlaceholderFirstName", "Dit fornavn");
1026 string InputPlaceholderLastName = Translate("Input_PlaceholderLastName", "Dit efternavn");
1027 string InputPlaceholderEmail = Translate("Input_PlaceholderEmail", "Din e-mail");
10281029 <div class="newsletter-pop-up">
1030 <form data-abide="" novalidate="" id="newsletter-form">
1031 <h2>@Translate("Newsletter", "Nyhedsbrev")</h2>
1032 <p>@Translate("NewsletterIntroText")</p>
1033 <div>
1034 <div>
1035 <input id="fullNameInput" type="text" placeholder="@InputPlaceholderFullName" required="">
1036 <span class="form-error" data-form-error-on="required">
1037 @Translate("InputError_FillInFullName")
1038 </span>
1039 </div>
1040 <div>
1041 <input id="newsletterEmailInput" type="text" required="" pattern="email" placeholder="@InputPlaceholderEmail">
1042 <span class="form-error" data-form-error-on="required">
1043 @Translate("InputError_FillInEmail")
1044 </span>
1045 <span class="form-error" data-form-error-on="pattern">
1046 @Translate("InputError_InvalidEmail")
1047 </span>
1048 </div>
1049 <div>
1050 @{
1051 var newsletterAreaInputValue = GetString("DwAreaName");
1052 }
1053 <input type="hidden" value="@newsletterAreaInputValue" id="newsletterAreaInput"> <!--GetString("DwAreaName")-->
1054 <button class="button secondary">@Translate("SubscribeToNewsletter", "Tilmeld mig nyhedsbrevet")</button>
1055 </div>
1056 </div>
1057 </form>
1058 <div id="subscribe-response"></div>
1059 <button class="close-button" aria-label="Close alert" type="button">
1060 <span aria-hidden="true">×</span>
1061 </button>
1062 </div>
106310641065 <script>
1066 // Function that loads recaptcha on form input focus
1067 function reCaptchaOnFocus() {
1068 var head = document.getElementsByTagName('head')[0]
1069 var script = document.createElement('script')
1070 script.type = 'text/javascript';
1071 script.src = 'https://www.google.com/recaptcha/api.js?render=6LcZ7KcaAAAAAPpjmstwWVyXOHKhSnocNWsuu1Kf'
1072 head.appendChild(script);
10731074 // remove focus to avoid js error:
1075 document.getElementById('fullNameInput').removeEventListener('focus', reCaptchaOnFocus)
1076 document.getElementById('newsletterEmailInput').removeEventListener('focus', reCaptchaOnFocus)
1077 };
1078 // add initial event listener to the form inputs
1079 document.getElementById('fullNameInput').addEventListener('focus', reCaptchaOnFocus, false);
1080 document.getElementById('newsletterEmailInput').addEventListener('focus', reCaptchaOnFocus, false);
1081 </script>
1082 }
10831084 @* Reveal on small devices *@
1085 <div class="reveal" id="language-overlay" data-reveal="" data-overlay="false">
1086 <button class="close-button" data-close="" aria-label="@CloseBtnRevealAria" type="button">
1087 <span aria-hidden="true">×</span>
1088 </button>
1089 <a href="@daLangLink" title="Skift til dansk" class="@daLangLinkClass">Dansk</a>
1090 <a href="@gbLangLink" title="Switch to English" class="@enLangLinkClass">English</a>
1091 <a href="@noLangLink" title="Endre språk til norsk" class="@noLangLinkClass">Norsk</a>
1092 </div>
10931094 <script>
1095 @{
1096 var browserBrand = (GetGlobalValue("Global:Request.UserAgent").Contains("MSIE"))?"IE":"Other";
10971098 var isOlderIE = (GetGlobalValue("Global:Request.UserAgent").Contains("MSIE 6") || GetGlobalValue("Global:Request.UserAgent").Contains("MSIE 7"))?"OldShit":"";
1099 }
11001101 var browserBrand = '@browserBrand';
1102 var isOlderIE = '@isOlderIE';
1103 var clientDevice = '@clientDevice';
1104 var isIOS = '@GetGlobalValue("Global:Device.IsIOS")';
1105 var pageIdentifier = '@pageTag';
1106 var pageLanguage = '@GetGlobalValue("Global:Area.Lang")';
1107 var emailSend = '@emailSend';
1108 </script>
11091110 <script src="/Files/Templates/Designs/SealingSystem20/assets/js/modernizr-custom.js"></script>
111111121113 @RenderSnippet("ExtraJS") @* Render extra js *@
11141115 <script src="/Files/Templates/Designs/SealingSystem20/assets/js/app_optim.js"></script>
11161117 @RenderSnippet("ExtraJSAfter") @* Render extra js after app.js*@
11181119 @if(!string.IsNullOrEmpty(GetString("Item.Area.ExtraScripts"))){
1120 @GetString("Item.Area.ExtraScripts")
1121 }
11221123 <script>
1124 WebFontConfig = {
1125 typekit: { id: 'jxe5vor' }
1126 };
11271128 (function(d) {
1129 var wf = d.createElement('script'), s = d.scripts[0];
1130 wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js';
1131 wf.async = true;
1132 s.parentNode.insertBefore(wf, s);
1133 })(document);
1134 </script>
1135 @* @if(GetString("DwPageID") == contactPageId)
1136 {
1137 // Show Schema markup if page is contact page
1138 @RenderSnippet("SchemaMarkup")
1139 } *@
11401141 @* -------------------------------------- *@
1142 @* --------- Alternate hreflinks -------- *@
1143 @* -------------------------------------- *@
11441145 @if(GetString("DwPageID") == "84" || GetString("DwPageID") == "662")
1146 {
1147 <link rel="stylesheet" href="/Files/Templates/Designs/SealingSystem20/assets/css/reqruiting.css">
11481149 <script>
1150 (function (d, t, i)
1151 {
1152 var j, s = d.getElementsByTagName(t)[0];
1153 if (d.getElementById(i)) return;
1154 j = d.createElement(t); j.id = i;
1155 j.src = 'https://api.reqruiting.com/scripts/api/da-dk/api_v7.min.js';
1156 s.parentNode.insertBefore(j, s);
1157 }(document, 'script', 'reqruiting-script'));
1158 </script>
1159 }
11601161 </div></body>
1162 </html>
1163 @*
1164 // -- Render Button Tag
1165 *@
1166 @helper RenderButton(string ButtonUrl = "", bool ButtonTarget = false, string ButtonText = "", string ButtonLayout = "", string ButtonClass = "", string ButtonId = "", string ButtonType = "", bool JsButton = false, bool ButtonDownload = false){
11671168 ButtonClass = !string.IsNullOrEmpty(ButtonClass) ? ButtonClass : "";
1169 var ButtonTargetText = "";
11701171 if (ButtonLayout != "default")
1172 {
1173 ButtonClass = ButtonClass + " " + ButtonLayout;
1174 }
11751176 // Define what type of link on button (ButtonOpenLink, ButtonOpenGallery, ButtonOpenInterest)
1177 ButtonType = !string.IsNullOrEmpty(ButtonType) ? ButtonType : "ButtonOpenLink" ;
11781179 if(ButtonType == "ButtonOpenLink" && ButtonTarget)
1180 {
1181 ButtonTargetText = "_blank";
1182 }
118311841185 // Download
1186 if (ButtonDownload){
1187 ButtonUrl = System.Web.HttpContext.Current.Server.UrlEncode(ButtonUrl);
1188 ButtonUrl = "/Admin/Public/Download.aspx?File=" + ButtonUrl;
1189 }
11901191 <a href="@ButtonUrl" id="@ButtonId" class="@ButtonLayout" target="@ButtonTargetText">@ButtonText</a>
1192 }
1193