ASP Classic blog framework - BrainOrdure
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

63 lignes
1.9KB

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

Powered by TurnKey Linux.