|
- <div class="d-flex align-items-center justify-content-between mb-4">
- <div>
- <h1 class="h3 mb-1">Posts</h1>
- <p class="text-muted mb-0">Published articles from ASPBlogBrainOrdure.</p>
- </div>
- <a class="btn btn-primary" href="/posts/new">New Post</a>
- </div>
-
- <%
- Dim postIter, postItem, shownCount
- Set postIter = posts.Iterator()
- shownCount = 0
-
- If posts.Count = 0 Then
- %>
- <div class="alert alert-secondary">No published posts are available yet.</div>
- <%
- Else
- %>
- <div class="row gy-3">
- <%
- Do While postIter.HasNext And shownCount < 20
- Set postItem = postIter.GetNext()
- shownCount = shownCount + 1
- %>
- <div class="col-12">
- <article class="card shadow-sm">
- <div class="card-body">
- <div class="d-flex flex-column flex-md-row justify-content-between gap-2">
- <h2 class="h5 mb-1">
- <a href="/posts/<%= Server.URLEncode(CStr(postItem.Slug)) %>" class="text-decoration-none">
- <%= H(postItem.Title) %>
- </a>
- </h2>
- <%
- 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
- %>
- <span class="small text-muted"><%= H(publishedText) %></span>
- <%
- End If
- %>
- </div>
- <p class="text-muted mb-3"><%= H(postItem.Summary) %></p>
- <a class="btn btn-sm btn-outline-primary" href="/posts/<%= Server.URLEncode(CStr(postItem.Slug)) %>">Read</a>
- </div>
- </article>
- </div>
- <%
- Loop
- %>
- </div>
- <%
- End If
- %>
|