diff --git a/app/assets/stylesheets/extranet/pages/_devise.sass b/app/assets/stylesheets/extranet/pages/_devise.sass new file mode 100644 index 0000000000000000000000000000000000000000..ae3106dc1251aad506569a1dfadeececa2090354 --- /dev/null +++ b/app/assets/stylesheets/extranet/pages/_devise.sass @@ -0,0 +1,9 @@ +.layout-devise + background-color: $header-color + .logo + max-width: 150px + margin: 60px 0 + main + margin-bottom: 200px + footer + border-top: 1px solid $light-border-color \ No newline at end of file diff --git a/app/views/application/_logo.html.erb b/app/views/application/_logo.html.erb index e98dff7805545100858d02858f82c3a7729c880f..210b239329d5eae639d60c4a97cf3824e7549f65 100644 --- a/app/views/application/_logo.html.erb +++ b/app/views/application/_logo.html.erb @@ -1,5 +1,5 @@ <% if current_context.logo.attached? %> - <%= image_tag current_context.logo, width: 200, alt: current_context.to_s %> + <%= image_tag current_context.logo, width: 200, alt: current_context.to_s, class: 'logo' %> <% else %> <%= current_context %> <% end %> diff --git a/app/views/extranet/academic_years/index.html.erb b/app/views/extranet/academic_years/index.html.erb index d16617b4dcb76255558928a1fa4469d4f8402022..f3913b723e3bc07648d1d03bbe533ac61b28c2e5 100644 --- a/app/views/extranet/academic_years/index.html.erb +++ b/app/views/extranet/academic_years/index.html.erb @@ -1,12 +1,8 @@ <% content_for :title, Education::AcademicYear.model_name.human(count: 2) %> - -<header class="mb-5"> - <h1><%= Education::AcademicYear.model_name.human(count: 2) %></h1> - <p> +<% content_for :header_right do %> <%= @count %> <%= Education::AcademicYear.model_name.human(count: @count).downcase %> - </p> -</header> +<% end %> <ul class="years"> <% @academic_years.each do |year| %> diff --git a/app/views/extranet/academic_years/show.html.erb b/app/views/extranet/academic_years/show.html.erb index a4edc23a808fab642cc725da06d52e806a2810bc..4f9a6b708e533f2e23197e8a4bb22dedd2bd52c7 100644 --- a/app/views/extranet/academic_years/show.html.erb +++ b/app/views/extranet/academic_years/show.html.erb @@ -1,12 +1,8 @@ <% content_for :title, @academic_year %> - -<header class="mb-5"> - <h1><%= @academic_year %></h1> - <p> - <%= @alumni.count %> - <%= University::Person::Alumnus.model_name.human(count: @alumni.count).downcase %> - </p> -</header> +<% content_for :header_right do %> + <%= @alumni.count %> + <%= University::Person::Alumnus.model_name.human(count: @alumni.count).downcase %> +<% end %> <div class="row"> <div class="col-lg-4"> diff --git a/app/views/extranet/account/show.html.erb b/app/views/extranet/account/show.html.erb index e13e2c8a7efa35bef57dfaba8ea4840f39d57b53..8a19fc7faf5612da36559f9c15677eb437ce8d1b 100644 --- a/app/views/extranet/account/show.html.erb +++ b/app/views/extranet/account/show.html.erb @@ -6,10 +6,10 @@ <p><%= @person&.biography %></p> </div> + <p><%= t('extranet.experiences.title') %></p> <%= link_to University::Person::Experience.human_attribute_name('new'), new_experience_path, - class: 'btn btn-sm btn-secondary float-end' %> - <p><%= t('extranet.experiences.title') %></p> + class: 'btn btn-sm btn-primary mt-md-n5 float-md-end' %> <%= render 'extranet/experiences/list', person: @person, edit: true %> </div> <div class="col-md-3"> diff --git a/app/views/extranet/application/_head.html.erb b/app/views/extranet/application/_head.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..f88e4486416113a3cbe4907cf1e721de7733d773 --- /dev/null +++ b/app/views/extranet/application/_head.html.erb @@ -0,0 +1,27 @@ +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> +<title><%= yield :title %></title> +<%= csrf_meta_tags %> +<%= csp_meta_tag %> +<%= stylesheet_link_tag 'extranet', media: 'all' %> +<%= javascript_include_tag 'extranet' %> +<%= favicon_link_tag 'favicon.png' %> +<% if current_extranet.color.present? %> + <style> + h1 a { + color: <%= current_extranet.color %>; + text-decoration-color: <%= current_extranet.color %>66; + } + h1 a:hover { + color: <%= current_extranet.color %>; + text-decoration-color: <%= current_extranet.color %>; + } + .navbar .active .nav-link { + color: <%= current_extranet.color %>; + } + .btn-primary { + background-color: <%= current_extranet.color %>; + border-color: <%= current_extranet.color %>; + } + </style> +<% end %> \ No newline at end of file diff --git a/app/views/extranet/experiences/_experience.html.erb b/app/views/extranet/experiences/_experience.html.erb index caabcae7ed89054b3aae155942b5f29dab7abb92..3052ede2aaf7d300d7da2f531ccdb635f8a7973b 100644 --- a/app/views/extranet/experiences/_experience.html.erb +++ b/app/views/extranet/experiences/_experience.html.erb @@ -11,7 +11,7 @@ edit ||= false </p> <%= link_to University::Person::Experience.human_attribute_name('edit'), edit_experience_path(experience), - class: 'btn btn-sm btn-secondary mt-2' if edit %> + class: 'btn btn-sm btn-primary mt-2' if edit %> </div> <div class="col-md-6 text-end"> <% if experience.organization.present? %> diff --git a/app/views/extranet/layouts/application.html.erb b/app/views/extranet/layouts/application.html.erb index 04e325e33ceb9ae95e52ba912ca92dadf4cde9d0..2efbb4af23b3bc68d8f62664319dc4632497f27c 100644 --- a/app/views/extranet/layouts/application.html.erb +++ b/app/views/extranet/layouts/application.html.erb @@ -1,14 +1,7 @@ <!DOCTYPE html> <html> <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> - <title><%= yield :title %></title> - <%= csrf_meta_tags %> - <%= csp_meta_tag %> - <%= stylesheet_link_tag 'extranet', media: 'all' %> - <%= javascript_include_tag 'extranet' %> - <%= favicon_link_tag 'favicon.png' %> + <%= render 'extranet/application/head' %> </head> <body class="extranet <%= body_classes %>"> <%= render 'extranet/application/nav' %> diff --git a/app/views/extranet/layouts/devise.html.erb b/app/views/extranet/layouts/devise.html.erb index 99338798244982206be52a840118584286e7d74d..b0db1d462968af071a5ff12f155975cc429d283d 100644 --- a/app/views/extranet/layouts/devise.html.erb +++ b/app/views/extranet/layouts/devise.html.erb @@ -1,38 +1,27 @@ <!DOCTYPE html> <html> <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> - <title><%= yield :title %></title> - <%= csrf_meta_tags %> - <%= csp_meta_tag %> - <%= stylesheet_link_tag 'admin', media: 'all' %> - <%= javascript_include_tag 'admin' %> - <%= favicon_link_tag 'favicon.png' %> + <%= render 'extranet/application/head' %> </head> - <body class="<%= body_classes %>"> - <div class="container"> + <body class="<%= body_classes %> layout-devise"> + <main class="container"> <div class="row"> - <div class="col-sm-10 mx-auto"> + <div class="offset-md-2 col-md-8"> <h1 class="my-5 py-5 text-center"> <%= link_to root_path do %> <%= render 'logo' %> <% end %> </h1> - <div class="card"> - <div class="card-body text-start"> - <% unless notice.blank? %> - <div class="alert alert-success mt-2" role="alert"><%= notice.html_safe %></div> - <% end %> - <% unless alert.blank? %> - <div class="alert alert-danger mt-2" role="alert"><%= alert.html_safe %></div> - <% end %> - <%= yield %> - </div> - </div> + <% unless notice.blank? %> + <div class="alert alert-success mt-2" role="alert"><%= notice.html_safe %></div> + <% end %> + <% unless alert.blank? %> + <div class="alert alert-danger mt-2" role="alert"><%= alert.html_safe %></div> + <% end %> + <%= yield %> </div> </div> - </div> + </main> <%= render 'extranet/application/footer', hide_logo: true %> <%= render 'gdpr/cookie_consent' %> <%= render 'bugsnag' %>