customize login screen and mmbers as landing page closes #68 and #137 #138

Merged
carla merged 5 commits from feature/68_log_in_screen into main 2025-08-21 13:49:43 +02:00
3 changed files with 10 additions and 4 deletions
Showing only changes of commit ddf9348eb8 - Show all commits

View file

@ -1,7 +1,7 @@
/* See the Tailwind configuration guide for advanced usage /* See the Tailwind configuration guide for advanced usage
https://tailwindcss.com/docs/configuration */ https://tailwindcss.com/docs/configuration */
@import "tailwindcss" source(none); @import "tailwindcss";
rafael marked this conversation as resolved Outdated

I'm trying to understand what this line did before 🤔 Looking at the tailwind docs here it seems like it disabled the scanning for tailwind classes completely? I have no idea why the phoenix generators would enable this by default. Do you know why this was in here?

I'm trying to understand what this line did before 🤔 Looking at [the tailwind docs here](https://tailwindcss.com/docs/detecting-classes-in-source-files#disabling-automatic-detection) it seems like it disabled the scanning for tailwind classes completely? I have no idea why the phoenix generators would enable this by default. Do you know why this was in here?

It came with the Phoenix upgrade to 1.8 but I have not found any information why...

It came with the Phoenix upgrade to 1.8 but I have not found any information why...

Ah, maybe it's because these lines below:

@source "../css";
@source "../js";
@source "../../lib/mv_web";

that explicitly register the sources tailwind should scan. So without this setting, tailwind will scan all files in the repository, I guess? Did the source(none) cause any problems for you?

Ah, maybe it's because these lines below: ``` @source "../css"; @source "../js"; @source "../../lib/mv_web"; ``` that explicitly register the sources tailwind should scan. So without this setting, tailwind will scan *all* files in the repository, I guess? Did the `source(none)` cause any problems for you?

Yes, the classes were not applied to the ash-authentication part of the loginscreen.

Yes, the classes were not applied to the ash-authentication part of the loginscreen.
@source "../css"; @source "../css";
@source "../js"; @source "../js";
@source "../../lib/mv_web"; @source "../../lib/mv_web";

View file

@ -12,6 +12,7 @@ module.exports = {
"../lib/mv_web.ex", "../lib/mv_web.ex",
"../lib/mv_web/**/*.*ex" "../lib/mv_web/**/*.*ex"
], ],
safelist: ['h-screen', 'px-6', 'h-screen', 'place-items-center', 'px-20', 'px-24'], // Classes that are used by AshAuthentication Sign-In Page are otherwise purged
rafael marked this conversation as resolved Outdated

Hmm, in the line above we configure tailwind to check the ash authentication files as well:

  content: [
    "../deps/ash_authentication_phoenix/**/*.*ex",
    ...

it seems like that's not working if we need to add the classes manually to the safelist?

Hmm, in the line above we configure tailwind to check the ash authentication files as well: ``` content: [ "../deps/ash_authentication_phoenix/**/*.*ex", ... ``` it seems like that's not working if we need to add the classes manually to the safelist?

No you are right, that was a leftover, if we set tailwindcss as in the other comment we do not need the safelist

No you are right, that was a leftover, if we set tailwindcss as in the other comment we do not need the safelist
theme: { theme: {
extend: { extend: {
colors: { colors: {

View file

@ -14,7 +14,12 @@ defmodule MvWeb.AuthOverrides do
# set :text_class, "bg-red-500" # set :text_class, "bg-red-500"
# end # end
# override AshAuthentication.Phoenix.Components.SignIn do override AshAuthentication.Phoenix.Components.SignIn do
# set :show_banner, false set :root_class, "min-w-md"
# end end
rafael marked this conversation as resolved Outdated

It seems like this makes the login form too wide on mobile screens. Maybe it should be max-w-md?

It seems like this makes the login form too wide on mobile screens. Maybe it should be `max-w-md`?
override AshAuthentication.Phoenix.Components.Banner do
set :text, "Mitgliederverwaltung"
set :image_url, nil
end
end end