From 5281b43977a830923fd98e19ff50ff125bcbadf1 Mon Sep 17 00:00:00 2001 From: nano Date: Mon, 4 May 2026 19:02:02 +0000 Subject: [PATCH] Improve BrainOrdure editorial UI --- app/views/Home/index.asp | 206 +++++++++++++++++---------------------- 1 file changed, 92 insertions(+), 114 deletions(-) diff --git a/app/views/Home/index.asp b/app/views/Home/index.asp index deb27ae..8fdc193 100644 --- a/app/views/Home/index.asp +++ b/app/views/Home/index.asp @@ -1,153 +1,131 @@ <% -Dim featuredPost, homePostIter, homePostItem, homeRecentCount -homeRecentCount = 0 +Dim featuredPost, homePostIter, homePostItem, homeHeroBackground, homePublishedText, homeReadTime, homeCardImage +homeHeroBackground = "" Set homePostIter = posts.Iterator() If posts.Count > 0 Then Set featuredPost = homePostIter.GetNext() + homeHeroBackground = ExtractFirstImageSrc(featuredPost.Body) End If %> -
-
-
-
The magazine
-

BrainOrdure

-

A tidy, opinionated front page for notes, essays, and reader discussion.

- -
- -
-
-
Inside this issue
-

Latest coverage

- <% If posts.Count = 0 Then %> -

No published stories yet.

- <% Else %> - - <% End If %> +
0 Then %> style="background-image: url('<%= H(homeHeroBackground) %>')"<% End If %>> +
+
+
+
+
+

BrainOrdure

+ A cleaner front page for essays, notes, and reader discussion. +
-
+ -
+
-
-
-
Featured story
-

From the editor's desk

-
-
- <% If posts.Count = 0 Then %>
No published posts are available yet.
<% Else %> -
-
-
Cover story
-

<%= H(featuredPost.Title) %>

+
+ <% If Len(homeHeroBackground) > 0 Then %> + + <% End If %> +
+
Featured story
+

<%= H(featuredPost.Title) %>

+

<%= H(featuredPost.Summary) %>

<% - Dim featuredPublishedText - featuredPublishedText = "" + homePublishedText = "" If IsDate(featuredPost.PublishedDate) Then If CDate(featuredPost.PublishedDate) > #1/1/1970# Then - featuredPublishedText = FormatDateTime(featuredPost.PublishedDate, vbLongDate) + homePublishedText = FormatDateTime(featuredPost.PublishedDate, vbLongDate) End If End If - If Len(featuredPublishedText) > 0 Then + homeReadTime = EstimateReadTime(featuredPost.Body) %> - - <% - End If - %> -

<%= H(featuredPost.Summary) %>

- Read the feature +
-
+
-
- <% - Dim latestPostIter, latestPostItem, latestIndex - latestIndex = 0 - Set latestPostIter = posts.Iterator() - If latestPostIter.HasNext Then Set latestPostItem = latestPostIter.GetNext() - Do While latestPostIter.HasNext And latestIndex < 4 - Set latestPostItem = latestPostIter.GetNext() - latestIndex = latestIndex + 1 - %> -
- +

Latest stories

+ <% + Dim homePreviewCount + homePreviewCount = 0 + Do While homePostIter.HasNext And homePreviewCount < 4 + Set homePostItem = homePostIter.GetNext() + homePreviewCount = homePreviewCount + 1 + homePublishedText = "" + If IsDate(homePostItem.PublishedDate) Then + If CDate(homePostItem.PublishedDate) > #1/1/1970# Then + homePublishedText = FormatDateTime(homePostItem.PublishedDate, vbLongDate) + End If + End If + homeReadTime = EstimateReadTime(homePostItem.Body) + homeCardImage = ExtractFirstImageSrc(homePostItem.Body) + %> +
+ <% If Len(homeCardImage) > 0 Then %> + + <% End If %> +
+
Issue <%= homePreviewCount + 1 %>
+

<%= H(homePostItem.Title) %>

+

<%= H(homePostItem.Summary) %>

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

Browse the paper

- <% If categories.Count = 0 Then %> -

No categories are available yet.

- <% Else %> -
    - <% +
- <% End If %> + <%= H(homeCategoryItem.Name) %> + <% + Loop + End If + %> +
+
-
-
-
-
Reader note
-

Why it feels different

-

The layout now leans into a front-page magazine structure with a feature story, supporting briefs, and a quieter sidebar for section navigation.

+
+
+
About
+

BrainOrdure is now styled like a modern editorial blog with cleaner reading flow, stronger story hierarchy, and better navigation.

+
-
+