Skip to content
Open
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
8 changes: 4 additions & 4 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useState } from "react";
import NavigationMenu from "./components/navigationMenu/NavigationMenu";
import ShoppingListsPage from "./pages/shoppingLists/ShoppingListsPage";
import ShoppingListDetailPage from "./pages/shoppingLists/ShoppingListDetailPage";

import {
BrowserRouter,
Expand Down Expand Up @@ -126,10 +127,9 @@ function AppLayout() {
element={<SearchResultsPage key={location.search} />}
/>

<Route
path="/lists"
element={<ShoppingListsPage />}
/>
<Route path="/lists" element={<ShoppingListsPage />} />

<Route path="/lists/:id" element={<ShoppingListDetailPage />} />

<Route
path="*"
Expand Down
375 changes: 375 additions & 0 deletions frontend/src/pages/shoppingLists/ShoppingListDetailPage.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,375 @@
/* Side for aktiv handleliste – fra Figma (Active shopping list) */
.shopping-list-page {
min-height: 100vh;
max-width: 1312px;
margin: 0 auto;
padding: 32px 48px 0;
box-sizing: border-box;
background: var(--bg-page);
color: var(--text-primary);
font-family: var(--font-ui);
text-align: left;
}

/* Linjen over lappen: tilbake-lenke og figurtekst */
.shopping-list-page__top {
display: flex;
justify-content: space-between;
max-width: 780px;
margin-bottom: 20px;
font: 500 10px var(--font-mono);
letter-spacing: 0.06em;
}

.shopping-list-page__back {
color: var(--text-accent);
text-decoration: none;
}

.shopping-list-page__back:hover {
text-decoration: underline;
}

.shopping-list-page__fig {
margin: 0;
color: var(--text-muted);
}

/* Lappen til venstre, oppsummeringen til høyre */
.shopping-list-page__layout {
display: grid;
grid-template-columns: minmax(0, 780px) 332px;
justify-content: space-between;
align-items: start;
gap: 48px;
padding-bottom: 56px;
}

/* ---------- Notatblokken ---------- */
.notepad {
position: relative;
}

/* To ark som ligger skjevt bak lappen */
.notepad__sheet {
position: absolute;
inset: 0;
border: 1.25px solid var(--border-strong);
border-radius: 3px;
box-shadow:
3px 16px 22px -10px rgba(64, 5, 18, 0.1),
0 1px 2px rgba(64, 5, 18, 0.08);
}

.notepad__sheet--back {
background: var(--note-tint);
transform: rotate(2deg);
}

.notepad__sheet--middle {
background: var(--note-paper);
transform: rotate(-1.2deg);
}

.notepad__pad {
position: relative;
overflow: hidden;
border: 1.25px solid var(--border-strong);
border-radius: 3px;
background: var(--note-paper);
box-shadow:
3px 16px 22px -10px rgba(64, 5, 18, 0.1),
0 1px 2px rgba(64, 5, 18, 0.08);
}

/* Mørk stripe øverst */
.notepad__bar {
display: flex;
justify-content: space-between;
align-items: center;
height: 34px;
padding: 0 24px;
background: var(--bg-brand);
color: var(--text-on-dark);
font: 500 10px var(--font-mono);
letter-spacing: 0.06em;
}

.notepad__paper {
position: relative;
padding: 30px 40px 30px 84px;
}

/* Rød marglinje */
.notepad__paper::before {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 62px;
width: 1.25px;
background: var(--note-margin);
}

.notepad__header {
display: flex;
justify-content: space-between;
align-items: flex-end;
gap: 16px;
padding-bottom: 14px;
}

.notepad__title {
margin: 0 0 2px;
font: 700 46px/54px var(--font-note);
color: var(--note-ink);
}

.notepad__meta {
margin: 0;
font: 500 10px var(--font-mono);
letter-spacing: 0.06em;
color: var(--text-muted);
}

/* Sorteringsvalg */
.notepad__sort {
display: flex;
align-items: center;
gap: 4px;
height: 32px;
padding: 0 8px 0 12px;
background: var(--bg-surface);
border: 1px solid var(--border-hairline);
border-radius: 6px;
font: 500 10px var(--font-mono);
letter-spacing: 0.06em;
color: var(--text-primary);
}

.notepad__sort select {
border: none;
background: transparent;
color: inherit;
font: inherit;
letter-spacing: inherit;
cursor: pointer;
}

.notepad__list {
margin: 0;
padding: 0;
list-style: none;
}

/* Hele navnefeltet er klikkbart for å krysse av */
.notepad__list .shopping-list-row__name {
cursor: pointer;
}

.notepad__list .shopping-list-row__price {
text-transform: uppercase;
}

.notepad__list .quantity-stepper__button:disabled {
opacity: 0.4;
cursor: default;
}

/* «Legg til vare» nederst på lappen */
.notepad__add {
display: flex;
align-items: center;
gap: 12px;
padding-top: 12px;
}

.notepad__add-plus {
font: 700 22px var(--font-note);
color: var(--text-accent);
}

.notepad__add input {
flex: 1;
min-width: 0;
padding: 0;
border: none;
background: transparent;
font: 400 19px var(--font-note);
color: var(--note-ink);
}

.notepad__add input::placeholder {
color: var(--text-muted);
}

.notepad__add input:focus-visible {
outline: none;
border-bottom: 1px solid var(--note-margin);
}

/* ---------- Oppsummering ---------- */
.list-summary {
display: flex;
flex-direction: column;
gap: 14px;
padding: 24px;
background: var(--bg-surface);
border: 1.25px solid var(--border-strong);
border-radius: 4px;
}

.list-summary__label {
margin: 0;
font: 500 10px var(--font-mono);
letter-spacing: 0.06em;
color: var(--text-accent);
}

.list-summary__label--muted {
color: var(--text-muted);
}

.list-summary__facts {
display: flex;
flex-direction: column;
gap: 14px;
margin: 0 0 4px;
}

/* Én rad: navn ..... verdi */
.list-summary__facts div {
display: flex;
align-items: flex-end;
gap: 8px;
font: 500 10px var(--font-mono);
letter-spacing: 0.06em;
}

.list-summary__facts dt {
color: var(--text-secondary);
}

.list-summary__facts span {
flex: 1;
height: 8px;
border-bottom: 1px dashed var(--border-hairline);
}

.list-summary__facts dd {
margin: 0;
color: var(--text-primary);
}

.list-summary__total {
display: flex;
flex-direction: column;
gap: 2px;
}

.list-summary__sum {
margin: 0;
font: 500 44px var(--font-ui);
letter-spacing: -0.03em;
}

.list-summary__sum em {
font-family: var(--font-accent);
font-style: italic;
font-weight: 400;
color: var(--text-brand);
}

.list-summary__button {
justify-content: center;
width: 100%;
box-sizing: border-box;
text-decoration: none;
}

.list-summary__info {
margin: 0;
font: 400 12px/18px var(--font-ui);
color: var(--text-muted);
}

/* ---------- Bunntekst ---------- */
.shopping-list-page__footer {
display: flex;
justify-content: space-between;
padding: 16px 0 32px;
border-top: 1px solid var(--border-hairline);
font: 500 10px var(--font-mono);
letter-spacing: 0.06em;
color: var(--text-muted);
}

.shopping-list-page__footer p {
margin: 0;
}

/* ---------- Mindre skjermer ---------- */
@media (max-width: 1000px) {
.shopping-list-page__layout {
grid-template-columns: 1fr;
}

.list-summary {
max-width: 480px;
}
}

@media (max-width: 600px) {
.shopping-list-page {
padding: 24px 16px 0;
}

/* Arkene bak tar for mye plass på mobil */
.notepad__sheet {
display: none;
}

.notepad__paper {
padding: 20px 16px 20px 40px;
}

.notepad__paper::before {
left: 26px;
}

.notepad__header {
flex-direction: column;
align-items: flex-start;
}

.notepad__title {
font-size: 36px;
line-height: 42px;
}

/* Varenavnet får egen linje, antall og pris under */
.notepad__list .shopping-list-row {
flex-wrap: wrap;
}

.notepad__list .shopping-list-row__name {
flex-basis: calc(100% - 28px);
}

.notepad__list .quantity-stepper {
margin-left: 28px;
}

.notepad__list .shopping-list-row__price {
margin-left: auto;
}

.notepad__add input {
font-size: 16px;
}

.shopping-list-page__footer {
flex-direction: column;
gap: 4px;
}
}
Loading