diff --git a/components/Button/index.scss b/components/Button/index.scss index 60aea5b9..4c6415e5 100644 --- a/components/Button/index.scss +++ b/components/Button/index.scss @@ -10,7 +10,8 @@ gap: 6px; &:hover, - &.Blended:hover { + &.Blended:hover, + &.Blended.Active { background: var(--button-bg-hover); cursor: pointer; color: var(--button-text-hover); diff --git a/components/CharacterGrid/index.scss b/components/CharacterGrid/index.scss index 4a45134f..be6aa48e 100644 --- a/components/CharacterGrid/index.scss +++ b/components/CharacterGrid/index.scss @@ -12,7 +12,7 @@ padding: 0; max-width: 761px; - @media (max-width: $medium-screen) { + @include breakpoint(tablet) { justify-content: space-between; width: 100%; } @@ -20,7 +20,7 @@ & > * { margin-right: $unit * 3; - @media (max-width: $medium-screen) { + @include breakpoint(tablet) { margin-right: inherit; } } diff --git a/components/CharacterUnit/index.scss b/components/CharacterUnit/index.scss index e2f2736d..d2f611e5 100644 --- a/components/CharacterUnit/index.scss +++ b/components/CharacterUnit/index.scss @@ -56,7 +56,7 @@ height: auto; width: 131px; - @media (max-width: $medium-screen) { + @include breakpoint(tablet) { width: 17vw; } diff --git a/components/Dialog/index.scss b/components/Dialog/index.scss index 3ffd9616..5ca5967f 100644 --- a/components/Dialog/index.scss +++ b/components/Dialog/index.scss @@ -22,7 +22,7 @@ text-decoration: underline; } - @media (max-width: $phone) { + @include breakpoint(phone) { min-width: inherit; min-height: inherit; width: 100%; diff --git a/components/ExtraSummons/index.scss b/components/ExtraSummons/index.scss index f8dad9c6..86a7c794 100644 --- a/components/ExtraSummons/index.scss +++ b/components/ExtraSummons/index.scss @@ -10,7 +10,7 @@ position: relative; left: 9px; - @media (max-width: $medium-screen) { + @include breakpoint(phone) { left: auto; max-width: auto; width: 100%; diff --git a/components/ExtraWeapons/index.scss b/components/ExtraWeapons/index.scss index eedc2514..8bdcfdaf 100644 --- a/components/ExtraWeapons/index.scss +++ b/components/ExtraWeapons/index.scss @@ -10,7 +10,7 @@ position: relative; left: 8px; - @media (max-width: $medium-screen) { + @include breakpoint(tablet) { left: auto; max-width: auto; width: 100%; diff --git a/components/FilterBar/index.scss b/components/FilterBar/index.scss index 88c2c3ea..c0b2623d 100644 --- a/components/FilterBar/index.scss +++ b/components/FilterBar/index.scss @@ -15,7 +15,7 @@ width: 100%; max-width: 996px; - @media (max-width: $tablet) { + @include breakpoint(tablet) { position: static; flex-direction: column; width: 100%; @@ -29,7 +29,7 @@ gap: $unit; width: auto; - @media (max-width: $tablet) { + @include breakpoint(tablet) { flex-direction: column; width: 100%; } @@ -64,7 +64,7 @@ background-color: var(--select-contained-bg-hover); } - @media (max-width: $tablet) { + @include breakpoint(tablet) { width: 100%; max-width: inherit; text-align: center; diff --git a/components/GridRep/index.scss b/components/GridRep/index.scss index 0ac43f8e..f36667a1 100644 --- a/components/GridRep/index.scss +++ b/components/GridRep/index.scss @@ -2,11 +2,12 @@ aspect-ratio: 3/2; border-radius: $card-corner; box-sizing: border-box; - display: flex; - flex-direction: column; + display: grid; + grid-template-rows: 1fr 1fr; gap: $unit; padding: $unit-2x; - max-width: 320px; + min-width: 320px; + width: 100%; &:hover { background: var(--grid-rep-hover); @@ -20,48 +21,58 @@ cursor: pointer; } - .Grid .weapon { + .Grid .Weapon { box-shadow: inset 0 0 0 1px var(--grid-border-color); } + + @include breakpoint(phone) { + background: inherit; + + .Grid .Weapon { + box-shadow: none; + } + } } - .Grid { - display: flex; - flex-direction: row; - flex-shrink: 0; - gap: $unit; + & > .Grid { + aspect-ratio: 2/1; + display: grid; + grid-template-columns: 1fr 3fr; /* left column takes up 1 fraction, right column takes up 3 fractions */ + grid-template-rows: repeat( + 3, + 1fr + ); /* create 3 rows, each taking up 1 fraction */ + grid-gap: $unit; /* add a gap of 8px between grid items */ - .weapon { + .Weapon { background: var(--card-bg); border-radius: 4px; } - .grid_mainhand { - $d: 64px; - aspect-ratio: 200 / 418; - height: auto; - max-width: $d; - min-width: $d; + .Mainhand.Weapon { + grid-column: 1 / 2; /* spans one column */ } - .grid_weapons { - $p: 29.5%; - box-sizing: border-box; - display: grid; - grid-template-columns: fit-content($p) fit-content($p) fit-content($p); - grid-template-rows: fit-content($p) fit-content($p) fit-content($p); + .GridWeapons { + display: grid; /* make the right-images container a grid */ + grid-template-columns: repeat( + 3, + 1fr + ); /* create 3 columns, each taking up 1 fraction */ + grid-template-rows: repeat( + 3, + 1fr + ); /* create 3 rows, each taking up 1 fraction */ gap: $unit; - margin: 0; - padding: 0; - width: 100%; } - .grid_weapon { + .Grid.Weapon { aspect-ratio: 160 / 92; + display: grid; } - .grid_mainhand img[src*='jpg'], - .grid_weapon img[src*='jpg'] { + .Mainhand.Weapon img[src*='jpg'], + .Grid.Weapon img[src*='jpg'] { border-radius: 4px; width: 100%; height: 100%; diff --git a/components/GridRep/index.tsx b/components/GridRep/index.tsx index 105bbfbd..f1b2c6af 100644 --- a/components/GridRep/index.tsx +++ b/components/GridRep/index.tsx @@ -212,15 +212,12 @@ const GridRep = (props: Props) => { {props.displayUser ? detailsWithUsername : details}
-
{generateMainhandImage()}
+
{generateMainhandImage()}
-
+ ) + } + + const saveButton = () => { + if (party.favorited) + return ( +