Update RSS

This commit is contained in:
MacRimi
2025-05-27 17:55:27 +02:00
parent f2885fc235
commit 555af7d113
3 changed files with 31 additions and 29 deletions

View File

@@ -46,7 +46,7 @@ export default function Navbar() {
{/* RSS Feed Link */}
<Link
href="/api/rss"
href="/rss.xml"
className="flex items-center space-x-2 transition-colors hover:text-primary text-orange-600 hover:text-orange-700"
target="_blank"
rel="noopener noreferrer"
@@ -81,7 +81,7 @@ export default function Navbar() {
{/* RSS Feed Link - Mobile */}
<Link
href="/api/rss"
href="/rss.xml"
className="flex items-center space-x-2 py-2 transition-colors hover:text-primary text-orange-600 hover:text-orange-700"
onClick={() => setIsMenuOpen(false)}
target="_blank"

View File

@@ -6,7 +6,7 @@ import { useState } from "react"
export default function RSSLink() {
const [copied, setCopied] = useState(false)
const rssUrl = `${typeof window !== "undefined" ? window.location.origin : ""}/api/rss`
const rssUrl = `${typeof window !== "undefined" ? window.location.origin : ""}/rss.xml`
const copyToClipboard = async () => {
try {
@@ -20,36 +20,39 @@ export default function RSSLink() {
return (
<div className="mb-8 p-4 bg-orange-50 border border-orange-200 rounded-lg">
<div className="flex items-center justify-between">
<div className="flex-1">
<div className="space-y-3">
<div>
<h3 className="text-lg font-semibold text-orange-900 mb-1">Stay Updated!</h3>
<p className="text-orange-700 text-sm mb-3">
Subscribe to our RSS feed to get notified of new changes. Copy the URL below or click the RSS button.
</p>
<p className="text-orange-700 text-sm">Subscribe to our RSS feed to get notified of new changes.</p>
</div>
<div className="flex items-center gap-2 text-xs">
<code className="bg-orange-100 text-orange-800 px-2 py-1 rounded flex-1 min-w-0 truncate">{rssUrl}</code>
{/* RSS URL and buttons - Responsive layout */}
<div className="space-y-2">
<div className="flex items-center gap-2">
<code className="bg-orange-100 text-orange-800 px-2 py-1 rounded text-xs flex-1 min-w-0 truncate">
{rssUrl}
</code>
<button
onClick={copyToClipboard}
className="flex items-center gap-1 px-2 py-1 bg-gray-600 text-white rounded hover:bg-gray-700 transition-colors whitespace-nowrap"
className="flex items-center gap-1 px-2 py-1 bg-gray-600 text-white rounded hover:bg-gray-700 transition-colors text-xs whitespace-nowrap"
title="Copy RSS URL"
>
{copied ? <Check className="h-3 w-3" /> : <Copy className="h-3 w-3" />}
{copied ? "Copied!" : "Copy"}
<span className="hidden sm:inline">{copied ? "Copied!" : "Copy"}</span>
</button>
</div>
</div>
<Link
href="/api/rss"
className="ml-4 flex items-center space-x-2 px-4 py-2 bg-orange-600 text-white rounded-lg hover:bg-orange-700 transition-colors"
target="_blank"
rel="noopener noreferrer"
title="Open RSS Feed"
>
<Rss className="h-4 w-4" />
<span>RSS</span>
</Link>
<Link
href="/rss.xml"
className="inline-flex items-center justify-center space-x-2 px-4 py-2 bg-orange-600 text-white rounded-lg hover:bg-orange-700 transition-colors w-full sm:w-auto"
target="_blank"
rel="noopener noreferrer"
title="Open RSS Feed"
>
<Rss className="h-4 w-4" />
<span>Open RSS Feed</span>
</Link>
</div>
</div>
</div>
)