Error executing template "Designs/VF2019/_parsed/Page.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_0105a7649e614d17817d651bf2ca18cd.Execute() in D:\home\site\wwwroot\Files\Templates\Designs\VF2019\_parsed\Page.parsed.cshtml:line 421
   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 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 2 @using System.IO 3 @using System.Web.UI 4 @using System 5 @Title("Standard Page") 6 @Description("Template for a standard page") 7 @{ 8 string openGraphDomain = "https://" + Dynamicweb.Context.Current.Request.Url.Host; 9 string openGraphUrl = Model.Item.GetString("OgUrl"); 10 string openGraphTitle = !string.IsNullOrWhiteSpace(Model.Item.GetString("OgTitle")) ? Model.Item.GetString("OgTitle") : Model.Name; 11 string openGraphType = !string.IsNullOrWhiteSpace(Model.Item.GetString("OgType")) ? Model.Item.GetString("OgType") : "website"; 12 string openGraphDescription = !string.IsNullOrWhiteSpace(Model.Item.GetString("OgDescription")) ? Model.Item.GetString("OgDescription") : Model.Description; 13 string openGraphImage = Model.Item.GetString("OgImage"); 14 int openGraphImageWidth = Model.Item.GetInt32("OgImageWidth") >= 200 ? Model.Item.GetInt32("OgImageWidth") : 200; 15 int openGraphImageHeight = Model.Item.GetInt32("OgImageHeight") >= 200 ? Model.Item.GetInt32("OgImageHeight") : 200; 16 string facebookPageLink = Model.Area.Item.GetString("SoMeFacebook"); 17 string facebookAppId = Model.Area.Item.GetString("SoMeFacebookAppID"); 18 19 string designBasePath = Pageview.Layout.File.Location; 20 string assetsBasePath = designBasePath + "Assets/"; 21 string bodyClass = Model.Area.FirstActivePage.ID == Model.ID ? "index" : "page"; 22 23 string alertHeadline = Model.Area.Item.GetString("AlertHeadline"); 24 string alertText = Model.Area.Item.GetString("AlertText"); 25 bool alertShown = Model.Area.Item.GetBoolean("AlertShown"); 26 27 //Leaving bootstrap out as it seems to cause an issue 28 List<string> resourceFiles = new List<string>() { 29 assetsBasePath + "jquery/jquery.slim.min.js", 30 assetsBasePath + "popper.js/umd/popper.min.js", 31 assetsBasePath + "twitter-bootstrap/js/bootstrap.min.js", 32 assetsBasePath + "font-awesome/js/all.min.js", 33 designBasePath + "js/script.js", 34 assetsBasePath + "font-awesome/css/all.min.css", 35 assetsBasePath + "cookieconsent/cookieconsent.min.css", 36 assetsBasePath + "cookieconsent/cookieconsent.min.js", 37 designBasePath + "css/style.min.css", 38 assetsBasePath + "jquery-validate/jquery.validate.min.js", 39 assetsBasePath + "jquery-validate/localization/messages_da.min.js" 40 }; 41 42 string resourceHtml = string.Empty; 43 Dynamicweb.Controls.ControlResources resources = null; 44 45 foreach (var i in resourceFiles) { 46 Dynamicweb.Controls.ControlResources.AddResourceFile(i); 47 } 48 using (StringWriter sw = new StringWriter()) { 49 using (HtmlTextWriter writer = new HtmlTextWriter(sw)) { 50 resources = new Dynamicweb.Controls.ControlResources(); 51 resources.IncludeUIStylesheet = false; 52 resources.CombineOutput = true; 53 resources.IncludeUtilities = false; 54 resources.RenderControl(writer); 55 } 56 resourceHtml = sw.ToString().Insert(sw.ToString().IndexOf("type"), "async "); 57 resourceHtml = resourceHtml.Insert(resourceHtml.IndexOf("rel"), "async "); 58 } 59 60 61 //PushPromise(assetsBasePath + "twitter-bootstrap/css/bootstrap.min.css"); 62 //PushPromise(resourceHtml.Substring(resourceHtml.IndexOf("/Admin"), 95)); 63 //PushPromise(resourceHtml.Substring(resourceHtml.LastIndexOf("/Admin"), 95)); 64 //PushPromise(assetsBasePath + "fontawesome/webfonts/fa-brands-400.woff2"); 65 //PushPromise(assetsBasePath + "Assets/fontawesome/webfonts/fa-solid-900.woff2"); 66 67 Dictionary<string, List<int>> favIcons = new Dictionary<string, List<int>>() { 68 {"apple-touch-icon", new List<int>(){57,60,72,76,114,120,144,152,180 } }, 69 {"icon", new List<int>(){192,32,96,16 } } 70 }; 71 string userAgent = Dynamicweb.Context.Current.Request.UserAgent.ToLower(); 72 string userDevice = Dynamicweb.Frontend.Devices.DeviceInfo.ParseFromUserAgentString(userAgent).DeviceType.ToString(); 73 } 74 @helper iconLink(int size, string rel, string basePath) { 75 string iconfileurl = basePath + "logo.png"; 76 string iconLink = "/Admin/Public/GetImage.ashx?Image=" + iconfileurl + "&Format=png&Width=" + size + "&Height=" + size + "&Crop=6&DoNotUpscale=1"; 77 <link rel="@rel" type="image/png" sizes="@(size)x@(size)" href="@iconLink"> 78 } 79 <!DOCTYPE html> 80 <html lang="@Pageview.Area.CultureInfo.TwoLetterISOLanguageName"> 81 <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# @openGraphType: http://ogp.me/ns/@(openGraphType)#"> 82 <meta charset="utf-8"> 83 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 84 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> 85 <meta name="description" content="@Model.Description" /> 86 <meta name="keywords" content="@Model.Keywords" /> 87 <meta name="format-detection" content="telephone=no"> 88 @Model.MetaTags 89 <title>@Model.Name</title> 90 <!-- OpenGraph --> 91 <meta property="og:url" content="@(openGraphDomain)@Pageview.SearchFriendlyUrl" /> 92 <meta property="og:type" content="@openGraphType" /> 93 @if (!string.IsNullOrWhiteSpace(facebookPageLink)) { 94 <meta property="article:publisher" content="@facebookPageLink" /> 95 } 96 @if (!string.IsNullOrWhiteSpace(facebookAppId)) { 97 <meta property="fb:app_id" content="@facebookAppId" /> 98 } 99 <meta property="og:title" content="@openGraphTitle" /> 100 @if (!string.IsNullOrWhiteSpace(openGraphDescription)) { 101 <meta property="og:description" content="@openGraphDescription" /> 102 } 103 @if (!string.IsNullOrWhiteSpace(openGraphImage)) { 104 Uri uri = new Uri(openGraphDomain + openGraphImage); 105 string listImageUrl = uri.AbsoluteUri; 106 <meta property="og:image" content="@listImageUrl" /> 107 <meta property="og:image:width" content="@openGraphImageWidth" /> 108 <meta property="og:image:height" content="@openGraphImageHeight" /> 109 } 110 <meta property="og:site_name" content='@Model.Area.Name' /> 111 @if (openGraphType == "article") { 112 <meta property="article:published_time" content="@Model.CreatedDate.ToString("yyyy-MM-dd:HH:mm:ss")" /> 113 <meta property="og:updated_time" content="@Model.UpdatedDate.ToString("yyyy-MM-dd:HH:mm:ss")" /> 114 } 115 <!-- CSS & JS--> 116 <link href="@(designBasePath)/Assets/twitter-bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css" async /> 117 @resourceHtml 118 <!--Fav Icon--> 119 @{ 120 string faviconpath = "/Files/Images/Graphics/Fav/"; 121 } 122 @foreach (var i in favIcons) { 123 foreach (int t in i.Value) { 124 @iconLink(t, i.Key, faviconpath) 125 if (i.Key.ToLower().IndexOf("apple") > -1) { 126 if (userAgent.IndexOf("apple") > -1) { 127 //PushPromise("/Admin/Public/GetImage.ashx?Image=" + faviconpath + "logo.png&Format=png&Width=" + t + "&Height=" + t + "&Crop=6&DoNotUpscale=1"); 128 } 129 } else if (userAgent.IndexOf("apple") == -1) { 130 //PushPromise("/Admin/Public/GetImage.ashx?Image=" + faviconpath + "logo.png&Format=png&Width=" + t + "&Height=" + t + "&Crop=6&DoNotUpscale=1"); 131 } 132 } 133 } 134 <link rel="manifest" href="@(faviconpath)site.webmanifest"> 135 <link rel="mask-icon" href="@(faviconpath)safari-pinned-tab.svg" color="#5a976e"> 136 <link rel="shortcut icon" href="@(faviconpath)favicon.ico"> 137 <meta name="msapplication-TileColor" content="#c4007a"> 138 <meta name="msapplication-TileImage" content="/Admin/Public/GetImage.ashx?Image=@(faviconpath)logo.png&Format=png&Width=144&Height=144&Crop=6&DoNotUpscale=1"> 139 <meta name="msapplication-config" content="@(faviconpath)browserconfig.xml"> 140 <meta name="theme-color" content="#c4007a"> 141 <link href="https://fonts.googleapis.com/css?family=Asap:400,700" rel="stylesheet" async media="screen"> 142 @Model.Area.Item.GetString("ScriptsHead") 143 </head> 144 <body class="@bodyClass"> 145 @Model.Area.Item.GetString("ScriptsBodyBegin") 146 <div class="container-fluid"> 147 <div class="row flex-xl-nowrap"> 148 <div id="Sidenav" class="col-12 col-md-4 col-lg-3 col-xl-2 bd-sidebar"> 149 @getLogo() 150 @*<button class="btn btn-link bd-search-docs-toggle d-md-none p-0 ml-3 collapsed" type="button" data-toggle="collapse" data-target="#bd-docs-nav" aria-controls="bd-docs-nav" aria-expanded="false" aria-label="Toggle docs navigation"> 151 <svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30" role="img" focusable="false"> 152 <title>Menu</title> 153 <path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"> 154 </path> 155 </svg> 156 </button>*@ 157 <nav class="bd-links"> 158 <div class="bd-toc-item active subpages-btn"> 159 <div class="bd-toc-link collapsed"> 160 <div> 161 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.217 15.217 " data-name="search" class="vf-icon-svg" role="img" focusable="false"> 162 <path class="a" d="M13.876,12.571l-.931-.235a5.664,5.664,0,1,0-.609.609l.235.931,4.35,4.342,1.3-1.3Zm-5.22,0a3.915,3.915,0,1,1,3.915-3.915A3.91,3.91,0,0,1,8.655,12.571Z" transform="translate(-3 -3)" /> 163 </svg> 164 @* -- -- -- -- *@ 165 <form action="/Default.aspx" id="searchForm"> 166 <input type="hidden" name="id" value="@Model.Area.Item.GetString("SearchResultID")" /> 167 <input type="text" name="search" class="question" id="search" required autocomplete="off" /> 168 <label for="search"> 169 <button type="button" id="searchButton" class="btn">Søg</button> 170 </label> 171 </form> 172 @* -- -- -- -- *@ 173 </div> 174 </div> 175 </div> 176 177 @foreach (var t in Dynamicweb.Services.Pages.GetRootPagesForArea(Model.Area.ID).Where(x => x.Active)) { 178 if (t.Hidden || t.IsFolder || (userDevice == "Desktop" && t.HideForDesktops) || (userDevice == "Mobile" && t.HideForPhones) || (userDevice == "Tablet" && t.HideForTablets)) { 179 continue; 180 } 181 if (t.Item["GroupStart"] != null && (bool)t.Item["GroupStart"]) { 182 <hr /> 183 } 184 var subpages = Dynamicweb.Services.Pages.GetPageNavigationTree(t.ID).RootNode.Children.Where(x => !x.IsHidden && !x.IsFolder); 185 string bdtocitemclass = "bd-toc-item active"; 186 string classhack = "bd-toc-link"; 187 string openButtonClass = "plus-btn"; 188 bool currentPage = t.ID == Model.ID; 189 if (t.ID == Model.ID) { 190 classhack += " current-page"; 191 } 192 if (subpages.Where(x => x.ID == Model.ID).Any()) { 193 classhack += " inpath"; 194 } 195 if (subpages.Any()) { 196 bdtocitemclass += " subpages-btn"; 197 bool inpath = subpages.Where(x => x.ID == Model.ID).Any(); 198 if (inpath) { 199 bdtocitemclass += " open"; 200 } else { 201 classhack += " collapsed"; 202 } 203 } else { 204 classhack += "\" href=\"/Default.aspx?ID=" + t.ID + "\""; 205 } 206 <div class="@bdtocitemclass"> 207 <a class="@classhack"> 208 <div> 209 @t.Item["Icon"] 210 @t.MenuText 211 <div class="float-right"> 212 <div class="plus-btn"> 213 <span></span> 214 <span></span> 215 </div> 216 </div> 217 </div> 218 </a> 219 @if (subpages.Any()) { 220 <ul class="nav bd-sidenav subpages-dropdown"> 221 @foreach (var i in subpages.OrderBy(x => x.Sort)) { 222 string subpageClass = "subpage-link"; 223 if (i.ID == Model.ID) { 224 subpageClass += " current-page"; 225 } 226 <li> 227 <a class="@subpageClass" href="/Default.aspx?ID=@i.ID">@i.GetDisplayName()</a> 228 </li> 229 } 230 </ul> 231 } 232 </div> 233 } 234 @*replace active with function to make it so*@ 235 236 </nav> 237 </div> 238 239 <div class="col-12 col-md-12 col-lg-9 col-xl-10"> 240 241 @* -- - - - - - - - - - - -- ---------------------------------------------- *@ 242 <div class="col-12 text-center d-lg-none mobile-header"> 243 <div class="d-inline-block"> 244 <div class="col-12 col-sm-12 col-md-12 col-lg-12"> 245 @getLogo() 246 </div> 247 </div> 248 <div class="float-right"> 249 <button type="button" id="mobile-menu-btn" class="float-right"> 250 <span class="icon-bar"></span> 251 <span class="icon-bar"></span> 252 <span class="icon-bar"></span> 253 </button> 254 255 </div> 256 </div> 257 258 @*- - - - - - - ------ - - -- -------- - - - - ------------------- - - - - - ------------------*@ 259 260 @if (alertShown && (!string.IsNullOrWhiteSpace(alertHeadline) || !string.IsNullOrWhiteSpace(alertText))) { 261 var alert_cookie = Dynamicweb.Environment.CookieManager.GetCookie("hidealert"); 262 if (alert_cookie == null || string.IsNullOrWhiteSpace(alert_cookie.Value)) { 263 <div id="alert-box" class="jumbotron"> 264 <div class="container text-center"> 265 <div class="row"> 266 <div class="col-12 text-right"> 267 <i onclick="hideAlertBox()" class="icon-close" aria-label="@Translate("Close warning")" title="@Translate("Close")"> 268 <svg data-name="closebutton" version="1.1" id="svg-close-button" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 71 71" style="enable-background:new 0 0 71 71;" xml:space="preserve"> 269 <g> 270 <path d="M35.5,0.4C16.1,0.4,0.4,16.1,0.4,35.5s15.7,35.1,35.1,35.1s35.1-15.7,35.1-35.1S54.9,0.4,35.5,0.4z M35.5,68.6 c-18.3,0-33.1-14.8-33.1-33.1S17.2,2.4,35.5,2.4s33.1,14.8,33.1,33.1S53.8,68.6,35.5,68.6z" /> 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 <path d="M51.8,19.2c-0.4-0.4-1-0.4-1.4,0L35.5,34.1L20.7,19.2c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4l14.8,14.8L19.2,50.3 c-0.4,0.4-0.4,1,0,1.4c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3l14.8-14.8l14.8,14.8c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3 c0.4-0.4,0.4-1,0-1.4L36.9,35.5l14.8-14.8C52.2,20.3,52.2,19.6,51.8,19.2z" /> 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 </g> 399 </svg> 400 </i> 401 </div> 402 </div> 403 @if (!string.IsNullOrWhiteSpace(alertHeadline)) { 404 <h1>@alertHeadline</h1> 405 <hr /> 406 } 407 @if (!string.IsNullOrWhiteSpace(alertText)) { 408 <text>@alertText</text> 409 } 410 </div> 411 </div> 412 } 413 } 414 <div class="row"> 415 @using Dynamicweb.Rendering 416 @using Dynamicweb.Frontend 417 @inherits ViewModelTemplate<PageViewModel> 418 419 @{ 420 var pageBanner = Model.Item.GetItem("Banner"); 421 var pageBannerFile = pageBanner.GetFile("File"); 422 string device = Dynamicweb.Frontend.Devices.DeviceInfo.ParseFromUserAgentString(Dynamicweb.Context.Current.Request.UserAgent).DeviceType.ToString(); 423 int imageFullWidth = device == "Mobile" || device == "Bot" ? 840 : device == "Tablet" ? 1000 : 1920; 424 int imageFullHeight = device == "Mobile" || device == "Bot" ? 167 : device == "Tablet" ? 200 : 383; 425 426 string heading = Model.Item.GetString("Heading"); 427 string text = Model.Item.GetString("Text"); 428 429 string layout = "col-12 " + Model.Item.GetItem("Layout").GetList("WidthSM").SelectedValue; 430 //if (layout.IndexOf("col-lg-12") > -1) { 431 // layout += " full-width"; 432 //} 433 if (layout.IndexOf("col-lg-8") > -1) { 434 layout = "col-12 col-xl-8"; 435 } else { 436 layout += " full-width"; 437 } 438 439 440 //Test værdier 441 442 } 443 <div class="container-fluid"> 444 <div class="row"> 445 <div class="col-12"> 446 @if (pageBannerFile != null) { 447 string pageBannerPath = "/Admin/Public/GetImage.ashx?Image=" + pageBannerFile.PathUrlEncoded + "&Format=jpg" + "&Width=" + imageFullWidth + "&Height=" + imageFullHeight + "&Crop=0"; 448 449 <div class="img-cover-bg"> 450 <img src="@pageBannerPath" alt="@pageBanner.GetString("Alt")" title="@pageBanner.GetString("Title")" class="img-fluid w-100" /> 451 </div> 452 } 453 </div> 454 </div> 455 <div class="row"> 456 <div class="col-12"> 457 <section class="breadcrumb"> 458 <ul itemscope="" itemtype="https://schema.org/BreadcrumbList" class="breadcrumb" data-itemtypes="Page"> 459 <li itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem"> 460 <a itemprop="item" href="/Default.aspx?ID=@Model.Area.FirstActivePage.ID" title="Forside"><span itemprop="name">@Model.Area.FirstActivePage.Name</span></a> 461 </li> 462 @if (Pageview.ID == 1788) { 463 <li itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem"> 464 <span itemprop="name">@Translate("Søgeresultat")</span> 465 </li> 466 } else { 467 foreach (var i in Model.Path) { 468 var page = Dynamicweb.Services.Pages.GetPage(i.ID); 469 if (!page.Active || page.IsFolder) { 470 continue; 471 } 472 <li itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem" data-active="1" data-level="2" data-itemtype="Page" data-pageid="@i.ID"> 473 <a itemprop="item" href="/Default.aspx?ID=@i.ID" title="@i.Name"> 474 <span itemprop="name">@i.Name</span> 475 </a> 476 </li> 477 } 478 } 479 480 481 </ul> 482 </section> 483 </div> 484 485 <div class="@(layout)"> 486 <section class="page-content"> 487 @if (!string.IsNullOrWhiteSpace(heading) || !string.IsNullOrWhiteSpace(text)) { 488 <div class="row"> 489 <div class="col-12 page-content-top"> 490 @if (!string.IsNullOrWhiteSpace(heading)) { 491 <h1>@heading</h1> 492 } 493 494 @if (!string.IsNullOrWhiteSpace(text)) { 495 @text 496 } 497 </div> 498 </div> 499 } 500 <div class="row"> 501 @Model.Placeholder("content", "Indhold", "sort:1") 502 </div> 503 </section> 504 </div> 505 @if (Model.Item.GetItem("Layout").GetList("WidthSM").SelectedValue == "col-lg-8") { 506 <aside class="col-sm"> 507 <section class="page-right-area"> 508 <div class="row"> 509 @Model.Placeholder("right", "Højre kolonne", "sort:2") 510 </div> 511 512 <div class="row"> 513 @*<div class="col-12"> 514 <div class="row">*@ 515 @foreach (var i in Model.Item.GetItem("SelfService").GetList("List").SelectedValues) { 516 Dynamicweb.Content.Page selfServicePage = Dynamicweb.Services.Pages.GetPageForItem("PageSelfService", i); 517 if (selfServicePage != null) { 518 <div class="col-12 mb-4 col-xl-12 col-lg-12 col-6 md-12 col-sm-6 col-xs-12"> 519 @*<div class="col-12">*@ 520 <a href="/Default.aspx?ID=@selfServicePage.ID" title="@Translate("Gå til side")" class="d-block self-service-box p-4"> 521 <div class="row h-100"> 522 <div class="col-12"> 523 <h3>@selfServicePage.Item["Heading"]</h3> 524 <p class="mt-3">@selfServicePage.Item["Teaser"]</p> 525 </div> 526 <div class="col-12 align-self-end text-right"> 527 @if (selfServicePage.Item["Areas"] != null) { 528 Dynamicweb.Content.Items.Item selfServiceAreas = Dynamicweb.Services.Items.GetItem("Areas", (string)selfServicePage.Item["Areas"]); 529 if (selfServiceAreas["List"] != null && !string.IsNullOrWhiteSpace((string)selfServiceAreas["List"])) { 530 foreach (string s in ((string)selfServiceAreas["List"]).Split(',')) { 531 @System.Web.HttpUtility.UrlDecode(s) 532 } 533 } 534 } 535 </div> 536 </div> 537 </a> 538 </div> 539 } 540 } 541 @*</div> 542 </div>*@ 543 </div> 544 </section> 545 </aside> 546 } 547 </div> 548 549 550 </div> 551 552 </div> 553 <footer> 554 <div class="container-fluid"> 555 <div class="row"> 556 <div class="col-12 text-center "> 557 <div class="d-inline-block"> 558 559 @{ 560 var footerColumnLayout = Model.Area.Item.GetItem("FooterColumnLayout"); 561 string footerColumnClass = footerColumnLayout.GetList("Width").SelectedValue + " " + footerColumnLayout.GetList("WidthSM").SelectedValue + " " + footerColumnLayout.GetList("WidthMD").SelectedValue + " " + footerColumnLayout.GetList("WidthLG").SelectedValue; 562 } 563 @foreach (var i in Model.Area.Item.GetItems("FooterColumn")) { 564 <div class="@footerColumnClass"> 565 @i.GetString("Text") 566 </div> 567 } 568 </div> 569 <div class="float-right"> 570 @{ 571 List<string> soMes = new List<string>() { "LinkedIn", "Facebook", "Twitter", "Instagram", "Youtube" }; 572 } 573 @foreach (string s in soMes) { 574 string soMeLink = Model.Area.Item.GetString("SoMe" + s); 575 if (!string.IsNullOrWhiteSpace(soMeLink)) { 576 string faclass = "fa-" + s.ToLower(); 577 if (s != "LinkedIn" && s != "Instagram" && s != "Twitter" && s != "Youtube") { 578 faclass += "-f"; 579 } else if (s == "LinkedIn") { 580 faclass += "-in"; 581 } 582 <a href="@soMeLink" target="_blank" alt="" title="@s" class="spin circle"><i class="fab @faclass"></i></a> 583 } 584 } 585 586 </div> 587 </div> 588 </div> 589 </div> 590 </footer> 591 </div> 592 593 </div> 594 </div> 595 596 @*flyttet til script.js 597 <script async> 598 window.addEventListener("load", function () { 599 window.cookieconsent.initialise({ 600 "palette": { 601 "popup": { 602 "background": "rgba(0, 0, 0, .9)", 603 "text": "#ffffff", 604 "font-family": "Rajdhani, sans-serif" 605 }, 606 "button": { 607 "border":"solid 1px #ffffff", 608 "background": "#c4007a", 609 "text": "#ffffff" 610 } 611 }, 612 "theme": "classic", 613 "content": { 614 "message": "Denne hjemmeside anvender cookies til statistik og indstillinger. Ved at bruge hjemmesiden accepterer du dette.", 615 "dismiss": "OK", 616 "link": "Klik og læs mere her...", 617 "href": "/Default.aspx?ID=1114" 618 } 619 }) 620 }); 621 </script>*@ 622 623 <div id="mobile-menu-overlay"></div> 624 625 @RenderSnippet("filterizr") 626 @RenderSnippet("MapScript") 627 @Model.Area.Item.GetString("ScriptsBodyEnd") 628 629 @* -- WCAG -- *@ 630 <script defer src="https://cdn.polyfill.io/v2/polyfill.js?features=Element.prototype.classList"></script> 631 <script defer src="https://unpkg.com/focus-visible"></script> 632 633 </body> 634 </html> 635 636 @helper getLogo() { 637 <a href="/" title="@Model.Area.Name" alt="@Model.Area.Name"> 638 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 95.124" data-name="logo" class="logo-svg" role="img" focusable="false"> 639 <title>@Model.Area.Name</title> 640 <g transform="translate(-0.009 0)"> 641 <path class="logo-a" d="M104.319,154.519l-4.585-1.635c-2.89-1.037-3.588-2.292-3.588-3.488,0-2.073,2.073-3.149,4.365-3.149a4.649,4.649,0,0,1,4.086,1.914c1.136,1.415,2.133,2.073,3.807,1.575l2.551-.718c1.854-.538,2.731-1.953,1.734-3.767-2.292-4.306-6.418-6.817-12.358-6.817-4.664,0-8.691,1.595-11.222,4.365a2.588,2.588,0,0,0-1.834.1,6.643,6.643,0,0,1-2.392.379c-2.671,0-4.624-2.83-5.123-6.6,5.183-1.475,8.173-5.661,8.173-11.322,0-7.076-4.624-12.956-13.136-12.956H59.869a2.651,2.651,0,0,0-2.95,2.95v21.428a20.85,20.85,0,0,0-13.554-4.624,21.061,21.061,0,0,0-12.339,3.727,4.9,4.9,0,0,0-.538-.04H18.926v-6.777H32.66a2.681,2.681,0,0,0,2.99-2.95v-2.671a2.689,2.689,0,0,0-2.99-2.95H11.85a2.651,2.651,0,0,0-2.95,2.95v32.252a2.651,2.651,0,0,0,2.95,2.95H16a2.677,2.677,0,0,0,2.95-2.95V143.555h5.86a20.2,20.2,0,0,0-1.754,8.292c0,10.684,8.013,19.654,20.372,19.654,12.418,0,20.431-8.99,20.431-19.654,0-.439-.02-.857-.04-1.276h.239a2.677,2.677,0,0,0,2.95-2.95V137.336h3.927c.439,4.086,2.512,13.834,12.139,13.834a17.964,17.964,0,0,0,3.329-.319c.538,6.5,7.535,9.289,10.644,10.285l4.624,1.694c2.83.917,3.767,2.292,3.767,3.708,0,2.232-2.133,3.488-5.282,3.488-2.95,0-5.063-1.136-6.259-2.99-.977-1.575-1.914-2.292-3.588-1.914l-2.731.658c-1.854.439-2.83,1.734-2.133,3.588,2.133,5.282,7.415,8.452,14.711,8.452,8.232,0,15.029-3.867,15.029-11.661C115.043,161.057,112.273,157.249,104.319,154.519ZM43.4,162.831c-6.259,0-10.345-4.963-10.345-11s4.086-11,10.345-11c6.319,0,10.345,4.963,10.345,11C53.749,157.887,49.723,162.831,43.4,162.831ZM73.682,130.3h-6.7v-9.309h6.7c2.512,0,4.186,2.133,4.186,4.684A4.379,4.379,0,0,1,73.682,130.3Z" transform="translate(-7.119 -88.657)" /> 642 <g transform="translate(0.009 0)"> 643 <path class="logo-b" d="M5.05,16.708.107,2.755c-.3-.877.1-1.455,1.017-1.455H3.077A1.364,1.364,0,0,1,4.512,2.376l2.87,9.588,2.83-9.588A1.364,1.364,0,0,1,11.648,1.3H13.6c.917,0,1.336.578,1.017,1.455L9.635,16.708A1.414,1.414,0,0,1,8.2,17.725H6.485A1.414,1.414,0,0,1,5.05,16.708Z" transform="translate(-0.009 -1.041)" /> 644 <path class="logo-b" d="M89.525,4.988v2.93h4.884a1.161,1.161,0,0,1,1.3,1.276v.777a1.17,1.17,0,0,1-1.3,1.276H89.525v2.811h5.82a1.147,1.147,0,0,1,1.276,1.276v1.156a1.147,1.147,0,0,1-1.276,1.276h-8.87A1.147,1.147,0,0,1,85.2,16.489V2.576A1.147,1.147,0,0,1,86.476,1.3h8.87a1.147,1.147,0,0,1,1.276,1.276V3.732a1.147,1.147,0,0,1-1.276,1.276h-5.82Z" transform="translate(-68.219 -1.041)" /> 645 <path class="logo-b" d="M152.211,13.3c-.3-.8.12-1.355.917-1.555l1.176-.279c.718-.159,1.136.14,1.555.817a3.042,3.042,0,0,0,2.691,1.3c1.355,0,2.272-.538,2.272-1.495,0-.618-.4-1.2-1.615-1.595l-1.993-.718c-1.375-.439-4.545-1.714-4.6-4.724,0-3.07,2.631-5.043,6.02-5.043a5.594,5.594,0,0,1,5.322,2.93c.419.777.04,1.375-.757,1.615l-1.1.3c-.718.219-1.156-.08-1.635-.678a2,2,0,0,0-1.754-.817c-.977,0-1.874.478-1.874,1.355,0,.518.3,1.056,1.555,1.495l1.973.7c3.428,1.176,4.624,2.811,4.664,5,0,3.349-2.93,5.023-6.478,5.023C155.4,16.943,153.128,15.588,152.211,13.3Z" transform="translate(-121.795 0)" /> 646 <path class="logo-b" d="M235.594,2.576V3.732a1.147,1.147,0,0,1-1.276,1.276H230.87V16.489a1.147,1.147,0,0,1-1.276,1.276H227.9a1.147,1.147,0,0,1-1.276-1.276V4.988h-3.349A1.147,1.147,0,0,1,222,3.712V2.576A1.147,1.147,0,0,1,223.276,1.3H234.3A1.145,1.145,0,0,1,235.594,2.576Z" transform="translate(-177.08 -1.041)" /> 647 <path class="logo-b" d="M300.7,16.449V2.576A1.147,1.147,0,0,1,301.976,1.3h1.774a1.155,1.155,0,0,1,1.276,1.276V8.117h5.482V2.576A1.147,1.147,0,0,1,311.783,1.3h1.754a1.147,1.147,0,0,1,1.276,1.276V16.469a1.147,1.147,0,0,1-1.276,1.276h-1.754a1.147,1.147,0,0,1-1.276-1.276V11.625h-5.482v4.844a1.164,1.164,0,0,1-1.276,1.276h-1.794A1.156,1.156,0,0,1,300.7,16.449Z" transform="translate(-239.854 -1.041)" /> 648 <path class="logo-b" d="M387.9,16.449V2.576A1.147,1.147,0,0,1,389.176,1.3h1.774a1.155,1.155,0,0,1,1.276,1.276V16.469a1.164,1.164,0,0,1-1.276,1.276h-1.774A1.161,1.161,0,0,1,387.9,16.449Z" transform="translate(-309.458 -1.041)" /> 649 <path class="logo-b" d="M423.064,16.389,424.36,2.5a1.194,1.194,0,0,1,1.316-1.2h1.953a1.435,1.435,0,0,1,1.455.977l3.727,9.249,3.747-9.249a1.4,1.4,0,0,1,1.455-.977h1.953a1.178,1.178,0,0,1,1.3,1.2l1.3,13.893a1.076,1.076,0,0,1-1.2,1.336h-1.774a1.175,1.175,0,0,1-1.316-1.2l-.638-7.594-3.01,7.634a1.4,1.4,0,0,1-1.455,1.017h-.718A1.394,1.394,0,0,1,431,16.569l-3.01-7.634-.638,7.594a1.211,1.211,0,0,1-1.335,1.2H424.28A1.1,1.1,0,0,1,423.064,16.389Z" transform="translate(-337.418 -1.041)" /> 650 <path class="logo-b" d="M531.564,16.389,532.86,2.5a1.194,1.194,0,0,1,1.316-1.2h1.953a1.435,1.435,0,0,1,1.455.977l3.727,9.249,3.747-9.249a1.4,1.4,0,0,1,1.455-.977h1.953a1.178,1.178,0,0,1,1.3,1.2l1.3,13.893a1.076,1.076,0,0,1-1.2,1.336h-1.754a1.175,1.175,0,0,1-1.315-1.2l-.638-7.594-3.01,7.634a1.4,1.4,0,0,1-1.455,1.017h-.718a1.394,1.394,0,0,1-1.455-1.017l-3.01-7.634-.638,7.594a1.211,1.211,0,0,1-1.336,1.2H532.8A1.107,1.107,0,0,1,531.564,16.389Z" transform="translate(-423.954 -1.041)" /> 651 <path class="logo-b" d="M647.225,4.988v2.93h4.884a1.161,1.161,0,0,1,1.3,1.276v.777a1.17,1.17,0,0,1-1.3,1.276h-4.884v2.811h5.82a1.147,1.147,0,0,1,1.276,1.276v1.156a1.147,1.147,0,0,1-1.276,1.276h-8.87a1.147,1.147,0,0,1-1.276-1.276V2.576A1.147,1.147,0,0,1,644.176,1.3h8.87a1.147,1.147,0,0,1,1.276,1.276V3.732a1.147,1.147,0,0,1-1.276,1.276h-5.82Z" transform="translate(-512.831 -1.041)" /> 652 <path class="logo-b" d="M720.12,12.024h-1.694v4.425a1.164,1.164,0,0,1-1.276,1.276h-1.774a1.147,1.147,0,0,1-1.276-1.276V2.576A1.147,1.147,0,0,1,715.376,1.3h6.438a5.322,5.322,0,0,1,5.661,5.581,4.765,4.765,0,0,1-3.528,4.884c.219,1.615,1.056,2.83,2.213,2.83a3.221,3.221,0,0,0,1.036-.159c.758-.239.977-.08,1.336.658l.279.558a1.147,1.147,0,0,1-.439,1.674,6.956,6.956,0,0,1-3.01.658C721.2,17.984,720.3,13.778,720.12,12.024Zm1.2-3.03A1.889,1.889,0,0,0,723.13,7a1.871,1.871,0,0,0-1.814-2.013h-2.89V8.994Z" transform="translate(-569.592 -1.041)" /> 653 <path class="logo-b" d="M797.7,16.449V2.576A1.147,1.147,0,0,1,798.976,1.3h1.774a1.155,1.155,0,0,1,1.276,1.276V14.057h6.119a1.147,1.147,0,0,1,1.276,1.276v1.156a1.147,1.147,0,0,1-1.276,1.276h-9.169A1.194,1.194,0,0,1,797.7,16.449Z" transform="translate(-636.309 -1.041)" /> 654 <path class="logo-b" d="M860.776,16.27l5.382-13.993a1.452,1.452,0,0,1,1.475-.977h1.834a1.428,1.428,0,0,1,1.455.977L876.4,16.27c.319.877-.04,1.455-.977,1.455h-1.894a1.443,1.443,0,0,1-1.455-.977l-.717-1.934H865.7l-.7,1.894a1.384,1.384,0,0,1-1.435,1.017h-1.814C860.815,17.725,860.417,17.147,860.776,16.27Zm9.767-4.844L868.55,5.785l-2.093,5.641Z" transform="translate(-686.47 -1.041)" /> 655 <path class="logo-b" d="M950.5,16.449V2.576A1.147,1.147,0,0,1,951.776,1.3h1.1a1.792,1.792,0,0,1,1.555.8l5.721,7.953V2.576A1.147,1.147,0,0,1,961.423,1.3H963.2a1.147,1.147,0,0,1,1.276,1.276V16.469a1.147,1.147,0,0,1-1.276,1.276h-1.076a1.735,1.735,0,0,1-1.535-.8l-5.781-8.073v7.594a1.164,1.164,0,0,1-1.276,1.276h-1.774A1.165,1.165,0,0,1,950.5,16.449Z" transform="translate(-757.661 -1.041)" /> 656 <path class="logo-b" d="M1037,16.449V2.576a1.147,1.147,0,0,1,1.276-1.276h5.86a8.122,8.122,0,0,1,8.352,8.212,8.11,8.11,0,0,1-8.352,8.212h-5.86A1.147,1.147,0,0,1,1037,16.449Zm6.6-2.412a4.285,4.285,0,0,0,4.585-4.525,4.265,4.265,0,0,0-4.585-4.525h-2.273v9.05Z" transform="translate(-826.92 -1.041)" /> 657 <path class="logo-b" d="M1122.312,13.3c-.3-.8.119-1.355.917-1.555l1.176-.279c.718-.159,1.136.14,1.555.817a3.042,3.042,0,0,0,2.691,1.3c1.356,0,2.272-.538,2.272-1.495,0-.618-.4-1.2-1.615-1.595l-1.993-.718c-1.375-.439-4.545-1.714-4.6-4.724,0-3.07,2.631-5.043,6.039-5.043a5.594,5.594,0,0,1,5.323,2.93c.418.777.04,1.375-.757,1.615l-1.1.3c-.718.219-1.156-.08-1.634-.678a2,2,0,0,0-1.754-.817c-.977,0-1.873.478-1.873,1.355,0,.518.3,1.056,1.555,1.495l1.973.7c3.428,1.176,4.625,2.811,4.664,5,0,3.349-2.93,5.023-6.478,5.023C1125.5,16.943,1123.229,15.588,1122.312,13.3Z" transform="translate(-895.148 0)" /> 658 </g> 659 <g transform="translate(99.34 31.258)"> 660 <path class="logo-a" d="M810.9,279.1H806.75a2.651,2.651,0,0,0-2.95,2.95V314.3a2.651,2.651,0,0,0,2.95,2.95H810.9a2.677,2.677,0,0,0,2.95-2.95V282.05A2.686,2.686,0,0,0,810.9,279.1Z" transform="translate(-739.535 -253.386)" /> 661 <path class="logo-a" d="M933.42,167.362H921.281a2.651,2.651,0,0,0-2.95,2.95v1.415a2.651,2.651,0,0,0,2.95,2.95h5.6v5.063a14.86,14.86,0,0,1-5.6,1.037c-6.917,0-11.063-5-11.063-11a10.644,10.644,0,0,1,10.883-11,12.493,12.493,0,0,1,5.94,1.2c1.694.718,2.95.6,4.086-.757l1.734-2.133c1.2-1.535,1.1-3.05-.6-4.086A20.957,20.957,0,0,0,921.1,150.1c-12.418,0-20.91,8.99-20.91,19.654v.08h-.857a2.651,2.651,0,0,0-2.95,2.95v17.362l-13.3-18.458a4.1,4.1,0,0,0-3.588-1.854H876.95a2.651,2.651,0,0,0-2.95,2.95v32.252a2.651,2.651,0,0,0,2.95,2.95H881.1a2.677,2.677,0,0,0,2.95-2.95V187.395l13.4,18.737a3.967,3.967,0,0,0,3.548,1.854H903.5a2.651,2.651,0,0,0,2.95-2.95V184.006a21.586,21.586,0,0,0,14.79,5.4,22.126,22.126,0,0,0,13.455-4.585,4.034,4.034,0,0,0,1.694-3.588V170.292A2.669,2.669,0,0,0,933.42,167.362Z" transform="translate(-795.742 -150.1)" /> 662 <path class="logo-a" d="M539.939,160.44a4.2,4.2,0,0,0-1.176-.159h-4.146a2.651,2.651,0,0,0-2.95,2.95v17.362l-13.3-18.458a4.586,4.586,0,0,0-1.674-1.455l.439-.638,1.3-1.854c1.415-2.013.6-3.588-1.794-3.588h-5.222a3.813,3.813,0,0,0-3.548,1.953l-7.575,12.259-7.515-12.259a3.854,3.854,0,0,0-3.548-1.953h-5.282c-2.392,0-3.269,1.575-1.914,3.588L495.269,177.3v12.478a2.651,2.651,0,0,0,2.95,2.95h4.146a2.651,2.651,0,0,0,2.95-2.95V177.144l3.987-5.761v24.079a2.651,2.651,0,0,0,2.95,2.95H516.4a2.677,2.677,0,0,0,2.95-2.95V177.822l13.395,18.737a3.967,3.967,0,0,0,3.548,1.854H538.8a2.651,2.651,0,0,0,2.95-2.95v-29.92Z" transform="translate(-481.395 -153.703)" /> 663 <path class="logo-c" d="M792.951,153.433a5.54,5.54,0,0,0-4.325-2.033,6.981,6.981,0,0,0-5.143,2.312,6.944,6.944,0,0,0-5.143-2.312,5.6,5.6,0,0,0-4.325,2.033A7.24,7.24,0,0,0,772.4,158.1c0,4.405,3.528,7.4,9.368,12.359l1.176,1a.8.8,0,0,0,.518.2.738.738,0,0,0,.518-.2l1.176-1c5.84-4.963,9.368-7.953,9.368-12.378A6.98,6.98,0,0,0,792.951,153.433Z" transform="translate(-714.394 -151.141)" /> 664 <path class="logo-c" d="M792.951,153.433a5.54,5.54,0,0,0-4.325-2.033,6.981,6.981,0,0,0-5.143,2.312,6.944,6.944,0,0,0-5.143-2.312,5.6,5.6,0,0,0-4.325,2.033A7.24,7.24,0,0,0,772.4,158.1c0,4.405,3.528,7.4,9.368,12.359l1.176,1a.8.8,0,0,0,.518.2.738.738,0,0,0,.518-.2l1.176-1c5.84-4.963,9.368-7.953,9.368-12.378A6.98,6.98,0,0,0,792.951,153.433Z" transform="translate(-714.394 -151.141)" /> 665 </g> 666 </g> 667 </svg> 668 </a> 669 }