M TODO.md => TODO.md +2 -1
@@ 4,4 4,5 @@
# From current implementation
- [X] Translate all remaining texts to spanish
- [X] Change session time to 30 days
-- [ ] Implement Atom Feed>
\ No newline at end of file
+- [ ] Implement Atom Feed
+- [ ] Implement Social cards<
\ No newline at end of file
M public/atom.php => public/atom.php +2 -0
@@ 19,6 19,8 @@ function url($thread)
?>
<?php echo '<?xml version="1.0" encoding="utf-8"?>'; ?>
<?php echo "\n"; ?>
+<?php echo '<?xml-stylesheet href="feed.xsl" type="text/xsl"?>'; ?>
+<?php echo "\n"; ?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><?= NAME ?></title>
A public/feed.xsl => public/feed.xsl +69 -0
@@ 0,0 1,69 @@
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:atom="http://www.w3.org/2005/Atom"
+ exclude-result-prefixes="atom"
+>
+ <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
+ <xsl:template match="/">
+ <html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
+ <title>Web Feed • <xsl:value-of select="atom:feed/atom:title"/></title>
+ <style type="text/css">
+ body{max-width:768px;margin:0 auto;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;line-height:1.5em}section{margin:30px 15px}h1{font-size:2em;margin:.67em 0;line-height:1.125em}h2{border-bottom:1px solid #eaecef;padding-bottom:.3em}.alert{background:#fff5b1;padding:4px 12px;margin:0 -12px}a{text-decoration:none}.entry h3{margin-bottom:0}.entry p{margin:4px 0}
+ </style>
+ </head>
+ <body>
+ <section>
+ <div class="alert">
+ <strong>Subscríbete</strong> pegando esta dirección en tu lector de noticias.
+ </div>
+ </section>
+ <section>
+ <xsl:apply-templates select="atom:feed" />
+ </section>
+ <section>
+ <h2>Elementos recientes</h2>
+ <xsl:apply-templates select="atom:feed/atom:entry" />
+ </section>
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template match="atom:feed">
+
+ <h1>Vista Web del Feed</h1>
+ <p><xsl:value-of select="atom:title"/>
+
+ <a class="head_link" target="_blank">
+ <xsl:attribute name="href">
+ <xsl:value-of select="atom:link[@rel='alternate']/@href"/>
+ </xsl:attribute>
+ Visita el sitio →
+ </a>
+
+ </p>
+ </xsl:template>
+
+ <xsl:template match="atom:entry">
+ <div class="entry">
+ <h3>
+ <a target="_blank">
+ <xsl:attribute name="href">
+ <xsl:value-of select="atom:id"/>
+ </xsl:attribute>
+ <xsl:value-of select="atom:title"/>
+ </a>
+ </h3>
+ <p>
+ <xsl:value-of select="atom:summary" disable-output-escaping="yes" />
+ </p>
+ <small>
+ Published: <xsl:value-of select="atom:updated" />
+ </small>
+ </div>
+ </xsl:template>
+
+</xsl:stylesheet><
\ No newline at end of file
M => +9 -0
@@ 7,6 7,15 @@
<link rel="stylesheet" href="style.css">
<link type="application/rss+xml" rel="alternate" title="RSS" href="feed.php">
<link type="application/atom+xml" rel="alternate" title="Atom" href="atom.php">
<!--
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="<?= NAME ?>">
<meta name="twitter:creator" content="<?= NAME ?>" />
<meta property="og:url" content="" />
<meta property="og:title" content="" />
<meta property="og:description" content="" />
<meta property="og:image" content="" />
-->
</head>
<body>
<header class="main-header">
M public/pretty-feed-v3.xsl => public/pretty-feed-v3.xsl +7 -7
@@ 32,6 32,8 @@ x-content-type-options: nosniff
(These headers are required to style feeds for users with Safari on iOS/Mac.)
+
+
## Limitations
- Styling the feed *prevents* the browser from automatically opening a
@@ 77,11 79,8 @@ This file is in BETA. Please test and contribute to the discussion:
</head>
<body class="bg-white">
<nav class="container-md px-3 py-2 mt-2 mt-md-5 mb-5 markdown-body">
- <p class="bg-yellow-light ml-n1 px-1 py-1 mb-1">
- Te damos la bienvenida al feed RSS/Atom del <strong>Pensadero.</strong>
- </p>
<p class="text-gray">
- <strong>Subscríbete</strong> copiando esta URL en tu lector de noticias.
+ <strong>Subscríbete</strong> pegando esta dirección en tu lector de noticias.
</p>
</nav>
<div class="container-md px-3 py-3 markdown-body">
@@ 104,10 103,11 @@ This file is in BETA. Please test and contribute to the discussion:
<path d="M160 213h-34a82 82 0 0 0 -82 -82v-34a116 116 0 0 1 116 116z" fill="#FFF"/>
<path d="M184 213A140 140 0 0 0 44 73 V 38a175 175 0 0 1 175 175z" fill="#FFF"/>
</svg>
- Vista previa del Feed
+
+ Vista Web del RSS
</h1>
<h2><xsl:value-of select="/rss/channel/title"/></h2>
- <p><xsl:value-of select="/rss/channel/description"/></p>
+
<a class="head_link" target="_blank">
<xsl:attribute name="href">
<xsl:value-of select="/rss/channel/link"/>
@@ 115,7 115,7 @@ This file is in BETA. Please test and contribute to the discussion:
Visita el sitio →
</a>
</header>
- <h2>Entradas recientes</h2>
+ <h2>Elementos recientes</h2>
<xsl:for-each select="/rss/channel/item">
<div class="pb-5">
<h3 class="mb-0">