sample_rails_tailwind/app/views/layouts/application.html.erb
songtianlun 87e0c2eec6 feat: add theme switching and toast notifications
- Implement theme switching functionality with a new ThemeController
- Add ToastController for displaying notifications
- Update various views for improved layout and styling
- Introduce animations for toast notifications

These changes enhance the user experience by allowing users to switch between light and dark themes and receive feedback through toast notifications. The UI has been improved for better accessibility and aesthetics.
2025-01-17 15:02:25 +08:00

55 lines
1.9 KiB
Plaintext

<!DOCTYPE html>
<html lang="en">
<head>
<!-- <title><%#= content_for(:title) || "Sample App" %></title>-->
<title><%= full_title(yield(:title)) %></title>
<%= render 'layouts/rails_default' %>
<%= render 'layouts/shim' %>
<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
<%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
</head>
<body>
<%= render 'layouts/header' %>
<div class="">
<%= render 'layouts/message' %>
<%= yield %>
<%= render 'layouts/footer' %>
<%#= debug(params) if Rails.env.development? %>
<%#= debug(params.to_yaml) if Rails.env.development? %>
<%#= debug(session) if Rails.env.development? %>
<%#= debug(Time.now) if Rails.env.development? %>
<% if Rails.env.development? %>
<div class="container mx-auto px-4 mb-8 pt-4">
<div class="max-w-4xl mx-auto border-2 border-gray-300 rounded-lg p-6 bg-gray-100">
<!-- Params -->
<div class="mb-6">
<h3 class="text-gray-700 font-bold mb-2">Params:</h3>
<pre class="bg-white p-4 rounded shadow overflow-x-auto text-sm text-gray-600 border border-gray-200">
<%= params.to_yaml %>
</pre>
</div>
<!-- Session -->
<div class="mb-6">
<h3 class="text-gray-700 font-bold mb-2">Session:</h3>
<pre class="bg-white p-4 rounded shadow overflow-x-auto text-sm text-gray-600 border border-gray-200">
<%= session %>
</pre>
</div>
<!-- Time -->
<div>
<h3 class="text-gray-700 font-bold mb-2">Current Time:</h3>
<pre class="bg-white p-4 rounded shadow overflow-x-auto text-sm text-gray-600 border border-gray-200">
<%= Time.now %>
</pre>
</div>
</div>
</div>
<% end %>
</div>
</body>
</html>