diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 41ff821..cf4267b 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -22,20 +22,15 @@ span.project-name { display: none; - // font-size: .5em; - // text-transform: none; - // vertical-align: super; } - span.beta { - font-size: .5em; - font-style: italic; - text-transform: none; - vertical-align: super; - } + span.icon { + svg { + height: 1.8rem; + width: auto; + } - span.bolt { - color: #ffd000; + margin-right: 0.5rem; } } @@ -123,19 +118,35 @@ main { } } - th, td { - line-height: 1.5rem; - padding-right: 1rem; - } - section { - border-bottom: 1px dotted #ccc; padding-bottom: 3rem; margin-bottom: 3rem; - @include media-max(small) { - padding-bottom: 3rem; - margin-bottom: 3rem; + &:not(:last-of-type) { + border-bottom: 1px dotted #ccc; + } + } + + table { + width: 100%; + + th, td { + line-height: 1.5rem; + padding-right: 1rem; + + &.hide-small { + @include media-max(small) { + display: none; + } + } + } + + th { + color: $text-color-discreet; + font-weight: normal; + text-transform: uppercase; + font-size: 0.85rem; + padding-bottom: 0.5rem; } } 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/invitations/index.html.erb b/app/views/invitations/index.html.erb index a35d313..1c5996f 100644 --- a/app/views/invitations/index.html.erb +++ b/app/views/invitations/index.html.erb @@ -29,7 +29,7 @@ - + @@ -37,7 +37,7 @@ <% @invitations_used.each do |invitation| %> - + diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb index ac24d75..8a6368a 100644 --- a/app/views/layouts/admin.html.erb +++ b/app/views/layouts/admin.html.erb @@ -15,9 +15,9 @@

+ <%= render partial: "shared/icons/comet" %> Kosmos - Akkounts - beta + Accounts

<% if user_signed_in? %>

diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 4afa39a..bdf836e 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -15,9 +15,9 @@

+ <%= render partial: "shared/icons/comet" %> Kosmos - Akkounts - beta + Account

<% if user_signed_in? %>

diff --git a/app/views/layouts/signup.html.erb b/app/views/layouts/signup.html.erb index 1a49165..b2ddc1c 100644 --- a/app/views/layouts/signup.html.erb +++ b/app/views/layouts/signup.html.erb @@ -15,9 +15,9 @@

+ <%= render partial: "shared/icons/comet" %> Kosmos Sign Up -

<% if user_signed_in? %>

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/app/views/shared/icons/_comet.html.erb b/app/views/shared/icons/_comet.html.erb new file mode 100644 index 0000000..78071f8 --- /dev/null +++ b/app/views/shared/icons/_comet.html.erb @@ -0,0 +1 @@ + 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
    URLID Accepted Invited user
    <%= invitation_url(invitation.token) %><%= invitation.token %> <%= invitation.used_at.strftime("%Y-%m-%d") %> <%= User.find(invitation.invited_user_id).address %>