tweak colors, add buttons for future front page fast item management.

This commit is contained in:
2022-03-06 12:29:20 +01:00
parent 69b7f5c8fa
commit 89ed1c2e6a
16 changed files with 121 additions and 11283 deletions
+9 -11255
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -16,7 +16,7 @@
"@sveltejs/kit": "next", "@sveltejs/kit": "next",
"@typescript-eslint/eslint-plugin": "^5.10.1", "@typescript-eslint/eslint-plugin": "^5.10.1",
"@typescript-eslint/parser": "^5.10.1", "@typescript-eslint/parser": "^5.10.1",
"@yarbsemaj/adapter-lambda": "^0.5.1", "@yarbsemaj/adapter-lambda": "^0.2.1",
"eslint": "^7.32.0", "eslint": "^7.32.0",
"eslint-plugin-svelte3": "^3.2.1", "eslint-plugin-svelte3": "^3.2.1",
"fa-svelte": "^3.1.0", "fa-svelte": "^3.1.0",
+1 -1
View File
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<style> <style>
body { body {
background-color: #141415; background-color: hsl(240, 12%, 7%);
color: #aaa; color: #aaa;
padding: 0; padding: 0;
margin: 0; margin: 0;
+14
View File
@@ -0,0 +1,14 @@
$color-entry0: hsl(240, 5%, 7%)
$color-entry1: hsl(240, 5%, 14%)
$color-entry2: hsl(240, 5%, 21%)
$color-entry3: hsl(240, 5%, 28%)
$color-entry4: hsl(240, 5%, 35%)
$color-entry5: hsl(240, 5%, 42%)
$color-entry6: hsl(240, 5%, 49%)
$color-entry7: hsl(240, 5%, 56%)
$color-entry8: hsl(240, 5%, 63%)
$color-entry9: hsl(240, 5%, 70%)
$color-entry10: hsl(240, 5%, 77%)
$color-entry11: hsl(240, 5%, 84%)
$color-entry12: hsl(240, 5%, 91%)
$color-entry13: hsl(240, 5%, 98%)
@@ -2,9 +2,11 @@
import type { StandaloneItem } from "$lib/models/item"; import type { StandaloneItem } from "$lib/models/item";
import Entry from "../layout/Entry.svelte"; import Entry from "../layout/Entry.svelte";
import EntryAmounts from "../layout/EntryAmounts.svelte"; import EntryAmounts from "../layout/EntryAmounts.svelte";
import EntryButton from "../layout/EntryButton.svelte";
import EntryCompletionIcon from "../layout/EntryCompletionIcon.svelte"; import EntryCompletionIcon from "../layout/EntryCompletionIcon.svelte";
import EntryDescription from "../layout/EntryDescription.svelte"; import EntryDescription from "../layout/EntryDescription.svelte";
import EntryName from "../layout/EntryName.svelte"; import EntryName from "../layout/EntryName.svelte";
import Icon from "../layout/Icon.svelte";
export let item: StandaloneItem export let item: StandaloneItem
export let compact: boolean = false; export let compact: boolean = false;
@@ -25,6 +27,15 @@ import EntryCompletionIcon from "../layout/EntryCompletionIcon.svelte";
<a href={link}> <a href={link}>
<Entry> <Entry>
{#if !item.acquireDate}
<EntryButton>
<Icon name="check" />
</EntryButton>
{:else}
<EntryButton>
<Icon name="pen" />
</EntryButton>
{/if}
<EntryCompletionIcon condition={!!item.acquireDate} /> <EntryCompletionIcon condition={!!item.acquireDate} />
<EntryName subtitle={subtitle}>{item.name}</EntryName> <EntryName subtitle={subtitle}>{item.name}</EntryName>
{#if !compact} {#if !compact}
@@ -3,11 +3,13 @@
import Status from "$lib/models/status"; import Status from "$lib/models/status";
import Entry from "../layout/Entry.svelte"; import Entry from "../layout/Entry.svelte";
import EntryButton from "../layout/EntryButton.svelte";
import EntryDescription from "../layout/EntryDescription.svelte"; import EntryDescription from "../layout/EntryDescription.svelte";
import EntryName from "../layout/EntryName.svelte"; import EntryName from "../layout/EntryName.svelte";
import EntryProgress from "../layout/EntryProgress.svelte"; import EntryProgress from "../layout/EntryProgress.svelte";
import EntryProgressRow from "../layout/EntryProgressRow.svelte"; import EntryProgressRow from "../layout/EntryProgressRow.svelte";
import EntryStatusIcon from "../layout/EntryStatusIcon.svelte"; import EntryStatusIcon from "../layout/EntryStatusIcon.svelte";
import Icon from "../layout/Icon.svelte";
export let requirement: StandaloneRequirement export let requirement: StandaloneRequirement
export let compact: boolean = false; export let compact: boolean = false;
@@ -16,6 +18,11 @@
<a href="/{requirement.scope.id}/{requirement.project.id}?requirement={requirement.id}"> <a href="/{requirement.scope.id}/{requirement.project.id}?requirement={requirement.id}">
<Entry> <Entry>
{#if requirement.status === Status.Active}
<EntryButton>
<Icon name="plus" />
</EntryButton>
{/if}
<EntryStatusIcon status={requirement.status} /> <EntryStatusIcon status={requirement.status} />
<EntryName subtitle={requirement.project.name}>{requirement.name}</EntryName> <EntryName subtitle={requirement.project.name}>{requirement.name}</EntryName>
{#if !compact} {#if !compact}
+10 -3
View File
@@ -12,6 +12,8 @@
import EntryProgressRow from "../layout/EntryProgressRow.svelte"; import EntryProgressRow from "../layout/EntryProgressRow.svelte";
import ItemLink from "./ItemLink.svelte"; import ItemLink from "./ItemLink.svelte";
import RequirementLink from "./RequirementLink.svelte"; import RequirementLink from "./RequirementLink.svelte";
import EntryButton from "../layout/EntryButton.svelte";
import Icon from "../layout/Icon.svelte";
export let sprint: Sprint export let sprint: Sprint
@@ -42,7 +44,7 @@
$: { $: {
switch (sprint.kind) { switch (sprint.kind) {
case "item": { case "items": {
aggregate = calculateAggregate(sprint.items.map(i => i.stats).flat()); aggregate = calculateAggregate(sprint.items.map(i => i.stats).flat());
break; break;
} }
@@ -69,10 +71,15 @@
<a href="/{sprint.scope.id}/sprints?sprint={sprint.id}"> <a href="/{sprint.scope.id}/sprints?sprint={sprint.id}">
<Entry> <Entry>
{#if sprint.kind === "stats"}
<EntryButton>
<Icon name="plus" />
</EntryButton>
{/if}
<EntryName subtitle="{sprint.scope.abbreviation} {sprint.kind} sprint">{sprint.name}</EntryName> <EntryName subtitle="{sprint.scope.abbreviation} {sprint.kind} sprint">{sprint.name}</EntryName>
<EntryDescription>{sprint.description}</EntryDescription> <EntryDescription>{sprint.description}</EntryDescription>
<EntryProgressRow> <EntryProgressRow>
{#if sprint.kind === "item"} {#if sprint.kind === "items"}
<EntryProgress <EntryProgress
fullwidth green fullwidth green
name="Items" name="Items"
@@ -83,7 +90,7 @@
{:else} {:else}
<EntryProgress <EntryProgress
fullwidth fullwidth
name="Total" name={sprint.aggregateName || "Total"}
acquired={aggregate.acquired} acquired={aggregate.acquired}
required={aggregate.required} required={aggregate.required}
boat={boat} boat={boat}
+8 -6
View File
@@ -2,12 +2,14 @@
<slot></slot> <slot></slot>
</div> </div>
<style> <style lang="scss">
@import "../colors.sass";
div.entry { div.entry {
display: block; display: block;
text-decoration: none; text-decoration: none;
color: #aaa; color: $color-entry9;
background-color: #222; background-color: $color-entry1;
border-bottom-right-radius: 0.75em; border-bottom-right-radius: 0.75em;
margin: 0.5em 0; margin: 0.5em 0;
padding: 0.25em 0.5ch; padding: 0.25em 0.5ch;
@@ -15,8 +17,8 @@
overflow-y: hidden; overflow-y: hidden;
} }
div.entry:hover { div.entry:hover {
background-color: #333; background-color: $color-entry2;
color: #eee; color: $color-entry13;
} }
:global(div.entry div.entry) { :global(div.entry div.entry) {
@@ -26,7 +28,7 @@
border-bottom-right-radius: 0.5em; border-bottom-right-radius: 0.5em;
} }
:global(div.entry div.entry:hover) { :global(div.entry div.entry:hover) {
background-color: #444; background-color: $color-entry3;
} }
div.entry:last-of-type { div.entry:last-of-type {
@@ -18,7 +18,9 @@
{/each} {/each}
</div> </div>
<style> <style lang="scss">
@import "../colors.sass";
div.amounts { div.amounts {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@@ -35,6 +37,6 @@
} }
span.label { span.label {
color: #777; color: $color-entry6;
} }
</style> </style>
+2 -5
View File
@@ -9,19 +9,16 @@
<Icon name={name} /> <Icon name={name} />
</div> </div>
<style lang="scss"> <style>
div.bgicon { div.bgicon {
position: relative; position: relative;
top: 0.1em; top: 0.1em;
height: 0; height: 0;
width: 2ch; width: 1.75ch;
font-size: 3em; font-size: 3em;
margin-left: auto; margin-left: auto;
background: none; background: none;
pointer-events: none; pointer-events: none;
:global(.icon) {
opacity: 0.10; opacity: 0.10;
} }
}
</style> </style>
@@ -0,0 +1,36 @@
<div class="button-wrapper">
<div class="button-row">
<div class="button" on:click>
<slot></slot>
</div>
</div>
</div>
<style lang="scss">
@import "../colors.sass";
div.button {
color: $color-entry4;
font-size: 1.5em;
margin: 0 0.1ch;
padding: 0;
transition: 250ms;
&:hover {
color: $color-entry10;
}
}
div.button-row {
display: flex;
flex-direction: row-reverse;
}
div.button-wrapper {
position: relative;
top: 0.05em;
height: 0;
margin-left: auto;
background: none;
}
</style>
+4 -2
View File
@@ -7,7 +7,9 @@
<span class="abbreviation">{subtitle}</span> <span class="abbreviation">{subtitle}</span>
</div> </div>
<style> <style lang="scss">
@import "../colors.sass";
div.name { div.name {
font-size: 1em; font-size: 1em;
font-weight: 600; font-weight: 600;
@@ -15,7 +17,7 @@
span.abbreviation { span.abbreviation {
font-size: 1em; font-size: 1em;
opacity: 0.333; color: $color-entry4;
} }
@media screen and (max-width: 1500px) { @media screen and (max-width: 1500px) {
@@ -130,6 +130,8 @@
</div> </div>
<style lang="scss"> <style lang="scss">
@import "../colors.sass";
div.progress { div.progress {
padding: 0.25em 0.5ch; padding: 0.25em 0.5ch;
font-size: 0.9em; font-size: 0.9em;
@@ -200,6 +202,6 @@
} }
span.ackreq { span.ackreq {
color: #555; color: $color-entry4;
} }
</style> </style>
+2 -2
View File
@@ -24,7 +24,7 @@
import { faPlus } from "@fortawesome/free-solid-svg-icons/faPlus"; import { faPlus } from "@fortawesome/free-solid-svg-icons/faPlus";
import { faPen } from "@fortawesome/free-solid-svg-icons/faPen"; import { faPen } from "@fortawesome/free-solid-svg-icons/faPen";
import { faArchive } from "@fortawesome/free-solid-svg-icons/faArchive"; import { faArchive } from "@fortawesome/free-solid-svg-icons/faArchive";
import { faCheck } from "@fortawesome/free-solid-svg-icons/faCheck"; import { faCheckToSlot } from "@fortawesome/free-solid-svg-icons/faCheckToSlot";
import { faCog } from "@fortawesome/free-solid-svg-icons/faCog"; import { faCog } from "@fortawesome/free-solid-svg-icons/faCog";
import { faLink } from "@fortawesome/free-solid-svg-icons/faLink"; import { faLink } from "@fortawesome/free-solid-svg-icons/faLink";
import { faStar } from "@fortawesome/free-solid-svg-icons/faStar"; import { faStar } from "@fortawesome/free-solid-svg-icons/faStar";
@@ -47,7 +47,7 @@
"plus": faPlus, "plus": faPlus,
"pen": faPen, "pen": faPen,
"archive": faArchive, "archive": faArchive,
"check": faCheck, "check": faCheckToSlot,
"cog": faCog, "cog": faCog,
"link": faLink, "link": faLink,
"star": faStar, "star": faStar,
+2 -1
View File
@@ -11,11 +11,12 @@ export default interface Sprint {
to: string to: string
timed: boolean timed: boolean
coarse: boolean coarse: boolean
kind: "item" | "requirements" | "stats" kind: "items" | "requirements" | "stats"
scope: ScopeEntry scope: ScopeEntry
items: StandaloneItem[] items: StandaloneItem[]
requirements: StandaloneRequirement[] requirements: StandaloneRequirement[]
aggregateRequired: number, aggregateRequired: number,
aggregateName: string
stats: StatProgressEntry[] stats: StatProgressEntry[]
} }
+5 -2
View File
@@ -134,7 +134,8 @@ export const get: RequestHandler = async({}) => {
], ],
items: [], items: [],
requirements: [], requirements: [],
aggregateRequired: 40, aggregateRequired: 30,
aggregateName: "3D Modeling",
}, },
{ {
id: 643, id: 643,
@@ -153,6 +154,7 @@ export const get: RequestHandler = async({}) => {
requirements[2], requirements[2],
], ],
aggregateRequired: 0, aggregateRequired: 0,
aggregateName: "",
}, },
{ {
id: 771, id: 771,
@@ -161,7 +163,7 @@ export const get: RequestHandler = async({}) => {
from: "2022-03-01T00:00:00+0200", from: "2022-03-01T00:00:00+0200",
to: "2022-03-30T23:59:59+0200", to: "2022-03-30T23:59:59+0200",
coarse: false, coarse: false,
kind: "item", kind: "items",
scope: scopes[0], scope: scopes[0],
timed: true, timed: true,
stats: [ stats: [
@@ -175,6 +177,7 @@ export const get: RequestHandler = async({}) => {
], ],
requirements: [], requirements: [],
aggregateRequired: 0, aggregateRequired: 0,
aggregateName: "",
} }
] ]