Files
project-manager/web/src/style.css
T
aneurinandClaude Sonnet 5 d8a4183e4d Move new-project form to the dashboard; sidebar project list becomes a switcher; Kanban is the default project tab
- DashboardView: a "New project title" form now sits directly below the
  project grid (creating one stays on the dashboard -- the grid and the
  sidebar dropdown pick it up via the shared projects store, no navigation).
- AppSidebar: the per-project RouterLink list is replaced by a <select>. It's
  a v-model-bound writable computed (selectedProjectId): the getter tracks
  route.params.id so it reflects whichever project is open, the setter
  router.pushes to the chosen one -- so it doubles as a project switcher from
  anywhere, not just a picker from the dashboard. Removed the now-unused
  .sidebar__link--project/.sidebar__projects/.sidebar__form CSS; added
  .sidebar__select, and .form--new-project back for the dashboard form.
- ProjectView: activeTab now initialises to 'kanban' instead of 'all'. The
  tabs array (and so the tab bar's DOM order, All tasks first) is untouched --
  only the default selection changed.

Verified via headless Chrome: sidebar has no per-project links (a <select>
listing both projects instead); the new-project form follows the grid and
creating from it stays on /dashboard while the grid and dropdown both update;
selecting a project in the dropdown navigates there and the dropdown reflects
it once there; a project opens on Kanban with the tab bar still reading "All
tasks, Kanban" in that order.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 15:31:30 +01:00

695 lines
11 KiB
CSS

/* Placeholder styling only — just enough to be legible. */
:root {
--bg: #f7f7f8;
--surface: #ffffff;
--border: #e2e2e5;
--text: #1c1c1f;
--muted: #6b6b73;
--accent: #4f46e5;
--accent-text: #ffffff;
--warn-bg: #fff4e5;
--warn-border: #f0c48a;
--error: #b3261e;
/* Kanban inbox column: a touch lighter than a status column (var(--bg)). */
--inbox-bg: #fcfcfd;
color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #16161a;
--surface: #1f1f24;
--border: #33333a;
--text: #ececf1;
--muted: #9a9aa6;
--warn-bg: #2e2415;
--warn-border: #6b5220;
--error: #f2b8b5;
--inbox-bg: #202027;
}
}
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.5;
}
.app__bar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0.75rem 1.25rem;
background: var(--surface);
border-bottom: 1px solid var(--border);
}
.app__brand {
font-weight: 600;
}
.app__account {
display: flex;
align-items: center;
gap: 0.75rem;
font-size: 0.9rem;
}
.app__email {
color: var(--muted);
text-decoration: none;
}
.app__body {
display: flex;
align-items: flex-start;
}
.app__main {
flex: 1;
min-width: 0;
max-width: 32rem;
margin: 2.5rem auto;
padding: 0 1.25rem;
}
/* Full-bleed layout for views that need the room (e.g. the project board). */
.app__main--wide {
max-width: none;
margin: 1.5rem auto;
}
/* --- left sidebar (signed-in app pages) ------------------------------ */
.sidebar {
flex: 0 0 15rem;
align-self: stretch;
position: sticky;
top: 0;
max-height: 100vh;
overflow-y: auto;
padding: 1rem 0.75rem 1.5rem;
border-right: 1px solid var(--border);
background: var(--surface);
}
.sidebar__nav {
display: flex;
flex-direction: column;
gap: 0.1rem;
}
.sidebar__link {
display: flex;
align-items: center;
gap: 0.6rem;
padding: 0.45rem 0.6rem;
border-radius: 7px;
color: var(--text);
text-decoration: none;
font-size: 0.9rem;
}
.sidebar__link:hover {
background: var(--bg);
}
.sidebar__link--active,
.sidebar__link--active:hover {
background: var(--accent);
color: var(--accent-text);
}
.sidebar__icon {
flex: none;
width: 1rem;
height: 1rem;
fill: currentColor;
}
.sidebar__link-text {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.sidebar__divider {
border: none;
border-top: 1px solid var(--border);
margin: 0.75rem 0;
}
.sidebar__heading {
margin: 0 0 0.35rem;
padding: 0 0.6rem;
font-size: 0.72rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--muted);
}
.sidebar__select {
display: flex;
align-items: center;
gap: 0.6rem;
padding: 0.2rem 0.6rem;
}
.sidebar__select select {
flex: 1;
min-width: 0;
font: inherit;
font-size: 0.9rem;
padding: 0.35rem 0.4rem;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--bg);
color: var(--text);
}
.sidebar__inbox-cards {
max-height: 40vh;
overflow-y: auto;
padding: 0 0.1rem; /* room for the ghost card's outline while dragging */
}
.sidebar__note {
padding: 0 0.6rem;
font-size: 0.85rem;
}
.card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 1.75rem;
}
h1 {
margin: 0 0 0.75rem;
font-size: 1.4rem;
}
.muted {
color: var(--muted);
font-size: 0.95rem;
}
.notice {
margin: 1rem 0;
padding: 0.75rem 1rem;
background: var(--warn-bg);
border: 1px solid var(--warn-border);
border-radius: 8px;
font-size: 0.9rem;
}
/* --- dashboard: grid of projects --------------------------------------- */
.dashboard__grid {
margin-top: 1rem;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
gap: 1rem;
align-items: start;
}
.project-card {
display: flex;
flex-direction: column;
gap: 0.4rem;
padding: 1rem;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
color: inherit;
text-decoration: none;
}
.project-card:hover {
border-color: var(--accent);
}
.project-card__title {
font-weight: 600;
font-size: 1.05rem;
word-break: break-word;
}
.project-card__meta {
font-size: 0.85rem;
}
/* --- project detail: cards ------------------------------------------ */
.cards {
list-style: none;
margin: 1rem 0 0;
padding: 0;
display: grid;
gap: 0.4rem;
}
.card-row {
display: flex;
align-items: center;
gap: 0.5rem;
border: 1px solid var(--border);
border-radius: 8px;
padding: 0.4rem 0.55rem;
background: var(--surface);
}
.card-row__status {
flex: none;
padding: 0.15rem 0.55rem;
border-radius: 999px;
font-size: 0.75rem;
font-weight: 600;
white-space: nowrap;
border: 1px solid var(--border);
background: var(--bg);
color: var(--muted);
}
.card-row__status--none {
font-weight: 400;
font-style: italic;
}
.card-row__text {
flex: 1;
min-width: 0;
border: 1px solid transparent;
border-radius: 6px;
background: transparent;
color: var(--text);
font-size: 1rem;
padding: 0.3rem 0.4rem;
}
.card-row__text:hover {
border-color: var(--border);
}
.card-row__text:focus {
outline: none;
border-color: var(--accent);
background: var(--bg);
}
.card-row__delete {
flex: none;
border: none;
background: none;
color: var(--muted);
cursor: pointer;
font-size: 1rem;
padding: 0.2rem 0.4rem;
border-radius: 6px;
}
.card-row__delete:hover {
color: var(--error);
background: var(--bg);
}
/* --- project detail: header, inline title/description, manage menu - */
.project-head {
display: flex;
align-items: flex-start;
gap: 0.5rem;
}
.project-head__title {
flex: 1;
min-width: 0;
margin: 0 0 0.5rem;
}
.project-head__title input,
.project-head__desc {
width: 100%;
font: inherit;
color: var(--text);
background: transparent;
border: 1px solid transparent;
border-radius: 6px;
padding: 0.25rem 0.4rem;
}
.project-head__title input {
font-size: 1.4rem;
font-weight: 600;
}
.project-head__desc {
display: block;
resize: vertical;
min-height: 2.75rem;
font-size: 0.95rem;
color: var(--muted);
margin-bottom: 0.75rem;
}
.project-head__title input:hover,
.project-head__desc:hover {
border-color: var(--border);
}
.project-head__title input:focus,
.project-head__desc:focus {
outline: none;
color: var(--text);
background: var(--bg);
border-color: var(--accent);
}
.menu {
position: relative;
flex: none;
}
.menu__toggle {
border: 1px solid var(--border);
background: var(--bg);
color: var(--text);
border-radius: 8px;
padding: 0.35rem 0.7rem;
font: inherit;
font-size: 0.9rem;
cursor: pointer;
}
.menu__toggle:hover {
border-color: var(--muted);
}
.menu__backdrop {
position: fixed;
inset: 0;
z-index: 10;
}
.menu__list {
position: absolute;
right: 0;
top: calc(100% + 4px);
z-index: 20;
min-width: 10rem;
margin: 0;
padding: 0.25rem;
list-style: none;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.menu__item {
display: block;
width: 100%;
text-align: left;
border: none;
background: none;
color: var(--text);
font: inherit;
padding: 0.45rem 0.6rem;
border-radius: 6px;
cursor: pointer;
}
.menu__item:hover {
background: var(--bg);
}
.menu__item--danger {
color: var(--error);
}
/* --- project detail: keep the header/prose readable on the wide layout -- */
.project__chrome {
max-width: 42rem;
}
/* --- tabs -------------------------------------------------------------- */
.tabs {
display: flex;
gap: 0.25rem;
border-bottom: 1px solid var(--border);
margin: 1.25rem 0 1rem;
}
.tabs__tab {
border: none;
background: none;
font: inherit;
color: var(--muted);
cursor: pointer;
padding: 0.5rem 0.9rem;
border-bottom: 2px solid transparent;
margin-bottom: -1px;
}
.tabs__tab:hover {
color: var(--text);
}
.tabs__tab--active {
color: var(--text);
font-weight: 600;
border-bottom-color: var(--accent);
}
.tabs__panel--narrow {
max-width: 42rem;
}
/* --- kanban board ---------------------------------------------------- */
.kanban {
display: flex;
gap: 1rem;
align-items: flex-start;
overflow-x: auto;
padding-bottom: 0.5rem;
}
.kanban__col {
flex: 0 0 16rem;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 10px;
padding: 0.75rem;
}
.kanban__col--inbox {
background: var(--inbox-bg);
}
.kanban__head {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 0.6rem;
font-size: 0.85rem;
font-weight: 600;
}
.kanban__count {
color: var(--muted);
font-weight: 400;
}
.kanban__cards {
display: flex;
flex-direction: column;
gap: 0.5rem;
min-height: 3rem;
}
.kanban-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 0.55rem 0.65rem;
font-size: 0.9rem;
cursor: grab;
}
.kanban-card--ghost {
opacity: 0.5;
}
.kanban__new {
display: flex;
gap: 0.4rem;
margin-top: 0.6rem;
}
.kanban__new input {
flex: 1;
min-width: 0;
font: inherit;
font-size: 0.9rem;
padding: 0.4rem 0.5rem;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--surface);
color: var(--text);
}
.kanban__new button[type="submit"] {
flex: none;
padding: 0.4rem 0.7rem;
font-size: 0.9rem;
border-radius: 6px;
}
/* --- confirmation modal --------------------------------------------------- */
.modal {
position: fixed;
inset: 0;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
padding: 1rem;
}
.modal__backdrop {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.45);
}
.modal__dialog {
position: relative;
z-index: 1;
width: 100%;
max-width: 24rem;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 1.5rem;
}
.modal__dialog h2 {
margin: 0 0 0.5rem;
font-size: 1.15rem;
}
.modal__actions {
display: flex;
justify-content: flex-end;
gap: 0.6rem;
margin-top: 1.25rem;
}
.btn-secondary,
.btn-danger {
border: 1px solid var(--border);
border-radius: 8px;
padding: 0.5rem 0.9rem;
font: inherit;
font-size: 0.95rem;
cursor: pointer;
}
.btn-secondary {
background: var(--bg);
color: var(--text);
}
.btn-danger {
background: #b3261e;
border-color: #b3261e;
color: #fff;
}
.btn-secondary:disabled,
.btn-danger:disabled {
opacity: 0.6;
cursor: default;
}
.form {
display: grid;
gap: 1rem;
margin: 1.25rem 0;
}
.form--new-project,
.form--new-card {
margin-top: 1.5rem;
padding-top: 1.25rem;
border-top: 1px solid var(--border);
}
.form label {
display: grid;
gap: 0.3rem;
font-size: 0.9rem;
}
.form input {
padding: 0.55rem 0.7rem;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--bg);
color: var(--text);
font-size: 1rem;
}
button[type="submit"] {
padding: 0.6rem 1rem;
border: none;
border-radius: 8px;
background: var(--accent);
color: var(--accent-text);
font-size: 1rem;
cursor: pointer;
}
button[type="submit"]:disabled {
opacity: 0.6;
cursor: progress;
}
.link {
border: none;
background: none;
color: var(--accent);
cursor: pointer;
font: inherit;
padding: 0;
}
a {
color: var(--accent);
}
.hint {
color: var(--muted);
}
.field-error,
.form-error {
color: var(--error);
font-size: 0.85rem;
}