From 28ddfa2f57f3ed7b23df6ac18be49b7c000a891e Mon Sep 17 00:00:00 2001 From: Norore Date: Sat, 8 Jun 2024 21:14:53 +0200 Subject: [PATCH] Init application --- .idea/misc.xml | 2 +- .../stylesheets/application.bootstrap.scss | 15 ++++++++ app/controllers/application_controller.rb | 5 +++ app/views/application/apropos.html.erb | 8 ++++ app/views/application/home.html.erb | 7 ++++ app/views/application/legal.html.erb | 8 ++++ app/views/layouts/application.html.erb | 37 +++++++++++++------ config/routes.rb | 11 ++---- 8 files changed, 73 insertions(+), 20 deletions(-) create mode 100644 app/views/application/apropos.html.erb create mode 100644 app/views/application/home.html.erb create mode 100644 app/views/application/legal.html.erb diff --git a/.idea/misc.xml b/.idea/misc.xml index 639900d..6d78933 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/app/assets/stylesheets/application.bootstrap.scss b/app/assets/stylesheets/application.bootstrap.scss index b61b612..b0c7b6e 100644 --- a/app/assets/stylesheets/application.bootstrap.scss +++ b/app/assets/stylesheets/application.bootstrap.scss @@ -1,2 +1,17 @@ @import 'bootstrap/scss/bootstrap'; @import 'bootstrap-icons/font/bootstrap-icons'; + +body { + min-height: 100vh; + display: flex; + flex-direction: column; +} + +header { + border-bottom: 15px solid $primary; +} + +footer { + margin-top: auto; + border-top: 5px solid $primary; +} \ No newline at end of file diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 09705d1..27ab6f6 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,2 +1,7 @@ class ApplicationController < ActionController::Base + def home; end + + def apropos; end + + def legal; end end diff --git a/app/views/application/apropos.html.erb b/app/views/application/apropos.html.erb new file mode 100644 index 0000000..3976d6a --- /dev/null +++ b/app/views/application/apropos.html.erb @@ -0,0 +1,8 @@ + + +

À propos

\ No newline at end of file diff --git a/app/views/application/home.html.erb b/app/views/application/home.html.erb new file mode 100644 index 0000000..0d0b289 --- /dev/null +++ b/app/views/application/home.html.erb @@ -0,0 +1,7 @@ + + +

Découvrez nos dernières démarches en cours !

diff --git a/app/views/application/legal.html.erb b/app/views/application/legal.html.erb new file mode 100644 index 0000000..c60c597 --- /dev/null +++ b/app/views/application/legal.html.erb @@ -0,0 +1,8 @@ + + +

Mentions légales

\ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index c228fb9..b521a07 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,16 +1,29 @@ - - - Demarches - - <%= csrf_meta_tags %> - <%= csp_meta_tag %> + + + Association PURR :: Nos démarches + + <%= csrf_meta_tags %> + <%= csp_meta_tag %> - <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> - <%= javascript_importmap_tags %> - + <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> + <%= javascript_importmap_tags %> + - - <%= yield %> - + +
+

+ <%= link_to 'Nos démarches', root_path, class: %i[nav-link] %> +

+
+ +
+ <%= yield %> +
+ + + diff --git a/config/routes.rb b/config/routes.rb index a125ef0..34fd325 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,10 +1,7 @@ Rails.application.routes.draw do - # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html + root "application#home" + get 'apropos', to: 'application#apropos' + get 'legal', to: 'application#legal' - # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500. - # Can be used by load balancers and uptime monitors to verify that the app is live. - get "up" => "rails/health#show", as: :rails_health_check - - # Defines the root path route ("/") - # root "posts#index" + resources :letters end