Skip to content
Browse files

Cosmetics

 * Add HTML5 DOCTYPE (addsearch.xslt)
 * Omit empty lists (index.html.xslt)
 * Handle missing cookie (personalize.js)
  • Loading branch information...
1 parent c7bc970 commit 3980dd138757579299dc31e3aa8248001576637d @rubys committed
Showing with 10 additions and 1 deletion.
  1. +8 −0 filters/addsearch.xslt
  2. +1 −1 themes/asf/index.html.xslt
  3. +1 −0 themes/asf/personalize.js
View
8 filters/addsearch.xslt
@@ -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
2 themes/asf/index.html.xslt
@@ -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
1 themes/asf/personalize.js
@@ -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];

0 comments on commit 3980dd1

Please sign in to comment.
Something went wrong with that request. Please try again.