重置UI
This commit is contained in:
parent
ce2dd6f831
commit
645071e109
14
fmhub.js
14
fmhub.js
@ -18,25 +18,13 @@ function 检查并创建目录(dirname) {
|
|||||||
|
|
||||||
// 初始化 leveldb
|
// 初始化 leveldb
|
||||||
const db = level("./data/level/fmhub")
|
const db = level("./data/level/fmhub")
|
||||||
//db.put('name', 'Level', function (err) {
|
|
||||||
// if (err) return console.log('Ooops!', err) // some kind of I/O error
|
|
||||||
//
|
|
||||||
// // 3) Fetch by key
|
|
||||||
// db.get('name', function (err, value) {
|
|
||||||
// if (err) return console.log('Ooops!', err) // likely the key was not found
|
|
||||||
//
|
|
||||||
// // Ta da!
|
|
||||||
// console.log('name=' + value)
|
|
||||||
// })
|
|
||||||
//})
|
|
||||||
|
|
||||||
// 订阅记录, 每个频道可能被多次订阅因而产生大量查询
|
// 订阅记录, 每个频道可能被多次订阅因而产生大量查询
|
||||||
|
|
||||||
export default class fmhub {
|
export default class fmhub {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.用户订阅 = new interrelated()
|
this.用户订阅 = new interrelated()
|
||||||
this.用户会话 = new interrelated()
|
this.用户会话 = new interrelated()
|
||||||
this.终端注视 = new interrelated() // onlookers
|
this.终端注视 = new interrelated()
|
||||||
}
|
}
|
||||||
|
|
||||||
围观作品(对象路径, 围观者会话) {
|
围观作品(对象路径, 围观者会话) {
|
||||||
|
9
main.js
9
main.js
@ -8,7 +8,7 @@ const blogData = [
|
|||||||
const tagData = ['JavaScript', 'CSS', 'HTML', 'Web', 'JavaScript', 'CSS', 'HTML', 'Web', 'JavaScript', 'CSS', 'HTML', 'Web', 'JavaScript', 'CSS', 'HTML', 'Web']
|
const tagData = ['JavaScript', 'CSS', 'HTML', 'Web', 'JavaScript', 'CSS', 'HTML', 'Web', 'JavaScript', 'CSS', 'HTML', 'Web', 'JavaScript', 'CSS', 'HTML', 'Web']
|
||||||
const articleData = ['Article 1', 'Article 2', 'Article 3']
|
const articleData = ['Article 1', 'Article 2', 'Article 3']
|
||||||
|
|
||||||
document.body.appendChild(div.grid({ gridTemplateColumns: '3fr 1fr', gap: '1rem' }).p('1rem').childs([
|
document.body.appendChild(div.grid({ gridTemplateColumns: '3fr 1fr', gap: '1rem' }).w('1280px').mx('auto').p('1rem').childs([
|
||||||
main.grid({ gap: '1rem' }).childs(blogData.map(blog => section.childs([
|
main.grid({ gap: '1rem' }).childs(blogData.map(blog => section.childs([
|
||||||
h3.text(blog.title),
|
h3.text(blog.title),
|
||||||
p.text(blog.content),
|
p.text(blog.content),
|
||||||
@ -16,13 +16,14 @@ document.body.appendChild(div.grid({ gridTemplateColumns: '3fr 1fr', gap: '1rem'
|
|||||||
]))),
|
]))),
|
||||||
aside.grid({ gridColumn: '2', flexDirection: 'column', gap: '1rem' }).childs([
|
aside.grid({ gridColumn: '2', flexDirection: 'column', gap: '1rem' }).childs([
|
||||||
div.childs([
|
div.childs([
|
||||||
h3.text('# TAG'),
|
h3.font('bold').text('# TAG'),
|
||||||
div.flex({ gap: '.5rem', flexWrap: 'wrap' }).childs([
|
div.flex({ gap: '.5rem', flexWrap: 'wrap' }).childs([
|
||||||
...tagData.map(tag => span.bg('#ececec').radius('.25rem').px('8px').text(tag))
|
// cursor-pointer overflow-clip hover:text-pink-500
|
||||||
|
...tagData.map(tag => span.bg('rgba(200,200,200,.2)').radius('.25rem').px('8px').text(tag))
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
div.childs([
|
div.childs([
|
||||||
h3.text('# 归档'),
|
h3.font('bold 8px').text('# 归档'),
|
||||||
ul.childs(articleData.map(article => li.text(article))),
|
ul.childs(articleData.map(article => li.text(article))),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"author": "satori <huan0016@gmail.com>",
|
"author": "satori <huan0016@gmail.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@laniakeasupercluster/widgets": "^1.1.3",
|
"@laniakeasupercluster/widgets": "^1.1.5",
|
||||||
"axios": "^1.6.8",
|
"axios": "^1.6.8",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"express-session": "^1.17.2",
|
"express-session": "^1.17.2",
|
||||||
|
Loading…
Reference in New Issue
Block a user