diff --git a/lib/philomena_web/templates/commission/_directory_results.html.slime b/lib/philomena_web/templates/commission/_directory_results.html.slime index 52e2d163..c053fa9d 100644 --- a/lib/philomena_web/templates/commission/_directory_results.html.slime +++ b/lib/philomena_web/templates/commission/_directory_results.html.slime @@ -7,49 +7,49 @@ elixir: span.block__header__title Open Commissions = pagination - .block__content - = cond do - - Enum.any?(@commissions) -> - = for c <- @commissions do - .block.commission - .block__content.flex.flex--no-wrap - .flex__fixed.spacing-right - = render PhilomenaWeb.UserAttributionView, "_user_avatar.html", object: c, conn: @conn + .block__content + = cond do + - Enum.any?(@commissions) -> + = for c <- @commissions do + .block.commission + .block__content.flex.flex--no-wrap + .flex__fixed.spacing-right + = render PhilomenaWeb.UserAttributionView, "_user_avatar.html", object: c, conn: @conn + + .flex__grow.commission__listing_body + span.commission__listing_artist + = render PhilomenaWeb.UserAttributionView, "_user.html", object: c, badges: true, conn: @conn - .flex__grow.commission__listing_body - span.commission__listing_artist - = render PhilomenaWeb.UserAttributionView, "_user.html", object: c, badges: true, conn: @conn + .commission__listing__body_text + - {min, max} = Enum.min_max_by(c.items, & &1.base_price) + + p + strong> Price Range: + | $ + => Decimal.round(min.base_price, 2) |> Decimal.to_string() + | - $ + => Decimal.round(max.base_price, 2) |> Decimal.to_string() + ' USD + + p + strong> Categories: + = Enum.join(c.categories, ", ") - .commission__listing__body_text - - {min, max} = Enum.min_max_by(c.items, & &1.base_price) + p + strong> Offers: + = Enum.map(c.items, & &1.item_type) |> Enum.join(", ") + + p + strong> Example Artwork: - p - strong> Price Range: - | $ - => Decimal.round(min.base_price, 2) |> Decimal.to_string() - | - $ - => Decimal.round(max.base_price, 2) |> Decimal.to_string() - ' USD + br - p - strong> Categories: - = Enum.join(c.categories, ", ") - - p - strong> Offers: - = Enum.map(c.items, & &1.item_type) |> Enum.join(", ") - - p - strong> Example Artwork: + = for item <- Enum.take_random(c.items, 5) do + = render PhilomenaWeb.ImageView, "_image_container.html", image: item.example_image, size: :thumb_small, conn: @conn - br + p + strong + = link "More information", to: Routes.commission_path(@conn, :show, c) - = for item <- Enum.take_random(c.items, 5) do - = render PhilomenaWeb.ImageView, "_image_container.html", image: item.example_image, size: :thumb_small, conn: @conn - - p - strong - = link "More information", to: Routes.commission_path(@conn, :show, c) - - - true -> - p We couldn't find any commission listings to display. Sorry! \ No newline at end of file + - true -> + p We couldn't find any commission listings to display. Sorry! \ No newline at end of file