Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #1

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix
gin337 committed Sep 3, 2024
commit cb3fb79cf536b42f96b83f8a94413624602f8905
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 {
@@ -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;
@@ -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
@@ -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>
Original file line number Diff line number Diff line change
@@ -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>
);
Binary file added static/fonts/mojangles/Mojangles.otf
Binary file not shown.