@waline/client 2.15.8 → 3.0.0-alpha.2
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.
- package/dist/comment.cjs +1 -1
- package/dist/comment.cjs.map +1 -1
- package/dist/comment.d.cts +2 -1
- package/dist/comment.d.mts +2 -1
- package/dist/comment.d.ts +2 -1
- package/dist/comment.js +1 -1
- package/dist/comment.js.map +1 -1
- package/dist/comment.mjs +1 -1
- package/dist/comment.mjs.map +1 -1
- package/dist/component.mjs +8 -1
- package/dist/component.mjs.map +1 -1
- package/dist/pageview.cjs +1 -1
- package/dist/pageview.cjs.map +1 -1
- package/dist/pageview.d.cts +2 -1
- package/dist/pageview.d.mts +2 -1
- package/dist/pageview.d.ts +2 -1
- package/dist/pageview.js +1 -1
- package/dist/pageview.js.map +1 -1
- package/dist/pageview.mjs +1 -1
- package/dist/pageview.mjs.map +1 -1
- package/dist/shim.cjs +8 -1
- package/dist/shim.cjs.map +1 -1
- package/dist/shim.d.cts +7 -82
- package/dist/shim.d.mts +7 -82
- package/dist/shim.mjs +8 -1
- package/dist/shim.mjs.map +1 -1
- package/dist/waline.cjs +53 -1
- package/dist/waline.cjs.map +1 -1
- package/dist/waline.css +1 -1
- package/dist/waline.css.map +1 -1
- package/dist/waline.d.cts +7 -82
- package/dist/waline.d.mts +7 -82
- package/dist/waline.d.ts +7 -82
- package/dist/waline.js +53 -1
- package/dist/waline.js.map +1 -1
- package/dist/waline.mjs +53 -1
- package/dist/waline.mjs.map +1 -1
- package/package.json +20 -53
- package/dist/api.cjs +0 -2
- package/dist/api.cjs.map +0 -1
- package/dist/api.d.cts +0 -445
- package/dist/api.d.mts +0 -445
- package/dist/api.d.ts +0 -445
- package/dist/api.mjs +0 -2
- package/dist/api.mjs.map +0 -1
- package/dist/legacy.umd.d.ts +0 -628
- package/dist/legacy.umd.js +0 -2
- package/dist/legacy.umd.js.map +0 -1
- package/src/api/articleCounter.ts +0 -82
- package/src/api/comment.ts +0 -258
- package/src/api/commentCount.ts +0 -33
- package/src/api/index.ts +0 -7
- package/src/api/login.ts +0 -96
- package/src/api/pageview.ts +0 -54
- package/src/api/recentComment.ts +0 -42
- package/src/api/user.ts +0 -44
- package/src/api/utils.ts +0 -46
- package/src/comment.ts +0 -69
- package/src/compact/convert.ts +0 -80
- package/src/compact/dropped.ts +0 -35
- package/src/compact/index.ts +0 -4
- package/src/compact/logger.ts +0 -5
- package/src/compact/v1.ts +0 -103
- package/src/compact/valine.ts +0 -132
- package/src/components/ArticleReaction.vue +0 -159
- package/src/components/CommentBox.vue +0 -807
- package/src/components/CommentCard.vue +0 -271
- package/src/components/Icons.ts +0 -181
- package/src/components/ImageWall.vue +0 -169
- package/src/components/WalineComment.vue +0 -353
- package/src/composables/index.ts +0 -6
- package/src/composables/inputs.ts +0 -17
- package/src/composables/like.ts +0 -13
- package/src/composables/reaction.ts +0 -15
- package/src/composables/recaptchaV3.ts +0 -19
- package/src/composables/turnstile.ts +0 -50
- package/src/composables/userInfo.ts +0 -16
- package/src/config/default.ts +0 -93
- package/src/config/highlighter.ts +0 -74
- package/src/config/i18n/en.ts +0 -53
- package/src/config/i18n/generate.ts +0 -58
- package/src/config/i18n/index.ts +0 -30
- package/src/config/i18n/jp.ts +0 -53
- package/src/config/i18n/pt-BR.ts +0 -53
- package/src/config/i18n/ru.ts +0 -53
- package/src/config/i18n/vi-VN.ts +0 -53
- package/src/config/i18n/zh-CN.ts +0 -53
- package/src/config/i18n/zh-TW.ts +0 -53
- package/src/config/index.ts +0 -3
- package/src/entries/api.ts +0 -1
- package/src/entries/comment.ts +0 -2
- package/src/entries/components.ts +0 -2
- package/src/entries/full.ts +0 -7
- package/src/entries/init.ts +0 -4
- package/src/entries/legacy.ts +0 -31
- package/src/entries/pageview.ts +0 -2
- package/src/init.ts +0 -112
- package/src/pageview.ts +0 -116
- package/src/shims-vue.d.ts +0 -6
- package/src/styles/base.scss +0 -67
- package/src/styles/card.scss +0 -258
- package/src/styles/config.scss +0 -52
- package/src/styles/emoji.scss +0 -137
- package/src/styles/gif.scss +0 -73
- package/src/styles/helpers/_svg.scss +0 -51
- package/src/styles/highlight.scss +0 -138
- package/src/styles/index.scss +0 -12
- package/src/styles/layout.scss +0 -105
- package/src/styles/meta.scss +0 -82
- package/src/styles/normalize.scss +0 -117
- package/src/styles/panel.scss +0 -286
- package/src/styles/reaction.scss +0 -103
- package/src/styles/recent.scss +0 -3
- package/src/styles/user-list.scss +0 -159
- package/src/typings/base.ts +0 -123
- package/src/typings/comment.ts +0 -94
- package/src/typings/index.ts +0 -5
- package/src/typings/locale.ts +0 -73
- package/src/typings/options.ts +0 -44
- package/src/typings/waline.ts +0 -251
- package/src/utils/config.ts +0 -122
- package/src/utils/darkmode.ts +0 -11
- package/src/utils/date.ts +0 -71
- package/src/utils/email.ts +0 -8
- package/src/utils/emoji.ts +0 -73
- package/src/utils/error.ts +0 -3
- package/src/utils/getRoot.ts +0 -8
- package/src/utils/image.ts +0 -10
- package/src/utils/index.ts +0 -13
- package/src/utils/markdown.ts +0 -41
- package/src/utils/markedMathExtension.ts +0 -54
- package/src/utils/path.ts +0 -15
- package/src/utils/query.ts +0 -2
- package/src/utils/userAgent.ts +0 -31
- package/src/utils/wordCount.ts +0 -31
- package/src/version.ts +0 -3
- package/src/widgets/index.ts +0 -2
- package/src/widgets/recentComments.ts +0 -93
- package/src/widgets/userList.ts +0 -136
package/src/pageview.ts
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { getPageview, updatePageview } from './api/index.js';
|
|
2
|
-
import { type WalineAbort } from './typings/index.js';
|
|
3
|
-
import { errorHandler, getQuery, getServerURL } from './utils/index.js';
|
|
4
|
-
|
|
5
|
-
export interface WalinePageviewCountOptions {
|
|
6
|
-
/**
|
|
7
|
-
* Waline 服务端地址
|
|
8
|
-
*
|
|
9
|
-
* Waline server url
|
|
10
|
-
*/
|
|
11
|
-
serverURL: string;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* 浏览量 CSS 选择器
|
|
15
|
-
*
|
|
16
|
-
* Pageview CSS selector
|
|
17
|
-
*
|
|
18
|
-
* @default '.waline-pageview-count'
|
|
19
|
-
*/
|
|
20
|
-
selector?: string;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* 需要更新和获取的路径
|
|
24
|
-
*
|
|
25
|
-
* Path to be fetched and updated
|
|
26
|
-
*
|
|
27
|
-
* @default window.location.pathname
|
|
28
|
-
*/
|
|
29
|
-
path?: string;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* 是否在查询时更新 path 的浏览量
|
|
33
|
-
*
|
|
34
|
-
* Whether update pageviews when fetching path result
|
|
35
|
-
*
|
|
36
|
-
* @default true
|
|
37
|
-
*/
|
|
38
|
-
update?: boolean;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* 错误提示消息所使用的语言
|
|
42
|
-
*
|
|
43
|
-
* Language of error message
|
|
44
|
-
*
|
|
45
|
-
* @default navigator.language
|
|
46
|
-
*/
|
|
47
|
-
lang?: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const renderVisitorCount = (
|
|
51
|
-
counts: number[],
|
|
52
|
-
countElements: HTMLElement[],
|
|
53
|
-
): void => {
|
|
54
|
-
countElements.forEach((element, index) => {
|
|
55
|
-
element.innerText = counts[index].toString();
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export const pageviewCount = ({
|
|
60
|
-
serverURL,
|
|
61
|
-
path = window.location.pathname,
|
|
62
|
-
selector = '.waline-pageview-count',
|
|
63
|
-
update = true,
|
|
64
|
-
lang = navigator.language,
|
|
65
|
-
}: WalinePageviewCountOptions): WalineAbort => {
|
|
66
|
-
const controller = new AbortController();
|
|
67
|
-
|
|
68
|
-
const elements = Array.from(
|
|
69
|
-
// pageview selectors
|
|
70
|
-
document.querySelectorAll<HTMLElement>(selector),
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
const filter = (element: HTMLElement): boolean => {
|
|
74
|
-
const query = getQuery(element);
|
|
75
|
-
|
|
76
|
-
return query !== null && path !== query;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
const fetch = (elements: HTMLElement[]): Promise<void> =>
|
|
80
|
-
getPageview({
|
|
81
|
-
serverURL: getServerURL(serverURL),
|
|
82
|
-
paths: elements.map((element) => getQuery(element) || path),
|
|
83
|
-
lang,
|
|
84
|
-
signal: controller.signal,
|
|
85
|
-
})
|
|
86
|
-
.then((counts) => renderVisitorCount(counts, elements))
|
|
87
|
-
.catch(errorHandler);
|
|
88
|
-
|
|
89
|
-
// we should update pageviews
|
|
90
|
-
if (update) {
|
|
91
|
-
const normalElements = elements.filter((element) => !filter(element));
|
|
92
|
-
const elementsNeedstoBeFetched = elements.filter(filter);
|
|
93
|
-
|
|
94
|
-
void updatePageview({
|
|
95
|
-
serverURL: getServerURL(serverURL),
|
|
96
|
-
path,
|
|
97
|
-
lang,
|
|
98
|
-
}).then((count) =>
|
|
99
|
-
renderVisitorCount(
|
|
100
|
-
new Array<number>(normalElements.length).fill(count),
|
|
101
|
-
normalElements,
|
|
102
|
-
),
|
|
103
|
-
);
|
|
104
|
-
|
|
105
|
-
// if we should fetch count of other pages
|
|
106
|
-
if (elementsNeedstoBeFetched.length) {
|
|
107
|
-
void fetch(elementsNeedstoBeFetched);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
// we should not update pageviews
|
|
111
|
-
else {
|
|
112
|
-
void fetch(elements);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
return controller.abort.bind(controller);
|
|
116
|
-
};
|
package/src/shims-vue.d.ts
DELETED
package/src/styles/base.scss
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
.wl-btn {
|
|
2
|
-
display: inline-block;
|
|
3
|
-
vertical-align: middle;
|
|
4
|
-
|
|
5
|
-
min-width: 2.5em;
|
|
6
|
-
margin-bottom: 0;
|
|
7
|
-
padding: 0.5em 1em;
|
|
8
|
-
border: 1px solid var(--waline-border-color);
|
|
9
|
-
border-radius: 0.5em;
|
|
10
|
-
|
|
11
|
-
background: transparent;
|
|
12
|
-
color: var(--waline-color);
|
|
13
|
-
|
|
14
|
-
font-weight: 400;
|
|
15
|
-
font-size: 0.75em;
|
|
16
|
-
line-height: 1.5;
|
|
17
|
-
text-align: center;
|
|
18
|
-
white-space: nowrap;
|
|
19
|
-
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
user-select: none;
|
|
22
|
-
|
|
23
|
-
transition-duration: 0.4s;
|
|
24
|
-
|
|
25
|
-
touch-action: manipulation;
|
|
26
|
-
|
|
27
|
-
&:hover,
|
|
28
|
-
&:active {
|
|
29
|
-
border-color: var(--waline-theme-color);
|
|
30
|
-
color: var(--waline-theme-color);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&:disabled {
|
|
34
|
-
border-color: var(--waline-border-color);
|
|
35
|
-
background: var(--waline-disable-bgcolor);
|
|
36
|
-
color: var(--waline-disable-color);
|
|
37
|
-
cursor: not-allowed;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&.primary {
|
|
41
|
-
border-color: var(--waline-theme-color);
|
|
42
|
-
background: var(--waline-theme-color);
|
|
43
|
-
color: var(--waline-white);
|
|
44
|
-
|
|
45
|
-
&:hover,
|
|
46
|
-
&:active {
|
|
47
|
-
border-color: var(--waline-active-color);
|
|
48
|
-
background: var(--waline-active-color);
|
|
49
|
-
color: var(--waline-white);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&:disabled {
|
|
53
|
-
border-color: var(--waline-border-color);
|
|
54
|
-
background: var(--waline-disable-bgcolor);
|
|
55
|
-
color: var(--waline-disable-color);
|
|
56
|
-
cursor: not-allowed;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.wl-loading {
|
|
62
|
-
text-align: center;
|
|
63
|
-
|
|
64
|
-
svg {
|
|
65
|
-
margin: 0 auto;
|
|
66
|
-
}
|
|
67
|
-
}
|
package/src/styles/card.scss
DELETED
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
.wl-cards {
|
|
2
|
-
.wl-user {
|
|
3
|
-
--avatar-size: var(--waline-avatar-size);
|
|
4
|
-
|
|
5
|
-
position: relative;
|
|
6
|
-
margin-inline-end: 0.75em;
|
|
7
|
-
|
|
8
|
-
@media (max-width: 720px) {
|
|
9
|
-
--avatar-size: var(--waline-m-avatar-size);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
img {
|
|
13
|
-
width: var(--avatar-size);
|
|
14
|
-
height: var(--avatar-size);
|
|
15
|
-
border-radius: var(--waline-avatar-radius);
|
|
16
|
-
box-shadow: var(--waline-box-shadow);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.verified-icon {
|
|
20
|
-
position: absolute;
|
|
21
|
-
top: calc(var(--avatar-size) * 3 / 4);
|
|
22
|
-
inset-inline-start: calc(var(--avatar-size) * 3 / 4);
|
|
23
|
-
|
|
24
|
-
border-radius: 50%;
|
|
25
|
-
|
|
26
|
-
background: var(--waline-bgcolor);
|
|
27
|
-
box-shadow: var(--waline-box-shadow);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.wl-card-item {
|
|
33
|
-
position: relative;
|
|
34
|
-
display: flex;
|
|
35
|
-
padding: 0.5em;
|
|
36
|
-
|
|
37
|
-
.wl-card-item {
|
|
38
|
-
padding-inline-end: 0;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.wl-card {
|
|
43
|
-
flex: 1;
|
|
44
|
-
width: 0;
|
|
45
|
-
padding-bottom: 0.5em;
|
|
46
|
-
border-bottom: 1px dashed var(--waline-border-color);
|
|
47
|
-
|
|
48
|
-
&:first-child {
|
|
49
|
-
margin-inline-start: 1em;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.wl-card-item:last-child > & {
|
|
53
|
-
border-bottom: none;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.wl-nick {
|
|
57
|
-
svg {
|
|
58
|
-
position: relative;
|
|
59
|
-
bottom: -0.125em;
|
|
60
|
-
line-height: 1;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.wl-head {
|
|
65
|
-
// bfc to fix https://github.com/walinejs/waline/issues/1415
|
|
66
|
-
overflow: hidden;
|
|
67
|
-
line-height: 1.5;
|
|
68
|
-
|
|
69
|
-
.wl-nick {
|
|
70
|
-
position: relative;
|
|
71
|
-
|
|
72
|
-
display: inline-block;
|
|
73
|
-
|
|
74
|
-
margin-inline-end: 0.5em;
|
|
75
|
-
|
|
76
|
-
font-weight: bold;
|
|
77
|
-
font-size: 0.875em;
|
|
78
|
-
line-height: 1;
|
|
79
|
-
text-decoration: none;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
span.wl-nick {
|
|
84
|
-
color: var(--waline-dark-grey);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.wl-badge {
|
|
88
|
-
display: inline-block;
|
|
89
|
-
|
|
90
|
-
margin-inline-end: 1em;
|
|
91
|
-
padding: 0 0.3em;
|
|
92
|
-
border: 1px solid var(--waline-badge-color);
|
|
93
|
-
border-radius: 4px;
|
|
94
|
-
|
|
95
|
-
color: var(--waline-badge-color);
|
|
96
|
-
|
|
97
|
-
font-size: var(--waline-badge-font-size);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.wl-time {
|
|
101
|
-
margin-inline-end: 0.875em;
|
|
102
|
-
color: var(--waline-info-color);
|
|
103
|
-
font-size: 0.75em;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.wl-meta {
|
|
107
|
-
position: relative;
|
|
108
|
-
line-height: 1;
|
|
109
|
-
|
|
110
|
-
> span {
|
|
111
|
-
display: inline-block;
|
|
112
|
-
|
|
113
|
-
margin-inline-end: 0.25em;
|
|
114
|
-
padding: 2px 4px;
|
|
115
|
-
border-radius: 0.2em;
|
|
116
|
-
|
|
117
|
-
background: var(--waline-info-bgcolor);
|
|
118
|
-
color: var(--waline-info-color);
|
|
119
|
-
|
|
120
|
-
font-size: var(--waline-info-font-size);
|
|
121
|
-
line-height: 1.5;
|
|
122
|
-
|
|
123
|
-
&:empty {
|
|
124
|
-
display: none;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.wl-comment-actions {
|
|
130
|
-
float: right;
|
|
131
|
-
line-height: 1;
|
|
132
|
-
|
|
133
|
-
[dir='rtl'] & {
|
|
134
|
-
float: left;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.wl-delete,
|
|
139
|
-
.wl-like,
|
|
140
|
-
.wl-reply,
|
|
141
|
-
.wl-edit {
|
|
142
|
-
display: inline-flex;
|
|
143
|
-
align-items: center;
|
|
144
|
-
|
|
145
|
-
// padding: 4px;
|
|
146
|
-
border: none;
|
|
147
|
-
|
|
148
|
-
background: transparent;
|
|
149
|
-
color: var(--waline-color);
|
|
150
|
-
|
|
151
|
-
line-height: 1;
|
|
152
|
-
|
|
153
|
-
cursor: pointer;
|
|
154
|
-
|
|
155
|
-
transition: color 0.2s ease;
|
|
156
|
-
|
|
157
|
-
&:hover {
|
|
158
|
-
color: var(--waline-theme-color);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
&.active {
|
|
162
|
-
color: var(--waline-active-color);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.wl-content {
|
|
167
|
-
position: relative;
|
|
168
|
-
|
|
169
|
-
margin-bottom: 0.75em;
|
|
170
|
-
padding-top: 0.625em;
|
|
171
|
-
|
|
172
|
-
font-size: 0.875em;
|
|
173
|
-
line-height: 2;
|
|
174
|
-
word-wrap: break-word;
|
|
175
|
-
|
|
176
|
-
&.expand {
|
|
177
|
-
overflow: hidden;
|
|
178
|
-
max-height: 8em;
|
|
179
|
-
cursor: pointer;
|
|
180
|
-
|
|
181
|
-
&::before {
|
|
182
|
-
content: '';
|
|
183
|
-
|
|
184
|
-
position: absolute;
|
|
185
|
-
top: 0;
|
|
186
|
-
bottom: 3.15em;
|
|
187
|
-
inset-inline-start: 0;
|
|
188
|
-
z-index: 999;
|
|
189
|
-
|
|
190
|
-
display: block;
|
|
191
|
-
|
|
192
|
-
width: 100%;
|
|
193
|
-
|
|
194
|
-
background: linear-gradient(180deg, #000, rgb(255 255 255 / 90%));
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
&::after {
|
|
198
|
-
content: attr(data-expand);
|
|
199
|
-
|
|
200
|
-
position: absolute;
|
|
201
|
-
bottom: 0;
|
|
202
|
-
inset-inline-start: 0;
|
|
203
|
-
z-index: 999;
|
|
204
|
-
|
|
205
|
-
display: block;
|
|
206
|
-
|
|
207
|
-
width: 100%;
|
|
208
|
-
height: 3.15em;
|
|
209
|
-
|
|
210
|
-
background: rgb(255 255 255 / 90%);
|
|
211
|
-
color: #828586;
|
|
212
|
-
|
|
213
|
-
line-height: 3.15em;
|
|
214
|
-
text-align: center;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
> *:first-child {
|
|
219
|
-
margin-top: 0;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
> *:last-child {
|
|
223
|
-
margin-bottom: 0;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.wl-admin-actions {
|
|
228
|
-
margin: 8px 0;
|
|
229
|
-
font-size: 12px;
|
|
230
|
-
text-align: right;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.wl-comment-status {
|
|
234
|
-
margin: 0 8px;
|
|
235
|
-
|
|
236
|
-
.wl-btn {
|
|
237
|
-
border-radius: 0;
|
|
238
|
-
|
|
239
|
-
&:first-child {
|
|
240
|
-
border-inline-end: 0;
|
|
241
|
-
border-radius: 0.5em 0 0 0.5em;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
&:last-child {
|
|
245
|
-
border-inline-start: 0;
|
|
246
|
-
border-radius: 0 0.5em 0.5em 0;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.wl-quote {
|
|
252
|
-
border-inline-start: 1px dashed rgb(237 237 237 / 50%);
|
|
253
|
-
|
|
254
|
-
.wl-user {
|
|
255
|
-
--avatar-size: var(--waline-m-avatar-size);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
package/src/styles/config.scss
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
// font-size
|
|
3
|
-
--waline-font-size: 1rem;
|
|
4
|
-
|
|
5
|
-
// regular colors
|
|
6
|
-
--waline-white: #fff;
|
|
7
|
-
--waline-light-grey: #999;
|
|
8
|
-
--waline-dark-grey: #666;
|
|
9
|
-
|
|
10
|
-
// theme colors
|
|
11
|
-
--waline-theme-color: #27ae60;
|
|
12
|
-
--waline-active-color: #2ecc71;
|
|
13
|
-
|
|
14
|
-
// layout colors
|
|
15
|
-
--waline-color: #444;
|
|
16
|
-
--waline-bgcolor: #fff;
|
|
17
|
-
--waline-bgcolor-light: #f8f8f8;
|
|
18
|
-
--waline-bgcolor-hover: #f0f0f0;
|
|
19
|
-
--waline-border-color: #ddd;
|
|
20
|
-
--waline-disable-bgcolor: #f8f8f8;
|
|
21
|
-
--waline-disable-color: #000;
|
|
22
|
-
--waline-code-bgcolor: #282c34;
|
|
23
|
-
|
|
24
|
-
// special colors
|
|
25
|
-
--waline-bq-color: #f0f0f0;
|
|
26
|
-
|
|
27
|
-
// avatar
|
|
28
|
-
--waline-avatar-size: 3.25rem;
|
|
29
|
-
--waline-m-avatar-size: calc(var(--waline-avatar-size) * 9 / 13);
|
|
30
|
-
|
|
31
|
-
// badge
|
|
32
|
-
--waline-badge-color: #3498db;
|
|
33
|
-
--waline-badge-font-size: 0.75em;
|
|
34
|
-
|
|
35
|
-
// info
|
|
36
|
-
--waline-info-bgcolor: #f8f8f8;
|
|
37
|
-
--waline-info-color: #999;
|
|
38
|
-
--waline-info-font-size: 0.625em;
|
|
39
|
-
|
|
40
|
-
// ====render choices====
|
|
41
|
-
// ** using border **
|
|
42
|
-
--waline-border: 1px solid var(--waline-border-color);
|
|
43
|
-
--waline-avatar-radius: 50%;
|
|
44
|
-
--waline-box-shadow: none;
|
|
45
|
-
|
|
46
|
-
// ** using box-shadow **
|
|
47
|
-
// --waline-border: none;
|
|
48
|
-
// Light:
|
|
49
|
-
// --waline-box-shadow: 0 12px 40px rgb(134 151 168 / 25%);
|
|
50
|
-
// Dark:
|
|
51
|
-
// --waline-box-shadow: 0 12px 40px #0f0e0d
|
|
52
|
-
}
|
package/src/styles/emoji.scss
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
.wl-emoji-popup {
|
|
2
|
-
position: absolute;
|
|
3
|
-
top: 100%;
|
|
4
|
-
inset-inline-start: 1.25em;
|
|
5
|
-
z-index: 10;
|
|
6
|
-
|
|
7
|
-
max-width: 526px;
|
|
8
|
-
border: var(--waline-border);
|
|
9
|
-
border-radius: 6px;
|
|
10
|
-
|
|
11
|
-
background: var(--waline-bgcolor);
|
|
12
|
-
box-shadow: var(--waline-box-shadow);
|
|
13
|
-
|
|
14
|
-
opacity: 0;
|
|
15
|
-
visibility: hidden;
|
|
16
|
-
|
|
17
|
-
transition:
|
|
18
|
-
transform 0.2s ease-out,
|
|
19
|
-
opacity 0.2s ease-out;
|
|
20
|
-
transform: scale(0.9, 0.9);
|
|
21
|
-
transform-origin: 0 0;
|
|
22
|
-
|
|
23
|
-
&.display {
|
|
24
|
-
opacity: 1;
|
|
25
|
-
visibility: visible;
|
|
26
|
-
transform: none;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
button {
|
|
30
|
-
display: inline-block;
|
|
31
|
-
vertical-align: middle;
|
|
32
|
-
|
|
33
|
-
width: 2em;
|
|
34
|
-
margin: 0.125em;
|
|
35
|
-
padding: 0;
|
|
36
|
-
border-width: 0;
|
|
37
|
-
|
|
38
|
-
background: transparent;
|
|
39
|
-
|
|
40
|
-
font-size: inherit;
|
|
41
|
-
line-height: 2;
|
|
42
|
-
text-align: center;
|
|
43
|
-
|
|
44
|
-
cursor: pointer;
|
|
45
|
-
|
|
46
|
-
&:hover {
|
|
47
|
-
background: var(--waline-bgcolor-hover);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.wl-emoji {
|
|
52
|
-
display: inline-block;
|
|
53
|
-
vertical-align: middle;
|
|
54
|
-
max-width: 1.5em;
|
|
55
|
-
max-height: 1.5em;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.wl-tab-wrapper {
|
|
59
|
-
overflow-y: auto;
|
|
60
|
-
max-height: 145px;
|
|
61
|
-
padding: 0.5em;
|
|
62
|
-
|
|
63
|
-
&::-webkit-scrollbar {
|
|
64
|
-
width: 6px;
|
|
65
|
-
height: 6px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&::-webkit-scrollbar-track-piece:vertical {
|
|
69
|
-
-webkit-border-radius: 6px;
|
|
70
|
-
border-radius: 6px;
|
|
71
|
-
background: rgb(0 0 0 / 10%);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
&::-webkit-scrollbar-thumb:vertical {
|
|
75
|
-
width: 6px;
|
|
76
|
-
-webkit-border-radius: 6px;
|
|
77
|
-
border-radius: 6px;
|
|
78
|
-
background: var(--waline-theme-color);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.wl-tabs {
|
|
83
|
-
position: relative;
|
|
84
|
-
overflow-x: auto;
|
|
85
|
-
padding: 0 6px;
|
|
86
|
-
white-space: nowrap;
|
|
87
|
-
|
|
88
|
-
&::before {
|
|
89
|
-
content: ' ';
|
|
90
|
-
|
|
91
|
-
position: absolute;
|
|
92
|
-
top: 0;
|
|
93
|
-
right: 0;
|
|
94
|
-
left: 0;
|
|
95
|
-
z-index: 2;
|
|
96
|
-
|
|
97
|
-
height: 1px;
|
|
98
|
-
|
|
99
|
-
background: var(--waline-border-color);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
&::-webkit-scrollbar {
|
|
103
|
-
width: 6px;
|
|
104
|
-
height: 6px;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
&::-webkit-scrollbar-track-piece:horizontal {
|
|
108
|
-
-webkit-border-radius: 6px;
|
|
109
|
-
border-radius: 6px;
|
|
110
|
-
background: rgb(0 0 0 / 10%);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
&::-webkit-scrollbar-thumb:horizontal {
|
|
114
|
-
height: 6px;
|
|
115
|
-
-webkit-border-radius: 6px;
|
|
116
|
-
border-radius: 6px;
|
|
117
|
-
background: var(--waline-theme-color);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.wl-tab {
|
|
122
|
-
position: relative;
|
|
123
|
-
margin: 0;
|
|
124
|
-
padding: 0 0.5em;
|
|
125
|
-
|
|
126
|
-
&.active {
|
|
127
|
-
z-index: 3;
|
|
128
|
-
|
|
129
|
-
border: 1px solid var(--waline-border-color);
|
|
130
|
-
border-top-width: 0;
|
|
131
|
-
border-bottom-right-radius: 6px;
|
|
132
|
-
border-bottom-left-radius: 6px;
|
|
133
|
-
|
|
134
|
-
background: var(--waline-bgcolor);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
package/src/styles/gif.scss
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
.wl-gif-popup {
|
|
2
|
-
position: absolute;
|
|
3
|
-
top: 100%;
|
|
4
|
-
inset-inline-start: 1.25em;
|
|
5
|
-
z-index: 10;
|
|
6
|
-
|
|
7
|
-
width: calc(100% - 3em);
|
|
8
|
-
padding: 0.75em 0.75em 0.25em;
|
|
9
|
-
border: var(--waline-border);
|
|
10
|
-
border-radius: 6px;
|
|
11
|
-
|
|
12
|
-
background: var(--waline-bgcolor);
|
|
13
|
-
box-shadow: var(--waline-box-shadow);
|
|
14
|
-
|
|
15
|
-
opacity: 0;
|
|
16
|
-
visibility: hidden;
|
|
17
|
-
|
|
18
|
-
transition:
|
|
19
|
-
transform 0.2s ease-out,
|
|
20
|
-
opacity 0.2s ease-out;
|
|
21
|
-
transform: scale(0.9, 0.9);
|
|
22
|
-
transform-origin: 0 0;
|
|
23
|
-
|
|
24
|
-
&.display {
|
|
25
|
-
opacity: 1;
|
|
26
|
-
visibility: visible;
|
|
27
|
-
transform: none;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
input {
|
|
31
|
-
box-sizing: border-box;
|
|
32
|
-
|
|
33
|
-
width: 100%;
|
|
34
|
-
margin-bottom: 10px;
|
|
35
|
-
padding: 3px 5px;
|
|
36
|
-
border: var(--waline-border);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
img {
|
|
40
|
-
display: block;
|
|
41
|
-
|
|
42
|
-
box-sizing: border-box;
|
|
43
|
-
|
|
44
|
-
width: 100%;
|
|
45
|
-
border-width: 2px;
|
|
46
|
-
border-style: solid;
|
|
47
|
-
border-color: #fff;
|
|
48
|
-
|
|
49
|
-
cursor: pointer;
|
|
50
|
-
|
|
51
|
-
&:hover {
|
|
52
|
-
border-color: var(--waline-theme-color);
|
|
53
|
-
border-radius: 2px;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.wl-gallery {
|
|
59
|
-
display: flex;
|
|
60
|
-
overflow-y: auto;
|
|
61
|
-
max-height: 80vh;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.wl-gallery-column {
|
|
65
|
-
display: flex;
|
|
66
|
-
flex: 1;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
|
|
69
|
-
// stylelint-disable
|
|
70
|
-
height: -webkit-max-content;
|
|
71
|
-
height: -moz-max-content;
|
|
72
|
-
height: max-content;
|
|
73
|
-
}
|