Add RSS subscribe links with icon across blog pages, footer, and head
- Add <.rss_icon> inline SVG component in core_components.ex - Inject RSS <link> tags into <head> on blog pages for auto-discovery - Show RSS icon next to blog title on index and tag pages - Show RSS icon on post pages next to back-link - Add Subscribe section in footer with links to both feeds - Wire feed URL through blog controller (index, show, tag actions) 174 tests pass, credo clean.
This commit is contained in:
@@ -1,6 +1,17 @@
|
||||
<div class="space-y-8">
|
||||
<header>
|
||||
<h1 class="text-3xl font-bold font-display">{@blog_title}</h1>
|
||||
<div class="flex items-center gap-3">
|
||||
<h1 class="text-3xl font-bold font-display">{@blog_title}</h1>
|
||||
<a
|
||||
href={@rss_feed_url}
|
||||
class="link link-hover text-orange-500 hover:text-orange-600 transition-colors"
|
||||
title="Subscribe to {@blog_title} RSS feed"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<.rss_icon class="size-5" />
|
||||
</a>
|
||||
</div>
|
||||
<p :if={@blog_description} class="mt-2 text-base-content/70">{@blog_description}</p>
|
||||
</header>
|
||||
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
<div class="space-y-8">
|
||||
<a href={@base_path} class="text-sm text-primary hover:underline">← Back to posts</a>
|
||||
<div class="flex items-center justify-between">
|
||||
<a href={@base_path} class="text-sm text-primary hover:underline">← Back to posts</a>
|
||||
<a
|
||||
href={@rss_feed_url}
|
||||
class="link link-hover text-orange-500 hover:text-orange-600 transition-colors"
|
||||
title="Subscribe to RSS feed"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<.rss_icon class="size-5" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<%= if @authenticated and @visibility == :draft do %>
|
||||
<div
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
<div class="space-y-8">
|
||||
<header>
|
||||
<h1 class="text-3xl font-bold font-display">{@blog_title}</h1>
|
||||
<div class="flex items-center gap-3">
|
||||
<h1 class="text-3xl font-bold font-display">{@blog_title}</h1>
|
||||
<a
|
||||
href={@rss_feed_url}
|
||||
class="link link-hover text-orange-500 hover:text-orange-600 transition-colors"
|
||||
title="Subscribe to {@blog_title} RSS feed"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<.rss_icon class="size-5" />
|
||||
</a>
|
||||
</div>
|
||||
<p class="mt-2 text-base-content/70">Posts tagged "{@tag}"</p>
|
||||
</header>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user