diff --git a/app/assets/stylesheets/alt_styles/index.sass b/app/assets/stylesheets/alt_styles/index.sass index 57c6dbc3..5c6c3d86 100644 --- a/app/assets/stylesheets/alt_styles/index.sass +++ b/app/assets/stylesheets/alt_styles/index.sass @@ -1,17 +1,3 @@ -.alt-styles-header - margin-top: 1em - margin-bottom: .5em - -.alt-styles-list - list-style: none - display: flex - flex-wrap: wrap - gap: 1.5em - -.alt-style - text-align: center - width: 80px - -.alt-style-thumbnail - width: 80px - height: 80px +.rainbow-pool-list + .name span + display: inline-block diff --git a/app/models/alt_style.rb b/app/models/alt_style.rb index 2e77a22d..e8a4f5d6 100644 --- a/app/models/alt_style.rb +++ b/app/models/alt_style.rb @@ -24,11 +24,13 @@ class AltStyle < ApplicationRecord order("DATE(created_at) DESC") } - def name + def pet_name I18n.translate('pet_types.human_name', color_human_name: color.human_name, species_human_name: species.human_name) end + alias_method :name, :pet_name + # If the series_name hasn't yet been set manually by support staff, show the # string "" instead. But it won't be searchable by that string—that is, # `fits:-faerie-draik` intentionally will not work, and the canonical diff --git a/app/views/alt_styles/_alt_style.html.haml b/app/views/alt_styles/_alt_style.html.haml index 518a6a1d..e17e2be6 100644 --- a/app/views/alt_styles/_alt_style.html.haml +++ b/app/views/alt_styles/_alt_style.html.haml @@ -1,4 +1,6 @@ %li = link_to view_or_edit_alt_style_url(alt_style) do = image_tag alt_style.preview_image_url, class: "preview", loading: "lazy" - .name= alt_style.name \ No newline at end of file + .name + %span= alt_style.series_name + %span= alt_style.pet_name \ No newline at end of file