artalk 2.1.3 → 2.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/CNAME +1 -0
  2. package/dist/Artalk.css +1 -1
  3. package/dist/Artalk.es.js +509 -1571
  4. package/dist/Artalk.iife.js +1 -1
  5. package/dist/Artalk.js +1 -1
  6. package/index.html +143 -0
  7. package/package.json +8 -32
  8. package/postcss.config.js +5 -0
  9. package/src/api/index.ts +16 -3
  10. package/src/api/request.ts +4 -2
  11. package/src/artalk.ts +30 -8
  12. package/src/components/action-btn.ts +1 -1
  13. package/src/components/comment.ts +88 -3
  14. package/src/components/editor-plugs/emoticons-plug.less +21 -11
  15. package/src/components/editor-plugs/emoticons-plug.ts +18 -18
  16. package/src/components/editor-plugs/preview-plug.less +1 -1
  17. package/src/components/editor.ts +15 -20
  18. package/src/components/html/comment.html +6 -13
  19. package/src/components/html/editor.html +8 -9
  20. package/src/components/html/list.html +1 -1
  21. package/src/components/html/sidebar-layer.html +8 -0
  22. package/src/components/list-lite.ts +203 -299
  23. package/src/components/list.ts +11 -9
  24. package/src/components/pagination.ts +2 -2
  25. package/src/components/read-more-btn.ts +27 -4
  26. package/src/components/sidebar-layer.ts +143 -0
  27. package/src/defaults.ts +2 -1
  28. package/src/lib/detect.js +3 -1
  29. package/src/lib/utils.ts +27 -1
  30. package/src/style/_color.less +19 -23
  31. package/src/style/_extend.less +0 -80
  32. package/src/style/_variables.less +0 -24
  33. package/src/style/comment.less +191 -197
  34. package/src/style/editor.less +69 -94
  35. package/src/style/list.less +13 -13
  36. package/src/style/main.less +32 -32
  37. package/src/style/pagination.less +6 -6
  38. package/src/style/sidebar-layer.less +92 -0
  39. package/types/artalk-config.d.ts +4 -1
  40. package/types/artalk-data.d.ts +2 -2
  41. package/vite-common.config.ts +15 -0
  42. package/vite-demo.config.ts +14 -0
  43. package/vite.config.ts +36 -0
  44. package/LICENSE +0 -674
  45. package/README.md +0 -84
  46. package/src/components/admin/page-list.ts +0 -194
  47. package/src/components/admin/site-list-floater.ts +0 -98
  48. package/src/components/admin/site-list.ts +0 -289
  49. package/src/components/html/sidebar.html +0 -22
  50. package/src/components/item-text-editor.ts +0 -136
  51. package/src/components/sidebar-view.ts +0 -26
  52. package/src/components/sidebar-views/comments-view.ts +0 -74
  53. package/src/components/sidebar-views/pages-view.ts +0 -61
  54. package/src/components/sidebar-views/setting-view.ts +0 -21
  55. package/src/components/sidebar-views/sites-view.ts +0 -36
  56. package/src/components/sidebar-views/transfer-view.ts +0 -218
  57. package/src/components/sidebar.ts +0 -293
  58. package/src/lib/md5.js +0 -6
  59. package/src/style/item-text-editor.less +0 -35
  60. package/src/style/page-list.less +0 -50
  61. package/src/style/sidebar.less +0 -420
  62. package/src/style/site-list.less +0 -208
