artalk 2.3.0 → 2.3.3

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.
@@ -23,7 +23,7 @@
23
23
  font-size: 14px;
24
24
  background: transparent;
25
25
  border: 2px solid transparent;
26
- border-radius: calc(@block-radius / 2);
26
+ border-radius: (@block-radius / 2);
27
27
  padding: 6px 5px;
28
28
  resize: none;
29
29
  outline: none;
@@ -44,7 +44,7 @@
44
44
  font-size: 15px;
45
45
  background-color: var(--at-color-bg);
46
46
  border: 2px solid transparent;
47
- border-radius: calc(@block-radius / 2);
47
+ border-radius: (@block-radius / 2);
48
48
  width: 100%;
49
49
  min-height: 120px;
50
50
  margin-top: 2px;
@@ -61,6 +61,7 @@
61
61
  background-color: var(--at-color-bg);
62
62
  border-top: 1px solid var(--at-color-border);
63
63
  padding: 5px 15px;
64
+ margin-top: 10px;
64
65
  // background: repeating-linear-gradient(145deg, #f2f2f2, #f2f2f2 15px, #fff 0, #fff 30px);
65
66
  }
66
67
 
@@ -68,8 +69,8 @@
68
69
  z-index: 2;
69
70
  position: absolute;
70
71
  right: 7px;
71
- bottom: 8px;
72
- max-width: calc(100% - 20px);
72
+ bottom: 2px;
73
+ max-width: (100% - 20px);
73
74
  height: 30px;
74
75
  line-height: 30px;
75
76
  font-size: 14px;
@@ -79,7 +80,7 @@
79
80
  text-overflow: ellipsis;
80
81
  white-space: nowrap;
81
82
  cursor: pointer;
82
- border-radius: @block-radius;
83
+ border-radius: (@block-radius / 2);
83
84
 
84
85
  .atk-text {
85
86
  }
@@ -125,11 +126,12 @@
125
126
 
