Move item description into header

This commit is contained in:
Emi Matchu 2024-01-21 05:07:45 -08:00
parent e4fb067e45
commit e8832f2c36
4 changed files with 71 additions and 80 deletions

View file

@ -6,22 +6,12 @@ body.items-show
.item-header .item-header
+item-header +item-header
#item-info-section
display: grid
grid-template-areas: "info form"
grid-template-columns: 1fr auto
#item-info
grid-area: info
#your-items-form #your-items-form
grid-area: form
border: 1px solid $module-border-color border: 1px solid $module-border-color
font-size: 85% font-size: 85%
margin-bottom: 3em margin-bottom: 2em
margin-left: 1em margin-left: auto
margin-right: auto
padding: 1em padding: 1em
width: 30em width: 30em

View file

@ -2,11 +2,10 @@
=item-header =item-header
border-bottom: 1px solid $module-border-color border-bottom: 1px solid $module-border-color
margin-top: 1em
margin-bottom: 1em margin-bottom: 1em
.item-header-main .item-header-main
padding: 1em 0
display: grid display: grid
grid-template-areas: "img gap1" "img name" "img links" "img gap2" "nav nav" grid-template-areas: "img gap1" "img name" "img links" "img gap2" "nav nav"
align-items: center align-items: center
@ -36,6 +35,10 @@
font-size: 75% font-size: 75%
margin-left: 1em margin-left: 1em
.item-description
margin-top: .5em
margin-bottom: 1em
.item-subpages-nav .item-subpages-nav
display: flex display: flex
align-items: flex-end align-items: flex-end

View file

@ -21,6 +21,8 @@
= link_to t('items.show.resources.trading_post'), trading_post_url_for(item) = link_to t('items.show.resources.trading_post'), trading_post_url_for(item)
= link_to t('items.show.resources.auction_genie'), auction_genie_url_for(item) = link_to t('items.show.resources.auction_genie'), auction_genie_url_for(item)
%p.item-description= @item.description
%nav.item-subpages-nav %nav.item-subpages-nav
= link_to t('items.show.subpages_nav.preview'), item, = link_to t('items.show.subpages_nav.preview'), item,
class: ['preview-link'], 'data-is-current' => current_subpage == 'preview' class: ['preview-link'], 'data-is-current' => current_subpage == 'preview'

View file

@ -4,11 +4,7 @@
= render partial: "item_header", = render partial: "item_header",
locals: {item: @item, trades: @trades, current_subpage: "preview"} locals: {item: @item, trades: @trades, current_subpage: "preview"}
%section#item-info-section - if user_signed_in?
#item-info
%p= @item.description
- if user_signed_in?
#your-items-form #your-items-form
%h3 %h3
= t '.closet_hangers.header_html', = t '.closet_hangers.header_html',