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_77edeed38d5f460aa2bd791c16cbd886.Execute() in E:\dynamicweb.net\Solutions\Upsite\SilkeborgForsyningWebsite.net.dynamicweb.dk\Application\Files\Templates\Designs\SF2019\_parsed\Page.parsed.cshtml:line 95
   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 var pageService = Dynamicweb.Services.Pages; 76 var indexPage = Dynamicweb.Services.Pages.GetFirstPageForArea(Pageview.AreaID); 77 var topPage = Dynamicweb.Services.Pages.GetPage(GetInteger("DwTopPageID")); 78 79 string designBaseUrl = GetString("Template:DesignBaseUrl"); 80 string commentLogo = designBaseUrl + "img/Icons/icon-commenting.png"; 81 commentLogo = "/Admin/Public/GetImage.ashx?Image=" + commentLogo + "&Format=" + commentLogo.Substring(commentLogo.LastIndexOf(".")) + "&Width=" + 48 + "&Crop=6&DoNotUpscale=1"; 82 83 var bannerCookie = Dynamicweb.Environment.CookieManager.GetCookie("infobanner"); 84 85 86 int ServiceMenuID = GetInteger("Item.Area.Service_Menu_ID"); 87 int searchPageID = 4868; 88 var searchPage = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "searchresult"); 89 90 91 string device = Dynamicweb.Frontend.Devices.DeviceInfo.ParseFromUserAgentString(Dynamicweb.Context.Current.Request.UserAgent).DeviceType.ToString(); 92 bool isMobile = device == "Mobile"; 93 int image_full_width = isMobile || device == "Bot" ? 400 : device == "Tablet" ? 720 : 1140; 94 string pageTitle = GetString("Title"); 95 if (Pageview.Item.SystemName == "Waste_Place") 96 { 97 pageTitle = GetString("Item.Text"); 98 if (pageTitle.IndexOf("(pil)") > 0) 99 { 100 pageTitle = pageTitle.Substring(pageTitle.IndexOf("(pil)") + 6); 101 } 102 103 Dynamicweb.Frontend.PageView.Current().Meta.Title = pageTitle; 104 } 105 if (GetString("Item.SystemName") == "Page_News") 106 { 107 pageTitle = "Nyhed - " + pageTitle; 108 Dynamicweb.Frontend.PageView.Current().Meta.Title = pageTitle; 109 } 110 111 // COOKIE-------------------------- - 112 IList<string> AllowedCookieCategories = new List<string>() { "Essential" }; 113 foreach (string s in CookieManager.GetCategories()) 114 { 115 if (s == "Essential") 116 { 117 continue; 118 } 119 else if (CookieManager.CookieOptInLevelExists && (CookieManager.GetCookieOptInLevel() == CookieOptInLevel.All || (CookieManager.CookieOptInLevelExists && System.Web.HttpContext.Current.Request.Cookies.Get("Dynamicweb.CookieOptInLevel").Value.IndexOf(s) > -1))) 120 { 121 AllowedCookieCategories.Add(s); 122 } 123 } 124 125 //var categories = Dynamicweb.Environment.CookieManager.GetCategories(); 126 string cookieChoiceId = "cookie-choice-renew"; 127 string cookieWarningClass = "custom-cookie"; 128 if (Dynamicweb.Environment.CookieManager.CookieOptInLevelExists) 129 { 130 cookieWarningClass += " \" style=\"display:none\" tab-index=\"-1\" aria-hidden=\"true\""; 131 } 132 else 133 { 134 cookieChoiceId += "\" style=\"display:none;"; 135 } 136 var cookieSettingsPage = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "cookiesettings"); 137 138 //bool cookieActivated = cookieSettingsPage != null && cookieSettingsPage.Item["CookieActivated"] != null ? (bool)cookieSettingsPage.Item["CookieActivated"] : false; 139 bool cookieActivated = true; 140 141 // /COOKIE --------------------------- 142 } 143 144 @helper iconLink(string image_name, int size, string rel, string type = "") 145 { 146 string iconfileurl = GetString("Template:DesignBaseUrl") + "img/Icons/Fav/" + image_name + "-" + size + "x" + size + ".png"; 147 string iconLink = "/Admin/Public/GetImage.ashx?Image=" + iconfileurl + "&Format=" + iconfileurl.Substring(iconfileurl.LastIndexOf(".")) + "&Width=" + size + "&Crop=6&DoNotUpscale=1"; 148 if (!string.IsNullOrWhiteSpace(iconLink)) 149 { 150 <link rel="@rel" sizes="@(size)x@(size)" href="@iconLink"> 151 } 152 else 153 { 154 <link rel="@rel" type="@type" sizes="@(size)x@(size)" href="@iconLink"> 155 } 156 157 } 158 <!DOCTYPE html> 159 <html lang="@Pageview.Area.CultureInfo.TwoLetterISOLanguageName"> 160 <head> 161 <meta charset="utf-8"> 162 <title>@GetValue("Title")</title> 163 @GetValue("MetaTags") 164 @GetValue("CopyRightNotice") 165 166 <meta title="@pageTitle"> 167 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 168 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> 169 170 @* FAV *@ 171 @iconLink("apple-icon", 57, "apple-touch-icon") 172 @iconLink("apple-icon", 60, "apple-touch-icon") 173 @iconLink("apple-icon", 72, "apple-touch-icon") 174 @iconLink("apple-icon", 76, "apple-touch-icon") 175 @iconLink("apple-icon", 114, "apple-touch-icon") 176 @iconLink("apple-icon", 120, "apple-touch-icon") 177 @iconLink("apple-icon", 144, "apple-touch-icon") 178 @iconLink("apple-icon", 152, "apple-touch-icon") 179 @iconLink("apple-icon", 180, "apple-touch-icon") 180 @iconLink("android-icon", 192, "icon", "image/png") 181 @iconLink("favicon", 32, "icon", "image/png") 182 @iconLink("favicon", 96, "icon", "image/png") 183 @iconLink("favicon", 16, "icon", "image/png") 184 <link rel="manifest" href="@(designBaseUrl)img/Icons/Fav/manifest.json"> 185 <meta name="msapplication-TileColor" content="#ffffff"> 186 <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"> 187 <meta name="theme-color" content="#ffffff"> 188 189 @if (!string.IsNullOrWhiteSpace(googleAnalytics) && AllowedCookieCategories.Contains("Statistical")) 190 { 191 <!-- Google Analytics --> 192 <script> 193 (function (i, s, o, g, r, a, m) { 194 i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { 195 (i[r].q = i[r].q || []).push(arguments) 196 }, i[r].l = 1 * new Date(); a = s.createElement(o), 197 m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) 198 })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'); 199 200 ga('create', '@googleAnalytics', 'auto'); 201 ga('set', 'anonymizeIp', true); 202 ga('send', 'pageview'); 203 </script> 204 <!-- End Google Analytics --> 205 } 206 207 @*<link rel="stylesheet" href="@(designBaseUrl)assets/fontawesome-pro/css/fontawesome.min.css">*@ 208 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==" crossorigin="anonymous" referrerpolicy="no-referrer"> 209 210 <!-- BOOTSTRAP --> 211 <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous"> 212 <link href="/Files/Templates/Designs/SF2019/assets/formvalidation/css/formValidation.min.css" rel="stylesheet"> 213 214 <!-- CUSTOM --> 215 <link href="@(designBaseUrl)/css/simple-lightbox.min.css" rel="stylesheet"> 216 <link href="@(designBaseUrl)/css/style.min.css?v=1" rel="stylesheet"> 217 218 <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script> 219 220 <script defer="" src="@(designBaseUrl)assets/fontawesome-pro/js/all.min.js"></script> 221 222 <meta name="facebook-domain-verification" content="u5pkvaq9s1j7c8z4yt55ies6rlbq83"> 223 224 <!-- Facebook Pixel Code --> 225 <script> 226 !function (f, b, e, v, n, t, s) { 227 if (f.fbq) return; n = f.fbq = function () { 228 n.callMethod ? 229 n.callMethod.apply(n, arguments) : n.queue.push(arguments) 230 }; 231 if (!f._fbq) f._fbq = n; n.push = n; n.loaded = !0; n.version = '2.0'; 232 n.queue = []; t = b.createElement(e); t.async = !0; 233 t.src = v; s = b.getElementsByTagName(e)[0]; 234 s.parentNode.insertBefore(t, s) 235 }(window, document, 'script', 236 'https://connect.facebook.net/en_US/fbevents.js'); 237 fbq('init', '1159581371178090'); 238 fbq('track', 'PageView'); 239 </script> 240 <noscript> 241 <img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1159581371178090&ev=PageView&noscript=1"> 242 </noscript> 243 <!-- End Facebook Pixel Code --> 244 245 @GetValue("Stylesheets") 246 @GetValue("Javascripts") 247 </head> 248 249 <body data-rootpage="@topPageName" data-rootpageid="@topPageId" class=""> 250 251 @* -- -- -- -- -- MOBILE NAV -- -- -- -- -- *@ 252 <div class="container-fluid d-lg-none"> 253 <div class="floatcontainer"> 254 <div class="inner"> 255 <button type="button" class="btn-open" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> 256 <div> 257 <div class="nav-icon"> 258 <div></div> 259 </div> 260 </div> 261 </button> 262 </div> 263 </div> 264 </div> 265 266 <div class="zeynep-overlay"></div> 267 268 <div class="zeynep d-lg-none" style="transform: translateX(-295px);"> 269 270 <div class="golden-buzz"> 271 @{ 272 string searchInputValue = "" + Dynamicweb.Context.Current.Request.QueryString.Get("Search"); 273 } 274 @if (searchPage != null) 275 { 276 <div class="container"> 277 <div class="top-search"> 278 <div class="typeahead-wrapper"> 279 <div class="typeahead-input"> 280 <form method="get" action="/Default.aspx" role="search" onsubmit="searchSubmit(this)"> 281 <input type="hidden" name="Id" value="@searchPageID"> 282 283 <div class="input-group mb-3 search-field-wrapper"> 284 <input type="text" class="form-control" id="search-field" name="q" autocomplete="off" placeholder="Indtast søgeord" aria-label="Recipient's username" aria-describedby="search-btn" value=""> 285 <button class="btn btn-outline-secondary" type="submit" id="search-btn"> 286 <span> 287 <svg class="search-icon-svg" xmlns="http://www.w3.org/2000/svg" width="17.751" height="17.755" viewbox="0 0 17.751 17.755"> 288 <path class="a" d="M22.042,20.963,17.106,15.98a7.035,7.035,0,1,0-1.068,1.082l4.9,4.951a.76.76,0,0,0,1.072.028A.765.765,0,0,0,22.042,20.963ZM11.577,17.122a5.555,5.555,0,1,1,3.929-1.627A5.521,5.521,0,0,1,11.577,17.122Z" transform="translate(-4.5 -4.493)"></path> 289 </svg> 290 </span> 291 </button> 292 </div> 293 294 </form> 295 </div> 296 <div class="typeahead-menu tt-empty"></div> 297 </div> 298 </div> 299 </div> 300 } 301 302 </div> 303 304 <div class="main-nav"> 305 306 @RenderNavigation(new 307 { 308 startlevel = 1, 309 endlevel = 2, 310 template = "TopBarNav-Mobile.xslt", 311 expandmode = "All", 312 parentid = 0, 313 areaid = Pageview.AreaID, 314 includemode = "All" 315 }) 316 317 </div> 318 319 @* FOR LIVE: parentid = *@ 320 @* FOR LOCAL: parentid = 4807 *@ 321 @* FOR KVALITET: parentid = *@ 322 <div class="service-nav"> 323 324 @RenderNavigation(new 325 { 326 startlevel = 1, 327 endlevel = 99, // ÆNDRET TIL 99 fra 2, hvor det ikke fungere 328 template = "TopBarNav-Mobile.xslt", 329 expandmode = "All", 330 parentid = ServiceMenuID, 331 areaid = Pageview.AreaID, 332 includemode = "All", 333 }) 334 335 336 </div> 337 338 </div> 339 340 <div class="zeynep-overlay zeynep-overlay-under"></div> 341 @* -- -- -- -- -- /MOBILE NAV -- -- -- -- -- *@ 342 343 344 345 346 <header id="navSticky" class=""> 347 <div class="container d-none d-lg-block"> 348 <div class="row header-top"> 349 350 <div class="col-md-12"> 351 <nav class="service-menu navbar-default navbar-expand-md top-nav" aria-label="service menu"> 352 <div id="mymenu" class="collapse navbar-collapse w-100 mb-auto top-nav"> 353 @RenderNavigation(new 354 { 355 startlevel = 1, 356 endlevel = 99, 357 template = "TopBarNav.xslt", 358 expandmode = "All", 359 parentid = ServiceMenuID, 360 areaid = Pageview.AreaID, 361 includemode = "All" 362 }) 363 </div> 364 </nav> 365 </div> 366 367 </div> 368 369 </div> 370 371 <div class="container align-items-center justify-content-between"> 372 <div class="row"> 373 <div class="col-12 col-md-7 col-xl-8"> 374 <a href="/" class="logo" aria-label="Logo"> 375 376 377 <img src="@companyLogo" alt="@companyName" title="" class="img-fluid"> 378 379 <!--<img src="@companyLogo" alt="@companyName" title="" class="img-fluid d-none d-sm-block" />--> 380 @* MOBILE LOGO *@ 381 <!--<img src="@companyLogoAlternative" alt="@companyName" title="" class="img-fluid d-none d-md-none d-xs-block" />--> 382 383 </a> 384 </div> 385 386 <div class="col-12 col-md-5 col-xl-4 top-search-col d-none d-lg-block"> 387 <div class="top-search-wrapper w-100"> 388 <div class="top-search pull-right"> 389 <div class="typeahead-wrapper"> 390 <div class="typeahead-input"> 391 <form method="get" action="/Default.aspx" role="search" onsubmit="searchSubmit(this)"> 392 <input type="hidden" name="Id" value="@searchPageID"> 393 394 <div class="input-group mb-3 search-field-wrapper"> 395 <input type="text" class="form-control" id="search-field" name="q" autocomplete="off" placeholder="Indtast søgeord" aria-label="Recipient's username" aria-describedby="search-btn" value=""> 396 <button class="btn btn-outline-secondary" type="submit" id="search-btn"> 397 <span> 398 <svg class="search-icon-svg" xmlns="http://www.w3.org/2000/svg" width="17.751" height="17.755" viewbox="0 0 17.751 17.755"> 399 <path class="a" d="M22.042,20.963,17.106,15.98a7.035,7.035,0,1,0-1.068,1.082l4.9,4.951a.76.76,0,0,0,1.072.028A.765.765,0,0,0,22.042,20.963ZM11.577,17.122a5.555,5.555,0,1,1,3.929-1.627A5.521,5.521,0,0,1,11.577,17.122Z" transform="translate(-4.5 -4.493)"></path> 400 </svg> 401 </span> 402 </button> 403 </div> 404 405 </form> 406 </div> 407 <div class="typeahead-menu tt-empty"></div> 408 </div> 409 </div> 410 </div> 411 </div> 412 </div> 413 </div> 414 415 @{ 416 string alertHeadline = GetString("Item.Area.Alert_Headline"); 417 string alertText = GetString("Item.Area.Alert_Text"); 418 bool alertShown = GetBoolean("Item.Area.Alert_Shown"); 419 } 420 421 @if (alertShown && (!string.IsNullOrWhiteSpace(alertHeadline) || !string.IsNullOrWhiteSpace(alertText))) 422 { 423 424 var alert_cookie = Dynamicweb.Environment.CookieManager.GetCookie("hidealert"); 425 426 if (alert_cookie == null || string.IsNullOrWhiteSpace(alert_cookie.Value)) 427 { 428 string title = Translate("Luk"); 429 string ariaLabel = Translate("Luk advarsel"); 430 <div id="alert-box" class="jumbotron"> 431 <div class="container text-center"> 432 433 <i onclick="hideAlertBox()" class="fal fa-times-circle" aria-label="@ariaLabel" title="@title"></i> 434 435 @if (!string.IsNullOrWhiteSpace(alertHeadline)) 436 { 437 <h1>@alertHeadline</h1> 438 } 439 @if (!string.IsNullOrWhiteSpace(alertText)) 440 { 441 <text>@alertText</text> 442 } 443 </div> 444 </div> 445 } 446 447 } 448 449 </header> 450 451 <div id="main-nav" class="d-none d-lg-block"> 452 <div class="container"> 453 454 <nav class="navbar navbar-default main-nav CustomHidden"> 455 456 <ul class="scroolNav ps-0 w-100"> 457 @foreach (Dynamicweb.Content.Page rootPage in pageService.GetRootPagesForArea(GetInteger("DwAreaID"))) 458 { 459 var childPages = pageService.GetPagesByParentID(rootPage.ID); 460 461 if (rootPage.ItemType != "Page_Root" || !rootPage.Active) 462 { 463 continue; 464 } 465 466 string rootPageArea = (string)rootPage.Item["Site_Area"]; 467 468 string liClass = "nav-tab area-color-" + rootPageArea; 469 if (childPages.Any()) 470 { 471 liClass += " hasChildren"; 472 } 473 474 int dataInpath = 0; 475 if (topPage.ID == rootPage.ID || topPage.MenuText == rootPage.MenuText) 476 { 477 dataInpath = 1; 478 } 479 480 string rootPageIcon = (string)rootPage.Item["Site_Area"]; 481 string wrapperclass = "columnParent scroll-dropdown hidden d-none area-color-" + rootPageIcon; 482 483 <li class="@liClass" data-inpath="@dataInpath"> 484 <a href="@rootPage.GetPageHrefValue()" id=""> 485 @rootPage.MenuText 486 487 @if (rootPageIcon == "warning_counter") 488 { 489 490 @RenderSnippet("RenderWarningIcon") 491 492 } 493 </a> 494 495 @if (childPages.Any()) 496 { 497 498 string rootPageInfoText = (string)rootPage.Item["Info_Text"]; 499 string iconClass = "icon icon-" + rootPageIcon; 500 501 <div class="@wrapperclass" data-root-page="@rootPage.ID"> 502 <div class="row pb-5"> 503 <div class="col-10"> 504 <ul class="column_2 ps-0"> 505 506 @foreach (var childPage in childPages) 507 { 508 509 if (!childPage.Active) 510 { 511 continue; 512 } 513 514 <li><a href="@childPage.GetPageHrefValue()">@childPage.MenuText</a></li> 515 } 516 </ul> 517 </div> 518 <div class="col-2"> 519 520 <div id="" class="d-flex h-100 nav-icon"> 521 522 @{ 523 switch (rootPageIcon) 524 { 525 case "customer_service": 526 527 <svg width="91.26px" height="124.62px" viewbox="0 0 733 900" class=""> 528 <g transform="scale(1,-1) translate(0,-800)"> 529 <path class="fill stroke" d="M615 602c0-137-111-324-249-324s-248 187-248 324a248 248 0 0 0 497 0z m-58-324l-191-191-190 191c-129-21-176-58-176-58v-315a1239 1239 0 0 1 733 0v315s-47 37-176 58z"></path> 530 </g> 531 </svg> 532 533 break; 534 case "recycle": 535 536 <svg xmlns="http://www.w3.org/2000/svg" width="82.411" height="126.762" viewbox="0 0 82.411 126.762"> 537 <g transform="translate(-356.687 -281.413)"> 538 <g transform="translate(356.687 307.254)"> 539 <path class="fill" d="M404.719,333.9a12.612,12.612,0,1,1-12.612-12.612A12.616,12.616,0,0,1,404.719,333.9Z" transform="translate(-322.308 -247.146)"></path> 540 <path class="no-fill" d="M392.321,332.033l9.528-16.516a.635.635,0,0,0,0-.627l-5.461-9.47a.627.627,0,0,0-.381-.291.612.612,0,0,0-.474.063l-9.663,5.579a.633.633,0,0,0-.231.858l4.591,7.966H383.2v-3.458a.632.632,0,0,0-.379-.577.638.638,0,0,0-.677.118l-10.631,9.934a.628.628,0,0,0,0,.915l10.631,9.932a.631.631,0,0,0,.429.17.622.622,0,0,0,.248-.053A.631.631,0,0,0,383.2,336v-3.656h8.573A.633.633,0,0,0,392.321,332.033Z" transform="translate(-334.63 -271.539)"></path> 541 <path class="no-fill" d="M385.343,310.537l-2.984,1.725a.631.631,0,0,0,.128,1.146l13.911,4.245a.677.677,0,0,0,.183.028.633.633,0,0,0,.612-.486l3.275-14.179a.622.622,0,0,0-.236-.644.633.633,0,0,0-.687-.038l-3.164,1.825-4.282-7.437a.626.626,0,0,0-.542-.316H372.5a.633.633,0,0,0-.544.313l-5.463,9.473a.627.627,0,0,0,.228.855l9.673,5.586a.634.634,0,0,0,.858-.231l4.578-7.958Z" transform="translate(-342.041 -284.654)"></path> 542 <path class="no-fill" d="M382.8,322.94h-9.174l3.508-6.088,2.989,1.73a.628.628,0,0,0,.923-.687l-3.277-14.186a.624.624,0,0,0-.3-.4.668.668,0,0,0-.5-.058L363.062,307.5a.628.628,0,0,0-.13,1.143l3.159,1.825L361.8,317.9a.635.635,0,0,0,0,.627l9.538,16.511a.633.633,0,0,0,.544.313H382.8a.627.627,0,0,0,.627-.627v-11.16A.627.627,0,0,0,382.8,322.94Z" transform="translate(-349.107 -274.373)"></path> 543 <path class="fill" d="M408.859,378.475a17.57,17.57,0,0,1,22.285-16.982V291.719H356.687l10.007,100.92h49.369A17.56,17.56,0,0,1,408.859,378.475ZM391,352.073a.627.627,0,0,1-.627.627H379.461a.633.633,0,0,1-.544-.313l-9.538-16.511a.635.635,0,0,1,0-.627l4.293-7.437-3.159-1.825a.628.628,0,0,1,.13-1.143l13.911-4.247a.668.668,0,0,1,.5.058.625.625,0,0,1,.3.4l3.277,14.186a.628.628,0,0,1-.923.687l-2.989-1.73-3.508,6.088h9.174a.627.627,0,0,1,.627.627Zm.5-32.314a.616.616,0,0,1-.474-.06l-9.673-5.586a.627.627,0,0,1-.228-.855l5.463-9.473a.633.633,0,0,1,.544-.313H406.2a.626.626,0,0,1,.542.316l4.282,7.437,3.164-1.825a.633.633,0,0,1,.687.038.622.622,0,0,1,.236.644l-3.275,14.179a.633.633,0,0,1-.612.486.676.676,0,0,1-.183-.028l-13.911-4.245a.631.631,0,0,1-.128-1.146l2.984-1.725-3.518-6.093-4.578,7.958A.615.615,0,0,1,391.509,319.758Zm13.753,36.424a.631.631,0,0,1-.379.574.623.623,0,0,1-.248.053.631.631,0,0,1-.429-.17l-10.631-9.931a.628.628,0,0,1,0-.915l10.631-9.934a.638.638,0,0,1,.677-.118.632.632,0,0,1,.379.577v3.458h7.026l-4.591-7.966a.633.633,0,0,1,.231-.858l9.663-5.579a.612.612,0,0,1,.474-.063.627.627,0,0,1,.381.291l5.461,9.47a.635.635,0,0,1,0,.627l-9.528,16.516a.633.633,0,0,1-.544.313h-8.573Z" transform="translate(-356.687 -291.719)"></path> 544 </g> 545 <path class="fill" d="M1.668,0H72.79a1.668,1.668,0,0,1,1.668,1.668V10.42a0,0,0,0,1,0,0H0a0,0,0,0,1,0,0V1.668A1.668,1.668,0,0,1,1.668,0Z" transform="translate(356.687 291.831)"></path> 546 <path class="fill" d="M.462,0H12.749a.462.462,0,0,1,.462.462V5.416a0,0,0,0,1,0,0H0a0,0,0,0,1,0,0V.462A.462.462,0,0,1,.462,0Z" transform="translate(387.31 281.413)"></path> 547 </g> 548 </svg> 549 550 break; 551 case "watertap": 552 553 <svg xmlns="http://www.w3.org/2000/svg" width="75.454" height="109" viewbox="0 0 75.454 109"> 554 <g transform="translate(-231.011 -282.388)"> 555 <path class="fill" d="M306.465,353.661a37.727,37.727,0,1,1-75.454,0c0-23.793,35.449-47.628,37.622-71.169a.1.1,0,0,1,.209,0C271.016,306.033,306.465,329.868,306.465,353.661Z" transform="translate(0)"></path> 556 </g> 557 </svg> 558 559 break; 560 case "toilet": 561 562 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="76.454" height="110" viewbox="0 0 76.454 110"> 563 <g transform="translate(-569.708 -281.888)"> 564 <path class="fill" d="M645.662,353.661a37.727,37.727,0,1,1-75.454,0c0-23.793,35.449-47.628,37.622-71.168a.1.1,0,0,1,.209,0C610.213,306.033,645.662,329.868,645.662,353.661Z" transform="translate(0 0)"></path> 565 <g transform="translate(570.208 282.388)"> 566 <g class="c"> 567 <g transform="translate(-46.134 -123.698)"> 568 <circle class="no-fill no-stroke stoke-width-5" cx="66.202" cy="66.202" r="66.202" transform="translate(42.802 42.802)"></circle> 569 <circle class="no-fill no-stroke stoke-width-5" cx="88.201" cy="88.201" r="88.201" transform="translate(20.803 20.803)"></circle> 570 <circle class="no-fill no-stroke stoke-width-5" cx="109.003" cy="109.003" r="109.003"></circle> 571 </g> 572 </g> 573 </g> 574 </g> 575 </svg> 576 577 break; 578 case "heat": 579 580 <svg xmlns="http://www.w3.org/2000/svg" width="101.858" height="146.822" viewbox="0 0 101.858 146.822"> 581 <g transform="translate(-296.694 -281.749)"> 582 <g transform="translate(296.694 327.021)"> 583 <path class="fill" d="M345.415,328.474a28.2,28.2,0,0,0-.675-3.132c-.13-.517-.294-1.013-.447-1.518a37.235,37.235,0,0,0-18.761-22.3,39.711,39.711,0,0,0-11.655-3.894c16.253,21.783-1.126,32.2-9.534,42.815a37.513,37.513,0,0,0-7.112,16.844,35.817,35.817,0,0,0-.271,10.486c2.367,19.941,19.021,30.907,31.807,31.4-.173-.814-.26-1.316-.4-2.162a51.5,51.5,0,0,1,10-40.316,37.5,37.5,0,0,0,7.112-16.845A36.3,36.3,0,0,0,345.415,328.474Z" transform="translate(-296.694 -297.628)"></path> 584 <path class="fill" d="M326.616,308.412s2.768,18.083-7.663,30.756c-14.074,17.1-9.08,39.667-9.08,39.667C354.855,371.859,342.926,315.12,326.616,308.412Z" transform="translate(-273.458 -277.286)"></path> 585 </g> 586 <g transform="translate(307.652 282.046)"> 587 <path class="fill stoke stoke-width-05" d="M324.682,300.732a1.386,1.386,0,0,1-.006-.476,1.365,1.365,0,0,1,1.567-1.129l18.155,2.938a1.365,1.365,0,1,1-.436,2.7l-18.155-2.938A1.374,1.374,0,0,1,324.682,300.732Z" transform="translate(-254.902 -249.859)"></path> 588 <path class="fill stoke stoke-width-05" d="M321.346,306.7a1.365,1.365,0,0,1,2.375-1.149l12.021,13.924a1.367,1.367,0,1,1-2.069,1.787l-12.019-13.923A1.344,1.344,0,0,1,321.346,306.7Z" transform="translate(-261.197 -238.594)"></path> 589 <path class="fill stoke stoke-width-05" d="M323.4,300.17a1.37,1.37,0,0,1,.644-1.432l15.794-9.421a1.367,1.367,0,0,1,1.4,2.347l-15.8,9.421a1.368,1.368,0,0,1-2.043-.915Z" transform="translate(-257.32 -268.693)"></path> 590 <path class="fill stoke stoke-width-05" d="M318.1,301.039a1.372,1.372,0,0,1,.052-.7l6.044-17.37a1.366,1.366,0,1,1,2.58.9l-6.044,17.373a1.366,1.366,0,0,1-2.632-.2Z" transform="translate(-267.322 -282.046)"></path> 591 <path class="fill stoke stoke-width-05" d="M308.993,283.825a1.367,1.367,0,0,1,2.621-.742l6.537,17.2a1.366,1.366,0,1,1-2.554.97l-6.538-17.194A1.471,1.471,0,0,1,308.993,283.825Z" transform="translate(-284.498 -281.749)"></path> 592 <path class="fill stoke stoke-width-05" d="M300.515,291.146a1.367,1.367,0,0,1,2.009-1.449l16.059,8.971a1.367,1.367,0,0,1-1.333,2.387l-16.059-8.971A1.373,1.373,0,0,1,300.515,291.146Z" transform="translate(-300.491 -267.942)"></path> 593 <path class="fill" d="M326.639,333.872a21.793,21.793,0,1,0-18.761-22.3A37.224,37.224,0,0,1,326.639,333.872Z" transform="translate(-286.556 -266.104)"></path> 594 </g> 595 </g> 596 </svg> 597 598 break; 599 600 } 601 } 602 603 </div> 604 605 </div> 606 </div> 607 608 @if (!string.IsNullOrWhiteSpace(rootPageInfoText)) 609 { 610 611 string rootPageInfoLink = (string)rootPage.Item["Info_Link"]; 612 string rootPageInfoLinkText = (string)rootPage.Item["Info_Link_Text"]; 613 614 string rootpageinfotextclass = !string.IsNullOrWhiteSpace(rootPageInfoLink) ? "col-12 col-sm-6" : "col-12 col-cm-8"; 615 616 <div class="info"> 617 <a href="@rootPageInfoLink" class="row"> 618 619 <div class="@rootpageinfotextclass"> 620 @rootPageInfoText 621 </div> 622 @if (!string.IsNullOrWhiteSpace(rootPageInfoLink)) 623 { 624 <div class="col-12 col-sm-6"> 625 <div class="d-flex h-100 pb-4"> 626 <span class="btn btn-primary ms-auto mt-auto"> 627 628 @if (!string.IsNullOrWhiteSpace(rootPageInfoLinkText)) 629 { 630 @rootPageInfoLinkText 631 } 632 else 633 { 634 @Translate("Menu_Info_Button", "Læs mere") 635 636 } 637 638 </span> 639 </div> 640 </div> 641 } 642 </a> 643 </div> 644 } 645 </div> 646 } 647 </li> 648 } 649 </ul> 650 651 </nav> 652 </div> 653 </div> 654 655 656 <main> 657 658 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 659 660 661 @SnippetStart("sidebar") 662 @GetValue("DwContent(contentsidebar)") 663 @SnippetEnd("sidebar") 664 665 @{ 666 string page_banner = GetString("Item.Banner_Image"); 667 string page_banner_alt = GetString("Item.Banner_Image_Alt"); 668 string page_banner_title = GetString("Item.Banner_Image_Title"); 669 string page_text = GetString("Item.Text"); 670 string page_heading = GetString("Item.Heading"); 671 //var pageService = new Dynamicweb.Content.PageService(); 672 //var indexPage = pageService.GetFirstPageForArea(Pageview.AreaID); 673 //var topPage = pageService.GetPage(GetInteger("DwTopPageID")); 674 675 var selfservice_list = GetLoop("Item.SelfService_List.Options"); 676 bool page_show_latest_news = GetBoolean("Item.Show_Latest_News"); 677 678 string page_area = GetString("Item.Site_Area"); 679 if (string.IsNullOrEmpty(page_area) && topPage != null && !topPage.IsFolder && topPage.Item["Site_Area"] != null) 680 { 681 page_area = (string)topPage.Item["Site_Area"]; 682 } 683 684 Dictionary<Dynamicweb.Content.Page, System.Collections.Generic.IEnumerable<Dynamicweb.Content.Page>> menuPages = new Dictionary<Dynamicweb.Content.Page, System.Collections.Generic.IEnumerable<Dynamicweb.Content.Page>>(); 685 686 // LLA --------------------------- 687 string colClass = "col-md-8"; 688 bool rightCol = false; 689 string selfserviceList = GetString("Item.SelfService_List"); 690 string sidebar = GetString("DwContent(contentsidebar)"); 691 692 if (!string.IsNullOrWhiteSpace(selfserviceList) || page_show_latest_news || !string.IsNullOrWhiteSpace(sidebar)) 693 { 694 rightCol = true; 695 } 696 697 if (!rightCol) 698 { 699 colClass = "col-md-12"; 700 } 701 702 // DELETE FOLLOWING ----------------- 703 bool isLocalSpecialIndex = System.Web.HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority).IndexOf("https://localhost:") == 0; 704 bool isLocalIndex = isLocalSpecialIndex || System.Web.HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) == "http://silkeborgforsyning.local.dynamicweb.dk"; 705 706 } 707 <div class="container-fluid g-0"> 708 709 @if (!string.IsNullOrWhiteSpace(page_banner)) 710 { 711 page_banner = "/Admin/Public/GetImage.ashx?Image=" + page_banner + "&Format=webp&Width=1920&Height=260&Crop=7&DoNotUpscale=false"; 712 713 <div class="img-cover-bg"> 714 <img src="@page_banner" class="img-fluid w-100" alt="@page_banner_alt" title="@page_banner_title"> 715 </div> 716 } 717 718 </div> 719 720 <div class="container mt-3"> 721 <div class="row"> 722 723 <div class="col-md-12"> 724 <div class="row"> 725 <div class="col-12"> 726 <nav class="mb-4" aria-label="breadcrumb"> 727 728 @RenderNavigation(new 729 { 730 startlevel = 1, 731 endlevel = 99, 732 template = "Breadcrumb.xslt", 733 expandmode = "All", 734 parentid = 0, 735 areaid = Pageview.AreaID, 736 includemode = "All", 737 _pageFirstId = indexPage.ID, 738 _pageFirstTitle = (string)indexPage.Item["Title"] 739 }) 740 </nav> 741 </div> 742 743 <div class="@colClass"> 744 745 <div id="content" class="page"> 746 747 <section class="row"> 748 @if (!string.IsNullOrWhiteSpace(page_heading) || !string.IsNullOrWhiteSpace(page_text)) 749 { 750 <article class="col-md-12 editor"> 751 @if (!string.IsNullOrWhiteSpace(page_heading)) 752 { 753 <h1>@page_heading</h1> 754 } 755 @if (!string.IsNullOrWhiteSpace(page_text)) 756 { 757 @page_text 758 } 759 </article> 760 } 761 762 @GetValue("DwContent(contentarea)") 763 764 </section> 765 </div> 766 </div> 767 768 @if (rightCol) 769 { 770 <aside class="col-md-4 custom-left-side"> 771 772 <!-- SUB MENU --> 773 774 775 776 777 @if (!string.IsNullOrWhiteSpace(GetString("Item.SelfService_List"))) { 778 779 <div class="box-container layout-grey p-4 mb-4 sub-menu hidden-sm hidden-xs"> 780 <div class="flex-item-top"> 781 <h3>@Translate("Genveje til selvbetjening")</h3> 782 <ul> 783 @foreach (var s in selfservice_list.Where(o => o.GetBoolean("Item.SelfService_List.Option.IsSelected"))) { 784 Dynamicweb.Content.Page selfServicePage = pageService.GetPageForItem("Page_SelfService", s.GetString("Item.SelfService_List.Option.Value")); 785 if (selfServicePage.Active) { 786 string selfServicePageLink = "/Default.aspx?ID=" + selfServicePage.ID; 787 <li><a href="@selfServicePageLink">@s.GetString("Item.SelfService_List.Option.Label")</a></li> 788 } 789 790 } 791 </ul> 792 </div> 793 794 <div class="flex-item-bottom"> 795 <i class="icon icon-customer_service"></i> 796 </div> 797 </div> 798 799 } 800 801 <!-- LATEST NEWS FOR AREA --> 802 @if (page_show_latest_news) { 803 DateTime now = DateTime.Now; 804 805 //pageService.GetPagesForItems( new List<string>() { "Page_News" }); 806 foreach (var i in pageService.GetPagesForItems(new List<string>() { "Page_News" }) 807 .Where(x => x.Active && x.Item["Site_Area"] != null && ((string)x.Item["Site_Area"]).IndexOf(page_area) > -1 808 && x.Item["Publishing_Date_Start"] != null 809 && ((DateTime)x.Item["Publishing_Date_Start"] < now 810 && (x.Item["Unpublishing_Date_Start"] == null || (DateTime)x.Item["Unpublishing_Date_Start"] > now))) 811 .OrderByDescending(x => x.Item["Is_Pinned"]).ThenByDescending(x => x.Item["Publishing_Date_Start"])) { 812 813 string list_image = i.Item["Preview_Image"] != null ? (string)i.Item["Preview_Image"] : string.Empty; 814 string list_text = i.Item["Preview_Text"] != null ? (string)i.Item["Preview_Text"] : string.Empty; 815 816 <a href="/Default.aspx?ID=@i.ID" class="box-container layout-grey d-block p-4 mb-4"> 817 <div class="mb-5"> 818 @if (!string.IsNullOrWhiteSpace(list_image)) { 819 <img src="@list_image" class="img-fluid w-100"> 820 } 821 <h3 class="mt-4"> 822 @i.MenuText 823 </h3> 824 @list_text 825 </div> 826 827 <div class="row"> 828 <div class="col-md-7 col-sm-6"> 829 @if (i.Item["Site_Area"] != null) { 830 foreach (string t in ((string)i.Item["Site_Area"]).Split(',')) { 831 <i class="icon icon-@t"></i> 832 } 833 } 834 </div> 835 <div class="col-md-5 col-sm-6 col-xs-8 text-end"> 836 <span type="button" class="btn btn-primary">@Translate("News_Spot_Button", "Læs mere")</span> 837 </div> 838 </div> 839 </a> 840 break; 841 } 842 } 843 844 <div class="row box-row"> 845 @RenderSnippet("sidebar") 846 </div> 847 848 </aside> 849 } 850 851 </div> 852 </div> 853 854 </div> 855 </div> 856 857 @SnippetStart("PageJs") 858 <script> 859 function goBack() { 860 window.history.back(); 861 } 862 863 $(document).ready(function () { 864 $('#nav-container').on({ 865 focusout: function (e) { 866 $(this).data('submenuTimer', setTimeout(function () { 867 $(".nav-tabs > a.hasChildren.active").removeClass('active'); 868 $('#nav-container').find(".nav-dropdown").addClass('hidden'); 869 }.bind(this), 0)); 870 }, 871 focusin: function (e) { 872 clearTimeout($(this).data('submenuTimer')); 873 }, 874 keydown: function (e) { 875 if (e.which === 27) { 876 $(".nav-tabs > a.hasChildren.active").removeClass('active'); 877 $('#nav-container').find(".nav-dropdown").addClass('hidden'); 878 e.preventDefault(); 879 } 880 } 881 }); 882 }); 883 $(".nav-tabs > a.hasChildren").click(function (evt) { 884 evt.preventDefault(); 885 $(this).siblings().removeClass('active'); 886 $(this).toggleClass('active'); 887 888 var currentRootPageId = $(this).attr('data-root-page'); 889 var parentRow = $(this).closest('#nav-container'); 890 $('#nav-container').find(".nav-dropdown[data-root-page='" + currentRootPageId + "']").toggleClass('hidden'); 891 $('#nav-container').find(".nav-dropdown[data-root-page!='" + currentRootPageId + "']").addClass('hidden'); 892 }); 893 894 $(".scroolNav > li.hasChildren > a").click(function (evt) { 895 896 evt.preventDefault(); 897 898 var $parentLi = $(this).parent('li'); 899 var $parentLiSiblings = $parentLi.siblings(); 900 901 $parentLiSiblings.removeClass('active'); 902 $parentLiSiblings.find(".scroll-dropdown").addClass('hidden'); 903 904 $parentLi.toggleClass('active'); 905 $parentLi.find(".scroll-dropdown").toggleClass('hidden'); 906 }); 907 908 // STICKY MENU 909 $(window).scroll(function () { 910 if ($(this).scrollTop() > 650) { 911 912 $('.scroll').removeClass('CustomHidden'); 913 $('.scroll').addClass('show'); 914 } else { 915 $('.scroll').addClass('CustomHidden'); 916 $('.scroll').removeClass('show'); 917 $('.scroll-dropdown').addClass('hidden'); 918 $('.scroolNav > li.active').removeClass('active'); 919 } 920 }); 921 922 //$(".nav-tabs > a").mouseenter(function () { 923 // $(this).siblings().removeClass('active'); 924 // $(this).addClass('active'); 925 926 927 // var currentRootPageId = $(this).attr('data-root-page'); 928 // var parentRow = $(this).closest('#nav-container'); 929 // $('#nav-container').find(".nav-dropdown[data-root-page='" + currentRootPageId + "']").removeClass('hidden'); 930 // $('#nav-container').find(".nav-dropdown[data-root-page!='" + currentRootPageId + "']").addClass('hidden'); 931 //}); 932 //$("#nav-container").mouseleave(function () { 933 // $(".nav-tabs > a").removeClass('active'); 934 // $('#nav-container .nav-dropdown').addClass('hidden'); 935 //}); 936 937 (function () { 938 $('a').click(function (e) { e.stopPropagation(); }) 939 }).on('click', 'a', function (e) { e.stopPropagation(); }) 940 </script> 941 <!-- https://stackoverflow.com/questions/18325779/bootstrap-3-collapse-show-state-with-chevron-icon --> 942 @SnippetEnd("PageJs") 943 944 945 </main> 946 947 948 <div class="container-fluid write-us-wrapper mt-4"> 949 <div class="container write-us"> 950 <div class="row"> 951 <div class="col-12"> 952 <a href="/Default.aspx?ID=4818" class="btn btn-primary wide"> 953 @Contact_Formular_Btn_Text 954 </a> 955 </div> 956 </div> 957 </div> 958 </div> 959 960 <footer id="footer"> 961 <div class="container"> 962 <div class="row"> 963 <div class="col-md-12 mb-5"> 964 <img src="@companyLogo" alt="@companyName" title="@companyName" class="img-fluid logo footer-logo"> 965 </div> 966 <div class="col-lg-5 col-md-5 col-sm-12"> 967 <div class="row"> 968 969 <div class="col-md-12 col-sm-6"> 970 <address> 971 <p> 972 @companyAddress 973 <br> 974 @companyZipAndCity 975 </p> 976 <p> 977 <a href="tel:@companyPhoneClean" target="_top">@companyPhone</a> 978 <br> 979 980 @*<a href="mailto:@companyMail" target="_top">@companyMail</a>*@ 981 @Rot13_Email(companyMail) 982 </p> 983 984 </address> 985 </div> 986 987 <div class="col-md-12 col-md-6"> 988 @footerText 989 </div> 990 </div> 991 </div> 992 993 <div class="col-lg-7 col-md-7 col-sm-12"> 994 <div class="row"> 995 @foreach (var group in GetLoop("Item.Area.Footer_Links")) 996 { 997 <div class="col-12 col-md-6 footer-space"> 998 <h3>@group.GetString("Item.Area.Footer_Links.Text")</h3> 999 <ul class="list-unstyled"> 1000 @foreach (var link in group.GetLoop("Item.Area.Footer_Links.List")) 1001 { 1002 string footerLink = link.GetString("Item.Area.Footer_Links.List.Link"); 1003 <li> 1004 <a href="@footerLink">@link.GetString("Item.Area.Footer_Links.List.Text")</a> 1005 </li> 1006 } 1007 </ul> 1008 </div> 1009 } 1010 </div> 1011 1012 </div> 1013 1014 <div class="col-md-12 text-right"> 1015 <div class="linkToIntranet"> 1016 <a href="https://intranet.silkeborgforsyning.dk/forside" target="_blank" title="Silkeborg Forsyning Intranet"> 1017 <i class="fal fa-lock-alt"></i> 1018 </a> 1019 </div> 1020 </div> 1021 </div> 1022 </div> 1023 1024 </footer> 1025 1026 1027 <!-- ------------------------------------------------------------------- --> 1028 @* -- -- -- -- -- COOKIE -- -- -- -- -- *@ 1029 @if (cookieSettingsPage != null && cookieSettingsPage.Item["CookieCategories"] != null) 1030 { 1031 var cookieCategoryItems = Dynamicweb.Content.Items.ItemList.GetItemListById((int)cookieSettingsPage.Item["CookieCategories"]).Relations; 1032 1033 if (cookieCategoryItems.Any()) 1034 { 1035 1036 <div id="cookie-choice-renew" title="Cookie valg" aria-label="renew-consent"> 1037 <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> 1038 </div> 1039 1040 <div id="cookieWarningContainer" class="@cookieWarningClass"> 1041 <form id="cookieWarningForm" method="post" action="/Admin/Public/CookieOptInLevelConfig.aspx"> 1042 <input type="hidden" name="cmd" value="SetCookieOptInLevel"> 1043 <input type="hidden" name="OptInLevel" id="OptInLevel" value="1"> 1044 1045 <fieldset> 1046 <div class="modal-header"> 1047 <div class="row"> 1048 <div class="col-xs-12 editor"> 1049 <h2>@cookieSettingsPage.Item["CookieHeader"]</h2> 1050 @cookieSettingsPage.Item["CookieIntro"] 1051 <hr class="mt-4 mb-2 w-100"> 1052 <p class="text-center"> 1053 <button type="button" class="btn btn-primary-naked ml-3" onclick="setOptInCookie(1);" tapindex="1">@Translate("Tillad valgte")</button> 1054 <button type="button" class="rm-button btn btn-primary ml-3" onclick="setOptInCookie(2);">@Translate("Tillad alle")</button> 1055 <button type="submit" style="display: none; visibility: hidden;">Send</button> 1056 </p> 1057 </div> 1058 </div> 1059 </div> 1060 @{ 1061 string showDetails = Translate("Vis detaljer"); 1062 string hideDetails = Translate("Skjul detaljer"); 1063 <div class="p-4"> 1064 <div class="row justify-content-md-center"> 1065 @foreach (Dynamicweb.Content.Items.Item category in cookieCategoryItems) 1066 { 1067 string categoryName = "" + category["Name"]; 1068 string categorySysName = "" + category["SysName"]; 1069 string categoryID = "cookecategory-" + category.Id; 1070 string categoryDescription = "" + category["Description"]; 1071 var cookies = Dynamicweb.Content.Items.ItemList.GetItemListById((int)category["Cookies"]).Relations; 1072 string translateLabel = Translate("Accepter") + " " + categoryName + " " + Translate("cookies"); 1073 1074 if (cookies.Any()) 1075 { 1076 <div class="col-sm-4 col-xs-4 checkbox-container"> 1077 <div class="custom-control custom-checkbox text-center" data-nogutter="1"> 1078 <span class="d-block">@categoryName</span> 1079 @if (categorySysName == "Essential") 1080 { 1081 <input type="checkbox" class="custom-control-input" id="chk-cookie-@categorySysName" value="@categorySysName" checked="checked" disabled='disabled'> 1082 } 1083 else 1084 { 1085 if (AllowedCookieCategories.Contains(categorySysName)) 1086 { 1087 <input type="checkbox" class="custom-control-input" checked="checked" id="chk-cookie-@categorySysName" name="OptInCategory" value="@categorySysName"> 1088 } 1089 else 1090 { 1091 <input type="checkbox" class="custom-control-input" id="chk-cookie-@categorySysName" name="OptInCategory" value="@categorySysName"> 1092 } 1093 } 1094 <label class="custom-control-label" for="chk-cookie-@categorySysName"><span class="sr-only">@translateLabel</span></label> 1095 </div> 1096 </div> 1097 } 1098 } 1099 1100 </div> 1101 <div class="row"> 1102 1103 <div class="col-12"> 1104 <p class="text-center"> 1105 <a class="btn btn-primary-naked mr-3 collapsed" id="cookie-details-button" data-toggle="collapse" role="button" aria-expanded="false" data-open-text="Vis detaljer" data-close-text="Skjul detaljer" aria-controls="collapse-cookie-info-container">Vis detaljer</a> 1106 </p> 1107 </div> 1108 1109 </div> 1110 </div> 1111 <div class="collapse" id="collapse-cookie-info-container"> 1112 <div class="cookie-info-container"> 1113 @foreach (Dynamicweb.Content.Items.Item category in cookieCategoryItems) 1114 { 1115 string categoryName = "" + category["Name"]; 1116 string categorySysName = "" + category["SysName"]; 1117 string categoryID = "cookecategory-" + category.Id; 1118 string categoryDescription = "" + category["Description"]; 1119 var cookies = Dynamicweb.Content.Items.ItemList.GetItemListById((int)category["Cookies"]).Relations; 1120 if (cookies.Any()) 1121 { 1122 <div class="d-block toogle-f-content" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="collapse-cookie-info-@categoryID" tabindex="0"> 1123 <div class="row"> 1124 <div class="col-xs-12 col-sm-3 cookie-info-container-title"> 1125 1126 <div class="plus-tab"> 1127 <div class="plus-btn"> 1128 <span></span> 1129 <span></span> 1130 <span></span> 1131 </div> 1132 </div> 1133 1134 <strong>@categoryName</strong> 1135 1136 </div> 1137 <div class="col-xs-12 col-sm-9"> 1138 @categoryDescription 1139 </div> 1140 </div> 1141 </div> 1142 <div class="collapse" id="collapse-cookie-info-@categoryID"> 1143 @foreach (Dynamicweb.Content.Items.Item cookie in cookies) 1144 { 1145 string titleClass = "col-xs-12 col-sm-3"; 1146 string contentClass = "col-xs-12 col-sm-9"; 1147 string dataProcessor = Translate("Databehandler"); 1148 1149 string privacyPolicyLink = cookie["PrivacyPolicy"].ToString(); 1150 1151 string privacyPolicy = Translate("Privatlivspolitik"); 1152 1153 <div class="collapse-cookie-detail"> 1154 <div class="row collapse-cookie-info-header"> 1155 <div class="@titleClass"> 1156 <strong> 1157 @dataProcessor 1158 </strong> 1159 </div> 1160 <div class="@contentClass"> 1161 <p>@cookie["DataProcessor"]</p> 1162 </div> 1163 </div> 1164 1165 <div class="row"> 1166 <div class="@titleClass"> 1167 <strong> 1168 @Translate("Formål") 1169 </strong> 1170 </div> 1171 <div class="@contentClass"> 1172 @cookie["Purpose"] 1173 </div> 1174 </div> 1175 <div class="row"> 1176 1177 <div class="@titleClass"> 1178 <strong> 1179 @privacyPolicy 1180 </strong> 1181 </div> 1182 <div class="@contentClass"> 1183 <p><a target="_blank" href="@privacyPolicyLink" tabindex="0">@privacyPolicyLink</a></p> 1184 </div> 1185 </div> 1186 <div class="row"> 1187 <div class="@titleClass"> 1188 <strong> 1189 @Translate("Udløb") 1190 </strong> 1191 </div> 1192 <div class="@contentClass"> 1193 <p>@cookie["Expires"]</p> 1194 </div> 1195 </div> 1196 <div class="row"> 1197 <div class="@titleClass"> 1198 <strong> 1199 @Translate("Navn") 1200 </strong> 1201 </div> 1202 <div class="@contentClass"> 1203 <p>@cookie["Name"]</p> 1204 </div> 1205 </div> 1206 <div class="row"> 1207 <div class="@titleClass"> 1208 <strong> 1209 @Translate("Udbyder") 1210 </strong> 1211 </div> 1212 <div class="@contentClass"> 1213 <p>@cookie["Provider"]</p> 1214 </div> 1215 </div> 1216 1217 </div> 1218 } 1219 </div> 1220 1221 } 1222 } 1223 </div> 1224 </div> 1225 } 1226 </fieldset> 1227 </form> 1228 1229 </div> 1230 } 1231 } 1232 1233 1234 @* -- -- -- -- -- /COOKIE -- -- -- -- -- *@ 1235 1236 1237 <!-- ------------------------------------------------------------------- --> 1238 @{ 1239 string popperJsPath = "https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"; 1240 } 1241 <script src="/Files/Templates/Designs/SF2019/js/plugins.js"></script> 1242 <script src="@popperJsPath" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script> 1243 <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.min.js" integrity="sha384-Atwg2Pkwv9vp0ygtn1JAojH0nYbwNJLPhwyoVbhoPwBhjQPR5VtM2+xf0Uwh9KtT" crossorigin="anonymous"></script> 1244 <script src="https://cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.11.1/typeahead.bundle.min.js"></script> 1245 <script src="/Files/Templates/Designs/SF2019/assets/formvalidation/js/formValidation.min.js"></script> 1246 <script src="/Files/Templates/Designs/SF2019/assets/formvalidation/js/framework/bootstrap.min.js"></script> 1247 <script src="/Files/Templates/Designs/SF2019/assets/formvalidation/js/language/da_DK.js"></script> 1248 1249 <script src="/Files/Templates/Designs/SF2019/js/simple-lightbox.min.js"></script> 1250 <script src="/Files/Templates/Designs/SF2019/js/custom.js"></script> 1251 1252 <script async="async" src="/Files/Templates/Designs/SF2019/js/zeynep.js"></script> 1253 1254 @* -- WCAG -- *@ 1255 <script src="https://cdn.polyfill.io/v2/polyfill.js?features=Element.prototype.classList"></script> 1256 <script src="https://unpkg.com/focus-visible"></script> 1257 1258 @* COOKIE *@ 1259 @*<script type="text/javascript"> 1260 window.cookieconsent_options = { 1261 'title': 'Cookies', 1262 'message': 'Denne hjemmeside anvender cookies til statistik og indstillinger. Ved at bruge hjemmesiden accepterer du dette.', 1263 'dismiss': 'OK', 1264 'learnMore': 'Klik og læs mere her', 1265 //'link': '/cookies', 1266 'link': '/Default.aspx?ID=5785', 1267 'target': '_self', 1268 'theme': null, 1269 'markup': [ 1270 '<div class="cookie-banner-wrapper">', 1271 '<div class="cookie-container">', 1272 '<div class="container">', 1273 '<div class="row">', 1274 '<div class= "col-md-12" >', 1275 '<h3 class="cookie-title">', 1276 '{{options.title}} ', 1277 '</h3>', 1278 '</div >', 1279 '<div class= "col-md-7" >', 1280 '<p class="cookie-message">', 1281 '{{options.message}} ', 1282 '<a data-cc-if="options.link" target="{{options.target}}" class="cookie-more-info" href="{{options.link || "#null"}}">{{options.learnMore}}</a>', 1283 '</p>', 1284 '</div>', 1285 '<div class= "col-md-4 col-md-offset-1" >', 1286 '<a href="/home" data-cc-event="click:dismiss" target="_blank" class="cookie-btn btn btn-black">{{options.dismiss}}</a>', 1287 '</div >', 1288 '</div >', 1289 '</div>', 1290 '</div>', 1291 '</div>' 1292 ] 1293 }; 1294 </script> 1295 <script src="https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/1.0.10/cookieconsent.min.js"></script>*@ 1296 1297 @* /COOKIE *@ 1298 1299 @RenderSnippet("PageJs") 1300 @RenderSnippet("ParagraphJs") 1301 @RenderSnippet("MapScript") 1302 @RenderSnippet("RenderWarningIconScript") 1303 1304 </body> 1305 </html> 1306 1307 @* -- -- -- -- -- SKAL FLYTTES -- -- -- -- -- *@ 1308 <script> 1309 1310 // GO BACK -------------------------------------------------------------------------------------------------------------------- 1311 function goBack() { 1312 window.history.back(); 1313 } 1314 1315 $(document).ready(function () { 1316 $('#nav-container').on({ 1317 focusout: function (e) { 1318 $(this).data('submenuTimer', setTimeout(function () { 1319 $(".nav-tabs > a.hasChildren.active").removeClass('active'); 1320 $('#nav-container').find(".nav-dropdown").addClass('d-none'); 1321 }.bind(this), 0)); 1322 }, 1323 focusin: function (e) { 1324 clearTimeout($(this).data('submenuTimer')); 1325 }, 1326 keydown: function (e) { 1327 if (e.which === 27) { 1328 $(".nav-tabs > a.hasChildren.active").removeClass('active'); 1329 $('#nav-container').find(".nav-dropdown").addClass('d-none'); 1330 e.preventDefault(); 1331 } 1332 } 1333 }); 1334 }); 1335 $(".nav-tabs > a.hasChildren").click(function (evt) { 1336 evt.preventDefault(); 1337 $(this).siblings().removeClass('active'); 1338 $(this).toggleClass('active'); 1339 1340 var currentRootPageId = $(this).attr('data-root-page'); 1341 var parentRow = $(this).closest('#nav-container'); 1342 $('#nav-container').find(".nav-dropdown[data-root-page='" + currentRootPageId + "']").toggleClass('d-none'); 1343 $('#nav-container').find(".nav-dropdown[data-root-page!='" + currentRootPageId + "']").addClass('d-none'); 1344 }); 1345 1346 $(".scroolNav > li.hasChildren > a").click(function (evt) { 1347 1348 evt.preventDefault(); 1349 1350 var $parentLi = $(this).parent('li'); 1351 var $parentLiSiblings = $parentLi.siblings(); 1352 1353 $parentLiSiblings.removeClass('active'); 1354 $parentLiSiblings.find(".scroll-dropdown").addClass('d-none'); 1355 1356 $parentLi.toggleClass('active'); 1357 $parentLi.find(".scroll-dropdown").toggleClass('d-none'); 1358 }); 1359 1360 // STICKY MENU ---------------------------------------------------------------------------------------------------------------- 1361 $(window).scroll(function () { 1362 if ($(this).scrollTop() > 650) { 1363 1364 $('.scroll').removeClass('CustomHidden'); 1365 $('.scroll').addClass('show'); 1366 } else { 1367 $('.scroll').addClass('CustomHidden'); 1368 $('.scroll').removeClass('show'); 1369 $('.scroll-dropdown').addClass('d-none'); 1370 $('.scroolNav > li.active').removeClass('active'); 1371 } 1372 }); 1373 var lightbox = new SimpleLightbox('.gallery a', { /* options */ }); 1374 </script> 1375 @* COOKIE --------------------------------- *@ 1376 <script> 1377 document.getElementById("cookie-choice-renew").onclick = function () { 1378 showCookieChoice(); 1379 }; 1380 document.getElementById("cookie-details-button").onclick = function () { 1381 1382 if (this.classList.contains("opened")) { 1383 this.text = this.getAttribute("data-open-text"); 1384 this.classList.remove("opened"); 1385 document.getElementById("collapse-cookie-info-container").classList.remove("show"); 1386 } else { 1387 this.text = this.getAttribute("data-close-text"); 1388 this.classList.add("opened"); 1389 1390 document.getElementById("collapse-cookie-info-container").classList.add("show"); 1391 } 1392 }; 1393 var cookieExtraInfoElements = document.getElementsByClassName("toogle-f-content"); 1394 for (var i = 0; i < cookieExtraInfoElements.length; i++) { 1395 1396 // --------------------------------------------------------------------------------- 1397 1398 // Get the input field 1399 var input = cookieExtraInfoElements[i]; 1400 1401 // Execute a function when the user releases a key on the keyboard 1402 input.addEventListener("click", toggleExtraInfo); 1403 input.addEventListener("keyup", toggleExtraInfo); 1404 1405 // --------------------------------------------------------------------------------- 1406 } 1407 function toggleExtraInfo(event) { 1408 // Number 13 is the "Enter" key on the keyboard 1409 if (event.keyCode === 13 || event.type == "click") { 1410 // Cancel the default action, if needed 1411 1412 event.preventDefault(); 1413 1414 var elementToToggle = this.getAttribute("aria-controls"); 1415 if (this.classList.contains("opened")) { 1416 this.classList.remove("opened"); 1417 document.getElementById(elementToToggle).classList.remove("show"); 1418 } else { 1419 this.classList.add("opened"); 1420 document.getElementById(elementToToggle).classList.add("show"); 1421 } 1422 1423 // Trigger the button element with a click 1424 cookieExtraInfoElements[i].onclick = function () { 1425 var elementToToggle = this.getAttribute("aria-controls"); 1426 if (this.classList.contains("opened")) { 1427 this.classList.remove("opened"); 1428 document.getElementById(elementToToggle).classList.remove("show"); 1429 } else { 1430 this.classList.add("opened"); 1431 document.getElementById(elementToToggle).classList.add("show"); 1432 } 1433 } 1434 } 1435 } 1436 1437 function setOptInCookie(optInLevel) { 1438 document.getElementById("OptInLevel").value = optInLevel; 1439 var formElement = document.getElementById("cookieWarningForm"); 1440 if (optInLevel == 1) { 1441 var essentialElement = document.createElement('input'); 1442 if (document.getElementById('cookie-essential') === null) { 1443 essentialElement.setAttribute("name", "OptInCategory"); 1444 essentialElement.setAttribute("value", "Essential"); 1445 essentialElement.setAttribute("type", "hidden"); 1446 essentialElement.setAttribute("id", "cookie-essential"); 1447 formElement.appendChild(essentialElement); 1448 } 1449 1450 if (document.getElementById("chk-cookie-Marketing") != null && document.getElementById("chk-cookie-Marketing").checked && typeof fbq !== 'undefined') { 1451 fbq('consent', 'grant'); 1452 } 1453 } 1454 if (optInLevel == 2) { 1455 if (document.getElementById("chk-cookie-Statistical") != null) { 1456 document.getElementById("chk-cookie-Statistical").checked = true; 1457 } 1458 if (document.getElementById("chk-cookie-Marketing") != null) { 1459 document.getElementById("chk-cookie-Marketing").checked = true; 1460 } 1461 if (typeof fbq !== 'undefined') { 1462 fbq('consent', 'grant'); 1463 } 1464 } 1465 var formData = new FormData(formElement); 1466 1467 var xmlhttp = new XMLHttpRequest(); 1468 xmlhttp.onreadystatechange = function () { 1469 if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 1470 hideCookieChoice(); 1471 return false; 1472 } 1473 } 1474 1475 xmlhttp.open(formElement.method, formElement.action); 1476 xmlhttp.send(formData); 1477 1478 return false; 1479 } 1480 function showCookieChoice() { 1481 1482 var cookieWarningContainer = document.getElementById("cookieWarningContainer"); 1483 cookieWarningContainer.style.display = "flex"; 1484 cookieWarningContainer.removeAttribute("tab-index"); 1485 cookieWarningContainer.removeAttribute("aria-hidden"); 1486 document.getElementById("cookie-choice-renew").style.display = "none"; 1487 } 1488 function hideCookieChoice() { 1489 1490 var cookieWarningContainer = document.getElementById("cookieWarningContainer"); 1491 cookieWarningContainer.style.display = "none"; 1492 cookieWarningContainer.setAttribute("tab-index", "-1"); 1493 cookieWarningContainer.setAttribute("aria-hidden", "true"); 1494 document.getElementById("cookie-choice-re new").style.display = "block"; 1495 } 1496 </script> 1497 @* COOKIE --------------------------------- *@ 1498 1499 <script> 1500 $(".nav-item[data-dropdown='1']").on("keydown", function (event) { 1501 if (event.which == 13) 1502 1503 if ($(this).hasClass("dd-active")) { 1504 $(this).removeClass("dd-active") 1505 } else { 1506 $(this).addClass("dd-active") 1507 } 1508 }); 1509 </script>