Compare commits

..

No commits in common. "7375adce335bdb8ccb6e47a1d19748e5f29ce0e1" and "4a2ea1bce99aded0abc15be9f62b95e073a39e1c" have entirely different histories.

2 changed files with 9 additions and 23 deletions

View File

@ -52,9 +52,8 @@ def parse_rules(filename=None):
# for each rule # for each rule
if rules[section][arg].startswith('file:'): if rules[section][arg].startswith('file:'):
paths = [os.path.join(sys.prefix, 'share/morss/www', rules[section][arg][5:]), paths = [os.path.join(sys.prefix, 'share/morss', rules[section][arg][5:]),
os.path.join(os.path.dirname(__file__), '../www', rules[section][arg][5:]), os.path.join(os.path.dirname(__file__), '..', rules[section][arg][5:])]
os.path.join(os.path.dirname(__file__), '../..', rules[section][arg][5:])]
for path in paths: for path in paths:
try: try:

View File

@ -11,6 +11,7 @@
<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>
@ -34,27 +35,13 @@
.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 > * {
padding: 1%;
}
.item > :not(:last-child) {
border-bottom: 1px solid silver;
}
.item > a { .item > a {
border-bottom: 1px solid silver;
display: block;
font-weight: bold;
font-size: 1.5em;
}
.content * {
max-width: 100%;
} }
</style> </style>
</head> </head>
@ -87,11 +74,11 @@
</a> </a>
<div class="desc"> <div class="desc">
<xsl:copy-of select="rssfake:description|description|atom:summary|atom03:summary"/> <xsl:value-of select="rssfake:description|description|atom:summary|atom03:summary"/>
</div> </div>
<div class="content"> <div class="content">
<xsl:copy-of select="content:encoded|atom:content|atom03:content"/> <xsl:value-of select="content:encoded|atom:content|atom03:content"/>
</div> </div>
</div> </div>
</xsl:for-each> </xsl:for-each>
@ -101,8 +88,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.querySelectorAll(".desc,.content")) for (var content of document.getElementsByClassName("content"))
content.innerHTML = content.children.children ? content.innerHTML : content.innerText content.innerHTML = content.innerText
</script> </script>
</body> </body>
</html> </html>