diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 1bc8ecd..efc6699 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -7,3 +7,11 @@ body { margin: 0; padding: 0; } + +.font-times { + font-family: "Times New Roman", Times, serif; +} + +.grayscale-images img { + filter: grayscale(100%); +} diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 74fa0aa..9eac0fc 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -1,8 +1,8 @@ <%= turbo_stream_from "counter" %> -
+
-

Hello, World!

+

Hello, World!

Rails 8 Full Stack Demo

Secret Sauce: <%= @secret_sauce %>

diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 384746d..057addb 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -11,7 +11,7 @@ <%= javascript_importmap_tags %> - + <%= yield %> diff --git a/test/integration/home_theme_test.rb b/test/integration/home_theme_test.rb new file mode 100644 index 0000000..f2fdc0c --- /dev/null +++ b/test/integration/home_theme_test.rb @@ -0,0 +1,11 @@ +require "test_helper" + +class HomeThemeTest < ActionDispatch::IntegrationTest + test "home page applies the project theme" do + get root_url + + assert_response :success + assert_select "body.bg-red-500.font-times.grayscale-images" + assert_select "h1.font-times", text: "Hello, World!" + end +end