Commit 23867d8ca5
Verified · cmc
Layout: unified · split
theme/static/feed.xsl deleted −114
| @@ -1,114 +0,0 @@ | ||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | |
| 2 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" version="1.0" exclude-result-prefixes="atom dc"> | |
| 3 | <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/> | |
| 4 | <xsl:template match="/"> | |
| 5 | <html lang="en"> | |
| 6 | <head> | |
| 7 | <meta charset="UTF-8"/> | |
| 8 | <meta name="viewport" content="width=device-width, initial-scale=1.0"/> | |
| 9 | <title>rss - <xsl:value-of select="/rss/channel/title"/></title> | |
| 10 | <style> | |
| 11 | :root { | |
| 12 | color-scheme: light dark; | |
| 13 | --bg: #F6F4F0; | |
| 14 | --bg-soft: #EDEAE4; | |
| 15 | --fg: #111111; | |
| 16 | --fg-soft: #555550; | |
| 17 | --accent: #c0392b; | |
| 18 | --border: #111111; | |
| 19 | --meta: #555550; | |
| 20 | --code-bg: #E8E4DE; | |
| 21 | --max-width: 800px; | |
| 22 | } | |
| 23 | @media (prefers-color-scheme: dark) { | |
| 24 | :root { | |
| 25 | --bg: #161412; | |
| 26 | --bg-soft: #1F1C1A; | |
| 27 | --fg: #F0EDE8; | |
| 28 | --fg-soft: #888580; | |
| 29 | --accent: #ee6f5c; | |
| 30 | --border: #2C2825; | |
| 31 | --meta: #888580; | |
| 32 | --code-bg: #0F0D0C; | |
| 33 | } | |
| 34 | } | |
| 35 | * { box-sizing: border-box; } | |
| 36 | body { | |
| 37 | background: var(--bg); | |
| 38 | color: var(--fg); | |
| 39 | font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace; | |
| 40 | line-height: 1.6; | |
| 41 | max-width: var(--max-width); | |
| 42 | margin: 0 auto; | |
| 43 | padding: 2rem 1rem; | |
| 44 | } | |
| 45 | nav ul { list-style: none; padding: 0; display: flex; gap: 1rem; border-bottom: 4px solid var(--fg); padding-bottom: 0.5rem; margin-bottom: 2rem; } | |
| 46 | nav a { text-transform: uppercase; font-weight: 900; text-decoration: none; color: var(--fg); } | |
| 47 | nav a:hover { background: var(--fg); color: var(--bg); } | |
| 48 | h1 { font-size: 2.2rem; font-weight: 900; text-transform: uppercase; line-height: 1.1; margin-bottom: 0.5rem; } | |
| 49 | h2 { border-left: 10px solid var(--accent); padding-left: 0.75rem; font-weight: 900; text-transform: uppercase; line-height: 1.1; margin-top: 0; margin-bottom: 0.25rem; font-size: 1rem; } | |
| 50 | h2 a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; } | |
| 51 | h2 a:hover { background: var(--accent); color: var(--bg); text-decoration: none; } | |
| 52 | .description { color: var(--fg-soft); font-size: 0.85rem; margin-bottom: 2rem; } | |
| 53 | .notice { | |
| 54 | background: var(--bg-soft); | |
| 55 | border: 1px solid var(--border); | |
| 56 | padding: 0.75rem 1rem; | |
| 57 | font-size: 0.85rem; | |
| 58 | margin-bottom: 2rem; | |
| 59 | } | |
| 60 | .notice code { | |
| 61 | background: var(--code-bg); | |
| 62 | padding: 0.1rem 0.3rem; | |
| 63 | font-size: 0.85rem; | |
| 64 | } | |
| 65 | .post { border-bottom: 1px dashed var(--border); padding: 1rem 0; } | |
| 66 | .post:last-child { border-bottom: none; } | |
| 67 | time { font-size: 0.8rem; color: var(--meta); display: block; margin-bottom: 0.25rem; } | |
| 68 | footer { margin-top: 4rem; border-top: 1px solid var(--border); padding-top: 1rem; font-size: 0.8rem; text-transform: uppercase; color: var(--meta); } | |
| 69 | </style> | |
| 70 | </head> | |
| 71 | <body> | |
| 72 | <nav> | |
| 73 | <ul> | |
| 74 | <li> | |
| 75 | <a href="/">Home</a> | |
| 76 | </li> | |
| 77 | <li> | |
| 78 | <a href="/blog">Blog</a> | |
| 79 | </li> | |
| 80 | <li> | |
| 81 | <a href="/garden">Garden</a> | |
| 82 | </li> | |
| 83 | </ul> | |
| 84 | </nav> | |
| 85 | <h1> | |
| 86 | <xsl:value-of select="/rss/channel/title"/> | |
| 87 | </h1> | |
| 88 | <p class="description"> | |
| 89 | <xsl:value-of select="/rss/channel/description"/> | |
| 90 | </p> | |
| 91 | <div class="notice"> | |
| 92 | This is an RSS feed. Copy <code><xsl:value-of select="/rss/channel/atom:link/@href"/></code> into your feed reader to subscribe. | |
| 93 | </div> | |
| 94 | <xsl:for-each select="/rss/channel/item"> | |
| 95 | <div class="post"> | |
| 96 | <time> | |
| 97 | <xsl:value-of select="pubDate"/> | |
| 98 | </time> | |
| 99 | <h2> | |
| 100 | <a> | |
| 101 | <xsl:attribute name="href"> | |
| 102 | <xsl:value-of select="link"/> | |
| 103 | </xsl:attribute> | |
| 104 | <xsl:value-of select="title"/> | |
| 105 | </a> | |
| 106 | </h2> | |
| 107 | </div> | |
| 108 | </xsl:for-each> | |
| 109 | <footer><xsl:value-of select="/rss/channel/title"/> — RSS 2.0 | |
| 110 | </footer> | |
| 111 | </body> | |
| 112 | </html> | |
| 113 | </xsl:template> | |
| 114 | </xsl:stylesheet> | |
theme/templates/feed.xml −1
| @@ -1,5 +1,4 @@ | ||
| 1 | 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <?xml-stylesheet href="/feed.xsl" type="text/xsl"?> | |
| 3 | 2 | <rss version="2.0" |
| 4 | 3 | xmlns:content="http://purl.org/rss/1.0/modules/content/" |
| 5 | 4 | xmlns:wfw="http://wellformedweb.org/CommentAPI/" |