Cosmetics

* Add HTML5 DOCTYPE (addsearch.xslt)
 * Omit empty lists (index.html.xslt)
 * Handle missing cookie (personalize.js)
This commit is contained in:
Sam Ruby 2007-04-28 08:03:49 -04:00
parent c7bc9702d8
commit 3980dd1387
3 changed files with 10 additions and 1 deletions

View File

@ -52,6 +52,14 @@
</xsl:copy>
</xsl:template>
<!-- add HTML5 doctype -->
<xsl:template match="/xhtml:html">
<xsl:text disable-output-escaping="yes">&lt;!DOCTYPE html&gt;</xsl:text>
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<!-- pass through everything else -->
<xsl:template match="@*|node()">
<xsl:copy>

View File

@ -131,7 +131,7 @@
<xsl:value-of select="planet:name"/>
</a>
<xsl:if test="$posts">
<xsl:if test="$posts[string-length(atom:title) &gt; 0]">
<ul>
<xsl:for-each select="$posts">
<xsl:if test="string-length(atom:title) &gt; 0">

View File

@ -71,6 +71,7 @@ function createCookie(name,value,days) {
// read a cookie
function readCookie(name) {
var nameEQ = name + "=";
if (!document.cookie) return;
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];