Widgets 服務平台
如果你不喜歡程式碼,想要快速使用,可以參考以下的服務平台,有些是免費的,有些要付費,不妨嘗試看看:
- Apption.co → 種類眾多,可以慢慢看、慢慢選
- Indify → 我喜歡他的時鐘,很好看 (有免費數目限制)
- WidgetBox → 與 Indify 很像 (有免費數目限制)
- KAiRO → 時間、習慣養成、目標追蹤,這是要付費使用的
- Blocs → 免費可以使用番茄時鐘、喝水追蹤、習慣追蹤
- Notion Pet → 很多小部件可以選擇,也可以自製 icon,個人喜歡熱力圖
- Inkle.xyz → 聖經、名言、倒數計時器...
教你使用 GitHub 製作專屬的 Notion Widgets
如果你願意看一點點程式碼,也開始研究 HTML,你可能會找到這樣的工具:- HtmlSave:免費提供一個小部件服務,若需要更多可以參考他的方案介紹
- the Potion Shop:沒有數量限制,但有廣告連結
第一步:製作一個新的 GitHub 的儲存庫
1.1:登入 GitHub ,點擊右上方的 "+”,選擇 "New repository”。
1.2:幫儲存庫取一個名字,之後點擊下方的 "Create repository”。

第二步:創建一個 Widget
- 點擊 "Creating a new file” 創建新的文件檔案
- 輸入檔案的名稱,並將以下的程式碼貼入程式碼編輯區中,點擊下方的 "Commit new file”
- 程式碼 (按下右上方的 Copy)
<!-- original : <https://codepen.io/SeanNorton/pen/LWBXQL> -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
/*CSS RESETS*/
body{
background-color: #fff;
line-height: 1.6;
}
h1 {
margin-top: 0;
}
/*CSS START*/
.full-table {
display: table;
height: 100%;
width: 100%;
}
.table-cell {
display: table-cell;
vertical-align: middle;
text-align: center;
}
.card {
padding: 10px 25px 10px 25px;
border-radius: 10px;
background: #009688;
color: #fff;
display: inline-block;
box-shadow: 2px 2px 1px 0px #295C7B;
}
.card:hover {
margin-top: 2px;
box-shadow: none;
}
.clock {
display: inline-block;
font-family: 'Roboto', sans-serif;
font-weight: bold;
font-size: 1.2em;
/* padding-left: 20px; */
}
.time {
display: inline-block;
min-width: 37px;
}
.colon {
font-size: 1.1em;
display: inline-block;
}
.date {
display: block;
min-width: 162px;
/* padding-right: 30px; */
/* border-right: 2px solid #295C7B; */
font-family: 'Roboto', sans-serif;
font-size: 1.2em;
}
.greet{
min-width: 162px;
/* padding-right: 30px; */
font-family: 'Roboto', sans-serif;
font-size: 1.2em;
}
</style>
</head>
<body>
<link href="<https://fonts.googleapis.com/css?family=Lobster|Roboto:400,700>" rel="stylesheet">
<div class="full-table">
<div class="table-cell">
<div class="card">
<div class="greet" id="greet"></div>
<div class="date" id="date"></div>
<div class="clock">
<div class="time" id="hour"></div>
<div class="colon">:</div>
<div class="time" id="min"></div>
<div class="colon">:</div>
<div class="time" id="sec"></div>
</div>
</div>
</div>
</div>
<script>
function date() {
var today = new Date();
document.getElementById('date').innerHTML = today.toDateString();
}
function clock() {
var today = new Date();
var hour = zeros(twelveHour(today.getHours()));
var minutes = zeros(today.getMinutes());
var seconds = zeros(today.getSeconds());
if(today.getHours() >=12){
seconds+=" pm"
}
else{
seconds+=" am"
}
hrs = today.getHours();
if (hrs < 12)
greet = 'Good Morning ';
else if (hrs >= 12 && hrs <= 17)
greet = 'Good Afternoon ';
else if (hrs >= 17 && hrs <= 24)
greet = 'Good Evening ';
// console.log(today.toLocaleTimeString());
document.getElementById('greet').innerHTML = greet;
document.getElementById('hour').innerHTML = hour;
document.getElementById('min').innerHTML = minutes;
document.getElementById('sec').innerHTML = seconds;
}
function twelveHour(hour) {
if (hour > 12) {
return hour -= 12
} else if (hour === 0) {
return hour = 12;
} else {
return hour
}
}
// adds zero infront of single digit number
function zeros(num) {
if (num < 10) {
num = '0' + num
};
return num;
}
function dateTime() {
date();
clock();
setTimeout(dateTime, 500);
}
dateTime()
// END
</script>
</body>
</html>
- 程式碼 (按下右上方的 Copy)
第三步:發布 Widget
- 請在儲存庫頁面中點擊 “Settings” → "Pages" → 選擇 "main” → "Save"
- 頁面會出現 Html 的網址
- 小部件的完整網址就是這一串加上檔案名稱, 例如:https://ally293.github.io/notion/greetings.html