Skip to content
Draft
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
30 changes: 30 additions & 0 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,33 @@ body {
margin: 0;
padding: 0;
}

.rainbow-cycle-bg {
background: linear-gradient(
135deg,
#ff0000,
#ff7f00,
#ffff00,
#00ff00,
#0000ff,
#4b0082,
#8b00ff,
#ff0000
);
background-size: 400% 400%;
animation: rainbow-cycle 12s linear infinite;
}

@keyframes rainbow-cycle {
0% {
background-position: 0% 50%;
}

50% {
background-position: 100% 50%;
}

100% {
background-position: 0% 50%;
}
}
2 changes: 1 addition & 1 deletion app/views/home/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%= turbo_stream_from "counter" %>

<main class="flex flex-col items-center justify-center min-h-screen bg-red-500 p-8">
<main class="rainbow-cycle-bg flex flex-col items-center justify-center min-h-screen p-8">
<div class="text-center mb-8">
<h1 class="text-5xl font-bold text-red-600 mb-2">Hello, World!</h1>
<p class="text-gray-500">Rails 8 Full Stack Demo</p>
Expand Down
10 changes: 10 additions & 0 deletions test/controllers/home_controller_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
require "test_helper"

class HomeControllerTest < ActionDispatch::IntegrationTest
test "root page uses the rainbow background" do
get root_url

assert_response :success
assert_includes response.body, "rainbow-cycle-bg"
end
end