From 9f0a8470e4fefc317dcac6ed2dde03a60d474c1b Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Mon, 11 Nov 2019 20:37:11 -0500 Subject: [PATCH] profile page tweaks --- lib/philomena_web/controllers/profile_controller.ex | 6 ++++-- lib/philomena_web/templates/profile/show.html.slime | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/philomena_web/controllers/profile_controller.ex b/lib/philomena_web/controllers/profile_controller.ex index eb8e6d8f..180227dc 100644 --- a/lib/philomena_web/controllers/profile_controller.ex +++ b/lib/philomena_web/controllers/profile_controller.ex @@ -23,7 +23,8 @@ defmodule PhilomenaWeb.ProfileController do must_not: filter, must: upload_query } - } + }, + sort: %{created_at: :desc} }, %{page_number: 1, page_size: 6}, Image |> preload([:tags]) @@ -37,7 +38,8 @@ defmodule PhilomenaWeb.ProfileController do must_not: filter, must: fave_query } - } + }, + sort: %{created_at: :desc} }, %{page_number: 1, page_size: 6}, Image |> preload([:tags]) diff --git a/lib/philomena_web/templates/profile/show.html.slime b/lib/philomena_web/templates/profile/show.html.slime index 619dcb37..903138bd 100644 --- a/lib/philomena_web/templates/profile/show.html.slime +++ b/lib/philomena_web/templates/profile/show.html.slime @@ -44,9 +44,9 @@ = 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 - .badge = badge_image(award.badge, alt: award.label, size: "32") + .badge = badge_image(award.badge, alt: award.label, width: "32", height: "32") br - = award.badge_name || badge.title + = (award.badge_name || award.badge.title) .flex__grow.center = pretty_time(award.awarded_on)