Error executing template "Designs/OlgerdinVefverslun/_parsed/Frontpage_ViteBridge.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_39a466fe7c7a4ffc9b4fc8c004eb4376.GetPageStyles() in E:\webcontent\beta.olgerdin.is\Files\Templates\Designs\OlgerdinVefverslun\_parsed\Frontpage_ViteBridge.parsed.cshtml:line 316
at CompiledRazorTemplates.Dynamic.RazorEngine_39a466fe7c7a4ffc9b4fc8c004eb4376.Execute() in E:\webcontent\beta.olgerdin.is\Files\Templates\Designs\OlgerdinVefverslun\_parsed\Frontpage_ViteBridge.parsed.cshtml:line 305
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.<RunCompile>b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
2 @using Advania.FileSystem;
3 @using Advania.Ecommerce.Infrastructure.Vite;
4 @using Advania.Configuration;
5 @using Advania.Custom;
6 @using Dynamicweb;
7 @using Advania.Users.UserManagement;
8 @using Advania.Users.UserManagement.Extensions;
9 @using Dynamicweb.Security.UserManagement;
10
11 @{
12 var vite = new ViteService(new ViteConfig(Files.GetRelativePath(ConfigManager.General.ViteManifestPath))
13 {
14 ModuleSrc = ConfigManager.General.ViteModuleSrc,
15 PublicPath = ConfigManager.General.VitePublicPath
16 });
17
18 var useViteLocalModule = ConfigManager.Env == AppEnvEnum.Development;
19
20 var contextAttributes = new Dictionary<string, object>() {
21 { "area-id", Model.Area.ID },
22 { "area-name", Model.Area.Name },
23 { "shop-id", Dynamicweb.Content.Services.Areas.GetArea(Model.Area.ID).EcomShopId },
24 { "page-id", Model.ID },
25 { "home-page-id", Model.Area.FirstActivePage.ID },
26 { "user-feed-page-id", GetPageIdByNavigationTag("GetUserFeed") },
27 { "cart-feed-page-id", GetPageIdByNavigationTag("CartFeed") },
28 { "my-pages-page-id", GetPageIdByNavigationTag("MyPages") },
29 { "login-page-id", GetPageIdByNavigationTag("LoginPage") },
30 { "register-page-id", GetPageIdByNavigationTag("RegisterPage") },
31 { "register-company-page-id", GetPageIdByNavigationTag("RegisterCompanyPage") },
32 { "product-search-page-id", GetPageIdByNavigationTag("ProductSearch") },
33 { "active-search-context-page-id", null },
34 { "product-typeahead-page-id", GetPageIdByNavigationTag("ProductTypeaheadSearch") },
35 { "company-invite-page-id", GetPageIdByNavigationTag("CompanyInvitePage") },
36 { "secondary-users-feed-page-id", GetPageIdByNavigationTag("SecondaryUsersFeed") },
37 { "customer-center-list-feed-page-id", GetPageIdByNavigationTag("CustomerCenterListFeed") },
38 { "translations-timestamp", new System.IO.FileInfo(Files.GetTemplatePath("OlgerdinVefverslun", "Translations.xml")).LastWriteTimeUtc.ToString("o") }
39 };
40
41 var pageIndex = new Dictionary<string, string>()
42 {
43 { "ProductFeedPage", Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetPageIdByNavigationTag("ProductFeedPage")) },
44 { "LiveFeedPage", Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetPageIdByNavigationTag("LiveFeedPage")) },
45 { "BrandPage", Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetPageIdByNavigationTag("BrandPage")) },
46 { "ProductSearch", Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetPageIdByNavigationTag("ProductSearch")) }
47 };
48
49 if (Model.CurrentUser != null)
50 {
51 contextAttributes["current-user-id"] = Model.CurrentUser.ID;
52 }
53
54 if (Model.Cart != null)
55 {
56 contextAttributes["current-cart-id"] = Model.Cart.ID;
57 }
58
59 var subAreaPage = Dynamicweb.Content.Services.Pages.GetPage(Model.TopPage.ID);
60 if (subAreaPage.ItemType == "Advania_Sub_Area")
61 {
62 contextAttributes["sub-area-name"] = subAreaPage.GetDisplayName();
63
64 if (subAreaPage.Item.TryGetValue("Brand_Page", out object brandPage))
65 {
66 var brandPageId = Dynamicweb.Environment.Helpers.LinkHelper.GetInternalPageId(brandPage.ToString());
67 pageIndex["BrandPage"] = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(brandPageId);
68 }
69 /*
70 contextAttributes["active-search-context-page-id"] = Convert.ToInt32(activeSearchContextPage);
71 contextAttributes["product-search-page-id"] = contextSearchPageId.PageId;
72 contextAttributes["product-typeahead-page-id"] = contextTypeaheadSearchPageId.PageId;
73 */
74 }
75
76 /* This loop enables us to have specific page IDs to use for product search & typeahead functionality. It's used to solve */
77 /* Danól being split into 3 departments, each with their own subpage which needs to have its search isolated to their */
78 /* specific products. */
79 if (Dynamicweb.Security.UserManagement.User.GetCurrentFrontendUser() is User user)
80 {
81 var contextSearchPages = Model.Area.Item?.GetItems("Context_Search_Pages");
82
83 if (contextSearchPages != null)
84 {
85 foreach (var item in contextSearchPages)
86 {
87 var userGroupContext = item.GetRawValue("User_Group_Context");
88 if (user.GroupsIds.Contains(Dynamicweb.Core.Converter.ToInt32(userGroupContext)))
89 {
90 var contextSearchPageId = item.GetLink("Search_Page");
91 if (contextSearchPageId != null && contextSearchPageId.PageId != 0)
92 {
93 contextAttributes["active-search-context-page-id"] = contextSearchPageId.PageId;
94 contextAttributes["product-search-page-id"] = contextSearchPageId.PageId;
95 }
96
97 var contextTypeaheadSearchPageId = item.GetLink("Typeahead_Page");
98 if (contextTypeaheadSearchPageId != null && contextTypeaheadSearchPageId.PageId != 0)
99 {
100 contextAttributes["product-typeahead-page-id"] = contextTypeaheadSearchPageId.PageId;
101 }
102 break;
103 }
104 }
105 }
106 }
107
108
109 var myProductsPageId = GetPageIdByNavigationTag("MyProducts");
110 if (myProductsPageId > 0)
111 {
112 var myProductsPage = Dynamicweb.Content.Services.Pages.GetPage(myProductsPageId);
113 if (myProductsPage != null && Dynamicweb.Frontend.SecurityHandler.IsCurrentUserAllowed(myProductsPage))
114 {
115 contextAttributes["my-products-page-id"] = myProductsPageId;
116 }
117 }
118
119 var shopContext = Model.Area.Name.ToLower().Contains("danol") ? ShopContext.Danol : ShopContext.Olgerdin;
120 contextAttributes["repository-name"] = shopContext == ShopContext.Olgerdin ? "Products" : "DanolShop";
121 contextAttributes["query-name"] = "Products";
122
123 if (Model.Area.Item != null)
124 {
125 contextAttributes["service-desk-email"] = Model.Area.Item.GetString("Email");
126 contextAttributes["service-desk-phone"] = Model.Area.Item.GetString("PhoneNumber");
127 }
128
129 var contextAttributesFormatted = string.Join(" ", contextAttributes.Select(attr => string.Format("{0}='{1}'", attr.Key, attr.Value)));
130
131 if (!Model.IsCurrentUserAllowed)
132 {
133 System.Web.HttpContext.Current.Response.Redirect("/Default.aspx?ID=" + GetPageIdByNavigationTag("LoginPage"));
134 }
135
136 var googleTagManagerID = Model.Area.Item?.GetString("Google_Tag_Manager_ID");
137
138
139 /* Restores ability to set background image from Website settings which Ölgerðin & Danól use for Holidaythemes */
140 var layoutStyles = "";
141 if (Model.Area.Item != null)
142 {
143
144 var styles = new Dictionary<string, string>();
145 var image = Model.Area.Item.GetString("Background_Image");
146 if (!string.IsNullOrWhiteSpace(image))
147 {
148 styles.Add("background-image", string.Format("url('{0}')", image));
149 }
150 var backgroundSize = Model.Area.Item.GetString("Background_Image_Size");
151 if (!string.IsNullOrWhiteSpace(backgroundSize))
152 {
153 styles.Add("background-size", backgroundSize);
154 }
155
156 var backgroundRepeat = Model.Area.Item.GetString("Background_Image_Repeat");
157 if (!string.IsNullOrWhiteSpace(backgroundRepeat))
158 {
159 styles.Add("background-repeat", backgroundRepeat);
160 }
161
162 layoutStyles = string.Join(";", styles.Select(prop => string.Format("{0}:{1}", prop.Key, prop.Value)).ToArray());
163 }
164
165 var toast = "";
166 var toastType = "success";
167
168 var janusLoginResults = System.Web.HttpContext.Current.Session["Janus_Activation_Success"];
169 if (janusLoginResults != null && Dynamicweb.Security.UserManagement.User.GetCurrentFrontendUser() != null)
170 {
171 System.Web.HttpContext.Current.Session.Remove("Janus_Activation_Success");
172 toast = Translate("Rafræn skilríki hafa verið virkjuð");
173 }
174
175 var globalPopup = GetPageIdByNavigationTag("GlobalPopup");
176
177 }
178
179 <!DOCTYPE html>
180 <html lang="@Pageview.Area.CultureInfo.TwoLetterISOLanguageName">
181 <head>
182 <meta charset="utf-8" />
183 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
184 <meta name="PageID" value="@Model.ID" />
185 @Model.MetaTags
186
187 @if (!string.IsNullOrWhiteSpace(googleTagManagerID))
188 {
189 <script>
190 (function (w, d, s, l, i) {
191 w[l] = w[l] || []; w[l].push({
192 'gtm.start':
193 new Date().getTime(), event: 'gtm.js'
194 }); var f = d.getElementsByTagName(s)[0],
195 j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true
196 ; j.defer = true; j.src =
197 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
198 })(window, document, 'script', 'dataLayer', '@(googleTagManagerID)');
199 </script>
200 }
201 <title>@Model.Title - @(shopContext == ShopContext.Olgerdin ? "Ölgerðin Egill Skallagrímsson" : "Danól") </title>
202 <style>
203 [v-cloak] {
204 display: none;
205 }
206 </style>
207 <link rel="shortcut icon" type="image/x-icon" href="@Model.Area.Item.GetString("Favicon")" />
208
209 @* Legacy scripts *@
210 <script src="/Files/Templates/Designs/OlgerdinVefverslun/JS/Libraries/Prod_Jquery-3.3.1.js" defer></script>
211 <script src="/Files/Templates/Designs/OlgerdinVefverslun/JS/Libraries/owl.carousel.min.js" defer></script>
212 <script src="/Files/Templates/Designs/OlgerdinVefverslun/JS/Libraries/typeahead-0.11.1.js" defer></script>
213 @if (useViteLocalModule)
214 {
215 @vite.RenderModuleAssets()
216 }
217 else
218 {
219 @vite.RenderManifestAssets()
220 }
221
222 @if (shopContext == ShopContext.Olgerdin)
223 {
224 <text><link rel="stylesheet" href="/Files/Templates/Designs/OlgerdinVefverslun/Genesys/Olgerdin/styles.css?v=3">
225 <style>
226 #messageInput {
227 min-width: 0;
228 }
229 </style>
230 <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
231 </text>;
232 }
233 else if (shopContext == ShopContext.Danol)
234 {
235 <text><link rel="stylesheet" href="/Files/Templates/Designs/OlgerdinVefverslun/Genesys/Danol/styles.css?v=3">
236 <style>
237 #messageInput {
238 min-width: 0;
239 }
240 </style>
241 <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
242 </text>;
243 }
244
245 @* Enable injecting scripts/styles for further down in DW Template renderer, see Files\Templates\eCom7\CheckoutHandler\Borgun3D\Post\Post.cshtml *@
246 @RenderSnippet("MasterHeadEnd")
247 </head>
248
249 <body class="theme theme--@shopContext.ToString().ToLower() scrollbar scrollbar--thick">
250 @{
251 var cacheHit = System.Runtime.Caching.MemoryCache.Default.Get("RUID");
252 if (cacheHit != null)
253 {
254 var ruidInCache = (string)cacheHit;
255
256 if (!string.IsNullOrWhiteSpace(ruidInCache))
257 {
258 <input type="hidden" id="RUID" value="@ruidInCache" />
259 System.Runtime.Caching.MemoryCache.Default.Remove("RUID");
260 }
261 }
262 if (Model.CurrentUser != null)
263 {
264 <input type="hidden" id="UserId" value="@Model.CurrentUser.ID" />
265 }
266 }
267 @if (!string.IsNullOrWhiteSpace(googleTagManagerID))
268 {
269 <noscript>
270 <iframe src="https://www.googletagmanager.com/ns.html?id=@(googleTagManagerID)"
271 height="0" width="0" style="display:none;visibility:hidden"></iframe>
272 </noscript>
273 }
274 <div id="app" v-cloak>
275 <nav-provider :page-index='@Newtonsoft.Json.JsonConvert.SerializeObject(pageIndex)'>
276 <dynamicweb-context-provider @contextAttributesFormatted>
277 <nav-scroll-top-button></nav-scroll-top-button>
278 <web-chat-button></web-chat-button>
279 @Navigation.RenderNavigation("Navigation/Navbar.cshtml", new Dynamicweb.Frontend.Navigation.NavigationSettings()
280 {
281 StartLevel = 1,
282 StopLevel = 99,
283 ExpandMode = Dynamicweb.Frontend.Navigation.ExpandMode.All
284 })
285
286 @{
287 var topPage = Dynamicweb.Content.Services.Pages.GetPage(Model.TopPage.ID);
288 var renderMegamenu = topPage.NavigationTag.Contains("Megamenu");
289
290 if (renderMegamenu)
291 {
292 <div class="legacy">
293 <div class="megamenu-desktop">
294 @Navigation.RenderNavigation("Navigation/Megamenu.cshtml", new Dynamicweb.Frontend.Navigation.NavigationSettings()
295 {
296 StartLevel = 2,
297 ExpandMode = Dynamicweb.Frontend.Navigation.ExpandMode.All,
298 RootPageId = topPage.ID
299 })
300 </div>
301 </div>
302 }
303 }
304
305 <layout-master @(renderMegamenu ? "megamenu" : "") style="@layoutStyles">
306 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
307
308
309
310 @functions
311 {
312 string GetPageStyles()
313 {
314 var styles = new Dictionary<string, string>();
315
316 var image = Model.PropertyItem.GetString("Background_Image");
317 if (!string.IsNullOrWhiteSpace(image))
318 {
319 styles.Add("background-image", string.Format("url('{0}')", image));
320 }
321 var backgroundSize = Model.PropertyItem.GetString("Background_Image_Size");
322 if (!string.IsNullOrWhiteSpace(backgroundSize))
323 {
324 styles.Add("background-size", backgroundSize);
325 }
326
327 var backgroundRepeat = Model.PropertyItem.GetString("Background_Image_Repeat");
328 if (!string.IsNullOrWhiteSpace(backgroundRepeat))
329 {
330 styles.Add("background-repeat", backgroundRepeat);
331 }
332
333 return string.Join(";", styles.Select(prop => string.Format("{0}:{1}", prop.Key, prop.Value)).ToArray());
334 }
335 }
336
337 <legacy-provider :is-enabled="true" :is-page="true">
338 <div class="frontPage" style="@GetPageStyles()">
339 <div>
340 @Model.Placeholder("bannerPlaceholder", "Banner Placeholder", "sort:2")
341 </div>
342 <div>
343 @Model.Placeholder("mainContentPlaceholder", "Main Content Placeholder", "default:true;sort:1")
344 </div>
345 </div>
346 </legacy-provider>
347 </layout-master>
348 @Navigation.RenderNavigation("Navigation/Footer.cshtml", new Dynamicweb.Frontend.Navigation.NavigationSettings()
349 {
350 StartLevel = 1,
351 StopLevel = 99,
352 ExpandMode = Dynamicweb.Frontend.Navigation.ExpandMode.All,
353 RootNavigationTag = "Footer",
354 Parameters = new Dictionary<string, object>()
355 {
356 {"serviceDeskNumber", Model.Area.Item.GetString("PhoneNumber") },
357 {"serviceDeskText", Model.Area.Item.GetString("Text_1") },
358 {"companyInformation", Model.Area.Item.GetString("Text_2") }
359 }
360 })
361 @{
362 var currentUser = Dynamicweb.Security.UserManagement.User.GetCurrentFrontendUser();
363 var userManagementService = new UserManagementService();
364
365 if (currentUser != null && !currentUser.IsCustomerUser())
366 {
367 IEnumerable<User> usersForSelection = userManagementService.GetCustomerUsersForUser(currentUser.ID, Pageview.Area.EcomShopId).Result;
368 if (usersForSelection.Count() > 0)
369 {
370 <select-account-prompt></select-account-prompt>
371 }
372 else if (Model.Item == null || Model.Item.SystemName != "UserPage")
373 {
374 var userManagementPageId = GetPageIdByNavigationTag("Advania_UserManagement");
375 if (userManagementPageId > 0)
376 {
377 var userManagementItem = Dynamicweb.Content.Services.Items.GetItemByPageId(userManagementPageId, false);
378 if (userManagementItem != null)
379 {
380 int companyAccessAuthParagraphId = -1;
381 object companyAccessAuthObj;
382 if (userManagementItem.TryGetValue("Company_Access_Auth_Paragraph_Id", out companyAccessAuthObj) && companyAccessAuthObj != null)
383 {
384 companyAccessAuthParagraphId = Dynamicweb.Core.Converter.ToInt32(companyAccessAuthObj.ToString());
385 }
386
387 if (companyAccessAuthParagraphId > 0)
388 {
389 <auth-company-access-required-modal>
390 @RenderParagraphContent(companyAccessAuthParagraphId)
391 </auth-company-access-required-modal>
392 }
393 }
394 }
395 }
396 }
397 }
398 <svg-defs></svg-defs>
399 </dynamicweb-context-provider>
400 </nav-provider>
401 <toasts toast="@toast" toast-type="@toastType"></toasts>
402 @if (globalPopup != 0)
403 {
404 @RenderPageContent(globalPopup)
405 }
406 </div>
407 @if (shopContext == ShopContext.Olgerdin)
408 {
409 <text><!-- Launcher Button with Chat Icon -->
410 <button id="startButton"
411 onclick="toggleChat()">
412 <svg width="24"
413 height="22"
414 viewBox="0 0 24 22"
415 fill="none"
416 xmlns="http://www.w3.org/2000/svg">
417 <path d="M11.9999 2C5.8968 2 1.49993 5.96562 1.49993 10.25C1.49993 11.9891 2.22649 13.5594 3.37493 14.9375C3.61868 15.2328 3.76868 15.6312 3.7218 16.0578C3.57649 17.3234 3.18743 18.5188 2.51711 19.6344C2.49368 19.6766 2.46555 19.7188 2.44211 19.7562C2.96243 19.6203 3.48274 19.4281 3.97493 19.2172C4.7718 18.8703 5.5218 18.4344 6.24367 17.9328C6.64211 17.6562 7.15305 17.5813 7.61242 17.7359C9.0468 18.2234 10.5046 18.5 11.9999 18.5C18.1031 18.5 22.4999 14.5344 22.4999 10.25C22.4999 5.96562 18.1031 2 11.9999 2ZM-7.47609e-05 10.25C-7.47609e-05 4.86875 5.36711 0.5 11.9999 0.5C18.6327 0.5 23.9999 4.86875 23.9999 10.25C23.9999 15.6313 18.6327 20 11.9999 20C10.3124 20 8.69524 19.6859 7.1343 19.1609C7.12492 19.1562 7.11086 19.1609 7.10149 19.1656C6.3093 19.7141 5.47493 20.2016 4.57493 20.5953C3.44993 21.0828 2.09524 21.5 0.749925 21.5C0.445238 21.5 0.173363 21.3172 0.0561752 21.0406C-0.0610123 20.7641 0.00461273 20.4406 0.21555 20.225C0.595238 19.8406 0.92805 19.3719 1.23274 18.8656C1.78118 17.9469 2.1093 16.9625 2.23118 15.9078C2.23118 15.9078 2.22649 15.9031 2.22649 15.8984C0.918675 14.3328 -7.47609e-05 12.4344 -7.47609e-05 10.25Z"
418 fill="currentColor" />
419 </svg>
420 </button>
421
422 <!-- Chat Container -->
423 <div class="chat-container">
424 <div class="chat-header">
425 <div class="chat-chatbot-header">
426 <span class="chat-chatbot-icon">
427 <svg width="48"
428 height="48"
429 viewBox="0 0 48 48"
430 fill="none"
431 xmlns="http://www.w3.org/2000/svg">
432 <g clip-path="url(#clip0_7390_3303)">
433 <rect width="48"
434 height="48"
435 rx="24"
436 fill="#002643" />
437 <path d="M54.7086 49.4537L54.6676 39.7274C54.6676 32.1267 50.4562 24.6373 39.8182 24.6373H7.52653C-3.11401 24.6373 -7.32414 32.1241 -7.32414 39.7274L-7.36255 49.4537H17.0595C15.5972 47.9915 15.2809 45.8147 15.2809 43.451V41.1641C15.2809 40.0936 14.5191 27.3083 23.7063 27.0881C30.8743 27.3032 31.9396 35.2164 32.0651 39.1115C32.0651 38.2677 32.0651 37.8042 32.0651 39.1474C32.0907 40.0412 32.0702 40.7236 32.0651 41.0386V43.451C32.0651 45.8109 31.7488 47.9876 30.2865 49.4537H54.7111H54.7099H54.7086Z"
438 fill="white" />
439 <path d="M16.9112 21.6539H6.2348C5.12849 21.6539 4.23218 20.7576 4.23218 19.6513V11.5383L16.9099 21.6539H16.9112Z"
440 fill="#FCBA16" />
441 <path d="M30.3751 21.6539H41.049C42.1553 21.6539 43.0516 20.7576 43.0516 19.6513V11.5383L30.3739 21.6539H30.3764H30.3751Z"
442 fill="#FCBA16" />
443 <path d="M30.3751 21.6539L23.6425 12.8751L16.9112 21.6539H30.3751Z"
444 fill="#FCBA16" />
445 </g>
446 <defs>
447 <clipPath id="clip0_7390_3303">
448 <rect width="48"
449 height="48"
450 rx="24"
451 fill="white" />
452 </clipPath>
453 </defs>
454 </svg>
455 </span>
456 <span>Spjallmenni</span>
457 </div>
458 <button id="closeButton"
459 onclick="toggleChat(false)">
460 <svg width="24"
461 height="24"
462 viewBox="0 0 24 24"
463 fill="none"
464 xmlns="http://www.w3.org/2000/svg">
465 <path d="M21.75 12C21.75 12.4125 21.4125 12.75 21 12.75H3C2.5875 12.75 2.25 12.4125 2.25 12C2.25 11.5875 2.5875 11.25 3 11.25H21C21.4125 11.25 21.75 11.5875 21.75 12Z"
466 fill="white" />
467 </svg>
468 </button>
469 </div>
470 <div id="chatBox"></div>
471 <div class="input-area">
472 <div class="message-input-container">
473 <input type="text"
474 id="messageInput"
475 placeholder="Skrifaðu skilaboðin þín hér..." />
476 <button id="sendButton"
477 onclick="sendMessage()">
478 <svg width="20"
479 height="20"
480 viewBox="0 0 20 20"
481 fill="none"
482 xmlns="http://www.w3.org/2000/svg">
483 <path d="M19.8164 10.4414C20.0586 10.1992 20.0586 9.80078 19.8164 9.55859L14.1914 3.93359C13.9492 3.69141 13.5508 3.69141 13.3086 3.93359C13.0664 4.17578 13.0664 4.57422 13.3086 4.81641L17.8672 9.375H0.625C0.28125 9.375 0 9.65625 0 10C0 10.3438 0.28125 10.625 0.625 10.625H17.8672L13.3086 15.1836C13.0664 15.4258 13.0664 15.8242 13.3086 16.0664C13.5508 16.3086 13.9492 16.3086 14.1914 16.0664L19.8164 10.4414Z"
484 fill="white" />
485 </svg>
486 </button>
487 </div>
488 <span class="file-name"
489 id="fileName"></span>
490 </div>
491 </div>
492
493 <script src="/Files/Templates/Designs/OlgerdinVefverslun/Genesys/Olgerdin/config.js?v=3"></script>
494 <script src="/Files/Templates/Designs/OlgerdinVefverslun/Genesys/Olgerdin/chat.js?v=3"></script>
495 </text>;
496 }
497 else if (shopContext == ShopContext.Danol)
498 {
499 <text><!-- Launcher Button with Chat Icon -->
500 <button id="startButton"
501 onclick="toggleChat()">
502 <svg width="24"
503 height="22"
504 viewBox="0 0 24 22"
505 fill="none"
506 xmlns="http://www.w3.org/2000/svg">
507 <path d="M11.9999 2C5.8968 2 1.49993 5.96562 1.49993 10.25C1.49993 11.9891 2.22649 13.5594 3.37493 14.9375C3.61868 15.2328 3.76868 15.6312 3.7218 16.0578C3.57649 17.3234 3.18743 18.5188 2.51711 19.6344C2.49368 19.6766 2.46555 19.7188 2.44211 19.7562C2.96243 19.6203 3.48274 19.4281 3.97493 19.2172C4.7718 18.8703 5.5218 18.4344 6.24367 17.9328C6.64211 17.6562 7.15305 17.5813 7.61242 17.7359C9.0468 18.2234 10.5046 18.5 11.9999 18.5C18.1031 18.5 22.4999 14.5344 22.4999 10.25C22.4999 5.96562 18.1031 2 11.9999 2ZM-7.47609e-05 10.25C-7.47609e-05 4.86875 5.36711 0.5 11.9999 0.5C18.6327 0.5 23.9999 4.86875 23.9999 10.25C23.9999 15.6313 18.6327 20 11.9999 20C10.3124 20 8.69524 19.6859 7.1343 19.1609C7.12492 19.1562 7.11086 19.1609 7.10149 19.1656C6.3093 19.7141 5.47493 20.2016 4.57493 20.5953C3.44993 21.0828 2.09524 21.5 0.749925 21.5C0.445238 21.5 0.173363 21.3172 0.0561752 21.0406C-0.0610123 20.7641 0.00461273 20.4406 0.21555 20.225C0.595238 19.8406 0.92805 19.3719 1.23274 18.8656C1.78118 17.9469 2.1093 16.9625 2.23118 15.9078C2.23118 15.9078 2.22649 15.9031 2.22649 15.8984C0.918675 14.3328 -7.47609e-05 12.4344 -7.47609e-05 10.25Z"
508 fill="currentColor" />
509 </svg>
510 </button>
511
512 <!-- Chat Container -->
513 <div class="chat-container">
514 <div class="chat-header">
515 <div class="chat-chatbot-header">
516 <span>Spjallmenni</span>
517 </div>
518 <button id="closeButton"
519 onclick="toggleChat(false)">
520 <svg width="24"
521 height="24"
522 viewBox="0 0 24 24"
523 fill="none"
524 xmlns="http://www.w3.org/2000/svg">
525 <path d="M21.75 12C21.75 12.4125 21.4125 12.75 21 12.75H3C2.5875 12.75 2.25 12.4125 2.25 12C2.25 11.5875 2.5875 11.25 3 11.25H21C21.4125 11.25 21.75 11.5875 21.75 12Z"
526 fill="white" />
527 </svg>
528 </button>
529 </div>
530 <div id="chatBox"></div>
531 <div class="input-area">
532 <div class="message-input-container">
533 <input type="text"
534 id="messageInput"
535 placeholder="Skrifaðu skilaboðin þín hér..." />
536 <button id="sendButton"
537 onclick="sendMessage()">
538 <svg width="20"
539 height="20"
540 viewBox="0 0 20 20"
541 fill="none"
542 xmlns="http://www.w3.org/2000/svg">
543 <path d="M19.8164 10.4414C20.0586 10.1992 20.0586 9.80078 19.8164 9.55859L14.1914 3.93359C13.9492 3.69141 13.5508 3.69141 13.3086 3.93359C13.0664 4.17578 13.0664 4.57422 13.3086 4.81641L17.8672 9.375H0.625C0.28125 9.375 0 9.65625 0 10C0 10.3438 0.28125 10.625 0.625 10.625H17.8672L13.3086 15.1836C13.0664 15.4258 13.0664 15.8242 13.3086 16.0664C13.5508 16.3086 13.9492 16.3086 14.1914 16.0664L19.8164 10.4414Z"
544 fill="currentColor" />
545 </svg>
546 </button>
547 </div>
548 <span class="file-name"
549 id="fileName"></span>
550 </div>
551 </div>
552
553 <script src="/Files/Templates/Designs/OlgerdinVefverslun/Genesys/Danol/config.js?v=3"></script>
554 <script src="/Files/Templates/Designs/OlgerdinVefverslun/Genesys/Danol/chat.js?v=3"></script></text>;
555 }
556 </body>
557 </html>
558 @* Utility snipper if we need to inject code outside of Master HTML context, like html blocks with injected <script> tags. @see Files/Templates/eCom7/CheckoutHandler/Borgun3D/3DS/ThreeDS.cshtml *@
559 @RenderSnippet("MasterEnd")