chlorine / memos_migr.py
0 Lajky
0 Forky
1 Soubory
Naposledy aktivní
1 | import sqlite3 |
2 | |
3 | conn_source = sqlite3.connect('db/source.db') |
4 | conn_target = sqlite3.connect('db/memos_prod.db') |
5 | |
6 | cur_source = conn_source.cursor() |
7 | cur_target = conn_target.cursor() |
8 | |
9 | #? change here |
10 | cur_source.execute('SELECT * FROM tag') |
chlorine / time-fmt.min.js
0 Lajky
0 Forky
1 Soubory
Naposledy aktivní
1 | const tzArr=["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"],sdArr=["夜半","鸡鸣","平旦","日出","食时","隅中","日中","日昳","晡时","日入","黄昏","人定"],sdArr2=["半夜","凌晨","黎明","清晨","早上","上午","中午","午后","下午","傍晚","晚上","深夜"];function formatTime(r){const t=new Date,o=new Date(r),e=t-o,n=Math.floor(e/1e3),u=Math.floor(n/60),f=Math.floor(u/60),a=Math.floor(f/24);if(n<60)return"刚刚";if(u<60)return`${u} 分钟前`;if(f<24)return`${f} 小时前`;if(a<7)return`${a} 天前 ${formatHour(o)}`;const $=t.getFullYear(),m=o.getFullYear();return $===m?`${o.getMonth()+1} 月 ${o.getDate()} 日 ${formatHour(o)}`:`${m} 年 ${o.getMonth()+1} 月 ${o.getDate()} 日 ${formatHour(o)}`}function formatHour(r){const t=r.getHours(),o=r.getMinutes(),e=Math.floor((t+1)/2)%12;return`${`${formatNumber(t)}:${formatNumber(o)}`} • ${tzArr[e]}时 ${sdArr[e]} (${sdArr2[e]})`}function formatNumber(r){return r<10?`0${r}`:r} |
chlorine / whispe.html
0 Lajky
0 Forky
1 Soubory
Naposledy aktivní
1 | {{ with resources.Get "css/addon/whisper.css" }} |
2 | <style> |
3 | {{ .Content | safeCSS }} |
4 | </style> |
5 | {{ end }} |
6 | |
7 | <body> |
8 | <div id="toots-content" class="toots-container"> |
9 | <div id="toots"></div> |
10 | <div id="toots-loading" class="loading-container" style="display: none;"> |
chlorine / whispe.css
0 Lajky
0 Forky
1 Soubory
Naposledy aktivní
1 | :root { |
2 | --primary-color: #657786; |
3 | --bg-color: #1387cf; |
4 | --hover-bg-color: #1991db; |
5 | --border-color: #888888; |
6 | --spinner-color: #1da1f2; |
7 | --padding-small: 12px; |
8 | --padding-medium: 16px; |
9 | --margin-small: 10px; |
10 | --margin-medium: 16px; |
Novější
Starší