Error executing template "Designs/Esbjerg/_parsed/SubsiteFrontpage.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_e10eb1e0aa3544118eb54cd65a138f27.Execute() in D:\Subsites\Files\Templates\Designs\Esbjerg\_parsed\SubsiteFrontpage.parsed.cshtml:line 435
   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.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @using System.Activities.Statements 2 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 3 @Title("Subsite - Master") 4 @Description("Master template til subsites") 5 @{ 6 var bodyClass = "subsite"; 7 8 // thema variables 9 var themeActive = Model.Area.Item.GetBoolean("Subsite"); 10 var themeTop = Model.Area.Item.GetList("ThemeTop").SelectedValue; 11 var themeContentArea = Model.Area.Item.GetList("ThemeContentArea").SelectedValue; 12 var themeFooter = Model.Area.Item.GetList("ThemeFooter").SelectedValue; 13 var themeTopHex = themeActive && themeTop != null ? themeTop : ""; 14 var themeContentHex = themeActive && themeContentArea != null ? themeContentArea : ""; 15 var themeFooterHex = themeActive && themeFooter != null ? themeFooter : ""; 16 17 var searchPageId = Model.Area.Item.GetInt64("SearchResultPage"); 18 var bodyId = ""; 19 20 // if current page is the searchresult page 21 if (searchPageId != 0) 22 { 23 if (Dynamicweb.Frontend.PageView.Current().Page.ID == searchPageId) 24 { 25 bodyId = "id=\"cludo-search-results\""; 26 } 27 } 28 29 if (Dynamicweb.Environment.ExecutingContext.IsAdminLoggedIn()) 30 { 31 bodyClass += " logged-in"; 32 } 33 } 34 35 <!DOCTYPE html> 36 <html lang="@Dynamicweb.Services.Areas.GetArea(Model.Area.ID).CultureInfo.TwoLetterISOLanguageName" class="no-js"> 37 38 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 39 40 @using Esbjerg.Logic 41 42 @{ 43 string cssPath = "/Files/Templates/Designs/" + Pageview.Layout.Design.Name; 44 //Color codes 45 // string colorPrimary = "#007AB8"; 46 // string colorPrimaryHover = "#004069"; 47 // string colorPrimaryAlternate = "#00669F"; 48 // string colorSecondary = "#007AB8"; 49 // string textPrimary = "#FFFFFF"; 50 // string textSecondary = "#FFFFFF"; 51 // string colorLink = "#D53F53"; 52 // string colorLinkAlternate = colorPrimary; 53 54 // if (Model.Area.Item.GetBoolean("Subsite")) 55 // { 56 // colorPrimary = Model.Area.Item.GetString("ColorArea1"); 57 // colorPrimaryHover = Model.Area.Item.GetString("HoverColor"); // Need new color in BE here 58 // colorPrimaryAlternate = colorPrimaryHover; 59 // colorSecondary = Model.Area.Item.GetString("ColorArea2"); 60 // textPrimary = Model.Area.Item.GetString("MenuTextColorPassive"); 61 // textSecondary = Model.Area.Item.GetString("HeaderFooterMenuText"); 62 // colorLink = colorPrimary; 63 // colorLinkAlternate = colorPrimary; 64 // } 65 66 string appleTouchIcon = @Model.Area.Item.GetString("Apple_touch_icon"); 67 string Favicon32x32 = @Model.Area.Item.GetString("Favicon32x32"); 68 string Favicon16x16 = @Model.Area.Item.GetString("Favicon16x16"); 69 } 70 <head> 71 <title>@Model.Title</title> 72 <meta name="pageID" content='@Model.ID'> 73 <script src="https://cookiecontrol.bleau.dk/scripts/cookieconsent.js"></script> 74 <script id="cookiecontrolfunctions" src="https://cookiecontrol.bleau.dk/scripts/Cookiecontrolfunctions.js" data-cname="Esbjerg" data-defaultset="EsbjergDefault"></script> 75 <meta name="description" content="@Model.Description" /> 76 <meta name="keywords" content="@Model.Keywords" /> 77 <meta charset="utf-8"> 78 <!-- Add to web.config --> 79 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 80 <meta name="viewport" content="width=device-width, initial-scale=1"> 81 <meta name="format-detection" content="telephone=no"> 82 83 <!-- Change this to be dynamic --> 84 @RenderSnippet("MetaTags") 85 86 <!-- Favicons @appleTouchIcon test="@(!String.IsNullOrEmpty(appleTouchIcon) ? "@appleTouchIcon" : "/apple-touch-icon.png")" --> 87 88 89 <link rel="apple-touch-icon" sizes="180x180" href="@(!String.IsNullOrEmpty(appleTouchIcon) ? @appleTouchIcon : "/apple-touch-icon.png")"> 90 <link rel="icon" type="image/png" sizes="32x32" href="@(!String.IsNullOrEmpty(@Favicon32x32) ? @Favicon32x32 : "/favicon-32x32.png")"> 91 <link rel="icon" type="image/png" sizes="16x16" href="@(!String.IsNullOrEmpty(@Favicon16x16) ? @Favicon16x16 : "/favicon-16x16.png")"> 92 <link rel="manifest" href="/site.webmanifest"> 93 <link rel="mask-icon" href="/safari-pinned-tab.svg" color="Favicon32x32#5bbad5"> 94 <meta name="msapplication-TileColor" content="#da532c"> 95 <meta name="theme-color" content="#ffffff"> 96 97 @RenderSnippet("EditorSnippet") 98 99 <!-- Create a block of inline styling to display until the primary CSS is ready. --> 100 <style type="text/css"> @Helpers.ReadFile(Pageview.Layout.Design.Path, "static/dist/css/critical-subsite.min.css")</style> 101 @* <link rel="preload" href="@cssPath/static/dist/css/critical-subsite.min.css" as="style" onload="this.onload=null;this.rel='stylesheet';window.esbjerg&&window.esbjerg.stylesLoaded&&window.esbjerg.stylesLoaded()"> *@ 102 <link rel="preload" href="@cssPath/static/dist/css/main-subsite.min.css" as="style" onload="this.onload=null;this.rel='stylesheet';window.esbjerg&&window.esbjerg.stylesLoaded&&window.esbjerg.stylesLoaded()"> 103 <noscript><link rel="stylesheet" type="text/css" href="@cssPath/static/dist/css/main-subsite.min.css"></noscript> 104 <!-- www.Cludo.com search start CSS --> 105 <link href="https://customer.cludo.com/assets/80/10930/cludo-search.min.css" type="text/css" rel="stylesheet"> 106 <!-- Preload our main script, since we know we are gonna load this later --> 107 @*<link rel="preload" as="script" href="@cssPath/static/dist/js/main.min.js">*@ 108 109 <link rel="preload" href="@cssPath/static/dist/fonts/OpenSans/OpenSans-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous"> 110 <link rel="preload" href="@cssPath/static/dist/fonts/OpenSans/OpenSans-Regular.woff" as="font" type="font/woff" crossorigin="anonymous"> 111 <link rel="preload" href="@cssPath/static/dist/fonts/OpenSans/OpenSans-Regular.ttf" as="font" type="font/ttf" crossorigin="anonymous"> 112 113 <link rel="preload" href="@cssPath/static/dist/fonts/OpenSans/OpenSans-Light.woff2" as="font" type="font/woff2" crossorigin="anonymous"> 114 <link rel="preload" href="@cssPath/static/dist/fonts/OpenSans/OpenSans-Light.woff" as="font" type="font/woff" crossorigin="anonymous"> 115 <link rel="preload" href="@cssPath/static/dist/fonts/OpenSans/OpenSans-Light.ttf" as="font" type="font/ttf" crossorigin="anonymous"> 116 117 <link rel="preload" href="@cssPath/static/dist/fonts/OpenSans/OpenSans-Bold.woff2" as="font" type="font/woff2" crossorigin="anonymous"> 118 <link rel="preload" href="@cssPath/static/dist/fonts/OpenSans/OpenSans-Bold.woff" as="font" type="font/woff" crossorigin="anonymous"> 119 <link rel="preload" href="@cssPath/static/dist/fonts/OpenSans/OpenSans-Bold.ttf" as="font" type="font/ttf" crossorigin="anonymous"> 120 121 122 123 <!-- You can use "prefetch" to preload other important assets (if you're not using HTTP/2 push) --> 124 <!-- And you can tell the browser to pre-connect to other sites you know you are going to talk to eventually: --> 125 <!--link rel="dns-prefetch" href="https://cdn.polyfill.io"--> 126 127 <script type="text/javascript">@Helpers.ReadFile(Pageview.Layout.Design.Path, "static/dist/js/modernizr.js")</script> 128 129 <!--Insights--> 130 <script type="text/javascript"> 131 !function (T, l, y) { var S = T.location, u = "script", k = "instrumentationKey", D = "ingestionendpoint", C = "disableExceptionTracking", E = "ai.device.", I = "toLowerCase", b = "crossOrigin", w = "POST", e = "appInsightsSDK", t = y.name || "appInsights"; (y.name || T[e]) && (T[e] = t); var n = T[t] || function (d) { var g = !1, f = !1, m = { initialize: !0, queue: [], sv: "4", version: 2, config: d }; function v(e, t) { var n = {}, a = "Browser"; return n[E + "id"] = a[I](), n[E + "type"] = a, n["ai.operation.name"] = S && S.pathname || "_unknown_", n["ai.internal.sdkVersion"] = "javascript:snippet_" + (m.sv || m.version), { time: function () { var e = new Date; function t(e) { var t = "" + e; return 1 === t.length && (t = "0" + t), t } return e.getUTCFullYear() + "-" + t(1 + e.getUTCMonth()) + "-" + t(e.getUTCDate()) + "T" + t(e.getUTCHours()) + ":" + t(e.getUTCMinutes()) + ":" + t(e.getUTCSeconds()) + "." + ((e.getUTCMilliseconds() / 1e3).toFixed(3) + "").slice(2, 5) + "Z" }(), iKey: e, name: "Microsoft.ApplicationInsights." + e.replace(/-/g, "") + "." + t, sampleRate: 100, tags: n, data: { baseData: { ver: 2 } } } } var h = d.url || y.src; if (h) { function a(e) { var t, n, a, i, r, o, s, c, p, l, u; g = !0, m.queue = [], f || (f = !0, t = h, s = function () { var e = {}, t = d.connectionString; if (t) for (var n = t.split(";"), a = 0; a < n.length; a++) { var i = n[a].split("="); 2 === i.length && (e[i[0][I]()] = i[1]) } if (!e[D]) { var r = e.endpointsuffix, o = r ? e.location : null; e[D] = "https://" + (o ? o + "." : "") + "dc." + (r || "services.visualstudio.com") } return e }(), c = s[k] || d[k] || "", p = s[D], l = p ? p + "/v2/track" : config.endpointUrl, (u = []).push((n = "SDK LOAD Failure: Failed to load Application Insights SDK script (See stack for details)", a = t, i = l, (o = (r = v(c, "Exception")).data).baseType = "ExceptionData", o.baseData.exceptions = [{ typeName: "SDKLoadFailed", message: n.replace(/\./g, "-"), hasFullStack: !1, stack: n + "\nSnippet failed to load [" + a + "] -- Telemetry is disabled\nHelp Link: https://go.microsoft.com/fwlink/?linkid=2128109\nHost: " + (S && S.pathname || "_unknown_") + "\nEndpoint: " + i, parsedStack: [] }], r)), u.push(function (e, t, n, a) { var i = v(c, "Message"), r = i.data; r.baseType = "MessageData"; var o = r.baseData; return o.message = 'AI (Internal): 99 message:"' + ("SDK LOAD Failure: Failed to load Application Insights SDK script (See stack for details) (" + n + ")").replace(/\"/g, "") + '"', o.properties = { endpoint: a }, i }(0, 0, t, l)), function (e, t) { if (JSON) { var n = T.fetch; if (n && !y.useXhr) n(t, { method: w, body: JSON.stringify(e), mode: "cors" }); else if (XMLHttpRequest) { var a = new XMLHttpRequest; a.open(w, t), a.setRequestHeader("Content-type", "application/json"), a.send(JSON.stringify(e)) } } }(u, l)) } function i(e, t) { f || setTimeout(function () { !t && m.core || a() }, 500) } var e = function () { var n = l.createElement(u); n.src = h; var e = y[b]; return !e && "" !== e || "undefined" == n[b] || (n[b] = e), n.onload = i, n.onerror = a, n.onreadystatechange = function (e, t) { "loaded" !== n.readyState && "complete" !== n.readyState || i(0, t) }, n }(); y.ld < 0 ? l.getElementsByTagName("head")[0].appendChild(e) : setTimeout(function () { l.getElementsByTagName(u)[0].parentNode.appendChild(e) }, y.ld || 0) } try { m.cookie = l.cookie } catch (p) { } function t(e) { for (; e.length;)!function (t) { m[t] = function () { var e = arguments; g || m.queue.push(function () { m[t].apply(m, e) }) } }(e.pop()) } var n = "track", r = "TrackPage", o = "TrackEvent"; t([n + "Event", n + "PageView", n + "Exception", n + "Trace", n + "DependencyData", n + "Metric", n + "PageViewPerformance", "start" + r, "stop" + r, "start" + o, "stop" + o, "addTelemetryInitializer", "setAuthenticatedUserContext", "clearAuthenticatedUserContext", "flush"]), m.SeverityLevel = { Verbose: 0, Information: 1, Warning: 2, Error: 3, Critical: 4 }; var s = (d.extensionConfig || {}).ApplicationInsightsAnalytics || {}; if (!0 !== d[C] && !0 !== s[C]) { method = "onerror", t(["_" + method]); var c = T[method]; T[method] = function (e, t, n, a, i) { var r = c && c(e, t, n, a, i); return !0 !== r && m["_" + method]({ message: e, url: t, lineNumber: n, columnNumber: a, error: i }), r }, d.autoExceptionInstrumented = !0 } return m }(y.cfg); (T[t] = n).queue && 0 === n.queue.length && n.trackPageView({}) }(window, document, { 132 src: "https://az416426.vo.msecnd.net/scripts/b/ai.2.min.js", // The SDK URL Source 133 //name: "appInsights", // Global SDK Instance name defaults to "appInsights" when not supplied 134 //ld: 0, // Defines the load delay (in ms) before attempting to load the sdk. -1 = block page load and add to head. (default) = 0ms load after timeout, 135 //useXhr: 1, // Use XHR instead of fetch to report failures (if available), 136 //crossOrigin: "anonymous", // When supplied this will add the provided value as the cross origin attribute on the script tag 137 cfg: { // Application Insights Configuration 138 instrumentationKey: "5b8602f4-7263-41f7-b005-6c42db042759", 139 name: "BleauBorgerEsbjerg", 140 isCookieUseDisabled: "true" 141 /* ...Other Configuration Options... */ 142 } 143 }); 144 </script> 145 146 <!--Kode - Header section--> 147 @RenderSnippet("KodeHeader") 148 149 @RenderSnippet("MinimapHead") 150 151 @{string scriptHeaderArea = Model.Area.Item.GetString("ScriptHeaderArea"); } 152 @if (!string.IsNullOrEmpty(scriptHeaderArea)){ 153 @scriptHeaderArea 154 } 155 156 </head> 157 158 <body class="@bodyClass" @bodyId> 159 @if (themeActive) 160 { 161 <style> 162 :root { 163 /* Header/Top Area*/ 164 --theme-top__primary-color: @($"#{themeTopHex}"); 165 --theme-top__primary-color--alternate: @($"#{GetLinkColor(themeTopHex)}"); 166 --theme-top__primary-color--text: @GetThemeTextColor(themeTopHex); 167 --theme-top__primary-color--dimmed: @($"#{GetContrastColor(themeTopHex)}"); 168 --theme-top__color--link-hover: @($"#{themeTopHex}"); 169 170 /* Content Area */ 171 --theme-content__primary-color: @($"#{themeContentHex}"); 172 --theme-content__primary-color--alternate: @($"#{GetLinkColor(themeContentHex)}"); 173 --theme-content__primary-color--text: @GetThemeTextColor(themeContentHex); 174 --theme-content__color--gallery-arrow: @($"#{themeContentHex}"); 175 --theme-content__primary-color--dimmed: @($"#{GetContrastColor(themeContentHex)}"); 176 --theme-content__color--link-hover: @($"#{themeContentHex}"); 177 178 /* Footer Area */ 179 --theme-footer__primary-color: @($"#{themeFooterHex}"); 180 --theme-footer__primary-color--alternate: @($"#{GetLinkColor(themeFooterHex)}"); 181 --theme-footer__primary-color--text: @GetThemeTextColor(themeFooterHex); 182 --theme-footer__primary-color--dimmed: @($"#{GetContrastColor(themeFooterHex)}"); 183 --theme-footer__color--link-hover: @($"#{GetLinkColor(themeFooterHex)}"); 184 } 185 </style> 186 } 187 188 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 189 <header class="header-main header-main--subsite"> 190 <div class="header-main__top"> 191 <div class="search"> 192 <button type="button" name="toggle-search-button" aria-label="toggle-search" class="search__toggle-btn" aria-expanded="false" aria-haspopup="true"> 193 <span class="search__search-icon"> 194 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 23.071"><path d="M22.292 22.295a.72.72 0 0 1-1.007 0l-5.7-5.612a9.306 9.306 0 0 1-5.826 2.034 9.11 9.11 0 1 1 9.256-9.109 8.984 8.984 0 0 1-2.4 6.105l5.68 5.59a.693.693 0 0 1-.003.992zM9.756 1.9a7.708 7.708 0 1 0 7.832 7.707A7.77 7.77 0 0 0 9.756 1.9z"/></svg> 195 </span> 196 <span class="search__close-icon"> 197 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.801 19.798"><path d="M9.9 11.314l-8.485 8.485-1.416-1.414 8.487-8.486L.002 1.414 1.416 0 9.9 8.485 18.384 0 19.8 1.414l-8.485 8.485 8.485 8.485-1.416 1.414z"/></svg> 198 </span> 199 <span class="search__text" data-text-default="@Translate("Search", "Søg")" data-text-close="@Translate("Close", "Luk")"> 200 @Translate("Search", "Søg") 201 </span> 202 </button> 203 <div class="search__content cludo-search-page"> 204 <div class="grid grid-container"> 205 <div class="row row--right cludo-nav-items"> 206 <div class="cludo-nav-items-search"> 207 <form class="search__form" id="cludo-search-form" role="search" autocomplete="off"> 208 <input class="search__input" autofill="false" type="search" name="search" title="Global søgning" placeholder="@Translate("(Search) Label", "Hvad kan vi hjælpe med?")"> 209 <button type="submit" aria-label="@Translate("Search", "Søg")"> 210 <span class="cludo-search-icon"> 211 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 23.071"><path d="M22.292 22.295a.72.72 0 0 1-1.007 0l-5.7-5.612a9.306 9.306 0 0 1-5.826 2.034 9.11 9.11 0 1 1 9.256-9.109 8.984 8.984 0 0 1-2.4 6.105l5.68 5.59a.693.693 0 0 1-.003.992zM9.756 1.9a7.708 7.708 0 1 0 7.832 7.707A7.77 7.77 0 0 0 9.756 1.9z"/></svg> 212 </span> 213 </button> 214 </form> 215 </div> 216 217 <div class="cludo-nav-items-filters"> 218 <div class="search-filters search-filters-mobile" aria-haspopup="true"></div> 219 </div> 220 </div> 221 </div> 222 </div> 223 </div> 224 <a class="skip-to-content" href="#maincontent">Gå til hovedindhold <span>(Tryk Enter)</span></a> 225 </div> 226 <div class="header-main__bottom"> 227 <div class="header-main__menu header-main__menu--to-top-on-open"> 228 <div class="menu menu--closed"> 229 <button type="button" name="toggle-menu-button" aria-label="toggle-menu" class="menu__burger-btn svg-fill--primary text--primary bg--primary" aria-haspopup="true" aria-controls="main-nav" data-svg-default="svg-fill--primary" data-svg-open="svg-fill--secondary" data-text-default="text--primary" data-text-open="text--secondary" data-background-default="bg--primary" data-background-open="bg--primary-alternate" aria-expanded="false"> 230 <span class="menu__menu-icon"> 231 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 16"><path d="M.001 16v-2h26v2zm0-7V7h26v2zm0-7V0h26v2z"/></svg> 232 </span> 233 <span class="menu__close-icon"> 234 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.801 19.798"><path d="M9.9 11.314l-8.485 8.485-1.416-1.414 8.487-8.486L.002 1.414 1.416 0 9.9 8.485 18.384 0 19.8 1.414l-8.485 8.485 8.485 8.485-1.416 1.414z"/></svg> 235 </span> 236 <span class="menu__text" data-text-open="@Translate("Menu", "Menu")" data-text-close="@Translate("Close", "Luk")"> 237 @Translate("Menu", "Menu") 238 </span> 239 </button> 240 241 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 242 243 @{ 244 var navImage = Model.Area.Item.GetString("Image"); 245 var navImageLink = Model.Area.Item.GetItem("ImageLink").GetString("LinkInternal"); 246 var navImageLinkText = Model.Area.Item.GetItem("ImageLink").GetString("LinkText"); 247 var navImageLinkTarget = Model.Area.Item.GetItem("ImageLink").GetList("LinkTarget").SelectedValue; 248 var navImageLinkLinkType = Model.Area.Item.GetItem("ImageLink").GetList("LinkType").SelectedValue; 249 250 var navImage2 = Model.Area.Item.GetString("Image2"); 251 var navImageLink2 = Model.Area.Item.GetItem("ImageLink2").GetString("LinkInternal"); 252 var navImageLinkText2 = Model.Area.Item.GetItem("ImageLink2").GetString("LinkText"); 253 var navImageLinkTarget2 = Model.Area.Item.GetItem("ImageLink2").GetList("LinkTarget").SelectedValue; 254 var navImageLinkLinkType2 = Model.Area.Item.GetItem("ImageLink2").GetList("LinkType").SelectedValue; 255 256 if (navImageLinkLinkType == "external") 257 { 258 navImageLink = Model.Area.Item.GetItem("ImageLink").GetString("LinkExternal"); 259 } 260 if (navImageLinkLinkType2 == "external") 261 { 262 navImageLink2 = Model.Area.Item.GetItem("ImageLink2").GetString("LinkExternal"); 263 } 264 265 } 266 267 <nav id="main-nav" class="menu__content" aria-labelledby="primary-navigation"> 268 <h2 id="primary-navigation" class="visuallyhidden">Primær navigation</h2> 269 270 @RenderNavigation(new { template = "SubsiteBurgerNavigation.xslt", expandmode = "all", startlevel = 2 }) 271 @if (!string.IsNullOrWhiteSpace(navImage)) 272 { 273 <div class="menu__culture"> 274 @if (navImage != "") 275 { 276 <a class="menu__culture-link" href="@navImageLink" target="@navImageLinkTarget"> 277 <img src="@navImage" alt="@navImageLinkText"> 278 </a> 279 } 280 @if (navImage2 != "") 281 { 282 <a class="menu__culture-link" href="@navImageLink2" target="@navImageLinkTarget2"> 283 <img src="@navImage2" alt="@navImageLinkText2"> 284 </a> 285 } 286 </div> 287 } 288 </nav> 289 </div> 290 </div> 291 <div class="header-main__bar"> 292 <div class="grid grid-container"> 293 <div class="header-main__logo logo"> 294 <a href="/" title="Gå til forsiden" class="logo__link"> 295 <img src="@Model.Area.Item.GetString("SiteLogo")" alt="Logo alt tekst"> 296 </a> 297 </div> 298 </div> 299 </div> 300 </div> 301 </header> 302 303 <main id="maincontent" tabindex="-1"> 304 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 305 306 @using Dynamicweb.Content; 307 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 308 @{ 309 string heroLink = Model.Item.GetString("Link"); 310 string boxText = Model.Item.GetString("Text"); 311 string heroPicture = Model.Item.GetString("Heropicture"); 312 bool isVideo = Model.Item.GetBoolean("IsVideo"); 313 string snippetPicturePath = "https://" + System.Web.HttpContext.Current.Request.Url.Host + "/admin/public/GetImage.ashx?Image=" + heroPicture + "&width=1200&altFmImage_path=" + Model.Area.Item.GetString("DefaultPicture"); 314 315 string searchClass = "col col--sm-5 col--offset-sm-1 col--offset-md-2 col--offset-lg-4 frontpage-top__col-search"; 316 if (string.IsNullOrEmpty(boxText)) 317 { 318 searchClass = "col col--sm-8 col--offset-sm-2 col--md-7 col--offset-md-4 frontpage-top__col-search"; 319 } 320 321 PageService pageService = new PageService(); 322 Dynamicweb.Content.Page p = pageService.GetPage(Model.Item.PageID); 323 324 } 325 @SnippetStart("MetaTags") 326 <meta property="og:title" content="@p.MetaTitle" /> 327 <meta property="og:description" content="@p.Description" /> 328 <meta property="og:url" content="@p.MetaCanonical"> 329 <meta property="og:image" content="@snippetPicturePath" /> 330 @SnippetEnd("MetaTags") 331 332 <section class="frontpage-top"> 333 <div class="hero" data-module="hero"> 334 @if (isVideo) 335 { 336 string videoValue = Model.Item.GetString("Video"); 337 338 if (!string.IsNullOrEmpty(videoValue)) 339 { 340 string video = videoValue.Substring(0, videoValue.IndexOf('.')); 341 <div class="hero__video-container"> 342 <div class="hero__video-wrapper" style="background-image: url('/admin/public/GetImage.ashx?Image=@heroPicture&width=100&height=50&crop=0')"> 343 <video tabindex="0" class="hero__video" preload="auto" autoplay muted loop data-src="@video"> 344 <p>This browser does not support the video element</p> 345 </video> 346 </div> 347 </div> 348 <button type="button" class="hero__pause-btn"> 349 <span class="visuallyhidden">Tryk her for at pause eller fortsætte video</span> 350 <span class="hero__play-icon"><svg xmlns="http://www.w3.org/2000/svg" width="26.437" height="52.956" viewBox="0 0 26.437 52.956"><path d="M.022 51.356H.014V1.785L0 1.771V.001l18.44 18.435 8 8-7.779 7.779L.025 52.955zm1.292-1.688L17.77 33.327l6.894-6.894-6.7-6.7L1.316 3.086z"/></svg></span> 351 </button> 352 } 353 } 354 355 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 356 @{ 357 string heroValue = Model.Item.GetString("Heropicture"); 358 string heroPic = "/admin/public/GetImage.ashx?Image=" + heroValue; 359 360 if (!string.IsNullOrEmpty(heroValue)) 361 { 362 <div class="hero__background-image-container"> 363 <div class="hero__background-image-wrapper" 364 data-src-xxs="@heroPic&width=375&height=250&crop=0" 365 data-src-xs="@heroPic&width=768&height=250&crop=0" 366 data-src-sm="@heroPic&width=992&height=400&crop=0" 367 data-src-md="@heroPic&width=1220&height=400&crop=0" 368 data-src-lg='@heroPic&width=1540&height=500&crop=0' 369 data-src-xl="@heroPic&width=1920&height=600&crop=0"> 370 <div class="hero__background-image" style="background-image: url('@heroPic&width=96&height=30&crop=0')"></div> 371 </div> 372 </div> 373 if (Model.Area.Item.GetBoolean("Subsite")) 374 { 375 <div class="hero__line bg--primary"></div> 376 } 377 } 378 } 379 380 </div> 381 382 383 384 <div class="grid grid-container frontpage-top__grid soft-load"> 385 <div class="row"> 386 @if (!Model.Area.Item.GetBoolean("Subsite")) { 387 <div class="@searchClass"> 388 <div class="frontpage-top__search"> 389 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 390 <div class="search-box"> 391 <form id="search-box-form" class="search-box__form"> 392 <label for="search-box__input" class="search-box__label" aria-label="Søg her">@Translate("(Search) Label", "Hvad kan vi hjælpe med?")</label> 393 <div class="search-box__content"> 394 <input class="search-box__input" type="text" id="search-box__input" placeholder="@Translate("(Search) ButtonLabel", "Søg")"> 395 <button type="submit" class="search-box__button" aria-label="@Translate("(Search) ButtonLabel", "Søg")"> 396 <span class="search-box__icon"> 397 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 23.071"><path d="M22.292 22.295a.72.72 0 0 1-1.007 0l-5.7-5.612a9.306 9.306 0 0 1-5.826 2.034 9.11 9.11 0 1 1 9.256-9.109 8.984 8.984 0 0 1-2.4 6.105l5.68 5.59a.693.693 0 0 1-.003.992zM9.756 1.9a7.708 7.708 0 1 0 7.832 7.707A7.77 7.77 0 0 0 9.756 1.9z"/></svg> 398 </span> 399 </button> 400 </div> 401 </form> 402 </div> 403 </div> 404 </div> 405 } 406 @if (!string.IsNullOrEmpty(boxText)) 407 { 408 <div class="col col--sm-5 col--md-4 col--lg-3 col--offset-sm-6 col--offset-md-7 col--offset-lg-9 frontpage-top__col-content"> 409 <div class="frontpage-top__content"> 410 <div class="frontpage-top__text bg--pseudo"> 411 <p> 412 @boxText 413 </p> 414 </div> 415 @if (!string.IsNullOrEmpty(heroLink)) 416 { 417 <a href="@heroLink" class="frontpage-top__link" title="Gå til artikel om Det gode liv"> 418 419 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 420 <span class="arrow"> 421 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40.62 16"><path d="M40.62 8l-8 8-.89-.89L38.84 8 31.73.89l.89-.89 8 8z"/><path class="spine" d="M0 7.5h40v1H0z"/></svg> 422 </span> 423 424 <span>@Model.Item.GetString("LinkLabel")</span> 425 </a> 426 } 427 </div> 428 </div> 429 } 430 </div> 431 </div> 432 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 433 434 @{ 435 var itemViewModel = Model.Item.GetField("Contact").GetItem(); 436 437 if (itemViewModel != null) 438 { 439 bool english = itemViewModel.GetBoolean("English"); 440 string picture = itemViewModel.GetString("ContactBoxImage"); 441 string picturePath = "/admin/public/GetImage.ashx?Image=" + picture + "&width=375&height=150&crop=0"; 442 443 <aside class="contact hard-load"> 444 <div class="contact__header"> 445 <div class="contact__open"> 446 <div class="contact__image-container"> 447 <img class="contact__image" src="@picturePath" alt="@itemViewModel.GetString("ContactBoxTitle")"> 448 </div> 449 <div class="contact__header-text"> 450 @*<p>@(english ? "Questions?" : "Spørgsmål?")</p>*@ 451 <p><strong>@(english ? "Contact us" : "Kontakt os")</strong></p> 452 </div> 453 <button type="button" class="contact__open-btn" aria-label="Åben kontakt boks" aria-expanded="false"><span class="contact__open-btn-extra">@Translate("ContactUs", "Kontakt os")</span></button> 454 </div> 455 <button type="button" class="contact__close-btn bg--secondary" aria-hidden="true" tabindex="-1"> 456 <span class="contact__close-svg"> 457 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.801 19.798"><path d="M9.9 11.314l-8.485 8.485-1.416-1.414 8.487-8.486L.002 1.414 1.416 0 9.9 8.485 18.384 0 19.8 1.414l-8.485 8.485 8.485 8.485-1.416 1.414z"/></svg> 458 </span> 459 <span class="contact__close-text"> 460 @*@(english ? "Close" : "Luk") *@ 461 @Translate("Close","Luk") 462 </span> 463 </button> 464 </div> 465 <div class="contact__content bg--secondary" aria-hidden="true"> 466 <div class="contact__mobile-image-container"> 467 <img class="contact__mobile-image" src="@picturePath" alt="@itemViewModel.GetString("ContactBoxTitle")"> 468 </div> 469 <h2>@itemViewModel.GetString("ContactBoxTitle")</h2> 470 <div class="contact__text"> 471 @itemViewModel.GetString("ContentBoxDescription") 472 </div> 473 <ul class="contact__links"> 474 @if (!string.IsNullOrEmpty(itemViewModel.GetString("ContactBoxPhone"))) 475 { 476 <li> 477 <a href="tel:@itemViewModel.GetString("ContactBoxPhone")" title="@Translate("PhoneToUs", "Ring til os")" class="contact__link svg-fill--bg-secondary"> 478 <span class="contact__link-svg bg--parent-hover"> 479 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26.054 26"><path d="M4.991 26a2.743 2.743 0 0 1-2.025-.844L.554 22.75a1.87 1.87 0 0 1-.548-1.45 1.263 1.263 0 0 1 .548-.958l4.824-3.609a2.4 2.4 0 0 1 1.32-.457 1.5 1.5 0 0 1 1.092.457l1.427 1.423a48.044 48.044 0 0 0 5.207-4.43 41.4 41.4 0 0 0 3.889-4.542l-1.476-1.469a1.8 1.8 0 0 1 0-2.406L20.455.5a1.71 1.71 0 0 1 2.412 0l2.413 2.4c1.289 1.286.723 2.836.067 4.629l-.067.183a57.34 57.34 0 0 1-7.605 9.913 51.92 51.92 0 0 1-9.883 7.528A6.261 6.261 0 0 1 4.991 26zm1.447-7.805a1.529 1.529 0 0 0-.84.291l-3.07 2.3c-.53.446-.227 1.15 0 1.531l1.535 1.531a2.019 2.019 0 0 0 1.305.324 2.928 2.928 0 0 0 1.217-.214c.072-.045 7.233-4.553 10.252-7.818a50.434 50.434 0 0 0 7.236-9.622c.3-.588.512-1.932-.109-2.515l-1.535-1.536a1.2 1.2 0 0 0-.827-.373.866.866 0 0 0-.708.373l-1.11 1.476-1.193 1.585a1.148 1.148 0 0 0 0 1.531l1.938 1.932c-3.4 5.511-9.1 9.743-11.4 11.307l-.107.074-1.889-1.886a.954.954 0 0 0-.695-.291z"/></svg> 480 </span> 481 @itemViewModel.GetString("ContactBoxPhone") 482 </a> 483 </li> 484 } 485 @if (!string.IsNullOrEmpty(itemViewModel.GetString("ContactBoxEmail"))) 486 { 487 string hrefValue = itemViewModel.GetString("ContactBoxEmail").Contains("@") ? "mailto:" + itemViewModel.GetString("ContactBoxEmail") : itemViewModel.GetString("ContactBoxEmail"); 488 <li> 489 <a target="_blank" href="@hrefValue" title="@Translate("WriteUs", "Skriv til os")" class="contact__link svg-fill--bg-secondary"> 490 <span class="contact__link-svg bg--parent-hover"> 491 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 21.125"><path d="M22.75 21.125H3.25A3.25 3.25 0 0 1 0 17.875V3.25A3.25 3.25 0 0 1 3.25 0h19.5A3.25 3.25 0 0 1 26 3.25v14.625a3.25 3.25 0 0 1-3.25 3.25zM4.062 1.625L13 9.395l8.938-7.77zM24.375 3.25a1.616 1.616 0 0 0-.516-1.182L13 11.375 2.141 2.068a1.616 1.616 0 0 0-.516 1.182v14.625A1.625 1.625 0 0 0 3.25 19.5h19.5a1.625 1.625 0 0 0 1.625-1.625z"/></svg> 492 </span> 493 @itemViewModel.GetString("ContactBoxEmailLabel") 494 </a> 495 </li> 496 } 497 @if (!string.IsNullOrEmpty((string)itemViewModel.GetString("ContactBoxLink"))) 498 { 499 <li> 500 <a target="_blank" href="@(itemViewModel.GetString("ContactBoxLink").Contains("http") ? itemViewModel.GetString("ContactBoxLink") : "https://" + itemViewModel.GetString("ContactBoxLink"))" title="@Translate("WriteUs", "Skriv til os")" class="contact__link svg-fill--bg-secondary"> 501 <span class="contact__link-svg bg--parent-hover"> 502 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 21.125"><path d="M22.75 21.125H3.25A3.25 3.25 0 0 1 0 17.875V3.25A3.25 3.25 0 0 1 3.25 0h19.5A3.25 3.25 0 0 1 26 3.25v14.625a3.25 3.25 0 0 1-3.25 3.25zM4.062 1.625L13 9.395l8.938-7.77zM24.375 3.25a1.616 1.616 0 0 0-.516-1.182L13 11.375 2.141 2.068a1.616 1.616 0 0 0-.516 1.182v14.625A1.625 1.625 0 0 0 3.25 19.5h19.5a1.625 1.625 0 0 0 1.625-1.625z"/></svg> 503 </span> 504 @itemViewModel.GetString("ContactBoxLinkLabel") 505 </a> 506 </li> 507 } 508 </ul> 509 <div class="contact__text"> 510 @if (!string.IsNullOrEmpty(itemViewModel.GetString("ContactBoxPhoneHours"))) 511 { 512 @itemViewModel.GetString("ContactBoxPhoneHours") 513 } 514 @if (!string.IsNullOrEmpty(itemViewModel.GetString("ContactBoxOpenHours"))) 515 { 516 @itemViewModel.GetString("ContactBoxOpenHours") 517 } 518 </div> 519 </div> 520 </aside> 521 } 522 } 523 </section> 524 525 526 @{ 527 var Heading1 = Model.Item.GetString("Heading"); 528 } 529 530 <div class="content content--secondary"> 531 <div class="grid grid-container"> 532 <div class="row"> 533 <div class="col col--sm-12"> 534 @if (!string.IsNullOrEmpty(Heading1)) 535 { 536 <h1 class="h1 margin-reset">@Heading1</h1> 537 } 538 </div> 539 </div> 540 </div> 541 @Model.Placeholder("dwcontent", "content", "items-allowed:Accordion,Gallery,Ribbon_A,Ribbon_B,Ribbon_C,Ribbon_D,Richtext,SponsorList,PersonCollection,Kode,ModuleOnly,Minimap") 542 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 543 544 @SnippetStart("EditorSnippet") 545 546 @{ 547 DateTime date = Model.UpdatedDate; 548 549 550 foreach (var user in Model.Item.GetUsers("Editor")) 551 { 552 <meta name="web_author" content="@user.UserName" /> 553 <meta name="contact" content="@user.Email" /> 554 } 555 <meta name="Last-Modified" content="@date.ToString("yyyy-MM-ddTHH:mm:ssZ")" /> 556 557 } 558 @SnippetEnd("EditorSnippet") 559 </div> 560 </main> 561 562 @using System.Web; 563 @using Dynamicweb.Frontend 564 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 565 566 @{ 567 string redirectPage = ""; 568 569 string footerPhonenumber = Model.Area.Item.GetString("Phonenumber"); 570 string footerEmail = Model.Area.Item.GetString("Email"); 571 string footerFacebook = Model.Area.Item.GetString("Facebook"); 572 string footerTwitter = Model.Area.Item.GetString("Twitter"); 573 string footerLinkedIn = Model.Area.Item.GetString("LinkedIn"); 574 string footerInstagram = Model.Area.Item.GetString("Instagram"); 575 576 var links1 = Model.Area.Item.GetItems("ColumnLinks1"); 577 var links2 = Model.Area.Item.GetItems("ColumnLinks2"); 578 var links3 = Model.Area.Item.GetItems("ColumnLinks3"); 579 string CLabel1 = Model.Area.Item.GetString("ColumnLabel1"); 580 string CLabel2 = Model.Area.Item.GetString("ColumnLabel2"); 581 string CLabel3 = Model.Area.Item.GetString("ColumnLabel3"); 582 583 string contactValue = string.Empty; 584 585 var footerImage = Model.Area.Item.GetString("Image"); 586 var footerImageLink = Model.Area.Item.GetItem("ImageLink").GetString("LinkInternal"); 587 var footerImageLinkText = Model.Area.Item.GetItem("ImageLink").GetString("LinkText"); 588 var footerImageLinkTarget = Model.Area.Item.GetItem("ImageLink").GetList("LinkTarget").SelectedValue; 589 var footerImageLinkLinkType = Model.Area.Item.GetItem("ImageLink").GetList("LinkType").SelectedValue; 590 591 var footerImage2 = Model.Area.Item.GetString("Image2"); 592 var footerImageLink2 = Model.Area.Item.GetItem("ImageLink2").GetString("LinkInternal"); 593 var footerImageLinkText2 = Model.Area.Item.GetItem("ImageLink2").GetString("LinkText"); 594 var footerImageLinkTarget2 = Model.Area.Item.GetItem("ImageLink2").GetList("LinkTarget").SelectedValue; 595 var footerImageLinkLinkType2 = Model.Area.Item.GetItem("ImageLink2").GetList("LinkType").SelectedValue; 596 597 if (footerImageLinkLinkType == "external") 598 { 599 footerImageLink = Model.Area.Item.GetItem("ImageLink").GetString("LinkExternal"); 600 } 601 602 if (footerImageLinkLinkType2 == "external") 603 { 604 footerImageLink2 = Model.Area.Item.GetItem("ImageLink2").GetString("LinkExternal"); 605 } 606 607 if (Model.Area.Item.GetValue("Email") != null) 608 { 609 contactValue = footerEmail.Contains("@") ? "mailto:" + footerEmail : footerEmail; 610 } 611 } 612 613 <footer class="footer soft-load"> 614 <aside class="footer__sidebar"> 615 <div class="footer__culture"> 616 @if (footerImage != "") 617 { 618 <a class="footer__culture-link" href="@footerImageLink" target="@footerImageLinkTarget"> 619 <img src="@footerImage" alt="@footerImageLinkText"> 620 </a> 621 } 622 @if (footerImage2 != "") 623 { 624 <a class="footer__culture-link" href="@footerImageLink2" target="@footerImageLinkTarget2"> 625 <img src="@footerImage2" alt="@footerImageLinkText2"> 626 </a> 627 } 628 </div> 629 </aside> 630 <div class="footer__container"> 631 <div class="grid grid-container"> 632 <div class="row"> 633 <div class="col col--md-3 footer__col-first"> 634 <div class="footer__logo"> 635 @if (Model.Area.Item.GetString("Logo") != "") 636 { 637 <a href="/" title="Gå til forsiden" class="footer__logo-link"> 638 <img src="@Model.Area.Item.GetString("Logo")" alt="Logo alt tekst"> 639 </a> 640 } 641 </div> 642 <div class="footer__contact-desktop"> 643 644 @if (!string.IsNullOrEmpty(footerPhonenumber)) 645 { 646 <div class="footer__contact"> 647 <a href="tel:+45@(Model.Area.Item.GetString("Phonenumber"))" title="@Model.Area.Item.GetString("PhoneLabel")" class="footer__contact-link"> 648 <span class="footer__contact-svg"> 649 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26.054 26"><path d="M4.991 26a2.743 2.743 0 0 1-2.025-.844L.554 22.75a1.87 1.87 0 0 1-.548-1.45 1.263 1.263 0 0 1 .548-.958l4.824-3.609a2.4 2.4 0 0 1 1.32-.457 1.5 1.5 0 0 1 1.092.457l1.427 1.423a48.044 48.044 0 0 0 5.207-4.43 41.4 41.4 0 0 0 3.889-4.542l-1.476-1.469a1.8 1.8 0 0 1 0-2.406L20.455.5a1.71 1.71 0 0 1 2.412 0l2.413 2.4c1.289 1.286.723 2.836.067 4.629l-.067.183a57.34 57.34 0 0 1-7.605 9.913 51.92 51.92 0 0 1-9.883 7.528A6.261 6.261 0 0 1 4.991 26zm1.447-7.805a1.529 1.529 0 0 0-.84.291l-3.07 2.3c-.53.446-.227 1.15 0 1.531l1.535 1.531a2.019 2.019 0 0 0 1.305.324 2.928 2.928 0 0 0 1.217-.214c.072-.045 7.233-4.553 10.252-7.818a50.434 50.434 0 0 0 7.236-9.622c.3-.588.512-1.932-.109-2.515l-1.535-1.536a1.2 1.2 0 0 0-.827-.373.866.866 0 0 0-.708.373l-1.11 1.476-1.193 1.585a1.148 1.148 0 0 0 0 1.531l1.938 1.932c-3.4 5.511-9.1 9.743-11.4 11.307l-.107.074-1.889-1.886a.954.954 0 0 0-.695-.291z"/></svg> 650 </span> 651 @Model.Area.Item.GetString("Phonenumber") 652 </a> 653 <span> 654 @Model.Area.Item.GetString("PhonenumberLabel") 655 </span> 656 </div> 657 } 658 659 @if (!string.IsNullOrEmpty(footerEmail)) 660 { 661 <div class="footer__contact"> 662 <a href="@contactValue" title="@Model.Area.Item.GetString("EmailLabel")" class="footer__contact-link"> 663 <span class="footer__contact-svg"> 664 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 21.125"><path d="M22.75 21.125H3.25A3.25 3.25 0 0 1 0 17.875V3.25A3.25 3.25 0 0 1 3.25 0h19.5A3.25 3.25 0 0 1 26 3.25v14.625a3.25 3.25 0 0 1-3.25 3.25zM4.062 1.625L13 9.395l8.938-7.77zM24.375 3.25a1.616 1.616 0 0 0-.516-1.182L13 11.375 2.141 2.068a1.616 1.616 0 0 0-.516 1.182v14.625A1.625 1.625 0 0 0 3.25 19.5h19.5a1.625 1.625 0 0 0 1.625-1.625z"/></svg> 665 </span> 666 @Model.Area.Item.GetString("EmailLabel") 667 </a> 668 <span> 669 @Model.Area.Item.GetString("EmailLabel_2") 670 </span> 671 </div> 672 } 673 </div> 674 </div> 675 <div class="col col--md-3 footer__col-info"> 676 <div class="footer__info"> 677 <div class="footer__accordion" data-module="accordion"> 678 <div class="accordion"> 679 @if (!string.IsNullOrEmpty(CLabel1)) 680 { 681 <h2 class="accordion__heading footer__heading"> 682 <button id="accordion__trigger_info" type="button" class="accordion__trigger" aria-expanded="false" aria-controls="accordion__content_info"> 683 @Model.Area.Item.GetString("ColumnLabel1") 684 <span class="accordion__chevron" aria-hidden="true"> 685 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25.469 14.143"><path d="M12.733 14.137l-.006.006L0 1.416 1.414 0l11.321 11.319L24.053 0l1.416 1.416L12.74 14.143z"/></svg> 686 </span> 687 </button> 688 </h2> 689 }else{ 690 <span class="accordion__heading footer__heading"> 691 <button id="accordion__trigger_info" type="button" class="accordion__trigger" aria-expanded="false" aria-controls="accordion__content_info"> 692 @Model.Area.Item.GetString("ColumnLabel1") 693 <span class="accordion__chevron" aria-hidden="true"> 694 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25.469 14.143"><path d="M12.733 14.137l-.006.006L0 1.416 1.414 0l11.321 11.319L24.053 0l1.416 1.416L12.74 14.143z"/></svg> 695 </span> 696 </button> 697 </span> 698 } 699 @if (links1 != null) 700 { 701 <div id="accordion__content_info" class="accordion__content" aria-hidden="true" aria-labelledby="accordion__trigger_info"> 702 <ul class="footer__list"> 703 @foreach (var columnLink in links1) 704 { 705 @RenderColumnLink(columnLink) 706 } 707 </ul> 708 </div> 709 } 710 </div> 711 </div> 712 </div> 713 </div> 714 <div class="col col--md-3 footer__col-hours"> 715 <div class="footer__hours"> 716 <div class="footer__accordion" data-module="accordion"> 717 <div class="accordion"> 718 @if (!string.IsNullOrEmpty(CLabel2)) 719 { 720 <h2 class="accordion__heading footer__heading"> 721 <button id="accordion__trigger_hours" type="button" class="accordion__trigger" aria-expanded="false" aria-controls="accordion__content_hours"> 722 @Model.Area.Item.GetString("ColumnLabel2") 723 <span class="accordion__chevron" aria-hidden="true"> 724 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25.469 14.143"><path d="M12.733 14.137l-.006.006L0 1.416 1.414 0l11.321 11.319L24.053 0l1.416 1.416L12.74 14.143z"/></svg> 725 </span> 726 </button> 727 </h2> 728 }else{ 729 730 <span class="accordion__heading footer__heading"> 731 <button id="accordion__trigger_hours" type="button" class="accordion__trigger" aria-expanded="false" aria-controls="accordion__content_hours"> 732 @Model.Area.Item.GetString("ColumnLabel2") 733 <span class="accordion__chevron" aria-hidden="true"> 734 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25.469 14.143"><path d="M12.733 14.137l-.006.006L0 1.416 1.414 0l11.321 11.319L24.053 0l1.416 1.416L12.74 14.143z"/></svg> 735 </span> 736 </button> 737 </span> 738 } 739 @if (links2 != null) 740 { 741 742 <div id="accordion__content_hours" class="accordion__content" aria-hidden="true" aria-labelledby="accordion__trigger_hours"> 743 <ul class="footer__list"> 744 @foreach (var columnLink in links2) 745 { 746 @RenderColumnLink(columnLink) 747 } 748 </ul> 749 </div> 750 } 751 </div> 752 </div> 753 <div class="footer__contact-mobile"> 754 <div class="footer__contact"> 755 <a href="tel:+45@(Model.Area.Item.GetString("Phonenumber"))" title="@Model.Area.Item.GetString("PhoneLabel")" class="footer__contact-link"> 756 <span class="footer__contact-svg"> 757 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26.054 26"><path d="M4.991 26a2.743 2.743 0 0 1-2.025-.844L.554 22.75a1.87 1.87 0 0 1-.548-1.45 1.263 1.263 0 0 1 .548-.958l4.824-3.609a2.4 2.4 0 0 1 1.32-.457 1.5 1.5 0 0 1 1.092.457l1.427 1.423a48.044 48.044 0 0 0 5.207-4.43 41.4 41.4 0 0 0 3.889-4.542l-1.476-1.469a1.8 1.8 0 0 1 0-2.406L20.455.5a1.71 1.71 0 0 1 2.412 0l2.413 2.4c1.289 1.286.723 2.836.067 4.629l-.067.183a57.34 57.34 0 0 1-7.605 9.913 51.92 51.92 0 0 1-9.883 7.528A6.261 6.261 0 0 1 4.991 26zm1.447-7.805a1.529 1.529 0 0 0-.84.291l-3.07 2.3c-.53.446-.227 1.15 0 1.531l1.535 1.531a2.019 2.019 0 0 0 1.305.324 2.928 2.928 0 0 0 1.217-.214c.072-.045 7.233-4.553 10.252-7.818a50.434 50.434 0 0 0 7.236-9.622c.3-.588.512-1.932-.109-2.515l-1.535-1.536a1.2 1.2 0 0 0-.827-.373.866.866 0 0 0-.708.373l-1.11 1.476-1.193 1.585a1.148 1.148 0 0 0 0 1.531l1.938 1.932c-3.4 5.511-9.1 9.743-11.4 11.307l-.107.074-1.889-1.886a.954.954 0 0 0-.695-.291z"/></svg> 758 </span> 759 @Model.Area.Item.GetString("Phonenumber") 760 </a> 761 <span> 762 @Model.Area.Item.GetString("PhonenumberLabel") 763 </span> 764 </div> 765 <div class="footer__contact"> 766 <a href="@contactValue" title="@Model.Area.Item.GetString("EmailLabel")" class="footer__contact-link"> 767 <span class="footer__contact-svg"> 768 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 21.125"><path d="M22.75 21.125H3.25A3.25 3.25 0 0 1 0 17.875V3.25A3.25 3.25 0 0 1 3.25 0h19.5A3.25 3.25 0 0 1 26 3.25v14.625a3.25 3.25 0 0 1-3.25 3.25zM4.062 1.625L13 9.395l8.938-7.77zM24.375 3.25a1.616 1.616 0 0 0-.516-1.182L13 11.375 2.141 2.068a1.616 1.616 0 0 0-.516 1.182v14.625A1.625 1.625 0 0 0 3.25 19.5h19.5a1.625 1.625 0 0 0 1.625-1.625z"/></svg> 769 </span> 770 @Model.Area.Item.GetString("EmailLabel") 771 </a> 772 <span> 773 @Model.Area.Item.GetString("EmailLabel_2") 774 </span> 775 </div> 776 </div> 777 </div> 778 </div> 779 <div class="col col--md-3 footer__col-last"> 780 <div class="footer__shortcuts"> 781 @if (!string.IsNullOrEmpty(CLabel3)) 782 { 783 <h2 class="footer__heading"> 784 @Model.Area.Item.GetString("ColumnLabel3") 785 </h2> 786 } 787 788 @if (links3 != null) 789 { 790 <ul class="footer__list"> 791 @foreach (var columnLink in links3) 792 { 793 @RenderColumnLink(columnLink) 794 } 795 </ul> 796 } 797 </div> 798 <div class="footer__social"> 799 <div class="footer__social-text"> 800 @Translate("MeetEsbjergSoMe", "Mød Esbjerg på de sociale medier") 801 </div> 802 <div class="footer__social-links"> 803 @if (!string.IsNullOrEmpty(footerFacebook)) 804 { 805 string facebookLink = redirectPage + footerFacebook; 806 <a href="@facebookLink" title="link til Facebook" class="footer__social-link" target="_blank" rel="noopener noreferrer"> 807 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12.945 24.181"><path d="M8.32 24.181H3.698V12.944h-3.7V8.322h3.7V6.047a6.294 6.294 0 0 1 1.635-4.269A5.028 5.028 0 0 1 9.245.001h3.7v4.552h-3.7a.867.867 0 0 0-.64.426 1.624 1.624 0 0 0-.286 1v2.348h4.625v4.622H8.319v11.236z"/></svg> 808 </a> 809 } 810 @if (!string.IsNullOrEmpty(footerTwitter)) 811 { 812 string twitterLink = redirectPage + footerTwitter; 813 <a href="@twitterLink" title="Link til Twitter" class="footer__social-link" target="_blank" rel="noopener noreferrer"> 814 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24.064 19.692"><path d="M7.56 19.693a13.155 13.155 0 0 1-4.023-.623 13.892 13.892 0 0 1-3.536-1.665H1.18a9.521 9.521 0 0 0 6.1-2.08 5.335 5.335 0 0 1-2.915-1.041 4.5 4.5 0 0 1-1.662-2.427l.114.023.068.015h.01a3.54 3.54 0 0 0 .638.1 2.887 2.887 0 0 0 .764-.068h.013a1.869 1.869 0 0 0 .611-.07 5.156 5.156 0 0 1-2.774-1.732 4.637 4.637 0 0 1-1.109-3.121v-.07a4.561 4.561 0 0 0 2.218.556 4.392 4.392 0 0 1-2.15-4.091 5.157 5.157 0 0 1 .624-2.5 14.11 14.11 0 0 0 4.438 3.674 12.9 12.9 0 0 0 5.688 1.524 18.723 18.723 0 0 0-.054-.353v-.01a5.178 5.178 0 0 1-.085-.747 4.833 4.833 0 0 1 1.456-3.535 4.765 4.765 0 0 1 3.468-1.456 4.719 4.719 0 0 1 2.012.415 4.249 4.249 0 0 1 1.526 1.179 7.016 7.016 0 0 0 1.724-.482h.009c.256-.108.536-.239.782-.355s.505-.235.744-.338a6.826 6.826 0 0 1-.9 1.525 5.4 5.4 0 0 1-1.319 1.18l.057-.008a10.711 10.711 0 0 0 1.4-.269 11.514 11.514 0 0 0 1.388-.485c-.349.487-.7.906-1.037 1.311a7.775 7.775 0 0 1-1.386 1.25v.623a14.166 14.166 0 0 1-.9 4.992 14.216 14.216 0 0 1-2.7 4.509 13.291 13.291 0 0 1-4.438 3.327 12.782 12.782 0 0 1-6.043 1.323z"/></svg> 815 </a> 816 } 817 @if (!string.IsNullOrEmpty(footerLinkedIn)) 818 { 819 string linkedInLink = redirectPage + footerLinkedIn; 820 <a href="@linkedInLink" title="Link til LinkedIn" class="footer__social-link" target="_blank" rel="noopener noreferrer"> 821 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20.129 22.404"><path d="M11.451 22.404H7.112V7.113h4.409v.71a5.1 5.1 0 0 1 2.433-.58c.146 0 .284 0 .411.014a6.95 6.95 0 0 1 2.846.709 6.335 6.335 0 0 1 2.134 2.205 6.226 6.226 0 0 1 .782 2.917v9.315h-4.339v-9.316a1.562 1.562 0 0 0-.215-.71l-.059-.079v-.006c-.182-.244-.313-.422-.5-.484a2.347 2.347 0 0 0-1.054-.3 1.219 1.219 0 0 0-.227.019 5.229 5.229 0 0 0-1.139.286 4.014 4.014 0 0 0-1.136.782v9.813zm-6.543 0H.497V7.113h4.411v15.29zM2.701 5.478a2.623 2.623 0 0 1-1.919-.782A2.623 2.623 0 0 1 0 2.774 2.923 2.923 0 0 1 .782.783 2.613 2.613 0 0 1 2.701.001a2.616 2.616 0 0 1 1.921.782 2.923 2.923 0 0 1 .782 1.991 2.623 2.623 0 0 1-.782 1.922 2.625 2.625 0 0 1-1.921.781z"/></svg> 822 </a> 823 } 824 @if (!string.IsNullOrEmpty(footerInstagram)) 825 { 826 string instagramLink = redirectPage + footerInstagram; 827 <a href="@instagramLink" title="Link til Instagram" class="footer__social-link" target="_blank" rel="noopener noreferrer"> 828 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.991 19.988"><path d="M9.992 1.8c2.669 0 2.983.012 4.038.059a5.453 5.453 0 0 1 1.856.345 3.1 3.1 0 0 1 1.15.746 3.053 3.053 0 0 1 .746 1.15 5.555 5.555 0 0 1 .345 1.856c.048 1.055.059 1.368.059 4.038s-.012 2.983-.059 4.038a5.453 5.453 0 0 1-.345 1.856 3.1 3.1 0 0 1-.746 1.15 3.053 3.053 0 0 1-1.15.746 5.555 5.555 0 0 1-1.856.345c-1.055.048-1.368.059-4.038.059s-2.983-.012-4.038-.059a5.453 5.453 0 0 1-1.854-.343 3.1 3.1 0 0 1-1.15-.746 3.053 3.053 0 0 1-.75-1.15 5.555 5.555 0 0 1-.345-1.856C1.809 12.979 1.8 12.665 1.8 10s.012-2.983.059-4.038A5.453 5.453 0 0 1 2.2 4.1a3.1 3.1 0 0 1 .746-1.15A3.053 3.053 0 0 1 4.1 2.205a5.555 5.555 0 0 1 1.856-.345c1.055-.052 1.368-.059 4.038-.059m0-1.8C7.281.001 6.94.013 5.873.06a7.324 7.324 0 0 0-2.424.464 4.87 4.87 0 0 0-1.771 1.154A4.956 4.956 0 0 0 .524 3.447 7.329 7.329 0 0 0 .06 5.875C.012 6.938.001 7.275.001 9.992s.012 3.054.059 4.121a7.372 7.372 0 0 0 .464 2.428 4.87 4.87 0 0 0 1.154 1.769 4.956 4.956 0 0 0 1.769 1.154 7.329 7.329 0 0 0 2.428.464c1.067.048 1.4.059 4.121.059s3.054-.012 4.121-.059a7.372 7.372 0 0 0 2.428-.464 4.87 4.87 0 0 0 1.769-1.154 4.956 4.956 0 0 0 1.154-1.769 7.329 7.329 0 0 0 .464-2.428c.048-1.067.059-1.4.059-4.121s-.012-3.054-.059-4.121a7.372 7.372 0 0 0-.464-2.428 4.87 4.87 0 0 0-1.154-1.769A4.956 4.956 0 0 0 16.545.52a7.329 7.329 0 0 0-2.428-.464C13.046.012 12.7 0 9.992 0z"/><path d="M9.992 4.859a5.133 5.133 0 1 0 5.133 5.133 5.134 5.134 0 0 0-5.133-5.133zm0 8.465a3.332 3.332 0 1 1 3.332-3.332 3.331 3.331 0 0 1-3.332 3.332z"/><circle class="a" cx="1.198" cy="1.198" r="1.198" transform="translate(14.129 3.459)"/></svg> 829 </a> 830 } 831 </div> 832 </div> 833 </div> 834 </div> 835 </div> 836 </div> 837 </footer> 838 839 @helper RenderColumnLink(ItemViewModel columnLink) 840 { 841 var linkType = columnLink.GetList("LinkType").SelectedValue; 842 var linkTarget = columnLink.GetList("LinkTarget").SelectedValue; 843 var linkText = columnLink.GetString("LinkText"); 844 var link = linkType == "external" ? columnLink.GetString("LinkExternal") : columnLink.GetString("LinkInternal"); 845 846 <li> 847 <a href="@link" title="Link til @linkText" target="@linkTarget" class="footer__link">@linkText</a> 848 </li> 849 } 850 851 <div class="cookie-wrapper hard-load"> 852 @using Esbjerg.Logic; 853 @using Dynamicweb.Content.Items; 854 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 855 856 @{ 857 var breakingNewsId = Model.Area.Item.GetValue("BreakingNewsPage"); 858 859 if (breakingNewsId != null) 860 { 861 if(!string.IsNullOrEmpty(breakingNewsId.ToString())) 862 { 863 Item item = Helpers.GetBreakingNewsItem(Convert.ToInt32(breakingNewsId)); 864 865 if (item != null) 866 { 867 var link1 = item["Link_1"]; 868 var link2 = item["Link_2"]; 869 870 var facebook = item["FacebookLink"]; 871 var email = item["Email"]; 872 var emailSubject = item["Subject"]; 873 var emailBody = item["Body"]; 874 var smsNumber = item["PhoneNumber"]; 875 var smsBody = item["SMSText"]; 876 877 <div id="@item.Id" class="alert-banner alert-banner--accepted"> 878 <div class="grid grid-container"> 879 <div class="row"> 880 <div class="col col--sm-7 col--md-8 col--xl-9"> 881 <div class="alert-banner__rich-text"> 882 <h3> 883 @item["Headline"] 884 </h3> 885 <p> 886 @item["Text"] 887 </p> 888 </div> 889 </div> 890 <div class="col col--sm-5 col--md-4 col--xl-3"> 891 <div class="alert-banner__link-wrapper"> 892 <div class="alert-banner__contact-links"> 893 @{ 894 if (facebook != null && !string.IsNullOrEmpty(facebook.ToString())) 895 { 896 <a href="@facebook.ToString()" title="Alert link" class="alert-banner__contact-link"> 897 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12.945 24.181"><path d="M8.32 24.181H3.698V12.944h-3.7V8.322h3.7V6.047a6.294 6.294 0 0 1 1.635-4.269A5.028 5.028 0 0 1 9.245.001h3.7v4.552h-3.7a.867.867 0 0 0-.64.426 1.624 1.624 0 0 0-.286 1v2.348h4.625v4.622H8.319v11.236z"/></svg> 898 </a> 899 } 900 if (email != null && !string.IsNullOrEmpty(email.ToString())) 901 { 902 903 <a href="mailto:@email.ToString()?subject=@(emailSubject != null ? emailSubject.ToString() : string.Empty) &body=@(emailBody != null ? emailBody.ToString() : string.Empty) " title="Alert link" class="alert-banner__contact-link"> 904 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 21.125"><path d="M22.75 21.125H3.25A3.25 3.25 0 0 1 0 17.875V3.25A3.25 3.25 0 0 1 3.25 0h19.5A3.25 3.25 0 0 1 26 3.25v14.625a3.25 3.25 0 0 1-3.25 3.25zM4.062 1.625L13 9.395l8.938-7.77zM24.375 3.25a1.616 1.616 0 0 0-.516-1.182L13 11.375 2.141 2.068a1.616 1.616 0 0 0-.516 1.182v14.625A1.625 1.625 0 0 0 3.25 19.5h19.5a1.625 1.625 0 0 0 1.625-1.625z"/></svg> 905 </a> 906 } 907 if (smsNumber != null && !string.IsNullOrEmpty(smsNumber.ToString())) 908 { 909 <a href="sms:@smsNumber.ToString()?&body=@(smsBody != null ? smsBody.ToString() : string.Empty)" title="Alert link" class="alert-banner__contact-link alert-banner__contact-links--sms"> 910 <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><g fill="#d53f53"><path d="M10.624 15.81a2.03 2.03 0 0 1-.766 1.681 3.325 3.325 0 0 1-2.13.612 5 5 0 0 1-2.228-.477v-1.547a9.163 9.163 0 0 0 1.345.5 3.981 3.981 0 0 0 1.007.145 1.432 1.432 0 0 0 .841-.209.716.716 0 0 0 .298-.624.688.688 0 0 0-.129-.411 1.442 1.442 0 0 0-.379-.346 9.739 9.739 0 0 0-1.018-.532 4.824 4.824 0 0 1-1.08-.65 2.44 2.44 0 0 1-.575-.725 2.069 2.069 0 0 1-.21-.967 2.029 2.029 0 0 1 .7-1.638 2.935 2.935 0 0 1 1.952-.6 4.61 4.61 0 0 1 1.168.145 8.03 8.03 0 0 1 1.163.408l-.534 1.298a7.858 7.858 0 0 0-1.039-.36 3.345 3.345 0 0 0-.808-.1 1.07 1.07 0 0 0-.725.22.726.726 0 0 0-.252.575.711.711 0 0 0 .1.384 1.122 1.122 0 0 0 .325.317 10.047 10.047 0 0 0 1.055.551 4.2 4.2 0 0 1 1.51 1.053 2.06 2.06 0 0 1 .409 1.297zm4.748 2.181l-1.891-6.161h-.048q.1 1.88.1 2.508v3.653h-1.486v-7.853h2.266l1.858 6h.029l1.971-6h2.267v7.853H18.89v-3.717q0-.263.008-.607t.072-1.826h-.048l-2.022 6.15zm11.682-2.181a2.03 2.03 0 0 1-.765 1.676 3.325 3.325 0 0 1-2.13.612 5 5 0 0 1-2.224-.473v-1.546a9.163 9.163 0 0 0 1.345.5 3.981 3.981 0 0 0 1.007.145 1.432 1.432 0 0 0 .841-.209.716.716 0 0 0 .293-.623.688.688 0 0 0-.129-.411 1.442 1.442 0 0 0-.379-.346 9.739 9.739 0 0 0-1.013-.533 4.824 4.824 0 0 1-1.08-.65 2.44 2.44 0 0 1-.575-.725 2.069 2.069 0 0 1-.215-.967 2.029 2.029 0 0 1 .706-1.638 2.935 2.935 0 0 1 1.952-.6 4.61 4.61 0 0 1 1.168.145 8.03 8.03 0 0 1 1.163.408l-.537 1.294a7.858 7.858 0 0 0-1.039-.36 3.345 3.345 0 0 0-.808-.1 1.07 1.07 0 0 0-.725.22.726.726 0 0 0-.252.575.711.711 0 0 0 .1.384 1.122 1.122 0 0 0 .325.317 10.047 10.047 0 0 0 1.055.551 4.2 4.2 0 0 1 1.509 1.055 2.06 2.06 0 0 1 .407 1.299z"/><path d="M16 28a18.276 18.276 0 0 1-2.991-.253L6 32v-7.081A13.4 13.4 0 0 1 0 14C0 6.268 7.163 0 16 0s16 6.268 16 14-7.163 14-16 14zm0-26C8.268 2 2 7.373 2 14a11.591 11.591 0 0 0 5.975 9.824l-.063 4.638 4.707-2.829A16.2 16.2 0 0 0 16 26c7.732 0 14-5.372 14-12S23.732 2 16 2z"/></g></svg> 911 </a> 912 } 913 } 914 </div> 915 @if (link1 != null) 916 { 917 Item linkItem = Helpers.GetItemByItemId("LinkItem", link1.ToString()); 918 if (linkItem["Link"] != null) 919 { 920 string link = linkItem["Link"].ToString(); 921 if (!string.IsNullOrEmpty(link)) 922 { 923 <a href="@link" class="alert-banner__link"> 924 925 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 926 <span class="arrow"> 927 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40.62 16"><path d="M40.62 8l-8 8-.89-.89L38.84 8 31.73.89l.89-.89 8 8z"/><path class="spine" d="M0 7.5h40v1H0z"/></svg> 928 </span> 929 930 <span>@linkItem["Label"].ToString()</span> 931 </a> 932 } 933 } 934 } 935 @if (link2 != null) 936 { 937 Item linkItem = Helpers.GetItemByItemId("LinkItem", link2.ToString()); 938 if (linkItem["Link"] != null) 939 { 940 string link = linkItem["Link"].ToString(); 941 if (!string.IsNullOrEmpty(link)) 942 { 943 <a href="@link" class="alert-banner__link"> 944 945 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 946 <span class="arrow"> 947 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40.62 16"><path d="M40.62 8l-8 8-.89-.89L38.84 8 31.73.89l.89-.89 8 8z"/><path class="spine" d="M0 7.5h40v1H0z"/></svg> 948 </span> 949 950 <span>@linkItem["Label"].ToString()</span> 951 </a> 952 } 953 } 954 } 955 956 </div> 957 <button type="button" class="alert-banner__close-btn"> 958 <span class="alert-banner__close-icon"> 959 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.801 19.798"><path d="M9.9 11.314l-8.485 8.485-1.416-1.414 8.487-8.486L.002 1.414 1.416 0 9.9 8.485 18.384 0 19.8 1.414l-8.485 8.485 8.485 8.485-1.416 1.414z"/></svg> 960 </span> 961 <span class="alert-banner__close-text"> 962 Luk 963 </span> 964 </button> 965 </div> 966 </div> 967 </div> 968 </div> 969 } 970 } 971 } 972 973 } 974 975 976 977 <!-- <div class="cookie cookie--accepted"> 978 <div class="grid grid-container"> 979 <div class="row"> 980 <div class="col col--sm-8 col--md-9"> 981 <div class="cookie__text"> 982 @Model.Area.Item.GetField("CookieWarning").GetValue() 983 </div> 984 </div> 985 <div class="col col--sm-4 col--md-3"> 986 <button type="button" class="cookie__accept-btn text--link svg-fill--link"> 987 988 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 989 <span class="arrow"> 990 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40.62 16"><path d="M40.62 8l-8 8-.89-.89L38.84 8 31.73.89l.89-.89 8 8z"/><path class="spine" d="M0 7.5h40v1H0z"/></svg> 991 </span> 992 993 <span>@Translate("OkAccept", "Ok, jeg accepterer")</span> 994 </button> 995 </div> 996 </div> 997 </div> 998 </div> --> 999 </div> 1000 1001 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 1002 @using System.Web; 1003 1004 @{ 1005 var host = HttpContext.Current.Request.Url.Host.StartsWith("local.") ? "subsite-esbjerg.dis-play.dk" : HttpContext.Current.Request.Url.Host; 1006 1007 string jsPath = "/Files/Templates/Designs/" + Pageview.Layout.Design.Name; 1008 string searchPath = Model.Area.Item.GetString("SearchResultPage"); 1009 string cludoEngineID = Model.Area.Item.GetString("CludoEngineID").ToString(); 1010 1011 if (!string.IsNullOrEmpty(searchPath)) 1012 { 1013 searchPath = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("Default.aspx?Id=" + searchPath); 1014 } 1015 1016 if (string.IsNullOrEmpty(cludoEngineID)) 1017 { 1018 cludoEngineID = "11424"; 1019 } 1020 1021 1022 } 1023 1024 <script> 1025 @*var scriptLoaderSettings = { 1026 mainScriptSrc: [ 1027 '@jsPath/static/dist/js/@Esbjerg.Logic.Helpers.CacheBuster(jsPath + "/static/dist/js/", "main.min.js")' 1028 ], 1029 polyfillFallback: '@jsPath/static/dist/js/polyfillFallback.js', 1030 polyfills: 'default-3.6,fetch,Object.values,Array.prototype.findIndex' 1031 }; 1032 1033 var loadMainScript = function () { function a(a) { var b = document.createElement("script"); b.defer = !0, b.async = !!0, b.src = a, document.body.appendChild(b) } if ("object" == typeof scriptLoaderSettings.mainScriptSrc) for (var b = 0; b < scriptLoaderSettings.mainScriptSrc.length; b++)a(scriptLoaderSettings.mainScriptSrc[b]); else a(scriptLoaderSettings.mainScriptSrc) }; 1034 !function (e, t) { var r, a = [/^(.+)(\[.+MessengerForiOS.+\][ ]*)/, /^(.+)(\[.+FBIOS.+\][ ]*)/, /^(.+)( Twitter for iPhone)/]; for (r = 0; r < a.length; ++r) { var n = a[r], i = e.match(n); if (i) { t = t + "&ua=" + encodeURIComponent(i[1] + " Safari"); break } } var o = document.createElement("script"); o.addEventListener("error", function () { var e = document.createElement("script"); e.src = scriptLoaderSettings.polyfillFallback, document.body.appendChild(e) }),o.defer=true, o.src = t, document.body.appendChild(o) }(navigator.userAgent, "https://cdn.polyfill.io/v2/polyfill.min.js?features=" + scriptLoaderSettings.polyfills + "&callback=loadMainScript");*@ 1035 1036 /*! loadCSS rel=preload polyfill. [c]2017 Filament Group, Inc. MIT License - https://github.com/filamentgroup/loadCSS */ 1037 !function (t) { "use strict"; t.loadCSS || (t.loadCSS = function () { }); var e = loadCSS.relpreload = {}; if (e.support = function () { var e; try { e = t.document.createElement("link").relList.supports("preload") } catch (t) { e = !1 } return function () { return e } }(), e.bindMediaToggle = function (t) { function e() { t.media = a } var a = t.media || "all"; t.addEventListener ? t.addEventListener("load", e) : t.attachEvent && t.attachEvent("onload", e), setTimeout(function () { t.rel = "stylesheet", t.media = "only x" }), setTimeout(e, 3e3) }, e.poly = function () { if (!e.support()) for (var a = t.document.getElementsByTagName("link"), n = 0; n < a.length; n++) { var o = a[n]; "preload" !== o.rel || "style" !== o.getAttribute("as") || o.getAttribute("data-loadcss") || (o.setAttribute("data-loadcss", !0), e.bindMediaToggle(o)) } }, !e.support()) { e.poly(); var a = t.setInterval(e.poly, 500); t.addEventListener ? t.addEventListener("load", function () { e.poly(), t.clearInterval(a) }) : t.attachEvent && t.attachEvent("onload", function () { e.poly(), t.clearInterval(a) }) } "undefined" != typeof exports ? exports.loadCSS = loadCSS : t.loadCSS = loadCSS }("undefined" != typeof global ? global : this); 1038 1039 // Enable this to register a service worker. Please make sure you understand the implications of doing so. 1040 // if ("serviceWorker" in navigator) { navigator.serviceWorker.register("/sw.js", { scope: '/' }); } 1041 </script> 1042 1043 <script src='@jsPath/static/dist/js/main.min.js' type="text/javascript"></script> 1044 @*<script src='https://cdn.polyfill.io/v2/polyfill.js?features=default-3.6,fetch,Object.values,Array.prototype.findIndex' type="text/javascript"></script>*@ 1045 @*<script src='@jsPath/static/dist/js/polyfillFallback.js' type="text/javascript"></script>*@ 1046 1047 <!--SiteImprove script--> 1048 <script type="text/javascript"> 1049 /*<![CDATA[*/ 1050 (function () { 1051 var sz = document.createElement('script'); sz.type = 'text/javascript'; sz.async = true; 1052 sz.src = '//siteimproveanalytics.com/js/siteanalyze_273521.js'; 1053 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(sz, s); 1054 })(); 1055 /*]]>*/ 1056 </script> 1057 <!--Minimap--> 1058 @RenderSnippet("Minimap") 1059 1060 <!--Kode - Footer section--> 1061 @RenderSnippet("KodeFooter") 1062 1063 1064 <!-- SCRIPT --> 1065 <!-- www.Cludo.com search start JS --> 1066 <!--[if lte IE 9]> 1067 <script src="https://api.cludo.com/scripts/xdomain.js" slave="https://api.cludo.com/proxy.html"></script> 1068 <![endif]--> 1069 <!-- www.Cludo.com search end JS --> 1070 <!-- www.Cludo.com Search body init script start --> 1071 1072 <script type="text/javascript" src="https://customer.cludo.com/scripts/bundles/search-script.min.js"></script> 1073 1074 <script> 1075 var CludoSearch; 1076 (function () { 1077 var cludoSettings = { 1078 customerId: 80, 1079 engineId: @cludoEngineID, 1080 searchUrl: "@searchPath", 1081 language: "@Dynamicweb.Services.Areas.GetArea(Model.Area.ID).CultureInfo.TwoLetterISOLanguageName", 1082 customerTemplate: "Mainsite Redesign v2023", 1083 filters: { "DomainName": ["https://@host/"] }, 1084 searchInputs: ["cludo-search-form", "search-box-form"], 1085 initSearchBoxText: "", 1086 loading: "<img src='//customer.cludo.com/img/loading.gif' alt='Loading' class='loading' role='progressbar' />", 1087 customCallbackAfterSearch: function () { 1088 window.cludoCallback(); 1089 } 1090 //bannerIsInSearchTemplate: false, 1091 //endlessScroll: {stopAfterPage:3, resultsPerPage:10, bottomOffset: 700}, 1092 //richAutocomplete: true 1093 }; 1094 CludoSearch = new Cludo(cludoSettings); 1095 CludoSearch.init(); 1096 })(); 1097 </script> 1098 1099 1100 1101 <!--Footer scripts from website settings subsites--> 1102 @{string scriptFooterArea = Model.Area.Item.GetString("ScriptFooterArea"); } 1103 @if (!string.IsNullOrEmpty(scriptFooterArea)){ 1104 @scriptFooterArea 1105 } 1106 </body> 1107 </html> 1108 1109 @functions { 1110 1111 private string GetThemeTextColor(string hex) 1112 { 1113 const string white = "#fff"; 1114 const string black = "#000"; 1115 1116 var color = white; 1117 1118 switch (hex.ToLower()) 1119 { 1120 case ThemeColors.Cornflower: 1121 color = black; 1122 break; 1123 case ThemeColors.Surf: 1124 color = black; 1125 break; 1126 case ThemeColors.BeautyBush: 1127 color = black; 1128 break; 1129 case ThemeColors.Cerulean: 1130 color = black; 1131 break; 1132 case ThemeColors.Cinnabar: 1133 color = black; 1134 break; 1135 } 1136 1137 return color; 1138 } 1139 1140 private string GetContrastColor(string hex) 1141 { 1142 var color = hex; 1143 1144 switch (hex.ToLower()) 1145 { 1146 case ThemeColors.DeepSapphire: 1147 color = "020305"; 1148 break; 1149 case ThemeColors.RegalBlue: 1150 color = "013150"; 1151 break; 1152 case ThemeColors.DoveGray: 1153 color = "505050"; 1154 break; 1155 case ThemeColors.Valencia: 1156 color = "b23646"; 1157 break; 1158 case ThemeColors.Cornflower: 1159 color = "8bbbd5"; 1160 break; 1161 case ThemeColors.Surf: 1162 color = "c3beb6"; 1163 break; 1164 case ThemeColors.BeautyBush: 1165 color = "e0e0e0"; 1166 break; 1167 case ThemeColors.Cerulean: 1168 color = "0079a8"; 1169 break; 1170 case ThemeColors.Cinnabar: 1171 color = "de3517"; 1172 break; 1173 } 1174 1175 return color; 1176 } 1177 1178 private string GetLinkColor(string hex) 1179 { 1180 var color = hex; 1181 1182 switch (hex.ToLower()) 1183 { 1184 case ThemeColors.DeepSapphire: 1185 color = "1d293b"; 1186 break; 1187 case ThemeColors.Cornflower: 1188 color = "085077"; 1189 break; 1190 case ThemeColors.Surf: 1191 color = "555555"; 1192 break; 1193 case ThemeColors.BeautyBush: 1194 color = "555555"; 1195 break; 1196 case ThemeColors.Cerulean: 1197 color = "0079a8"; 1198 break; 1199 case ThemeColors.Cinnabar: 1200 color = "de3517"; 1201 break; 1202 } 1203 1204 return color; 1205 } 1206 1207 private struct ThemeColors 1208 { 1209 public const string DeepSapphire = "0a2e68"; 1210 public const string RegalBlue = "004069"; 1211 public const string DoveGray = "666666"; 1212 public const string Valencia = "d53f53"; 1213 public const string Cornflower = "88bfe8"; 1214 public const string Surf = "b1d8b9"; 1215 public const string BeautyBush = "edc3c4"; 1216 public const string Cerulean = "009bd9"; 1217 public const string Cinnabar = "eb573d"; 1218 } 1219 }