Close the div messages.leaf left open, and drop the masthead logo

Both language versions of messages.leaf carried one closing div too many.
In a one-column layout that was invisible. The body columns are table-cells,
so the stray div ended the centre column early and the sections after it
became siblings of the columns rather than children of one, which put the
right rail in a new table row at the foot of the page.

testEveryTemplateClosesItsDivs counts div pairs across both language
directories. The existing balance test only counts Leaf directives, which is
why this reached a browser.

The mark is out of the channel masthead: FlameNet above the channel name
carries the relationship on its own, and the icon beside 27px type read as
a second logo competing with the portal's.

Verified on a local instance: /messages lays out 150/830/300 on one row with
no sideways overflow, and all 21 public page tests pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Paul Hitt
2026-09-12 11:55:09 -04:00
co-authored by Claude Opus 5
parent 89ed78f403
commit fb2ba4dd12
5 changed files with 30 additions and 7 deletions
-2
View File
@@ -108,8 +108,6 @@ a.ch-brand:hover { opacity: 1; color: #FFFFFF; text-decoration: underline; }
text-shadow: 0 1px 2px rgba(0,0,0,0.45);
}
.ch-mark { vertical-align: -5px; margin-right: 5px; }
/* The search box in the masthead searches flamenet.io, because the messenger
has nothing to search and the portal does. */
.channel-search {
-1
View File
@@ -196,7 +196,6 @@
</p>
</article>
</div>
</div>
</div>
</section>
+1 -3
View File
@@ -69,9 +69,7 @@
<div id="channel-masthead">
<div class="channel-title">
<a class="ch-brand" href="https://flamenet.io/" title="#(chrome.portalHome)">FlameNet</a>
<span class="ch-name">
<img class="ch-mark" src="/brand/mark-128.png?v=#(assetVersion)" alt="" aria-hidden="true"
width="26" height="26">#(chrome.channel)</span>
<span class="ch-name">#(chrome.channel)</span>
</div>
<!-- Searches flamenet.io. The messenger has nothing to search and the
portal does. -->
-1
View File
@@ -186,7 +186,6 @@
</p>
</article>
</div>
</div>
</div>
</section>
@@ -59,6 +59,35 @@ final class PublicPagesTests: XCTestCase {
}
}
/// Every template closes as many divs as it opens, in both languages.
///
/// The body columns are table-cells. A template with one closing div too
/// many ends the centre column early, and the sections after it become
/// siblings of the columns rather than children of one, which puts the
/// right rail in a new table row at the foot of the page. messages.leaf
/// carried a duplicate closing div that was invisible in a one-column
/// layout and broke both language versions in this one.
func testEveryTemplateClosesItsDivs() throws {
var checked = 0
for directory in [views, views.appendingPathComponent("es")] {
let names = try FileManager.default
.contentsOfDirectory(atPath: directory.path)
.filter { $0.hasSuffix(".leaf") }
for name in names {
let body = try String(
contentsOf: directory.appendingPathComponent(name), encoding: .utf8)
let opens = body.components(separatedBy: "<div").count - 1
let closes = body.components(separatedBy: "</div>").count - 1
checked += 1
XCTAssertEqual(
opens, closes,
"\(name): \(opens) <div against \(closes) </div>, which moves the "
+ "right rail to the foot of the page")
}
}
XCTAssertGreaterThan(checked, 30, "the div check found almost nothing to check")
}
/// Every internal link in the layout must go somewhere that exists.
func testTheSitemapIsBuiltFromThePageTable() throws {
let source = try String(