@tilde-nlp/website-translator 7.1.0
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/LICENCE +202 -0
- package/README.md +82 -0
- package/dist/widget.js +2 -0
- package/dist/widget.js.LICENSE.txt +3 -0
- package/examples/Multi pretranslated lang example/main.js +32 -0
- package/examples/Multi pretranslated lang example/page_de.html +19 -0
- package/examples/Multi pretranslated lang example/page_en.html +14 -0
- package/examples/Multi pretranslated lang example/page_fr.html +15 -0
- package/examples/example1.html +96 -0
- package/examples/example2.html +71 -0
- package/examples/example3-async-defer-load.html +22 -0
- package/examples/example4-defer-load.html +22 -0
- package/package.json +87 -0
- package/src/js/enums/PluginUILanguageType.ts +4 -0
- package/src/js/enums/ToolbarPositionType.ts +4 -0
- package/src/js/interfaces/IPluginOptions.ts +149 -0
- package/src/style/constants.scss +6 -0
- package/src/style/languageMenu.scss +163 -0
- package/src/style/mainStyle.scss +37 -0
- package/src/style/toolbar.scss +261 -0
- package/src/style/toolbarAlert.scss +29 -0
- package/src/style/toolbarProgress.scss +66 -0
- package/src/style/toolbarSuggestion.scss +42 -0
- package/src/style/tooltip.scss +75 -0
- package/src/style/widget.scss +11 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
$itemSelectedBackground: white;
|
|
2
|
+
$itemSelectedColor: cornflowerblue;
|
|
3
|
+
|
|
4
|
+
$itemHoveredBackground: rgb(238, 238, 238);
|
|
5
|
+
// $itemHoveredColor: white;
|
|
6
|
+
|
|
7
|
+
$machineTranslatedIconColor: $itemSelectedColor;
|
|
8
|
+
|
|
9
|
+
$languageWidth: 200px;
|
|
10
|
+
$itemHeight:45px;
|
|
11
|
+
|
|
12
|
+
.website-translator {
|
|
13
|
+
&.left-aligned{
|
|
14
|
+
.language-menu > .website-translator-select > .selected-item{
|
|
15
|
+
padding: 0 10px;
|
|
16
|
+
}
|
|
17
|
+
> .language-menu > .website-translator-select > .selected-item > .menu-text{
|
|
18
|
+
text-align: left;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
&.inverted{
|
|
22
|
+
> .language-menu > .website-translator-select > .options{
|
|
23
|
+
transform: translateY(calc(-100% - #{$itemHeight}));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
> .language-menu,
|
|
28
|
+
> .language-list {
|
|
29
|
+
.icon * {
|
|
30
|
+
height: 1em;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
> .language-list {
|
|
34
|
+
.icon {
|
|
35
|
+
margin-left: 5px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
> .language-menu {
|
|
39
|
+
position: relative;
|
|
40
|
+
user-select: none;
|
|
41
|
+
width: $languageWidth;
|
|
42
|
+
|
|
43
|
+
:focus{
|
|
44
|
+
outline: none;
|
|
45
|
+
}
|
|
46
|
+
> .website-translator-select {
|
|
47
|
+
position: relative;
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
font-weight: bold;
|
|
51
|
+
font-family: $defaultFontFamily;
|
|
52
|
+
|
|
53
|
+
&.open {
|
|
54
|
+
> .selected-item > .menu-arrow {
|
|
55
|
+
transform: rotate(180deg);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
> .options {
|
|
59
|
+
opacity: 1;
|
|
60
|
+
visibility: visible;
|
|
61
|
+
pointer-events: all;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
> .selected-item {
|
|
66
|
+
position: relative;
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: space-between;
|
|
70
|
+
padding: 0 5px;
|
|
71
|
+
font-size: $defaultFontSize;
|
|
72
|
+
color: #3b3b3b;
|
|
73
|
+
height: $itemHeight;
|
|
74
|
+
line-height: $itemHeight;
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
border: none;
|
|
77
|
+
background-color: transparent;
|
|
78
|
+
font-weight: bold;
|
|
79
|
+
|
|
80
|
+
> .translate-icon{
|
|
81
|
+
filter:$iconDefaultColor;
|
|
82
|
+
margin-right: .25rem;
|
|
83
|
+
display:none;
|
|
84
|
+
}
|
|
85
|
+
> .menu-text {
|
|
86
|
+
text-align: right;
|
|
87
|
+
flex-grow: 1;
|
|
88
|
+
}
|
|
89
|
+
> .menu-arrow {
|
|
90
|
+
filter: $iconDefaultColor;
|
|
91
|
+
margin-left: 10px;
|
|
92
|
+
transition: all 0.1s;
|
|
93
|
+
transform: rotate(0deg);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
> .options {
|
|
97
|
+
border-radius: 0;
|
|
98
|
+
|
|
99
|
+
max-height: 500px;
|
|
100
|
+
overflow: auto;
|
|
101
|
+
|
|
102
|
+
position: absolute;
|
|
103
|
+
display: block;
|
|
104
|
+
top: 100%;
|
|
105
|
+
left: 0;
|
|
106
|
+
right: 0;
|
|
107
|
+
border: none;
|
|
108
|
+
background: #fff;
|
|
109
|
+
|
|
110
|
+
box-shadow: 0px 0px 4px 0px #c8c8c8;
|
|
111
|
+
|
|
112
|
+
// Animations will break custom menu accessability :(
|
|
113
|
+
// If we need to save animations then we need to delay focus on menu items
|
|
114
|
+
|
|
115
|
+
transition:none !important;
|
|
116
|
+
// transition: all 0.2s;
|
|
117
|
+
opacity: 0;
|
|
118
|
+
visibility: hidden;
|
|
119
|
+
pointer-events: none;
|
|
120
|
+
z-index: $zIndex;
|
|
121
|
+
|
|
122
|
+
> .option {
|
|
123
|
+
display: flex;
|
|
124
|
+
position: relative;
|
|
125
|
+
padding: 0 16px 0 16px;
|
|
126
|
+
font-size: $defaultFontSize;
|
|
127
|
+
color: #3b3b3b;
|
|
128
|
+
line-height: $itemHeight;
|
|
129
|
+
cursor: pointer;
|
|
130
|
+
|
|
131
|
+
// Animations will break custom menu accessability :(
|
|
132
|
+
// If we need to save animations then we need to delay focus on menu items
|
|
133
|
+
|
|
134
|
+
transition:none !important;
|
|
135
|
+
// transition: all 0.2s;
|
|
136
|
+
|
|
137
|
+
&:hover, &:focus {
|
|
138
|
+
cursor: pointer;
|
|
139
|
+
background-color: $itemHoveredBackground !important;
|
|
140
|
+
// color: $itemHoveredColor !important;
|
|
141
|
+
}
|
|
142
|
+
&.selected {
|
|
143
|
+
color: $itemSelectedColor;
|
|
144
|
+
background-color: $itemSelectedBackground;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
> .text {
|
|
148
|
+
display: flex;
|
|
149
|
+
flex-grow: 1;
|
|
150
|
+
}
|
|
151
|
+
> .icon {
|
|
152
|
+
display: flex;
|
|
153
|
+
align-items: center;
|
|
154
|
+
justify-content: center;
|
|
155
|
+
> * {
|
|
156
|
+
fill: $machineTranslatedIconColor;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
$buttonColor: #7a7a7a;
|
|
2
|
+
$buttonColorSelected: $defaultAccentColor;
|
|
3
|
+
$buttonImageColorSelected: invert(21%) sepia(50%) saturate(3311%) hue-rotate(322deg) brightness(87%) contrast(94%);
|
|
4
|
+
.website-translator {
|
|
5
|
+
padding: 5px 0;
|
|
6
|
+
|
|
7
|
+
button {
|
|
8
|
+
&:not(:first-child) {
|
|
9
|
+
margin-left: 5px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&.active {
|
|
13
|
+
font-weight: bold;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.website-translator {
|
|
19
|
+
&-close {
|
|
20
|
+
margin-left: auto;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&-animations {
|
|
24
|
+
&-fade-out {
|
|
25
|
+
opacity: 0;
|
|
26
|
+
transition: opacity 0.5s ease-in;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.website-translator-toolbar .icon{
|
|
32
|
+
filter: $iconDefaultColor;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.website-translator-toolbar{
|
|
36
|
+
font-family: $defaultFontFamily;
|
|
37
|
+
}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
$toolbarBackground: #F0F2F4;
|
|
2
|
+
$toolbarBorder: 1px 0px solid rgb(223, 223, 223);
|
|
3
|
+
$fontSize: 14px;
|
|
4
|
+
|
|
5
|
+
.website-translator-toolbar-spacer {
|
|
6
|
+
width: 100%;
|
|
7
|
+
display: inline-block;
|
|
8
|
+
|
|
9
|
+
&.headless{
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.website-translator-toolbar {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
font-family: $defaultFontFamily;
|
|
18
|
+
font-size: $fontSize;
|
|
19
|
+
position: fixed;
|
|
20
|
+
|
|
21
|
+
left: 0;
|
|
22
|
+
max-height: 100vh;
|
|
23
|
+
width: 100%;
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
border-top: $toolbarBorder;
|
|
26
|
+
|
|
27
|
+
z-index: $zIndex;
|
|
28
|
+
color: $defaultTextColor;
|
|
29
|
+
|
|
30
|
+
&.headless{
|
|
31
|
+
display: none;
|
|
32
|
+
}
|
|
33
|
+
* {
|
|
34
|
+
font-size: $fontSize;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.website-translator{
|
|
38
|
+
align-self: center;
|
|
39
|
+
padding: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.hidden{
|
|
43
|
+
display:none !important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.website-translator-button {
|
|
47
|
+
font-weight: bold;
|
|
48
|
+
color: $defaultAccentColor;
|
|
49
|
+
text-decoration: none;
|
|
50
|
+
padding: 5px;
|
|
51
|
+
border: none;
|
|
52
|
+
background: transparent;
|
|
53
|
+
|
|
54
|
+
&.disabled{
|
|
55
|
+
color:#7a7a7a;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&:not(.authenticated) > .dashboard > .info {
|
|
60
|
+
> .translation-notice{
|
|
61
|
+
margin-left: 25px;
|
|
62
|
+
}
|
|
63
|
+
> .website-translator-branding{
|
|
64
|
+
display:none;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.top {
|
|
69
|
+
top: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&.bottom {
|
|
73
|
+
bottom: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.title {
|
|
77
|
+
display: block;
|
|
78
|
+
font-weight: bold;
|
|
79
|
+
margin-bottom: 5px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.close-wrapper {
|
|
83
|
+
margin-left: auto;
|
|
84
|
+
padding-left: 20px;
|
|
85
|
+
align-items: flex-end;
|
|
86
|
+
display: flex;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
> * {
|
|
90
|
+
padding: 4px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
> div:not(.dashboard):not(.progress-bar) {
|
|
94
|
+
background: white;
|
|
95
|
+
border: 1px solid rgb(223, 223, 223);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&:not(.authenticated){
|
|
99
|
+
.dashboard{
|
|
100
|
+
min-height:30px;
|
|
101
|
+
.website-translator-info{
|
|
102
|
+
> .mt-info{
|
|
103
|
+
display: none;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&.authenticated {
|
|
110
|
+
.translation-notice{
|
|
111
|
+
display: none;
|
|
112
|
+
}
|
|
113
|
+
.translate-icon{
|
|
114
|
+
display: flex !important;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.dashboard{
|
|
118
|
+
height: 54px;
|
|
119
|
+
flex-wrap: nowrap;
|
|
120
|
+
z-index: $zIndex + 10;
|
|
121
|
+
.controls *{
|
|
122
|
+
display: none;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.dashboard {
|
|
128
|
+
z-index: $zIndex;
|
|
129
|
+
|
|
130
|
+
background: $toolbarBackground;
|
|
131
|
+
display: flex;
|
|
132
|
+
flex-wrap: wrap;
|
|
133
|
+
|
|
134
|
+
@media (min-width: 768px) {
|
|
135
|
+
flex-wrap: nowrap;
|
|
136
|
+
.info{
|
|
137
|
+
flex-direction: row !important;
|
|
138
|
+
}
|
|
139
|
+
.translation-notice{
|
|
140
|
+
padding: 0px !important;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.controls{
|
|
145
|
+
@media (max-width: 768px) {
|
|
146
|
+
margin-left: 35px;
|
|
147
|
+
margin-bottom: 5px;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
.translation-notice{
|
|
151
|
+
padding: 10px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.textual-branding{
|
|
155
|
+
display: flex;
|
|
156
|
+
align-items: center;
|
|
157
|
+
a{
|
|
158
|
+
color:#888888;
|
|
159
|
+
font-size: 13px;
|
|
160
|
+
text-decoration: none;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
.info {
|
|
164
|
+
display: flex;
|
|
165
|
+
align-items: center;
|
|
166
|
+
flex-direction: column;
|
|
167
|
+
|
|
168
|
+
@media (max-width: 768px) {
|
|
169
|
+
flex-direction: row;
|
|
170
|
+
}
|
|
171
|
+
> .mt-info {
|
|
172
|
+
font-weight: bold;
|
|
173
|
+
|
|
174
|
+
> .mt-provider{
|
|
175
|
+
color: rgb(97, 110, 124);
|
|
176
|
+
text-transform: uppercase;
|
|
177
|
+
font-size: 10px;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
> .translation-notice{
|
|
182
|
+
> .vendor{
|
|
183
|
+
padding:0;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
.website-translator-branding {
|
|
187
|
+
margin-right: 15px;
|
|
188
|
+
@media (min-width: 768px) {
|
|
189
|
+
margin-left: 59px;
|
|
190
|
+
}
|
|
191
|
+
margin-left: 0;
|
|
192
|
+
font-weight: 700;
|
|
193
|
+
white-space: nowrap;
|
|
194
|
+
|
|
195
|
+
&-visual {
|
|
196
|
+
display: block;
|
|
197
|
+
height: 36px;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
&-link {
|
|
201
|
+
display: block;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.controls {
|
|
207
|
+
flex-grow: 1;
|
|
208
|
+
display: flex;
|
|
209
|
+
margin-left: auto;
|
|
210
|
+
margin-right: auto;
|
|
211
|
+
flex-basis: 100%;
|
|
212
|
+
align-items: center;
|
|
213
|
+
// margin-right: 15px;
|
|
214
|
+
|
|
215
|
+
@media (min-width: 768px) {
|
|
216
|
+
margin-bottom:0;
|
|
217
|
+
padding-left: 3px;
|
|
218
|
+
flex-direction: row;
|
|
219
|
+
flex-basis: auto;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
@media (min-width: 992px) {
|
|
223
|
+
align-self: center;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.restore-button{
|
|
227
|
+
padding:0;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.auth {
|
|
232
|
+
@media (max-width: 768px) {
|
|
233
|
+
display: none;
|
|
234
|
+
}
|
|
235
|
+
display: flex;
|
|
236
|
+
align-items: center;
|
|
237
|
+
margin-right: 25px;
|
|
238
|
+
.auth-identity {
|
|
239
|
+
margin-left: auto;
|
|
240
|
+
margin-right: 15px;
|
|
241
|
+
padding-left: 20px;
|
|
242
|
+
white-space: nowrap;
|
|
243
|
+
// align-self: start;
|
|
244
|
+
align-items: center;
|
|
245
|
+
display: flex;
|
|
246
|
+
|
|
247
|
+
@media (min-width: 768px) {
|
|
248
|
+
align-self: center;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
+ .controls {
|
|
252
|
+
margin-left: 0;
|
|
253
|
+
|
|
254
|
+
@media (min-width: 768px) {
|
|
255
|
+
padding-left: 10px;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.website-translator-toolbar-alert {
|
|
2
|
+
align-items: center;
|
|
3
|
+
display: flex;
|
|
4
|
+
font-weight: bold;
|
|
5
|
+
background: white;
|
|
6
|
+
.detailed-message {
|
|
7
|
+
font-family: monospace;
|
|
8
|
+
color: darkgrey;
|
|
9
|
+
font-size: 12px;
|
|
10
|
+
margin-left: 5px;
|
|
11
|
+
}
|
|
12
|
+
.website-translator-icon {
|
|
13
|
+
&::before {
|
|
14
|
+
display: block;
|
|
15
|
+
width: 24px;
|
|
16
|
+
height: 24px;
|
|
17
|
+
margin-right: 20px;
|
|
18
|
+
margin-left: 5px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&-danger::before {
|
|
22
|
+
content: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23D52222' fill-rule='nonzero' d='M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 12c-.6 0-1-.4-1-1s.4-1 1-1 1 .4 1 1-.4 1-1 1zm1-3h-2V8h2v5z'/%3E%3C/svg%3E%0A");
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&-success::before {
|
|
26
|
+
content: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23557C8F' fill-rule='nonzero' d='M18.3 6.3L9 15.6l-3.3-3.3c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4l4 4c.2.2.4.3.7.3.3 0 .5-.1.7-.3l10-10c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0z'/%3E%3C/svg%3E");
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
$progressDarkColor: #9fb1d5;
|
|
2
|
+
$progressLightColor: #1f4094;
|
|
3
|
+
$progressBufferedColor: #7d97db;
|
|
4
|
+
|
|
5
|
+
.website-translator-toolbar {
|
|
6
|
+
.progress-bar,
|
|
7
|
+
.progress-bar:before {
|
|
8
|
+
height: 2px;
|
|
9
|
+
width: 100%;
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
}
|
|
13
|
+
.progress-bar {
|
|
14
|
+
background-color: $progressDarkColor;
|
|
15
|
+
display: -webkit-flex;
|
|
16
|
+
display: flex;
|
|
17
|
+
|
|
18
|
+
// This is just to make sure that in page where widget is integrated, styles are not ruined
|
|
19
|
+
flex-direction: row;
|
|
20
|
+
justify-content: flex-start;
|
|
21
|
+
//
|
|
22
|
+
|
|
23
|
+
&.buffered.indeterminate{
|
|
24
|
+
background-color: $progressBufferedColor;
|
|
25
|
+
}
|
|
26
|
+
&.buffered{
|
|
27
|
+
background-color: $progressLightColor;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.progress-bar.indeterminate:before {
|
|
32
|
+
background-color: $progressLightColor;
|
|
33
|
+
content: "";
|
|
34
|
+
-webkit-animation: running-progress 2s cubic-bezier(0.4, 0, 0.2, 1)
|
|
35
|
+
infinite;
|
|
36
|
+
animation: running-progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
37
|
+
}
|
|
38
|
+
@-webkit-keyframes running-progress {
|
|
39
|
+
0% {
|
|
40
|
+
margin-left: 0px;
|
|
41
|
+
margin-right: 100%;
|
|
42
|
+
}
|
|
43
|
+
50% {
|
|
44
|
+
margin-left: 25%;
|
|
45
|
+
margin-right: 0%;
|
|
46
|
+
}
|
|
47
|
+
100% {
|
|
48
|
+
margin-left: 100%;
|
|
49
|
+
margin-right: 0;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
@keyframes running-progress {
|
|
53
|
+
0% {
|
|
54
|
+
margin-left: 0px;
|
|
55
|
+
margin-right: 100%;
|
|
56
|
+
}
|
|
57
|
+
50% {
|
|
58
|
+
margin-left: 25%;
|
|
59
|
+
margin-right: 0%;
|
|
60
|
+
}
|
|
61
|
+
100% {
|
|
62
|
+
margin-left: 100%;
|
|
63
|
+
margin-right: 0;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
$textColor: rgb(13, 46, 70);
|
|
2
|
+
$tooltipBorder: 1px 0px rgb(223, 223, 223);
|
|
3
|
+
|
|
4
|
+
.website-translator-toolbar {
|
|
5
|
+
.suggestion-dialog {
|
|
6
|
+
color: $textColor;
|
|
7
|
+
border: $tooltipBorder;
|
|
8
|
+
|
|
9
|
+
> .closable-wrapper {
|
|
10
|
+
> .submission-dialog,
|
|
11
|
+
> .form {
|
|
12
|
+
width: 100%;
|
|
13
|
+
display: flex;
|
|
14
|
+
margin: auto;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
@media (min-width: 768px) {
|
|
17
|
+
max-width: 1000px;
|
|
18
|
+
flex-direction: row;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.translated-label,
|
|
24
|
+
.original-label {
|
|
25
|
+
display: block;
|
|
26
|
+
font-weight: bold;
|
|
27
|
+
margin-bottom: 5px;
|
|
28
|
+
margin-top: 12px;
|
|
29
|
+
}
|
|
30
|
+
.original {
|
|
31
|
+
margin-bottom: 12px;
|
|
32
|
+
line-height: 16px;
|
|
33
|
+
font-size: 12px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&-form {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-grow: 1;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
$tooltipBackground: white;
|
|
2
|
+
$tooltipBorder: 1px 0px solid rgb(223, 223, 223);
|
|
3
|
+
$tooltipColor: rgb(13, 46, 70);
|
|
4
|
+
|
|
5
|
+
.website-translator-tooltip {
|
|
6
|
+
color: $tooltipColor;
|
|
7
|
+
display: none;
|
|
8
|
+
position: fixed;
|
|
9
|
+
min-width: 300px;
|
|
10
|
+
max-width: 300px;
|
|
11
|
+
font-family: $defaultFontFamily;
|
|
12
|
+
font-size: $defaultFontSize;
|
|
13
|
+
border: $tooltipBorder;
|
|
14
|
+
background: $tooltipBackground;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
z-index: $zIndex;
|
|
17
|
+
border-radius: 0.25rem;
|
|
18
|
+
box-shadow: 0px 0px 5px -1px #8c8c8cbf;
|
|
19
|
+
|
|
20
|
+
&.active {
|
|
21
|
+
display: block;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
> .body {
|
|
25
|
+
display: none;
|
|
26
|
+
padding: 10px;
|
|
27
|
+
|
|
28
|
+
> .original-label {
|
|
29
|
+
font-weight: bold;
|
|
30
|
+
margin-bottom: 5px;
|
|
31
|
+
}
|
|
32
|
+
> .original {
|
|
33
|
+
margin-bottom: 10px;
|
|
34
|
+
line-height: 16px;
|
|
35
|
+
font-size: $defaultFontSize;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
> .footer {
|
|
40
|
+
display: none;
|
|
41
|
+
flex-direction: row;
|
|
42
|
+
align-items: stretch;
|
|
43
|
+
width: 100%;
|
|
44
|
+
line-height: 14px;
|
|
45
|
+
|
|
46
|
+
> * {
|
|
47
|
+
margin: 5px;
|
|
48
|
+
}
|
|
49
|
+
> .text {
|
|
50
|
+
font-size: 10px;
|
|
51
|
+
}
|
|
52
|
+
> .icon {
|
|
53
|
+
display: inline-block;
|
|
54
|
+
align-self: center;
|
|
55
|
+
img {
|
|
56
|
+
height: 25px;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&.footer-visible {
|
|
62
|
+
> .footer {
|
|
63
|
+
display: flex;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.original-text-visible {
|
|
68
|
+
> .body {
|
|
69
|
+
display: block;
|
|
70
|
+
}
|
|
71
|
+
> .footer {
|
|
72
|
+
border-top: 2px solid rgba(0, 123, 255, 0.5);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@import './constants.scss';
|
|
2
|
+
|
|
3
|
+
@import './languageMenu.scss';
|
|
4
|
+
|
|
5
|
+
@import './tooltip.scss';
|
|
6
|
+
@import './mainStyle.scss';
|
|
7
|
+
|
|
8
|
+
@import './toolbar.scss';
|
|
9
|
+
@import './toolbarAlert.scss';
|
|
10
|
+
@import './toolbarSuggestion.scss';
|
|
11
|
+
@import './toolbarProgress.scss';
|