From a5be1fe5586c143085598a0e8a7eb999fa6a55ff Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Mon, 14 Nov 2011 00:45:07 +0100 Subject: Very slight restyle of the cut link for long entries. --- org/madore/damlengine/TodoCutHere.java | 10 ++++++---- org/madore/damlengine/included.css | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/org/madore/damlengine/TodoCutHere.java b/org/madore/damlengine/TodoCutHere.java index a28eb9f..e935c4e 100644 --- a/org/madore/damlengine/TodoCutHere.java +++ b/org/madore/damlengine/TodoCutHere.java @@ -37,15 +37,17 @@ public final class TodoCutHere extends TodoDefaultElement { div.appendChild(ctx.doc.createComment(" EMPTY ")); node.getParentNode().replaceChild(div, node); } else { + Element p = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "p"); Element a = ctx.doc.createElementNS(DamlEngine.XHTML_NS, "a"); + p.appendChild(a); a.setAttributeNS(null, "href", ((ctx.gc.uriToTop==null)?"":(ctx.gc.uriToTop+"weblog/")) + ctx.ent.date + "-" + ctx.ent.doSinglePage + ".html" + "#d." + ctx.ent.date + "." + ctx.ent.number + ".CUT"); if ( explicitLang != null ) - LangHelper.setLangNorec(a, explicitLang); - a.setAttributeNS(null, "class", "cut-link"); + LangHelper.setLangNorec(p, explicitLang); + p.setAttributeNS(null, "class", "cut-link"); if ( lang.equals("en") ) a.appendChild(ctx.doc.createTextNode("[Continue reading\u2026]")); else if ( lang.equals("fr") ) @@ -56,8 +58,8 @@ public final class TodoCutHere extends TodoDefaultElement { a.appendChild(ctx.doc.createTextNode("[Leger ultra\u2026]")); else a.appendChild(ctx.doc.createTextNode("[\u2026]")); - node.getParentNode().replaceChild(a, node); - Node killPoint = a; + node.getParentNode().replaceChild(p, node); + Node killPoint = p; while ( ! killPoint.isSameNode(ctx.ent.mainDivNode) ) { Node parent = killPoint.getParentNode(); while ( killPoint.getNextSibling() != null ) diff --git a/org/madore/damlengine/included.css b/org/madore/damlengine/included.css index 3b7b01e..613ea7d 100644 --- a/org/madore/damlengine/included.css +++ b/org/madore/damlengine/included.css @@ -51,6 +51,9 @@ article { display: block; } margin-bottom: 0pt; } .categories-list > a { color: inherit; } +.cut-link { + font-family: Futura, "Avant Garde", Helvetica, Arial, sans-serif; +} .sitemap-note { font-style: italic; color: rgb(96,0,0); -- cgit v1.2.3