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
1 change: 0 additions & 1 deletion frontend/public/favicon.svg

This file was deleted.

24 changes: 0 additions & 24 deletions frontend/public/icons.svg

This file was deleted.

Empty file removed frontend/src/App.css
Empty file.
16 changes: 3 additions & 13 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
import './App.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import GameDetails from './GameDetails.tsx';
import Header from './Header.tsx';
import GamesGrid from './GamesGrid.tsx';
import "bootstrap/dist/css/bootstrap.min.css";
import GamesGrid from "./pages/GamesGrid/GamesGrid";

function App() {

return (
<>
{/* <Header/> */}
{/* <GameDetails /> */}
<GamesGrid />
</>
)
return <GamesGrid />;
}

export default App;
43 changes: 0 additions & 43 deletions frontend/src/GameDetails.tsx

This file was deleted.

26 changes: 0 additions & 26 deletions frontend/src/GamesGrid.tsx

This file was deleted.

23 changes: 0 additions & 23 deletions frontend/src/Header.tsx

This file was deleted.

9 changes: 0 additions & 9 deletions frontend/src/MyRatings.tsx

This file was deleted.

34 changes: 34 additions & 0 deletions frontend/src/components/GameListItem/GameListItem.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.row {
display: flex;
align-items: center;
flex: 1 1 0;
min-height: var(--row-min-height);
gap: 1.5rem;
padding: 0 1.5rem;
}

.odd {
background-color: var(--color-stripe-odd);
}

.even {
background-color: var(--color-stripe-even);
}

.image {
width: 95px;
height: 95px;
object-fit: cover;
background-color: #ddd;
flex-shrink: 0;
}

.info p {
margin: 0;
}

.title {
margin: 0 0 0.25rem;
font-size: 1.1rem;
font-weight: 700;
}
31 changes: 31 additions & 0 deletions frontend/src/components/GameListItem/GameListItem.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import styles from "./GameListItem.module.css";

interface GameListItemProps {
title: string;
year: number;
tags: string;
rating: number;
image: string;
striped: boolean;
}

export default function GameListItem({
title,
year,
tags,
rating,
image,
striped,
}: GameListItemProps) {
return (
<div className={`${styles.row} ${striped ? styles.odd : styles.even}`}>
<img className={styles.image} src={image} alt={title} />
<div className={styles.info}>
<h3 className={styles.title}>{title}</h3>
<p>{year}</p>
<p>{tags}</p>
<p>{rating.toFixed(1)}/10</p>
</div>
</div>
);
}
42 changes: 42 additions & 0 deletions frontend/src/components/Header/Header.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
height: var(--header-height);
padding: 0 1.5rem;
background-color: var(--color-brand);
}

.brand,
.link {
font-weight: 700;
color: var(--color-text);
white-space: nowrap;
}

.link {
text-decoration: none;
}

.search {
flex: 1;
max-width: 420px;
}

.search :global(.input-group) {
border-radius: 999px;
overflow: hidden;
}

.search :global(.form-control) {
border: none;
}

.search :global(.form-control:focus) {
box-shadow: none;
}

.search :global(.btn) {
border: none;
}
Loading