135 lines
3.3 KiB
Markdown
135 lines
3.3 KiB
Markdown
|
---
|
||
|
banner: "![[dash-banner.png]]"
|
||
|
banner: ""
|
||
|
banner_y: -1.1
|
||
|
banner_x: 0.97531
|
||
|
banner_lock: true
|
||
|
nested:
|
||
|
other: hi
|
||
|
---
|
||
|
|
||
|
\[inline:: hi]
|
||
|
|
||
|
<h1 align="center" style="text-shadow: 0px 4px #ff438ba1; font-size:4em; text-align: center">🌸 welcome~ 🌸</h1>
|
||
|
|
||
|
```dataviewjs
|
||
|
const today = DateTime.now()
|
||
|
const endOfYear = {
|
||
|
year: today.year,
|
||
|
month: 12,
|
||
|
day: 31
|
||
|
}
|
||
|
const birthday = DateTime.fromObject({
|
||
|
year: today.year,
|
||
|
month: 8,
|
||
|
day: 11
|
||
|
});
|
||
|
const lastbirthday = birthday.minus({year: 1})
|
||
|
const nextbirthday = birthday.plus({year: 1})
|
||
|
console.log(birthday, lastbirthday)
|
||
|
console.log(today.diff(lastbirthday))
|
||
|
function progress(type) {
|
||
|
let value;
|
||
|
switch(type) {
|
||
|
case "lifespan":
|
||
|
let bol = (today.startOf("day") >= birthday.startOf("day"))
|
||
|
let fac = bol ? 1 : -1
|
||
|
console.log(today.diff(nextbirthday).as("days"))
|
||
|
console.log(today, birthday, nextbirthday)
|
||
|
value = (
|
||
|
(
|
||
|
(
|
||
|
(today.diff(bol ? birthday : nextbirthday).as("days") * fac)
|
||
|
)
|
||
|
)
|
||
|
/ today.daysInYear
|
||
|
) * 100
|
||
|
console.log("value", value)
|
||
|
break;
|
||
|
case "year":
|
||
|
value = today.month / 12 * 100
|
||
|
break;
|
||
|
case "month":
|
||
|
value = today.day / today.daysInMonth * 100
|
||
|
break;
|
||
|
case "day":
|
||
|
value = today.hour / 24 * 100
|
||
|
break;
|
||
|
}
|
||
|
return `<progress value="${parseInt(value)}" max="100"></progress> | ${parseInt(value)} %`
|
||
|
}
|
||
|
dv.span(`
|
||
|
| 🌺 | Progress | Percentage |
|
||
|
| --- | --- |:---:|
|
||
|
| **year** | ${progress("year")}
|
||
|
| **month**| ${progress("month")}
|
||
|
| **day**| ${progress("day")}
|
||
|
| **🎂** | ${progress("lifespan")}
|
||
|
`)
|
||
|
```
|
||
|
|
||
|
> dy78p9HnlbYNGPRo6tIYMMs14xQUa4ZL6o4I0DheCgj
|
||
|
>
|
||
|
> > ejHxvWCww`button-daily`
|
||
|
>
|
||
|
> > mrS2tF1b1`button-thisweek`
|
||
|
>
|
||
|
> > PIiHJVCZ5`button-thismonth`
|
||
|
>
|
||
|
> > psp31V6nK`button-reload`
|
||
|
|
||
|
> gZScq1hVmk9d5iZ1dmyw0HzFyfCUd<h2 align="center">ZPPtB5lZ8pm4nvXJXwUiO2AiV7M24✨</h2>
|
||
|
>
|
||
|
> ```dataview
|
||
|
> TABLE file.cday as Created, file.mtime as Modified, file.path as Folder
|
||
|
> ```
|
||
|
|
||
|
E8uTrL1WOjFDmb5AqOlbog4f8NQwRcUvdVrDYPbkxgiem5446Jmh4xKIFhm27ng3DGam1lyxYa9iHbAUtNGFfLyPVdQoMXrVL6wSmrXUC6xBsNA347m6g5gkc
|
||
|
|
||
|
> ```
|
||
|
> ```
|
||
|
|
||
|
***
|
||
|
|
||
|
> FpbE8Sz73FTGrj0wEcMDLDVq3l2EklqMobqQTbLJ3H
|
||
|
>
|
||
|
> > D9dqvV4LUQmigf9PlWKq0PNfxv[[01 - YfKE1juXJIOIOgwMOFS2|WmOIdtQci]]
|
||
|
> >
|
||
|
> > * sDwxKrFWUA[[01 - iY9IzKwjh3|jUJ17lnwg8X2]]
|
||
|
> > * afh22jagkfxqXtz3[[10 - rrU4d1oXo25d8N|RoXsR2Zimc6uKNTDanMZe]]
|
||
|
> > * szumkljnGJGpc[[20 - gC4UHttnTdjF|kGR9y5ubzRIUI]]
|
||
|
>
|
||
|
> > 8zwlUiCwiTthRPuehNzvze88QrxVCLpamqGu2bT[[02 - AHm2weGyHtEbb\_4jHpnX|wAH5wB9C]]
|
||
|
> >
|
||
|
> > * [08RP2Fh1](file:///C:/Users/Corinthe/Desktop/ART)
|
||
|
> > * S0FhXojynIA
|
||
|
>
|
||
|
> > t9gZmzkg9jMns53hRWrSu7vAeIv1PqrewA4p[[03 - XJYE4mOWOaofLvrwkA|tSrJKeR]]
|
||
|
> >
|
||
|
> > * [[01 - ueMdLsYKa5wbeq|SzsapjrdVXrP]]
|
||
|
> > * [[02 - OHGbYE7hJHvKuxjTac|ok6A8MnT7003kNID8]]
|
||
|
>
|
||
|
> > mj9EytBpC7agkthVDLV2c6v7qgQlUdm[[04 - hcNGAtM53eRSUIlWSGs|zHAz1ooFoy2xmWcVWeL]]uu29VADXVGHDaX9WSXiwPXG
|
||
|
> >
|
||
|
> > * [[10 - PrmzDNNf\_YyRmi|cJiq3EUV6ELLAooqwAQMdrZ]]
|
||
|
> >
|
||
|
> > rCsqsR0S69LElr1VK3CmP5pUhGrH5s
|
||
|
> >
|
||
|
> > * [[10 - 3X\_\_2y2TSRlOzQffw|6UrxAOEJ7PJzJ48k]]
|
||
|
|
||
|
***
|
||
|
|
||
|
<h1 align="center">:far_clipboardlistcheck: Projects</h1>
|
||
|
|
||
|
> b5fmMcshssUmEVi
|
||
|
>
|
||
|
> ```dataviewjs
|
||
|
> ```
|
||
|
|
||
|
7J1RE9uqFukktHHdmFCUDCzUGEFytoQ7KsHsnwuxG8OhFr7gvuOrquBaH1FZvh6QThj6LZ4DsOeEAkE6kKvm
|
||
|
|
||
|
> ```
|
||
|
> ```
|
||
|
|
||
|
***
|