-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5cf2bb2
commit d789013
Showing
7 changed files
with
202 additions
and
0 deletions.
There are no files selected for viewing
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
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,74 @@ | ||
<template> | ||
<footer class="text-gray-600 dark:text-gray-300"> | ||
<div class="flex flex-wrap items-center gap-2"> | ||
<div class="flex flex-col gap-1"> | ||
<div class="flex items-center gap-1 font-bold md:text-xl"> | ||
<img class="w-6 h-6" src="/img/logo.svg" /> | ||
<span class="text-red-800 dark:text-yellow-400"> | ||
LimbusCompute: Limbus Company Toolbox | ||
</span> | ||
</div> | ||
<div> | ||
<ul class="flex gap-2 text-sm underline md:gap-4 md:text-base"> | ||
<li> | ||
<UButton | ||
class="p-0" | ||
color="black" | ||
variant="link" | ||
to="https://github.com/MusicOnline/LimbusCompute#special-thanks" | ||
target="_blank" | ||
> | ||
Credits | ||
</UButton> | ||
</li> | ||
</ul> | ||
<GitStatus class="text-xs" /> | ||
</div> | ||
</div> | ||
<div class="ml-auto flex flex-col items-end gap-1 text-sm md:gap-2"> | ||
<div class="flex items-center gap-1"> | ||
<span> Made with </span> | ||
<a class="flex items-center" href="https://nuxt.com" target="_blank"> | ||
<UIcon | ||
class="bg-contain bg-center text-xl md:text-2xl" | ||
name="i-logos-nuxt-icon" | ||
/> | ||
</a> | ||
<a class="flex items-center" href="https://vuejs.org" target="_blank"> | ||
<UIcon | ||
class="bg-contain bg-center text-xl md:text-2xl" | ||
name="i-logos-vue" | ||
/> | ||
</a> | ||
<a | ||
class="flex items-center" | ||
href="https://tailwindcss.com" | ||
target="_blank" | ||
> | ||
<UIcon | ||
class="bg-contain bg-center text-xl md:text-2xl" | ||
name="i-logos-tailwindcss-icon" | ||
/> | ||
</a> | ||
<UIcon | ||
class="bg-contain bg-center text-xl md:text-2xl" | ||
name="i-emojione-red-heart" | ||
/> | ||
</div> | ||
<div> | ||
<a | ||
class="flex items-center gap-1" | ||
href="https://github.com/MusicOnline/LimbusCompute" | ||
target="_blank" | ||
> | ||
<span> Watch development on </span> | ||
<UIcon | ||
class="bg-contain bg-center text-xl md:text-2xl" | ||
name="i-mdi-github" | ||
/> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</footer> | ||
</template> |
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,64 @@ | ||
<script setup lang="ts"> | ||
const SECONDS_IN_MINUTE = 60 | ||
const SECONDS_IN_HOUR = 60 * SECONDS_IN_MINUTE | ||
const SECONDS_IN_DAY = 24 * SECONDS_IN_HOUR | ||
const SECONDS_IN_WEEK = 7 * SECONDS_IN_DAY | ||
const SECONDS_IN_MONTH = 30 * SECONDS_IN_DAY | ||
const SECONDS_IN_YEAR = 365 * SECONDS_IN_DAY | ||
const { | ||
public: { commit }, | ||
} = useRuntimeConfig() | ||
const commitUrl = computed(() => | ||
commit.baseUrl | ||
? new URL( | ||
commit.id, | ||
commit.baseUrl + (commit.baseUrl.endsWith("/") ? "" : "/") | ||
).toString() | ||
: null | ||
) | ||
const relativeTime = computed(() => { | ||
const now = Date.now() / 1000 // Date.now() returns in milliseconds | ||
const diff = now - parseInt(commit.timestamp) | ||
const rtf = new Intl.RelativeTimeFormat("en", { numeric: "auto" }) | ||
// negative = past | ||
if (diff < SECONDS_IN_MINUTE) { | ||
return rtf.format(-Math.round(diff), "second") | ||
} else if (diff < SECONDS_IN_HOUR) { | ||
return rtf.format(-Math.round(diff / SECONDS_IN_MINUTE), "minute") | ||
} else if (diff < SECONDS_IN_DAY) { | ||
return rtf.format(-Math.round(diff / SECONDS_IN_HOUR), "hour") | ||
} else if (diff < SECONDS_IN_WEEK) { | ||
return rtf.format(-Math.round(diff / SECONDS_IN_DAY), "day") | ||
} else if (diff < SECONDS_IN_MONTH) { | ||
return rtf.format(-Math.round(diff / SECONDS_IN_WEEK), "week") | ||
} else if (diff < SECONDS_IN_YEAR) { | ||
return rtf.format(-Math.round(diff / SECONDS_IN_MONTH), "month") | ||
} else { | ||
return rtf.format(-Math.round(diff / SECONDS_IN_YEAR), "year") | ||
} | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div v-if="commit.id"> | ||
<UButton | ||
class="p-0 flex-wrap" | ||
color="gray" | ||
variant="link" | ||
:to="commitUrl" | ||
target="_blank" | ||
:disabled="!Boolean(commitUrl)" | ||
> | ||
<span>{{ commit.id }}</span> | ||
<span>{{ commit.message }}</span> | ||
<ClientOnly> | ||
<span>({{ relativeTime }})</span> | ||
</ClientOnly> | ||
<UIcon v-if="commitUrl" name="i-heroicons-arrow-top-right-on-square" /> | ||
</UButton> | ||
</div> | ||
</template> |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.