Rename project to Rivista;

CSS: Improve position of elements;
JS: Improve handling of content in erroneous cases;
JS: Render post as HTML when XSLT does not render correctly;
JS: Handle posts which were tagged as Text instead of HTML and vice versa;
XSLT: Adapt to be viewed on browsers with a lack of support;
XSLT: Add Support for link elements of attribute "rel";
Python: Add elements author and link of attribute "rel".
This commit is contained in:
Schimon Jehudah, Adv. 2024-07-13 22:16:25 +03:00
parent 040d532fb9
commit cb4507bb78
8 changed files with 510 additions and 322 deletions

View file

@ -10,9 +10,6 @@ element <meta/> inside of html element </head>
<xsl:stylesheet version='1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
xmlns:xml='http://www.w3.org/XML/1998/namespace'>
<!-- Outline Processor Markup Language 1.0 -->
<xsl:output
media-type='text/x-opml' />
<xsl:template match='/opml'>
<!-- index right-to-left language codes -->
<!-- TODO http://www.w3.org/TR/xpath/#function-lang -->
@ -33,7 +30,7 @@ xmlns:xml='http://www.w3.org/XML/1998/namespace'>
</xsl:call-template>
<xsl:call-template name='metadata'>
<xsl:with-param name='name' select='"generator"' />
<xsl:with-param name='content' select='StreamBurner' />
<xsl:with-param name='content' select='Rivista' />
</xsl:call-template>
<xsl:call-template name='metadata'>
<xsl:with-param name='name' select='"mimetype"' />
@ -41,10 +38,10 @@ xmlns:xml='http://www.w3.org/XML/1998/namespace'>
</xsl:call-template>
<title>
<xsl:choose>
<xsl:when test='title and not(title="")'>
<xsl:value-of select='title'/>
<xsl:when test='//head/title and not(//head/title="")'>
<xsl:value-of select='//head/title'/>
</xsl:when>
<xsl:otherwise>StreamBurner</xsl:otherwise>
<xsl:otherwise>Rivista OPML</xsl:otherwise>
</xsl:choose>
</title>
<!-- TODO media='print' -->
@ -54,20 +51,9 @@ xmlns:xml='http://www.w3.org/XML/1998/namespace'>
<xsl:if test='$rtl'>
<link id='semitic' href='/css/stylesheet-rtl.css' rel='stylesheet' type='text/css' />
</xsl:if>
<script type='text/javascript' src='/script/marked.min.js'/>
<script type='text/javascript' src='/script/postprocess.js'/>
</head>
<body>
<div id='actions'>
<a href='https://git.xmpp-it.net/sch/PubSubToAtom'
title='About PubSub To Atom.'>
About
</a>
<a href='https://aboutfeeds.com/'
title='Of the benefits of syndication feed.'
id='aboutfeeds'>
Feeds
</a>
<a href='https://xmpp.org/about/technology-overview/'
title='Of the benefits of XMPP.'>
XMPP
@ -76,6 +62,11 @@ xmlns:xml='http://www.w3.org/XML/1998/namespace'>
title='Syndictaion and PubSub.'>
Groupchat
</a>
<a href='https://aboutfeeds.com/'
title='Of the benefits of syndication feed.'
id='aboutfeeds'>
Help
</a>
</div>
<div id='feed'>
<div id='header'>
@ -85,11 +76,8 @@ xmlns:xml='http://www.w3.org/XML/1998/namespace'>
<xsl:when test='//head/title and not(//head/title="") and count(//outline) &gt; 1'>
<xsl:value-of select='//head/title'/>
</xsl:when>
<xsl:when test='//outline'>
<xsl:value-of select='//outline/@text'/>
</xsl:when>
<xsl:otherwise>
StreamBurner OPML Feed
Rivista OPML Collection
</xsl:otherwise>
</xsl:choose>
</h1>
@ -109,12 +97,12 @@ xmlns:xml='http://www.w3.org/XML/1998/namespace'>
<div id='menu'>
<h3>Subscriptions</h3>
<!-- xsl:for-each select='outline[position() &lt;21]' -->
<ul>
<ol>
<xsl:for-each select='//outline[not(position() &gt; 20)]'>
<li>
<xsl:element name='a'>
<xsl:attribute name='href'>
<xsl:text>#stremburner-</xsl:text>
<xsl:text>#rivista-</xsl:text>
<xsl:value-of select='position()'/>
</xsl:attribute>
<xsl:choose>
@ -128,7 +116,7 @@ xmlns:xml='http://www.w3.org/XML/1998/namespace'>
</xsl:element>
</li>
</xsl:for-each>
</ul>
</ol>
</div>
</xsl:if>
<div id='articles'>
@ -149,7 +137,7 @@ xmlns:xml='http://www.w3.org/XML/1998/namespace'>
<xsl:value-of select='@text'/>
</xsl:attribute>
<xsl:attribute name='id'>
<xsl:text>stremburner-</xsl:text>
<xsl:text>rivista-</xsl:text>
<xsl:value-of select='position()'/>
</xsl:attribute>
<xsl:choose>
@ -193,8 +181,16 @@ xmlns:xml='http://www.w3.org/XML/1998/namespace'>
title='The Social Platform Shaped For Your Community.'>
Movim
</a>
<a href='https://git.xmpp-it.net/sch/Rivista'
title='A Journal Publisher And Browser For XMPP.'>
Rivista
</a>
<a href='https://github.com/SeveFP/Reeder'
Title='An XMPP-Based Feed Reader.'>
Reeder
</a>
<a href='https://modernxmpp.org/'
title='A Project To Improve The Quality Of User-To-User Messaging Applications That Use Xmpp.'>
title='A Project To Improve The Quality Of User-To-User Messaging Applications That Use XMPP.'>
Modern
</a>
<a href='https://xmpp.org/'
@ -209,15 +205,16 @@ xmlns:xml='http://www.w3.org/XML/1998/namespace'>
<!-- note -->
<p id='note'>
<i>
This is an
<b title ='Outline Processor Markup Language'>OPML</b>
document which is conveyed as an XHTML document; This
document includes a list of subscriptionsis and is
intended to be imported to a syndication feed reader
which provides automated notifications on desktop and
mobile. <span id="selection-link">Click here</span> for
a selection of software and pick the ones that would fit
you best!
This is an OPML document which is conveyed as an XHTML
document;
This document includes a collection of subscriptions,
and it can be imported to a Syndication Feed Reader
(also referred to as News Reader or RSS Reader) reader
which provides automated news updates and notifications
on desktop and mobile.
<span id="selection-link">Click here</span> for a
selection of software and pick the ones that would fit
to you best!
</i>
</p>
</body>