profile page appearance

This commit is contained in:
Luna D. 2024-06-13 00:01:15 +02:00
parent 66f91be92a
commit c2c4a0b943
No known key found for this signature in database
GPG key ID: 4B1C63448394F688
4 changed files with 94 additions and 61 deletions

View file

@ -104,7 +104,9 @@
}
.block__header > .fa,
.block__header--single-item > .fa {
.block__header--single-item > .fa,
.block__header > span .fa,
.block__header--single-item > span .fa {
margin-right: var(--padding-normal);
}

View file

@ -1,19 +1,15 @@
.block__content.profile-about
= cond do
- @user.description not in [nil, ""] ->
= @about_me
p
= cond do
- @user.description not in [nil, ""] ->
= @about_me
- current?(@user, @conn.assigns.current_user) ->
em
' Want to
=> link "add some info about yourself?", to: ~p"/profiles/#{@user}/description/edit"
- current?(@user, @conn.assigns.current_user) ->
span: i.fa.icon--padded--right.fa-info-circle
em
' Want to
=> link "add some info about yourself?", to: ~p"/profiles/#{@user}/description/edit"
- true ->
| No description provided.
= if can?(@conn, :edit_description, @user) do
= if @user.description not in [nil, ""] do
hr.separator.separator--secondary
a.button href=~p"/profiles/#{@user}/description/edit"
i.fa.fa-edit>
| Edit
- true ->
span: i.fa.icon--padded--right.fa-info-circle
| No description provided.

View file

@ -24,6 +24,7 @@
= link "More information", to: ~p"/profiles/#{@user}/commission"
- current?(@user, @conn.assigns.current_user) ->
span: i.fa.icon--padded--right.fa-info-circle
= if Enum.any?(@conn.assigns.user.verified_links) do
em
' You don't have any commission information listed yet.
@ -36,3 +37,6 @@
' to set one up.
- true ->
p
span: i.fa.icon--padded--right.fa-info-circle
| No commission listing set up

View file

@ -66,9 +66,15 @@
= render PhilomenaWeb.ProfileView, "_commission.html", user: @user, commission_information: @commission_information, conn: @conn
.block
.block__header
i.fa.fa-link
| Artist Links
.block__header.flex
span
i.fa.fa-link
| Artist Links
= if current?(@user, @conn.assigns.current_user) or manages_links?(@conn, @user) do
.block__header__buttons
a.button href=~p"/profiles/#{@user}/artist_links/new"
i.fa.fa-link>
| Create
= for link <- @user.verified_links, should_see_link?(@conn, @user, link) do
- watchers = if link.tag, do: @watcher_counts[link.tag.id] || 0, else: 0
@ -101,16 +107,22 @@
=> unless link.public do
br
' Hidden
= if Enum.count(@user.verified_links) == 0 do
.block__content
p
span: i.fa.icon--padded--right.fa-info-circle
| No artist links associated
= if current?(@user, @conn.assigns.current_user) or manages_links?(@conn, @user) do
.block__content.alternating-color.break-word
a.button href=~p"/profiles/#{@user}/artist_links/new"
i.fa.fa-link>
| Create an Artist Link
.block
.block__header
i.fa.fa-award
| Badges
.block__header.flex
span
i.fa.fa-award
| Badges
= if manages_awards?(@conn) and not hide_staff_tools?(@conn) do
.block__header__buttons
a.button href=~p"/profiles/#{@user}/awards/new"
i.fa.fa-trophy>
| Award
= for award <- award_order(@user.awards) do
.block__content.flex.flex--centered.flex--center-distributed.alternating-color.no-overflow title=award.label
.flex__grow.center
@ -129,49 +141,68 @@
br
a href=~p"/profiles/#{@user}/awards/#{award}/edit"
' Edit
= if manages_awards?(@conn) and not hide_staff_tools?(@conn) do
.block__content.alternating-color.no-overflow
a.button href=~p"/profiles/#{@user}/awards/new"
i.fa.fa-trophy>
| Award a badge
= if Enum.count(@user.awards) == 0 do
.block__content
p
span: i.fa.icon--padded--right.fa-info-circle
| No badge awards received
.block
.block__header
i.fa.fa-question
| About Me
.block__header.flex
span
i.fa.fa-question
| About Me
= if can?(@conn, :edit_description, @user) do
.block__header__buttons
a.button href=~p"/profiles/#{@user}/description/edit"
i.fa.fa-edit>
| Edit
= render PhilomenaWeb.ProfileView, "_about_me.html", user: @user, about_me: @about_me, conn: @conn
= if can_read_mod_notes?(@conn) and not hide_staff_tools?(@conn) do
.block.block--warning
.block__header
i.fa.fa-sticky-note
| Mod Notes
table.table
thead
tr
th Note
th Created
tbody
= for {body, mod_note} <- @mod_notes do
tr
td = body
td = pretty_time(mod_note.created_at)
.block__header.flex
span
i.fa.fa-sticky-note
| Mod Notes
.block__header__buttons
a.button href=~p"/profiles/#{@user}/details"
i.fa.fa-plus>
| Edit
.block__content
a.button href=~p"/profiles/#{@user}/details"
i.fa.fa-plus>
| Edit mod notes
= if Enum.count(@mod_notes) > 0 do
table.table
thead
tr
th Note
th Created
tbody
= for {body, mod_note} <- @mod_notes do
tr
td = body
td = pretty_time(mod_note.created_at)
- else
p
span: i.fa.icon--padded--right.fa-info-circle
| No mod notes
= if can_index_user?(@conn) do
.block.block--warning
.block__header
i.fa.fa-clipboard
| Moderation Scratchpad
.block__header.flex
span
i.fa.fa-clipboard
| Moderation Scratchpad
.block__header__buttons
a.button href=~p"/profiles/#{@user}/scratchpad/edit"
i.fa.fa-edit>
| Edit
.block__content.profile-about
= @scratchpad
.block__content
a.button href=~p"/profiles/#{@user}/scratchpad/edit"
i.fa.fa-edit>
| Edit
- {_, contents} = @scratchpad
= if String.trim(contents) != "" do
= @scratchpad
- else
p
span: i.fa.icon--padded--right.fa-info-circle
| No information present
.column-layout__main
= render PhilomenaWeb.ProfileView, "_statistics.html", user: @user, statistics: @statistics, conn: @conn