Repository navigation
Conversation
Introduce Horizon, Alpenglow, and Dispatch as modern Roller themes with responsive layouts and automatic color-scheme support. Add theme discovery coverage for all three.
Expand the compact theme templates into readable, consistently indented HTML and Velocity control flow.
Expand the three theme stylesheets for review and use the same neutral test-blog fixtures as Roller’s existing theme previews.
Set the create-weblog form's default theme explicitly so adding an alphabetically earlier shared theme does not change existing setup behavior.
snoopdave
left a comment
There was a problem hiding this comment.
Thanks for these themes. Three template bugs found by rendering the templates with Velocity 2.4 (the version Roller uses); details inline. Also, CI on this PR predates the current workflow (no JDK 25 or CodeQL); merging current master would re-run it.
| @@ -0,0 +1,28 @@ | |||
| #foreach($entry in $entries) | |||
| <article class="story"> | |||
| <div class="story-index" aria-hidden="true">$velocityCount</div> | |||
There was a problem hiding this comment.
Velocity 2 removed $velocityCount, and Roller's velocity.properties doesn't enable the old name, so this prints the literal text $velocityCount on every entry. Rendered with Velocity 2.4: #foreach($x in $l)$velocityCount#end gives $velocityCount$velocityCount. Use $foreach.count (as gaurav and frontpage use $foreach.index).
There was a problem hiding this comment.
Fixed. It uses $foreach.count now.
| @@ -0,0 +1,30 @@ | |||
| #foreach($entry in $entries) | |||
| <article class="dispatch"> | |||
| <div class="dispatch-number">#if($velocityCount<10)0#end$velocityCount</div> | |||
There was a problem hiding this comment.
Velocity 2 removed $velocityCount, and Roller's velocity.properties doesn't enable the old name, so this prints the literal text $velocityCount on every entry. Rendered with Velocity 2.4: #foreach($x in $l)$velocityCount#end gives $velocityCount$velocityCount. Use $foreach.count (as gaurav and frontpage use $foreach.index).
Here: #if($foreach.count<10)0#end$foreach.count.
There was a problem hiding this comment.
Fixed with #if($foreach.count < 10)0#end$foreach.count, so entries show 01, 02, and so on.
| <footer class="site-footer"> | ||
| <p> | ||
| <strong>$model.weblog.name</strong> | ||
| — #if($model.weblog.tagline)$model.weblog.tagline#elseField notes from a life in motion.#end |
There was a problem hiding this comment.
Velocity reads #elseField as one unknown directive, not #else + text. With a tagline this prints My tagline#elseField notes from a life in motion.; without one, the fallback never shows. Use #{else}Field notes from a life in motion. (Horizon's footer works because it has a space after #else).
There was a problem hiding this comment.
Good catch. The fallback text was hard-coded persona copy, so I removed it instead of switching to #{else}. The footer now shows the tagline only when the weblog has one.
| <main id="content" class="article-shell"> | ||
| <header class="page-heading"> | ||
| <p class="eyebrow">Topic</p> | ||
| <h1>$model.tags</h1> |
There was a problem hiding this comment.
$model.tags is a List<String>, so this renders with list brackets, e.g. [java] or [java, roller]. Same on line 5 (<title>). Suggest joining the tags with a #foreach.
There was a problem hiding this comment.
Fixed here and in the <title> on line 5. The tags are joined with a #foreach, so a multi-tag page reads java, roller.
| <main id="content" class="reading-shell"> | ||
| <header class="page-title"> | ||
| <p class="kicker">Stories filed under</p> | ||
| <h1>$model.tags</h1> |
There was a problem hiding this comment.
$model.tags is a List<String>, so this renders with list brackets, e.g. [java] or [java, roller]. Same on line 5 (<title>). Suggest joining the tags with a #foreach.
There was a problem hiding this comment.
Fixed here and in the <title>, the same way as Horizon.
| <main id="content" class="reading-shell"> | ||
| <header class="page-title"> | ||
| <p class="label">FILTER / TAG</p> | ||
| <h1>$model.tags</h1> |
There was a problem hiding this comment.
$model.tags is a List<String>, so this renders with list brackets, e.g. [java] or [java, roller]. Same on line 5 (<title>). Suggest joining the tags with a #foreach.
There was a problem hiding this comment.
Fixed here and in the <title>, the same way as Horizon.
…w themes Velocity 2 removed $velocityCount, so Alpenglow and Dispatch printed the literal text on every entry; they now use $foreach.count. Alpenglow's footer used #elseField, which Velocity reads as an unknown directive, so it now shows the tagline only when one is set. The tag pages joined $model.tags as a Java list, which rendered as [java, roller] in the heading and title; they now list the tags separated by commas.
Alpenglow, Dispatch, and Horizon shipped with hard-coded copy written for one blog, so every weblog using them showed the same headline, founding year, and about text. The hero headings now show the weblog name, Dispatch derives its founding year from the weblog's creation date, and the about and tagline sections are omitted when those fields are empty. Long weblog names now wrap in the Alpenglow and Dispatch headlines instead of overflowing on narrow screens.
|
Thanks for the review. I merged current master, so CI now runs on JDK 25 with CodeQL. I also took two items from the UI audit you attached to #156:
I rendered the changed templates with Velocity 2.4.1, with the tagline and about fields both set and empty, and the full test suite passes. |
Adds three modern, production-ready Roller themes:
Each theme includes responsive weblog, permalink, search, tag, archive, and sidebar templates. They automatically follow the visitor’s light or dark color-scheme preference, avoid external runtime dependencies, and include an SVG preview for Roller’s theme selector.
Theme discovery coverage verifies that all three themes and their stylesheets load through ThemeManager. The create-weblog flow also keeps Basic as its explicit default so adding an alphabetically earlier theme does not change existing setup behavior.
The previews below are the same production
preview.svgassets included in this pull request. They use Roller’s established neutral test-blog fixture content.Horizon
Alpenglow
Dispatch
Tested with:
mvn -pl app -Dtest=ThemeManagerTest testmvn -pl app -DskipTests packagemvn -V -ntp install -DskipTestscd it-selenium && mvn -V -ntp installgit diff --check