<% Dim postIter, postItem, featuredPost, featuredImage, featuredPublishedText, featuredReadTime Set postIter = posts.Iterator() featuredImage = "" If posts.Count > 0 Then Set featuredPost = postIter.GetNext() featuredImage = ExtractFirstImageSrc(featuredPost.Body) End If %>

Posts

Published articles from BrainOrdure.
<% If posts.Count = 0 Then %>
No published posts are available yet.
<% Else %>
<% If Len(featuredImage) > 0 Then %> <% End If %>
Top story

<%= H(featuredPost.Title) %>

<%= H(featuredPost.Summary) %>

<% featuredPublishedText = "" If IsDate(featuredPost.PublishedDate) Then If CDate(featuredPost.PublishedDate) > #1/1/1970# Then featuredPublishedText = FormatDateTime(featuredPost.PublishedDate, vbLongDate) End If End If featuredReadTime = EstimateReadTime(featuredPost.Body) %>

More stories

<% Dim shownCount, publishedText, readTimeText, cardImage, articleLabel shownCount = 0 Do While postIter.HasNext And shownCount < 19 Set postItem = postIter.GetNext() shownCount = shownCount + 1 publishedText = "" If IsDate(postItem.PublishedDate) Then If CDate(postItem.PublishedDate) > #1/1/1970# Then publishedText = FormatDateTime(postItem.PublishedDate, vbLongDate) End If End If readTimeText = EstimateReadTime(postItem.Body) cardImage = ExtractFirstImageSrc(postItem.Body) articleLabel = "Issue " & CStr(shownCount + 1) %>
<% If Len(cardImage) > 0 Then %> <% End If %>
<%= H(articleLabel) %>

<%= H(postItem.Title) %>

<%= H(postItem.Summary) %>

<% Loop %> <% End If %>