From d16832c6af4215bfa18c34ef8fa46b1e3ef55d82 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Mon, 30 Dec 2024 14:46:16 +0100 Subject: Changed tartiflette list to flexbox container. --- .../components/tartiflette_container.css | 39 ++++++++++++++++++++++ app/views/home/index.html.erb | 35 +++++-------------- 2 files changed, 48 insertions(+), 26 deletions(-) create mode 100644 app/assets/stylesheets/components/tartiflette_container.css diff --git a/app/assets/stylesheets/components/tartiflette_container.css b/app/assets/stylesheets/components/tartiflette_container.css new file mode 100644 index 0000000..64c4053 --- /dev/null +++ b/app/assets/stylesheets/components/tartiflette_container.css @@ -0,0 +1,39 @@ +.tartiflette-container { + display: flex; + flex-wrap: wrap; + gap: 1rem; + justify-content: center; + + .tartiflette-box { + border-radius: 1rem; + padding: 1rem; + width: 8rem; + text-align: center; + background-color: white; + } + + .tartiflette-box:hover { + background-color: whitesmoke; + } + + .tartiflette-link { + display: inline-block; + margin-top: 0.5rem; + padding: 0.5rem 1rem; + text-decoration: none; + color: white; + border-radius: 1rem; + } + + .scored { + background-color: forestgreen; + } + + .unscored { + background-color: firebrick; + } + + .tartiflette-link:hover { + background-color: #0056b3; /* Darker blue for hover effect */ + } +} diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index ca8f3a3..cc25992 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -4,39 +4,22 @@ <%= render "code_of_honor" %> -

Noter les Tartiflettes

- - + +

<%= link_to "Admin", admin_dashboard_path %>

-- cgit v1.2.3