Skip to content

Commit

Permalink
front: fix stdcm rolling stock image display
Browse files Browse the repository at this point in the history
Signed-off-by: Theo Macron <[email protected]>
  • Loading branch information
Akctarus committed Nov 25, 2024
1 parent b4dd722 commit 84f2585
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const StdcmCard = ({
'align-items-center'
)}
>
<span>{name}</span>
<span className="stdcm-consist-title">{name}</span>
{title}
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const ConsistCardTitle = ({
if (!rollingStock) return null;

return (
<div className="stdcm-consist-img w-75 d-flex justify-content-end align-self-end">
<div className="stdcm-consist-img">
<RollingStock2Img rollingStock={rollingStock} />
</div>
);
Expand Down
19 changes: 19 additions & 0 deletions front/src/styles/scss/applications/stdcm/_home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,28 @@
.stdcm-consist-container {
width: 322px;

.stdcm-consist-title {
padding-right: 12px;
position: relative;
}

.stdcm-consist-title::after {
content: '';
background: linear-gradient(270deg, rgba(247, 246, 238, 0) 0%, rgb(235, 235, 234) 40%);
position: absolute;
top: 0;
left: 100%;
width: 12px;
height: 22px;
z-index: 1;
}

.stdcm-consist-img {
overflow: hidden;
padding-bottom: 12px;
img {
object-fit: cover;
object-position: left;
transform: scaleX(-1);
max-width: 100%;
height: 20px;
Expand Down

0 comments on commit 84f2585

Please sign in to comment.