ASP Classic blog framework - BrainOrdure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.9KB

  1. <div class="d-flex align-items-center justify-content-between mb-4">
  2. <div>
  3. <div class="eyebrow mb-2">Latest issue</div>
  4. <h1 class="page-title h3 mb-1">Posts</h1>
  5. <p class="text-muted mb-0">Published articles from ASPBlogBrainOrdure.</p>
  6. </div>
  7. <a class="btn btn-primary" href="<%= PostNewUrl() %>">New Post</a>
  8. </div>
  9. <%
  10. Dim postIter, postItem, shownCount
  11. Set postIter = posts.Iterator()
  12. shownCount = 0
  13. If posts.Count = 0 Then
  14. %>
  15. <div class="alert alert-secondary">No published posts are available yet.</div>
  16. <%
  17. Else
  18. %>
  19. <div class="row gy-3 magazine-list">
  20. <%
  21. Do While postIter.HasNext And shownCount < 20
  22. Set postItem = postIter.GetNext()
  23. shownCount = shownCount + 1
  24. %>
  25. <div class="col-12">
  26. <article class="card shadow-sm">
  27. <div class="card-body">
  28. <div class="d-flex flex-column flex-md-row justify-content-between gap-2 mb-2">
  29. <h2 class="h4 mb-1">
  30. <a href="<%= PostUrl(postItem.Slug) %>" class="text-decoration-none">
  31. <%= H(postItem.Title) %>
  32. </a>
  33. </h2>
  34. <%
  35. Dim publishedText
  36. publishedText = ""
  37. If IsDate(postItem.PublishedDate) Then
  38. If CDate(postItem.PublishedDate) > #1/1/1970# Then
  39. publishedText = FormatDateTime(postItem.PublishedDate, vbLongDate)
  40. End If
  41. End If
  42. If Len(publishedText) > 0 Then
  43. %>
  44. <span class="small text-muted"><%= H(publishedText) %></span>
  45. <%
  46. End If
  47. %>
  48. </div>
  49. <p class="text-muted mb-3 prose"><%= H(postItem.Summary) %></p>
  50. <a class="btn btn-sm btn-outline-primary" href="<%= PostUrl(postItem.Slug) %>">Read</a>
  51. </div>
  52. </article>
  53. </div>
  54. <%
  55. Loop
  56. %>
  57. </div>
  58. <%
  59. End If
  60. %>

Powered by TurnKey Linux.