Gisle Aune
3 years ago
14 changed files with 14638 additions and 3115 deletions
-
22211package-lock.json
-
3package.json
-
2src/lib/components/frontpage/ItemLink.svelte
-
3src/lib/components/frontpage/RequirementLink.svelte
-
2src/lib/components/frontpage/SprintLink.svelte
-
1src/lib/components/layout/Entry.svelte
-
27src/lib/components/layout/EntryBgIcon.svelte
-
14src/lib/components/layout/EntryCompletionIcon.svelte
-
35src/lib/components/layout/EntryProgress.svelte
-
24src/lib/components/layout/EntryStatusIcon.svelte
-
67src/lib/components/layout/Icon.svelte
-
44src/lib/components/layout/StatusColor.svelte
-
2src/lib/models/status.ts
-
4src/routes/indexdata.json.ts
22211
package-lock.json
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,27 @@ |
|||
<script lang="ts"> |
|||
import Icon, { DEFAULT_ICON } from "./Icon.svelte"; |
|||
import type { IconName } from "./Icon.svelte"; |
|||
|
|||
export let name: IconName = DEFAULT_ICON; |
|||
</script> |
|||
|
|||
<div class="bgicon"> |
|||
<Icon name={name} /> |
|||
</div> |
|||
|
|||
<style lang="scss"> |
|||
div.bgicon { |
|||
position: relative; |
|||
top: 0.1em; |
|||
height: 0; |
|||
width: 2ch; |
|||
font-size: 3em; |
|||
margin-left: auto; |
|||
background: none; |
|||
pointer-events: none; |
|||
|
|||
:global(.icon) { |
|||
opacity: 0.10; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,14 @@ |
|||
<script lang="ts"> |
|||
import Status from "$lib/models/status"; |
|||
|
|||
import EntryBgIcon from "./EntryBgIcon.svelte"; |
|||
import StatusColor from "./StatusColor.svelte"; |
|||
|
|||
export let condition: boolean; |
|||
</script> |
|||
|
|||
{#if condition} |
|||
<StatusColor status={Status.Completed}> |
|||
<EntryBgIcon name="check" /> |
|||
</StatusColor> |
|||
{/if} |
@ -0,0 +1,24 @@ |
|||
<script lang="ts"> |
|||
import type Status from "$lib/models/status"; |
|||
import EntryBgIcon from "./EntryBgIcon.svelte"; |
|||
import type { IconName } from "./Icon.svelte"; |
|||
import StatusColor from "./StatusColor.svelte"; |
|||
|
|||
export let status: Status; |
|||
let icon: IconName |
|||
|
|||
$: switch (status) { |
|||
case 0: icon = "hourglass"; break; |
|||
case 1: icon = "lightbulb"; break; |
|||
case 2: icon = "calendar"; break; |
|||
case 3: icon = "spinner"; break; |
|||
case 4: icon = "check"; break; |
|||
case 5: icon = "times"; break; |
|||
case 6: icon = "times"; break; |
|||
default: icon = "question"; |
|||
} |
|||
</script> |
|||
|
|||
<StatusColor status={status}> |
|||
<EntryBgIcon name={icon} /> |
|||
</StatusColor> |
@ -0,0 +1,67 @@ |
|||
<script lang="ts"> |
|||
import Icon from "fa-svelte"; |
|||
|
|||
export let name: IconName = "question"; |
|||
export let block: boolean = false; |
|||
</script> |
|||
|
|||
{#if block} |
|||
<div> |
|||
<Icon class="icon" icon={icons[name] || icons.question} /> |
|||
</div> |
|||
{:else} |
|||
<Icon class="icon" icon={icons[name] || icons.question} /> |
|||
{/if} |
|||
|
|||
<style> |
|||
div { |
|||
margin: auto; |
|||
} |
|||
</style> |
|||
|
|||
<script lang="ts" context="module"> |
|||
import { faQuestion } from "@fortawesome/free-solid-svg-icons/faQuestion"; |
|||
import { faPlus } from "@fortawesome/free-solid-svg-icons/faPlus"; |
|||
import { faPen } from "@fortawesome/free-solid-svg-icons/faPen"; |
|||
import { faArchive } from "@fortawesome/free-solid-svg-icons/faArchive"; |
|||
import { faCheck } from "@fortawesome/free-solid-svg-icons/faCheck"; |
|||
import { faCog } from "@fortawesome/free-solid-svg-icons/faCog"; |
|||
import { faLink } from "@fortawesome/free-solid-svg-icons/faLink"; |
|||
import { faStar } from "@fortawesome/free-solid-svg-icons/faStar"; |
|||
import { faTimes } from "@fortawesome/free-solid-svg-icons/faTimes"; |
|||
import { faSpinner } from "@fortawesome/free-solid-svg-icons/faSpinner"; |
|||
import { faHourglass } from "@fortawesome/free-solid-svg-icons/faHourglass"; |
|||
import { faCalendar } from "@fortawesome/free-solid-svg-icons/faCalendar"; |
|||
import { faExpand } from "@fortawesome/free-solid-svg-icons/faExpand"; |
|||
import { faSearch } from "@fortawesome/free-solid-svg-icons/faSearch"; |
|||
import { faClock } from "@fortawesome/free-solid-svg-icons/faClock"; |
|||
import { faThumbtack } from "@fortawesome/free-solid-svg-icons/faThumbtack"; |
|||
import { faHistory } from "@fortawesome/free-solid-svg-icons/faHistory"; |
|||
import { faLightbulb } from "@fortawesome/free-solid-svg-icons/faLightbulb"; |
|||
|
|||
const icons = { |
|||
"clock": faClock, |
|||
"thumbtack": faThumbtack, |
|||
"history": faHistory, |
|||
"question": faQuestion, |
|||
"plus": faPlus, |
|||
"pen": faPen, |
|||
"archive": faArchive, |
|||
"check": faCheck, |
|||
"cog": faCog, |
|||
"link": faLink, |
|||
"star": faStar, |
|||
"times": faTimes, |
|||
"lightbulb": faLightbulb, |
|||
"spinner": faSpinner, |
|||
"hourglass": faHourglass, |
|||
"calendar": faCalendar, |
|||
"expand": faExpand, |
|||
"search": faSearch, |
|||
}; |
|||
|
|||
export type IconName = keyof typeof icons; |
|||
|
|||
export const iconNames = Object.keys(icons).sort() as IconName[]; |
|||
export const DEFAULT_ICON: IconName = "question"; |
|||
</script> |
@ -0,0 +1,44 @@ |
|||
<script lang="ts"> |
|||
import type Status from "$lib/models/status"; |
|||
|
|||
export let status: Status; |
|||
</script> |
|||
|
|||
<span class="status-color status-{status}"><slot></slot></span> |
|||
|
|||
<style lang="scss"> |
|||
// Blocked = 0 |
|||
span.status-color.status-0 { |
|||
color: #78c9ff; |
|||
} |
|||
|
|||
// Available = 1 |
|||
span.status-color.status-1 { |
|||
color: #e7e55e; |
|||
} |
|||
|
|||
// Background = 2 |
|||
span.status-color.status-2 { |
|||
color: #e7a75e; |
|||
} |
|||
|
|||
// Active = 3 |
|||
span.status-color.status-3 { |
|||
color: #bdbdbd; |
|||
} |
|||
|
|||
// Completed = 4 |
|||
span.status-color.status-4 { |
|||
color: #78ff78; |
|||
} |
|||
|
|||
// Failed = 5 |
|||
span.status-color.status-5 { |
|||
color: #852a24; |
|||
} |
|||
|
|||
// Dropped = 6 |
|||
span.status-color.status-6 { |
|||
color: #e75ed0; |
|||
} |
|||
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue