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