Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,3 @@
*= require_tree .
*= require_self
*/

body {
background: #fff;
color: #333;
margin: 0;
padding: .5rem 1rem;
}
8 changes: 8 additions & 0 deletions app/assets/tailwind/application.css
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
@import "tailwindcss";

@theme {
--color-dark-bg: oklch(15% 0 0);
--color-dark-card: oklch(20% 0 0);
--color-dark-border: oklch(30% 0 0);
--color-dark-text: oklch(90% 0 0);
--color-dark-text-secondary: oklch(70% 0 0);
}
18 changes: 13 additions & 5 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
<!DOCTYPE html>
<html>
<html class="dark">
<head>
<script>
// Dark mode detection
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
document.documentElement.classList.add('dark')
} else {
document.documentElement.classList.remove('dark')
}
</script>
<title><%=
if yield(:title).empty?
'blade.ruby-lang.org'
Expand All @@ -16,11 +24,11 @@
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
</head>

<body class="bg-gray-50">
<header class="bg-white shadow-sm border-b border-gray-200">
<body class="bg-gray-50 dark:bg-gray-900">
<header class="bg-white dark:bg-gray-800 shadow-sm border-b border-gray-200 dark:border-gray-700">
<div class="container mx-auto px-4 py-4">
<h1 class="text-2xl font-bold text-gray-900">
<%= link_to "blade.ruby-lang.org", root_path, class: "hover:text-red-600 transition-colors" %>
<h1 class="text-2xl font-bold text-gray-900 dark:text-gray-100">
<%= link_to "blade.ruby-lang.org", root_path, class: "hover:text-red-600 dark:hover:text-red-400 transition-colors" %>
</h1>
</div>
</header>
Expand Down
18 changes: 9 additions & 9 deletions app/views/messages/_message.html.erb
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<div class="bg-white rounded-lg shadow-md overflow-hidden" id="<%= dom_id message %>">
<div class="border-b border-gray-200 bg-gray-50 px-6 py-4">
<h2 class="text-xl font-semibold text-gray-900 mb-3"><%= message.subject %></h2>
<div class="space-y-1 text-sm text-gray-600">
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-md border border-gray-200 dark:border-gray-700 overflow-hidden" id="<%= dom_id message %>">
<div class="border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900 px-6 py-4">
<h2 class="text-xl font-semibold text-gray-900 dark:text-gray-100 mb-3"><%= message.subject %></h2>
<div class="space-y-1 text-sm text-gray-600 dark:text-gray-400">
<div class="flex items-center gap-2">
<span class="font-medium text-gray-700">From:</span>
<span class="font-medium text-gray-700 dark:text-gray-300">From:</span>
<span><%= message.from %></span>
</div>
<div class="flex items-center gap-2">
<span class="font-medium text-gray-700">Date:</span>
<span class="font-medium text-gray-700 dark:text-gray-300">Date:</span>
<span><%= message.published_at&.strftime("%Y-%m-%d %H:%M:%S %Z") || "N/A" %></span>
</div>
<% if message.list %>
<div class="flex items-center gap-2">
<span class="font-medium text-gray-700">List:</span>
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-red-100 text-red-800">
<span class="font-medium text-gray-700 dark:text-gray-300">List:</span>
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200">
<%= message.list.name %> #<%= message.list_seq %>
</span>
</div>
<% end %>
</div>
</div>
<div class="px-6 py-4">
<pre class="whitespace-pre-wrap font-mono text-sm text-gray-800 leading-relaxed"><%= message.body %></pre>
<pre class="whitespace-pre-wrap font-mono text-sm text-gray-800 dark:text-gray-300 leading-relaxed"><%= message.body %></pre>
</div>
</div>
16 changes: 8 additions & 8 deletions app/views/messages/_thread.html.erb
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<div class="thread-message" style="margin-left: <%= depth * 6 %>px;">
<% if depth == 0 %>
<div class="bg-white rounded-lg shadow-md border border-gray-200 overflow-hidden hover:shadow-lg transition-shadow">
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-md border border-gray-200 dark:border-gray-700 overflow-hidden hover:shadow-lg transition-shadow">
<div class="p-5">
<div class="flex items-start justify-between gap-4">
<div class="flex-1 min-w-0">
<h2 class="text-lg font-semibold text-gray-900 hover:text-red-600 transition-colors mb-2">
<h2 class="text-lg font-semibold text-gray-900 dark:text-gray-100 hover:text-red-600 dark:hover:text-red-400 transition-colors mb-2">
<span class="px-0.5">[#<%= message.list_seq %>]</span>
<%= link_to without_list_prefix(message.subject), "/#{list.name}/#{message.list_seq}" %>
<span class="text-sm text-gray-500 font-normal ml-2">— <%= message.from %></span>
<span class="text-sm text-gray-500 dark:text-gray-400 font-normal ml-2">— <%= message.from %></span>
</h2>
<div class="flex items-center gap-3 text-sm text-gray-600">
<div class="flex items-center gap-3 text-sm text-gray-600 dark:text-gray-400">
<span class="inline-flex items-center gap-1">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"></path>
Expand All @@ -22,16 +22,16 @@
</div>
</div>
<% else %>
<div class="py-2 border-l-2 border-gray-200 pl-4 hover:border-red-400 transition-colors">
<div class="py-2 border-l-2 border-gray-200 dark:border-gray-700 pl-4 hover:border-red-400 dark:hover:border-red-500 transition-colors">
<div class="flex items-start gap-2 text-sm">
<svg class="w-4 h-4 text-gray-400 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<svg class="w-4 h-4 text-gray-400 dark:text-gray-500 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"></path>
</svg>
<div class="flex-1 min-w-0">
<%= link_to "/#{list.name}/#{message.list_seq}", class: "text-gray-900 hover:text-red-600 transition-colors" do %>
<%= link_to "/#{list.name}/#{message.list_seq}", class: "text-gray-900 dark:text-gray-100 hover:text-red-600 dark:hover:text-red-400 transition-colors" do %>
<span class="px-0.5">[#<%= message.list_seq %>] <%= without_list_prefix(message.subject) %></span>
<% end %>
<span class="text-gray-500">— <%= message.from %></span>
<span class="text-gray-500 dark:text-gray-400">— <%= message.from %></span>
</div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions app/views/messages/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<% content_for :title, @list.name %>

<% if notice %>
<div class="mb-4 p-4 bg-green-50 border border-green-200 text-green-800 rounded-lg">
<div class="mb-4 p-4 bg-green-50 dark:bg-green-900 border border-green-200 dark:border-green-700 text-green-800 dark:text-green-200 rounded-lg">
<%= notice %>
</div>
<% end %>

<div class="mb-8">
<h1 class="text-3xl font-bold text-gray-900"><%= @list.name %></h1>
<p class="text-gray-600 mt-2">Mailing list archive</p>
<h1 class="text-3xl font-bold text-gray-900 dark:text-gray-100"><%= @list.name %></h1>
<p class="text-gray-600 dark:text-gray-400 mt-2">Mailing list archive</p>
</div>

<div class="space-y-6">
Expand Down
4 changes: 2 additions & 2 deletions app/views/messages/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<% content_for :title, @message.subject %>

<% if notice %>
<div class="mb-4 p-4 bg-green-50 border border-green-200 text-green-800 rounded-lg">
<div class="mb-4 p-4 bg-green-50 dark:bg-green-900 border border-green-200 dark:border-green-700 text-green-800 dark:text-green-200 rounded-lg">
<%= notice %>
</div>
<% end %>

<div class="mb-4">
<%= link_to "← Back to #{@message.list.name}", "/#{@message.list.name}/", class: "text-red-600 hover:text-red-800 font-medium" %>
<%= link_to "← Back to #{@message.list.name}", "/#{@message.list.name}/", class: "text-red-600 dark:text-red-400 hover:text-red-800 dark:hover:text-red-300 font-medium" %>
</div>

<%= render @message %>