Nord Star 26 + Patrol
Nord Star 26 + Patrol er det opplagte valget for deg som leter etter en sjødyktig transport- og ekskursjonsbåt for all slags vær. I den romslige hytta kjører opptil 6 personer komfortabelt og beskyttet - uansett vær. Senkede gangveier og solide gripeskinner løper rundt hele båten.
Spesifikasjoner
Nord Star 26 er tilgjengelig med både påhengsmotor eller innenbordsmotor i forskjellige størrelser. Påhengsmotorene har fordelen at de er veldig stille og kan oppnås som dobbeltmontering, mens en innenbordsmotor for mange føles som det gitte alternativet når det gjelder pålitelighet og forbruk. Vi diskuterer gjerne de forskjellige alternativene med deg for å se hvilket alternativ som passer dine behov.
Nord Star båtene er annerkjente for sine stillegående skrog med særs gode sjøegenskaper. Nord Star er bygget i Finland av Linex- Boats Oy som har bygget båter i generasjoner.
Den populære 26- foteren er også godt egnet for ferieturer. Med mulighet for 4 køyer (hvorav to er på det nye akterdekket som er tilgjengelig som ekstra tilbehør), en enkel kjøkkenkrok og et romslig separat toalett, vil ferien ombord være behagelig. Det store akterdekket og den sjenerøse badeplattformen er utmerket for soling, bading og sosialt samvær.
Nord Star-modeller har unike sjøegenskaper, og Nord Star 26 er intet unntak. Skroget er sjødyktig, raskt og trygt. Med Nord Star 26 er du trygg i all slags vær.
Error compiling template "Designs/Swift/ItemPublisher/List/List.cshtml" Line 209: The name 'item' does not exist in the current context
1 //------------------------------------------------------------------------------ 2 // <auto-generated> 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319.42000 5 // 6 // Changes to this file may cause incorrect behavior and will be lost if 7 // the code is regenerated. 8 // </auto-generated> 9 //------------------------------------------------------------------------------ 10 11 namespace CompiledRazorTemplates.Dynamic { 12 using System; 13 using System.Collections.Generic; 14 using System.Linq; 15 16 #line 2 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 17 using System.IO; 18 19 #line default 20 #line hidden 21 22 23 public class RazorEngine_3a525f070dfb49a98b6475988ffd2f98 : Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> { 24 25 #line hidden 26 27 #line 4 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 28 29 30 private List<string> GetTags(LoopItem item) 31 { 32 var tags = new List<string>(); 33 34 foreach (var tag in item.GetLoop("ItemPublisher:Item.Tags.Options")) 35 { 36 if (tag.GetBoolean("ItemPublisher:Item.Tags.Option.IsSelected")) 37 { 38 tags.Add(tag.GetString("ItemPublisher:Item.Tags.Option.Label")); 39 } 40 } 41 42 return tags; 43 } 44 45 private string CreateCategory(string label, string theme) 46 { 47 var border = string.IsNullOrEmpty(theme) ? "--swift-border-color: rgba(var(--swift-foreground-color-rgb), .2);" : null; 48 var sticker = $"<span class=\"badge {theme}\" style=\"color: var(--swift-foreground-color); background-color: rgba(var(--swift-background-color-rgb), 1); {border} \">{label}</span>"; 49 return sticker; 50 } 51 52 private string CreateSticker(string label) 53 { 54 string shape = Pageview.CurrentParagraph.Item["ArticleItemShape"] != null ? Pageview.CurrentParagraph.Item["ArticleItemShape"].ToString() : "boxed"; 55 var sticker = $"<span class=\"badge fw-normal shadow-none\" style=\"border: 1px solid rgba(var(--swift-foreground-color-rgb), 0.2);\">{label}</span>"; 56 return sticker; 57 } 58 59 private string GetTagStickers(LoopItem item) 60 { 61 var stickers = string.Empty; 62 63 if (item.GetString("ItemPublisher:Item.SystemName") == "Swift_Article") 64 { 65 var showTags = Pageview.CurrentParagraph.Item["ShowTags"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShowTags"] : false; 66 67 if (showTags && GetTags(item).Count >= 1) 68 { 69 stickers += "<div class=\"d-inline-flex flex-wrap gap-1\">"; 70 foreach (var tag in GetTags(item)) 71 { 72 stickers += CreateSticker(tag); 73 } 74 stickers += "</div>"; 75 } 76 } 77 78 return stickers; 79 } 80 81 private string GetCategorySticker(LoopItem item) 82 { 83 var sticker = string.Empty; 84 85 if (item.GetString("ItemPublisher:Item.SystemName") == "Swift_Article") 86 { 87 var showListCategory = Pageview.CurrentParagraph.Item["ShowListCategory"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShowListCategory"] : false; 88 89 if (showListCategory) 90 { 91 sticker += "<div class=\"d-inline-flex flex-wrap gap-1\">"; 92 sticker += CreateCategorySticker(GetCategory(Dynamicweb.Content.Services.Pages.GetPage(item.GetInteger("ItemPublisher:Item.Field.PageId")).ParentPageId), GetCategoryTheme(GetCategory(Dynamicweb.Content.Services.Pages.GetPage(item.GetInteger("ItemPublisher:Item.Field.PageId")).ParentPageId))); 93 sticker += "</div>"; 94 } 95 } 96 97 return sticker; 98 } 99 100 private Dynamicweb.Frontend.PageInfoViewModel GetCategory(int categoryId) 101 { 102 var categoryParagraph = categoryId != 0 ? Dynamicweb.Content.Services.Pages.GetPage(categoryId) : null; 103 var category = categoryParagraph != null ? Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(categoryParagraph) : null; 104 105 return category; 106 } 107 108 private string CreateCategorySticker(Dynamicweb.Frontend.PageInfoViewModel category, string theme) 109 { 110 var sticker = category != null ? CreateCategory(category.Item?.GetString("Title"), theme) : null; 111 return sticker; 112 } 113 114 private string GetCategoryTheme(Dynamicweb.Frontend.PageInfoViewModel category) 115 { 116 var theme = category != null ? category.Item?.GetRawValueString("CoverTheme").ToString().Replace(" ", "").Trim().ToLower() : null; 117 return theme; 118 } 119 120 private string LiftOnHover() 121 { 122 bool liftOnHover = Pageview.CurrentParagraph.Item["LiftOnHover"] != null ? (Boolean)Pageview.CurrentParagraph.Item["LiftOnHover"] : false; 123 var lift = liftOnHover ? "lift" : null; 124 return lift; 125 } 126 127 private string ShadowOnHover() 128 { 129 bool shadowOnHover = Pageview.CurrentParagraph.Item["ShadowOnHover"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShadowOnHover"] : false; 130 var shadow = shadowOnHover ? "shadow-hover" : null; 131 return shadow; 132 } 133 134 private string GetPadding(string theme) 135 { 136 var padding = !string.IsNullOrEmpty(theme) ? "p-3" : null; 137 return padding; 138 } 139 140 private string GetGap(string theme) 141 { 142 var padding = string.IsNullOrEmpty(theme) ? "gap-3" : null; 143 return padding; 144 } 145 146 #line default 147 #line hidden 148 149 150 public RazorEngine_3a525f070dfb49a98b6475988ffd2f98() { 151 } 152 153 public override void Execute() { 154 WriteLiteral("\r\n"); 155 156 WriteLiteral("\r\n"); 157 158 159 #line 123 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 160 161 bool showLoadMore = Pageview.CurrentParagraph.Item["ShowLoadMore"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShowLoadMore"] : false; 162 int maxItemsInList = !string.IsNullOrEmpty(Pageview.CurrentParagraph.Item["MaxItemsInList"].ToString()) ? Dynamicweb.Core.Converter.ToInt32(Pageview.CurrentParagraph.Item["MaxItemsInList"]) : 10; 163 var totalItems = GetInteger("ItemPublisher:Items.TotalCount"); 164 var count = GetInteger("ItemPublisher:Items.Count"); 165 var percent = count > 0 ? Convert.ToInt32(Math.Round(((double)count / totalItems) * 100, 0)) : 0; 166 var disableLoadMoreButton = count == totalItems ? true : false; 167 var loadMore = !disableLoadMoreButton ? $"onclick=\"document.querySelector('#PageSize_{Pageview.CurrentParagraph.ID}').value='{count + maxItemsInList}'; this.dispatchEvent(new window.Event('change', {{ bubbles: true }}))\"" : null; 168 var disabled = disableLoadMoreButton ? "disabled" : null; 169 var hasItems = GetBoolean("ItemPublisher:Items.Any"); 170 string articleListLayout = Pageview.CurrentParagraph.Item["ArticleListLayout"] != null ? Pageview.CurrentParagraph.Item["ArticleListLayout"].ToString() : "grid"; 171 string articleItemLayout = Pageview.CurrentParagraph.Item["ArticleItemLayout"] != null ? Pageview.CurrentParagraph.Item["ArticleItemLayout"].ToString() : string.Empty; 172 string orderReverseClass = articleItemLayout == "image-right" ? " order-first order-lg-last" : string.Empty; 173 string articleItemLayoutClass = string.Empty; 174 string titleFontSize = Pageview.CurrentParagraph.Item["TitleFontSize"] != null ? Pageview.CurrentParagraph.Item["TitleFontSize"].ToString() : string.Empty; 175 string gridSettings = Pageview.CurrentParagraph.Item["GridSettings"] != null ? Pageview.CurrentParagraph.Item["GridSettings"].ToString() : "4"; 176 string carouselSettings = Pageview.CurrentParagraph.Item["CarouselSettings"] != null ? Pageview.CurrentParagraph.Item["CarouselSettings"].ToString() : "4"; 177 bool showButton = Pageview.CurrentParagraph.Item["ShowButton"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShowButton"] : false; 178 string ratio = Pageview.CurrentParagraph.Item["ImageAspectRatio"] != null ? Pageview.CurrentParagraph.Item["ImageAspectRatio"].ToString() : string.Empty; 179 ratio = ratio != "0" ? ratio : string.Empty; 180 string ratioCssClass = ratio != string.Empty ? " ratio" : string.Empty; 181 string ratioVariable = ratio != string.Empty ? "style=\"--bs-aspect-ratio: " + ratio + "\"" : string.Empty; 182 string articleItemTheme = Pageview.CurrentParagraph.Item["ArticleItemTheme"] != null ? Pageview.CurrentParagraph.Item["ArticleItemTheme"].ToString().Replace(" ", "").Trim().ToLower() : string.Empty; 183 string articleItemShape = Pageview.CurrentParagraph.Item["ArticleItemShape"] != null ? Pageview.CurrentParagraph.Item["ArticleItemShape"].ToString() : "boxed"; 184 string shapeClass = " rounded-0"; 185 if (articleItemShape == "rounded") 186 { 187 shapeClass = " rounded-4"; 188 } 189 string settingsClassGrid = string.Empty; 190 switch (gridSettings) 191 { 192 case "2": 193 settingsClassGrid = " grid-md-2"; 194 break; 195 case "3": 196 settingsClassGrid = " grid-md-3"; 197 break; 198 case "4": 199 settingsClassGrid = " grid-md-2 grid-lg-3 grid-xl-4"; 200 break; 201 case "5": 202 settingsClassGrid = " grid-md-2 grid-lg-3 grid-xl-5"; 203 break; 204 } 205 string gridWrapperStart = articleListLayout == "grid" ? $"<div class=\"article-list grid gap-4 grid-1{settingsClassGrid}\">" : null; 206 string gridWrapperEnd = articleListLayout == "grid" ? "</div>" : null; 207 208 bool hasListContext = Pageview.CurrentParagraph.Item["ListContext"] is object; 209 bool showOnFrontpage = item.GetBoolean("ItemPublisher:Item.ShowOnFrontpage.Value"); 210 211 212 #line default 213 #line hidden 214 WriteLiteral("\r\n\r\n\r\n\r\n"); 215 216 217 #line 177 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 218 if (hasItems || count > 0) 219 { 220 221 222 #line default 223 #line hidden 224 225 #line 179 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 226 Write(gridWrapperStart); 227 228 229 #line default 230 #line hidden 231 232 #line 179 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 233 234 235 foreach (LoopItem item in GetLoop("ItemPublisher:Items.List")) 236 { 237 string title = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.Title")) && !item.GetBoolean("ItemPublisher:Item.HideTitle") ? item.GetString("ItemPublisher:Item.Title") : string.Empty; 238 string coverTitle = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.CoverTitle")) ? item.GetString("ItemPublisher:Item.CoverTitle") : string.Empty; 239 string coverImagePath = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.CoverImage")) ? item.GetString("ItemPublisher:Item.CoverImage") : string.Empty; 240 bool hasFocalPoint = item.GetBoolean("ItemPublisher:Item.CoverImage.ImageHasFocalPoint"); 241 int focalX = hasFocalPoint ? item.GetInteger("ItemPublisher:Item.CoverImage.FocalX") : 0; 242 int focalY = hasFocalPoint ? item.GetInteger("ItemPublisher:Item.CoverImage.FocalY") : 0; 243 int xPos = 100 - ((100 - focalX) / 2); 244 int yPos = ((100 - focalY) / 2); 245 string cssPosition = $"{xPos}% {yPos}%"; 246 string summary = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.Summary")) ? item.GetString("ItemPublisher:Item.Summary") : string.Empty; 247 string publishedDate = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.PublishedDate")) && !item.GetBoolean("ItemPublisher:Item.HidePublishedDate") ? item.GetDate("ItemPublisher:Item.PublishedDate").ToShortDateString() : string.Empty; 248 string link = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.Url")) ? item.GetString("ItemPublisher:Item.Url") : string.Empty; 249 string buttonLabel = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.ButtonLabel")) ? item.GetString("ItemPublisher:Item.ButtonLabel") : string.Empty; 250 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/"; 251 252 bool renderContentWrapper = true; 253 bool renderArticleInfoWrapper = true; 254 255 if (string.IsNullOrEmpty(title) && string.IsNullOrEmpty(summary) && string.IsNullOrEmpty(publishedDate) && item.GetInteger("ItemPublisher:Item.Author") == 0 && !showButton) 256 { 257 renderContentWrapper = false; 258 } 259 260 if (string.IsNullOrEmpty(publishedDate) && item.GetInteger("ItemPublisher:Item.Author") == 0) 261 { 262 renderArticleInfoWrapper = false; 263 } 264 265 switch (articleItemLayout) 266 { 267 case "image-left": 268 case "image-right": 269 articleItemLayoutClass = !string.IsNullOrEmpty(coverImagePath) && renderContentWrapper ? "flex-lg-row" : articleItemLayoutClass; 270 break; 271 } 272 273 string imageObjectFit = ratio != string.Empty ? "object-fit: cover;" : "object-fit: contain;"; 274 string coverTheme = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.CoverTheme")) ? item.GetString("ItemPublisher:Item.CoverTheme").Replace(" ", "").Trim().ToLower() : string.Empty; 275 string themeClass = string.Empty; 276 277 string coverImageWrapperClass = string.Empty; 278 279 if (!string.IsNullOrEmpty(coverTheme)) 280 { 281 articleItemTheme = coverTheme; 282 } 283 284 if (articleItemTheme != string.Empty) 285 { 286 themeClass = " theme " + articleItemTheme; 287 } 288 289 // Exclude self from list - if list has context (Tags) and if is on same page 290 bool excludeSelf = item.GetInteger("ItemPublisher:Item.Field.PageId") == item.GetInteger("ItemPublisher:Global.PageId"); 291 bool renderItem = true; 292 renderItem = hasListContext && excludeSelf ? renderItem = false : !hasListContext && !excludeSelf ? renderItem : renderItem; 293 294 295 if (renderItem) 296 { 297 298 299 #line default 300 #line hidden 301 WriteLiteral("\t\t\t<article"); 302 303 WriteAttribute("class", Tuple.Create(" class=\"", 11491), Tuple.Create("\"", 11663) 304 , Tuple.Create(Tuple.Create("", 11499), Tuple.Create("card", 11499), true) 305 , Tuple.Create(Tuple.Create(" ", 11503), Tuple.Create("border-0", 11504), true) 306 307 #line 243 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 308 , Tuple.Create(Tuple.Create(" ", 11512), Tuple.Create<System.Object, System.Int32>(string.IsNullOrEmpty(themeClass) ? "gap-3" : null 309 310 #line default 311 #line hidden 312 , 11513), false) 313 314 #line 243 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 315 , Tuple.Create(Tuple.Create(" ", 11565), Tuple.Create<System.Object, System.Int32>(articleItemLayoutClass 316 317 #line default 318 #line hidden 319 , 11566), false) 320 321 #line 243 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 322 , Tuple.Create(Tuple.Create("", 11589), Tuple.Create<System.Object, System.Int32>(themeClass 323 324 #line default 325 #line hidden 326 , 11589), false) 327 328 #line 243 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 329 , Tuple.Create(Tuple.Create("", 11602), Tuple.Create<System.Object, System.Int32>(shapeClass 330 331 #line default 332 #line hidden 333 , 11602), false) 334 , Tuple.Create(Tuple.Create(" ", 11615), Tuple.Create("overflow-hidden", 11616), true) 335 336 #line 243 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 337 , Tuple.Create(Tuple.Create(" ", 11631), Tuple.Create<System.Object, System.Int32>(LiftOnHover() 338 339 #line default 340 #line hidden 341 , 11632), false) 342 343 #line 243 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 344 , Tuple.Create(Tuple.Create(" ", 11646), Tuple.Create<System.Object, System.Int32>(ShadowOnHover() 345 346 #line default 347 #line hidden 348 , 11647), false) 349 ); 350 351 WriteLiteral(" itemscope"); 352 353 WriteLiteral(" itemtype=\"https://schema.org/CreativeWork\""); 354 355 WriteLiteral(" style=\"background-color: var(--swift-background-color)\""); 356 357 WriteLiteral(">\r\n\r\n"); 358 359 360 #line 245 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 361 362 363 #line default 364 #line hidden 365 366 #line 245 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 367 if (!string.IsNullOrEmpty(coverImagePath)) 368 { 369 if (Path.GetExtension(coverImagePath).ToLower() == ".svg") 370 { 371 coverImageWrapperClass = !renderContentWrapper ? "d-flex justify-content-center align-items-center h-100 w-100 " : "w-100 "; 372 373 374 375 #line default 376 #line hidden 377 WriteLiteral("\t\t\t\t\t\t<a"); 378 379 WriteAttribute("class", Tuple.Create(" class=\"", 12049), Tuple.Create("\"", 12102) 380 381 #line 251 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 382 , Tuple.Create(Tuple.Create("", 12057), Tuple.Create<System.Object, System.Int32>(coverImageWrapperClass 383 384 #line default 385 #line hidden 386 , 12057), false) 387 388 #line 251 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 389 , Tuple.Create(Tuple.Create("", 12082), Tuple.Create<System.Object, System.Int32>(orderReverseClass 390 391 #line default 392 #line hidden 393 , 12082), false) 394 ); 395 396 WriteAttribute("title", Tuple.Create(" title=\"", 12103), Tuple.Create("\"", 12117) 397 398 #line 251 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 399 , Tuple.Create(Tuple.Create("", 12111), Tuple.Create<System.Object, System.Int32>(title 400 401 #line default 402 #line hidden 403 , 12111), false) 404 ); 405 406 WriteAttribute("href", Tuple.Create(" href=\"", 12118), Tuple.Create("\"", 12130) 407 408 #line 251 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 409 , Tuple.Create(Tuple.Create("", 12125), Tuple.Create<System.Object, System.Int32>(link 410 411 #line default 412 #line hidden 413 , 12125), false) 414 ); 415 416 WriteLiteral(" tabindex=\"-1\""); 417 418 WriteLiteral(">\r\n\t\t\t\t\t\t\t<div"); 419 420 WriteAttribute("class", Tuple.Create(" class=\"", 12159), Tuple.Create("\"", 12247) 421 , Tuple.Create(Tuple.Create("", 12167), Tuple.Create("d-flex", 12167), true) 422 , Tuple.Create(Tuple.Create(" ", 12173), Tuple.Create("justify-content-center", 12174), true) 423 , Tuple.Create(Tuple.Create(" ", 12196), Tuple.Create("align-items-center", 12197), true) 424 , Tuple.Create(Tuple.Create(" ", 12215), Tuple.Create("overflow-hidden", 12216), true) 425 426 #line 252 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 427 , Tuple.Create(Tuple.Create("", 12231), Tuple.Create<System.Object, System.Int32>(ratioCssClass 428 429 #line default 430 #line hidden 431 , 12231), false) 432 ); 433 434 WriteLiteral(" "); 435 436 437 #line 252 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 438 Write(ratioVariable); 439 440 441 #line default 442 #line hidden 443 WriteLiteral(">\r\n"); 444 445 WriteLiteral("\t\t\t\t\t\t\t\t"); 446 447 448 #line 253 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 449 Write(ReadFile(coverImagePath)); 450 451 452 #line default 453 #line hidden 454 WriteLiteral("\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</a>\r\n"); 455 456 457 #line 256 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 458 } 459 else 460 { 461 coverImageWrapperClass = articleItemLayout == "image-top" ? "position-relative" : $"col {orderReverseClass}"; 462 coverImageWrapperClass += renderContentWrapper && articleItemLayout != "image-top" ? " col-lg-5" : string.Empty; 463 464 string figureClass = articleItemLayout == "image-top" ? ratioCssClass : "h-lg-100 ratio ratio-16x9"; 465 ratioVariable = articleItemLayout == "image-top" ? ratioVariable : string.Empty; 466 467 468 469 #line default 470 #line hidden 471 WriteLiteral("\t\t\t\t\t\t<a"); 472 473 WriteAttribute("class", Tuple.Create(" class=\"", 12801), Tuple.Create("\"", 12832) 474 475 #line 265 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 476 , Tuple.Create(Tuple.Create("", 12809), Tuple.Create<System.Object, System.Int32>(coverImageWrapperClass 477 478 #line default 479 #line hidden 480 , 12809), false) 481 ); 482 483 WriteAttribute("title", Tuple.Create(" title=\"", 12833), Tuple.Create("\"", 12847) 484 485 #line 265 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 486 , Tuple.Create(Tuple.Create("", 12841), Tuple.Create<System.Object, System.Int32>(title 487 488 #line default 489 #line hidden 490 , 12841), false) 491 ); 492 493 WriteAttribute("href", Tuple.Create(" href=\"", 12848), Tuple.Create("\"", 12860) 494 495 #line 265 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 496 , Tuple.Create(Tuple.Create("", 12855), Tuple.Create<System.Object, System.Int32>(link 497 498 #line default 499 #line hidden 500 , 12855), false) 501 ); 502 503 WriteLiteral(" tabindex=\"-1\""); 504 505 WriteLiteral(">\r\n\t\t\t\t\t\t\t<figure"); 506 507 WriteAttribute("class", Tuple.Create(" class=\"", 12892), Tuple.Create("\"", 12942) 508 , Tuple.Create(Tuple.Create("", 12900), Tuple.Create("overflow-hidden", 12900), true) 509 , Tuple.Create(Tuple.Create(" ", 12915), Tuple.Create("m-0", 12916), true) 510 , Tuple.Create(Tuple.Create(" ", 12919), Tuple.Create("mx-auto", 12920), true) 511 512 #line 266 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 513 , Tuple.Create(Tuple.Create(" ", 12927), Tuple.Create<System.Object, System.Int32>(figureClass 514 515 #line default 516 #line hidden 517 , 12928), false) 518 ); 519 520 WriteLiteral(" "); 521 522 523 #line 266 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 524 Write(ratioVariable); 525 526 527 #line default 528 #line hidden 529 WriteLiteral(">\r\n"); 530 531 532 #line 267 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 533 534 535 #line default 536 #line hidden 537 538 #line 267 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 539 540 coverImagePath = Dynamicweb.Context.Current.Server.UrlEncode(coverImagePath); 541 imageObjectFit = articleItemLayout != "image-top" ? "object-fit: cover" : imageObjectFit; 542 543 string imgSizeSelector = "50vw"; 544 imgSizeSelector = gridSettings == "1" || carouselSettings == "1" ? "100vw" : imgSizeSelector; 545 imgSizeSelector = gridSettings == "2" || carouselSettings == "2" ? "50vw" : imgSizeSelector; 546 imgSizeSelector = gridSettings == "3" || carouselSettings == "3" ? "33vw" : imgSizeSelector; 547 imgSizeSelector = gridSettings == "4" || carouselSettings == "4" ? "25vw" : imgSizeSelector; 548 imgSizeSelector = gridSettings == "5" || carouselSettings == "5" ? "17vw" : imgSizeSelector; 549 550 string coverImagePathM = $"/Admin/Public/GetImage.ashx?image={coverImagePath}&width=640&format=webp"; 551 string coverImagePathL = $"/Admin/Public/GetImage.ashx?image={coverImagePath}&width=960&format=webp"; 552 string imagePathFallBack = coverImagePathM; 553 554 555 556 #line default 557 #line hidden 558 WriteLiteral("\t\t\t\t\t\t\t\t\t<img"); 559 560 WriteAttribute("srcset", Tuple.Create(" srcset=\"", 14017), Tuple.Create("\"", 14099) 561 562 #line 283 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 563 , Tuple.Create(Tuple.Create("\r\n\t\t\t\t\t\t\t\t\t\t\t", 14026), Tuple.Create<System.Object, System.Int32>(coverImagePathM 564 565 #line default 566 #line hidden 567 , 14039), false) 568 , Tuple.Create(Tuple.Create(" ", 14055), Tuple.Create("640w,", 14058), true) 569 570 #line 284 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 571 , Tuple.Create(Tuple.Create("\r\n\t\t\t\t\t\t\t\t\t\t\t", 14063), Tuple.Create<System.Object, System.Int32>(coverImagePathL 572 573 #line default 574 #line hidden 575 , 14076), false) 576 , Tuple.Create(Tuple.Create(" ", 14092), Tuple.Create("960w", 14095), true) 577 ); 578 579 WriteAttribute("src", Tuple.Create("\r\n\t\t\t\t\t\t\t\t\t\tsrc=\"", 14100), Tuple.Create("\"", 14135) 580 581 #line 285 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 582 , Tuple.Create(Tuple.Create("", 14117), Tuple.Create<System.Object, System.Int32>(imagePathFallBack 583 584 #line default 585 #line hidden 586 , 14117), false) 587 ); 588 589 WriteAttribute("sizes", Tuple.Create("\r\n\t\t\t\t\t\t\t\t\t\tsizes=\"", 14136), Tuple.Create("\"", 14197) 590 , Tuple.Create(Tuple.Create("", 14155), Tuple.Create("(min-width:", 14155), true) 591 , Tuple.Create(Tuple.Create(" ", 14166), Tuple.Create("992px)", 14167), true) 592 593 #line 286 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 594 , Tuple.Create(Tuple.Create(" ", 14173), Tuple.Create<System.Object, System.Int32>(imgSizeSelector 595 596 #line default 597 #line hidden 598 , 14174), false) 599 , Tuple.Create(Tuple.Create("", 14190), Tuple.Create(",", 14190), true) 600 , Tuple.Create(Tuple.Create(" ", 14191), Tuple.Create("100vw", 14192), true) 601 ); 602 603 WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t\tloading=\"lazy\""); 604 605 WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t\tdecoding=\"async\""); 606 607 WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t\tclass=\"img-fluid image-zoom-lg-1-hover\""); 608 609 WriteAttribute("style", Tuple.Create("\r\n\t\t\t\t\t\t\t\t\t\tstyle=\"", 14303), Tuple.Create("\"", 14369) 610 611 #line 290 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 612 , Tuple.Create(Tuple.Create("", 14322), Tuple.Create<System.Object, System.Int32>(imageObjectFit 613 614 #line default 615 #line hidden 616 , 14322), false) 617 , Tuple.Create(Tuple.Create("", 14337), Tuple.Create(";", 14337), true) 618 , Tuple.Create(Tuple.Create(" ", 14338), Tuple.Create("object-position:", 14339), true) 619 620 #line 290 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 621 , Tuple.Create(Tuple.Create(" ", 14355), Tuple.Create<System.Object, System.Int32>(cssPosition 622 623 #line default 624 #line hidden 625 , 14356), false) 626 , Tuple.Create(Tuple.Create("", 14368), Tuple.Create(";", 14368), true) 627 ); 628 629 WriteAttribute("alt", Tuple.Create("\r\n\t\t\t\t\t\t\t\t\t\talt=\"", 14370), Tuple.Create("\"", 14393) 630 631 #line 291 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 632 , Tuple.Create(Tuple.Create("", 14387), Tuple.Create<System.Object, System.Int32>(title 633 634 #line default 635 #line hidden 636 , 14387), false) 637 ); 638 639 WriteLiteral(">\r\n"); 640 641 642 #line 292 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 643 644 645 #line default 646 #line hidden 647 WriteLiteral("\r\n\t\t\t\t\t\t\t</figure>\r\n\t\t\t\t\t\t</a>\r\n"); 648 649 650 #line 295 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 651 } 652 } 653 654 655 #line default 656 #line hidden 657 WriteLiteral("\r\n"); 658 659 660 #line 298 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 661 662 663 #line default 664 #line hidden 665 666 #line 298 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 667 if (renderContentWrapper) 668 { 669 670 671 #line default 672 #line hidden 673 WriteLiteral("\t\t\t\t\t<div"); 674 675 WriteAttribute("class", Tuple.Create(" class=\"", 14503), Tuple.Create("\"", 14557) 676 , Tuple.Create(Tuple.Create("", 14511), Tuple.Create("col", 14511), true) 677 , Tuple.Create(Tuple.Create(" ", 14514), Tuple.Create("d-flex", 14515), true) 678 , Tuple.Create(Tuple.Create(" ", 14521), Tuple.Create("flex-column", 14522), true) 679 680 #line 300 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 681 , Tuple.Create(Tuple.Create(" ", 14533), Tuple.Create<System.Object, System.Int32>(GetPadding(themeClass) 682 683 #line default 684 #line hidden 685 , 14534), false) 686 ); 687 688 WriteLiteral(">\r\n\t\t\t\t\t\t<div"); 689 690 WriteLiteral(" class=\"card-body p-0 d-flex flex-column gap-2\""); 691 692 WriteLiteral(">\r\n\t\t\t\t\t\t\t"); 693 694 WriteLiteral("\r\n"); 695 696 WriteLiteral("\t\t\t\t\t\t\t"); 697 698 699 #line 303 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 700 Write(GetCategorySticker(item)); 701 702 703 #line default 704 #line hidden 705 WriteLiteral("\r\n\r\n"); 706 707 708 #line 305 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 709 710 711 #line default 712 #line hidden 713 714 #line 305 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 715 if (!string.IsNullOrEmpty(title)) 716 { 717 718 719 #line default 720 #line hidden 721 WriteLiteral("\t\t\t\t\t\t\t\t<a"); 722 723 WriteLiteral(" class=\"text-decoration-none text-decoration-underline-hover\""); 724 725 WriteAttribute("href", Tuple.Create(" href=\"", 14811), Tuple.Create("\"", 14823) 726 727 #line 307 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 728 , Tuple.Create(Tuple.Create("", 14818), Tuple.Create<System.Object, System.Int32>(link 729 730 #line default 731 #line hidden 732 , 14818), false) 733 ); 734 735 WriteLiteral(">\r\n\t\t\t\t\t\t\t\t\t<h3"); 736 737 WriteAttribute("class", Tuple.Create(" class=\"", 14839), Tuple.Create("\"", 14866) 738 739 #line 308 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 740 , Tuple.Create(Tuple.Create("", 14847), Tuple.Create<System.Object, System.Int32>(titleFontSize 741 742 #line default 743 #line hidden 744 , 14847), false) 745 , Tuple.Create(Tuple.Create(" ", 14861), Tuple.Create("mb-0", 14862), true) 746 ); 747 748 WriteLiteral(" itemprop=\"headline\""); 749 750 WriteLiteral(">"); 751 752 753 #line 308 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 754 Write(title); 755 756 757 #line default 758 #line hidden 759 WriteLiteral("</h3>\r\n\t\t\t\t\t\t\t\t</a>\r\n"); 760 761 762 #line 310 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 763 } 764 765 766 #line default 767 #line hidden 768 WriteLiteral("\t\t\t\t\t\t\t"); 769 770 771 #line 311 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 772 if (!string.IsNullOrEmpty(summary)) 773 { 774 775 776 #line default 777 #line hidden 778 WriteLiteral("\t\t\t\t\t\t\t\t<p"); 779 780 WriteLiteral(" class=\"m-0 opacity-75\""); 781 782 WriteLiteral(">"); 783 784 785 #line 313 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 786 Write(summary); 787 788 789 #line default 790 #line hidden 791 WriteLiteral("</p>\r\n"); 792 793 794 #line 314 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 795 } 796 797 798 799 #line default 800 #line hidden 801 802 #line 316 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 803 804 805 806 #line default 807 #line hidden 808 WriteLiteral("\t\t\t\t\t\t\t"); 809 810 811 #line 317 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 812 Write(GetTagStickers(item)); 813 814 815 #line default 816 #line hidden 817 WriteLiteral("\r\n\r\n"); 818 819 820 #line 319 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 821 822 823 #line default 824 #line hidden 825 826 #line 319 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 827 if (showButton) 828 { 829 830 831 #line default 832 #line hidden 833 WriteLiteral("\t\t\t\t\t\t\t\t<div"); 834 835 WriteLiteral(" class=\"mt-auto\""); 836 837 WriteLiteral(">\r\n\r\n"); 838 839 840 #line 323 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 841 842 843 #line default 844 #line hidden 845 846 #line 323 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 847 if (!string.IsNullOrEmpty(buttonLabel)) 848 { 849 850 851 #line default 852 #line hidden 853 WriteLiteral("\t\t\t\t\t\t\t\t\t\t<a"); 854 855 WriteAttribute("href", Tuple.Create(" href=\"", 15245), Tuple.Create("\"", 15257) 856 857 #line 325 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 858 , Tuple.Create(Tuple.Create("", 15252), Tuple.Create<System.Object, System.Int32>(link 859 860 #line default 861 #line hidden 862 , 15252), false) 863 ); 864 865 WriteLiteral(" class=\"text-start btn btn-link p-0\""); 866 867 WriteLiteral(">\r\n"); 868 869 WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t"); 870 871 872 #line 326 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 873 Write(buttonLabel); 874 875 876 #line default 877 #line hidden 878 WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t\t\t<span"); 879 880 WriteLiteral(" class=\"icon-auto\""); 881 882 WriteLiteral(">\r\n"); 883 884 WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t\t"); 885 886 887 #line 328 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 888 Write(ReadFile(iconPath + "arrow-right.svg")); 889 890 891 #line default 892 #line hidden 893 WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t\t\t</a>\r\n"); 894 895 896 #line 331 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 897 } 898 else 899 { 900 901 902 #line default 903 #line hidden 904 WriteLiteral("\t\t\t\t\t\t\t\t\t\t<a"); 905 906 WriteAttribute("href", Tuple.Create(" href=\"", 15499), Tuple.Create("\"", 15511) 907 908 #line 334 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 909 , Tuple.Create(Tuple.Create("", 15506), Tuple.Create<System.Object, System.Int32>(link 910 911 #line default 912 #line hidden 913 , 15506), false) 914 ); 915 916 WriteLiteral(" class=\"btn btn-link p-0 lh-1 text-start\""); 917 918 WriteLiteral(">\r\n\t\t\t\t\t\t\t\t\t\t\t<span"); 919 920 WriteLiteral(" class=\"icon-auto\""); 921 922 WriteLiteral(">\r\n"); 923 924 WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t\t"); 925 926 927 #line 336 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 928 Write(ReadFile(iconPath + "arrow-right.svg")); 929 930 931 #line default 932 #line hidden 933 WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t\t\t</a>\r\n"); 934 935 936 #line 339 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 937 } 938 939 940 #line default 941 #line hidden 942 WriteLiteral("\t\t\t\t\t\t\t\t</div>\r\n"); 943 944 945 #line 341 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 946 } 947 948 949 #line default 950 #line hidden 951 WriteLiteral("\r\n\t\t\t\t\t\t</div>\r\n\r\n"); 952 953 954 #line 345 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 955 956 957 #line default 958 #line hidden 959 960 #line 345 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 961 if (renderArticleInfoWrapper) 962 { 963 964 965 #line default 966 #line hidden 967 WriteLiteral("\t\t\t\t\t\t\t<div"); 968 969 WriteLiteral(" class=\"card-footer p-0 pt-3 border-top-0\""); 970 971 WriteLiteral(">\r\n\t\t\t\t\t\t\t\t<div"); 972 973 WriteLiteral(" class=\"d-flex align-items-center justify-content-between gap-3\""); 974 975 WriteLiteral(">\r\n"); 976 977 978 #line 349 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 979 980 981 #line default 982 #line hidden 983 984 #line 349 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 985 if (item.GetInteger("ItemPublisher:Item.Author") != 0) 986 { 987 int authorID = item.GetInteger("ItemPublisher:Item.Author"); 988 var author = Dynamicweb.Security.UserManagement.User.GetUserByID(authorID); 989 string authorImage = !string.IsNullOrEmpty(author?.Image) ? author.Image : string.Empty; 990 string authorImagePath = !string.IsNullOrEmpty(author?.Image) ? $"/Admin/Public/GetImage.ashx?image={author.Image}&width=24&height=24&Crop=0&format=webp" : string.Empty; 991 string authorName = !string.IsNullOrEmpty(author?.Name) ? authorName = author.Name : string.Empty; 992 string authorJobTitle = !string.IsNullOrEmpty(author?.JobTitle) ? authorJobTitle = author.JobTitle : string.Empty; 993 994 995 996 #line default 997 #line hidden 998 WriteLiteral("\t\t\t\t\t\t\t\t\t\t<div"); 999 1000 WriteLiteral(" class=\"d-flex align-items-center gap-2 fs-8 opacity-75\""); 1001 1002 WriteLiteral(">\r\n\r\n"); 1003 1004 1005 #line 360 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1006 1007 1008 #line default 1009 #line hidden 1010 1011 #line 360 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1012 if (!string.IsNullOrEmpty(authorImage)) 1013 { 1014 1015 1016 #line default 1017 #line hidden 1018 WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t\t<img"); 1019 1020 WriteLiteral(" class=\"img-fluid rounded-circle\""); 1021 1022 WriteAttribute("src", Tuple.Create(" src=\"", 16867), Tuple.Create("\"", 16889) 1023 1024 #line 362 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1025 , Tuple.Create(Tuple.Create("", 16873), Tuple.Create<System.Object, System.Int32>(authorImagePath 1026 1027 #line default 1028 #line hidden 1029 , 16873), false) 1030 ); 1031 1032 WriteLiteral(" loading=\"lazy\""); 1033 1034 WriteAttribute("alt", Tuple.Create(" alt=\"", 16905), Tuple.Create("\"", 16922) 1035 1036 #line 362 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1037 , Tuple.Create(Tuple.Create("", 16911), Tuple.Create<System.Object, System.Int32>(authorName 1038 1039 #line default 1040 #line hidden 1041 , 16911), false) 1042 ); 1043 1044 WriteLiteral(" width=\"24\""); 1045 1046 WriteLiteral(" height=\"24\""); 1047 1048 WriteLiteral(">\r\n"); 1049 1050 1051 #line 363 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1052 } 1053 else 1054 { 1055 1056 1057 #line default 1058 #line hidden 1059 WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t\t<div"); 1060 1061 WriteLiteral(" class=\"d-flex align-items-center justify-content-center rounded-circle\""); 1062 1063 WriteLiteral(" style=\"background-color: rgba(var(--swift-foreground-color-rgb),.25)\""); 1064 1065 WriteLiteral(">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div"); 1066 1067 WriteLiteral(" class=\"icon-2 p-1\""); 1068 1069 WriteLiteral(">\r\n"); 1070 1071 WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t\t\t\t"); 1072 1073 1074 #line 368 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1075 Write(ReadFile(iconPath + "user.svg")); 1076 1077 1078 #line default 1079 #line hidden 1080 WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n"); 1081 1082 1083 #line 371 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1084 } 1085 1086 1087 #line default 1088 #line hidden 1089 WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t\t\t<div"); 1090 1091 WriteLiteral(" class=\"d-flex flex-column lh-1\""); 1092 1093 WriteLiteral(">\r\n"); 1094 1095 1096 #line 374 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1097 1098 1099 #line default 1100 #line hidden 1101 1102 #line 374 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1103 if (!string.IsNullOrEmpty(authorName)) 1104 { 1105 1106 1107 #line default 1108 #line hidden 1109 WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t\t\t<span"); 1110 1111 WriteLiteral(" itemprop=\"author\""); 1112 1113 WriteLiteral(">"); 1114 1115 1116 #line 376 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1117 Write(authorName); 1118 1119 1120 #line default 1121 #line hidden 1122 WriteLiteral("</span>\r\n"); 1123 1124 1125 #line 377 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1126 } 1127 1128 1129 #line default 1130 #line hidden 1131 WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t\t"); 1132 1133 1134 #line 378 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1135 if (!string.IsNullOrEmpty(authorJobTitle)) 1136 { 1137 1138 1139 #line default 1140 #line hidden 1141 WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t\t\t<span"); 1142 1143 WriteLiteral(" class=\"opacity-75\""); 1144 1145 WriteLiteral(">"); 1146 1147 1148 #line 380 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1149 Write(authorJobTitle); 1150 1151 1152 #line default 1153 #line hidden 1154 WriteLiteral("</span>\r\n"); 1155 1156 1157 #line 381 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1158 } 1159 1160 1161 #line default 1162 #line hidden 1163 WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n"); 1164 1165 1166 #line 384 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1167 } 1168 1169 1170 #line default 1171 #line hidden 1172 WriteLiteral("\r\n"); 1173 1174 1175 #line 386 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1176 1177 1178 #line default 1179 #line hidden 1180 1181 #line 386 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1182 if (!string.IsNullOrEmpty(publishedDate)) 1183 { 1184 1185 string articleDateTime = item.GetDate("ItemPublisher:Item.PublishedDate").Year + "-" + item.GetDate("ItemPublisher:Item.PublishedDate").Month + "-" + item.GetDate("ItemPublisher:Item.PublishedDate").Day; 1186 1187 1188 1189 #line default 1190 #line hidden 1191 WriteLiteral("\t\t\t\t\t\t\t\t\t\t<div"); 1192 1193 WriteLiteral(" class=\"d-flex align-items-center gap-1 fs-8 opacity-75\""); 1194 1195 WriteLiteral(">\r\n\t\t\t\t\t\t\t\t\t\t\t<div"); 1196 1197 WriteLiteral(" class=\"icon-1\""); 1198 1199 WriteLiteral(">\r\n"); 1200 1201 WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t\t"); 1202 1203 1204 #line 393 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1205 Write(ReadFile(iconPath + "calendar.svg")); 1206 1207 1208 #line default 1209 #line hidden 1210 WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t<time"); 1211 1212 WriteAttribute("datetime", Tuple.Create(" datetime=\"", 18164), Tuple.Create("\"", 18191) 1213 1214 #line 395 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1215 , Tuple.Create(Tuple.Create("", 18175), Tuple.Create<System.Object, System.Int32>(articleDateTime 1216 1217 #line default 1218 #line hidden 1219 , 18175), false) 1220 ); 1221 1222 WriteLiteral(" itemprop=\"datePublished\""); 1223 1224 WriteLiteral(">"); 1225 1226 1227 #line 395 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1228 Write(publishedDate); 1229 1230 1231 #line default 1232 #line hidden 1233 WriteLiteral("</time>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n"); 1234 1235 1236 #line 397 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1237 } 1238 1239 1240 #line default 1241 #line hidden 1242 WriteLiteral("\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n"); 1243 1244 1245 #line 400 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1246 } 1247 1248 1249 #line default 1250 #line hidden 1251 WriteLiteral("\t\t\t\t\t</div>\r\n"); 1252 1253 1254 #line 402 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1255 } 1256 1257 1258 #line default 1259 #line hidden 1260 WriteLiteral("\t\t\t</article>\r\n"); 1261 1262 1263 #line 404 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1264 } 1265 } 1266 1267 1268 1269 #line default 1270 #line hidden 1271 1272 #line 407 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1273 1274 for (int i = 0; i < count; i++) 1275 { 1276 string imageWrapper = string.Empty; 1277 string ratioString = ratioCssClass; 1278 switch (articleItemLayout) 1279 { 1280 case "image-left": 1281 case "image-right": 1282 articleItemLayoutClass = " flex-lg-row"; 1283 imageWrapper = "col col-lg-5"; 1284 ratioString = string.Empty; 1285 break; 1286 } 1287 1288 1289 #line default 1290 #line hidden 1291 WriteLiteral("\t\t<div"); 1292 1293 WriteLiteral(" class=\"htmx-indicator\""); 1294 1295 WriteLiteral(" aria-hidden=\"true\""); 1296 1297 WriteLiteral(" aria-disabled=\"true\""); 1298 1299 WriteLiteral(" aria-label=\"loading\""); 1300 1301 WriteLiteral(">\r\n\t\t\t<div"); 1302 1303 WriteAttribute("class", Tuple.Create(" class=\"", 18819), Tuple.Create("\"", 18902) 1304 , Tuple.Create(Tuple.Create("", 18827), Tuple.Create("card", 18827), true) 1305 , Tuple.Create(Tuple.Create(" ", 18831), Tuple.Create("placeholder-glow", 18832), true) 1306 1307 #line 422 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1308 , Tuple.Create(Tuple.Create("", 18848), Tuple.Create<System.Object, System.Int32>(shapeClass 1309 1310 #line default 1311 #line hidden 1312 , 18848), false) 1313 , Tuple.Create(Tuple.Create(" ", 18861), Tuple.Create("overflow-hidden", 18862), true) 1314 1315 #line 422 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1316 , Tuple.Create(Tuple.Create("", 18877), Tuple.Create<System.Object, System.Int32>(articleItemLayoutClass 1317 1318 #line default 1319 #line hidden 1320 , 18877), false) 1321 ); 1322 1323 WriteLiteral(" style=\"background-color: var(--swift-background-color); border: 1px solid rgba(v" + 1324 "ar(--swift-foreground-color-rgb), 0.2);\""); 1325 1326 WriteLiteral(">\r\n\t\t\r\n\t\t\t\t<div"); 1327 1328 WriteAttribute("class", Tuple.Create(" class=\"", 19039), Tuple.Create("\"", 19094) 1329 1330 #line 424 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1331 , Tuple.Create(Tuple.Create("", 19047), Tuple.Create<System.Object, System.Int32>(imageWrapper 1332 1333 #line default 1334 #line hidden 1335 , 19047), false) 1336 , Tuple.Create(Tuple.Create(" ", 19062), Tuple.Create("placeholder", 19063), true) 1337 1338 #line 424 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1339 , Tuple.Create(Tuple.Create("", 19074), Tuple.Create<System.Object, System.Int32>(orderReverseClass 1340 1341 #line default 1342 #line hidden 1343 , 19074), false) 1344 ); 1345 1346 WriteLiteral(">\r\n\t\t\t\t\t<div"); 1347 1348 WriteAttribute("class", Tuple.Create(" class=\"", 19107), Tuple.Create("\"", 19129) 1349 1350 #line 425 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1351 , Tuple.Create(Tuple.Create("", 19115), Tuple.Create<System.Object, System.Int32>(ratioString 1352 1353 #line default 1354 #line hidden 1355 , 19115), false) 1356 ); 1357 1358 WriteLiteral(" "); 1359 1360 1361 #line 425 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1362 Write(ratioVariable); 1363 1364 1365 #line default 1366 #line hidden 1367 WriteLiteral("></div>\r\n\t\t\t\t</div>\r\n \r\n\t\t\t\t<div"); 1368 1369 WriteLiteral(" class=\"col d-flex flex-column\""); 1370 1371 WriteLiteral(">\r\n\t\t\t\t\t<div"); 1372 1373 WriteLiteral(" class=\"card-body\""); 1374 1375 WriteLiteral(">\r\n\t\t\t\t\t\t<div"); 1376 1377 WriteLiteral(" class=\"mb-2\""); 1378 1379 WriteLiteral(">\r\n\t\t\t\t\t\t\t<span"); 1380 1381 WriteLiteral(" class=\"placeholder col-2\""); 1382 1383 WriteLiteral("></span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div"); 1384 1385 WriteLiteral(" class=\"h5 card-title\""); 1386 1387 WriteLiteral(">\r\n\t\t\t\t\t\t\t<span"); 1388 1389 WriteLiteral(" class=\"placeholder col-6\""); 1390 1391 WriteLiteral("></span>\r\n\t\t\t\t\t\t\t<span"); 1392 1393 WriteLiteral(" class=\"placeholder col-2\""); 1394 1395 WriteLiteral("></span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<p"); 1396 1397 WriteLiteral(" class=\"card-text\""); 1398 1399 WriteLiteral(">\r\n\t\t\t\t\t\t\t<span"); 1400 1401 WriteLiteral(" class=\"placeholder placeholder-sm col-2\""); 1402 1403 WriteLiteral("></span>\r\n\t\t\t\t\t\t\t<span"); 1404 1405 WriteLiteral(" class=\"placeholder placeholder-sm col-4\""); 1406 1407 WriteLiteral("></span>\r\n\t\t\t\t\t\t\t<span"); 1408 1409 WriteLiteral(" class=\"placeholder placeholder-sm col-4\""); 1410 1411 WriteLiteral("></span>\r\n\t\t\t\t\t\t\t<span"); 1412 1413 WriteLiteral(" class=\"placeholder placeholder-sm col-3\""); 1414 1415 WriteLiteral("></span>\r\n\t\t\t\t\t\t\t<span"); 1416 1417 WriteLiteral(" class=\"placeholder placeholder-sm col-6\""); 1418 1419 WriteLiteral("></span>\r\n\t\t\t\t\t\t\t<span"); 1420 1421 WriteLiteral(" class=\"placeholder placeholder-sm col-3\""); 1422 1423 WriteLiteral("></span>\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div"); 1424 1425 WriteLiteral(" class=\"card-footer\""); 1426 1427 WriteLiteral(">\r\n\t\t\t\t\t\t<div"); 1428 1429 WriteLiteral(" class=\"d-flex justify-content-between\""); 1430 1431 WriteLiteral(">\r\n\t\t\t\t\t\t\t<span"); 1432 1433 WriteLiteral(" class=\"placeholder placeholder-sm col-2\""); 1434 1435 WriteLiteral("></span>\r\n\t\t\t\t\t\t\t<span"); 1436 1437 WriteLiteral(" class=\"placeholder placeholder-sm col-2\""); 1438 1439 WriteLiteral("></span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n"); 1440 1441 1442 #line 455 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1443 } 1444 1445 1446 1447 #line default 1448 #line hidden 1449 1450 #line 457 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1451 Write(gridWrapperEnd); 1452 1453 1454 #line default 1455 #line hidden 1456 1457 #line 457 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1458 1459 1460 1461 1462 #line default 1463 #line hidden 1464 1465 #line 459 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1466 1467 if (Pageview.Page.Item.SystemName == "Swift_ArticleListPage" && showLoadMore && articleListLayout == "grid") 1468 { 1469 1470 1471 #line default 1472 #line hidden 1473 WriteLiteral("\t\t<div"); 1474 1475 WriteLiteral(" class=\"text-center pt-5\""); 1476 1477 WriteLiteral(">\r\n\t\t\t<p"); 1478 1479 WriteLiteral(" class=\"fs-7 mb-3 opacity-75\""); 1480 1481 WriteLiteral(">"); 1482 1483 1484 #line 463 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1485 Write(Translate("Showing")); 1486 1487 1488 #line default 1489 #line hidden 1490 WriteLiteral(" <span>"); 1491 1492 1493 #line 463 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1494 Write(count); 1495 1496 1497 #line default 1498 #line hidden 1499 WriteLiteral("</span> of <span>"); 1500 1501 1502 #line 463 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1503 Write(totalItems); 1504 1505 1506 #line default 1507 #line hidden 1508 WriteLiteral("</span> "); 1509 1510 1511 #line 463 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1512 Write(Translate("items")); 1513 1514 1515 #line default 1516 #line hidden 1517 WriteLiteral("</p>\r\n\r\n\t\t\t<div"); 1518 1519 WriteLiteral(" class=\"progress mb-4 mx-auto\""); 1520 1521 WriteLiteral(" style=\"height:3px;max-width:300px; background-color:rgba(var(--swift-foreground-" + 1522 "color-rgb), 0.2);\""); 1523 1524 WriteLiteral(">\r\n\t\t\t\t<div"); 1525 1526 WriteLiteral(" class=\"progress-bar\""); 1527 1528 WriteLiteral(" role=\"progressbar\""); 1529 1530 WriteLiteral(" aria-label=\"Showing\""); 1531 1532 WriteAttribute("style", Tuple.Create(" style=\"", 20719), Tuple.Create("\"", 20805) 1533 , Tuple.Create(Tuple.Create("", 20727), Tuple.Create("width:", 20727), true) 1534 1535 #line 466 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1536 , Tuple.Create(Tuple.Create("", 20733), Tuple.Create<System.Object, System.Int32>(percent 1537 1538 #line default 1539 #line hidden 1540 , 20733), false) 1541 , Tuple.Create(Tuple.Create("", 20743), Tuple.Create("%;background-color:rgba(var(--swift-foreground-color-rgb),", 20743), true) 1542 , Tuple.Create(Tuple.Create(" ", 20801), Tuple.Create("1);", 20802), true) 1543 ); 1544 1545 WriteAttribute("aria-valuenow", Tuple.Create(" aria-valuenow=\"", 20806), Tuple.Create("\"", 20832) 1546 1547 #line 466 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1548 , Tuple.Create(Tuple.Create("", 20822), Tuple.Create<System.Object, System.Int32>(percent 1549 1550 #line default 1551 #line hidden 1552 , 20822), false) 1553 ); 1554 1555 WriteLiteral(" aria-valuemin=\"0\""); 1556 1557 WriteLiteral(" aria-valuemax=\"100\""); 1558 1559 WriteLiteral("></div>\r\n\t\t\t</div>\r\n\r\n"); 1560 1561 1562 #line 469 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1563 1564 1565 #line default 1566 #line hidden 1567 1568 #line 469 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1569 if (!disableLoadMoreButton) 1570 { 1571 1572 1573 #line default 1574 #line hidden 1575 WriteLiteral("\t\t\t\t<div>\r\n\t\t\t\t\t<input"); 1576 1577 WriteLiteral(" type=\"hidden\""); 1578 1579 WriteAttribute("id", Tuple.Create(" id=\"", 20968), Tuple.Create("\"", 21013) 1580 , Tuple.Create(Tuple.Create("", 20973), Tuple.Create("PageSize_", 20973), true) 1581 1582 #line 472 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1583 , Tuple.Create(Tuple.Create("", 20982), Tuple.Create<System.Object, System.Int32>(Pageview.CurrentParagraph.ID 1584 1585 #line default 1586 #line hidden 1587 , 20982), false) 1588 ); 1589 1590 WriteLiteral(" name=\"PageSize\""); 1591 1592 WriteLiteral(" />\r\n\t\t\t\t\t<label"); 1593 1594 WriteAttribute("class", Tuple.Create(" class=\"", 21046), Tuple.Create("\"", 21079) 1595 , Tuple.Create(Tuple.Create("", 21054), Tuple.Create("btn", 21054), true) 1596 , Tuple.Create(Tuple.Create(" ", 21057), Tuple.Create("btn-primary", 21058), true) 1597 1598 #line 473 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1599 , Tuple.Create(Tuple.Create(" ", 21069), Tuple.Create<System.Object, System.Int32>(disabled 1600 1601 #line default 1602 #line hidden 1603 , 21070), false) 1604 ); 1605 1606 WriteAttribute("for", Tuple.Create(" for=\"", 21080), Tuple.Create("\"", 21126) 1607 , Tuple.Create(Tuple.Create("", 21086), Tuple.Create("PageSize_", 21086), true) 1608 1609 #line 473 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1610 , Tuple.Create(Tuple.Create("", 21095), Tuple.Create<System.Object, System.Int32>(Pageview.CurrentParagraph.ID 1611 1612 #line default 1613 #line hidden 1614 , 21095), false) 1615 ); 1616 1617 WriteLiteral(" "); 1618 1619 1620 #line 473 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1621 Write(loadMore); 1622 1623 1624 #line default 1625 #line hidden 1626 WriteLiteral(">"); 1627 1628 1629 #line 473 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1630 Write(Translate("Load more")); 1631 1632 1633 #line default 1634 #line hidden 1635 WriteLiteral("</label>\r\n\t\t\t\t</div>\r\n"); 1636 1637 1638 #line 475 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1639 } 1640 1641 1642 #line default 1643 #line hidden 1644 WriteLiteral("\t\t</div>\r\n"); 1645 1646 1647 #line 477 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1648 } 1649 } 1650 1651 1652 #line default 1653 #line hidden 1654 WriteLiteral("\r\n"); 1655 1656 1657 #line 480 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1658 if(!hasItems || count == 0) 1659 { 1660 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/"; 1661 1662 1663 #line default 1664 #line hidden 1665 WriteLiteral("\t<div"); 1666 1667 WriteLiteral(" class=\"grid grid-1\""); 1668 1669 WriteLiteral(" style=\"place-items: center;\""); 1670 1671 WriteLiteral(">\r\n\t\t<span"); 1672 1673 WriteLiteral(" class=\"icon-7\""); 1674 1675 WriteLiteral(">\r\n"); 1676 1677 WriteLiteral("\t\t\t"); 1678 1679 1680 #line 485 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1681 Write(ReadFile(iconPath + "filter.svg")); 1682 1683 1684 #line default 1685 #line hidden 1686 WriteLiteral("\r\n\t\t</span>\r\n\t\t<h3"); 1687 1688 WriteLiteral(" class=\"m-0\""); 1689 1690 WriteLiteral(">"); 1691 1692 1693 #line 487 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1694 Write(Translate("No items found")); 1695 1696 1697 #line default 1698 #line hidden 1699 WriteLiteral("</h3>\r\n\t\t<p"); 1700 1701 WriteLiteral(" class=\"m-0 fs-7 text-center\""); 1702 1703 WriteLiteral(">"); 1704 1705 1706 #line 488 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1707 Write(Translate("Sorry, that filter combination has no results.")); 1708 1709 1710 #line default 1711 #line hidden 1712 WriteLiteral(" <br> "); 1713 1714 1715 #line 488 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1716 Write(Translate("Please try different criteria")); 1717 1718 1719 #line default 1720 #line hidden 1721 WriteLiteral("</p>\r\n\r\n\t\t<button"); 1722 1723 WriteLiteral(" type=\"button\""); 1724 1725 WriteLiteral(" aria-label=\"Clear filters\""); 1726 1727 WriteLiteral(" onclick=\"clearFilters(event)\""); 1728 1729 WriteLiteral(" class=\"mt-2 btn btn-secondary btn-sm d-flex align-items-center\""); 1730 1731 WriteLiteral(">\r\n"); 1732 1733 WriteLiteral("\t\t\t"); 1734 1735 1736 #line 491 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1737 Write(Translate("Clear filters")); 1738 1739 1740 #line default 1741 #line hidden 1742 WriteLiteral("\r\n\t\t\t<span"); 1743 1744 WriteLiteral(" class=\"icon-2 ms-2\""); 1745 1746 WriteLiteral(">\r\n"); 1747 1748 WriteLiteral("\t\t\t\t"); 1749 1750 1751 #line 493 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1752 Write(ReadFile(iconPath + "refresh-ccw.svg")); 1753 1754 1755 #line default 1756 #line hidden 1757 WriteLiteral("\r\n\t\t\t</span>\r\n\t\t</button>\r\n\t</div>\r\n"); 1758 1759 1760 #line 497 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1761 1762 1763 1764 #line default 1765 #line hidden 1766 WriteLiteral(@" <script> 1767 var clearFilters = (event) => { 1768 const form = event.target.closest('form'); 1769 form.reset(); 1770 let elements = form.elements; 1771 for (var i = 0, element; element = elements[i++];) { 1772 switch (element.type) { 1773 case ""textarea"": 1774 case ""hidden"": 1775 element.value = ''; 1776 break; 1777 case ""radio"": 1778 case ""checkbox"": 1779 if (element.checked) { 1780 element.checked = false; 1781 } 1782 break; 1783 case ""select-one"": 1784 element.selectedIndex = -1; 1785 break; 1786 default: 1787 break; 1788 } 1789 } 1790 form.dispatchEvent(new window.Event('change', { bubbles: true })) 1791 } 1792 </script> 1793 "); 1794 1795 1796 #line 525 "D:\dynamicweb.net\Solutions\Mennt\tysse.staging.dynamicweb-cms.com\files\Templates\Designs\Swift\ItemPublisher\List\List.cshtml" 1797 } 1798 1799 1800 #line default 1801 #line hidden 1802 } 1803 } 1804 } 1805
1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using System.IO 3 4 @functions { 5 6 private List<string> GetTags(LoopItem item) 7 { 8 var tags = new List<string>(); 9 10 foreach (var tag in item.GetLoop("ItemPublisher:Item.Tags.Options")) 11 { 12 if (tag.GetBoolean("ItemPublisher:Item.Tags.Option.IsSelected")) 13 { 14 tags.Add(tag.GetString("ItemPublisher:Item.Tags.Option.Label")); 15 } 16 } 17 18 return tags; 19 } 20 21 private string CreateCategory(string label, string theme) 22 { 23 var border = string.IsNullOrEmpty(theme) ? "--swift-border-color: rgba(var(--swift-foreground-color-rgb), .2);" : null; 24 var sticker = $"<span class=\"badge {theme}\" style=\"color: var(--swift-foreground-color); background-color: rgba(var(--swift-background-color-rgb), 1); {border} \">{label}</span>"; 25 return sticker; 26 } 27 28 private string CreateSticker(string label) 29 { 30 string shape = Pageview.CurrentParagraph.Item["ArticleItemShape"] != null ? Pageview.CurrentParagraph.Item["ArticleItemShape"].ToString() : "boxed"; 31 var sticker = $"<span class=\"badge fw-normal shadow-none\" style=\"border: 1px solid rgba(var(--swift-foreground-color-rgb), 0.2);\">{label}</span>"; 32 return sticker; 33 } 34 35 private string GetTagStickers(LoopItem item) 36 { 37 var stickers = string.Empty; 38 39 if (item.GetString("ItemPublisher:Item.SystemName") == "Swift_Article") 40 { 41 var showTags = Pageview.CurrentParagraph.Item["ShowTags"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShowTags"] : false; 42 43 if (showTags && GetTags(item).Count >= 1) 44 { 45 stickers += "<div class=\"d-inline-flex flex-wrap gap-1\">"; 46 foreach (var tag in GetTags(item)) 47 { 48 stickers += CreateSticker(tag); 49 } 50 stickers += "</div>"; 51 } 52 } 53 54 return stickers; 55 } 56 57 private string GetCategorySticker(LoopItem item) 58 { 59 var sticker = string.Empty; 60 61 if (item.GetString("ItemPublisher:Item.SystemName") == "Swift_Article") 62 { 63 var showListCategory = Pageview.CurrentParagraph.Item["ShowListCategory"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShowListCategory"] : false; 64 65 if (showListCategory) 66 { 67 sticker += "<div class=\"d-inline-flex flex-wrap gap-1\">"; 68 sticker += CreateCategorySticker(GetCategory(Dynamicweb.Content.Services.Pages.GetPage(item.GetInteger("ItemPublisher:Item.Field.PageId")).ParentPageId), GetCategoryTheme(GetCategory(Dynamicweb.Content.Services.Pages.GetPage(item.GetInteger("ItemPublisher:Item.Field.PageId")).ParentPageId))); 69 sticker += "</div>"; 70 } 71 } 72 73 return sticker; 74 } 75 76 private Dynamicweb.Frontend.PageInfoViewModel GetCategory(int categoryId) 77 { 78 var categoryParagraph = categoryId != 0 ? Dynamicweb.Content.Services.Pages.GetPage(categoryId) : null; 79 var category = categoryParagraph != null ? Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(categoryParagraph) : null; 80 81 return category; 82 } 83 84 private string CreateCategorySticker(Dynamicweb.Frontend.PageInfoViewModel category, string theme) 85 { 86 var sticker = category != null ? CreateCategory(category.Item?.GetString("Title"), theme) : null; 87 return sticker; 88 } 89 90 private string GetCategoryTheme(Dynamicweb.Frontend.PageInfoViewModel category) 91 { 92 var theme = category != null ? category.Item?.GetRawValueString("CoverTheme").ToString().Replace(" ", "").Trim().ToLower() : null; 93 return theme; 94 } 95 96 private string LiftOnHover() 97 { 98 bool liftOnHover = Pageview.CurrentParagraph.Item["LiftOnHover"] != null ? (Boolean)Pageview.CurrentParagraph.Item["LiftOnHover"] : false; 99 var lift = liftOnHover ? "lift" : null; 100 return lift; 101 } 102 103 private string ShadowOnHover() 104 { 105 bool shadowOnHover = Pageview.CurrentParagraph.Item["ShadowOnHover"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShadowOnHover"] : false; 106 var shadow = shadowOnHover ? "shadow-hover" : null; 107 return shadow; 108 } 109 110 private string GetPadding(string theme) 111 { 112 var padding = !string.IsNullOrEmpty(theme) ? "p-3" : null; 113 return padding; 114 } 115 116 private string GetGap(string theme) 117 { 118 var padding = string.IsNullOrEmpty(theme) ? "gap-3" : null; 119 return padding; 120 } 121 } 122 123 @{ 124 bool showLoadMore = Pageview.CurrentParagraph.Item["ShowLoadMore"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShowLoadMore"] : false; 125 int maxItemsInList = !string.IsNullOrEmpty(Pageview.CurrentParagraph.Item["MaxItemsInList"].ToString()) ? Dynamicweb.Core.Converter.ToInt32(Pageview.CurrentParagraph.Item["MaxItemsInList"]) : 10; 126 var totalItems = GetInteger("ItemPublisher:Items.TotalCount"); 127 var count = GetInteger("ItemPublisher:Items.Count"); 128 var percent = count > 0 ? Convert.ToInt32(Math.Round(((double)count / totalItems) * 100, 0)) : 0; 129 var disableLoadMoreButton = count == totalItems ? true : false; 130 var loadMore = !disableLoadMoreButton ? $"onclick=\"document.querySelector('#PageSize_{Pageview.CurrentParagraph.ID}').value='{count + maxItemsInList}'; this.dispatchEvent(new window.Event('change', {{ bubbles: true }}))\"" : null; 131 var disabled = disableLoadMoreButton ? "disabled" : null; 132 var hasItems = GetBoolean("ItemPublisher:Items.Any"); 133 string articleListLayout = Pageview.CurrentParagraph.Item["ArticleListLayout"] != null ? Pageview.CurrentParagraph.Item["ArticleListLayout"].ToString() : "grid"; 134 string articleItemLayout = Pageview.CurrentParagraph.Item["ArticleItemLayout"] != null ? Pageview.CurrentParagraph.Item["ArticleItemLayout"].ToString() : string.Empty; 135 string orderReverseClass = articleItemLayout == "image-right" ? " order-first order-lg-last" : string.Empty; 136 string articleItemLayoutClass = string.Empty; 137 string titleFontSize = Pageview.CurrentParagraph.Item["TitleFontSize"] != null ? Pageview.CurrentParagraph.Item["TitleFontSize"].ToString() : string.Empty; 138 string gridSettings = Pageview.CurrentParagraph.Item["GridSettings"] != null ? Pageview.CurrentParagraph.Item["GridSettings"].ToString() : "4"; 139 string carouselSettings = Pageview.CurrentParagraph.Item["CarouselSettings"] != null ? Pageview.CurrentParagraph.Item["CarouselSettings"].ToString() : "4"; 140 bool showButton = Pageview.CurrentParagraph.Item["ShowButton"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShowButton"] : false; 141 string ratio = Pageview.CurrentParagraph.Item["ImageAspectRatio"] != null ? Pageview.CurrentParagraph.Item["ImageAspectRatio"].ToString() : string.Empty; 142 ratio = ratio != "0" ? ratio : string.Empty; 143 string ratioCssClass = ratio != string.Empty ? " ratio" : string.Empty; 144 string ratioVariable = ratio != string.Empty ? "style=\"--bs-aspect-ratio: " + ratio + "\"" : string.Empty; 145 string articleItemTheme = Pageview.CurrentParagraph.Item["ArticleItemTheme"] != null ? Pageview.CurrentParagraph.Item["ArticleItemTheme"].ToString().Replace(" ", "").Trim().ToLower() : string.Empty; 146 string articleItemShape = Pageview.CurrentParagraph.Item["ArticleItemShape"] != null ? Pageview.CurrentParagraph.Item["ArticleItemShape"].ToString() : "boxed"; 147 string shapeClass = " rounded-0"; 148 if (articleItemShape == "rounded") 149 { 150 shapeClass = " rounded-4"; 151 } 152 string settingsClassGrid = string.Empty; 153 switch (gridSettings) 154 { 155 case "2": 156 settingsClassGrid = " grid-md-2"; 157 break; 158 case "3": 159 settingsClassGrid = " grid-md-3"; 160 break; 161 case "4": 162 settingsClassGrid = " grid-md-2 grid-lg-3 grid-xl-4"; 163 break; 164 case "5": 165 settingsClassGrid = " grid-md-2 grid-lg-3 grid-xl-5"; 166 break; 167 } 168 string gridWrapperStart = articleListLayout == "grid" ? $"<div class=\"article-list grid gap-4 grid-1{settingsClassGrid}\">" : null; 169 string gridWrapperEnd = articleListLayout == "grid" ? "</div>" : null; 170 171 bool hasListContext = Pageview.CurrentParagraph.Item["ListContext"] is object; 172 bool showOnFrontpage = item.GetBoolean("ItemPublisher:Item.ShowOnFrontpage.Value"); 173 } 174 175 176 177 @if (hasItems || count > 0) 178 { 179 @(gridWrapperStart) 180 181 foreach (LoopItem item in GetLoop("ItemPublisher:Items.List")) 182 { 183 string title = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.Title")) && !item.GetBoolean("ItemPublisher:Item.HideTitle") ? item.GetString("ItemPublisher:Item.Title") : string.Empty; 184 string coverTitle = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.CoverTitle")) ? item.GetString("ItemPublisher:Item.CoverTitle") : string.Empty; 185 string coverImagePath = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.CoverImage")) ? item.GetString("ItemPublisher:Item.CoverImage") : string.Empty; 186 bool hasFocalPoint = item.GetBoolean("ItemPublisher:Item.CoverImage.ImageHasFocalPoint"); 187 int focalX = hasFocalPoint ? item.GetInteger("ItemPublisher:Item.CoverImage.FocalX") : 0; 188 int focalY = hasFocalPoint ? item.GetInteger("ItemPublisher:Item.CoverImage.FocalY") : 0; 189 int xPos = 100 - ((100 - focalX) / 2); 190 int yPos = ((100 - focalY) / 2); 191 string cssPosition = $"{xPos}% {yPos}%"; 192 string summary = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.Summary")) ? item.GetString("ItemPublisher:Item.Summary") : string.Empty; 193 string publishedDate = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.PublishedDate")) && !item.GetBoolean("ItemPublisher:Item.HidePublishedDate") ? item.GetDate("ItemPublisher:Item.PublishedDate").ToShortDateString() : string.Empty; 194 string link = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.Url")) ? item.GetString("ItemPublisher:Item.Url") : string.Empty; 195 string buttonLabel = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.ButtonLabel")) ? item.GetString("ItemPublisher:Item.ButtonLabel") : string.Empty; 196 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/"; 197 198 bool renderContentWrapper = true; 199 bool renderArticleInfoWrapper = true; 200 201 if (string.IsNullOrEmpty(title) && string.IsNullOrEmpty(summary) && string.IsNullOrEmpty(publishedDate) && item.GetInteger("ItemPublisher:Item.Author") == 0 && !showButton) 202 { 203 renderContentWrapper = false; 204 } 205 206 if (string.IsNullOrEmpty(publishedDate) && item.GetInteger("ItemPublisher:Item.Author") == 0) 207 { 208 renderArticleInfoWrapper = false; 209 } 210 211 switch (articleItemLayout) 212 { 213 case "image-left": 214 case "image-right": 215 articleItemLayoutClass = !string.IsNullOrEmpty(coverImagePath) && renderContentWrapper ? "flex-lg-row" : articleItemLayoutClass; 216 break; 217 } 218 219 string imageObjectFit = ratio != string.Empty ? "object-fit: cover;" : "object-fit: contain;"; 220 string coverTheme = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.CoverTheme")) ? item.GetString("ItemPublisher:Item.CoverTheme").Replace(" ", "").Trim().ToLower() : string.Empty; 221 string themeClass = string.Empty; 222 223 string coverImageWrapperClass = string.Empty; 224 225 if (!string.IsNullOrEmpty(coverTheme)) 226 { 227 articleItemTheme = coverTheme; 228 } 229 230 if (articleItemTheme != string.Empty) 231 { 232 themeClass = " theme " + articleItemTheme; 233 } 234 235 // Exclude self from list - if list has context (Tags) and if is on same page 236 bool excludeSelf = item.GetInteger("ItemPublisher:Item.Field.PageId") == item.GetInteger("ItemPublisher:Global.PageId"); 237 bool renderItem = true; 238 renderItem = hasListContext && excludeSelf ? renderItem = false : !hasListContext && !excludeSelf ? renderItem : renderItem; 239 240 241 if (renderItem) 242 { 243 <article class="card border-0 @(string.IsNullOrEmpty(themeClass) ? "gap-3" : null) @articleItemLayoutClass@(themeClass)@(shapeClass) overflow-hidden @LiftOnHover() @ShadowOnHover()" itemscope itemtype="https://schema.org/CreativeWork" style="background-color: var(--swift-background-color)"> 244 245 @if (!string.IsNullOrEmpty(coverImagePath)) 246 { 247 if (Path.GetExtension(coverImagePath).ToLower() == ".svg") 248 { 249 coverImageWrapperClass = !renderContentWrapper ? "d-flex justify-content-center align-items-center h-100 w-100 " : "w-100 "; 250 251 <a class="@(coverImageWrapperClass)@(orderReverseClass)" title="@title" href="@link" tabindex="-1"> 252 <div class="d-flex justify-content-center align-items-center overflow-hidden@(ratioCssClass)" @ratioVariable> 253 @ReadFile(coverImagePath) 254 </div> 255 </a> 256 } 257 else 258 { 259 coverImageWrapperClass = articleItemLayout == "image-top" ? "position-relative" : $"col {orderReverseClass}"; 260 coverImageWrapperClass += renderContentWrapper && articleItemLayout != "image-top" ? " col-lg-5" : string.Empty; 261 262 string figureClass = articleItemLayout == "image-top" ? ratioCssClass : "h-lg-100 ratio ratio-16x9"; 263 ratioVariable = articleItemLayout == "image-top" ? ratioVariable : string.Empty; 264 265 <a class="@coverImageWrapperClass" title="@title" href="@link" tabindex="-1"> 266 <figure class="overflow-hidden m-0 mx-auto @(figureClass)" @ratioVariable> 267 @{ 268 coverImagePath = Dynamicweb.Context.Current.Server.UrlEncode(coverImagePath); 269 imageObjectFit = articleItemLayout != "image-top" ? "object-fit: cover" : imageObjectFit; 270 271 string imgSizeSelector = "50vw"; 272 imgSizeSelector = gridSettings == "1" || carouselSettings == "1" ? "100vw" : imgSizeSelector; 273 imgSizeSelector = gridSettings == "2" || carouselSettings == "2" ? "50vw" : imgSizeSelector; 274 imgSizeSelector = gridSettings == "3" || carouselSettings == "3" ? "33vw" : imgSizeSelector; 275 imgSizeSelector = gridSettings == "4" || carouselSettings == "4" ? "25vw" : imgSizeSelector; 276 imgSizeSelector = gridSettings == "5" || carouselSettings == "5" ? "17vw" : imgSizeSelector; 277 278 string coverImagePathM = $"/Admin/Public/GetImage.ashx?image={coverImagePath}&width=640&format=webp"; 279 string coverImagePathL = $"/Admin/Public/GetImage.ashx?image={coverImagePath}&width=960&format=webp"; 280 string imagePathFallBack = coverImagePathM; 281 282 <img srcset=" 283 @coverImagePathM 640w, 284 @coverImagePathL 960w" 285 src="@imagePathFallBack" 286 sizes="(min-width: 992px) @imgSizeSelector, 100vw" 287 loading="lazy" 288 decoding="async" 289 class="img-fluid image-zoom-lg-1-hover" 290 style="@imageObjectFit; object-position: @cssPosition;" 291 alt="@title"> 292 } 293 </figure> 294 </a> 295 } 296 } 297 298 @if (renderContentWrapper) 299 { 300 <div class="col d-flex flex-column @GetPadding(themeClass)"> 301 <div class="card-body p-0 d-flex flex-column gap-2"> 302 @*Show tag stickers*@ 303 @GetCategorySticker(item) 304 305 @if (!string.IsNullOrEmpty(title)) 306 { 307 <a class="text-decoration-none text-decoration-underline-hover" href="@link"> 308 <h3 class="@titleFontSize mb-0" itemprop="headline">@title</h3> 309 </a> 310 } 311 @if (!string.IsNullOrEmpty(summary)) 312 { 313 <p class="m-0 opacity-75">@summary</p> 314 } 315 316 @*Show tag stickers*@ 317 @GetTagStickers(item) 318 319 @if (showButton) 320 { 321 <div class="mt-auto"> 322 323 @if (!string.IsNullOrEmpty(buttonLabel)) 324 { 325 <a href="@link" class="text-start btn btn-link p-0"> 326 @buttonLabel 327 <span class="icon-auto"> 328 @ReadFile(iconPath + "arrow-right.svg") 329 </span> 330 </a> 331 } 332 else 333 { 334 <a href="@link" class="btn btn-link p-0 lh-1 text-start"> 335 <span class="icon-auto"> 336 @ReadFile(iconPath + "arrow-right.svg") 337 </span> 338 </a> 339 } 340 </div> 341 } 342 343 </div> 344 345 @if (renderArticleInfoWrapper) 346 { 347 <div class="card-footer p-0 pt-3 border-top-0"> 348 <div class="d-flex align-items-center justify-content-between gap-3"> 349 @if (item.GetInteger("ItemPublisher:Item.Author") != 0) 350 { 351 int authorID = item.GetInteger("ItemPublisher:Item.Author"); 352 var author = Dynamicweb.Security.UserManagement.User.GetUserByID(authorID); 353 string authorImage = !string.IsNullOrEmpty(author?.Image) ? author.Image : string.Empty; 354 string authorImagePath = !string.IsNullOrEmpty(author?.Image) ? $"/Admin/Public/GetImage.ashx?image={author.Image}&width=24&height=24&Crop=0&format=webp" : string.Empty; 355 string authorName = !string.IsNullOrEmpty(author?.Name) ? authorName = author.Name : string.Empty; 356 string authorJobTitle = !string.IsNullOrEmpty(author?.JobTitle) ? authorJobTitle = author.JobTitle : string.Empty; 357 358 <div class="d-flex align-items-center gap-2 fs-8 opacity-75"> 359 360 @if (!string.IsNullOrEmpty(authorImage)) 361 { 362 <img class="img-fluid rounded-circle" src="@authorImagePath" loading="lazy" alt="@authorName" width="24" height="24"> 363 } 364 else 365 { 366 <div class="d-flex align-items-center justify-content-center rounded-circle" style="background-color: rgba(var(--swift-foreground-color-rgb),.25)"> 367 <div class="icon-2 p-1"> 368 @ReadFile(iconPath + "user.svg") 369 </div> 370 </div> 371 } 372 373 <div class="d-flex flex-column lh-1"> 374 @if (!string.IsNullOrEmpty(authorName)) 375 { 376 <span itemprop="author">@authorName</span> 377 } 378 @if (!string.IsNullOrEmpty(authorJobTitle)) 379 { 380 <span class="opacity-75">@authorJobTitle</span> 381 } 382 </div> 383 </div> 384 } 385 386 @if (!string.IsNullOrEmpty(publishedDate)) 387 { 388 389 string articleDateTime = item.GetDate("ItemPublisher:Item.PublishedDate").Year + "-" + item.GetDate("ItemPublisher:Item.PublishedDate").Month + "-" + item.GetDate("ItemPublisher:Item.PublishedDate").Day; 390 391 <div class="d-flex align-items-center gap-1 fs-8 opacity-75"> 392 <div class="icon-1"> 393 @ReadFile(iconPath + "calendar.svg") 394 </div> 395 <time datetime="@articleDateTime" itemprop="datePublished">@publishedDate</time> 396 </div> 397 } 398 </div> 399 </div> 400 } 401 </div> 402 } 403 </article> 404 } 405 } 406 407 @* Placeholders (skeleton) *@ 408 for (int i = 0; i < count; i++) 409 { 410 string imageWrapper = string.Empty; 411 string ratioString = ratioCssClass; 412 switch (articleItemLayout) 413 { 414 case "image-left": 415 case "image-right": 416 articleItemLayoutClass = " flex-lg-row"; 417 imageWrapper = "col col-lg-5"; 418 ratioString = string.Empty; 419 break; 420 } 421 <div class="htmx-indicator" aria-hidden="true" aria-disabled="true" aria-label="loading"> 422 <div class="card placeholder-glow@(shapeClass) overflow-hidden@(articleItemLayoutClass)" style="background-color: var(--swift-background-color); border: 1px solid rgba(var(--swift-foreground-color-rgb), 0.2);"> 423 424 <div class="@(imageWrapper) placeholder@(orderReverseClass)"> 425 <div class="@(ratioString)" @ratioVariable></div> 426 </div> 427 428 <div class="col d-flex flex-column"> 429 <div class="card-body"> 430 <div class="mb-2"> 431 <span class="placeholder col-2"></span> 432 </div> 433 <div class="h5 card-title"> 434 <span class="placeholder col-6"></span> 435 <span class="placeholder col-2"></span> 436 </div> 437 <p class="card-text"> 438 <span class="placeholder placeholder-sm col-2"></span> 439 <span class="placeholder placeholder-sm col-4"></span> 440 <span class="placeholder placeholder-sm col-4"></span> 441 <span class="placeholder placeholder-sm col-3"></span> 442 <span class="placeholder placeholder-sm col-6"></span> 443 <span class="placeholder placeholder-sm col-3"></span> 444 </p> 445 </div> 446 <div class="card-footer"> 447 <div class="d-flex justify-content-between"> 448 <span class="placeholder placeholder-sm col-2"></span> 449 <span class="placeholder placeholder-sm col-2"></span> 450 </div> 451 </div> 452 </div> 453 </div> 454 </div> 455 } 456 457 @(gridWrapperEnd) 458 459 @* Load more *@ 460 if (Pageview.Page.Item.SystemName == "Swift_ArticleListPage" && showLoadMore && articleListLayout == "grid") 461 { 462 <div class="text-center pt-5"> 463 <p class="fs-7 mb-3 opacity-75">@Translate("Showing") <span>@count</span> of <span>@totalItems</span> @Translate("items")</p> 464 465 <div class="progress mb-4 mx-auto" style="height:3px;max-width:300px; background-color:rgba(var(--swift-foreground-color-rgb), 0.2);"> 466 <div class="progress-bar" role="progressbar" aria-label="Showing" style="width:@(percent)%;background-color:rgba(var(--swift-foreground-color-rgb), 1);" aria-valuenow="@(percent)" aria-valuemin="0" aria-valuemax="100"></div> 467 </div> 468 469 @if (!disableLoadMoreButton) 470 { 471 <div> 472 <input type="hidden" id="PageSize_@(Pageview.CurrentParagraph.ID)" name="PageSize" /> 473 <label class="btn btn-primary @disabled" for="PageSize_@(Pageview.CurrentParagraph.ID)" @loadMore>@Translate("Load more")</label> 474 </div> 475 } 476 </div> 477 } 478 } 479 480 @if(!hasItems || count == 0) 481 { 482 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/"; 483 <div class="grid grid-1" style="place-items: center;"> 484 <span class="icon-7"> 485 @ReadFile(iconPath + "filter.svg") 486 </span> 487 <h3 class="m-0">@Translate("No items found")</h3> 488 <p class="m-0 fs-7 text-center">@Translate("Sorry, that filter combination has no results.") <br> @Translate("Please try different criteria")</p> 489 490 <button type="button" aria-label="Clear filters" onclick="clearFilters(event)" class="mt-2 btn btn-secondary btn-sm d-flex align-items-center"> 491 @Translate("Clear filters") 492 <span class="icon-2 ms-2"> 493 @ReadFile(iconPath + "refresh-ccw.svg") 494 </span> 495 </button> 496 </div> 497 498 <script> 499 var clearFilters = (event) => { 500 const form = event.target.closest('form'); 501 form.reset(); 502 let elements = form.elements; 503 for (var i = 0, element; element = elements[i++];) { 504 switch (element.type) { 505 case "textarea": 506 case "hidden": 507 element.value = ''; 508 break; 509 case "radio": 510 case "checkbox": 511 if (element.checked) { 512 element.checked = false; 513 } 514 break; 515 case "select-one": 516 element.selectedIndex = -1; 517 break; 518 default: 519 break; 520 } 521 } 522 form.dispatchEvent(new window.Event('change', { bubbles: true })) 523 } 524 </script> 525 } 526
Realiser din båtdrøm -
Ta kontakt for en hyggelig båtprat
Vi tar deg gjerne med på en prøvetur.