Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/achuan-2/siyuan-widget-daycounter
Dynamically calculating countdown and countup days in siyuan-note
https://github.com/achuan-2/siyuan-widget-daycounter
siyuan-note siyuan-widget
Last synced: 17 days ago
JSON representation
Dynamically calculating countdown and countup days in siyuan-note
- Host: GitHub
- URL: https://github.com/achuan-2/siyuan-widget-daycounter
- Owner: Achuan-2
- License: gpl-3.0
- Created: 2024-04-05T17:53:38.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-08-13T02:03:28.000Z (3 months ago)
- Last Synced: 2024-10-14T07:36:51.481Z (about 1 month ago)
- Topics: siyuan-note, siyuan-widget
- Language: JavaScript
- Homepage:
- Size: 203 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOGS.md
- License: LICENSE
Awesome Lists containing this project
README
[δΈζ](./README_zh_CN.md)
## π Origin
I have always been envious of the dynamic calendar icon in Wolai, but unfortunately, there are no related widgets in Obsidian. With the help of GPT, I developed a countdown widget.
Due to my weak front-end skills and lack of familiarity with Obsidian's API calls, I managed to piece things together successfully, and I have to admit, I am quite impressed with myself.
## β¨ Interface Preview
![17123494514451712349450900.png](https://fastly.jsdelivr.net/gh/Achuan-2/PicBed@pic/assets/17123494514451712349450900.png)![17123494224531712349422113.png](https://fastly.jsdelivr.net/gh/Achuan-2/PicBed@pic/assets/17123494224531712349422113.png)
## π― Main Features
* Supports specifying a date for dynamic countdown and count-up calculations, relies on JavaScript code, does not depend on the network, and allows adding specific event names.
* If the specified date is earlier than today's date, it counts up.
* If the specified date is later than today's date, it counts down.
* Supports setting background color for some beautification.
* Configuration supports automatic saving to block attributes in Obsidian, ensuring permanent retention in notes.
* Supports exporting templates for loading configurations, facilitating repeated calls for specific countdown/count-up dates.## π Known Issues
* The text is designed to be relatively large, so the widget block is not suitable if resized too small.
* The Color Picker for setting colors does not support pasting colors.
* To ensure that the widget and template can be saved and read block attributes correctly during the initial load, a delay of 500ms is added, resulting in slower display.> If anyone knows how to solve the above issues, please feel free to let me know. Your help is greatly appreciated.
## β€ Acknowledgements
* ChatGPT and Google Gemini: Writing the main code.
* [Zuoqiu-Yingyi/widget-query](https://github.com/Zuoqiu-Yingyi/widget-query): Learning how to set default width and height for widgets.
* [OpaqueGlass/progressBarT-sywidget](https://github.com/OpaqueGlass/progressBarT-sywidget): Learning how widgets save and load configurations.## βοΈ Feedback
Feel free to raise an issue on [GitHub](https://github.com/Achuan-2/siyuan-widget-dayCounter) or contact me via email.