Spaces:
Running
Running
File size: 9,500 Bytes
6cfd402 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 |
.container p {
padding-top: 1rem;
}
/* Add new custom column class */
.is-five-sixths {
flex: none;
width: 87.5%;
}
html {
scroll-behavior: smooth;
}
a.anchor-link {
margin-left: 0.15em;
color: inherit;
text-decoration: none;
opacity: 0;
transition: opacity 0.2s;
font-size: 0.6em;
position: relative;
top: -0.15em;
cursor: pointer;
}
/* Show the anchor link on hover */
h2[id]:hover a.anchor-link {
opacity: 1;
}
.progressive-image-container {
position: relative;
overflow: hidden;
}
.progressive-image {
opacity: 0;
transition: opacity 0.3s ease-in;
}
.progressive-image.loaded {
opacity: 1;
}
.image-placeholder {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #f0f0f0;
display: flex;
align-items: center;
justify-content: center;
}
.spinner {
width: 40px;
height: 40px;
border: 4px solid #f3f3f3;
border-top: 4px solid #3273dc;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Update the cached-sentence-builder width and layout */
#cached-section .cached-sentence-builder {
flex-grow: 1;
width: 100%; /* Changed from fixed 512px to 100% */
padding: 0px 23px; /* Keep existing padding */
max-width: 512px; /* Add max-width that matches the grid container */
}
/* Update the current sentence display */
#cached-section #cached-current-sentence {
margin-top: 10px;
padding: 15px;
background-color: #f5f5f5;
border-radius: 8px;
min-height: 30px;
font-family: monospace;
width: 100%; /* Ensure it takes full width of its container */
box-sizing: border-box; /* Include padding in width calculation */
white-space: pre-wrap; /* Allow text to wrap */
word-break: break-word; /* Break long words if needed */
}
/* Add styles for the response text */
#cached-section #cached-response-text {
margin-top: 8px;
padding: 15px;
background-color: #e6f7ff;
border-radius: 8px;
min-height: 30px;
font-family: monospace;
width: 100%;
box-sizing: border-box;
white-space: pre-wrap;
word-break: break-word;
display: block; /* Changed from none to block */
}
/* Adjust the main container spacing */
#cached-section .cached-main-container {
display: flex;
max-width: 1050px; /* Reduced from 1200px */
margin: 0 auto; /* Center the container */
gap: 40px; /* Increased from 20px for more balanced spacing */
align-items: flex-start;
padding: 0 20px; /* Add padding to prevent edge touching */
}
#cached-section .cached-grid-container {
position: relative;
width: 512px;
height: 512px;
}
/* Add styles for the reset buttons */
#cached-section .cached-reset-buttons {
display: flex;
gap: 10px;
margin-top: 5px;
margin-bottom: 15px;
justify-content: flex-start;
flex-wrap: wrap; /* Changed from nowrap to wrap to handle different screen sizes */
overflow-x: visible; /* Changed from auto to visible since we're allowing wrapping */
padding-bottom: 5px;
width: 100%; /* Added to ensure it takes full width */
}
#cached-section .cached-reset-button {
padding: 8px 15px;
background-color: #f5f5f5;
border: 1px solid #ddd;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
transition: all 0.2s ease;
}
#cached-section .cached-reset-button:hover {
background-color: #e0e0e0;
}
/* Add styles for the grey overlay */
#cached-section .cached-grey-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #888888; /* Solid grey color */
z-index: 10; /* Ensure it's above the grid */
display: none; /* Initially hidden */
}
/* Scoped styles for the cached section */
#cached-section {
font-family: Arial, sans-serif;
}
/* Restore bolder text for headers and word options */
#cached-section h2,
#cached-section .cached-word-option {
font-weight: 700;
}
#cached-section .cached-main-container {
display: flex;
max-width: 1200px; /* Increased width to accommodate side-by-side layout */
margin: 0 auto;
gap: 40px;
align-items: flex-start;
padding: 0 20px;
}
/* Updated to have input and output sides */
#cached-section .cached-side {
flex: 1;
display: flex;
flex-direction: column;
gap: 10px; /* Reduced from 20px */
width: 50%;
}
/* Left side (input) - left aligned */
#cached-section .cached-input-side {
align-items: flex-start;
}
/* Right side (output) - center aligned */
#cached-section .cached-output-side {
align-items: center;
}
#cached-section .cached-side-title {
text-align: center;
font-weight: bold;
margin-bottom: 10px;
font-size: 1.2rem;
width: 100%;
}
#cached-section .cached-grid-container {
position: relative;
width: 512px;
height: 512px;
margin: 0 auto;
}
#cached-section .cached-image {
width: 100%;
height: 100%;
object-fit: cover;
}
#cached-section .cached-grid {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: grid;
/* TODO: Grid define */
grid-template-columns: repeat(8, 1fr);
grid-template-rows: repeat(8, 1fr);
}
#cached-section .cached-grid-cell {
border: 1px solid black;
transition: background-color 0.1s ease;
}
#cached-section .cached-highlighted {
background-color: rgba(128, 128, 128, 0.9);
}
#cached-section .cached-sentence-builder {
width: 512px; /* Match width with image container */
padding: 0px 23px; /* Reduced top padding from 20px to 10px */
}
#cached-section .cached-output-container {
width: 512px; /* Match width with image container */
}
#cached-section .cached-sentence-row {
margin: 10px 0; /* Reduced from 15px to 10px */
display: flex;
gap: 15px;
flex-wrap: wrap;
justify-content: flex-start; /* Align items to the start of the row */
width: 100%; /* Ensure the row takes full width of its container */
}
#cached-section .cached-word-option {
padding: 5px 8px; /* Reduced padding from 12px 20px */
cursor: pointer;
transition: all 0.2s ease;
color: #666;
border-radius: 4px;
font-weight: 600;
background: #f5f5f5;
margin-bottom: 5px; /* Add bottom margin for better spacing when wrapped */
font-size: 0.8rem; /* Added smaller font size */
}
#cached-section .cached-word-option:hover {
color: #000;
font-weight: 600;
background: #e5e5e5;
}
#cached-section .cached-word-option.cached-selected {
color: #886a6a;
font-weight: 600;
background: #e0e0e0;
}
#cached-section .cached-text-display {
margin-top: 20px;
padding: 15px;
background-color: #f5f5f5;
border-radius: 8px;
min-height: 30px;
font-family: monospace;
width: 100%;
box-sizing: border-box;
white-space: pre-wrap;
word-break: break-word;
}
#cached-section .cached-output-display {
margin-top: 10px;
padding: 15px;
background-color: #e6f7ff;
border-radius: 8px;
min-height: 30px;
font-family: monospace;
width: 100%;
box-sizing: border-box;
white-space: pre-wrap;
word-break: break-word;
}
#cached-section .cached-grey-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #888888;
z-index: 10;
display: none;
}
#cached-section .cached-reset-buttons {
display: flex;
gap: 10px;
margin-top: 5px;
margin-bottom: 15px;
justify-content: flex-start;
flex-wrap: nowrap; /* Prevent wrapping */
overflow-x: auto; /* Allow horizontal scrolling if needed */
padding-bottom: 5px; /* Add space for potential scrollbar */
}
#cached-section .cached-reset-button {
padding: 8px 15px;
background-color: #f5f5f5;
border: 1px solid #ddd;
border-radius: 4px;
cursor: pointer;
font-size: 12px;
transition: all 0.2s ease;
}
#cached-section .cached-reset-button:hover {
background-color: #e0e0e0;
}
#cached-section .cached-mask-size-container {
display: flex;
align-items: center;
margin-left: 10px;
}
#cached-section .cached-mask-size-label {
font-size: 12px;
margin-right: 5px;
white-space: nowrap;
}
#cached-section .cached-mask-size-input {
width: 50px;
padding: 6px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 12px;
text-align: center;
}
#cached-section .cached-output-container h2 {
margin-top: 5px;
}
#cached-section .cached-sentence-group {
display: flex;
gap: 10px;
margin-bottom: 0px;
flex-wrap: wrap;
}
#cached-section .cached-sentence-row {
margin: 4px 0px; /* Reduced from 10px to 5px */
display: flex;
gap: 6px;
flex-wrap: wrap;
justify-content: flex-start;
width: calc(50% - 10px); /* Take up roughly half minus gap space */
min-width: 200px; /* Ensure minimum width for readability */
}
@media (max-width: 768px) {
#cached-section .cached-sentence-row {
width: 100%; /* Full width on small screens */
}
} |