1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-28 09:24:24 +01:00

(feat) default image for machines

This commit is contained in:
Sylvain 2022-10-25 17:08:32 +02:00
parent c9901a89e1
commit 0c785aae06
4 changed files with 3 additions and 13 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -49,7 +49,7 @@ const MachineCard: React.FC<MachineCardProps> = ({ user, machine, onShowMachine,
}
return (
<div className="machine-picture" style={{ backgroundImage: `url(${machine.machine_image})` }} onClick={handleShowMachine} />
<div className="machine-picture" style={{ backgroundImage: `url(${machine.machine_image}), url('/default-image.png')` }} onClick={handleShowMachine} />
);
};

View File

@ -63,18 +63,8 @@
border-top-right-radius: 5px;
position: relative;
&.no-picture::before {
position: absolute;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
content: '\f03e';
font-family: 'Font Awesome 5 Free' !important;
font-weight: 900;
font-size: 80px;
color: #ebebeb;
&.no-picture {
background-image: url('../../../../images/default-image.png');
}
}

BIN
public/default-image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB