Tidy up your tired stee with new wrap of bar tape

Ride to the top and then down and link it directly into Ridegeline. Tree is elevated, so not rideable for most. Fast, fun descent. Probably not best to ride. A long, long, did I mention long? Fire road that circles Mauna Kea. Unfortunately, the lake-side trail has a hike-a-bike section in the middle. The valley to your left drops away as you climb up and through a shallow waterfall. Tree is elevated, so not rideable for most.

Tidy up your tired stee with new wrap of bar tape

Big downed tree near the end of Lower Black.

There are also several sections of slickrock that are fun to ride and allow you to pick your own line. Starts off flowy with some good jumps then gets into more technical rock gardens. Few sections rutted out but great experience for my first ride there! Trail full of berms and fun features! Awesome trail. Kitsuma is a point to point singletrack trail that has a machine groomed tread in most parts. This trail is now a designated one way from the Lee's Train/C$ intersection. Counterclockwise the descent is shorter but steeper in spots. Stay straight when the trail intersects with a doubletrack and then bear left at an intersection with the winter/horse route.

Big downed tree near the end of Lower Black.

Two wheel drifting is likely if you have speed but are not riding the top few inches of the berms. Have fun and hang on tight! This trail has big sized jumps in it, very fast and dry! Great views over the valley. Otherwise dry. The trails all run parallel to the Fountain Place paved road so they can be shuttled by car. This trail has big sized jumps in it, very fast and dry! Fun and all down when coming off the top. When combined with Otero Upper, this trail is just crazy fast, flowy, amazingness. It is typically maintained at a high level due to its popularity and use. Mostly dry with some small mud puddles. A long, long, did I mention long? Fire road that circles Mauna Kea. One of the best downhills in the area. It packs in a lot of excitement in a short amount of time. Wait a few days after any fresh snowfall and the entire area becomes one giant freeride trail after all the shredders pack down the powder. Watch that you don't overshoot the switchback to stay on the black diamond descent - the blue route is completely overgrown. This trail can be sandy during dry summer months and is best after rain, in the spring or fall. Lots of Flow! The main bike trail is about 18KM long with a gentle -5% grade. Sight lines are fantastic and the flow is amazing. On the bike map it is often combined as the Whole Enchilada with Porcupine Rim, Kokopelli, Hazard County and Burro Pass. This trail can be ridden as a loop, or could be ridden as an out-in-back. Flow trail is a bit tight at the top, but gets really fast as you transition to the lower Rush. If you continue, the trail ends at one of the lakes and continues lakeside until reaching the point where you began the trail The lake-side bit is fairly technical and very fun. From the young (or not so young) beginner, to the downhill pro, a flow trail delivers smiles for riders of all ages and skill level. 6 mile thrill ride through the dense pine forest of the park. Let me begin by recommending you don't do this ride unless you're pretty confident in your fitness.

Error compiling template "Designs/Swift/ItemPublisher/List/List.cshtml"
Line 305: 'User.GetUserByID(int)' is obsolete: 'Use UserManagementServices.Users.GetUserById instead.'
Line 439: 'PageView.Item' is obsolete: 'Use 'Page.Item' instead'
Line 599: The type or namespace name 'Services' does not exist in the namespace 'Dynamicweb' (are you missing an assembly reference?)

