diff --git a/app/assets/stylesheets/main_nav.scss b/app/assets/stylesheets/main_nav.scss index eaa1756..b3615b0 100644 --- a/app/assets/stylesheets/main_nav.scss +++ b/app/assets/stylesheets/main_nav.scss @@ -16,7 +16,7 @@ @include media-max(large) { display: grid; grid-template-columns: repeat(1fr); - grid-template-columns: 1fr 1fr 1fr; + grid-template-columns: 1fr 1fr 1fr 1fr; } li { @@ -41,6 +41,10 @@ padding-right: 0; } + @include media-max(small) { + font-size: 0.85rem; + } + &.active { color: $text-color-body; border-bottom: 2px solid #ffd000; diff --git a/app/controllers/security_controller.rb b/app/controllers/security_controller.rb new file mode 100644 index 0000000..358cd0d --- /dev/null +++ b/app/controllers/security_controller.rb @@ -0,0 +1,7 @@ +class SecurityController < ApplicationController + before_action :require_user_signed_in + + def index + @current_section = :security + end +end diff --git a/app/views/dashboard/index.html.erb b/app/views/dashboard/index.html.erb index 528ff15..d0261fa 100644 --- a/app/views/dashboard/index.html.erb +++ b/app/views/dashboard/index.html.erb @@ -37,12 +37,3 @@ - -
-

Password change

-

- <%= form_with(url: settings_reset_password_path, method: :post) do %> - <%= submit_tag("Send me a password reset link") %> - <% end %> -

-
diff --git a/app/views/security/index.html.erb b/app/views/security/index.html.erb new file mode 100644 index 0000000..dbe2e0a --- /dev/null +++ b/app/views/security/index.html.erb @@ -0,0 +1,12 @@ +
+

Security

+
+ +
+

Password change

+

+ <%= form_with(url: settings_reset_password_path, method: :post) do %> + <%= submit_tag("Send me a password reset link") %> + <% end %> +

+
diff --git a/app/views/shared/_main_nav.html.erb b/app/views/shared/_main_nav.html.erb index d96a161..bd2a872 100644 --- a/app/views/shared/_main_nav.html.erb +++ b/app/views/shared/_main_nav.html.erb @@ -13,6 +13,10 @@ <%= link_to "Donations", donations_path, class: @current_section == :contributions ? "active" : nil %> +
  • + <%= link_to "Security", security_path, + class: @current_section == :security ? "active" : nil %> +
  • diff --git a/config/routes.rb b/config/routes.rb index 5873f71..89f8b2f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -12,6 +12,8 @@ Rails.application.routes.draw do get 'settings', to: 'settings#index' post 'settings_reset_password', to: 'settings#reset_password' + get 'security', to: 'security#index' + resources :invitations, only: ['index', 'show', 'create', 'destroy'] namespace :admin do