Compare commits
2 Commits
4a2ea1bce9
...
7375adce33
Author | SHA1 | Date |
---|---|---|
pictuga | 7375adce33 | |
pictuga | 663212de0a |
|
@ -52,8 +52,9 @@ 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', rules[section][arg][5:]),
|
paths = [os.path.join(sys.prefix, 'share/morss/www', rules[section][arg][5:]),
|
||||||
os.path.join(os.path.dirname(__file__), '..', 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:])]
|
||||||
|
|
||||||
for path in paths:
|
for path in paths:
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -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,28 @@
|
||||||
.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content * {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -74,11 +87,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 +101,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>
|
||||||
|
|
Loading…
Reference in New Issue