1 // <auto-generated/> 2 #pragma warning disable 1591 3 namespace CompiledRazorTemplates.Dynamic 4 { 5 #line hidden 6 using System.Threading.Tasks; 7 using System; 8 using System.Collections.Generic; 9 using System.Linq; 10 using System.IO; 11 internal class RazorEngine_7b12ddf8d0004bf481917c7d830fd6b3 : Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 12 { 13 #pragma warning disable 1998 14 public async override global::System.Threading.Tasks.Task ExecuteAsync() 15 { 16 WriteLiteral("\n"); 17 WriteLiteral("\n"); 18 bool showLoadMore = Pageview.CurrentParagraph.Item["ShowLoadMore"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShowLoadMore"] : false; 19 int maxItemsInList = !string.IsNullOrEmpty(Pageview.CurrentParagraph.Item["MaxItemsInList"].ToString()) ? Dynamicweb.Core.Converter.ToInt32(Pageview.CurrentParagraph.Item["MaxItemsInList"]) : 10; 20 var totalItems = GetInteger("ItemPublisher:Items.TotalCount"); 21 var count = GetInteger("ItemPublisher:Items.Count"); 22 var percent = count > 0 ? Convert.ToInt32(Math.Round(((double)count / totalItems) * 100, 0)) : 0; 23 var disableLoadMoreButton = count == totalItems ? true : false; 24 var loadMore = !disableLoadMoreButton ? $"onclick=\"document.querySelector('#PageSize_{Pageview.CurrentParagraph.ID}').value='{count + maxItemsInList}'; this.dispatchEvent(new window.Event('change', {{ bubbles: true }}))\"" : null; 25 var disabled = disableLoadMoreButton ? "disabled" : null; 26 var hasItems = GetBoolean("ItemPublisher:Items.Any"); string articleListLayout = Pageview.CurrentParagraph.Item["ArticleListLayout"] != null ? Pageview.CurrentParagraph.Item["ArticleListLayout"].ToString() : "grid"; string articleItemLayout = Pageview.CurrentParagraph.Item["ArticleItemLayout"] != null ? Pageview.CurrentParagraph.Item["ArticleItemLayout"].ToString() : string.Empty; string orderReverseClass = articleItemLayout == "image-right" ? " order-first order-lg-last" : string.Empty; string articleItemLayoutClass = string.Empty; string titleFontSize = Pageview.CurrentParagraph.Item["TitleFontSize"] != null ? Pageview.CurrentParagraph.Item["TitleFontSize"].ToString() : string.Empty; string gridSettings = Pageview.CurrentParagraph.Item["GridSettings"] != null ? Pageview.CurrentParagraph.Item["GridSettings"].ToString() : "4"; string carouselSettings = Pageview.CurrentParagraph.Item["CarouselSettings"] != null ? Pageview.CurrentParagraph.Item["CarouselSettings"].ToString() : "4"; bool showButton = Pageview.CurrentParagraph.Item["ShowButton"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShowButton"] : false; string ratio = Pageview.CurrentParagraph.Item["ImageAspectRatio"] != null ? Pageview.CurrentParagraph.Item["ImageAspectRatio"].ToString() : string.Empty; ratio = ratio != "0" ? ratio : string.Empty; string ratioCssClass = ratio != string.Empty ? " ratio" : string.Empty; string ratioVariable = ratio != string.Empty ? "style=\"--bs-aspect-ratio: " + ratio + "\"" : string.Empty; string articleItemTheme = Pageview.CurrentParagraph.Item["ArticleItemTheme"] != null ? Pageview.CurrentParagraph.Item["ArticleItemTheme"].ToString() : string.Empty; string articleItemShape = Pageview.CurrentParagraph.Item["ArticleItemShape"] != null ? Pageview.CurrentParagraph.Item["ArticleItemShape"].ToString() : "boxed"; string shapeClass = " rounded-0"; if (articleItemShape == "rounded") { shapeClass = " rounded-4"; } string settingsClassGrid = string.Empty; switch (gridSettings) { case "2": settingsClassGrid = " grid-md-2"; break; case "3": settingsClassGrid = " grid-md-3"; break; case "4": settingsClassGrid = " grid-md-2 grid-lg-3 grid-xl-4"; break; case "5": settingsClassGrid = " grid-md-2 grid-lg-3 grid-xl-5"; break; } string gridWrapperStart = articleListLayout == "grid" ? $"<div class=\"article-list grid gap-4 grid-1{settingsClassGrid}\">" : null; string gridWrapperEnd = articleListLayout == "grid" ? "</div>" : null; 27 28 bool hasListContext = Pageview.CurrentParagraph.Item["ListContext"] is object; WriteLiteral("\n"); 29 if (hasItems || count > 0) { Write(gridWrapperStart); 30 foreach (LoopItem item in GetLoop("ItemPublisher:Items.List")) { string title = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.Title")) && !item.GetBoolean("ItemPublisher:Item.HideTitle") ? item.GetString("ItemPublisher:Item.Title") : string.Empty; string coverTitle = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.CoverTitle")) ? item.GetString("ItemPublisher:Item.CoverTitle") : string.Empty; string coverImagePath = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.CoverImage")) ? item.GetString("ItemPublisher:Item.CoverImage") : string.Empty; bool hasFocalPoint = item.GetBoolean("ItemPublisher:Item.CoverImage.ImageHasFocalPoint"); int focalX = hasFocalPoint ? item.GetInteger("ItemPublisher:Item.CoverImage.FocalX") : 0; int focalY = hasFocalPoint ? item.GetInteger("ItemPublisher:Item.CoverImage.FocalY") : 0; int xPos = 100 - ((100 - focalX) / 2); int yPos = ((100 - focalY) / 2); string cssPosition = $"{xPos}% {yPos}%"; string summary = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.Summary")) ? item.GetString("ItemPublisher:Item.Summary") : string.Empty; string publishedDate = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.PublishedDate")) && !item.GetBoolean("ItemPublisher:Item.HidePublishedDate") ? item.GetDate("ItemPublisher:Item.PublishedDate").ToShortDateString() : string.Empty; string link = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.Url")) ? item.GetString("ItemPublisher:Item.Url") : string.Empty; string buttonLabel = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.ButtonLabel")) ? item.GetString("ItemPublisher:Item.ButtonLabel") : string.Empty; string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/"; bool renderContentWrapper = true; bool renderArticleInfoWrapper = true; if (string.IsNullOrEmpty(title) && string.IsNullOrEmpty(summary) && string.IsNullOrEmpty(publishedDate) && item.GetInteger("ItemPublisher:Item.Author") == 0 && !showButton) { renderContentWrapper = false; } if (string.IsNullOrEmpty(publishedDate) && item.GetInteger("ItemPublisher:Item.Author") == 0) { renderArticleInfoWrapper = false; } switch (articleItemLayout) { case "image-left": case "image-right": articleItemLayoutClass = !string.IsNullOrEmpty(coverImagePath) && renderContentWrapper ? "flex-lg-row" : articleItemLayoutClass; break; } string imageObjectFit = ratio != string.Empty ? "object-fit: cover;" : "object-fit: contain;"; string coverTheme = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.CoverTheme")) ? item.GetString("ItemPublisher:Item.CoverTheme") : string.Empty; string themeClass = string.Empty; string coverImageWrapperClass = string.Empty; if (!string.IsNullOrEmpty(coverTheme)) { articleItemTheme = coverTheme; } if (articleItemTheme != string.Empty) { themeClass = " theme " + articleItemTheme; } 31 32 // Exclude self from list - if list has context (Tags) and if is on same page 33 bool excludeSelf = item.GetInteger("ItemPublisher:Item.Field.PageId") == item.GetInteger("ItemPublisher:Global.PageId"); 34 bool renderItem = true; renderItem = hasListContext && excludeSelf ? renderItem = false : !hasListContext && !excludeSelf ? renderItem : renderItem; if (renderItem) 35 { WriteLiteral("\t\t\t<article"); 36 BeginWriteAttribute("class", " class=\"", 11053, "\"", 11225, 9); 37 WriteAttributeValue("", 11061, "card", 11061, 4, true); 38 WriteAttributeValue(" ", 11065, "border-0", 11066, 9, true); 39 WriteAttributeValue(" ", 11074, string.IsNullOrEmpty(themeClass) ? "gap-3" : null, 11075, 52, false); 40 WriteAttributeValue(" ", 11127, articleItemLayoutClass, 11128, 23, false); 41 WriteAttributeValue("", 11151, themeClass, 11151, 13, false); 42 WriteAttributeValue("", 11164, shapeClass, 11164, 13, false); 43 WriteAttributeValue(" ", 11177, "overflow-hidden", 11178, 16, true); 44 WriteAttributeValue(" ", 11193, LiftOnHover(), 11194, 14, false); 45 WriteAttributeValue(" ", 11208, ShadowOnHover(), 11209, 16, false); 46 EndWriteAttribute(); 47 WriteLiteral(" itemscope itemtype=\"https://schema.org/CreativeWork\" style=\"background-color: var(--swift-background-color)\">\n\n"); 48 if (!string.IsNullOrEmpty(coverImagePath)) { if (Path.GetExtension(coverImagePath).ToLower() == ".svg") { if (!renderContentWrapper) { coverImageWrapperClass = "d-flex justify-content-center align-items-center h-100 w-100 "; } else { coverImageWrapperClass = "w-100 "; } WriteLiteral("\t\t\t\t\t<a"); 49 BeginWriteAttribute("class", " class=\"", 11686, "\"", 11739, 2); 50 WriteAttributeValue("", 11694, coverImageWrapperClass, 11694, 25, false); 51 WriteAttributeValue("", 11719, orderReverseClass, 11719, 20, false); 52 EndWriteAttribute(); 53 BeginWriteAttribute("title", " title=\"", 11740, "\"", 11754, 1); 54 WriteAttributeValue("", 11748, title, 11748, 6, false); 55 EndWriteAttribute(); 56 BeginWriteAttribute("href", " href=\"", 11755, "\"", 11767, 1); 57 WriteAttributeValue("", 11762, link, 11762, 5, false); 58 EndWriteAttribute(); 59 WriteLiteral(" tabindex=\"-1\">\n\t\t\t\t\t\t<div"); 60 BeginWriteAttribute("class", " class=\"", 11794, "\"", 11882, 5); 61 WriteAttributeValue("", 11802, "d-flex", 11802, 6, true); 62 WriteAttributeValue(" ", 11808, "justify-content-center", 11809, 23, true); 63 WriteAttributeValue(" ", 11831, "align-items-center", 11832, 19, true); 64 WriteAttributeValue(" ", 11850, "overflow-hidden", 11851, 16, true); 65 WriteAttributeValue("", 11866, ratioCssClass, 11866, 16, false); 66 EndWriteAttribute(); 67 WriteLiteral(" "); 68 Write(ratioVariable); 69 WriteLiteral(">\n\t\t\t\t\t\t\t"); 70 Write(ReadFile(coverImagePath)); 71 WriteLiteral("\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</a>\n"); 72 } else { if (articleItemLayout == "image-top") { WriteLiteral("\t\t\t\t\t\t<a class=\"position-relative\""); 73 BeginWriteAttribute("title", " title=\"", 12061, "\"", 12075, 1); 74 WriteAttributeValue("", 12069, title, 12069, 6, false); 75 EndWriteAttribute(); 76 BeginWriteAttribute("href", " href=\"", 12076, "\"", 12088, 1); 77 WriteAttributeValue("", 12083, link, 12083, 5, false); 78 EndWriteAttribute(); 79 WriteLiteral(" tabindex=\"-1\">\n\t\t\t\t\t\t\t<figure"); 80 BeginWriteAttribute("class", " class=\"", 12119, "\"", 12170, 4); 81 WriteAttributeValue("", 12127, "overflow-hidden", 12127, 15, true); 82 WriteAttributeValue(" ", 12142, "m-0", 12143, 4, true); 83 WriteAttributeValue(" ", 12146, "mx-auto", 12147, 8, true); 84 WriteAttributeValue("", 12154, ratioCssClass, 12154, 16, false); 85 EndWriteAttribute(); 86 WriteLiteral(" "); 87 Write(ratioVariable); 88 WriteLiteral(">\n\t\t\t\t\t\t\t\t<text>"); 89 RenderImage(coverImagePath, title, cssPosition, articleItemLayout, imageObjectFit, gridSettings, carouselSettings);WriteLiteral("</text>\n\t\t\t\t\t\t\t</figure>\n\t\t\t\t\t\t</a>\n"); 90 } else { if (renderContentWrapper) { coverImageWrapperClass = "col-lg-5"; } WriteLiteral("\t\t\t\t\t\t<a"); 91 BeginWriteAttribute("class", " class=\"", 12481, "\"", 12538, 3); 92 WriteAttributeValue("", 12489, "col", 12489, 3, true); 93 WriteAttributeValue(" ", 12492, coverImageWrapperClass, 12493, 25, false); 94 WriteAttributeValue("", 12518, orderReverseClass, 12518, 20, false); 95 EndWriteAttribute(); 96 BeginWriteAttribute("title", " title=\"", 12539, "\"", 12553, 1); 97 WriteAttributeValue("", 12547, title, 12547, 6, false); 98 EndWriteAttribute(); 99 BeginWriteAttribute("href", " href=\"", 12554, "\"", 12566, 1); 100 WriteAttributeValue("", 12561, link, 12561, 5, false); 101 EndWriteAttribute(); 102 WriteLiteral(" tabindex=\"-1\">\n\t\t\t\t\t\t\t<figure class=\"h-lg-100 overflow-hidden m-0 mx-auto ratio ratio-16x9\">\n\t\t\t\t\t\t\t\t<text>"); 103 RenderImage(coverImagePath, title, cssPosition, articleItemLayout, imageObjectFit, gridSettings, carouselSettings);WriteLiteral("</text>\n\t\t\t\t\t\t\t</figure>\n\t\t\t\t\t\t</a>\n"); 104 } } } WriteLiteral("\n"); 105 if (renderContentWrapper) { WriteLiteral("\t\t\t\t\t<div"); 106 BeginWriteAttribute("class", " class=\"", 12894, "\"", 12948, 4); 107 WriteAttributeValue("", 12902, "col", 12902, 3, true); 108 WriteAttributeValue(" ", 12905, "d-flex", 12906, 7, true); 109 WriteAttributeValue(" ", 12912, "flex-column", 12913, 12, true); 110 WriteAttributeValue(" ", 12924, GetPadding(themeClass), 12925, 23, false); 111 EndWriteAttribute(); 112 WriteLiteral(">\n\t\t\t\t\t\t<div class=\"card-body p-0 d-flex flex-column gap-2\">\n"); 113 WriteLiteral("\t\t\t\t\t\t\t"); 114 Write(GetCategorySticker(item)); 115 WriteLiteral("\n\n"); 116 if (!string.IsNullOrEmpty(title)) { WriteLiteral("\t\t\t\t\t\t\t\t<a class=\"text-decoration-none text-decoration-underline-hover\""); 117 BeginWriteAttribute("href", " href=\"", 13195, "\"", 13207, 1); 118 WriteAttributeValue("", 13202, link, 13202, 5, false); 119 EndWriteAttribute(); 120 WriteLiteral(">\n\t\t\t\t\t\t\t\t\t<h3"); 121 BeginWriteAttribute("class", " class=\"", 13222, "\"", 13249, 2); 122 WriteAttributeValue("", 13230, titleFontSize, 13230, 14, false); 123 WriteAttributeValue(" ", 13244, "mb-0", 13245, 5, true); 124 EndWriteAttribute(); 125 WriteLiteral(" itemprop=\"headline\">"); 126 Write(title); 127 WriteLiteral("</h3>\n\t\t\t\t\t\t\t\t</a>\n"); 128 } if (!string.IsNullOrEmpty(summary)) { WriteLiteral("\t\t\t\t\t\t\t\t<p class=\"m-0 opacity-75\">"); 129 Write(summary); 130 WriteLiteral("</p>\n"); 131 } WriteLiteral("\t\t\t\t\t\t\t"); 132 Write(GetTagStickers(item)); 133 WriteLiteral("\n\n"); 134 if (showButton) { WriteLiteral("\t\t\t\t\t\t\t\t<div class=\"mt-auto\">\n\n"); 135 if (!string.IsNullOrEmpty(buttonLabel)) { WriteLiteral("\t\t\t\t\t\t\t\t\t\t<a"); 136 BeginWriteAttribute("href", " href=\"", 13611, "\"", 13623, 1); 137 WriteAttributeValue("", 13618, link, 13618, 5, false); 138 EndWriteAttribute(); 139 WriteLiteral(" class=\"text-start btn btn-link p-0\">\n\t\t\t\t\t\t\t\t\t\t\t"); 140 Write(buttonLabel); 141 WriteLiteral("\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"icon-auto\">\n\t\t\t\t\t\t\t\t\t\t\t\t"); 142 Write(ReadFile(iconPath + "arrow-right.svg")); 143 WriteLiteral("\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</a>\n"); 144 } else { WriteLiteral("\t\t\t\t\t\t\t\t\t\t<a"); 145 BeginWriteAttribute("href", " href=\"", 13856, "\"", 13868, 1); 146 WriteAttributeValue("", 13863, link, 13863, 5, false); 147 EndWriteAttribute(); 148 WriteLiteral(" class=\"btn btn-link p-0 lh-1 text-start\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"icon-auto\">\n\t\t\t\t\t\t\t\t\t\t\t\t"); 149 Write(ReadFile(iconPath + "arrow-right.svg")); 150 WriteLiteral("\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</a>\n"); 151 } WriteLiteral("\t\t\t\t\t\t\t\t</div>\n"); 152 } WriteLiteral("\n\t\t\t\t\t\t</div>\n\n"); 153 if (renderArticleInfoWrapper) { WriteLiteral("\t\t\t\t\t\t\t<div class=\"card-footer p-0 pt-3 border-top-0\">\n\t\t\t\t\t\t\t\t<div class=\"d-flex align-items-center justify-content-between gap-3\">\n"); 154 if (item.GetInteger("ItemPublisher:Item.Author") != 0) { int authorID = item.GetInteger("ItemPublisher:Item.Author"); var author = Dynamicweb.Security.UserManagement.User.GetUserByID(authorID); string authorImage = !string.IsNullOrEmpty(author.Image) ? author.Image : string.Empty; string authorImagePath = !string.IsNullOrEmpty(author.Image) ? $"/Admin/Public/GetImage.ashx?image={author.Image}&width=24&height=24&Crop=0&Quality=100&format=webp" : string.Empty; string authorName = !string.IsNullOrEmpty(author.Name) ? authorName = author.Name : string.Empty; string authorJobTitle = !string.IsNullOrEmpty(author.JobTitle) ? authorJobTitle = author.JobTitle : string.Empty; WriteLiteral("\t\t\t\t\t\t\t\t\t\t<div class=\"d-flex align-items-center gap-2 fs-8 opacity-75\">\n\n"); 155 if (!string.IsNullOrEmpty(authorImage)) { WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t\t<img class=\"img-fluid rounded-circle\""); 156 BeginWriteAttribute("src", " src=\"", 15204, "\"", 15226, 1); 157 WriteAttributeValue("", 15210, authorImagePath, 15210, 16, false); 158 EndWriteAttribute(); 159 WriteLiteral(" loading=\"lazy\""); 160 BeginWriteAttribute("alt", " alt=\"", 15242, "\"", 15259, 1); 161 WriteAttributeValue("", 15248, authorName, 15248, 11, false); 162 EndWriteAttribute(); 163 WriteLiteral(" width=\"24\" height=\"24\">\n"); 164 } else { WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"d-flex align-items-center justify-content-center rounded-circle\" style=\"background-color: rgba(var(--swift-foreground-color-rgb),.25)\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"icon-2 p-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t"); 165 Write(ReadFile(iconPath + "user.svg")); 166 WriteLiteral("\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n"); 167 } WriteLiteral("\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"d-flex flex-column lh-1\">\n"); 168 if (!string.IsNullOrEmpty(authorName)) { WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t\t\t<span itemprop=\"author\">"); 169 Write(authorName); 170 WriteLiteral("</span>\n"); 171 } if (!string.IsNullOrEmpty(authorJobTitle)) { WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"opacity-75\">"); 172 Write(authorJobTitle); 173 WriteLiteral("</span>\n"); 174 } WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n"); 175 } WriteLiteral("\n"); 176 if (!string.IsNullOrEmpty(publishedDate)) { string articleDateTime = item.GetDate("ItemPublisher:Item.PublishedDate").Year + "-" + item.GetDate("ItemPublisher:Item.PublishedDate").Month + "-" + item.GetDate("ItemPublisher:Item.PublishedDate").Day; WriteLiteral("\t\t\t\t\t\t\t\t\t\t<div class=\"d-flex align-items-center gap-1 fs-8 opacity-75\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"icon-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t"); 177 Write(ReadFile(iconPath + "calendar.svg")); 178 WriteLiteral("\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<time"); 179 BeginWriteAttribute("datetime", " datetime=\"", 16468, "\"", 16495, 1); 180 WriteAttributeValue("", 16479, articleDateTime, 16479, 16, false); 181 EndWriteAttribute(); 182 WriteLiteral(" itemprop=\"datePublished\">"); 183 Write(publishedDate); 184 WriteLiteral("</time>\n\t\t\t\t\t\t\t\t\t\t</div>\n"); 185 } WriteLiteral("\n\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n"); 186 } WriteLiteral("\t\t\t\t\t</div>\n"); 187 } WriteLiteral("\n\t\t\t</article>\n"); 188 189 } 190 } for (int i = 0; i < count; i++) 191 { string imageWrapper = string.Empty; string ratioString = ratioCssClass; 192 switch (articleItemLayout) 193 { 194 case "image-left": 195 case "image-right": 196 articleItemLayoutClass = " flex-lg-row"; 197 imageWrapper = "col col-lg-5"; ratioString = string.Empty; 198 break; 199 } WriteLiteral("\t\t<div class=\"htmx-indicator\" aria-hidden=\"true\" aria-disabled=\"true\" aria-label=\"loading\">\n\t\t\t<div"); 200 BeginWriteAttribute("class", " class=\"", 17111, "\"", 17194, 5); 201 WriteAttributeValue("", 17119, "card", 17119, 4, true); 202 WriteAttributeValue(" ", 17123, "placeholder-glow", 17124, 17, true); 203 WriteAttributeValue("", 17140, shapeClass, 17140, 13, false); 204 WriteAttributeValue(" ", 17153, "overflow-hidden", 17154, 16, true); 205 WriteAttributeValue("", 17169, articleItemLayoutClass, 17169, 25, false); 206 EndWriteAttribute(); 207 WriteLiteral(" style=\"background-color: var(--swift-background-color); border: 1px solid rgba(var(--swift-foreground-color-rgb), 0.2);\">\n\t\t\n\t\t\t\t<div"); 208 BeginWriteAttribute("class", " class=\"", 17329, "\"", 17384, 3); 209 WriteAttributeValue("", 17337, imageWrapper, 17337, 15, false); 210 WriteAttributeValue(" ", 17352, "placeholder", 17353, 12, true); 211 WriteAttributeValue("", 17364, orderReverseClass, 17364, 20, false); 212 EndWriteAttribute(); 213 WriteLiteral(">\n\t\t\t\t\t<div"); 214 BeginWriteAttribute("class", " class=\"", 17396, "\"", 17418, 1); 215 WriteAttributeValue("", 17404, ratioString, 17404, 14, false); 216 EndWriteAttribute(); 217 WriteLiteral(" "); 218 Write(ratioVariable); 219 WriteLiteral(@"></div> </div> <div class=""col d-flex flex-column""> <div class=""card-body""> <div class=""mb-2""> <span class=""placeholder col-2""></span> </div> <h5 class=""card-title""> <span class=""placeholder col-6""></span> <span class=""placeholder col-2""></span> </h5> <p class=""card-text""> <span class=""placeholder placeholder-sm col-2""></span> <span class=""placeholder placeholder-sm col-4""></span> <span class=""placeholder placeholder-sm col-4""></span> <span class=""placeholder placeholder-sm col-3""></span> <span class=""placeholder placeholder-sm col-6""></span> <span class=""placeholder placeholder-sm col-3""></span> </p> </div> <div class=""card-footer""> <div class=""d-flex justify-content-between""> <span class=""placeholder placeholder-sm col-2""></span> <span class=""placeholder placeholder-sm col-2""></span> </div> </div> </div> </div> </div> 220 "); 221 } Write(gridWrapperEnd); 222 if (Pageview.Item.SystemName == "Swift_ArticleListPage" && showLoadMore && articleListLayout == "grid") { WriteLiteral("\t\t<div class=\"text-center pt-5\">\n\t\t\t<p class=\"fs-7 mb-3 opacity-75\">"); 223 Write(Translate("Showing")); 224 WriteLiteral(" <span>"); 225 Write(count); 226 WriteLiteral("</span> of <span>"); 227 Write(totalItems); 228 WriteLiteral("</span> "); 229 Write(Translate("items")); 230 WriteLiteral("</p>\n\n\t\t\t<div class=\"progress mb-4 mx-auto\" style=\"height:3px;max-width:300px; background-color:rgba(var(--swift-foreground-color-rgb), 0.2);\">\n\t\t\t\t<div class=\"progress-bar\" role=\"progressbar\" aria-label=\"Showing\""); 231 BeginWriteAttribute("style", " style=\"", 18958, "\"", 19044, 4); 232 WriteAttributeValue("", 18966, "width:", 18966, 6, true); 233 WriteAttributeValue("", 18972, percent, 18972, 10, false); 234 WriteAttributeValue("", 18982, "%;background-color:rgba(var(--swift-foreground-color-rgb),", 18982, 58, true); 235 WriteAttributeValue(" ", 19040, "1);", 19041, 4, true); 236 EndWriteAttribute(); 237 BeginWriteAttribute("aria-valuenow", " aria-valuenow=\"", 19045, "\"", 19071, 1); 238 WriteAttributeValue("", 19061, percent, 19061, 10, false); 239 EndWriteAttribute(); 240 WriteLiteral(" aria-valuemin=\"0\" aria-valuemax=\"100\"></div>\n\t\t\t</div>\n\n"); 241 if (!disableLoadMoreButton) { WriteLiteral("\t\t\t\t<div>\n\t\t\t\t\t<input type=\"hidden\""); 242 BeginWriteAttribute("id", " id=\"", 19201, "\"", 19246, 2); 243 WriteAttributeValue("", 19206, "PageSize_", 19206, 9, true); 244 WriteAttributeValue("", 19215, Pageview.CurrentParagraph.ID, 19215, 31, false); 245 EndWriteAttribute(); 246 WriteLiteral(" name=\"PageSize\" />\n\t\t\t\t\t<label"); 247 BeginWriteAttribute("class", " class=\"", 19278, "\"", 19311, 3); 248 WriteAttributeValue("", 19286, "btn", 19286, 3, true); 249 WriteAttributeValue(" ", 19289, "btn-primary", 19290, 12, true); 250 WriteAttributeValue(" ", 19301, disabled, 19302, 9, false); 251 EndWriteAttribute(); 252 BeginWriteAttribute("for", " for=\"", 19312, "\"", 19358, 2); 253 WriteAttributeValue("", 19318, "PageSize_", 19318, 9, true); 254 WriteAttributeValue("", 19327, Pageview.CurrentParagraph.ID, 19327, 31, false); 255 EndWriteAttribute(); 256 WriteLiteral(" "); 257 Write(loadMore); 258 WriteLiteral(">"); 259 Write(Translate("Load more")); 260 WriteLiteral("</label>\n\t\t\t\t</div>\n"); 261 } WriteLiteral("\t\t</div>\n"); 262 } } WriteLiteral("\n"); 263 if(!hasItems || count == 0) { 264 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/"; WriteLiteral("\t<div class=\"grid grid-1\" style=\"place-items: center;\">\n\t\t<span class=\"icon-7\">\n\t\t\t"); 265 Write(ReadFile(iconPath + "filter.svg")); 266 WriteLiteral("\n\t\t</span>\n\t\t<h3 class=\"m-0\">"); 267 Write(Translate("No items found")); 268 WriteLiteral("</h3>\n\t\t<p class=\"m-0 fs-7 text-center\">"); 269 Write(Translate("Sorry, that filter combination has no results.")); 270 WriteLiteral(" <br /> "); 271 Write(Translate("Please try different criteria")); 272 WriteLiteral("</p>\n\n\t\t<button type=\"button\" aria-label=\"Clear filters\" onclick=\"clearFilters(event)\" class=\"mt-2 btn btn-secondary btn-sm d-flex align-items-center\">\n\t\t\t"); 273 Write(Translate("Clear filters")); 274 WriteLiteral("\n\t\t\t<span class=\"icon-2 ms-2\">\n\t\t\t\t"); 275 Write(ReadFile(iconPath + "refresh-ccw.svg")); 276 WriteLiteral("\n\t\t\t</span>\n\t\t</button>\n\t</div>\n"); 277 WriteLiteral(@" <script> var clearFilters = (event) => { const form = event.target.closest('form'); form.reset(); let elements = form.elements; 278 for (var i = 0, element; element = elements[i++];) { 279 switch (element.type) { 280 case ""textarea"": 281 case ""hidden"": 282 element.value = ''; 283 break; 284 case ""radio"": 285 case ""checkbox"": 286 if (element.checked) { 287 element.checked = false; 288 } 289 break; 290 case ""select-one"": 291 element.selectedIndex = -1; 292 break; 293 default: 294 break; 295 } 296 } 297 form.dispatchEvent(new window.Event('change', { bubbles: true })) } </script> "); 298 } WriteLiteral("\n"); 299 } 300 #pragma warning restore 1998 301 private List<string> GetTags(LoopItem item) { var tags = new List<string>(); foreach (var tag in item.GetLoop("ItemPublisher:Item.Tags.Options")) { if (tag.GetBoolean("ItemPublisher:Item.Tags.Option.IsSelected")) { tags.Add(tag.GetString("ItemPublisher:Item.Tags.Option.Label")); } } return tags; } private string CreateCategory(string label, string theme) { var border = string.IsNullOrEmpty(theme) ? "--swift-border-color: rgba(var(--swift-foreground-color-rgb), .2);" : null; var sticker = $"<span class=\"badge {theme}\" style=\"color: var(--swift-foreground-color); background-color: rgba(var(--swift-background-color-rgb), 1); {border} \">{label}</span>"; return sticker; } private string CreateSticker(string label) { string shape = Pageview.CurrentParagraph.Item["ArticleItemShape"] != null ? Pageview.CurrentParagraph.Item["ArticleItemShape"].ToString() : "boxed"; var sticker = $"<span class=\"badge fw-normal shadow-none\" style=\"border: 1px solid rgba(var(--swift-foreground-color-rgb), 0.2);\">{label}</span>"; return sticker; } private string GetTagStickers(LoopItem item) { var stickers = string.Empty; if (item.GetString("ItemPublisher:Item.SystemName") == "Swift_Article") { var showTags = Pageview.CurrentParagraph.Item["ShowTags"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShowTags"] : false; if (showTags && GetTags(item).Count >= 1) { stickers += "<div class=\"d-inline-flex flex-wrap gap-1\">"; foreach (var tag in GetTags(item)) { stickers += CreateSticker(tag); } stickers += "</div>"; } } return stickers; } private string GetCategorySticker(LoopItem item) { var sticker = string.Empty; if (item.GetString("ItemPublisher:Item.SystemName") == "Swift_Article") { var showListCategory = Pageview.CurrentParagraph.Item["ShowListCategory"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShowListCategory"] : false; if (showListCategory) { sticker += "<div class=\"d-inline-flex flex-wrap gap-1\">"; sticker += CreateCategorySticker(GetCategory(Dynamicweb.Content.Services.Pages.GetPage(item.GetInteger("ItemPublisher:Item.Field.PageId")).ParentPageId), GetCategoryTheme(GetCategory(Dynamicweb.Services.Pages.GetPage(item.GetInteger("ItemPublisher:Item.Field.PageId")).ParentPageId))); sticker += "</div>"; } } return sticker; } private Dynamicweb.Frontend.PageInfoViewModel GetCategory(int categoryId) { var categoryParagraph = categoryId != 0 ? Dynamicweb.Content.Services.Pages.GetPage(categoryId) : null; var category = categoryParagraph != null ? Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(categoryParagraph) : null; return category; } private string CreateCategorySticker(Dynamicweb.Frontend.PageInfoViewModel category, string theme) { var sticker = category != null ? CreateCategory(category.Item?.GetString("Title"), theme) : null; return sticker; } private string GetCategoryTheme(Dynamicweb.Frontend.PageInfoViewModel category) { var theme = category != null ? category.Item?.GetRawValueString("CoverTheme") : null; return theme; } private string LiftOnHover() { bool liftOnHover = Pageview.CurrentParagraph.Item["LiftOnHover"] != null ? (Boolean)Pageview.CurrentParagraph.Item["LiftOnHover"] : false; var lift = liftOnHover ? "lift" : null; return lift; } private string ShadowOnHover() { bool shadowOnHover = Pageview.CurrentParagraph.Item["ShadowOnHover"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShadowOnHover"] : false; var shadow = shadowOnHover ? "shadow-hover" : null; return shadow; } private string GetPadding(string theme) { var padding = !string.IsNullOrEmpty(theme) ? "p-3" : null; return padding; } private string GetGap(string theme) { var padding = string.IsNullOrEmpty(theme) ? "gap-3" : null; return padding; } 302 void RenderImage(string coverImagePath, string title, string cssPosition, string articleItemLayout, string imageObjectFit, string gridSettings, string carouselSettings) { coverImagePath = Dynamicweb.Context.Current.Server.UrlEncode(coverImagePath); if (articleItemLayout != "image-top") { imageObjectFit = "object-fit: cover"; } string imgSizeSelector = "50vw"; if (gridSettings == "1" || carouselSettings == "1") { imgSizeSelector = "100vw"; } else if (gridSettings == "2" || carouselSettings == "2") { imgSizeSelector = "50vw"; } else if (gridSettings == "3" || carouselSettings == "3") { imgSizeSelector = "33vw"; } else if (gridSettings == "4" || carouselSettings == "4") { imgSizeSelector = "25vw"; } else if (gridSettings == "5" || carouselSettings == "5") { imgSizeSelector = "17vw"; } string coverImagePathM = $"/Admin/Public/GetImage.ashx?image={coverImagePath}&width=640&quality=85&format=webp"; string coverImagePathL = $"/Admin/Public/GetImage.ashx?image={coverImagePath}&width=960&quality=85&format=webp"; string imagePathFallBack = coverImagePathM; WriteLiteral(" <img"); 303 BeginWriteAttribute("srcset", " srcset=\"", 22022, "\"", 22086, 4); 304 WriteAttributeValue("\n\t\t\t", 22031, coverImagePathM, 22035, 16, false); 305 WriteAttributeValue(" ", 22051, "640w,", 22054, 8, true); 306 WriteAttributeValue("\n\t\t\t", 22059, coverImagePathL, 22063, 16, false); 307 WriteAttributeValue(" ", 22079, "960w", 22082, 7, true); 308 EndWriteAttribute(); 309 BeginWriteAttribute("src", "\n src=\"", 22087, "\"", 22120, 1); 310 WriteAttributeValue("", 22102, imagePathFallBack, 22102, 18, false); 311 EndWriteAttribute(); 312 BeginWriteAttribute("sizes", "\n sizes=\"", 22121, "\"", 22180, 5); 313 WriteAttributeValue("", 22138, "(min-width:", 22138, 11, true); 314 WriteAttributeValue(" ", 22149, "992px)", 22150, 7, true); 315 WriteAttributeValue(" ", 22156, imgSizeSelector, 22157, 16, false); 316 WriteAttributeValue("", 22173, ",", 22173, 1, true); 317 WriteAttributeValue(" ", 22174, "100vw", 22175, 6, true); 318 EndWriteAttribute(); 319 WriteLiteral("\n loading=\"lazy\"\n decoding=\"async\"\n class=\"img-fluid image-zoom-lg-1-hover\""); 320 BeginWriteAttribute("style", "\n style=\"", 22280, "\"", 22344, 5); 321 WriteAttributeValue("", 22297, imageObjectFit, 22297, 15, false); 322 WriteAttributeValue("", 22312, ";", 22312, 1, true); 323 WriteAttributeValue(" ", 22313, "object-position:", 22314, 17, true); 324 WriteAttributeValue(" ", 22330, cssPosition, 22331, 12, false); 325 WriteAttributeValue("", 22343, ";", 22343, 1, true); 326 EndWriteAttribute(); 327 BeginWriteAttribute("alt", "\n alt=\"", 22345, "\"", 22366, 1); 328 WriteAttributeValue("", 22360, title, 22360, 6, false); 329 EndWriteAttribute(); 330 WriteLiteral(">\n"); 331 } 332 } 333 } 334 #pragma warning restore 1591 335

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @using System.IO @functions { private List<string> GetTags(LoopItem item) { var tags = new List<string>(); foreach (var tag in item.GetLoop("ItemPublisher:Item.Tags.Options")) { if (tag.GetBoolean("ItemPublisher:Item.Tags.Option.IsSelected")) { tags.Add(tag.GetString("ItemPublisher:Item.Tags.Option.Label")); } } return tags; } private string CreateCategory(string label, string theme) { var border = string.IsNullOrEmpty(theme) ? "--swift-border-color: rgba(var(--swift-foreground-color-rgb), .2);" : null; var sticker = $"<span class=\"badge {theme}\" style=\"color: var(--swift-foreground-color); background-color: rgba(var(--swift-background-color-rgb), 1); {border} \">{label}</span>"; return sticker; } private string CreateSticker(string label) { string shape = Pageview.CurrentParagraph.Item["ArticleItemShape"] != null ? Pageview.CurrentParagraph.Item["ArticleItemShape"].ToString() : "boxed"; var sticker = $"<span class=\"badge fw-normal shadow-none\" style=\"border: 1px solid rgba(var(--swift-foreground-color-rgb), 0.2);\">{label}</span>"; return sticker; } private string GetTagStickers(LoopItem item) { var stickers = string.Empty; if (item.GetString("ItemPublisher:Item.SystemName") == "Swift_Article") { var showTags = Pageview.CurrentParagraph.Item["ShowTags"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShowTags"] : false; if (showTags && GetTags(item).Count >= 1) { stickers += "<div class=\"d-inline-flex flex-wrap gap-1\">"; foreach (var tag in GetTags(item)) { stickers += CreateSticker(tag); } stickers += "</div>"; } } return stickers; } private string GetCategorySticker(LoopItem item) { var sticker = string.Empty; if (item.GetString("ItemPublisher:Item.SystemName") == "Swift_Article") { var showListCategory = Pageview.CurrentParagraph.Item["ShowListCategory"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShowListCategory"] : false; if (showListCategory) { sticker += "<div class=\"d-inline-flex flex-wrap gap-1\">"; sticker += CreateCategorySticker(GetCategory(Dynamicweb.Content.Services.Pages.GetPage(item.GetInteger("ItemPublisher:Item.Field.PageId")).ParentPageId), GetCategoryTheme(GetCategory(Dynamicweb.Services.Pages.GetPage(item.GetInteger("ItemPublisher:Item.Field.PageId")).ParentPageId))); sticker += "</div>"; } } return sticker; } private Dynamicweb.Frontend.PageInfoViewModel GetCategory(int categoryId) { var categoryParagraph = categoryId != 0 ? Dynamicweb.Content.Services.Pages.GetPage(categoryId) : null; var category = categoryParagraph != null ? Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(categoryParagraph) : null; return category; } private string CreateCategorySticker(Dynamicweb.Frontend.PageInfoViewModel category, string theme) { var sticker = category != null ? CreateCategory(category.Item?.GetString("Title"), theme) : null; return sticker; } private string GetCategoryTheme(Dynamicweb.Frontend.PageInfoViewModel category) { var theme = category != null ? category.Item?.GetRawValueString("CoverTheme") : null; return theme; } private string LiftOnHover() { bool liftOnHover = Pageview.CurrentParagraph.Item["LiftOnHover"] != null ? (Boolean)Pageview.CurrentParagraph.Item["LiftOnHover"] : false; var lift = liftOnHover ? "lift" : null; return lift; } private string ShadowOnHover() { bool shadowOnHover = Pageview.CurrentParagraph.Item["ShadowOnHover"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShadowOnHover"] : false; var shadow = shadowOnHover ? "shadow-hover" : null; return shadow; } private string GetPadding(string theme) { var padding = !string.IsNullOrEmpty(theme) ? "p-3" : null; return padding; } private string GetGap(string theme) { var padding = string.IsNullOrEmpty(theme) ? "gap-3" : null; return padding; } } @{ bool showLoadMore = Pageview.CurrentParagraph.Item["ShowLoadMore"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShowLoadMore"] : false; 2 int maxItemsInList = !string.IsNullOrEmpty(Pageview.CurrentParagraph.Item["MaxItemsInList"].ToString()) ? Dynamicweb.Core.Converter.ToInt32(Pageview.CurrentParagraph.Item["MaxItemsInList"]) : 10; 3 var totalItems = GetInteger("ItemPublisher:Items.TotalCount"); 4 var count = GetInteger("ItemPublisher:Items.Count"); 5 var percent = count > 0 ? Convert.ToInt32(Math.Round(((double)count / totalItems) * 100, 0)) : 0; 6 var disableLoadMoreButton = count == totalItems ? true : false; 7 var loadMore = !disableLoadMoreButton ? $"onclick=\"document.querySelector('#PageSize_{Pageview.CurrentParagraph.ID}').value='{count + maxItemsInList}'; this.dispatchEvent(new window.Event('change', {{ bubbles: true }}))\"" : null; 8 var disabled = disableLoadMoreButton ? "disabled" : null; 9 var hasItems = GetBoolean("ItemPublisher:Items.Any"); string articleListLayout = Pageview.CurrentParagraph.Item["ArticleListLayout"] != null ? Pageview.CurrentParagraph.Item["ArticleListLayout"].ToString() : "grid"; string articleItemLayout = Pageview.CurrentParagraph.Item["ArticleItemLayout"] != null ? Pageview.CurrentParagraph.Item["ArticleItemLayout"].ToString() : string.Empty; string orderReverseClass = articleItemLayout == "image-right" ? " order-first order-lg-last" : string.Empty; string articleItemLayoutClass = string.Empty; string titleFontSize = Pageview.CurrentParagraph.Item["TitleFontSize"] != null ? Pageview.CurrentParagraph.Item["TitleFontSize"].ToString() : string.Empty; string gridSettings = Pageview.CurrentParagraph.Item["GridSettings"] != null ? Pageview.CurrentParagraph.Item["GridSettings"].ToString() : "4"; string carouselSettings = Pageview.CurrentParagraph.Item["CarouselSettings"] != null ? Pageview.CurrentParagraph.Item["CarouselSettings"].ToString() : "4"; bool showButton = Pageview.CurrentParagraph.Item["ShowButton"] != null ? (Boolean)Pageview.CurrentParagraph.Item["ShowButton"] : false; string ratio = Pageview.CurrentParagraph.Item["ImageAspectRatio"] != null ? Pageview.CurrentParagraph.Item["ImageAspectRatio"].ToString() : string.Empty; ratio = ratio != "0" ? ratio : string.Empty; string ratioCssClass = ratio != string.Empty ? " ratio" : string.Empty; string ratioVariable = ratio != string.Empty ? "style=\"--bs-aspect-ratio: " + ratio + "\"" : string.Empty; string articleItemTheme = Pageview.CurrentParagraph.Item["ArticleItemTheme"] != null ? Pageview.CurrentParagraph.Item["ArticleItemTheme"].ToString() : string.Empty; string articleItemShape = Pageview.CurrentParagraph.Item["ArticleItemShape"] != null ? Pageview.CurrentParagraph.Item["ArticleItemShape"].ToString() : "boxed"; string shapeClass = " rounded-0"; if (articleItemShape == "rounded") { shapeClass = " rounded-4"; } string settingsClassGrid = string.Empty; switch (gridSettings) { case "2": settingsClassGrid = " grid-md-2"; break; case "3": settingsClassGrid = " grid-md-3"; break; case "4": settingsClassGrid = " grid-md-2 grid-lg-3 grid-xl-4"; break; case "5": settingsClassGrid = " grid-md-2 grid-lg-3 grid-xl-5"; break; } string gridWrapperStart = articleListLayout == "grid" ? $"<div class=\"article-list grid gap-4 grid-1{settingsClassGrid}\">" : null; string gridWrapperEnd = articleListLayout == "grid" ? "</div>" : null; 10 11 bool hasListContext = Pageview.CurrentParagraph.Item["ListContext"] is object; } @if (hasItems || count > 0) { @(gridWrapperStart) foreach (LoopItem item in GetLoop("ItemPublisher:Items.List")) { string title = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.Title")) && !item.GetBoolean("ItemPublisher:Item.HideTitle") ? item.GetString("ItemPublisher:Item.Title") : string.Empty; string coverTitle = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.CoverTitle")) ? item.GetString("ItemPublisher:Item.CoverTitle") : string.Empty; string coverImagePath = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.CoverImage")) ? item.GetString("ItemPublisher:Item.CoverImage") : string.Empty; bool hasFocalPoint = item.GetBoolean("ItemPublisher:Item.CoverImage.ImageHasFocalPoint"); int focalX = hasFocalPoint ? item.GetInteger("ItemPublisher:Item.CoverImage.FocalX") : 0; int focalY = hasFocalPoint ? item.GetInteger("ItemPublisher:Item.CoverImage.FocalY") : 0; int xPos = 100 - ((100 - focalX) / 2); int yPos = ((100 - focalY) / 2); string cssPosition = $"{xPos}% {yPos}%"; string summary = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.Summary")) ? item.GetString("ItemPublisher:Item.Summary") : string.Empty; string publishedDate = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.PublishedDate")) && !item.GetBoolean("ItemPublisher:Item.HidePublishedDate") ? item.GetDate("ItemPublisher:Item.PublishedDate").ToShortDateString() : string.Empty; string link = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.Url")) ? item.GetString("ItemPublisher:Item.Url") : string.Empty; string buttonLabel = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.ButtonLabel")) ? item.GetString("ItemPublisher:Item.ButtonLabel") : string.Empty; string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/"; bool renderContentWrapper = true; bool renderArticleInfoWrapper = true; if (string.IsNullOrEmpty(title) && string.IsNullOrEmpty(summary) && string.IsNullOrEmpty(publishedDate) && item.GetInteger("ItemPublisher:Item.Author") == 0 && !showButton) { renderContentWrapper = false; } if (string.IsNullOrEmpty(publishedDate) && item.GetInteger("ItemPublisher:Item.Author") == 0) { renderArticleInfoWrapper = false; } switch (articleItemLayout) { case "image-left": case "image-right": articleItemLayoutClass = !string.IsNullOrEmpty(coverImagePath) && renderContentWrapper ? "flex-lg-row" : articleItemLayoutClass; break; } string imageObjectFit = ratio != string.Empty ? "object-fit: cover;" : "object-fit: contain;"; string coverTheme = !string.IsNullOrEmpty(item.GetString("ItemPublisher:Item.CoverTheme")) ? item.GetString("ItemPublisher:Item.CoverTheme") : string.Empty; string themeClass = string.Empty; string coverImageWrapperClass = string.Empty; if (!string.IsNullOrEmpty(coverTheme)) { articleItemTheme = coverTheme; } if (articleItemTheme != string.Empty) { themeClass = " theme " + articleItemTheme; } 12 13 // Exclude self from list - if list has context (Tags) and if is on same page 14 bool excludeSelf = item.GetInteger("ItemPublisher:Item.Field.PageId") == item.GetInteger("ItemPublisher:Global.PageId"); 15 bool renderItem = true; renderItem = hasListContext && excludeSelf ? renderItem = false : !hasListContext && !excludeSelf ? renderItem : renderItem; if (renderItem) 16 { <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)"> @if (!string.IsNullOrEmpty(coverImagePath)) { if (Path.GetExtension(coverImagePath).ToLower() == ".svg") { if (!renderContentWrapper) { coverImageWrapperClass = "d-flex justify-content-center align-items-center h-100 w-100 "; } else { coverImageWrapperClass = "w-100 "; } <a class="@(coverImageWrapperClass)@(orderReverseClass)" title="@title" href="@link" tabindex="-1"> <div class="d-flex justify-content-center align-items-center overflow-hidden@(ratioCssClass)" @ratioVariable> @ReadFile(coverImagePath) </div> </a> } else { if (articleItemLayout == "image-top") { <a class="position-relative" title="@title" href="@link" tabindex="-1"> <figure class="overflow-hidden m-0 mx-auto@(ratioCssClass)" @ratioVariable> <text>@{RenderImage(coverImagePath, title, cssPosition, articleItemLayout, imageObjectFit, gridSettings, carouselSettings);}</text> </figure> </a> } else { if (renderContentWrapper) { coverImageWrapperClass = "col-lg-5"; } <a class="col @(coverImageWrapperClass)@(orderReverseClass)" title="@title" href="@link" tabindex="-1"> <figure class="h-lg-100 overflow-hidden m-0 mx-auto ratio ratio-16x9"> <text>@{RenderImage(coverImagePath, title, cssPosition, articleItemLayout, imageObjectFit, gridSettings, carouselSettings);}</text> </figure> </a> } } } @if (renderContentWrapper) { <div class="col d-flex flex-column @GetPadding(themeClass)"> <div class="card-body p-0 d-flex flex-column gap-2"> @*Show tag stickers*@ @GetCategorySticker(item) @if (!string.IsNullOrEmpty(title)) { <a class="text-decoration-none text-decoration-underline-hover" href="@link"> <h3 class="@titleFontSize mb-0" itemprop="headline">@title</h3> </a> } @if (!string.IsNullOrEmpty(summary)) { <p class="m-0 opacity-75">@summary</p> } @*Show tag stickers*@ @GetTagStickers(item) @if (showButton) { <div class="mt-auto"> @if (!string.IsNullOrEmpty(buttonLabel)) { <a href="@link" class="text-start btn btn-link p-0"> @buttonLabel <span class="icon-auto"> @ReadFile(iconPath + "arrow-right.svg") </span> </a> } else { <a href="@link" class="btn btn-link p-0 lh-1 text-start"> <span class="icon-auto"> @ReadFile(iconPath + "arrow-right.svg") </span> </a> } </div> } </div> @if (renderArticleInfoWrapper) { <div class="card-footer p-0 pt-3 border-top-0"> <div class="d-flex align-items-center justify-content-between gap-3"> @if (item.GetInteger("ItemPublisher:Item.Author") != 0) { int authorID = item.GetInteger("ItemPublisher:Item.Author"); var author = Dynamicweb.Security.UserManagement.User.GetUserByID(authorID); string authorImage = !string.IsNullOrEmpty(author.Image) ? author.Image : string.Empty; string authorImagePath = !string.IsNullOrEmpty(author.Image) ? $"/Admin/Public/GetImage.ashx?image={author.Image}&width=24&height=24&Crop=0&Quality=100&format=webp" : string.Empty; string authorName = !string.IsNullOrEmpty(author.Name) ? authorName = author.Name : string.Empty; string authorJobTitle = !string.IsNullOrEmpty(author.JobTitle) ? authorJobTitle = author.JobTitle : string.Empty; <div class="d-flex align-items-center gap-2 fs-8 opacity-75"> @if (!string.IsNullOrEmpty(authorImage)) { <img class="img-fluid rounded-circle" src="@authorImagePath" loading="lazy" alt="@authorName" width="24" height="24"> } else { <div class="d-flex align-items-center justify-content-center rounded-circle" style="background-color: rgba(var(--swift-foreground-color-rgb),.25)"> <div class="icon-2 p-1"> @ReadFile(iconPath + "user.svg") </div> </div> } <div class="d-flex flex-column lh-1"> @if (!string.IsNullOrEmpty(authorName)) { <span itemprop="author">@authorName</span> } @if (!string.IsNullOrEmpty(authorJobTitle)) { <span class="opacity-75">@authorJobTitle</span> } </div> </div> } @if (!string.IsNullOrEmpty(publishedDate)) { string articleDateTime = item.GetDate("ItemPublisher:Item.PublishedDate").Year + "-" + item.GetDate("ItemPublisher:Item.PublishedDate").Month + "-" + item.GetDate("ItemPublisher:Item.PublishedDate").Day; <div class="d-flex align-items-center gap-1 fs-8 opacity-75"> <div class="icon-1"> @ReadFile(iconPath + "calendar.svg") </div> <time datetime="@articleDateTime" itemprop="datePublished">@publishedDate</time> </div> } </div> </div> } </div> } </article> 17 } 18 } @* Placeholders (skeleton) *@ for (int i = 0; i < count; i++) 19 { string imageWrapper = string.Empty; string ratioString = ratioCssClass; 20 switch (articleItemLayout) 21 { 22 case "image-left": 23 case "image-right": 24 articleItemLayoutClass = " flex-lg-row"; 25 imageWrapper = "col col-lg-5"; ratioString = string.Empty; 26 break; 27 } <div class="htmx-indicator" aria-hidden="true" aria-disabled="true" aria-label="loading"> <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);"> <div class="@(imageWrapper) placeholder@(orderReverseClass)"> <div class="@(ratioString)" @ratioVariable></div> </div> <div class="col d-flex flex-column"> <div class="card-body"> <div class="mb-2"> <span class="placeholder col-2"></span> </div> <h5 class="card-title"> <span class="placeholder col-6"></span> <span class="placeholder col-2"></span> </h5> <p class="card-text"> <span class="placeholder placeholder-sm col-2"></span> <span class="placeholder placeholder-sm col-4"></span> <span class="placeholder placeholder-sm col-4"></span> <span class="placeholder placeholder-sm col-3"></span> <span class="placeholder placeholder-sm col-6"></span> <span class="placeholder placeholder-sm col-3"></span> </p> </div> <div class="card-footer"> <div class="d-flex justify-content-between"> <span class="placeholder placeholder-sm col-2"></span> <span class="placeholder placeholder-sm col-2"></span> </div> </div> </div> </div> </div> 28 } @(gridWrapperEnd) @* Load more *@ if (Pageview.Item.SystemName == "Swift_ArticleListPage" && showLoadMore && articleListLayout == "grid") { <div class="text-center pt-5"> <p class="fs-7 mb-3 opacity-75">@Translate("Showing") <span>@count</span> of <span>@totalItems</span> @Translate("items")</p> <div class="progress mb-4 mx-auto" style="height:3px;max-width:300px; background-color:rgba(var(--swift-foreground-color-rgb), 0.2);"> <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> </div> @if (!disableLoadMoreButton) { <div> <input type="hidden" id="PageSize_@(Pageview.CurrentParagraph.ID)" name="PageSize" /> <label class="btn btn-primary @disabled" for="PageSize_@(Pageview.CurrentParagraph.ID)" @loadMore>@Translate("Load more")</label> </div> } </div> } } @if(!hasItems || count == 0) { 29 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/"; <div class="grid grid-1" style="place-items: center;"> <span class="icon-7"> @ReadFile(iconPath + "filter.svg") </span> <h3 class="m-0">@Translate("No items found")</h3> <p class="m-0 fs-7 text-center">@Translate("Sorry, that filter combination has no results.") <br /> @Translate("Please try different criteria")</p> <button type="button" aria-label="Clear filters" onclick="clearFilters(event)" class="mt-2 btn btn-secondary btn-sm d-flex align-items-center"> @Translate("Clear filters") <span class="icon-2 ms-2"> @ReadFile(iconPath + "refresh-ccw.svg") </span> </button> </div> <script> var clearFilters = (event) => { const form = event.target.closest('form'); form.reset(); let elements = form.elements; 30 for (var i = 0, element; element = elements[i++];) { 31 switch (element.type) { 32 case "textarea": 33 case "hidden": 34 element.value = ''; 35 break; 36 case "radio": 37 case "checkbox": 38 if (element.checked) { 39 element.checked = false; 40 } 41 break; 42 case "select-one": 43 element.selectedIndex = -1; 44 break; 45 default: 46 break; 47 } 48 } 49 form.dispatchEvent(new window.Event('change', { bubbles: true })) } </script> } @functions { 50 void RenderImage(string coverImagePath, string title, string cssPosition, string articleItemLayout, string imageObjectFit, string gridSettings, string carouselSettings) { coverImagePath = Dynamicweb.Context.Current.Server.UrlEncode(coverImagePath); if (articleItemLayout != "image-top") { imageObjectFit = "object-fit: cover"; } string imgSizeSelector = "50vw"; if (gridSettings == "1" || carouselSettings == "1") { imgSizeSelector = "100vw"; } else if (gridSettings == "2" || carouselSettings == "2") { imgSizeSelector = "50vw"; } else if (gridSettings == "3" || carouselSettings == "3") { imgSizeSelector = "33vw"; } else if (gridSettings == "4" || carouselSettings == "4") { imgSizeSelector = "25vw"; } else if (gridSettings == "5" || carouselSettings == "5") { imgSizeSelector = "17vw"; } string coverImagePathM = $"/Admin/Public/GetImage.ashx?image={coverImagePath}&width=640&quality=85&format=webp"; string coverImagePathL = $"/Admin/Public/GetImage.ashx?image={coverImagePath}&width=960&quality=85&format=webp"; string imagePathFallBack = coverImagePathM; <img srcset=" @coverImagePathM 640w, @coverImagePathL 960w" src="@imagePathFallBack" sizes="(min-width: 992px) @imgSizeSelector, 100vw" loading="lazy" decoding="async" class="img-fluid image-zoom-lg-1-hover" style="@imageObjectFit; object-position: @cssPosition;" alt="@title"> } 51 }
Ved at klikke 'Acceptér Alle' så giver til tiladelse til at vi må indsamle information om dig til forskellige formål, hvilket inkluderer: Funktionalitet, Statestik og Marketing