feat: pin personal notes to the top of the game modal
Move the status/rating/favorite/notes form under the title and make it a compact sticky panel.
This commit is contained in:
1 parent
b65396421c
commit
92c4c62ca9
2 files changed
+33
-21
No files matched your search
+13
-11
@@ -1789,6 +1789,19 @@ function renderModal(g) {
|
||||
<h2 class="modal-title" id="modalTitle">${esc(g.name)}</h2>
|
||||
<button class="modal-close" id="modalClose" title="Закрыть" aria-label="Закрыть">×</button>
|
||||
</div>
|
||||
<form class="personal personal-sticky" id="personalForm">
|
||||
<div class="personal-head"><h3>Моя отметка</h3></div>
|
||||
<div class="personal-grid">
|
||||
<label>Статус<select id="pStatus">${statusOptions}</select></label>
|
||||
<label>Оценка (1–10)<input id="pRating" type="number" min="1" max="10" value="${g.rating || ""}"></label>
|
||||
<label class="check"><input type="checkbox" id="pFavorite" ${g.favorite ? "checked" : ""}> избранное</label>
|
||||
<label class="wide">Заметка<textarea id="pNotes" rows="1">${esc(g.notes || "")}</textarea></label>
|
||||
</div>
|
||||
<div class="personal-actions">
|
||||
<button type="submit" class="save">Сохранить</button>
|
||||
<a class="steam-link" href="${g.steam_url}" target="_blank" rel="noopener">Открыть в Steam</a>
|
||||
</div>
|
||||
</form>
|
||||
<div class="modal-meta">${meta}</div>
|
||||
<div class="chip-row">${genres}</div>
|
||||
<p class="modal-desc">${esc(shortText)}</p>
|
||||
@@ -1799,17 +1812,6 @@ function renderModal(g) {
|
||||
${addons}
|
||||
${similar}
|
||||
${attrs}
|
||||
<form class="personal" id="personalForm">
|
||||
<h3>Моя отметка</h3>
|
||||
<label>Статус<select id="pStatus">${statusOptions}</select></label>
|
||||
<label>Оценка (1–10)<input id="pRating" type="number" min="1" max="10" value="${g.rating || ""}"></label>
|
||||
<label class="check wide"><input type="checkbox" id="pFavorite" ${g.favorite ? "checked" : ""}> избранное</label>
|
||||
<label class="wide">Заметка<textarea id="pNotes" rows="2">${esc(g.notes || "")}</textarea></label>
|
||||
<div class="personal-actions">
|
||||
<button type="submit" class="save">Сохранить</button>
|
||||
<a class="steam-link" href="${g.steam_url}" target="_blank" rel="noopener">Открыть в Steam</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
|
||||
+20
-10
@@ -1301,17 +1301,27 @@ button.addon:hover { border-color: var(--accent); color: var(--text); }
|
||||
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
|
||||
|
||||
.personal {
|
||||
margin-top: 20px;
|
||||
padding-top: 18px;
|
||||
border-top: 1px solid var(--border);
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
margin: 0 0 14px;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 12px;
|
||||
background: var(--panel);
|
||||
}
|
||||
.personal h3 { grid-column: 1 / -1; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
|
||||
.personal label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
|
||||
.personal label.wide { grid-column: 1 / -1; }
|
||||
.personal label.check { flex-direction: row; align-items: center; gap: 9px; }
|
||||
.personal-sticky {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 8;
|
||||
box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
|
||||
}
|
||||
.personal-head { display: flex; align-items: baseline; justify-content: space-between; }
|
||||
.personal h3 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
|
||||
.personal-grid { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(90px, .7fr) auto; gap: 8px; align-items: end; }
|
||||
.personal-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); }
|
||||
.personal-grid label.wide { grid-column: 1 / -1; }
|
||||
.personal-grid label.check { flex-direction: row; align-items: center; gap: 7px; padding-bottom: 8px; font-size: 12px; }
|
||||
.personal input, .personal select, .personal textarea {
|
||||
background: var(--bg-2);
|
||||
border: 1px solid var(--border);
|
||||
|
||||
Reference in new issue
Block a user