feat: add manual js

i cannot believe this
This commit is contained in:
2022-08-12 20:44:27 -04:00
parent 98a2cee26a
commit a9a555d20a
7 changed files with 96 additions and 8 deletions

View File

@@ -34,7 +34,7 @@ onMounted(() => {
<IconSun />
</div>
<input
id="toggle"
id="dark-toggle"
name="toggle"
type="checkbox"
:checked="isToggled"

View File

@@ -7,8 +7,7 @@ const imgUrl = ref("");
const href = ref("");
onMounted(async () => {
const results = (await useFetch(FEED_URL, { initialCache: false }))
.data as Ref<GithubPushEvent[]>;
const results = (await useFetch(FEED_URL)).data as Ref<GithubPushEvent[]>;
const latestEvent = results.value.find(
(event) => event.type === "PushEvent"
) as GithubPushEvent;
@@ -22,12 +21,13 @@ onMounted(async () => {
<div class="prose dark:prose-invert">
<HomeStatBox
:href="href"
id="github-commit-a"
color="lightgray"
darkcolor="slategray"
title="Latest commit"
:clearstyles="true"
>
<img class="m-0 w-full h-full" :src="imgUrl" />
<img class="m-0 w-full h-full" :src="imgUrl" id="github-commit-img" />
<!--
<div>
<h2>{{ title }}</h2>

View File

@@ -7,6 +7,7 @@ import { unref as _unref } from "vue";
const {
href,
id,
color = "pink",
darkcolor = "#c88994",
title,
@@ -14,6 +15,7 @@ const {
forceheight,
} = defineProps<{
href?: string;
id?: string;
color?: Color;
darkcolor?: Color;
title?: string;
@@ -36,7 +38,11 @@ const cssVars = {
</script>
<template>
<a class="no-underline inline-block flex flex-col items-stretch" :href="href">
<a
class="no-underline inline-block flex flex-col items-stretch"
:href="href"
:id="id"
>
<div class="container box" :style="cssVars">
<p class="m-0 w-full title">{{ title }}</p>
<div class="main-content">