-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[goals] add monthly contribution graph
- Loading branch information
1 parent
4c5bb85
commit 519334b
Showing
8 changed files
with
317 additions
and
64 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<script lang="ts"> | ||
import Progress from "$lib/components/Progress.svelte"; | ||
import { formatCurrencyCrude, type Point } from "$lib/utils"; | ||
import _ from "lodash"; | ||
export let progressPercent: number; | ||
export let breakPoints: Point[]; | ||
</script> | ||
|
||
<div> | ||
{#if !_.isEmpty(breakPoints)} | ||
<div class="flex justify-between"> | ||
<div></div> | ||
{#each breakPoints as point, i} | ||
<div class="breakpoint is-hidden-mobile box py-1 px-4 mb-3 has-text-centered"> | ||
<div class="has-text-grey-light has-text-weight-bold is-size-7"> | ||
{point.date.format("DD MMM YYYY")} | ||
</div> | ||
<div class="flex flex-row justify-center items-baseline"> | ||
<div class="mr-2"> | ||
<span | ||
class="icon is-small {progressPercent >= (i + 1) * 25 | ||
? 'has-text-success' | ||
: 'has-text-grey'}" | ||
> | ||
<i class="fas fa-check-circle" /> | ||
</span> | ||
</div> | ||
<div>{(i + 1) * 25}%</div> | ||
<div class="ml-1 has-text-grey-light has-text-weight-bold is-size-7"> | ||
{formatCurrencyCrude(point.value)} | ||
</div> | ||
</div> | ||
</div> | ||
{/each} | ||
</div> | ||
{/if} | ||
<Progress {progressPercent} /> | ||
</div> | ||
|
||
<style lang="scss"> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.