diff --git a/Gemfile b/Gemfile index 9301e72..61bf97e 100644 --- a/Gemfile +++ b/Gemfile @@ -14,6 +14,5 @@ group :test do end gem "rails", "~> 7.1.0" -gem "sassc-rails" -gem "trestle", github: "TrestleAdmin/trestle" +gem "trestle", github: "TrestleAdmin/trestle", branch: "hotwire" diff --git a/app/assets/bundle/trestle/auth/bundle.css b/app/assets/bundle/trestle/auth/bundle.css index a6eea5c..09cdd06 100644 --- a/app/assets/bundle/trestle/auth/bundle.css +++ b/app/assets/bundle/trestle/auth/bundle.css @@ -1 +1 @@ -.auth-body{color:#fff;display:flex}.auth-body .container{margin:auto;width:320px}.auth-header{margin-bottom:20px;text-align:center}.auth-header h1{align-items:center;display:flex;font-size:1.75rem;font-weight:500;justify-content:center;padding:.75rem 1rem;text-shadow:rgba(0,0,0,.5) 0 1px 1px}.auth-header img{max-height:100%;max-width:80%}.auth-header span{margin-left:10px}.login-form .form-control,.login-form .input-group-text{background:hsla(0,0%,100%,.1);border:0}.login-form .form-control{color:#fff;font-size:1.1rem;padding:1.75rem .75rem}.login-form .form-control:focus{box-shadow:none;outline-color:transparent;outline-style:none}.login-form .form-control::-webkit-input-placeholder{color:hsla(0,0%,100%,.5)}.login-form .form-control:-ms-input-placeholder{color:hsla(0,0%,100%,.5)}.login-form .form-control::placeholder{color:hsla(0,0%,100%,.5)}.login-form .form-control:-webkit-autofill{-webkit-text-fill-color:#fff}.login-form .form-control:-webkit-autofill,.login-form .form-control:-webkit-autofill:active,.login-form .form-control:-webkit-autofill:focus,.login-form .form-control:-webkit-autofill:hover{-webkit-transition:background-color 9999999s ease-in-out 0s;transition:background-color 9999999s ease-in-out 0s}.login-form .input-group-prepend{margin-right:0}.login-form .input-group-text{color:hsla(0,0%,100%,.5);padding:.375rem .25rem .375rem 1rem}.login-form .btn-primary{box-shadow:0 0 2px rgba(0,0,0,.1);padding-bottom:.75rem;padding-top:.75rem}.login-form .alert-danger{background-color:hsla(2,62%,66%,.75)}.login-form .remember-me{font-size:.95rem;line-height:1.5;padding-left:0}.login-form .remember-me .custom-control-label{background:rgba(0,0,0,.075);border-radius:.25rem;color:hsla(0,0%,100%,.75);cursor:pointer;display:block;padding:.75em 1.5em .75em 3.25em}.login-form .remember-me .custom-control-label:hover{background:rgba(0,0,0,.125)}.login-form .remember-me .custom-control-label:after,.login-form .remember-me .custom-control-label:before{left:1.1em;top:.925em} \ No newline at end of file +.auth-body{color:#fff;display:flex}.auth-body .container{margin:auto;width:320px}.auth-header{margin-bottom:20px;text-align:center}.auth-header h1{align-items:center;display:flex;font-size:1.75rem;font-weight:500;justify-content:center;padding:.75rem 1rem;text-shadow:rgba(0,0,0,.5) 0 1px 1px}.auth-header img{max-height:100%;max-width:80%}.auth-header span{margin-left:10px}.login-form .input-group>*{background:hsla(0,0%,100%,.1);border:0;margin-left:0!important}.login-form .form-control{color:#fff;font-size:1.1rem;padding:1rem .75rem}.login-form .form-control:focus{box-shadow:none;outline-color:transparent;outline-style:none}.login-form .form-control::-webkit-input-placeholder{color:hsla(0,0%,100%,.5)}.login-form .form-control:-ms-input-placeholder{color:hsla(0,0%,100%,.5)}.login-form .form-control::placeholder{color:hsla(0,0%,100%,.5)}.login-form .form-control:-webkit-autofill{-webkit-text-fill-color:#fff}.login-form .form-control:-webkit-autofill,.login-form .form-control:-webkit-autofill:active,.login-form .form-control:-webkit-autofill:focus,.login-form .form-control:-webkit-autofill:hover{-webkit-transition:background-color 9999999s ease-in-out 0s;transition:background-color 9999999s ease-in-out 0s}.login-form .input-group-text{color:hsla(0,0%,100%,.5);padding:.375rem .25rem .375rem 1rem}.login-form .btn-primary{box-shadow:0 0 2px rgba(0,0,0,.1);padding-bottom:.75rem;padding-top:.75rem}.login-form .alert-danger{background-color:hsla(2,62%,66%,.75)}.login-form .remember-me{font-size:.95rem;line-height:1.5;padding-left:0}.login-form .remember-me .form-check-input{margin-left:1em;margin-top:.825em}.login-form .remember-me .form-check-label{background:rgba(0,0,0,.075);border-radius:.25rem;color:hsla(0,0%,100%,.75);cursor:pointer;display:block;padding:.75em 1.5em .75em 3.25em}.login-form .remember-me .form-check-label:hover{background:rgba(0,0,0,.125)} \ No newline at end of file diff --git a/app/views/layouts/trestle/auth.html.erb b/app/views/layouts/trestle/auth.html.erb index 725cd25..053ae59 100644 --- a/app/views/layouts/trestle/auth.html.erb +++ b/app/views/layouts/trestle/auth.html.erb @@ -5,26 +5,29 @@ - <% if Trestle.config.turbolinks %> - - <% end %> + + + <%= csrf_meta_tags %> <%= Trestle.config.site_title %> - <%= stylesheet_link_tag "trestle/admin", 'data-turbolinks-track': 'reload' %> - <%= stylesheet_link_tag "trestle/theme", 'data-turbolinks-track': 'reload' if Trestle.config.theme %> - <%= stylesheet_link_tag "trestle/custom", 'data-turbolinks-track': 'reload' %> + <%= favicon_link_tag Trestle.config.favicon if Trestle.config.favicon %> - <%= stylesheet_link_tag "trestle/auth", 'data-turbolinks-track': 'reload' %> + <%= stylesheet_link_tag "trestle/admin", 'data-turbo-track': 'reload' %> + <%= stylesheet_link_tag "trestle/icons/font-awesome", 'data-turbo-track': 'reload' if defined?(Sprockets) %> - <%= javascript_include_tag "turbolinks" if Trestle.config.turbolinks %> + <%= stylesheet_link_tag "trestle/custom", 'data-turbo-track': 'reload' %> + + <%= stylesheet_link_tag "trestle/auth", 'data-turbo-track': 'reload' %> + + <%= render "trestle/theme" %> <%= hook "auth.head" %> - +
<%= yield %>
diff --git a/app/views/trestle/auth/_userbox.html.erb b/app/views/trestle/auth/_userbox.html.erb index 4177730..3ee2dac 100644 --- a/app/views/trestle/auth/_userbox.html.erb +++ b/app/views/trestle/auth/_userbox.html.erb @@ -10,13 +10,13 @@ <% end %> <% if show_dropdown %> - <%= link_to content, "#", data: { toggle: 'dropdown' } %> + <%= link_to content, "#", data: { bs_toggle: 'dropdown', bs_offset: "0,7" } %> <% else %> <%= content %> <% end %> <% if show_dropdown -%> -