Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gin337 committed Sep 3, 2024
1 parent d5b563d commit cb3fb79
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
23 changes: 13 additions & 10 deletions src/components/MinecraftInventory/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* src/components/MinecraftInventory.module.css */

@font-face {
font-family: "Minecraftia";
src: url('/fonts/minecraftia/Minecraftia-Regular.ttf') format('truetype');
font-family: "Mojangles";
src: url('/fonts/mojangles/Mojangles.otf') format('truetype');
}

.inventoryContainer {
Expand Down Expand Up @@ -33,14 +33,14 @@
}

.header {
font-family: 'Minecraftia', sans-serif;
font-size: 14px;
font-family: 'Mojangles', sans-serif;
font-size: 15px;
color: #575757;
/* Neue Schriftfarbe */
position: absolute;
top: 8px;
top: 5px;
/* Mehr Abstand über dem Text */
left: 12px;
left: 10px;
/* Abstand vom linken Rand des Inventars */
line-height: 1;
margin-bottom: 8px;
Expand Down Expand Up @@ -113,18 +113,21 @@
/* Tooltip-Hintergrund */
color: #e7e7e7;
/* Angepasste Textfarbe */
padding: 10px 10px 0 10px;
border-radius: 5px;
border: 1px solid #300270;
/* Tooltip-Rand */
white-space: pre-wrap;
/* Erlaubt Zeilenumbrüche im Tooltip */
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
z-index: 10;
font-family: 'Minecraftia', sans-serif;
font-family: 'Mojangles', sans-serif;
/* Verwendung der Minecraftia-Schriftart */
font-size: 14px;
line-height: 1.5;
font-size: 16px;
/* Zeilenhöhe für bessere Lesbarkeit */
width: max-content !important;
line-height: 1;
}

.tooltipcontentwrapper {
padding: 10px 10px 5px;
}
4 changes: 3 additions & 1 deletion src/components/MinecraftSlot/MinecraftSlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ const MinecraftSlot: React.FC<MinecraftSlotProps> = (props) => {
<img src={convertToImageURL(props.itemName)} alt="" />
{props.tooltip && (
<div className={styles.tooltip}>
<MinecraftTextFormatter text={props.tooltip} />
<div className={styles.tooltipcontentwrapper}>
<MinecraftTextFormatter text={props.tooltip} />
</div>
</div>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ const MinecraftTextFormatter = ({ text }) => {
formattedText.push(
<span key={index} style={style}>
{part.split("\n").map((line, i) => (
<React.Fragment key={i}>
<div key={i}>
{line}
{i < part.split("\n").length - 1 && <br />}
</React.Fragment>
</div>
))}
</span>
);
Expand Down
Binary file added static/fonts/mojangles/Mojangles.otf
Binary file not shown.

0 comments on commit cb3fb79

Please sign in to comment.