fix up user-facing pagination widgets

This commit is contained in:
byte[] 2020-12-11 11:53:40 -05:00
parent 92d7e3c30c
commit 358691711b
17 changed files with 135 additions and 126 deletions

View file

@ -84,7 +84,7 @@ a.block__header--single-item, .block__header a {
} }
} }
.block__header a, .block__header > span, .header__span { .block__header a, .header__span {
background: $block_header_color; background: $block_header_color;
} }
@ -96,7 +96,7 @@ a.block__header--single-item, .block__header a {
.block__header--light { .block__header--light {
background: $block_header_light_color; background: $block_header_light_color;
a, > span, .header__span { a, .header__span {
background: $block_header_light_color; background: $block_header_light_color;
} }

View file

@ -1,9 +1,9 @@
.imagelist__header { .page__header {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.imagelist__title, .imagelist__pagination { .page__title, .page__pagination {
display: inline-flex; display: inline-flex;
flex-wrap: nowrap; flex-wrap: nowrap;
flex-shrink: 0; flex-shrink: 0;
@ -14,16 +14,16 @@
} }
@media (max-width: $min_px_width_for_desktop_thumb) { @media (max-width: $min_px_width_for_desktop_thumb) {
.imagelist__title, .imagelist__options { .page__title, .page__options {
display: none; display: none;
} }
.imagelist__header, .imagelist__pagination, .imagelist__info { .page__header, .page__pagination, .page__info {
display: block; display: block;
text-align: center; text-align: center;
} }
.imagelist__pagination nav { .page__pagination nav {
display: flex; display: flex;
width: 100%; width: 100%;

View file

@ -9,8 +9,8 @@ h1 Livestreams
= submit "Search", class: "hform__button button" = submit "Search", class: "hform__button button"
.block .block
.block__header .block__header.page__header
= pagination .page__pagination = pagination
= if @conn.cookies["chan_nsfw"] == "true" do = if @conn.cookies["chan_nsfw"] == "true" do
a href=Routes.channel_nsfw_path(@conn, :delete) data-method="delete" a href=Routes.channel_nsfw_path(@conn, :delete) data-method="delete"
@ -25,8 +25,8 @@ h1 Livestreams
= for channel <- @channels do = for channel <- @channels do
= render PhilomenaWeb.ChannelView, "_channel_box.html", channel: channel, conn: @conn, subscriptions: @subscriptions = render PhilomenaWeb.ChannelView, "_channel_box.html", channel: channel, conn: @conn, subscriptions: @subscriptions
.block__header .block__header.page__header
= pagination .page__pagination = pagination
br br
= if can?(@conn, :create, Philomena.Channels.Channel) do = if can?(@conn, :create, Philomena.Channels.Channel) do

View file

@ -21,8 +21,9 @@ h2 Search Results
= render PhilomenaWeb.CommentView, "_comment_with_image.html", body: body, comment: comment, conn: @conn = render PhilomenaWeb.CommentView, "_comment_with_image.html", body: body, comment: comment, conn: @conn
.block .block
.block__header.block__header--light.flex .block__header.block__header--light.page__header
= pagination .page__pagination = pagination
.page__info
span.block__header__title span.block__header__title
= render PhilomenaWeb.PaginationView, "_pagination_info.html", page: @comments, conn: @conn = render PhilomenaWeb.PaginationView, "_pagination_info.html", page: @comments, conn: @conn

View file

@ -3,10 +3,10 @@ elixir:
pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @commissions, route: route, conn: @conn, params: [commission: @conn.params["commission"]] pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @commissions, route: route, conn: @conn, params: [commission: @conn.params["commission"]]
.block .block
.block__header .block__header.page__header
span.block__header__title Open Commissions span.block__header__title.page__title Open Commissions
= pagination .page__pagination = pagination
.page__options
= cond do = cond do
- not is_nil(@conn.assigns.current_user) and not is_nil(@conn.assigns.current_user.commission) -> - not is_nil(@conn.assigns.current_user) and not is_nil(@conn.assigns.current_user.commission) ->
= link "View my listing", to: Routes.profile_commission_path(@conn, :show, @conn.assigns.current_user) = link "View my listing", to: Routes.profile_commission_path(@conn, :show, @conn.assigns.current_user)

View file

@ -4,13 +4,14 @@ elixir:
h1 My Conversations h1 My Conversations
.block .block
.block__header .block__header.page__header
.page__pagination = pagination
.page__info
a href=Routes.conversation_path(@conn, :new) a href=Routes.conversation_path(@conn, :new)
i.fa.fa-paper-plane> i.fa.fa-paper-plane>
' Create New Conversation ' Create New Conversation
= pagination
.block__content .block__content
table.table.table--communication-list table.table.table--communication-list
thead thead
@ -39,5 +40,5 @@ h1 My Conversations
' &bull; ' &bull;
=> link "Hide", to: Routes.conversation_hide_path(@conn, :create, c), data: [method: "post"], data: [confirm: "Are you really, really sure?"] => link "Hide", to: Routes.conversation_hide_path(@conn, :create, c), data: [method: "post"], data: [confirm: "Are you really, really sure?"]
.block__header.block__header--light .block__header.block__header--light.page__header
= pagination .page__pagination = pagination

View file

@ -11,11 +11,12 @@ h1 = @conversation.title
=> link @conversation.title, to: Routes.conversation_path(@conn, :show, @conversation) => link @conversation.title, to: Routes.conversation_path(@conn, :show, @conversation)
' Conversation with ' Conversation with
=> render PhilomenaWeb.UserAttributionView, "_user.html", object: %{user: other}, conn: @conn => render PhilomenaWeb.UserAttributionView, "_user.html", object: %{user: other}, conn: @conn
.block__header--sub.block__header--light .block__header--sub.block__header--light.page__header
span.block__header__title> span.block__header__title.page__title>
=> @messages.total_entries => @messages.total_entries
= pluralize("message", "messages", @messages.total_entries) = pluralize("message", "messages", @messages.total_entries)
= pagination .page__pagination = pagination
.page__options
= if hidden_by?(@current_user, @conversation) do = if hidden_by?(@current_user, @conversation) do
= link "Restore conversation", to: Routes.conversation_hide_path(@conn, :delete, @conversation), data: [method: "delete"] = link "Restore conversation", to: Routes.conversation_hide_path(@conn, :delete, @conversation), data: [method: "delete"]
- else - else
@ -27,8 +28,8 @@ h1 = @conversation.title
= render PhilomenaWeb.MessageView, "_message.html", message: message, body: body, conn: @conn = render PhilomenaWeb.MessageView, "_message.html", message: message, body: body, conn: @conn
.block .block
.block__header.block__header--light .block__header.block__header--light.page__header
= pagination .page__pagination = pagination
= cond do = cond do
- @conn.assigns.current_ban -> - @conn.assigns.current_ban ->

View file

@ -34,9 +34,9 @@ h3 The List
- route = fn p -> Routes.dnp_entry_path(@conn, :index, p) end - route = fn p -> Routes.dnp_entry_path(@conn, :index, p) end
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @dnp_entries, route: route, conn: @conn - pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @dnp_entries, route: route, conn: @conn
.block__header .block__header.page__header
span.block__header__title The DNP List span.block__header__title.page__title The DNP List
= pagination .page__pagination = pagination
.block__content .block__content
table.table table.table
@ -71,5 +71,5 @@ h3 The List
td td
= link "More Info", to: Routes.dnp_entry_path(@conn, :show, entry) = link "More Info", to: Routes.dnp_entry_path(@conn, :show, entry)
.block__header .block__header.page__header
= pagination .page__pagination = pagination

View file

@ -4,9 +4,9 @@ h1 Duplicate Reports
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @duplicate_reports, route: route, conn: @conn, params: [states: @conn.params["states"] || ["open", "claimed"]] - pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @duplicate_reports, route: route, conn: @conn, params: [states: @conn.params["states"] || ["open", "claimed"]]
.block .block
.block__header .block__header.page__header
= pagination .page__pagination = pagination
.page__info
span.block__header__title Display only: span.block__header__title Display only:
=> link "Open (All)", to: Routes.duplicate_report_path(@conn, :index, states: ~W(open claimed)) => link "Open (All)", to: Routes.duplicate_report_path(@conn, :index, states: ~W(open claimed))
=> link "Open (Unclaimed)", to: Routes.duplicate_report_path(@conn, :index, states: ~W(open)) => link "Open (Unclaimed)", to: Routes.duplicate_report_path(@conn, :index, states: ~W(open))
@ -20,5 +20,5 @@ h1 Duplicate Reports
= render PhilomenaWeb.DuplicateReportView, "_list.html", duplicate_reports: @duplicate_reports, conn: @conn = render PhilomenaWeb.DuplicateReportView, "_list.html", duplicate_reports: @duplicate_reports, conn: @conn
.block .block
.block__header.block__header--light .block__header.block__header--light.page__header
= pagination .page__pagination = pagination

View file

@ -14,8 +14,9 @@ h1 = @forum.name
span.spacing-left span.spacing-left
=> @forum.topic_count => @forum.topic_count
' topics ' topics
.block__header--sub.block__header--light .block__header--sub.block__header--light.page__header
= pagination .page__pagination = pagination
.page__info
span.block__header__title = @forum.description span.block__header__title = @forum.description
= render PhilomenaWeb.Forum.SubscriptionView, "_subscription.html", forum: @forum, watching: @watching, conn: @conn = render PhilomenaWeb.Forum.SubscriptionView, "_subscription.html", forum: @forum, watching: @watching, conn: @conn
.block__content .block__content
@ -49,8 +50,8 @@ h1 = @forum.name
= render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: topic.last_post, conn: @conn = render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: topic.last_post, conn: @conn
br br
=> pretty_time(topic.last_post.created_at) => pretty_time(topic.last_post.created_at)
.block__header.block__header--light .block__header.block__header--light.page__header
= pagination .page__pagination = pagination
/- if current_user /- if current_user
/ = render partial: 'topics/form' / = render partial: 'topics/form'

View file

@ -31,8 +31,8 @@ elixir:
.column-layout__main .column-layout__main
.block .block
.block__header .block__header.page__header
= pagination .page__pagination = pagination
.block__content.js-resizable-media-container .block__content.js-resizable-media-container
= if Enum.any?(@galleries) do = if Enum.any?(@galleries) do
@ -43,5 +43,5 @@ elixir:
.block.block--fixed.block--no-margin.block--warning .block.block--fixed.block--no-margin.block--warning
' No galleries found! ' No galleries found!
.block__header.block__header--light .block__header.block__header--light.page__header
= pagination .page__pagination = pagination

View file

@ -7,15 +7,16 @@ elixir:
#sortable class=sortable_classes(@conn) #sortable class=sortable_classes(@conn)
.block#imagelist-container .block#imagelist-container
section.block__header.flex section.block__header.flex.page__header
span.block__header__title.hide-mobile span.block__header__title.page__title
span
' Viewing gallery ' Viewing gallery
strong> strong>
= @gallery.title = @gallery.title
= pagination .page__pagination = pagination
.flex__right .flex__right.page__options
= render PhilomenaWeb.ImageView, "_random_button.html", conn: @conn, params: scope = render PhilomenaWeb.ImageView, "_random_button.html", conn: @conn, params: scope
a href=Routes.gallery_report_path(@conn, :new, @gallery) a href=Routes.gallery_report_path(@conn, :new, @gallery)
@ -50,6 +51,7 @@ elixir:
' with ' with
=> @gallery.image_count => @gallery.image_count
= pluralize("image", "images", @gallery.image_count) = pluralize("image", "images", @gallery.image_count)
span.hide-mobile-t
' , last updated ' , last updated
= pretty_time(@gallery.updated_at) = pretty_time(@gallery.updated_at)
@ -75,8 +77,8 @@ elixir:
= for {image, hit} <- @gallery_images do = for {image, hit} <- @gallery_images do
= render PhilomenaWeb.ImageView, "_image_box.html", image: image, link: image_url.(image, hit), size: :thumb, conn: @conn = render PhilomenaWeb.ImageView, "_image_box.html", image: image, link: image_url.(image, hit), size: :thumb, conn: @conn
.block__header.block__header--light.flex .block__header.block__header--light.flex.page__header
= pagination .page__pagination = pagination
span.block__header__title span.block__header__title.page__info
= info = info

View file

@ -3,8 +3,9 @@ elixir:
pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @comments, route: route pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @comments, route: route
.block .block
.block__header .block__header.page__header
=<> pagination .page__pagination = pagination
.page__info
span.block__header__title span.block__header__title
=<> @image.comments_count =<> @image.comments_count
=> pluralize("comment", "comments", @image.comments_count) => pluralize("comment", "comments", @image.comments_count)
@ -17,5 +18,5 @@ elixir:
= render PhilomenaWeb.CommentView, "_comment.html", comment: comment, body: body, conn: @conn = render PhilomenaWeb.CommentView, "_comment.html", comment: comment, body: body, conn: @conn
.block .block
.block__header.block__header--light .block__header.block__header--light.page__header
= pagination .page__pagination = pagination

View file

@ -10,13 +10,13 @@ elixir:
info = render PhilomenaWeb.PaginationView, "_pagination_info.html", page: @images info = render PhilomenaWeb.PaginationView, "_pagination_info.html", page: @images
.block#imagelist-container .block#imagelist-container
section.block__header.imagelist__header.flex section.block__header.page__header.flex
span.block__header__title.imagelist__title.hide-mobile span.block__header__title.page__title.hide-mobile
=> header => header
.imagelist__pagination = pagination .page__pagination = pagination
.flex__right.imagelist__options .flex__right.page__options
= random_button @conn, params = random_button @conn, params
= hidden_toggle @conn, route, params = hidden_toggle @conn, route, params
= deleted_toggle @conn, route, params = deleted_toggle @conn, route, params
@ -33,13 +33,13 @@ elixir:
- image -> - image ->
= render PhilomenaWeb.ImageView, "_image_box.html", image: image, link: image_url.(image), size: assigns[:size] || :thumb, conn: @conn = render PhilomenaWeb.ImageView, "_image_box.html", image: image, link: image_url.(image), size: assigns[:size] || :thumb, conn: @conn
.block__header.block__header--light.imagelist__header.flex .block__header.block__header--light.page__header.flex
.imagelist__pagination = pagination .page__pagination = pagination
span.block__header__title.imagelist__info span.block__header__title.page__info
= info = info
.flex__right.imagelist__options .flex__right.page__options
a href="/settings/edit" title="Display Settings" a href="/settings/edit" title="Display Settings"
i.fa.fa-cog i.fa.fa-cog
span.hide-mobile.hide-limited-desktop<> span.hide-mobile.hide-limited-desktop<>

View file

@ -21,8 +21,9 @@ h2 Search Results
= render PhilomenaWeb.PostView, "_post.html", body: body, post: post, conn: @conn = render PhilomenaWeb.PostView, "_post.html", body: body, post: post, conn: @conn
.block .block
.block__header.block__header--light.flex .block__header.block__header--light.page__header
= pagination .page__pagination = pagination
.page__info
span.block__header__title span.block__header__title
= render PhilomenaWeb.PaginationView, "_pagination_info.html", page: @posts, conn: @conn = render PhilomenaWeb.PaginationView, "_pagination_info.html", page: @posts, conn: @conn

View file

@ -21,8 +21,9 @@ h2 Search Results
= render PhilomenaWeb.TagView, "_tag_list.html", tags: @tags, conn: @conn = render PhilomenaWeb.TagView, "_tag_list.html", tags: @tags, conn: @conn
.block .block
.block__header.block__header--light.flex .block__header.block__header--light.page__header
= pagination .page__pagination = pagination
.page__info
span.block__header__title span.block__header__title
= render PhilomenaWeb.PaginationView, "_pagination_info.html", page: @tags = render PhilomenaWeb.PaginationView, "_pagination_info.html", page: @tags

View file

@ -26,8 +26,6 @@ h1 = @topic.title
/ Header section / Header section
.block .block
.block__header .block__header
=> link("Forums", to: Routes.forum_path(@conn, :index))
' &raquo;
=> link(@forum.name, to: Routes.forum_path(@conn, :show, @forum)) => link(@forum.name, to: Routes.forum_path(@conn, :show, @forum))
' &raquo; ' &raquo;
=> link(@topic.title, to: Routes.forum_topic_path(@conn, :show, @forum, @topic)) => link(@topic.title, to: Routes.forum_topic_path(@conn, :show, @forum, @topic))
@ -36,12 +34,14 @@ h1 = @topic.title
a href=Routes.post_path(@conn, :index, pq: "topic_id:#{@topic.id}") a href=Routes.post_path(@conn, :index, pq: "topic_id:#{@topic.id}")
i.fa.fa-fw.fa-search> i.fa.fa-fw.fa-search>
' Search Posts ' Search Posts
.flex.flex--wrap.block__header.block__header--light .flex.flex--wrap.block__header.block__header--light.page__header
.flex--fixed .flex--fixed.page__pagination
= pagination = pagination
.flex--fixed.block__header__item .flex--fixed.block__header__item.page__options
' Started by ' Started by
=> render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: @topic, conn: @conn => render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: @topic, conn: @conn
.page__info
.flex.flex--center-distributed
.flex--fixed.block__header__item .flex--fixed.block__header__item
' Posted ' Posted
=< pretty_time(@topic.created_at) =< pretty_time(@topic.created_at)
@ -67,8 +67,8 @@ h1 = @topic.title
/ Footer section / Footer section
.block .block
.block__header.block__header--light .block__header.block__header--light.page__header
= pagination .page__pagination = pagination
= if @topic.locked_at do = if @topic.locked_at do
.block.block--fixed.block--warning .block.block--fixed.block--warning