diff --git a/fmhub.js b/fmhub.js index 863fb27..a62b078 100644 --- a/fmhub.js +++ b/fmhub.js @@ -18,25 +18,13 @@ function 检查并创建目录(dirname) { // 初始化 leveldb 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 { constructor() { this.用户订阅 = new interrelated() this.用户会话 = new interrelated() - this.终端注视 = new interrelated() // onlookers + this.终端注视 = new interrelated() } 围观作品(对象路径, 围观者会话) { diff --git a/main.js b/main.js index 4c84899..beca64c 100644 --- a/main.js +++ b/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 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([ h3.text(blog.title), 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([ div.childs([ - h3.text('# TAG'), + h3.font('bold').text('# TAG'), 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([ - h3.text('# 归档'), + h3.font('bold 8px').text('# 归档'), ul.childs(articleData.map(article => li.text(article))), ]), ]), diff --git a/package.json b/package.json index a37b7f5..90d37a5 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "author": "satori ", "license": "MIT", "dependencies": { - "@laniakeasupercluster/widgets": "^1.1.3", + "@laniakeasupercluster/widgets": "^1.1.5", "axios": "^1.6.8", "express": "^4.17.1", "express-session": "^1.17.2",