Error executing template "Designs/SF2019/_parsed/Page.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_0d2e837fdf834db5b2a5774f96041908.Execute() in E:\dynamicweb.net\Solutions\Upsite\SilkeborgForsyningWebsite.net.dynamicweb.dk\Application\Files\Templates\Designs\SF2019\_parsed\Page.parsed.cshtml:line 93
   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.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using Dynamicweb.Environment 3 4 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 5 @using Newtonsoft.Json 6 @using System.Web 7 @using System.IO 8 @SnippetStart("RenderWarningIcon") 9 <span class="counter warning-counter"><text>0</text></span> 10 @SnippetEnd("RenderWarningIcon") 11 12 13 @functions{ 14 string Rot13(string value) { 15 var chars = value.ToCharArray(); 16 17 for (var i = 0; i < chars.Length; i++) { 18 var number = (int)chars[i]; 19 20 if (number >= 'a' && number <= 'z') { 21 if (number > 'm') { 22 number -= 13; 23 } else { 24 number += 13; 25 } 26 } else if (number >= 'A' && number <= 'Z') { 27 if (number > 'M') { 28 number -= 13; 29 } else { 30 number += 13; 31 } 32 } 33 chars[i] = (char)number; 34 } 35 return new string(chars); 36 } 37 } 38 39 @helper Rot13_Email(string email, string text = "") { 40 var tpl = new char[] { 41 '<', 'a', ' ', 'h', 'r', 'e', 'f', '=', '"', 'm', 'a', 'i', 'l', 't', 'o', ':', '#', '1', '"', ' ', 'r', 'e', 'l', '=', '"', 'n', 'o', 'f', 'o', 'l', 'l', 'o', 'w', '"', '>', '#', '2', '<', '/', 'a', '>' 42 }; 43 <span class="rot13Email">@Rot13(new string(tpl).Replace("#1", email).Replace("#2", string.IsNullOrWhiteSpace(text) ? email : text).Replace("[a]", "@"))</span> 44 } 45 46 @{ 47 string companyName = GetString("Item.Area.Company_Name"); 48 string companyAddress = GetString("Item.Area.Company_Address"); 49 string companyZipAndCity = GetString("Item.Area.Company_Postal") + " " + GetString("Item.Area.Company_City"); 50 string companyMail = GetString("Item.Area.Company_Email"); 51 string companyPhone = GetString("Item.Area.Company_Phone"); 52 string companyPhoneClean = companyPhone.Replace(" ", ""); 53 54 string companyLogo = GetString("Item.Area.Company_Logo"); 55 string companyLogoAlternative = GetString("Item.Area.Company_Logo_Alternative"); 56 57 string companyPhoneService = GetString("Item.Area.Company_Customer_Service"); 58 string companyPhoneServiceClean = companyPhoneService.Replace(" ", ""); 59 60 string companyPhoneWathSewage = GetString("Item.Area.Company_Watchphone_Sewage"); 61 string companyPhoneWathSewageClean = companyPhoneWathSewage.Replace(" ", ""); 62 63 string companyPhoneWathWater = GetString("Item.Area.Company_Watchphone_Water"); 64 string companyPhoneWathWaterClean = companyPhoneWathWater.Replace(" ", ""); 65 66 string Contact_Formular_Btn_Text = GetString("Item.Area.Contact_Formular_Btn_Text"); 67 68 string footerText = GetString("Item.Area.Footer_Text"); 69 70 string googleAnalytics = GetString("Item.Area.Google_Analytics_Code"); 71 72 string topPageName = GetString("DwTopPageName"); 73 int topPageId = GetInteger("DwTopPageID"); 74 75 string designBaseUrl = GetString("Template:DesignBaseUrl"); 76 string commentLogo = designBaseUrl + "img/Icons/icon-commenting.png"; 77 commentLogo = "/Admin/Public/GetImage.ashx?Image=" + commentLogo + "&Format=" + commentLogo.Substring(commentLogo.LastIndexOf(".")) + "&Width=" + 48 + "&Crop=6&DoNotUpscale=1"; 78 79 var bannerCookie = Dynamicweb.Environment.CookieManager.GetCookie("infobanner"); 80 bool showBanner = Dynamicweb.Context.Current.Request.QueryString.Get("test") == "banner" || (DateTime.Now > new DateTime(2018, 12, 17, 0, 0, 0) && DateTime.Now < new DateTime(2018, 12, 31, 23, 59, 59)); 81 if (showBanner && (bannerCookie != null && !string.IsNullOrWhiteSpace(bannerCookie.Value))) 82 { 83 showBanner = false; 84 } 85 86 int ServiceMenuID = GetInteger("Item.Area.Service_Menu_ID"); 87 int searchPageID = 4868; 88 89 string device = Dynamicweb.Frontend.Devices.DeviceInfo.ParseFromUserAgentString(Dynamicweb.Context.Current.Request.UserAgent).DeviceType.ToString(); 90 bool isMobile = device == "Mobile"; 91 int image_full_width = isMobile || device == "Bot" ? 400 : device == "Tablet" ? 720 : 1140; 92 string pageTitle = GetString("Title"); 93 if (Pageview.Item.SystemName == "Waste_Place") 94 { 95 pageTitle = GetString("Item.Text"); 96 if (pageTitle.IndexOf("(pil)") > 0) 97 { 98 pageTitle = pageTitle.Substring(pageTitle.IndexOf("(pil)") + 6); 99 } 100 Dynamicweb.Frontend.PageView.Current().Meta.Title = pageTitle; 101 } 102 103 IList<string> AllowedCookieCategories = new List<string>() { "Essential" }; 104 foreach (string s in CookieManager.GetCategories()) 105 { 106 if (s == "Essential") 107 { 108 continue; 109 } 110 else if (CookieManager.CookieOptInLevelExists && (CookieManager.GetCookieOptInLevel() == CookieOptInLevel.All || (CookieManager.CookieOptInLevelExists && System.Web.HttpContext.Current.Request.Cookies.Get("Dynamicweb.CookieOptInLevel").Value.IndexOf(s) > -1))) 111 { 112 AllowedCookieCategories.Add(s); 113 } 114 } 115 } 116 117 @helper iconLink(string image_name, int size, string rel, string type = "") 118 { 119 string iconfileurl = GetString("Template:DesignBaseUrl") + "img/Icons/Fav/" + image_name + "-" + size + "x" + size + ".png"; 120 string iconLink = "/Admin/Public/GetImage.ashx?Image=" + iconfileurl + "&Format=" + iconfileurl.Substring(iconfileurl.LastIndexOf(".")) + "&Width=" + size + "&Crop=6&DoNotUpscale=1"; 121 if (!string.IsNullOrWhiteSpace(iconLink)) 122 { 123 <link rel="@rel" sizes="@(size)x@(size)" href="@iconLink"> 124 } 125 else 126 { 127 <link rel="@rel" type="@type" sizes="@(size)x@(size)" href="@iconLink"> 128 } 129 130 } 131 <!DOCTYPE html> 132 <html lang="da"> 133 <head> 134 <meta charset="utf-8"> 135 <title>@GetValue("Title")</title> 136 @GetValue("MetaTags") 137 @GetValue("CopyRightNotice") 138 139 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 140 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> 141 142 @* FAV *@ 143 @iconLink("apple-icon", 57, "apple-touch-icon") 144 @iconLink("apple-icon", 60, "apple-touch-icon") 145 @iconLink("apple-icon", 72, "apple-touch-icon") 146 @iconLink("apple-icon", 76, "apple-touch-icon") 147 @iconLink("apple-icon", 114, "apple-touch-icon") 148 @iconLink("apple-icon", 120, "apple-touch-icon") 149 @iconLink("apple-icon", 144, "apple-touch-icon") 150 @iconLink("apple-icon", 152, "apple-touch-icon") 151 @iconLink("apple-icon", 180, "apple-touch-icon") 152 @iconLink("android-icon", 192, "icon", "image/png") 153 @iconLink("favicon", 32, "icon", "image/png") 154 @iconLink("favicon", 96, "icon", "image/png") 155 @iconLink("favicon", 16, "icon", "image/png") 156 <link rel="manifest" href="@(designBaseUrl)img/Icons/Fav/manifest.json"> 157 <meta name="msapplication-TileColor" content="#ffffff"> 158 <meta name="msapplication-TileImage" content="/Admin/Public/GetImage.ashx?Image=@(designBaseUrl)img/Icons/Fav/ms-icon-144x144.png&Format=.png&Width=144&Crop=6&DoNotUpscale=1"> 159 <meta name="theme-color" content="#ffffff"> 160 161 @if (!string.IsNullOrWhiteSpace(googleAnalytics) && AllowedCookieCategories.Contains("Statistical")) 162 { 163 <!-- Google Analytics --> 164 <script> 165 (function (i, s, o, g, r, a, m) { 166 i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { 167 (i[r].q = i[r].q || []).push(arguments) 168 }, i[r].l = 1 * new Date(); a = s.createElement(o), 169 m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) 170 })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'); 171 172 ga('create', '@googleAnalytics', 'auto'); 173 ga('set', 'anonymizeIp', true); 174 ga('send', 'pageview'); 175 </script> 176 <!-- End Google Analytics --> 177 } 178 179 <!-- FONT --> 180 <link href="https://fonts.googleapis.com/css?family=Cairo" rel="stylesheet"> 181 <link href="https://fonts.googleapis.com/css?family=Exo+2" rel="stylesheet"> 182 183 <link rel="stylesheet" href="@(designBaseUrl)assets/fontawesome-pro/css/fontawesome.min.css"> 184 185 <!-- BOOTSTRAP --> 186 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css"> 187 <link href="/Files/Templates/Designs/SF2019/assets/formvalidation/css/formValidation.min.css" rel="stylesheet"> 188 189 <!-- CUSTOM --> 190 <!--<link href="Kerteminde/css/style.min.css" rel="stylesheet" />--> 191 <link href="/Files/Templates/Designs/SF2019/css/style.min.css" rel="stylesheet"> 192 <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script> 193 194 <script defer="" src="@(designBaseUrl)assets/fontawesome-pro/js/all.min.js"></script> 195 @GetValue("Stylesheets") 196 @GetValue("Javascripts") 197 </head> 198 199 <body data-rootpage="@topPageName" data-rootpageid="@topPageId" class="TADA"> 200 @if (showBanner) 201 { 202 <div class="info-banner"> 203 <div class="container"> 204 <div class="pull-right info-banner-close"> 205 <i class="fa fa-times-circle" aria-hidden="true"></i> 206 </div> 207 <div class="row"> 208 <div class="col-lg-8 col-lg-offset-2 col-md-10 col-sm-10 col-md-offset-1 col-sm-offset-1 col-xs-12"> 209 <p> 210 Alle genbrugspladser er lukket d. 24. og 31. december.<br>Dette gælder også, selvom du er tilmeldt ubemandet åbningstid på Kerteminde Genbrugsplads. 211 <br> 212 <a href="/Default.aspx?ID=215" class="info-banner-close">Læs mere her</a> 213 <br> 214 <h1>TEST MANGLER</h1> 215 </p> 216 <button class="info-banner-close btn btn-grey center-link">Luk</button> 217 </div> 218 </div> 219 </div> 220 221 </div> 222 <style> 223 .info-banner { 224 width: 100%; 225 position: absolute; 226 top: 0; 227 left: 0; 228 background: rgba(255, 255, 255, 0.8); 229 z-index: 10; 230 padding: 15rem; 231 text-align: center; 232 font-size: 2rem; 233 font-weight: bold; 234 } 235 236 @@media screen and (max-width:1325px) { 237 .info-banner { 238 padding: 3rem; 239 } 240 } 241 242 @@media screen and (max-width:767px) { 243 .info-banner { 244 padding: 3rem; 245 } 246 } 247 248 .info-banner p { 249 margin-bottom: 3rem; 250 } 251 252 .info-banner-close { 253 cursor: pointer; 254 } 255 256 .info-banner-close > .fa { 257 font-size: 5rem; 258 } 259 </style> 260 <script> 261 $('.info-banner-close').click(function () { 262 $('.info-banner').remove(); 263 document.cookie = "infobanner=true; path=/; expires=Mon, 31 Dec 2018 23:59:59"; 264 }); 265 266 </script> 267 } 268 <!-- MOBILE NAV --> 269 @{ 270 var pageServiceForMobile = new Dynamicweb.Content.PageService(); 271 var topPageForMobile = pageServiceForMobile.GetPage(GetInteger("DwTopPageID")); 272 } 273 274 275 @if (isMobile) { } 276 <div id="Sidenav" class="sidenav"> 277 <div class="top-sidenav"> 278 <a href="javascript:void(0)" class="closebtn row" onclick="closeNav()"> 279 <div class="col-xs-6"><span class="">&times;</span></div><div class="col-xs-6">Menu</div> 280 </a> 281 <div class="top-search"> 282 <div><div><form method="get" action="/Default.aspx" role="search" onsubmit="searchSubmit(this)"><input type="hidden" name="Id" value="@searchPageID"><input type="text" class="form-control" name="q" autocomplete="off" placeholder="Hvad søger du?" value=""><button type="submit"><i class="icon icon-search"></i></button></form></div></div> 283 </div> 284 </div> 285 @*<nav> 286 @RenderNavigation(new { 287 startlevel = 1, 288 endlevel = 2, 289 template = "Primary-Mobile.xslt", 290 expandmode = "All", 291 parentid = 0, 292 areaid = Pageview.AreaID, 293 includemode = "All" 294 }) 295 </nav>*@ 296 297 @* -- -- -- -- *@ 298 299 300 301 <nav class=""> 302 <ul class="nav"> 303 @foreach (Dynamicweb.Content.Page rootPage in pageServiceForMobile.GetRootPagesForArea(GetInteger("DwAreaID"))) { 304 var childPages = pageServiceForMobile.GetPagesByParentID(rootPage.ID); 305 306 if (rootPage.ItemType != "Page_Root" || !rootPage.Active) { 307 continue; 308 } 309 310 string rootPageArea = (string)rootPage.Item["Site_Area"]; 311 312 string liClass = "nav-tab area-color-" + rootPageArea; 313 string aClass = ""; 314 string expanded = "false"; 315 string dataToggle = ""; 316 317 if (childPages.Any()) { 318 liClass += " hasChildren dropdown"; 319 aClass += " dropdown-toggle"; 320 expanded = "true"; 321 dataToggle += "dropdown"; 322 } 323 324 string rootPageIcon = (string)rootPage.Item["Site_Area"]; 325 string iconClass = "icon icon-" + rootPageIcon; 326 327 //if (topPage.ID == rootPage.ID) {liClass += " inpath";} 328 329 int dataInpath = 0; 330 if (topPageForMobile.ID == rootPage.ID || topPageForMobile.MenuText == rootPage.MenuText) { 331 dataInpath = 1; 332 } 333 334 //string rootPageIcon = (string)rootPage.Item["Site_Area"]; 335 string wrapperclass = "flexChild columnParent scroll-dropdown hidden area-color-" + rootPageIcon; 336 337 <li class="@liClass" data-inpath="@dataInpath"> 338 339 @*<a href="@rootPage.GetPageHrefValue()" id="">@rootPage.MenuText@if (rootPageIcon == "warning_counter") {<span class="counter"></span>}</a>*@ 340 341 <a href="@rootPage.GetPageHrefValue()" id="" title="@rootPage.MenuText" class="@aClass" data-inpath="@dataInpath" data-root-page="@rootPage.ID" aria-expanded="@expanded" data-toggle="@dataToggle"> 342 343 @if (rootPageIcon != "warning_counter") { 344 <i class="@iconClass"></i> 345 } else { 346 @RenderSnippet("RenderWarningIcon") 347 } 348 349 @rootPage.MenuText 350 </a> 351 352 @if (childPages.Any()) { 353 354 string rootPageInfoText = (string)rootPage.Item["Info_Text"]; 355 356 357 358 359 360 361 <ul class="dropdown-menu" data-itemtypes="Page"> 362 @foreach (var childPage in childPages) { 363 if (!childPage.Active) { 364 continue; 365 } 366 <li><a href="@childPage.GetPageHrefValue()">@childPage.MenuText</a></li> 367 } 368 </ul> 369 370 @*<div class="@wrapperclass" data-root-page="@rootPage.ID"> 371 <div class="flexChild rowParent"> 372 <div class="flexChild"> 373 <ul class="column_3"> 374 @foreach (var childPage in childPages) { 375 if (!childPage.Active) { 376 continue; 377 } 378 <li><a href="@childPage.GetPageHrefValue()">@childPage.MenuText</a></li> 379 } 380 </ul> 381 </div> 382 </div> 383 @if (!string.IsNullOrWhiteSpace(rootPageInfoText)) { 384 string rootPageInfoLink = (string)rootPage.Item["Info_Link"]; 385 string rootpageinfotextclass = !string.IsNullOrWhiteSpace(rootPageInfoLink) ? "col-md-8 col-sm-9 col-xs-12" : "col-md-11 col-sm-10 col-xs-12"; 386 <a href="@rootPageInfoLink" class="rowParent info row"> 387 <div class="col-md-1 col-sm-2 col-xs-12"> 388 <img src="/Files/Templates/Designs/SF2019/img/Icons/icon-i.png"> 389 </div> 390 <div class="@rootpageinfotextclass"> 391 @rootPageInfoText 392 </div> 393 @if (!string.IsNullOrWhiteSpace(rootPageInfoLink)) { 394 <div class="col-md-2 col-md-offset-1 col-sm-2 col-sm-offset-0 col-xs-12"> 395 <span class="btn btn-success pull-right">@Translate("Menu_Info_Button", "Læs mere")</span> 396 </div> 397 } 398 </a> 399 } 400 </div>*@ 401 } 402 </li> 403 } 404 </ul> 405 </nav> 406 407 408 409 @* -- -- -- -- *@ 410 411 412 413 <nav> 414 @RenderNavigation(new { 415 startlevel = 1, 416 endlevel = 99, 417 template = "TopBarNav-Mobile.xslt", 418 expandmode = "All", 419 parentid = ServiceMenuID, 420 areaid = Pageview.AreaID, 421 includemode = "All" 422 }) 423 </nav> 424 425 426 </div> 427 428 429 @*@if (isMobile) { } 430 <div id="Sidenav" class="sidenav"> 431 <div class="top-sidenav"><a href="javascript:void(0)" class="closebtn row" onclick="closeNav()"><div class="col-xs-6"><span class="">&times;</span></div><div class="col-xs-6">Menu</div></a><div class="top-search"><div><div><form method="get" action="/Default.aspx" role="search" onsubmit="searchSubmit(this)"><input type="hidden" name="Id" value="@searchPageID"><input type="text" class="form-control" name="q" autocomplete="off" placeholder="Hvad søger du?" value=""><button type="submit"><i class="icon icon-search"></i></button></form></div></div></div></div> 432 <nav> 433 @RenderNavigation(new { 434 startlevel = 1, 435 endlevel = 2, 436 template = "Primary-Mobile.xslt", 437 expandmode = "All", 438 parentid = 0, 439 areaid = Pageview.AreaID, 440 includemode = "All" 441 }) 442 </nav> 443 <nav> 444 @RenderNavigation(new { 445 startlevel = 1, 446 endlevel = 99, 447 template = "TopBarNav-Mobile.xslt", 448 expandmode = "All", 449 parentid = ServiceMenuID, 450 areaid = Pageview.AreaID, 451 includemode = "All" 452 }) 453 </nav> 454 </div>*@ 455 <!-- / MOBILE NAV --> 456 457 <header id="navSticky"> 458 <div class="container"> 459 <div class="row header-top"> 460 <div class="col-md-12 hidden-sm hidden-xs"> 461 <nav class="service-menu navbar navbar-default" aria-label="service menu"> 462 <div class="collapse navbar-collapse navbar-right header-right-menu"> 463 @RenderNavigation(new { 464 startlevel = 1, 465 endlevel = 99, 466 template = "TopBarNav.xslt", 467 expandmode = "All", 468 parentid = ServiceMenuID, 469 areaid = Pageview.AreaID, 470 includemode = "All" 471 }) 472 </div> 473 </nav> 474 </div> 475 476 <div class="col-md-6 col-sm-8 col-xs-12"> 477 @*<a href="Default.aspx?ID=4806" class="logo" aria-label="Logo">*@ 478 <a href="/" class="logo" aria-label="Logo"> 479 <img src="@companyLogo" alt="@companyName" title="" class="img-responsive"> 480 </a> 481 </a></div> 482 483 <div class="hidden-lg hidden-md sticky-burger-tab fixed"> 484 <div class="pull-right"> 485 <button type="button" class="OnClick row" onclick="openNav()"> 486 <div class="col-xs-6"> 487 <span class="icon-bar"></span> 488 <span class="icon-bar"></span> 489 <span class="icon-bar"></span> 490 </div> 491 <div class="col-xs-6">Menu</div> 492 </button> 493 </div> 494 </div> 495 496 <div class="col-md-6 col-sm-6 hidden-sm hidden-xs"> 497 <div class="row"> 498 <div class="col-md-12"> 499 <div class="top-search pull-right"> 500 <div class="typeahead-wrapper"> 501 <div class="typeahead-input"> 502 <form method="get" action="/Default.aspx" role="search" onsubmit="searchSubmit(this)"> 503 <input type="hidden" name="Id" value="@searchPageID"> 504 <input type="text" class="form-control" name="q" autocomplete="off" placeholder="Hvad søger du?" value=""> 505 <button type="submit"> 506 <i class="icon icon-search"></i> 507 </button> 508 </form> 509 </div> 510 <div class="typeahead-menu tt-empty"></div> 511 @*<form method="get" action="/Default.aspx" role="search"><input type="hidden" name="Id" value="6"><input type="text" class="form-control" name="q" placeholder="Hvad søger du?"><button type="submit"><i class="icon icon-search"></i></button></form>*@ 512 </div> 513 </div> 514 </div> 515 </div> 516 </div> 517 </div> 518 519 </div> 520 521 @{ 522 string alertHeadline = GetString("Item.Area.Alert_Headline"); 523 string alertText = GetString("Item.Area.Alert_Text"); 524 bool alertShown = GetBoolean("Item.Area.Alert_Shown"); 525 } 526 527 @if (alertShown && (!string.IsNullOrWhiteSpace(alertHeadline) || !string.IsNullOrWhiteSpace(alertText))) 528 { 529 530 var alert_cookie = Dynamicweb.Environment.CookieManager.GetCookie("hidealert"); 531 532 if (alert_cookie == null || string.IsNullOrWhiteSpace(alert_cookie.Value)) 533 { 534 string title = Translate("Luk"); 535 string ariaLabel = Translate("Luk advarsel"); 536 <div id="alert-box" class="jumbotron"> 537 <div class="container text-center"> 538 539 <i onclick="hideAlertBox()" class="fal fa-times-circle" aria-label="@ariaLabel" title="@title"></i> 540 541 @if (!string.IsNullOrWhiteSpace(alertHeadline)) 542 { 543 <h1>@alertHeadline</h1> 544 } 545 @if (!string.IsNullOrWhiteSpace(alertText)) 546 { 547 <text>@alertText</text> 548 } 549 </div> 550 </div> 551 } 552 553 } 554 555 </header> 556 557 @*<div class="sticky-burger-tab"><div class="container"><div class="hidden-lg hidden-md"><button type="button" class="OnClick row" onclick="openNav()"><div class="col-xs-6"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></div><div class="col-xs-6">Menu</div></button></div></div></div>*@ 558 559 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 560 561 562 @SnippetStart("sidebar") 563 @GetValue("DwContent(contentsidebar)") 564 @SnippetEnd("sidebar") 565 566 @{ 567 string page_banner = GetString("Item.Banner_Image"); 568 string page_banner_alt = GetString("Item.Banner_Image_Alt"); 569 string page_banner_title = GetString("Item.Banner_Image_Title"); 570 string page_text = GetString("Item.Text"); 571 string page_heading = GetString("Item.Heading"); 572 var pageService = new Dynamicweb.Content.PageService(); 573 var indexPage = pageService.GetFirstPageForArea(Pageview.AreaID); 574 var topPage = pageService.GetPage(GetInteger("DwTopPageID")); 575 576 var selfservice_list = GetLoop("Item.SelfService_List.Options"); 577 bool page_show_latest_news = GetBoolean("Item.Show_Latest_News"); 578 579 string page_area = GetString("Item.Site_Area"); 580 if (string.IsNullOrEmpty(page_area) && topPage != null && !topPage.IsFolder && topPage.Item["Site_Area"] != null) 581 { 582 page_area = (string)topPage.Item["Site_Area"]; 583 } 584 585 Dictionary<Dynamicweb.Content.Page, System.Collections.Generic.IEnumerable<Dynamicweb.Content.Page>> menuPages = new Dictionary<Dynamicweb.Content.Page, System.Collections.Generic.IEnumerable<Dynamicweb.Content.Page>>(); 586 587 // LLA --------------------------- 588 string colClass = "col-md-8"; 589 bool rightCol = false; 590 string selfserviceList = GetString("Item.SelfService_List"); 591 string sidebar = GetString("DwContent(contentsidebar)"); 592 593 if (!string.IsNullOrWhiteSpace(selfserviceList) || page_show_latest_news || !string.IsNullOrWhiteSpace(sidebar)) 594 { 595 rightCol = true; 596 } 597 598 if (!rightCol) 599 { 600 colClass = "col-md-12"; 601 } 602 } 603 604 @*<style> 605 @@media (min-width: 992px) { 606 main { 607 padding-left: 0; 608 } 609 } 610 611 main .breadcrumb { 612 padding: 0 0 8px 0; 613 margin-bottom:0; 614 } 615 616 .main-container { 617 margin-top: 30px; 618 } 619 620 .img-cover-bg { 621 margin-top: 15px; 622 margin-bottom: 30px; 623 } 624 </style>*@ 625 626 <!-- -- -- -- SCROLL MENU -- -- -- --> 627 628 @{ 629 //var topPage = pageService.GetPage(GetInteger("DwTopPageID")); 630 631 //string page_area = GetString("Item.Site_Area"); 632 //if (string.IsNullOrEmpty(page_area) && topPage != null && !topPage.IsFolder && topPage.Item["Site_Area"] != null) 633 //{ 634 // page_area = (string)topPage.Item["Site_Area"]; 635 //} 636 } 637 638 639 640 641 642 643 <div id="main-nav"> 644 <div class="container"> 645 646 @*<nav class="navbar navbar-default scroll CustomHidden navbar-fixed-top hidden-sm hidden-xs"> 647 <div class="container">*@ 648 <nav class="navbar navbar-default main-nav CustomHidden hidden-sm hidden-xs"> 649 <div class=""> 650 651 <ul class="scroolNav"> 652 @foreach (Dynamicweb.Content.Page rootPage in pageService.GetRootPagesForArea(GetInteger("DwAreaID"))) 653 { 654 var childPages = pageService.GetPagesByParentID(rootPage.ID); 655 656 if (rootPage.ItemType != "Page_Root" || !rootPage.Active) 657 { 658 continue; 659 } 660 661 string rootPageArea = (string)rootPage.Item["Site_Area"]; 662 663 string liClass = "nav-tab area-color-" + rootPageArea; 664 if (childPages.Any()) 665 { 666 liClass += " hasChildren"; 667 } 668 669 //if (topPage.ID == rootPage.ID) {liClass += " inpath";} 670 671 int dataInpath = 0; 672 if (topPage.ID == rootPage.ID || topPage.MenuText == rootPage.MenuText) 673 { 674 dataInpath = 1; 675 } 676 677 string rootPageIcon = (string)rootPage.Item["Site_Area"]; 678 string wrapperclass = "flexChild columnParent scroll-dropdown hidden area-color-" + rootPageIcon; 679 680 <li class="@liClass" data-inpath="@dataInpath"> 681 <a href="@rootPage.GetPageHrefValue()" id=""> 682 @rootPage.MenuText 683 684 @*@if (rootPageIcon == "warning_counter") { 685 <span class="counter"> 686 <text>@warning_counter</text> 687 </span> 688 }*@ 689 </a> 690 691 @if (childPages.Any()) 692 { 693 694 string rootPageInfoText = (string)rootPage.Item["Info_Text"]; 695 696 <div class="@wrapperclass" data-root-page="@rootPage.ID"> 697 <div class="flexChild rowParent"> 698 <div class="flexChild"> 699 <ul class="column_3"> 700 701 @foreach (var childPage in childPages) 702 { 703 704 if (!childPage.Active) 705 { 706 continue; 707 } 708 709 <li><a href="@childPage.GetPageHrefValue()">@childPage.MenuText</a></li> 710 } 711 </ul> 712 </div> 713 </div> 714 715 @if (!string.IsNullOrWhiteSpace(rootPageInfoText)) 716 { 717 718 string rootPageInfoLink = (string)rootPage.Item["Info_Link"]; 719 string rootpageinfotextclass = !string.IsNullOrWhiteSpace(rootPageInfoLink) ? "col-md-8 col-sm-9 col-xs-12" : "col-md-11 col-sm-10 col-xs-12"; 720 721 <a href="@rootPageInfoLink" class="rowParent info row"> 722 <div class="col-md-1 col-sm-2 col-xs-12"> 723 <img src="/Files/Templates/Designs/SF2019/img/Icons/icon-i.png"> 724 </div> 725 <div class="@rootpageinfotextclass"> 726 @rootPageInfoText 727 </div> 728 @if (!string.IsNullOrWhiteSpace(rootPageInfoLink)) 729 { 730 <div class="col-md-2 col-md-offset-1 col-sm-2 col-sm-offset-0 col-xs-12"> 731 <span class="btn btn-success pull-right">@Translate("Menu_Info_Button", "Læs mere")</span> 732 </div> 733 } 734 </a> 735 } 736 </div> 737 } 738 </li> 739 } 740 </ul> 741 </div> 742 </nav> 743 </div> 744 </nav></div> 745 746 747 <div class="container"> 748 <div class="row"> 749 750 <div class="col-md-12"> 751 @if (!string.IsNullOrWhiteSpace(page_banner)) 752 { 753 <div class="img-cover-bg"> 754 <img src="@page_banner" alt="@page_banner_alt" title="@page_banner_title"> 755 </div> 756 } 757 </div> 758 759 <div class="col-md-12 main-container"> 760 <div class="row"> 761 762 <div class="@colClass"> 763 764 <main id="content" class="page"> 765 @RenderNavigation(new { 766 startlevel = 1, 767 endlevel = 99, 768 template = "Breadcrumb.xslt", 769 expandmode = "All", 770 parentid = 0, 771 areaid = Pageview.AreaID, 772 includemode = "All", 773 _pageFirstId = indexPage.ID, 774 _pageFirstTitle = (string)indexPage.Item["Title"] 775 }) 776 777 @*@if (!string.IsNullOrWhiteSpace(page_banner)){<div class="img-cover-bg"><img src="@page_banner" alt="@page_banner_alt" title="@page_banner_title"></div>}*@ 778 779 <section class="flexbox-row"> 780 @if (!string.IsNullOrWhiteSpace(page_heading) || !string.IsNullOrWhiteSpace(page_text)) 781 { 782 <article class="col-md-12"> 783 @if (!string.IsNullOrWhiteSpace(page_heading)) 784 { 785 <h1>@page_heading</h1> 786 } 787 @if (!string.IsNullOrWhiteSpace(page_text)) 788 { 789 @page_text 790 } 791 </article> 792 } 793 794 @GetValue("DwContent(contentarea)") 795 796 @* ADD THIS *@ 797 @*<div class="col-xs-12 sns"> 798 @Translate("Del siden"): 799 <div class="addthis_toolbox addthis_default_style "> 800 <a class="addthis_button_facebook"></a> 801 <a class="addthis_button_linkedin"></a> 802 <a class="addthis_button_email"></a> 803 <a class="addthis_button_print"></a> 804 <a class="addthis_button_compact"></a> 805 </div> 806 <script type="text/javascript">var addthis_config = { data_track_addressbar: false };</script> 807 <script src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-51c009407d4aa776"></script> 808 </div>*@ 809 810 </section> 811 </main> 812 </div> 813 814 <div class="col-md-4 custom-left-side"> 815 816 <!-- -- -- -- LEFT MENU -- -- -- --> 817 @*<div id="nav-container" class="flexChild rowParent left-nav-subpage">[Include file '_LeftM enu.cshtml' not found in 'Templates/Designs/SF2019/Page.cshtml']</div>*@ 818 819 <!-- -- -- -- SCROLL MENU -- -- -- --> 820 @*@{ 821 //var topPage = pageService.GetPage(GetInteger("DwTopPageID")); 822 823 //string page_area = GetString("Item.Site_Area"); 824 //if (string.IsNullOrEmpty(page_area) && topPage != null && !topPage.IsFolder && topPage.Item["Site_Area"] != null) 825 //{ 826 // page_area = (string)topPage.Item["Site_Area"]; 827 //} 828 } 829 830 <nav class="navbar navbar-default scroll CustomHidden navbar-fixed-top hidden-sm hidden-xs"> 831 <div class="container"> 832 833 <ul class="scroolNav"> 834 @foreach (Dynamicweb.Content.Page rootPage in pageService.GetRootPagesForArea(GetInteger("DwAreaID"))) 835 { 836 var childPages = pageService.GetPagesByParentID(rootPage.ID); 837 838 if (rootPage.ItemType != "Page_Root" || !rootPage.Active) 839 { 840 continue; 841 } 842 843 string rootPageArea = (string)rootPage.Item["Site_Area"]; 844 845 string liClass = "nav-tab area-color-" + rootPageArea; 846 if (childPages.Any()) 847 { 848 liClass += " hasChildren"; 849 } 850 851 //if (topPage.ID == rootPage.ID) {liClass += " inpath";} 852 853 int dataInpath = 0; 854 if (topPage.ID == rootPage.ID || topPage.MenuText == rootPage.MenuText) 855 { 856 dataInpath = 1; 857 } 858 859 string rootPageIcon = (string)rootPage.Item["Site_Area"]; 860 string wrapperclass = "flexChild columnParent scroll-dropdown hidden area-color-" + rootPageIcon; 861 862 <li class="@liClass" data-inpath="@dataInpath"> 863 <a href="@rootPage.GetPageHrefValue()" id=""> 864 @rootPage.MenuText 865 866 @if (rootPageIcon == "warning_counter") { 867 if (Dynamicweb.Caching.Cache.Current.Get("warning_counter") != null) { 868 <span class="counter"> 869 <text>@Dynamicweb.Caching.Cache.Current.Get("warning_counter")</text> 870 </span> 871 } 872 873 } 874 </a> 875 876 @if (childPages.Any()) 877 { 878 879 string rootPageInfoText = (string)rootPage.Item["Info_Text"]; 880 881 <div class="@wrapperclass" data-root-page="@rootPage.ID"> 882 <div class="flexChild rowParent"> 883 <div class="flexChild"> 884 <ul class="column_3"> 885 886 @foreach (var childPage in childPages) 887 { 888 889 if (!childPage.Active) 890 { 891 continue; 892 } 893 894 <li><a href="@childPage.GetPageHrefValue()">@childPage.MenuText</a></li> 895 } 896 </ul> 897 </div> 898 </div> 899 900 @if (!string.IsNullOrWhiteSpace(rootPageInfoText)) 901 { 902 903 string rootPageInfoLink = (string)rootPage.Item["Info_Link"]; 904 string rootpageinfotextclass = !string.IsNullOrWhiteSpace(rootPageInfoLink) ? "col-md-8 col-sm-9 col-xs-12" : "col-md-11 col-sm-10 col-xs-12"; 905 906 <a href="@rootPageInfoLink" class="rowParent info row"> 907 <div class="col-md-1 col-sm-2 col-xs-12"> 908 <img src="/Files/Templates/Designs/SF2019/img/Icons/icon-i.png"> 909 </div> 910 <div class="@rootpageinfotextclass"> 911 @rootPageInfoText 912 </div> 913 @if (!string.IsNullOrWhiteSpace(rootPageInfoLink)) 914 { 915 <div class="col-md-2 col-md-offset-1 col-sm-2 col-sm-offset-0 col-xs-12"> 916 <span class="btn btn-success pull-right">@Translate("Menu_Info_Button", "Læs mere")</span> 917 </div> 918 } 919 </a> 920 } 921 </div> 922 } 923 </li> 924 } 925 </ul> 926 </div> 927 </nav> 928 *@ 929 930 <!-- SUB MENU --> 931 932 933 934 935 @if (!string.IsNullOrWhiteSpace(GetString("Item.SelfService_List"))) { 936 <div class="box-container dark-grey sub-menu hidden-sm hidden-xs"> 937 <div class="flex-item-top"> 938 <h3>@Translate("Genveje til selvbetjening")</h3> 939 <ul> 940 @foreach (var s in selfservice_list.Where(o => o.GetBoolean("Item.SelfService_List.Option.IsSelected"))) { 941 Dynamicweb.Content.Page selfServicePage = pageService.GetPageForItem("Page_SelfService", s.GetString("Item.SelfService_List.Option.Value")); 942 if (selfServicePage.Active) { 943 string selfServicePageLink = "/Default.aspx?ID=" + selfServicePage.ID; 944 <li><a href="@selfServicePageLink">@s.GetString("Item.SelfService_List.Option.Label")</a></li> 945 } 946 947 } 948 </ul> 949 </div> 950 951 <div class="flex-item-bottom"> 952 <i class="icon icon-customer_service"></i> 953 </div> 954 </div> 955 } 956 957 <!-- Latest news for area --> 958 @if (page_show_latest_news) 959 { 960 DateTime now = DateTime.Now; 961 962 //pageService.GetPagesForItems( new List<string>() { "Page_News" }); 963 foreach (var i in pageService.GetPagesForItems(new List<string>() { "Page_News" }) 964 .Where(x => x.Active && x.Item["Site_Area"] != null && ((string)x.Item["Site_Area"]).IndexOf(page_area) > -1 965 && x.Item["Publishing_Date_Start"] != null 966 && ((DateTime)x.Item["Publishing_Date_Start"] < now 967 && (x.Item["Unpublishing_Date_Start"] == null || (DateTime)x.Item["Unpublishing_Date_Start"] > now))) 968 .OrderByDescending(x => x.Item["Is_Pinned"]).ThenByDescending(x => x.Item["Publishing_Date_Start"])) 969 { 970 971 string list_image = i.Item["Preview_Image"] != null ? (string)i.Item["Preview_Image"] : string.Empty; 972 string list_text = i.Item["Preview_Text"] != null ? (string)i.Item["Preview_Text"] : string.Empty; 973 974 <a href="/Default.aspx?ID=@i.ID" class="box-container grey"> 975 <div class="flex-item-top"> 976 @if (!string.IsNullOrWhiteSpace(list_image)) 977 { 978 <img src="@list_image" class="img-responsive"> 979 } 980 <h3>@i.MenuText</h3> 981 @list_text 982 </div> 983 984 <div class="flex-item-bottom row"> 985 <div class="col-md-8 col-sm-6"> 986 @if (i.Item["Site_Area"] != null) 987 { 988 foreach (string t in ((string)i.Item["Site_Area"]).Split(',')) 989 { 990 <i class="icon icon-@t"></i> 991 } 992 } 993 </div> 994 <div class="col-md-4 col-sm-6"> 995 <span type="button" class="btn btn-success pull-right">@Translate("News_Spot_Button", "Læs mere")</span> 996 </div> 997 </div> 998 </a> 999 break; 1000 } 1001 1002 1003 } 1004 1005 <div class="flexbox-row box-row"> 1006 @RenderSnippet("sidebar") 1007 </div> 1008 1009 </div> 1010 </div> 1011 </div> 1012 1013 </div> 1014 1015 </div> 1016 @SnippetStart("PageJs") 1017 <script> 1018 function goBack() { 1019 window.history.back(); 1020 } 1021 1022 $(document).ready(function () { 1023 $('#nav-container').on({ 1024 focusout: function (e) { 1025 $(this).data('submenuTimer', setTimeout(function () { 1026 $(".nav-tabs > a.hasChildren.active").removeClass('active'); 1027 $('#nav-container').find(".nav-dropdown").addClass('hidden'); 1028 }.bind(this), 0)); 1029 }, 1030 focusin: function (e) { 1031 clearTimeout($(this).data('submenuTimer')); 1032 }, 1033 keydown: function (e) { 1034 if (e.which === 27) { 1035 $(".nav-tabs > a.hasChildren.active").removeClass('active'); 1036 $('#nav-container').find(".nav-dropdown").addClass('hidden'); 1037 e.preventDefault(); 1038 } 1039 } 1040 }); 1041 }); 1042 $(".nav-tabs > a.hasChildren").click(function (evt) { 1043 evt.preventDefault(); 1044 $(this).siblings().removeClass('active'); 1045 $(this).toggleClass('active'); 1046 1047 var currentRootPageId = $(this).attr('data-root-page'); 1048 var parentRow = $(this).closest('#nav-container'); 1049 $('#nav-container').find(".nav-dropdown[data-root-page='" + currentRootPageId + "']").toggleClass('hidden'); 1050 $('#nav-container').find(".nav-dropdown[data-root-page!='" + currentRootPageId + "']").addClass('hidden'); 1051 }); 1052 1053 $(".scroolNav > li.hasChildren > a").click(function (evt) { 1054 1055 evt.preventDefault(); 1056 1057 var $parentLi = $(this).parent('li'); 1058 var $parentLiSiblings = $parentLi.siblings(); 1059 1060 $parentLiSiblings.removeClass('active'); 1061 $parentLiSiblings.find(".scroll-dropdown").addClass('hidden'); 1062 1063 $parentLi.toggleClass('active'); 1064 $parentLi.find(".scroll-dropdown").toggleClass('hidden'); 1065 }); 1066 1067 // STICKY MENU 1068 $(window).scroll(function () { 1069 if ($(this).scrollTop() > 650) { 1070 1071 $('.scroll').removeClass('CustomHidden'); 1072 $('.scroll').addClass('show'); 1073 } else { 1074 $('.scroll').addClass('CustomHidden'); 1075 $('.scroll').removeClass('show'); 1076 $('.scroll-dropdown').addClass('hidden'); 1077 $('.scroolNav > li.active').removeClass('active'); 1078 } 1079 }); 1080 1081 //$(".nav-tabs > a").mouseenter(function () { 1082 // $(this).siblings().removeClass('active'); 1083 // $(this).addClass('active'); 1084 1085 1086 // var currentRootPageId = $(this).attr('data-root-page'); 1087 // var parentRow = $(this).closest('#nav-container'); 1088 // $('#nav-container').find(".nav-dropdown[data-root-page='" + currentRootPageId + "']").removeClass('hidden'); 1089 // $('#nav-container').find(".nav-dropdown[data-root-page!='" + currentRootPageId + "']").addClass('hidden'); 1090 //}); 1091 //$("#nav-container").mouseleave(function () { 1092 // $(".nav-tabs > a").removeClass('active'); 1093 // $('#nav-container .nav-dropdown').addClass('hidden'); 1094 //}); 1095 </script> 1096 <!-- https://stackoverflow.com/questions/18325779/bootstrap-3-collapse-show-state-with-chevron-icon --> 1097 @SnippetEnd("PageJs") 1098 1099 1100 <footer id="footer"> 1101 1102 <div class="bg-grey"> 1103 <div class="container"> 1104 <div class="row"> 1105 <div class="col-lg-4 col-lg-offset-4 col-sm-6 col-sm-offset-3"> 1106 <a href="/Default.aspx?ID=4818" class="btn btn-white row no_padding center-block"> 1107 @*<span class="icon"><img src="@commentLogo" width="48" height="48" aria-hidden="true" alt="comment"></span>*@ 1108 <i class="far fa-comment-alt"></i> 1109 @Contact_Formular_Btn_Text 1110 </a> 1111 </div> 1112 1113 </div> 1114 </div> 1115 </div> 1116 1117 <div class="container"> 1118 <div class="row"> 1119 <div class="col-md-12"> 1120 <img src="@companyLogo" alt="@companyName" title="@companyName" class="img-responsive logo"> 1121 </div> 1122 <div class="col-lg-4 col-md-5 col-sm-12"> 1123 <div class="row"> 1124 1125 <div class="col-md-12 col-sm-6"> 1126 <address> 1127 <p> 1128 @companyAddress 1129 <br> 1130 @companyZipAndCity 1131 </p> 1132 <p> 1133 <a href="tel:@companyPhoneClean" target="_top">@companyPhone</a> 1134 <br> 1135 1136 @*<a href="mailto:@companyMail" target="_top">@companyMail</a>*@ 1137 @Rot13_Email(companyMail) 1138 </p> 1139 @*<p><a href="#" title="">Intranet</a></p>*@ 1140 1141 </address> 1142 </div> 1143 1144 <div class="col-md-12 col-sm-6"> 1145 @footerText 1146 </div> 1147 </div> 1148 </div> 1149 1150 <div class="col-lg-6 col-md-7 col-sm-12"> 1151 <div class="flexbox-row"> 1152 @foreach (var group in GetLoop("Item.Area.Footer_Links")) 1153 { 1154 <div class="flexbox-col-sm-6 flexbox-col-xs-12"> 1155 <h3>@group.GetString("Item.Area.Footer_Links.Text")</h3> 1156 <ul class="list-unstyled"> 1157 @foreach (var link in group.GetLoop("Item.Area.Footer_Links.List")) 1158 { 1159 string footerLink = link.GetString("Item.Area.Footer_Links.List.Link"); 1160 <li> 1161 <a href="@footerLink">@link.GetString("Item.Area.Footer_Links.List.Text")</a> 1162 </li> 1163 } 1164 </ul> 1165 </div> 1166 } 1167 </div> 1168 1169 </div> 1170 1171 <div class="col-md-12 text-right"> 1172 <div class="linkToIntranet"> 1173 <a href="https://intranet.silkeborgforsyning.dk/forside" target="_blank" title="Silkeborg Forsyning Intranet"> 1174 <i class="fal fa-lock-alt"></i> 1175 </a> 1176 1177 </div> 1178 1179 </div> 1180 </div> 1181 </div> 1182 1183 </footer> 1184 1185 1186 <!-- ------------------------------------------------------------------- --> 1187 1188 @{ 1189 //var categories = Dynamicweb.Environment.CookieManager.GetCategories(); 1190 string cookieChoiceId = "cookie-choice-renew"; 1191 string cookieWarningClass = "custom-cookie"; 1192 if (Dynamicweb.Environment.CookieManager.CookieOptInLevelExists) 1193 { 1194 cookieWarningClass += " \" style=\"display:none\" tab-index=\"-1\" aria-hidden=\"true\""; 1195 } 1196 else 1197 { 1198 cookieChoiceId += "\" style=\"display:none;"; 1199 } 1200 var cookieSettingsPage = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "cookiesettings"); 1201 } 1202 1203 @if (cookieSettingsPage != null && cookieSettingsPage.Item["CookieCategories"] != null) 1204 { 1205 var cookieCategoryItems = Dynamicweb.Content.Items.ItemList.GetItemListById((int)cookieSettingsPage.Item["CookieCategories"]).Relations; 1206 if (cookieCategoryItems.Any()) 1207 { 1208 1209 <div id="@cookieChoiceId" title="Cookie valg" aria-label="renew-consent"> 1210 <svg class="svg-inline--fa fa-cookie-bite fa-w-16" aria-hidden="true" focusable="false" data-prefix="fal" data-icon="cookie-bite" role="img" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 512 512" data-fa-i2svg=""><path fill="currentColor" d="M352 328c-13.25 0-24 10.74-24 24 0 13.25 10.75 24 24 24s24-10.75 24-24c0-13.26-10.75-24-24-24zM184 192c0-13.26-10.75-24-24-24s-24 10.74-24 24c0 13.25 10.75 24 24 24s24-10.75 24-24zm8 136c-13.25 0-24 10.74-24 24 0 13.25 10.75 24 24 24s24-10.75 24-24c0-13.26-10.75-24-24-24zm96-96c-13.25 0-24 10.74-24 24 0 13.25 10.75 24 24 24s24-10.75 24-24c0-13.26-10.75-24-24-24zm222.52 23.82c-69.97-.85-126.47-57.69-126.47-127.86-70.17 0-127-56.49-127.86-126.45C249.57.5 242.9 0 236.26 0c-20.68 0-41.18 4.85-59.79 14.33l-69.13 35.22a132.221 132.221 0 0 0-57.79 57.81l-35.1 68.88a132.645 132.645 0 0 0-12.82 80.95l12.08 76.28a132.555 132.555 0 0 0 37.16 72.96l54.77 54.76a132.036 132.036 0 0 0 72.71 37.06l76.71 12.14c6.86 1.09 13.76 1.62 20.64 1.62 20.72 0 41.25-4.88 59.89-14.38l69.13-35.22a132.221 132.221 0 0 0 57.79-57.81l35.1-68.88c12.56-24.63 17.01-52.57 12.91-79.9zm-41.42 65.36L434 390.07c-9.68 19-24.83 34.15-43.81 43.82l-69.13 35.22C307.08 476.23 291.39 480 275.7 480c-5.21 0-10.47-.41-15.63-1.23l-76.7-12.14c-21-3.33-40.05-13.04-55.09-28.08l-54.77-54.76c-15.1-15.09-24.84-34.23-28.18-55.33l-12.08-76.27c-3.35-21.12.02-42.36 9.72-61.41l35.1-68.88c9.68-19 24.83-34.15 43.81-43.82L191 42.85c11.33-5.77 23.8-9.33 36.51-10.46 13.15 63.15 63.84 112.95 127.25 124.86 11.91 63.42 61.71 114.11 124.87 127.25-1.1 12.73-4.64 25.14-10.53 36.68z"></path></svg> 1211 </div> 1212 <div id="cookieWarningContainer" class="@cookieWarningClass"> 1213 <form id="cookieWarningForm" method="post" action="/Admin/Public/CookieOptInLevelConfig.aspx"> 1214 <input type="hidden" name="cmd" value="SetCookieOptInLevel"> 1215 <input type="hidden" name="OptInLevel" id="OptInLevel" value="1"> 1216 1217 <fieldset> 1218 <div class="p-4"> 1219 <div class="row"> 1220 <div class="col-xs-12"> 1221 <h2>@cookieSettingsPage.Item["CookieHeader"]</h2> 1222 @cookieSettingsPage.Item["CookieIntro"] 1223 <hr class="w-100"> 1224 <p class="text-center"> 1225 <button type="button" class="btn btn-naked ml-3" onclick="setOptInCookie(1);">@Translate("Tillad valgte")</button> 1226 <button type="button" class="rm-button btn btn-primary ml-3" onclick="setOptInCookie(2);">@Translate("Tillad alle")</button> 1227 </p> 1228 1229 </div> 1230 </div> 1231 </div> 1232 @{ 1233 string showDetails = Translate("Vis detaljer"); 1234 string hideDetails = Translate("Skjul detaljer"); 1235 <div class="p-4"> 1236 <div class="grid"> 1237 @foreach (Dynamicweb.Content.Items.Item category in cookieCategoryItems) 1238 { 1239 string categoryName = "" + category["Name"]; 1240 string categorySysName = "" + category["SysName"]; 1241 string categoryID = "cookecategory-" + category.Id; 1242 string categoryDescription = "" + category["Description"]; 1243 var cookies = Dynamicweb.Content.Items.ItemList.GetItemListById((int)category["Cookies"]).Relations; 1244 1245 if (cookies.Any()) 1246 { 1247 <div class="col-xs-4"> 1248 <div class="custom-control custom-checkbox text-center" data-nogutter="1"> 1249 @if (categorySysName == "Essential") 1250 { 1251 <input type="checkbox" class="custom-control-input" id="chk-cookie-@categorySysName" value="@categorySysName" checked="checked" disabled=""> 1252 } 1253 else 1254 { 1255 if (AllowedCookieCategories.Contains(categorySysName)) 1256 { 1257 <input type="checkbox" class="custom-control-input" checked="checked" id="chk-cookie-@categorySysName" name="OptInCategory" value="@categorySysName"> 1258 } 1259 else 1260 { 1261 <input type="checkbox" class="custom-control-input" id="chk-cookie-@categorySysName" name="OptInCategory" value="@categorySysName"> 1262 } 1263 } 1264 <label class="custom-control-label" for="chk-cookie-@categorySysName"></label> 1265 1266 <span class="d-inline-block">@categoryName</span> 1267 1268 </div> 1269 </div> 1270 } 1271 } 1272 1273 </div> 1274 <div class="row"> 1275 <div class="col-xs-12"> 1276 <hr class="w-100"> 1277 <p class="text-center"> 1278 <button class="btn btn-naked collapsed" id="cookie-details-button" data-toggle="collapse" role="button" aria-expanded="false" data-open-text="@showDetails" data-close-text="@hideDetails" aria-controls="collapse-cookie-info-container"> 1279 @showDetails 1280 </button> 1281 </p> 1282 </div> 1283 </div> 1284 </div> 1285 <div class="collapse" id="collapse-cookie-info-container"> 1286 <div class="cookie-info-container"> 1287 <div class="mb-4"> 1288 @foreach (Dynamicweb.Content.Items.Item category in cookieCategoryItems) 1289 { 1290 string categoryName = "" + category["Name"]; 1291 string categorySysName = "" + category["SysName"]; 1292 string categoryID = "cookecategory-" + category.Id; 1293 string categoryDescription = "" + category["Description"]; 1294 var cookies = Dynamicweb.Content.Items.ItemList.GetItemListById((int)category["Cookies"]).Relations; 1295 if (cookies.Any()) 1296 { 1297 <div class="d-block toogle-f-content" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="collapse-cookie-info-@categoryID"> 1298 <div class="row"> 1299 <div class="col-xs-12 col-sm-3 cookie-info-container-title"> 1300 <strong>@categoryName</strong> 1301 <i class="fa fa-angle-right" aria-hidden="true"></i> 1302 1303 </div> 1304 <div class="col-xs-12 col-sm-9"> 1305 @categoryDescription 1306 </div> 1307 </div> 1308 </div> 1309 <div class="collapse" id="collapse-cookie-info-@categoryID"> 1310 @foreach (Dynamicweb.Content.Items.Item cookie in cookies) 1311 { 1312 string titleClass = "col-xs-12 col-sm-3"; 1313 string contentClass = "col-xs-12 col-sm-9"; 1314 1315 <div class="grid p-1"> 1316 <div class="row collapse-cookie-info-header"> 1317 <div class="@titleClass"> 1318 <strong> 1319 @Translate("Databehandler") 1320 </strong> 1321 </div> 1322 <div class="@contentClass"> 1323 <p>@cookie["DataProcessor"]</p> 1324 </div> 1325 </div> 1326 <div class="row"> 1327 <div class="@titleClass"> 1328 <strong> 1329 @Translate("Formål") 1330 </strong> 1331 </div> 1332 <div class="@contentClass"> 1333 @cookie["Purpose"] 1334 </div> 1335 <div class="@titleClass"> 1336 <strong> 1337 @Translate("Privatlivspolitik:") 1338 </strong> 1339 </div> 1340 <div class="@contentClass"> 1341 <p><a target="_blank" href="@cookie[" privacypolicy"]"="">@cookie["PrivacyPolicy"]</a></p> 1342 </div> 1343 <div class="@titleClass"> 1344 <strong> 1345 @Translate("Udløb") 1346 </strong> 1347 </div> 1348 <div class="@contentClass"> 1349 <p>@cookie["Expires"]</p> 1350 </div> 1351 <div class="@titleClass"> 1352 <strong> 1353 @Translate("Navn") 1354 </strong> 1355 </div> 1356 <div class="@contentClass"> 1357 <p>@cookie["Name"]</p> 1358 </div> 1359 <div class="@titleClass"> 1360 <strong> 1361 @Translate("Udbyder") 1362 </strong> 1363 </div> 1364 <div class="@contentClass"> 1365 <p>@cookie["Provider"]</p> 1366 </div> 1367 </div> 1368 </div> 1369 } 1370 </div> 1371 1372 } 1373 } 1374 </div> 1375 </div> 1376 </div> 1377 1378 } 1379 </fieldset> 1380 </form> 1381 1382 <script> 1383 document.getElementById("cookie-choice-renew").onclick = function () { 1384 showCookieChoice(); 1385 }; 1386 document.getElementById("cookie-details-button").onclick = function () { 1387 1388 if (this.classList.contains("opened")) { 1389 this.text = this.getAttribute("data-open-text"); 1390 this.classList.remove("opened"); 1391 document.getElementById("collapse-cookie-info-container").classList.remove("show"); 1392 } else { 1393 this.text = this.getAttribute("data-close-text"); 1394 this.classList.add("opened"); 1395 1396 document.getElementById("collapse-cookie-info-container").classList.add("show"); 1397 } 1398 }; 1399 var cookieExtraInfoElements = document.getElementsByClassName("toogle-f-content"); 1400 for (var i = 0; i < cookieExtraInfoElements.length; i++) { 1401 1402 cookieExtraInfoElements[i].onclick = function () { 1403 var elementToToggle = this.getAttribute("aria-controls"); 1404 if (this.classList.contains("opened")) { 1405 this.classList.remove("opened"); 1406 document.getElementById(elementToToggle).classList.remove("show"); 1407 } else { 1408 this.classList.add("opened"); 1409 document.getElementById(elementToToggle).classList.add("show"); 1410 } 1411 } 1412 } 1413 1414 1415 function setOptInCookie(optInLevel) { 1416 document.getElementById("OptInLevel").value = optInLevel; 1417 var formElement = document.getElementById("cookieWarningForm"); 1418 if (optInLevel == 1) { 1419 var essentialElement = document.createElement('input'); 1420 if (document.getElementById('cookie-essential') === null) { 1421 essentialElement.setAttribute("name", "OptInCategory"); 1422 essentialElement.setAttribute("value", "Essential"); 1423 essentialElement.setAttribute("type", "hidden"); 1424 essentialElement.setAttribute("id", "cookie-essential"); 1425 formElement.appendChild(essentialElement); 1426 } 1427 1428 if (document.getElementById("chk-cookie-Marketing").checked && typeof fbq !== 'undefined') { 1429 fbq('consent', 'grant'); 1430 } 1431 } 1432 if (optInLevel == 2) { 1433 document.getElementById("chk-cookie-Statistical").checked = true; 1434 document.getElementById("chk-cookie-Marketing").checked = true; 1435 if (typeof fbq !== 'undefined') { 1436 fbq('consent', 'grant'); 1437 } 1438 1439 } 1440 var formData = new FormData(formElement); 1441 1442 var xmlhttp = new XMLHttpRequest(); 1443 xmlhttp.onreadystatechange = function () { 1444 if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 1445 hideCookieChoice(); 1446 return false; 1447 } 1448 } 1449 1450 xmlhttp.open(formElement.method, formElement.action); 1451 xmlhttp.send(formData); 1452 1453 return false; 1454 } 1455 function showCookieChoice() { 1456 1457 var cookieWarningContainer = document.getElementById("cookieWarningContainer"); 1458 cookieWarningContainer.style.display = "flex"; 1459 cookieWarningContainer.removeAttribute("tab-index"); 1460 cookieWarningContainer.removeAttribute("aria-hidden"); 1461 document.getElementById("cookie-choice-renew").style.display = "none"; 1462 } 1463 function hideCookieChoice() { 1464 1465 var cookieWarningContainer = document.getElementById("cookieWarningContainer"); 1466 cookieWarningContainer.style.display = "none"; 1467 cookieWarningContainer.setAttribute("tab-index", "-1"); 1468 cookieWarningContainer.setAttribute("aria-hidden", "true"); 1469 document.getElementById("cookie-choice-renew").style.display = "block"; 1470 } 1471 </script> 1472 </div> 1473 } 1474 1475 } 1476 1477 1478 <!-- ------------------------------------------------------------------- --> 1479 @{ 1480 1481 } 1482 <script src="https://code.jquery.com/jquery-migrate-3.0.0.min.js"></script> 1483 <script src="/Files/Templates/Designs/SF2019/js/plugins.js"></script> 1484 <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script> 1485 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> 1486 <script src="https://cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.11.1/typeahead.bundle.min.js"></script> 1487 <script src="/Files/Templates/Designs/SF2019/assets/formvalidation/js/formValidation.min.js"></script> 1488 <script src="/Files/Templates/Designs/SF2019/assets/formvalidation/js/framework/bootstrap.min.js"></script> 1489 <script src="/Files/Templates/Designs/SF2019/assets/formvalidation/js/language/da_DK.js"></script> 1490 <script src="/Files/Templates/Designs/SF2019/js/custom.js"></script> 1491 1492 @* -- WCAG -- *@ 1493 <script src="https://cdn.polyfill.io/v2/polyfill.js?features=Element.prototype.classList"></script> 1494 <script src="https://unpkg.com/focus-visible"></script> 1495 1496 @* COOKIE *@ 1497 @*<script type="text/javascript"> 1498 window.cookieconsent_options = { 1499 'title': 'Cookies', 1500 'message': 'Denne hjemmeside anvender cookies til statistik og indstillinger. Ved at bruge hjemmesiden accepterer du dette.', 1501 'dismiss': 'OK', 1502 'learnMore': 'Klik og læs mere her', 1503 //'link': '/cookies', 1504 'link': '/Default.aspx?ID=5785', 1505 'target': '_self', 1506 'theme': null, 1507 'markup': [ 1508 '<div class="cookie-banner-wrapper">', 1509 '<div class="cookie-container">', 1510 '<div class="container">', 1511 '<div class="row">', 1512 '<div class= "col-md-12" >', 1513 '<h3 class="cookie-title">', 1514 '{{options.title}} ', 1515 '</h3>', 1516 '</div >', 1517 '<div class= "col-md-7" >', 1518 '<p class="cookie-message">', 1519 '{{options.message}} ', 1520 '<a data-cc-if="options.link" target="{{options.target}}" class="cookie-more-info" href="{{options.link || "#null"}}">{{options.learnMore}}</a>', 1521 '</p>', 1522 '</div>', 1523 '<div class= "col-md-4 col-md-offset-1" >', 1524 '<a href="/home" data-cc-event="click:dismiss" target="_blank" class="cookie-btn btn btn-black">{{options.dismiss}}</a>', 1525 '</div >', 1526 '</div >', 1527 '</div>', 1528 '</div>', 1529 '</div>' 1530 ] 1531 }; 1532 </script> 1533 <script src="https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/1.0.10/cookieconsent.min.js"></script>*@ 1534 1535 @* /COOKIE *@ 1536 1537 @RenderSnippet("PageJs") 1538 @RenderSnippet("MapScript") 1539 @RenderSnippet("RenderWarningIconScript") 1540 1541 </div></body> 1542 </html>