Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ dist
dist-ssr
*.local

# Env
.env

# Editor directories and files
.vscode/*
!.vscode/extensions.json
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/GameListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ export default function GameListItem({
alt={title}
loading="lazy"
/>
<div>
<h3 className="mb-1 fw-bold" style={{ fontSize: "1.1rem" }}>{title}</h3>
<div className="col-8">
<h3 className="mb-1 fw-bold text-truncate" style={{ fontSize: "1.1rem" }}>{title}</h3>
<p className="m-0">{year ?? "—"}</p>
<p className="m-0">{tags || "—"}</p>
<p className="m-0 text-truncate">{tags || "—"}</p>
<StarRating score={rating} size={5} scorePosition="right"/>
</div>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/StarRating.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default function StarRating({
})}
</div>
<p className={`m-0 text-muted fst-italic ${scorePosition === 'right' ? 'ms-1' : ''}`} style={{ fontSize: "0.875rem" }}>
{score == null ? "Not yet rated" : `${Number.isInteger(score) ? score.toFixed(0) : score.toFixed(1)}/10`}
{score == null ? "Not yet rated" : `${score/2}/5 stars`}
</p>
</div>
);
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/pages/GamesGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ export default function GamesGrid() {
) || 1;

const updatePageSize = () => {
setPageSize(Math.max(1, Math.floor(listEl.clientHeight / rowMinHeight)));
//setPageSize(Math.max(1, Math.floor(listEl.clientHeight / rowMinHeight)));
setPageSize(20);
};

updatePageSize();
Expand Down Expand Up @@ -255,7 +256,7 @@ export default function GamesGrid() {
onSortChange={updateSort}
/>
<div className="d-flex flex-column overflow-hidden"
style={{ height: "calc(100vh - var(--header-height) - var(--toolbar-height))" }}
//style={{ height: "calc(100vh - var(--header-height) - var(--toolbar-height))" }}
ref={listRef}
>
<p className="visually-hidden" aria-live="polite">
Expand Down