Skip to content

Commit

Permalink
Add favicon, fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
lightningboltemoji committed Aug 30, 2024
1 parent 3f0d6cd commit 3c8fd01
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
6 changes: 0 additions & 6 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ export default defineNuxtConfig({
},
app: {
head: {
link: [
{
rel: "icon",
href: "data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🌊</text></svg>",
},
],
title: "Manzanita, OR - manzanita.cecchetti.xyz",
viewport: "width=device-width, initial-scale=1.0, viewport-fit=cover",
},
Expand Down
10 changes: 5 additions & 5 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ type Tide = {
onBeforeMount(async () => {
const now = dayjs();
if (!cacheV1.value.predictions || !cacheV1.value.created || now.unix > cacheV1.value.created + 60 * 60 * 1000) {
if (!cacheV1.value.predictions || !cacheV1.value.created || now.unix() > cacheV1.value.created + 60 * 60 * 1000) {
cacheV1.value = {
created: now.unix,
created: now.unix(),
predictions: await getHiLoPredictions(
now.subtract(2, "days").format("YYYYMMDD"),
now.add(30, "days").format("YYYYMMDD"),
Expand Down Expand Up @@ -54,17 +54,17 @@ const relevant: ComputedRef<{ prev?: Tide; next?: Tide }> = computed(() => {
});
const whatsHappening = computed(() => {
if (!relevant.value) {
if (!relevant.value.next) {
return "";
}
return relevant.value.next["type"] === "H" ? "coming in" : "going out";
});
const times = computed(() => {
if (!relevant.value) {
const { prev, next } = relevant.value;
if (!prev || !next) {
return {};
}
const { prev, next } = relevant.value;
const now = dayjs();
const between = next.time.diff(prev.time);
const sincePrev = now.diff(prev.time);
Expand Down
Binary file added public/favicon.ico
Binary file not shown.

0 comments on commit 3c8fd01

Please sign in to comment.