From dc9ee895901a9ab12adf47059a95259cafb7a827 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Tue, 16 Jul 2024 11:02:54 +0200 Subject: [PATCH] Use Dart Sass to compile stylesheets Instead of using sprockets and it's Sassc adapter we use Dart Sass to procompile assets and ship them in this gem. --- .gitignore | 1 + app/assets/builds/alchemy-devise.css | 1 + app/assets/builds/alchemy-devise.css.map | 1 + app/assets/stylesheets/alchemy-devise.scss | 2 +- .../alchemy/admin/alchemy-devise.css | 3 - .../alchemy/admin/passwords/edit.html.erb | 4 + .../alchemy/admin/passwords/new.html.erb | 4 + .../alchemy/admin/user_sessions/new.html.erb | 4 + app/views/alchemy/admin/users/index.html.erb | 4 + app/views/alchemy/admin/users/signup.html.erb | 4 + .../devise/install/install_generator.rb | 6 - package.json | 11 ++ yarn.lock | 124 ++++++++++++++++++ 13 files changed, 159 insertions(+), 10 deletions(-) create mode 100644 app/assets/builds/alchemy-devise.css create mode 100644 app/assets/builds/alchemy-devise.css.map delete mode 100644 app/assets/stylesheets/alchemy/admin/alchemy-devise.css create mode 100644 package.json create mode 100644 yarn.lock diff --git a/.gitignore b/.gitignore index 6bd5aa3..7ac4dec 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ Gemfile.lock /coverage/ /rdoc/ .ruby-* +/node_modules/ diff --git a/app/assets/builds/alchemy-devise.css b/app/assets/builds/alchemy-devise.css new file mode 100644 index 0000000..ec8c20e --- /dev/null +++ b/app/assets/builds/alchemy-devise.css @@ -0,0 +1 @@ +body.user_sessions,body.passwords{background-color:var(--color-blue_dark);color:var(--color-white)}body.user_sessions a,body.passwords a{color:var(--color-white)}body.user_sessions #errors,body.user_sessions .message.info,body.passwords #errors,body.passwords .message.info{border-color:rgba(0,0,0,0)}body.user_sessions #errors,body.passwords #errors{margin-left:157px}#logo{width:275px;height:auto;margin:0 0 1em 164px}.login_signup_box{position:absolute;width:450px;top:50%;left:50%;transform:translate(-60%, -50%)}.no-js .login_signup_box{display:none}.login_signup_box .message{margin-left:157px}.login_signup_box .link{text-align:right}.login_signup_box button.secondary{color:var(--color-white);border-color:var(--color-white)}form.user_roles .checkbox{display:inline-block;width:50%}/*# sourceMappingURL=alchemy-devise.css.map */ diff --git a/app/assets/builds/alchemy-devise.css.map b/app/assets/builds/alchemy-devise.css.map new file mode 100644 index 0000000..ac261f1 --- /dev/null +++ b/app/assets/builds/alchemy-devise.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../stylesheets/alchemy-devise/login.scss","../stylesheets/alchemy-devise/users.scss"],"names":[],"mappings":"AAAA,kCAEE,wCACA,yBAEA,sCACE,yBAGF,gHAEE,2BAGF,kDACE,kBAIJ,MACE,YACA,YACA,qBAGF,kBACE,kBACA,YACA,QACA,SACA,gCAEA,yBACE,aAGF,2BACE,kBAGF,wBACE,iBAGF,mCACE,yBACA,gCC5CF,0BACE,qBACA","file":"alchemy-devise.css"} \ No newline at end of file diff --git a/app/assets/stylesheets/alchemy-devise.scss b/app/assets/stylesheets/alchemy-devise.scss index de9acdf..774f34a 100644 --- a/app/assets/stylesheets/alchemy-devise.scss +++ b/app/assets/stylesheets/alchemy-devise.scss @@ -1 +1 @@ -@import "alchemy-devise/*"; +@import "alchemy-devise/login"; diff --git a/app/assets/stylesheets/alchemy/admin/alchemy-devise.css b/app/assets/stylesheets/alchemy/admin/alchemy-devise.css deleted file mode 100644 index 509830f..0000000 --- a/app/assets/stylesheets/alchemy/admin/alchemy-devise.css +++ /dev/null @@ -1,3 +0,0 @@ -/* - *= require alchemy-devise - */ diff --git a/app/views/alchemy/admin/passwords/edit.html.erb b/app/views/alchemy/admin/passwords/edit.html.erb index db35d1e..cc0e80f 100644 --- a/app/views/alchemy/admin/passwords/edit.html.erb +++ b/app/views/alchemy/admin/passwords/edit.html.erb @@ -1,3 +1,7 @@ +<%= content_for :stylesheets do %> + <%= stylesheet_link_tag "alchemy-devise" %> +<% end %> +
<%= image_tag 'alchemy/alchemy-logo.svg', id: 'logo' %> <% if @user.errors.blank? %> diff --git a/app/views/alchemy/admin/passwords/new.html.erb b/app/views/alchemy/admin/passwords/new.html.erb index 105ebec..d1d15b5 100644 --- a/app/views/alchemy/admin/passwords/new.html.erb +++ b/app/views/alchemy/admin/passwords/new.html.erb @@ -1,3 +1,7 @@ +<%= content_for :stylesheets do %> + <%= stylesheet_link_tag "alchemy-devise" %> +<% end %> +