Update fastfetch uptime
This commit is contained in:
1 parent
bf2bf78bb5
commit
26c2f869c7
1 file changed
+3
-3
@@ -2,8 +2,8 @@
|
|||||||
import { profile } from '#lib/content';
|
import { profile } from '#lib/content';
|
||||||
import { themeState } from '#lib/theme/theme.svelte';
|
import { themeState } from '#lib/theme/theme.svelte';
|
||||||
|
|
||||||
const launchDate = new Date('2020-01-01T00:00:00Z');
|
const uptimeStart = new Date(2006, 0, 1);
|
||||||
const uptimeDays = Math.floor((Date.now() - launchDate.getTime()) / 86400000);
|
const uptimeDays = Math.floor((Date.now() - uptimeStart.getTime()) / 86400000);
|
||||||
const paletteColors = ['red', 'yellow', 'orange', 'green', 'cyan', 'blue', 'magenta', 'accent'];
|
const paletteColors = ['red', 'yellow', 'orange', 'green', 'cyan', 'blue', 'magenta', 'accent'];
|
||||||
|
|
||||||
const rows = $derived([
|
const rows = $derived([
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
['Theme', themeState.current.name],
|
['Theme', themeState.current.name],
|
||||||
['Name', profile.displayName],
|
['Name', profile.displayName],
|
||||||
['Title', profile.title],
|
['Title', profile.title],
|
||||||
['Uptime', `${uptimeDays} days`],
|
['Uptime', `${uptimeDays.toLocaleString('en-US')} days`],
|
||||||
['Languages', (profile.skills.Languages ?? []).slice(0, 5).join(', ')]
|
['Languages', (profile.skills.Languages ?? []).slice(0, 5).join(', ')]
|
||||||
]);
|
]);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in new issue
Block a user