forgor bem

This commit is contained in:
Luna D. 2024-05-03 23:17:19 +02:00
parent f5fa2c997f
commit 26518629a2
No known key found for this signature in database
GPG key ID: 4B1C63448394F688
3 changed files with 23 additions and 16 deletions

View file

@ -56,3 +56,10 @@
@define-mixin animated-transition { @define-mixin animated-transition {
transition: color var(--transition-animation-duration) ease, background var(--transition-animation-duration) ease; transition: color var(--transition-animation-duration) ease, background var(--transition-animation-duration) ease;
} }
@define-mixin subgrid {
display: grid;
grid-template-columns: 1 / -1;
grid: inherit;
grid-gap: inherit;
}

View file

@ -4,20 +4,20 @@ form .field {
margin-bottom: var(--padding-normal); margin-bottom: var(--padding-normal);
} }
form .form--two_column { form .form--two-column {
display: grid; display: grid;
grid: inherit; grid: inherit;
grid-template-columns: 1 / -1; grid-template-columns: 1 / -1;
gap: var(--padding-normal); gap: var(--padding-normal);
} }
form .form--two_column > .field, form .form--two_column > li { form .form--two-column > .field, form .form--two-column > li {
display: grid; display: grid;
grid-template-columns: auto 1fr; grid-template-columns: auto 1fr;
gap: var(--padding-normal); gap: var(--padding-normal);
} }
form .with_error { form .with-error {
display: block; display: block;
} }

View file

@ -7,26 +7,26 @@
.block__header .block__header
i.fa.fa-user i.fa.fa-user
span Essential user details span Essential user details
.block__content.form--two_column .block__content.form--two-column
.field .field
label Name: label Name:
.with_error .with-error
= error_tag f, :name = error_tag f, :name
= text_input f, :name, class: "input" = text_input f, :name, class: "input"
.field .field
label Email: label Email:
.with_error .with-error
= error_tag f, :email = error_tag f, :email
= text_input f, :email, class: "input" = text_input f, :email, class: "input"
.field .field
label Role: label Role:
.with_error = select f, :role, ["user", "assistant", "moderator", "admin"], class: "input" .with-error = select f, :role, ["user", "assistant", "moderator", "admin"], class: "input"
.field .field
label Secondary banner: label Secondary banner:
.with_error = select f, :secondary_role, [[key: "-", value: ""], "Site Developer", "Devops", "Philomena Contributor", "Public Relations"], class: "input" .with-error = select f, :secondary_role, [[key: "-", value: ""], "Site Developer", "Devops", "Philomena Contributor", "Public Relations"], class: "input"
.field .field
label Avatar label Avatar
.with_error .with-error
= link to: Routes.admin_user_avatar_path(@conn, :delete, @user), class: "button button--danger", data: [method: "delete", confirm: "Are you really, really sure?"] do = link to: Routes.admin_user_avatar_path(@conn, :delete, @user), class: "button button--danger", data: [method: "delete", confirm: "Are you really, really sure?"] do
i.fa.fa-trash i.fa.fa-trash
| Remove | Remove
@ -36,30 +36,30 @@
i.fa.fa-user-check i.fa.fa-user-check
span General user flags span General user flags
.block__content .block__content
ul.form--two_column ul.form--two-column
li li
.with_error = checkbox f, :hide_default_role, class: "checkbox" .with-error = checkbox f, :hide_default_role, class: "checkbox"
label Hide staff banner label Hide staff banner
li li
.with_error = checkbox f, :senior_staff, class: "checkbox" .with-error = checkbox f, :senior_staff, class: "checkbox"
label Senior staff label Senior staff
li li
.with_error = checkbox f, :bypass_rate_limits, class: "checkbox" .with-error = checkbox f, :bypass_rate_limits, class: "checkbox"
label Bypass rate limits label Bypass rate limits
ul.form--two_column = collection_checkboxes f, :roles, filtered_roles(general_permissions(), @roles), mapper: &checkbox_mapper/6 ul.form--two-column = collection_checkboxes f, :roles, filtered_roles(general_permissions(), @roles), mapper: &checkbox_mapper/6
.block.block--warning .block.block--warning
.block__header .block__header
i.fa.fa-handshake-angle i.fa.fa-handshake-angle
span Special roles for assistants span Special roles for assistants
.block__content .block__content
ul.form--two_column = collection_checkboxes f, :roles, filtered_roles(assistant_permissions(), @roles), mapper: &checkbox_mapper/6 ul.form--two-column = collection_checkboxes f, :roles, filtered_roles(assistant_permissions(), @roles), mapper: &checkbox_mapper/6
.block.block--danger .block.block--danger
.block__header .block__header
i.fa.fa-gavel i.fa.fa-gavel
span Special roles for moderators span Special roles for moderators
.block__content .block__content
ul.form--two_column = collection_checkboxes f, :roles, filtered_roles(moderator_permissions(), @roles), mapper: &checkbox_mapper/6 ul.form--two-column = collection_checkboxes f, :roles, filtered_roles(moderator_permissions(), @roles), mapper: &checkbox_mapper/6
= submit "Save User", class: "button" = submit "Save User", class: "button"