@waline/client 2.14.3 → 2.14.5

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.
@@ -20,7 +20,7 @@
20
20
  span.wl-tex {
21
21
  display: inline-block;
22
22
 
23
- margin-right: 0.25em;
23
+ margin-inline-end: 0.25em;
24
24
  padding: 2px 4px;
25
25
  border-radius: 0.2em;
26
26
 
@@ -74,7 +74,7 @@
74
74
  padding: 0.5em 0;
75
75
  color: var(--waline-light-grey);
76
76
  font-size: var(--waline-info-font-size);
77
- text-align: right;
77
+ text-align: end;
78
78
  }
79
79
 
80
80
  .wl-meta-head {
@@ -84,22 +84,22 @@
84
84
  padding: 0.375em;
85
85
  }
86
86
 
87
- ul.wl-sort {
87
+ .wl-sort {
88
88
  margin: 0;
89
89
  list-style-type: none;
90
- }
91
90
 
92
- .wl-sort li {
93
- display: inline-block;
94
- color: var(--waline-info-color);
95
- font-size: 0.75em;
96
- cursor: pointer;
97
- }
91
+ li {
92
+ display: inline-block;
93
+ color: var(--waline-info-color);
94
+ font-size: 0.75em;
95
+ cursor: pointer;
98
96
 
99
- .wl-sort li + li {
100
- margin-left: 1em;
101
- }
97
+ &.active {
98
+ color: var(--waline-theme-color);
99
+ }
102
100
 
103
- .wl-sort li.active {
104
- color: var(--waline-theme-color);
101
+ + li {
102
+ margin-inline-start: 1em;
103
+ }
104
+ }
105
105
  }
@@ -21,7 +21,7 @@ $safari-icon: '<svg viewBox="0 0 512 512" fill="#999"><path d="m274.69 274.69-37
21
21
 
22
22
  width: 1em;
23
23
  height: 1em;
24
- margin-right: 2px;
24
+ margin-inline-end: 2px;
25
25
 
26
26
  background-position: center center;
27
27
  background-repeat: no-repeat;
@@ -1,6 +1,10 @@
1
1
  [data-waline] {
2
2
  font-size: var(--waline-font-size);
3
- text-align: left;
3
+ text-align: start;
4
+
5
+ [dir='rtl'] & {
6
+ direction: rtl;
7
+ }
4
8
 
5
9
  * {
6
10
  box-sizing: content-box;
@@ -88,7 +92,7 @@
88
92
  blockquote {
89
93
  margin: 0.5em 0;
90
94
  padding: 0.5em 0 0.5em 1em;
91
- border-left: 8px solid var(--waline-bq-color);
95
+ border-inline-start: 8px solid var(--waline-bq-color);
92
96
  color: var(--waline-dark-grey);
93
97
 
94
98
  > p {
@@ -98,7 +102,7 @@
98
102
 
99
103
  ol,
100
104
  ul {
101
- margin-left: 1.25em;
105
+ margin-inline-start: 1.25em;
102
106
  padding: 0;
103
107
  }
104
108
 
@@ -7,7 +7,7 @@
7
7
  .wl-close {
8
8
  position: absolute;
9
9
  top: -4px;
10
- right: -4px;
10
+ inset-inline-end: -4px;
11
11
 
12
12
  padding: 0;
13
13
  border: none;
@@ -28,7 +28,7 @@
28
28
  .wl-logout-btn {
29
29
  position: absolute;
30
30
  top: -10px;
31
- right: -10px;
31
+ inset-inline-end: -10px;
32
32
 
33
33
  padding: 3px;
34
34
  border: none;
@@ -275,7 +275,7 @@
275
275
  }
276
276
 
277
277
  button {
278
- margin-left: 0.75em;
278
+ margin-inline-start: 0.75em;
279
279
 
280
280
  svg {
281
281
  display: block;
@@ -1,6 +1,7 @@
1
1
  .wl-reaction {
2
2
  margin-bottom: 1.75em;
3
3
  text-align: center;
4
+ overflow-x: auto;
4
5
 
5
6
  img {
6
7
  width: 100%;
@@ -8,7 +9,14 @@
8
9
  transition: all 250ms ease-in-out;
9
10
  }
10
11
 
11
- &-list {
12
+ .reaction-title {
13
+ margin: 16px auto;
14
+ font-size: 18px;
15
+ font-weight: bold;
16
+ }
17
+
18
+ .reaction-list {
19
+ padding: 8px;
12
20
  display: flex;
13
21
  flex-direction: row;
14
22
  gap: 16px;
@@ -17,9 +25,13 @@
17
25
  margin: 0;
18
26
 
19
27
  list-style-type: none;
28
+
29
+ @media (max-width: 580px) {
30
+ gap: 12px;
31
+ }
20
32
  }
21
33
 
22
- &-item {
34
+ .reaction-item {
23
35
  display: flex;
24
36
  flex-direction: column;
25
37
  align-items: center;
@@ -30,28 +42,33 @@
30
42
  transform: scale(1.15);
31
43
  }
32
44
 
33
- &.active .wl-reaction {
34
- &-votes {
45
+ &.active {
46
+ .reaction-votes {
35
47
  background: var(--waline-theme-color);
36
48
  color: var(--waline-bgcolor);
37
49
  }
38
50
 
39
- &-text {
51
+ .reaction-text {
40
52
  color: var(--waline-theme-color);
41
53
  }
42
54
  }
43
55
  }
44
56
 
45
- &-img {
57
+ .reaction-img {
46
58
  position: relative;
47
59
  width: 42px;
48
60
  height: 42px;
61
+
62
+ @media (max-width: 580px) {
63
+ width: 32px;
64
+ height: 32px;
65
+ }
49
66
  }
50
67
 
51
- &-loading {
68
+ .reaction-loading {
52
69
  position: absolute;
53
70
  top: -4px;
54
- right: -5px;
71
+ inset-inline-end: -5px;
55
72
 
56
73
  width: 18px;
57
74
  height: 18px;
@@ -59,10 +76,10 @@
59
76
  color: var(--waline-theme-color);
60
77
  }
61
78
 
62
- &-votes {
79
+ .reaction-votes {
63
80
  position: absolute;
64
- top: -4px;
65
- right: -5px;
81
+ top: -9px;
82
+ inset-inline-end: -9px;
66
83
 
67
84
  min-width: 1em;
68
85
  padding: 2px;
@@ -77,7 +94,7 @@
77
94
  line-height: 1;
78
95
  }
79
96
 
80
- &-text {
97
+ .reaction-text {
81
98
  font-size: 0.875em;
82
99
  }
83
100
  }
@@ -37,7 +37,7 @@
37
37
 
38
38
  overflow: hidden;
39
39
 
40
- margin-right: 10px;
40
+ margin-inline-end: 10px;
41
41
  border-radius: 4px;
42
42
 
43
43
  line-height: 0;
@@ -50,7 +50,7 @@
50
50
 
51
51
  .wl-user-badge {
52
52
  position: absolute;
53
- right: 0;
53
+ inset-inline-end: 0;
54
54
  bottom: 0;
55
55
 
56
56
  min-width: 0.7em;
@@ -76,7 +76,7 @@
76
76
  display: inline-block;
77
77
  vertical-align: text-top;
78
78
 
79
- margin-left: 0.5em;
79
+ margin-inline-start: 0.5em;
80
80
  padding: 0 0.3em;
81
81
  border: 1px solid var(--waline-badge-color);
82
82
  border-radius: 4px;
@@ -68,7 +68,7 @@ export const getConfig = ({
68
68
  serverURL,
69
69
 
70
70
  path = location.pathname,
71
- lang = navigator.language,
71
+ lang = typeof navigator === 'undefined' ? 'en-US' : navigator.language,
72
72
  locale,
73
73
  emoji = defaultEmoji,
74
74
  meta = ['nick', 'mail', 'link'],
@@ -99,7 +99,7 @@ export const getConfig = ({
99
99
  imageUploader: fallback(imageUploader, defaultUploadImage),
100
100
  highlighter: fallback(highlighter, defaultHighlighter),
101
101
  texRenderer: fallback(texRenderer, defaultTexRenderer),
102
- lang,
102
+ lang: Object.keys(defaultLocales).includes(lang) ? lang : 'en-US',
103
103
  dark,
104
104
  emoji: typeof emoji === 'boolean' ? (emoji ? defaultEmoji : []) : emoji,
105
105
  pageSize,