diff --git a/Gemfile b/Gemfile index bbfe8ac..8c951a4 100644 --- a/Gemfile +++ b/Gemfile @@ -24,6 +24,8 @@ gem 'jbuilder', '~> 2.7' # Use Active Model has_secure_password # gem 'bcrypt', '~> 3.1.7' +gem 'devise', '4.7.1' + # Use Active Storage variant # gem 'image_processing', '~> 1.2' diff --git a/Gemfile.lock b/Gemfile.lock index 66b5000..99db0e1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -58,6 +58,7 @@ GEM zeitwerk (~> 2.2) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) + bcrypt (3.1.13) bindex (0.8.1) bootsnap (1.4.6) msgpack (~> 1.0) @@ -74,6 +75,12 @@ GEM childprocess (3.0.0) concurrent-ruby (1.1.6) crass (1.0.6) + devise (4.7.1) + bcrypt (~> 3.0) + orm_adapter (~> 0.1) + railties (>= 4.1.0) + responders + warden (~> 1.2.3) erubi (1.9.0) ffi (1.12.2) ffi (1.12.2-x64-mingw32) @@ -100,6 +107,9 @@ GEM nio4r (2.5.2) nokogiri (1.10.9) mini_portile2 (~> 2.4.0) + nokogiri (1.10.9-x64-mingw32) + mini_portile2 (~> 2.4.0) + orm_adapter (0.5.0) public_suffix (4.0.4) puma (4.3.3) nio4r (~> 2.0) @@ -136,6 +146,9 @@ GEM thor (>= 0.20.3, < 2.0) rake (13.0.1) regexp_parser (1.7.0) + responders (3.0.0) + actionpack (>= 5.0) + railties (>= 5.0) rubyzip (2.3.0) sass-rails (6.0.0) sassc-rails (~> 2.1, >= 2.1.1) @@ -170,6 +183,8 @@ GEM thread_safe (~> 0.1) tzinfo-data (1.2019.3) tzinfo (>= 1.0.0) + warden (1.2.8) + rack (>= 2.0.6) web-console (4.0.1) actionview (>= 6.0.0) activemodel (>= 6.0.0) @@ -198,6 +213,7 @@ DEPENDENCIES bootsnap (>= 1.4.2) byebug capybara (>= 2.15) + devise (= 4.7.1) jbuilder (~> 2.7) puma (~> 4.1) rails (= 6.0.2.1) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 9f8f6e8..c1e4bfb 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -35,14 +35,13 @@ nav { background-color: #3F51B5; width: 100%; display: grid; - grid-template-columns: 1fr auto 1fr; - box-shadow: 0 16px 24px 2px rgba(0,0,0,0.14), 0 6px 30px 5px rgba(0,0,0,0.12), 0 8px 10px -5px rgba(0,0,0,0.20); + grid-template-columns: max-content max-content auto; + box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.20); } nav a { color: white; text-decoration: none; - text-transform: uppercase; font-family: Helvetica, sans-serif; font-size: 18px; transition: .3s all ease-in-out; @@ -66,13 +65,14 @@ nav a:hover { display: inline-block; grid-column: 1; align-self: center; - margin-left: 1rem; + padding: 1rem; } .left-menu { display: none; grid-column: 1; align-self: center; + text-transform: uppercase; } .left-menu a { @@ -83,20 +83,29 @@ nav a:hover { } .right-menu { + display: inline-block; grid-column: 3; text-align: right; + font-size: 12px; align-self: center; } .right-menu a { - padding: 18px 1rem 17px 1rem; + padding: 1.4rem 1rem 1.35rem 1rem; + font-size: 16px; } .logo { grid-column: 2; - padding: 1rem; + padding: 1rem 1rem 1rem 0; font-family: Helvetica, sans-serif; font-size: 18px; font-weight: 800; + align-self: center; + text-transform: uppercase; letter-spacing: 0.5px; +} + +.logo:hover { + background-color: transparent; } \ No newline at end of file diff --git a/app/models/user.rb b/app/models/user.rb new file mode 100644 index 0000000..b524b09 --- /dev/null +++ b/app/models/user.rb @@ -0,0 +1,6 @@ +class User < ApplicationRecord + # Include default devise modules. Others available are: + # :confirmable, :lockable, :timeoutable, :trackable and :omniauthable + devise :database_authenticatable, :registerable, + :rememberable, :validatable +end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 88cb2f6..7e93c06 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -18,6 +18,7 @@ + tiss2go
- tiss2go -<%= notice %>
+<%= alert %>
+ + <%= yield %> +