|
3 | 3 | <head> |
4 | 4 | <meta charset="UTF-8" /> |
5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> |
6 | | - <title>Galactic Odyssey MPV2 - Unified Engine</title> |
| 6 | + <title>Galactic Odyssey MPV2 - Even Row Unified Engine</title> |
7 | 7 | <link rel="preconnect" href="https://fonts.googleapis.com" /> |
8 | 8 | <link |
9 | 9 | href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;500;700;900&display=swap" |
|
271 | 271 | background: var(--cell-bg); |
272 | 272 | position: relative; |
273 | 273 | box-shadow: inset 0 0 0 0.5px var(--border); |
274 | | - min-height: 60px; |
275 | 274 | display: flex; |
276 | 275 | flex-direction: column; |
277 | 276 | transition: background 0.4s ease; |
|
331 | 330 | flex-direction: column; |
332 | 331 | justify-content: space-between; |
333 | 332 | align-items: center; |
334 | | - padding: 12px 4px; |
| 333 | + padding: 8px 4px; |
335 | 334 | z-index: 2; |
336 | 335 | pointer-events: none; |
337 | 336 | } |
338 | 337 | .info-meta { |
339 | | - font-size: clamp(7px, 0.9dvh, 8px); |
| 338 | + font-size: clamp(6px, 0.8dvh, 8px); |
340 | 339 | text-transform: uppercase; |
341 | 340 | font-weight: 600; |
342 | 341 | color: var(--text-muted); |
343 | 342 | letter-spacing: 0.1em; |
344 | 343 | } |
345 | 344 | .date-num { |
346 | | - font-size: clamp(18px, 3dvh, 26px); |
| 345 | + font-size: clamp(14px, 2.5dvh, 22px); |
347 | 346 | font-weight: 300; |
348 | 347 | line-height: 1; |
349 | 348 | color: var(--text-main); |
|
789 | 788 | const vw = window.innerWidth, |
790 | 789 | vh = window.innerHeight; |
791 | 790 | let cols, gO; |
| 791 | + |
792 | 792 | if (this.#isRandomMode && vw >= 600) { |
793 | 793 | cols = Math.ceil(Math.sqrt(365 * (vw / vh))); |
794 | 794 | gO = Math.floor(jan1.getTime() / 86400000) % cols; |
|
797 | 797 | gO = (jan1.getDay() + 6) % 7; |
798 | 798 | } |
799 | 799 | const rows = Math.ceil((daysInYear + gO) / cols); |
800 | | - if (vh / rows < 60) block.classList.add('is-scrolling'); |
| 800 | + const isSc = vh / rows < 60; |
| 801 | + if (isSc) block.classList.add('is-scrolling'); |
801 | 802 |
|
802 | 803 | const itD = new Date(year, 0, 1 - gO); |
803 | 804 | const tS = this.#today.toDateString(); |
804 | 805 |
|
805 | 806 | const fragment = document.createDocumentFragment(); |
806 | 807 | const container = document.createElement('div'); |
807 | 808 | container.className = 'grid-container'; |
808 | | - container.style.overflowY = block.classList.contains('is-scrolling') ? 'auto' : 'hidden'; |
| 809 | + container.style.overflowY = isSc ? 'auto' : 'hidden'; |
809 | 810 |
|
810 | 811 | const wm = document.createElement('div'); |
811 | 812 | wm.className = 'watermark-embedded'; |
|
814 | 815 |
|
815 | 816 | const grid = document.createElement('div'); |
816 | 817 | grid.className = 'grid-layer'; |
| 818 | + // Perubahan Utama: Menggunakan 1fr untuk baris agar tinggi terbagi rata (Even Rows) |
817 | 819 | grid.style.gridTemplateColumns = `repeat(${cols}, 1fr)`; |
818 | | - grid.style.height = block.classList.contains('is-scrolling') ? 'auto' : '100%'; |
| 820 | + grid.style.gridTemplateRows = isSc ? `repeat(${rows}, minmax(60px, 1fr))` : `repeat(${rows}, 1fr)`; |
| 821 | + grid.style.height = isSc ? 'auto' : '100%'; |
819 | 822 |
|
820 | 823 | for (let s = 0; s < cols * rows; s++) { |
821 | 824 | const isM = itD.getFullYear() === year, |
|
829 | 832 | } ${isM && (dY === 0 || dY === 6) ? 'weekend' : ''} ${isM && dY === 1 ? 'week-start' : ''}`; |
830 | 833 |
|
831 | 834 | const showMonth = isM && (dD === 1 || s === gO); |
832 | | - cell.innerHTML = `<div class="cell-content"><span class="info-meta ${dD === 1 && isM ? 'top-label' : ''}">${ |
| 835 | + cell.innerHTML = `<div class="cell-content"> |
| 836 | + <span class="info-meta ${dD === 1 && isM ? 'top-label' : ''}">${ |
833 | 837 | showMonth ? this.#months[dM] : '' |
834 | | - }</span><span class="date-num">${dD}</span><span class="info-meta">${ |
835 | | - isM ? this.#days[dY] : '' |
836 | | - }</span></div>`; |
| 838 | + }</span> |
| 839 | + <span class="date-num">${dD}</span> |
| 840 | + <span class="info-meta">${isM ? this.#days[dY] : ''}</span> |
| 841 | + </div>`; |
837 | 842 | grid.append(cell); |
838 | 843 | itD.setDate(dD + 1); |
839 | 844 | } |
|
0 commit comments