sheet.xsl: various cosmetic improvements

master
pictuga 2020-04-15 23:22:45 +02:00
parent 4a2ea1bce9
commit 663212de0a
1 changed files with 16 additions and 7 deletions

View File

@ -11,7 +11,6 @@
<xsl:output method="html"/> <xsl:output method="html"/>
<xsl:template match="/"> <xsl:template match="/">
<!DOCTYPE html>
<html> <html>
<head> <head>
<title>RSS feed by morss</title> <title>RSS feed by morss</title>
@ -35,14 +34,24 @@
.item { .item {
background-color: #FFFAF4; background-color: #FFFAF4;
border: 1px solid silver; border: 1px solid silver;
padding: 1%;
margin: 1%; margin: 1%;
max-width: 100%; max-width: 100%;
} }
.item > a { .item > * {
padding: 1%;
}
.item > :not(:last-child) {
border-bottom: 1px solid silver; border-bottom: 1px solid silver;
} }
.item > a {
display: block;
font-weight: bold;
font-size: 1.5em;
}
</style> </style>
</head> </head>
@ -74,11 +83,11 @@
</a> </a>
<div class="desc"> <div class="desc">
<xsl:value-of select="rssfake:description|description|atom:summary|atom03:summary"/> <xsl:copy-of select="rssfake:description|description|atom:summary|atom03:summary"/>
</div> </div>
<div class="content"> <div class="content">
<xsl:value-of select="content:encoded|atom:content|atom03:content"/> <xsl:copy-of select="content:encoded|atom:content|atom03:content"/>
</div> </div>
</div> </div>
</xsl:for-each> </xsl:for-each>
@ -88,8 +97,8 @@
document.getElementById("url").innerHTML = window.location.href.replace(':html/', '') document.getElementById("url").innerHTML = window.location.href.replace(':html/', '')
if (!/:html/.test(window.location.href)) if (!/:html/.test(window.location.href))
for (var content of document.getElementsByClassName("content")) for (var content of document.querySelectorAll(".desc,.content"))
content.innerHTML = content.innerText content.innerHTML = content.children.children ? content.innerHTML : content.innerText
</script> </script>
</body> </body>
</html> </html>