Skip to content

Commit 4a680c9

Browse files
committed
front: fix stdcm rolling stock image display
Signed-off-by: Theo Macron <[email protected]>
1 parent b4dd722 commit 4a680c9

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

front/src/applications/stdcm/components/StdcmForm/StdcmCard.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const StdcmCard = ({
2727
'align-items-center'
2828
)}
2929
>
30-
<span>{name}</span>
30+
<span className="stdcm-consist-title">{name}</span>
3131
{title}
3232
</div>
3333
)}

front/src/applications/stdcm/components/StdcmForm/StdcmConsist.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const ConsistCardTitle = ({
2727
if (!rollingStock) return null;
2828

2929
return (
30-
<div className="stdcm-consist-img w-75 d-flex justify-content-end align-self-end">
30+
<div className="stdcm-consist-img">
3131
<RollingStock2Img rollingStock={rollingStock} />
3232
</div>
3333
);

front/src/styles/scss/applications/stdcm/_home.scss

+18
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,27 @@
5151
.stdcm-consist-container {
5252
width: 322px;
5353

54+
.stdcm-consist-title {
55+
padding-right: 12px;
56+
position: relative;
57+
}
58+
59+
.stdcm-consist-title::after {
60+
content: '';
61+
background: linear-gradient(270deg, transparent 0px, rgba(235, 235, 234) 40px);
62+
position: absolute;
63+
left: 100%;
64+
width: 40px;
65+
height: 22px;
66+
z-index: 1;
67+
}
68+
5469
.stdcm-consist-img {
5570
overflow: hidden;
71+
padding-bottom: 12px;
5672
img {
73+
object-fit: cover;
74+
object-position: left;
5775
transform: scaleX(-1);
5876
max-width: 100%;
5977
height: 20px;

0 commit comments

Comments
 (0)