Spaces:
Paused
Paused
Savestate: Fix flashcard cutting off bug
Browse files- index.html +1 -1
- src/styles/learn.css +6 -2
- src/views/learn/learn-view.js +15 -17
index.html
CHANGED
|
@@ -74,7 +74,7 @@
|
|
| 74 |
</head>
|
| 75 |
<body class="dark-theme in-chat-view">
|
| 76 |
|
| 77 |
-
<div id="live-version-badge" style="position: fixed; top: 50px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--text-secondary); opacity: 0.6; z-index: 99999; pointer-events: none; font-weight: 500; font-family: monospace; letter-spacing: 1px; background: rgba(0,0,0,0.2); padding: 2px 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.05);">BUILD 1.8.
|
| 78 |
|
| 79 |
<!-- SVG Filters for Liquid Glass Refraction -->
|
| 80 |
<svg width="0" height="0" style="position: absolute; pointer-events: none;">
|
|
|
|
| 74 |
</head>
|
| 75 |
<body class="dark-theme in-chat-view">
|
| 76 |
|
| 77 |
+
<div id="live-version-badge" style="position: fixed; top: 50px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--text-secondary); opacity: 0.6; z-index: 99999; pointer-events: none; font-weight: 500; font-family: monospace; letter-spacing: 1px; background: rgba(0,0,0,0.2); padding: 2px 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.05);">BUILD 1.8.292</div>
|
| 78 |
|
| 79 |
<!-- SVG Filters for Liquid Glass Refraction -->
|
| 80 |
<svg width="0" height="0" style="position: absolute; pointer-events: none;">
|
src/styles/learn.css
CHANGED
|
@@ -86,6 +86,8 @@
|
|
| 86 |
max-width: 380px;
|
| 87 |
aspect-ratio: 3/4;
|
| 88 |
margin-bottom: 30px;
|
|
|
|
|
|
|
| 89 |
}
|
| 90 |
|
| 91 |
.flashcard-wrapper {
|
|
@@ -168,11 +170,13 @@
|
|
| 168 |
display: flex;
|
| 169 |
flex-direction: column;
|
| 170 |
align-items: center;
|
| 171 |
-
justify-content:
|
| 172 |
-
padding: 30px;
|
| 173 |
background: #121216;
|
| 174 |
/* Use inset shadow instead of border to prevent 3D sub-pixel bleeding on Chromium/Android */
|
| 175 |
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
|
|
|
|
|
|
|
| 176 |
}
|
| 177 |
|
| 178 |
/* The Progressive Blur Magic */
|
|
|
|
| 86 |
max-width: 380px;
|
| 87 |
aspect-ratio: 3/4;
|
| 88 |
margin-bottom: 30px;
|
| 89 |
+
min-height: 0; /* Allow shrinking on small screens */
|
| 90 |
+
flex-shrink: 1;
|
| 91 |
}
|
| 92 |
|
| 93 |
.flashcard-wrapper {
|
|
|
|
| 170 |
display: flex;
|
| 171 |
flex-direction: column;
|
| 172 |
align-items: center;
|
| 173 |
+
justify-content: flex-start;
|
| 174 |
+
padding: 40px 24px 30px 24px;
|
| 175 |
background: #121216;
|
| 176 |
/* Use inset shadow instead of border to prevent 3D sub-pixel bleeding on Chromium/Android */
|
| 177 |
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
|
| 178 |
+
overflow-y: auto;
|
| 179 |
+
overflow-x: hidden;
|
| 180 |
}
|
| 181 |
|
| 182 |
/* The Progressive Blur Magic */
|
src/views/learn/learn-view.js
CHANGED
|
@@ -939,27 +939,25 @@ Antworte AUSSCHLIESSLICH mit einem validen JSON-Objekt ohne Markdown-Block drumh
|
|
| 939 |
const parsedExample = parseBold(examplePart);
|
| 940 |
|
| 941 |
htmlContent = `
|
| 942 |
-
<div style="
|
| 943 |
-
|
| 944 |
-
<div style="
|
| 945 |
-
|
| 946 |
-
|
| 947 |
-
|
| 948 |
-
|
| 949 |
-
|
|
|
|
|
|
|
|
|
|
| 950 |
</div>
|
| 951 |
-
<div style="width: 40px; height: 4px; background: var(--primary); border-radius: 2px; margin: 0 auto 20px auto;"></div>
|
| 952 |
-
<p style="color: var(--text-secondary); line-height: 1.5; font-size: 14px; text-align: center;">
|
| 953 |
-
Bewerte nun, wie gut du die Antwort wusstest.
|
| 954 |
-
</p>
|
| 955 |
`;
|
| 956 |
} else {
|
| 957 |
htmlContent = `
|
| 958 |
-
<
|
| 959 |
-
|
| 960 |
-
|
| 961 |
-
|
| 962 |
-
</p>
|
| 963 |
`;
|
| 964 |
}
|
| 965 |
|
|
|
|
| 939 |
const parsedExample = parseBold(examplePart);
|
| 940 |
|
| 941 |
htmlContent = `
|
| 942 |
+
<div style="margin: auto 0; width: 100%; display: flex; flex-direction: column; align-items: center; box-sizing: border-box;">
|
| 943 |
+
<div style="font-size: 26px; font-weight: bold; color: var(--text-primary); text-align: center; margin-bottom: 24px;">${parsedTranslation}</div>
|
| 944 |
+
<div style="text-align: left; width: 100%; padding: 16px; background: rgba(0,0,0,0.3); border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); font-size: 14px; line-height: 1.5; color: rgba(255,255,255,0.85); margin-bottom: 24px; box-shadow: inset 0 2px 10px rgba(0,0,0,0.2); box-sizing: border-box;">
|
| 945 |
+
<div style="color: var(--primary); font-weight: bold; font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 6px;">Erklärung</div>
|
| 946 |
+
<div style="margin-bottom: 16px;">${parsedRest}</div>
|
| 947 |
+
${parsedExample ? `
|
| 948 |
+
<div style="color: var(--primary); font-weight: bold; font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 6px;">Beispiel</div>
|
| 949 |
+
<div><i>"${parsedExample}"</i></div>
|
| 950 |
+
` : ''}
|
| 951 |
+
</div>
|
| 952 |
+
<div style="font-size: 14px; color: var(--text-secondary); text-align: center;">Bewerte nun, wie gut du die Antwort wusstest.</div>
|
| 953 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 954 |
`;
|
| 955 |
} else {
|
| 956 |
htmlContent = `
|
| 957 |
+
<div style="margin: auto 0; width: 100%; display: flex; flex-direction: column; align-items: center; box-sizing: border-box;">
|
| 958 |
+
<div style="font-size: 24px; font-weight: bold; color: var(--text-primary); text-align: center; margin-bottom: 24px;">${formattedBack}</div>
|
| 959 |
+
<div style="font-size: 14px; color: var(--text-secondary); text-align: center;">Bewerte nun, wie gut du die Antwort wusstest.</div>
|
| 960 |
+
</div>
|
|
|
|
| 961 |
`;
|
| 962 |
}
|
| 963 |
|