From da09a739f64915faacb427b7d537779e258b5a5b Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sat, 28 Jan 2023 18:52:10 -0800 Subject: [PATCH] Fix remixes view on phones --- components/PartyDetails/index.scss | 68 ++++++++++++++++------ components/PartyDetails/index.tsx | 93 +++++++++++++++--------------- 2 files changed, 97 insertions(+), 64 deletions(-) diff --git a/components/PartyDetails/index.scss b/components/PartyDetails/index.scss index 00fc2b6e..de728ecf 100644 --- a/components/PartyDetails/index.scss +++ b/components/PartyDetails/index.scss @@ -3,11 +3,6 @@ flex-direction: column; margin: $unit-4x auto 0 auto; max-width: $grid-width; - padding-bottom: $unit-12x; - - @include breakpoint(phone) { - padding: 0 $unit; - } .PartyDetails { display: none; @@ -16,6 +11,10 @@ overflow: hidden; width: 100%; + @include breakpoint(phone) { + padding: 0 $unit; + } + &.Visible { // margin-bottom: $unit-12x; } @@ -147,6 +146,7 @@ } &.ReadOnly { + box-sizing: border-box; line-height: 1.4; white-space: pre-wrap; @@ -259,6 +259,7 @@ .PartyInfo { align-items: center; + box-sizing: border-box; display: flex; flex-direction: row; gap: $unit; @@ -267,6 +268,10 @@ max-width: $unit * 94; width: 100%; + @include breakpoint(phone) { + padding: 0 $unit; + } + .Left { flex-grow: 1; @@ -339,25 +344,50 @@ } } } +} - .Remixes { - display: flex; - flex-direction: column; - gap: $unit-2x; - width: 752px; +.Remixes { + display: flex; + flex-direction: column; + gap: $unit-2x; + width: 752px; - h3 { - font-size: $font-medium; - font-weight: $medium; + @include breakpoint(tablet) { + gap: $unit; + width: 100%; + } + + h3 { + font-size: $font-medium; + font-weight: $medium; + + @include breakpoint(phone) { + padding: 0 $unit; + } + } + + .GridRepCollection { + grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); + margin-left: $unit-2x * -1; + margin-right: $unit-2x * -1; + + @include breakpoint(tablet) { + grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); } - .GridRepCollection { - grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); - margin-left: $unit-2x * -1; - margin-right: $unit-2x * -1; + @include breakpoint(phone) { + grid-template-columns: 1fr; + margin-left: $unit * -1; + margin-right: $unit * -1; + max-width: inherit; + width: 100%; + } - .GridRep { - min-width: 200px; + .GridRep { + min-width: 200px; + + @include breakpoint(phone) { + min-width: 360px; } } } diff --git a/components/PartyDetails/index.tsx b/components/PartyDetails/index.tsx index f0b3d8a6..bdd5515d 100644 --- a/components/PartyDetails/index.tsx +++ b/components/PartyDetails/index.tsx @@ -702,57 +702,60 @@ const PartyDetails = (props: Props) => { } return ( -
-
-
-
-

- {name ? name : t('no_title')} -

- {party.remix && party.sourceParty ? ( - -
+
+ {renderUserBlock()} + {party.raid ? linkedRaidBlock(party.raid) : ''} + {party.created_at != '' ? ( + + ) : ( + '' + )} +
-
- {renderUserBlock()} - {party.raid ? linkedRaidBlock(party.raid) : ''} - {party.created_at != '' ? ( - +
+ {party.editable ? ( +
-
- {party.editable ? ( -
- {readOnly} - {editable} + {readOnly} + {editable} + + {deleteAlert()} +
{remixes && remixes.length > 0 ? remixSection() : ''} - {deleteAlert()} - + ) }