diff --git a/app/views/Posts/index.asp b/app/views/Posts/index.asp index ffa8e1a..7097c39 100644 --- a/app/views/Posts/index.asp +++ b/app/views/Posts/index.asp @@ -1,63 +1,96 @@ -
-
-
Latest issue
-

Posts

-

Published articles from ASPBlogBrainOrdure.

+<% +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. +
+
+
- New Post -
- -<% -Dim postIter, postItem, shownCount -Set postIter = posts.Iterator() -shownCount = 0 - -If posts.Count = 0 Then -%> -
No published posts are available yet.
-<% -Else -%> -
- <% - Do While postIter.HasNext And shownCount < 20 - Set postItem = postIter.GetNext() - shownCount = shownCount + 1 - %> -
-
-
-
-

- - <%= H(postItem.Title) %> - -

- <% - Dim publishedText - publishedText = "" - If IsDate(postItem.PublishedDate) Then - If CDate(postItem.PublishedDate) > #1/1/1970# Then - publishedText = FormatDateTime(postItem.PublishedDate, vbLongDate) - End If - End If - - If Len(publishedText) > 0 Then - %> - <%= H(publishedText) %> - <% + + +
+
+
+ New Post +
+ + <% 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) %>

+ -

<%= H(postItem.Summary) %>

- Read
-
- <% - Loop - %> -
-<% -End If -%> + <% + Loop + %> + <% End If %> +
+