126
127
  .atk-plug-btn {
127
128
  padding: 0 8px;
129
+ line-height: 24px;
128
130
  cursor: pointer;
129
131
  color: var(--at-color-grey);
130
132
  font-size: @font-size;
131
133
  user-select: none;
132
- border-radius: @block-radius;
134
+ border-radius: (@block-radius / 2);
133
135
 
134
136
  &:not(:last-child) {
135
137
  margin-right: 2px;
@@ -169,7 +171,7 @@
169
171
  cursor: pointer;
170
172
  transition: opacity 0.3s ease-in-out;
171
173
  outline: none;
172
- border-radius: @block-radius;
174
+ border-radius: (@block-radius / 2);
173
175
 
174
176
  &:active {
175
177
  opacity: 0.9;
@@ -22,7 +22,7 @@
22
22
  border-left: 3px solid transparent;
23
23
  border-right: 3px solid transparent;
24
24
  margin-top: -1px;
25
- margin-left: 0.4rem;
25
+ margin-left: 0.8rem;
26
26
  display: inline-block;
27
27
  }
28
28
 
@@ -46,7 +46,7 @@
46
46
  padding: 0.6rem 0;
47
47
  border: 1px solid var(--at-color-border);
48
48
  text-align: center;
49
- border-radius: 0.25rem;
49
+ border-radius: @block-radius;
50
50
  white-space: nowrap;
51
51
  margin: 0;
52
52
  list-style: none;
@@ -7,9 +7,7 @@
7
7
  }
8
8
 
9
9
  .artalk, .atk-layer-wrap {
10
- line-height: @line-height;
11
10
  color: var(--at-color-font);
12
- font-family: @font-family;
13
11
  word-wrap: break-word;
14
12
  word-break: break-all;
15
13
 
@@ -64,6 +62,7 @@
64
62
  padding: 10px 20px 10px 20px;
65
63
  background: var(--at-color-bg-grey);
66
64
  border-left: 4px solid #687a86;
65
+ color: var(--at-color-font);
67
66
  }
68
67
 
69
68
  p:first-child {
@@ -311,10 +310,10 @@ i.atk-icon {
311
310
 
312
311
  input {
313
312
  width: 100%;
314
- line-height: calc(@formInputHeight + 4px);
313
+ line-height: (@formInputHeight + 4px);
315
314
  background-color: var(--at-color-bg);
316
315
  border: 1px solid var(--at-color-border);
317
- border-radius: calc(@block-radius / 2);
316
+ border-radius: (@block-radius / 2);
318
317
  outline: none;
319
318
  padding: 0 6px;
320
319
  display: block;
@@ -335,7 +334,7 @@ i.atk-icon {
335
334
  border: 1px solid var(--at-color-main);
336
335
  background: transparent;
337
336
  color: var(--at-color-main);
338
- border-radius: calc(@block-radius / 2);
337
+ border-radius: (@block-radius / 2);
339
338
  padding: 0 15px;
340
339
  line-height: @formInputHeight;
341
340
  outline: none;
@@ -405,10 +404,10 @@ i.atk-icon {
405
404
  overflow: hidden;
406
405
  background-color: #2c2c2c;
407
406
  color: #FFF;
408
- border-radius: 2px;
407
+ border-radius: (@block-radius / 2);
409
408
  cursor: pointer;
410
409
  font-size: 14px;
411
- padding: 4px 15px;
410
+ padding: 5px 15px;
412
411
 
413
412
  &:not(:last-child) {
414
413
  margin-bottom: 3px;
@@ -0,0 +1,16 @@
1
+ <script src="../dist/Artalk.js"></script>
2
+
3
+ <div class="pv" data-page-key="https://artalk.js.org/">0</div>
4
+ <div class="pv" data-page-key="https://artalk.js.org/guide/intro.html">0</div>
5
+
6
+ <div class="count" data-page-key="https://artalk.js.org/">0</div>
7
+ <div class="count" data-page-key="https://artalk.js.org/guide/intro.html">0</div>
8
+
9
+ <script>
10
+ var artalk = Artalk.LoadCountWidget({
11
+ server: 'http://localhost:23366',
12
+ site: 'ArtalkDocs',
13
+ pvEl: '.pv',
14
+ countEl: ".count",
15
+ });
16
+ </script>
@@ -0,0 +1,15 @@
1
+ <link rel="stylesheet" href="../dist/Artalk.css">
2
+ <script src="../dist/Artalk.js"></script>
3
+
4
+ <div id="comments"></div>
5
+
6
+ <script>
7
+ var artalk = new Artalk({
8
+ el: '#comments',
9
+ pageKey: 'https://artalk.js.org/',
10
+ pageTitle: 'Artalk Home',
11
+ server: 'http://localhost:23366',
12
+ site: 'ArtalkDocs',
13
+ locale: 'auto',
14
+ });
15
+ </script>
@@ -1,15 +1,15 @@
1
- <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
1
+ <!-- <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> -->
2
2
  <link rel="stylesheet" href="../dist/ArtalkLite.css">
3
3
  <script src="../dist/ArtalkLite.js"></script>
4
4
 
5
5
  <div id="comments"></div>
6
6
 
7
7
  <script>
8
- var artalk = new Artalk({
9
- el: '#comments',
10
- pageKey: 'https://artalk.js.org/',
11
- pageTitle: 'Artalk Home',
12
- server: 'http://localhost:23366',
13
- site: 'ArtalkDocs',
14
- });
8
+ var artalk = new Artalk({
9
+ el: '#comments',
10
+ pageKey: 'https://artalk.js.org/',
11
+ pageTitle: 'Artalk Home',
12
+ server: 'http://localhost:23366',
13
+ site: 'ArtalkDocs',
14
+ });
15
15
  </script>
@@ -98,7 +98,7 @@ export default interface ArtalkConfig {
98
98
  imgUpload: boolean
99
99
 
100
100
  /** 图片上传器 */
101
- imgUploader?: (file: File) => Promise<{ img_url: string }>
101
+ imgUploader?: (file: File) => Promise<string>
102
102
 
103
103
  /** 版本检测 */
104
104
  versionCheck: boolean
@@ -0,0 +1,4 @@
1
+ import ContextApi from './context'
2
+
3
+ type ArtalkPlug = (ctx: ContextApi) => void
4
+ export default ArtalkPlug