@@ -16,7 +16,7 @@ export default class List extends ListLite {
16
16
  constructor (ctx: Context) {
17
17
  const el = Utils.createElement(ListHTML)
18
18
 
19
- super(ctx, el)
19
+ super(ctx)
20
20
 
21
21
  // 把 listLite $el 变为子元素
22
22
  el.querySelector('.atk-list-body')!.append(this.$el)
@@ -34,6 +34,8 @@ export default class List extends ListLite {
34
34
 
35
35
  // 分页模式
36
36
  this.pageMode = this.conf.pagination?.readMore ? 'read-more' : 'pagination'
37
+ this.pageSize = this.conf.pagination?.pageSize || 20
38
+ this.repositionAt = this.$el
37
39
 
38
40
  // 操作按钮
39
41
  this.initListActionBtn()
@@ -42,7 +44,7 @@ export default class List extends ListLite {
42
44
  this.$el.querySelector<HTMLElement>('.atk-copyright')!.innerHTML = `Powered By <a href="https://artalk.js.org" target="_blank" title="Artalk v${ARTALK_VERSION}">Artalk</a>`
43
45
 
44
46
  // event listen
45
- this.ctx.on('list-reload', () => (this.reqComments(0))) // 刷新评论
47
+ this.ctx.on('list-reload', () => (this.fetchComments(0))) // 刷新评论
46
48
  this.ctx.on('list-refresh-ui', () => (this.refreshUI()))
47
49
  this.ctx.on('list-import', (data) => (this.importComments(data)))
48
50
  this.ctx.on('list-insert', (data) => (this.insertComment(data)))
@@ -51,7 +53,7 @@ export default class List extends ListLite {
51
53
  this.ctx.on('unread-update', (data) => (this.showUnreadBadge(data.notifies?.length || 0)))
52
54
  }
53
55
 
54
- private initListActionBtn () {
56
+ private initListActionBtn() {
55
57
  // 侧边栏呼出按钮
56
58
  this.$openSidebarBtn = this.$el.querySelector('[data-action="open-sidebar"]')!
57
59
  this.$closeCommentBtn = this.$el.querySelector('[data-action="admin-close-comment"]')!
@@ -71,10 +73,10 @@ export default class List extends ListLite {
71
73
  }
72
74
 
73
75
  /** 刷新界面 */
74
- public refreshUI () {
76
+ public refreshUI() {
75
77
  super.refreshUI()
76
78
 
77
- this.$el.querySelector<HTMLElement>('.atk-comment-count-num')!.innerText = String(this.commentsCount)
79
+ this.$el.querySelector<HTMLElement>('.atk-comment-count-num')!.innerText = String(Number(this.data?.total) || 0)
78
80
 
79
81
  // 已输入个人信息
80
82
  if (!!this.ctx.user.data.nick && !!this.ctx.user.data.email) {
@@ -85,7 +87,7 @@ export default class List extends ListLite {
85
87
 
86
88
  // 仅管理员显示控制
87
89
  this.ctx.trigger('check-admin-show-el')
88
- this.$openSidebarBtn.innerText = (!this.ctx.user.data.isAdmin) ? '通知中心' : '控制中心'
90
+ this.$openSidebarBtn.querySelector<HTMLElement>('.atk-text')!.innerText = (!this.ctx.user.data.isAdmin) ? '通知中心' : '控制中心'
89
91
 
90
92
  // 关闭评论
91
93
  if (!!this.data && !!this.data.page && this.data.page.admin_only === true) {
@@ -97,7 +99,7 @@ export default class List extends ListLite {
97
99
  }
98
100
  }
99
101
 
100
- public onLoad(data: ListData, offset: number) {
102
+ protected onLoad(data: ListData, offset: number) {
101
103
  super.onLoad(data, offset)
102
104
 
103
105
  // 检测锚点跳转
@@ -130,7 +132,7 @@ export default class List extends ListLite {
130
132
  // TODO 若找不到评论的情况
131
133
  // if (!comment) { // 若找不到评论
132
134
  // if (this.hasMoreComments) { // 阅读更多,并重试
133
- // await this.reqComments()
135
+ // await this.fetchComments()
134
136
  // }
135
137
  // }
136
138
 
@@ -161,7 +163,7 @@ export default class List extends ListLite {
161
163
  })
162
164
  }
163
165
 
164
- public showUnreadBadge (count: number) {
166
+ public showUnreadBadge(count: number) {
165
167
  if (count > 0) {
166
168
  this.$unreadBadge.innerText = `${Number(count || 0)}`
167
169
  this.$unreadBadge.style.display = 'block'
@@ -4,7 +4,7 @@ import * as Ui from '../lib/ui'
4
4
 
5
5
  export interface PaginationConf {
6
6
  /** 每页条数 */
7
- pageSize?: number
7
+ pageSize: number
8
8
 
9
9
  /** 回调函数 */
10
10
  onChange: (offset: number) => void
@@ -21,7 +21,7 @@ export default class Pagination {
21
21
 
22
22
  public page: number = 1
23
23
  get pageSize(): number {
24
- return this.conf.pageSize || 15
24
+ return this.conf.pageSize
25
25
  }
26
26
  get offset(): number {
27
27
  return this.pageSize * (this.page - 1)
@@ -2,7 +2,9 @@ import * as Utils from '../lib/utils'
2
2
 
3
3
  export interface ReadMoreBtnConf {
4
4
  /** 回调函数 */
5
- onClick: () => void
5
+ onClick: (offset: number) => void
6
+
7
+ pageSize: number
6
8
  }
7
9
 
8
10
  /**
@@ -13,6 +15,13 @@ export default class ReadMoreBtn {
13
15
  public $el: HTMLElement
14
16
  private $loading: HTMLElement
15
17
  private $text: HTMLElement
18
+ private offset: number = 0
19
+ private total: number = 0
20
+
21
+ /** 是否有更多内容 */
22
+ get hasMore() {
23
+ return this.total > (this.offset + this.conf.pageSize)
24
+ }
16
25
 
17
26
  public constructor(conf: ReadMoreBtnConf) {
18
27
  this.conf = conf
@@ -21,18 +30,19 @@ export default class ReadMoreBtn {
21
30
  `<div class="atk-list-read-more" style="display: none;">
22
31
  <div class="atk-list-read-more-inner">
23
32
  <div class="atk-loading-icon" style="display: none;"></div>
24
- <span class="atk-text">查看更多</span>
33
+ <span class="atk-text">加载更多</span>
25
34
  </div>
26
35
  </div>`)
27
36
 
28
37
  this.$loading = this.$el.querySelector<HTMLElement>('.atk-loading-icon')!
29
38
  this.$text = this.$el.querySelector<HTMLElement>('.atk-text')!
30
39
 
31
- this.$el.onclick = () => this.click()
40
+ this.$el.onclick = () => { this.click() }
32
41
  }
33
42
 
34
43
  click() {
35
- this.conf.onClick()
44
+ if (this.hasMore) this.conf.onClick(this.offset + this.conf.pageSize)
45
+ this.checkDisabled()
36
46
  }
37
47
 
38
48
  /** 显示 */
@@ -62,4 +72,17 @@ export default class ReadMoreBtn {
62
72
  this.$el.classList.remove('atk-err')
63
73
  }, 2000) // 2s后错误提示复原
64
74
  }
75
+
76
+ /** 更新数据 */
77
+ public update(offset: number, total: number) {
78
+ this.offset = offset
79
+ this.total = total
80
+
81
+ this.checkDisabled()
82
+ }
83
+
84
+ public checkDisabled() {
85
+ if (this.hasMore) this.show()
86
+ else this.hide()
87
+ }
65
88
  }
@@ -0,0 +1,143 @@
1
+ import '../style/sidebar-layer.less'
2
+
3
+ import Context from '@/context'
4
+ import Component from '@/lib/component'
5
+ import * as Utils from '@/lib/utils'
6
+ import SidebarHTML from './html/sidebar-layer.html?raw'
7
+ import * as Ui from '@/lib/ui'
8
+ import Layer from './layer'
9
+
10
+ export default class SidebarLayer extends Component {
11
+ public layer?: Layer
12
+ public $header: HTMLElement
13
+ public $closeBtn: HTMLElement
14
+ public $iframeWrap: HTMLElement
15
+ public $iframe?: HTMLIFrameElement
16
+
17
+ constructor(ctx: Context) {
18
+ super(ctx)
19
+
20
+ this.$el = Utils.createElement(SidebarHTML)
21
+ this.$header = this.$el.querySelector('.atk-sidebar-header')!
22
+ this.$closeBtn = this.$header.querySelector('.atk-sidebar-close')!
23
+ this.$iframeWrap = this.$el.querySelector('.atk-sidebar-iframe-wrap')!
24
+
25
+ this.$closeBtn.onclick = () => {
26
+ this.hide()
27
+ }
28
+
29
+ // event
30
+ this.ctx.on('sidebar-show', () => (this.show()))
31
+ this.ctx.on('sidebar-hide', () => (this.hide()))
32
+ this.ctx.on('user-changed', () => { this.firstShow = true })
33
+ }
34
+
35
+ private firstShow = true
36
+
37
+ /** 显示 */
38
+ public async show() {
39
+ this.$el.style.transform = '' // 动画清除,防止二次打开失效
40
+
41
+ // 获取 Layer
42
+ if (this.layer == null) {
43
+ this.layer = new Layer(this.ctx, 'sidebar', this.$el)
44
+ this.layer.afterHide = () => {
45
+ // 防止评论框被吞
46
+ if (this.ctx.conf.editorTravel === true) {
47
+ this.ctx.trigger('editor-travel-back')
48
+ }
49
+ }
50
+ }
51
+ this.layer.show()
52
+
53
+ // viewWrap 滚动条归位
54
+ // this.$viewWrap.scrollTo(0, 0)
55
+
56
+ // 执行动画
57
+ setTimeout(() => {
58
+ this.$el.style.transform = 'translate(0, 0)'
59
+ }, 20)
60
+
61
+ // 第一次加载
62
+ if (this.firstShow) {
63
+ this.$iframeWrap.innerHTML = ''
64
+ this.$iframe = Utils.createElement<HTMLIFrameElement>('<iframe></iframe>')
65
+
66
+ const baseURL = (import.meta.env.MODE === 'development') ? 'http://localhost:23367/'
67
+ : `${this.conf.server.replace(/\/$/, '')}/../sidebar/`
68
+ const userData = encodeURIComponent(JSON.stringify(this.ctx.user.data))
69
+
70
+ // 测试是否能访问
71
+ this.iframeLoad(`${baseURL}`
72
+ + `?pageKey=${encodeURIComponent(this.conf.pageKey)}`
73
+ + `&site=${encodeURIComponent(this.conf.site || '')}`
74
+ + `&user=${userData}`
75
+ + `${((this.conf.darkMode) ? `&darkMode=1` : ``)}`)
76
+
77
+ this.$iframeWrap.append(this.$iframe)
78
+ this.firstShow = false
79
+ } else {
80
+ // 暗黑模式
81
+ if (this.conf.darkMode && !this.$iframe!.src.match(/darkMode=1$/)) {
82
+ this.iframeLoad(`${this.$iframe!.src}&darkMode=1`)
83
+ }
84
+ if (!this.conf.darkMode && this.$iframe!.src.match(/darkMode=1$/)) {
85
+ this.iframeLoad(this.$iframe!.src.replace(/&darkMode=1$/, ''))
86
+ }
87
+ }
88
+ }
89
+
90
+ /** 隐藏 */
91
+ public hide() {
92
+ // 执行动画
93
+ this.$el.style.transform = ''
94
+
95
+ this.layer?.hide()
96
+ }
97
+
98
+ public iframeLoad(src: string) {
99
+ if (!this.$iframe) return
100
+
101
+ this.$iframe.src = src
102
+
103
+ // 加载动画
104
+ Ui.showLoading(this.$iframeWrap)
105
+ this.$iframe.onload = () => {
106
+ Ui.hideLoading(this.$iframeWrap)
107
+ }
108
+
109
+ // this.checkReqStatus(src) // 判不准,删了,没啥用
110
+ }
111
+
112
+ loadingTimer: number|null = null
113
+
114
+ // 测试可访问性 (由于 iframe 测不准,需要额外请求)
115
+ public async checkReqStatus(url: string) {
116
+ if (this.loadingTimer !== null) window.clearTimeout(this.loadingTimer)
117
+
118
+ this.loadingTimer = window.setTimeout(async () => {
119
+ try {
120
+ await fetch(url)
121
+ } catch (err) {
122
+ console.log(err)
123
+ // 请求失败,显示错误提示
124
+ const $errAlert = Utils.createElement(
125
+ `<div class="atk-err-alert">` +
126
+ ` <div class="atk-title">侧边栏似乎打开失败</div>` +
127
+ ` <div class="atk-text"><span id="AtkReload">重新加载</span> / <span id="AtkCancel">取消</span></div>` +
128
+ `</div>`
129
+ )
130
+ const $reloadBtn = $errAlert.querySelector<HTMLElement>('#AtkReload')!
131
+ const $cancelBtn = $errAlert.querySelector<HTMLElement>('#AtkCancel')!
132
+ $reloadBtn.onclick = () => {
133
+ this.iframeLoad(url)
134
+ $errAlert.remove()
135
+ }
136
+ $cancelBtn.onclick = () => { // 提供取消按钮,防止误判
137
+ $errAlert.remove()
138
+ }
139
+ this.$iframeWrap.append($errAlert)
140
+ }
141
+ }, 2000) // 2s 后开始检测
142
+ }
143
+ }
package/src/defaults.ts CHANGED
@@ -17,6 +17,7 @@ const defaults: ArtalkConfig = {
17
17
  vote: true,
18
18
  voteDown: false,
19
19
  uaBadge: true,
20
+ pvEl: '#ArtalkPV',
20
21
  flatMode: 'auto',
21
22
  maxNesting: 3,
22
23
  gravatar: {
@@ -25,7 +26,7 @@ const defaults: ArtalkConfig = {
25
26
  },
26
27
 
27
28
  pagination: {
28
- pageSize: 15,
29
+ pageSize: 20,
29
30
  readMore: true,
30
31
  autoLoad: true,
31
32
  },
package/src/lib/detect.js CHANGED
@@ -104,7 +104,9 @@ function Detect (userAgent) {
104
104
  '6.0': 'Vista',
105
105
  5.2: 'XP',
106
106
  5.1: 'XP',
107
- '5.0': '2000'
107
+ '5.0': '2000',
108
+ '10.0': '10',
109
+ '11.0': '11' // 自定的,不是微软官方的判断方法
108
110
  }
109
111
  return hash[v] || v
110
112
  },
package/src/lib/utils.ts CHANGED
@@ -98,6 +98,7 @@ export function timeAgo(date: Date) {
98
98
 
99
99
  /** 所有图片加载完毕后执行 */
100
100
  export function onImagesLoaded($container: HTMLElement, event: Function) {
101
+ if (!$container) return
101
102
  const images = $container.getElementsByTagName('img')
102
103
  if (!images.length) return
103
104
  let loaded = images.length
@@ -121,7 +122,7 @@ export function getGravatarURL(ctx: Context, emailMD5: string) {
121
122
  }
122
123
 
123
124
  export function sleep(ms: number) {
124
- return new Promise(resolve => setTimeout(resolve, ms));
125
+ return new Promise(resolve => { setTimeout(resolve, ms) });
125
126
  }
126
127
 
127
128
  /** 版本号比较(a < b :-1 | 0 | b < a :1) */
@@ -177,3 +178,28 @@ export function marked(ctx: Context, src: string): string {
177
178
 
178
179
  return markedInstance.parse(src)
179
180
  }
181
+
182
+ /** 获取修正后的 UserAgent */
183
+ export async function getCorrectUserAgent() {
184
+ const uaRaw = navigator.userAgent
185
+ const uaData = (navigator as any).userAgentData // @link https://web.dev/migrate-to-ua-ch/
186
+ if (!uaData || !uaData.getHighEntropyValues) {
187
+ return uaRaw
188
+ }
189
+
190
+ // microsoft f******k you!!!!!
191
+ // @link https://docs.microsoft.com/en-us/microsoft-edge/web-platform/how-to-detect-win11
192
+ let uaGot: any = null
193
+ try {
194
+ uaGot = await uaData.getHighEntropyValues(["platformVersion"])
195
+ } catch (err) { console.error(err); return uaRaw }
196
+
197
+ if (uaData.platform !== "Windows") { return uaRaw }
198
+ const majorPlatformVersion = Number(uaGot.platformVersion.split('.')[0])
199
+ if (majorPlatformVersion >= 13) {
200
+ // Win11 样本:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36"
201
+ return uaRaw.replace(/Windows\W+NT\W+10.0/, 'Windows NT 11.0')
202
+ }
203
+
204
+ return uaRaw
205
+ }
@@ -1,27 +1,24 @@
1
1
  .artalk, .atk-layer-wrap {
2
- * {
3
- --at-color-font: #2a2e2e;
4
- --at-color-deep: #2a2e2e;
5
- --at-color-sub: #757575;
6
- --at-color-grey: #999;
7
- --at-color-meta: #757e91;
8
- --at-color-border: #eceff2;
9
- --at-color-light: #4285f4;
10
- --at-color-bg: #FFF;
11
- --at-color-bg-transl: rgba(255, 255, 255, 0.94);
12
- --at-color-bg-grey: #F4F4F4;
13
- --at-color-bg-grey-transl: rgba(244, 244, 244, 0.75);
14
- --at-color-bg-light: rgba(29, 161, 242, 0.1);
15
- --at-color-main: #0083ff;
16
- --at-color-red: #ff5652;
17
- --at-color-pink: #fa5a57;
18
- --at-color-yellow: #ff7c37;
19
- --at-color-green: #4caf50;
20
- --at-color-quote: #687a86;
21
- --at-color-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255));
22
- }
2
+ --at-color-font: #2a2e2e;
3
+ --at-color-deep: #2a2e2e;
4
+ --at-color-sub: #757575;
5
+ --at-color-grey: #999;
6
+ --at-color-meta: #757e91;
7
+ --at-color-border: #eceff2;
8
+ --at-color-light: #4285f4;
9
+ --at-color-bg: #FFF;
10
+ --at-color-bg-transl: rgba(255, 255, 255, 0.94);
11
+ --at-color-bg-grey: #F4F4F4;
12
+ --at-color-bg-grey-transl: rgba(244, 244, 244, 0.75);
13
+ --at-color-bg-light: rgba(29, 161, 242, 0.1);
14
+ --at-color-main: #0083ff;
15
+ --at-color-red: #ff5652;
16
+ --at-color-pink: #fa5a57;
17
+ --at-color-yellow: #ff7c37;
18
+ --at-color-green: #4caf50;
19
+ --at-color-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255));
23
20
 
24
- &.atk-dark-mode * {
21
+ &.atk-dark-mode {
25
22
  --at-color-font: #fff;
26
23
  --at-color-deep: #e7e7e7;
27
24
  --at-color-sub: #e7e7e7;
@@ -39,7 +36,6 @@
39
36
  --at-color-pink: #fa5a57;
40
37
  --at-color-yellow: #ff7c37;
41
38
  --at-color-green: #4caf50;
42
- --at-color-quote: #687a86;
43
39
  --at-color-gradient: linear-gradient(180deg, rgba(30, 34, 36, 0), rgba(30, 34, 36, 1));
44
40
  }
45
41
  }
@@ -18,83 +18,3 @@
18
18
  background: rgba(41,47,53,.77);
19
19
  }
20
20
  }
21
-
22
- .atk-list-text-actions() {
23
- display: flex;
24
- flex-direction: column;
25
- flex: auto;
26
- padding: 0 35px;
27
- padding-top: 10px;
28
- padding-bottom: 0;
29
- flex-wrap: wrap;
30
- align-content: flex-start;
31
-
32
- .atk-item {
33
- position: relative;
34
- font-size: 17px;
35
- max-width: 5em;
36
- display: inline-flex;
37
- margin-right: 15px;
38
- margin-bottom: 6px;
39
- cursor: pointer;
40
- user-select: none;
41
-
42
- &.atk-green:after {
43
- position: absolute;
44
- content: ' ';
45
- height: 5px;
46
- width: 100%;
47
- left: 0;
48
- bottom: 5px;
49
- background: rgba(50, 199, 134, 0.39);
50
- }
51
-
52
- &.atk-yellow:after {
53
- position: absolute;
54
- content: ' ';
55
- height: 5px;
56
- width: 100%;
57
- left: 0;
58
- bottom: 5px;
59
- background: rgba(255, 203, 0, 39%);
60
- }
61
- }
62
- }
63
-
64
- .atk-list-btn-actions() {
65
- display: flex;
66
- flex-direction: row;
67
- align-items: center;
68
- padding: 0 20px;
69
-
70
- .atk-item {
71
- &:hover {
72
- background: @color-bg-grey;
73
- }
74
-
75
- &:not(:last-child) {
76
- margin-right: 15px;
77
- }
78
-
79
- cursor: pointer;
80
- user-select: none;
81
- display: flex;
82
- width: 35px;
83
- height: 35px;
84
- border-radius: 2px;
85
- align-items: center;
86
- justify-content: center;
87
-
88
- &.atk-item-close {
89
- margin-left: 10px;
90
- }
91
- }
92
-
93
- .atk-icon {
94
- background-color: @color-meta;
95
- }
96
-
97
- .atk-icon-yes {
98
- background-color: @color-main;
99
- }
100
- }
@@ -1,28 +1,4 @@
1
- @color-font: var(--at-color-font);
2
- @color-deep: var(--at-color-deep);
3
- @color-sub: var(--at-color-sub);
4
- @color-grey: var(--at-color-grey);
5
- @color-meta: var(--at-color-meta);
6
- @color-light: var(--at-color-light);
7
- @color-border: var(--at-color-border);
8
- @color-bg: var(--at-color-bg);
9
- @color-bg-transl: var(--at-color-bg-transl);
10
- @color-bg-grey: var(--at-color-bg-grey);
11
- @color-bg-grey-transl: var(--at-color-bg-grey-transl);
12
- @color-bg-light: var(--at-color-bg-light);
13
- @color-main: var(--at-color-main);
14
- @color-red: var(--at-color-red);
15
- @color-pink: var(--at-color-pink);
16
- @color-yellow: var(--at-color-yellow);
17
- @color-green: var(--at-color-green);
18
- @color-quote: var(--at-color-quote);
19
- @color-gradient: var(--at-color-gradient);
20
-
21
1
  @font-family: "Helvetica Neue", "PingFangSC-Light", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
22
2
  @font-size: 14px;
23
3
  @line-height: 1.6em;
24
-
25
- @block-margin: 15px;
26
- @block-margin-mobile: 7px;
27
- @block-padding: 10px;
28
4
  @block-radius: 4px;