11<%= form_with(model: [:admin, blog_post]) do |form| %>
22 <% if blog_post.errors.any? %>
3- <div class ="mb-4 p-4 bg-red-50 border border-red-200 rounded-lg ">
4- < h3 class ="text-sm font-medium text-red-800 mb-2 ">
3+ <div class ="mb-4 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg ">
4+ < h3 class ="text-sm font-medium text-red-800 dark:text-red-200 mb-2 ">
55 <%= pluralize ( blog_post . errors . count , "error" ) %> prohibited this blog post from being saved:
66 </ h3 >
7- < ul class ="list-disc list-inside text-sm text-red-700 ">
7+ < ul class ="list-disc list-inside text-sm text-red-700 dark:text-red-300 ">
88 <% blog_post . errors . full_messages . each do |message | %>
99 < li > <%= message %> </ li >
1010 <% end %>
1515 < div class ="space-y-6 ">
1616 < div class ="grid grid-cols-1 gap-6 ">
1717 < div >
18- <%= form . label :title , class : "block text-sm font-medium text-gray-700" %>
18+ <%= form . label :title , class : "block text-sm font-medium text-gray-700 dark:text-gray-300 " %>
1919 <%= form . text_field :title ,
20- class : "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue -500 focus:ring-blue -500 sm:text-sm" %>
20+ class : "mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-purple -500 focus:ring-purple -500 sm:text-sm" %>
2121 </ div >
2222
2323 < div >
24- <%= form . label :slug , class : "block text-sm font-medium text-gray-700" %>
24+ <%= form . label :slug , class : "block text-sm font-medium text-gray-700 dark:text-gray-300 " %>
2525 <%= form . text_field :slug ,
26- class : "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue -500 focus:ring-blue -500 sm:text-sm" ,
26+ class : "mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-purple -500 focus:ring-purple -500 sm:text-sm" ,
2727 placeholder : "leave-blank-to-auto-generate" %>
28- < p class ="mt-1 text-sm text-gray-500 "> Leave blank to auto-generate from title</ p >
28+ < p class ="mt-1 text-sm text-gray-500 dark:text-gray-400 "> Leave blank to auto-generate from title</ p >
2929 </ div >
3030
3131 < div >
32- <%= form . label :excerpt , class : "block text-sm font-medium text-gray-700" %>
32+ <%= form . label :excerpt , class : "block text-sm font-medium text-gray-700 dark:text-gray-300 " %>
3333 <%= form . text_area :excerpt , rows : 3 ,
34- class : "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue -500 focus:ring-blue -500 sm:text-sm" %>
34+ class : "mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-purple -500 focus:ring-purple -500 sm:text-sm" %>
3535 </ div >
3636
3737 < div data-controller ="trix-heading ">
38- <%= form . label :content , class : "block text-sm font-medium text-gray-700" %>
38+ <%= form . label :content , class : "block text-sm font-medium text-gray-700 dark:text-gray-300 " %>
3939 <%= form . rich_text_area :content ,
40- class : "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue -500 focus:ring-blue -500 sm:text-sm" %>
40+ class : "mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-purple -500 focus:ring-purple -500 sm:text-sm" %>
4141 </ div >
4242
4343 < div class ="grid grid-cols-2 gap-6 ">
4444 < div >
45- <%= form . label :status , class : "block text-sm font-medium text-gray-700" %>
45+ <%= form . label :status , class : "block text-sm font-medium text-gray-700 dark:text-gray-300 " %>
4646 <%= form . select :status , options_for_select ( BlogPost . statuses . map { |key , value | [ key . humanize , key ] } , blog_post . status ) ,
47- { } , class : "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue -500 focus:ring-blue -500 sm:text-sm" %>
47+ { } , class : "mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-purple -500 focus:ring-purple -500 sm:text-sm" %>
4848 </ div >
4949
5050 < div >
51- <%= form . label :published_at , class : "block text-sm font-medium text-gray-700" %>
51+ <%= form . label :published_at , class : "block text-sm font-medium text-gray-700 dark:text-gray-300 " %>
5252 <%= form . datetime_field :published_at ,
53- class : "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue -500 focus:ring-blue -500 sm:text-sm" %>
53+ class : "mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-purple -500 focus:ring-purple -500 sm:text-sm" %>
5454 </ div >
5555 </ div >
5656
5757 < div >
58- <%= form . label :tag_list , "Tags" , class : "block text-sm font-medium text-gray-700" %>
58+ <%= form . label :tag_list , "Tags" , class : "block text-sm font-medium text-gray-700 dark:text-gray-300 " %>
5959 <%= form . text_field :tag_list , value : blog_post . tag_list ,
60- class : "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue -500 focus:ring-blue -500 sm:text-sm" ,
60+ class : "mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-purple -500 focus:ring-purple -500 sm:text-sm" ,
6161 placeholder : "ruby, rails, web development" %>
62- < p class ="mt-1 text-sm text-gray-500 "> Separate tags with commas</ p >
62+ < p class ="mt-1 text-sm text-gray-500 dark:text-gray-400 "> Separate tags with commas</ p >
6363 </ div >
6464
6565 < div >
66- <%= form . label :featured_image_url , class : "block text-sm font-medium text-gray-700" %>
66+ <%= form . label :featured_image_url , class : "block text-sm font-medium text-gray-700 dark:text-gray-300 " %>
6767 <%= form . text_field :featured_image_url ,
68- class : "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue -500 focus:ring-blue -500 sm:text-sm" %>
68+ class : "mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-purple -500 focus:ring-purple -500 sm:text-sm" %>
6969 </ div >
7070
71- < div class ="border-t pt-6 ">
72- < h3 class ="text-lg font-medium text-gray-900 mb-4 "> SEO Metadata</ h3 >
71+ < div class ="border-t dark:border-gray-700 pt-6 ">
72+ < h3 class ="text-lg font-medium text-gray-900 dark:text-gray-100 mb-4 "> SEO Metadata</ h3 >
7373
7474 < div class ="space-y-4 ">
7575 < div >
76- <%= form . label :meta_title , class : "block text-sm font-medium text-gray-700" %>
76+ <%= form . label :meta_title , class : "block text-sm font-medium text-gray-700 dark:text-gray-300 " %>
7777 <%= form . text_field :meta_title ,
78- class : "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue -500 focus:ring-blue -500 sm:text-sm" %>
78+ class : "mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-purple -500 focus:ring-purple -500 sm:text-sm" %>
7979 </ div >
8080
8181 < div >
82- <%= form . label :meta_description , class : "block text-sm font-medium text-gray-700" %>
82+ <%= form . label :meta_description , class : "block text-sm font-medium text-gray-700 dark:text-gray-300 " %>
8383 <%= form . text_area :meta_description , rows : 2 ,
84- class : "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue -500 focus:ring-blue -500 sm:text-sm" %>
84+ class : "mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-purple -500 focus:ring-purple -500 sm:text-sm" %>
8585 </ div >
8686 </ div >
8787 </ div >
8888 </ div >
8989
90- < div class ="flex items-center justify-end space-x-3 pt-6 border-t ">
91- <%= link_to "Cancel" , admin_blog_posts_path , class : "bg-white py-2 px-4 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue -500" %>
92- <%= form . submit class : "bg-blue -600 hover:bg-blue -700 text-white font-medium py-2 px-4 rounded-md transition-colors" %>
90+ < div class ="flex items-center justify-end space-x-3 pt-6 border-t dark:border-gray-700 ">
91+ <%= link_to "Cancel" , admin_blog_posts_path , class : "bg-white dark:bg-gray-700 py-2 px-4 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple -500" %>
92+ <%= form . submit class : "bg-purple -600 hover:bg-purple -700 text-white font-medium py-2 px-4 rounded-md transition-colors" %>
9393 </ div >
9494 </ div >
9595<% end %>
0 commit comments