summaryrefslogtreecommitdiff
path: root/app/views/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/layouts')
-rw-r--r--app/views/layouts/_cookies.html.erb8
-rw-r--r--app/views/layouts/application.html.erb1
2 files changed, 9 insertions, 0 deletions
diff --git a/app/views/layouts/_cookies.html.erb b/app/views/layouts/_cookies.html.erb
new file mode 100644
index 0000000..0e6949a
--- /dev/null
+++ b/app/views/layouts/_cookies.html.erb
@@ -0,0 +1,8 @@
+<div id="cookies-banner">
+ <p>
+ Acceptez les cookies ou contribuer 2 € à la tartiflette de
+ Nicolas 💸
+ </p>
+ <%= button_to "Accepter les cookies", dismiss_banner_path %>
+ <%= button_to "Faire un don", dismiss_banner_path %>
+</div>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 680dec1..c9ca629 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -29,5 +29,6 @@
<%= yield %>
</main>
<%= render "layouts/footer" %>
+ <%= render "layouts/cookies" unless session[:dismissed_banner] %>
</body>
</html>
Copyright 2019--2025 Marius PETER