Init application

This commit is contained in:
Norore 2024-06-08 21:14:53 +02:00
parent e24b29aa6f
commit 28ddfa2f57
8 changed files with 73 additions and 20 deletions

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ProjectRootManager"> <component name="ProjectRootManager" version="2" languageLevel="JDK_22" project-jdk-name="rbenv: 3.1.2" project-jdk-type="RUBY_SDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>

View file

@ -1,2 +1,17 @@
@import 'bootstrap/scss/bootstrap'; @import 'bootstrap/scss/bootstrap';
@import 'bootstrap-icons/font/bootstrap-icons'; @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;
}

View file

@ -1,2 +1,7 @@
class ApplicationController < ActionController::Base class ApplicationController < ActionController::Base
def home; end
def apropos; end
def legal; end
end end

View file

@ -0,0 +1,8 @@
<nav aria-label="Fil dariane">
<ol class="breadcrumb">
<li class="breadcrumb-item active"><%= link_to 'Accueil', root_path %></li>
<li class="breadcrumb-item active" aria-current="page" aria-label="Page actuelle">À propos</li>
</ol>
</nav>
<h1>À propos</h1>

View file

@ -0,0 +1,7 @@
<nav aria-label="Fil dariane">
<ol class="breadcrumb">
<li class="breadcrumb-item active" aria-current="page" aria-label="Page actuelle">Accueil</li>
</ol>
</nav>
<p>Découvrez nos dernières démarches en cours !</p>

View file

@ -0,0 +1,8 @@
<nav aria-label="Fil dariane">
<ol class="breadcrumb">
<li class="breadcrumb-item active"><%= link_to 'Accueil', root_path %></li>
<li class="breadcrumb-item active" aria-current="page" aria-label="Page actuelle">Mentions légales</li>
</ol>
</nav>
<h1>Mentions légales</h1>

View file

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html lang="fr">
<head> <head>
<title>Demarches</title> <title>Association PURR :: Nos démarches</title>
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %> <%= csrf_meta_tags %>
<%= csp_meta_tag %> <%= csp_meta_tag %>
@ -11,6 +11,19 @@
</head> </head>
<body> <body>
<header class="mb-4">
<h1>
<%= link_to 'Nos démarches', root_path, class: %i[nav-link] %>
</h1>
</header>
<main class="container">
<%= yield %> <%= yield %>
</main>
<footer class="mb-0 px-2 py-3 small text-center">
<%= link_to 'À propos', apropos_path, class: %i[link-primary] %> | 
<%= link_to 'Mentions légales', legal_path, class: %i[link-primary] %>
</footer>
</body> </body>
</html> </html>

View file

@ -1,10 +1,7 @@
Rails.application.routes.draw do 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. resources :letters
# 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"
end end