ChatGPT.module.css
3 years ago
ChatGPT.module.scss
3 years ago
Messages.module.css
2 years ago
Messages.module.scss
2 years ago
_codeDark.scss
3 years ago
_codeLight.scss
3 years ago
_common.scss
3 years ago
_copybutton.scss
3 years ago
Messages.module.scss
371 lines
| 1 | .mwai-chat { |
| 2 | --mwai-spacing: 10px; |
| 3 | --mwai-fontSize: 13px; |
| 4 | --mwai-lineHeight: 1.5; |
| 5 | --mwai-borderRadius: 10px; |
| 6 | --mwai-width: 460px; |
| 7 | --mwai-maxHeight: 40vh; |
| 8 | --mwai-iconTextColor: black; |
| 9 | --mwai-iconTextBackgroundColor: white; |
| 10 | --mwai-fontColor: black; |
| 11 | --mwai-backgroundPrimaryColor: #fafafa; |
| 12 | --mwai-backgroundHeaderColor: #0084ff; |
| 13 | --mwai-headerButtonsColor: white; |
| 14 | |
| 15 | --mwai-backgroundUserColor: #0084ff; |
| 16 | --mwai-backgroundAiColor: #eee; |
| 17 | --mwai-backgroundAiSecondaryColor: #ddd; |
| 18 | |
| 19 | * { |
| 20 | box-sizing: border-box; |
| 21 | } |
| 22 | |
| 23 | .mwai-content { |
| 24 | display: flex; |
| 25 | background: var(--mwai-backgroundPrimaryColor); |
| 26 | font-size: var(--mwai-fontSize); |
| 27 | color: var(--mwai-fontColor); |
| 28 | border-radius: var(--mwai-borderRadius); |
| 29 | flex-direction: column; |
| 30 | } |
| 31 | |
| 32 | .mwai-conversation { |
| 33 | display: flex; |
| 34 | flex-direction: column; |
| 35 | overflow: auto; |
| 36 | max-height: var(--mwai-maxHeight); |
| 37 | padding: var(--mwai-spacing); |
| 38 | |
| 39 | .mwai-reply { |
| 40 | margin-bottom: var(--mwai-spacing); |
| 41 | padding: 7px 12px; |
| 42 | border-radius: 15px; |
| 43 | font-size: var(--mwai-fontSize); |
| 44 | color: var(--mwai-fontColor); |
| 45 | position: relative; |
| 46 | |
| 47 | .mwai-name { |
| 48 | display: none; |
| 49 | } |
| 50 | |
| 51 | .mwai-name-text { |
| 52 | display: none; |
| 53 | } |
| 54 | |
| 55 | & * { |
| 56 | &:first-child { margin-top: 0px; } |
| 57 | &:last-child { margin-bottom: 0px; } |
| 58 | } |
| 59 | |
| 60 | &.mwai-ai { |
| 61 | align-self: flex-start; |
| 62 | background: var(--mwai-backgroundAiColor); |
| 63 | margin-left: 5px; |
| 64 | |
| 65 | &::before, &::after { |
| 66 | content: ""; |
| 67 | position: absolute; |
| 68 | z-index: 1; |
| 69 | bottom: 0; |
| 70 | left: -10px; |
| 71 | width: 10px; |
| 72 | height: 20px; |
| 73 | background: var(--mwai-backgroundPrimaryColor); |
| 74 | border-bottom-right-radius: 10px; |
| 75 | } |
| 76 | |
| 77 | &::before { |
| 78 | z-index: 0; |
| 79 | left: -7px; |
| 80 | height: 20px; |
| 81 | width: 20px; |
| 82 | background: var(--mwai-backgroundAiColor); |
| 83 | border-bottom-right-radius: 15px; |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | &.mwai-user { |
| 88 | align-self: flex-end; |
| 89 | background: var(--mwai-backgroundUserColor); |
| 90 | color: white; |
| 91 | margin-right: 10px; |
| 92 | |
| 93 | &::before, &::after { |
| 94 | content: ""; |
| 95 | position: absolute; |
| 96 | z-index: 1; |
| 97 | bottom: 0; |
| 98 | right: -10px; |
| 99 | width: 10px; |
| 100 | height: 20px; |
| 101 | background: var(--mwai-backgroundPrimaryColor); |
| 102 | border-bottom-left-radius: 10px; |
| 103 | } |
| 104 | |
| 105 | &::before { |
| 106 | z-index: 0; |
| 107 | right: -10px; |
| 108 | height: 20px; |
| 109 | width: 20px; |
| 110 | background: var(--mwai-backgroundUserColor); |
| 111 | background-attachment: fixed; |
| 112 | border-bottom-left-radius: 15px; |
| 113 | } |
| 114 | } |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | .mwai-text { |
| 119 | flex: auto; |
| 120 | |
| 121 | *:first-child { |
| 122 | margin-top: 0; |
| 123 | } |
| 124 | |
| 125 | *:last-child { |
| 126 | margin-bottom: 0; |
| 127 | } |
| 128 | |
| 129 | a { |
| 130 | color: #2196f3; |
| 131 | } |
| 132 | |
| 133 | h1 { |
| 134 | font-size: 200%; |
| 135 | } |
| 136 | |
| 137 | h2 { |
| 138 | font-size: 160%; |
| 139 | } |
| 140 | |
| 141 | h3 { |
| 142 | font-size: 140%; |
| 143 | } |
| 144 | |
| 145 | h4 { |
| 146 | font-size: 120%; |
| 147 | } |
| 148 | |
| 149 | p { |
| 150 | font-size: var(--mwai-fontSize); |
| 151 | line-height: var(--mwai-lineHeight); |
| 152 | |
| 153 | code { |
| 154 | background: var(--mwai-backgroundAiSecondaryColor); |
| 155 | padding: 2px 6px; |
| 156 | border-radius: 8px; |
| 157 | font-size: 90%; |
| 158 | font-family: system-ui; |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | pre { |
| 163 | color: var(--mwai-fontColor); |
| 164 | border-radius: var(--mwai-borderRadius); |
| 165 | break-after: auto; |
| 166 | white-space: pre-wrap; |
| 167 | max-width: 100%; |
| 168 | width: 100%; |
| 169 | font-family: system-ui; |
| 170 | background: var(--mwai-backgroundAiSecondaryColor); |
| 171 | padding: var(--mwai-spacing); |
| 172 | |
| 173 | code { |
| 174 | padding: 0 !important; |
| 175 | font-family: system-ui; |
| 176 | background: var(--mwai-backgroundAiSecondaryColor); |
| 177 | } |
| 178 | } |
| 179 | |
| 180 | ol { |
| 181 | padding: 0; |
| 182 | margin: 0 0 0 20px; |
| 183 | } |
| 184 | |
| 185 | table { |
| 186 | width: 100%; |
| 187 | border: 2px solid var(--mwai-backgroundAiSecondaryColor); |
| 188 | border-collapse: collapse |
| 189 | } |
| 190 | |
| 191 | thead { |
| 192 | background: var(--mwai-backgroundAiSecondaryColor); |
| 193 | } |
| 194 | |
| 195 | tr, td { |
| 196 | padding: 2px 5px; |
| 197 | } |
| 198 | |
| 199 | td { |
| 200 | border: 2px solid var(--mwai-backgroundAiSecondaryColor); |
| 201 | } |
| 202 | |
| 203 | .mwai-typewriter { |
| 204 | display: inline-block; |
| 205 | |
| 206 | > :first-child { |
| 207 | margin-top: 0; |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | >* { |
| 212 | &:first-child { |
| 213 | margin-top: 0; |
| 214 | |
| 215 | } |
| 216 | &:last-child { |
| 217 | margin-bottom: 0; |
| 218 | } |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | .mwai-avatar { |
| 223 | img { |
| 224 | width: 24px; |
| 225 | border-radius: 5px; |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | .mwai-input { |
| 230 | display: flex; |
| 231 | align-items: center; |
| 232 | padding: var(--mwai-spacing); |
| 233 | |
| 234 | .mwai-input-text { |
| 235 | flex: auto; |
| 236 | position: relative; |
| 237 | display: flex; |
| 238 | |
| 239 | textarea { |
| 240 | flex: auto; |
| 241 | padding: 5px 10px; |
| 242 | font-family: inherit; |
| 243 | border-radius: var(--mwai-borderRadius); |
| 244 | border: 1px solid var(--mwai-backgroundAiSecondaryColor); |
| 245 | |
| 246 | &:focus { |
| 247 | outline: none; |
| 248 | box-shadow: none; |
| 249 | } |
| 250 | |
| 251 | &::placeholder { |
| 252 | color: var(--mwai-fontColor); |
| 253 | opacity: 0.5; |
| 254 | } |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | .mwai-microphone { |
| 259 | display: flex; |
| 260 | align-items: center; |
| 261 | justify-content: center; |
| 262 | position: absolute; |
| 263 | right: 0px; |
| 264 | height: 100%; |
| 265 | cursor: pointer; |
| 266 | |
| 267 | svg { |
| 268 | fill: var(--mwai-fontColor); |
| 269 | width: 34px; |
| 270 | height: 34px; |
| 271 | padding: 5px 10px; |
| 272 | fill: var(--mwai-fontColor); |
| 273 | opacity: 0.5; |
| 274 | transition: opacity 0.3s ease-out; |
| 275 | } |
| 276 | |
| 277 | &[active=true]=true] { |
| 278 | svg { |
| 279 | opacity: 1; |
| 280 | } |
| 281 | } |
| 282 | |
| 283 | &[disabled]] { |
| 284 | svg { |
| 285 | opacity: 0; |
| 286 | } |
| 287 | } |
| 288 | } |
| 289 | |
| 290 | button { |
| 291 | margin-left: var(--mwai-spacing); |
| 292 | padding: 5px 15px; |
| 293 | background-color: var(--mwai-backgroundUserColor); |
| 294 | color: white; |
| 295 | border: none; |
| 296 | border-radius: var(--mwai-borderRadius); |
| 297 | cursor: pointer; |
| 298 | height: 32px; |
| 299 | width: 110px; |
| 300 | display: flex; |
| 301 | justify-content: center; |
| 302 | align-items: center; |
| 303 | |
| 304 | .mwai-timer { |
| 305 | margin-left: 5px; |
| 306 | margin-right: 5px; |
| 307 | font-size: 11px; |
| 308 | } |
| 309 | |
| 310 | &:hover { |
| 311 | filter: brightness(1.2); |
| 312 | } |
| 313 | } |
| 314 | } |
| 315 | |
| 316 | button[disabled]] { |
| 317 | |
| 318 | span { |
| 319 | display: none; |
| 320 | } |
| 321 | |
| 322 | &:before { |
| 323 | content: ''; |
| 324 | width: 14px; |
| 325 | height: 14px; |
| 326 | margin: auto; |
| 327 | border: 2px solid transparent; |
| 328 | border-top-color: white; |
| 329 | border-radius: 50%; |
| 330 | animation: mwai-button-spinner 1s ease infinite; |
| 331 | } |
| 332 | } |
| 333 | |
| 334 | .mwai-compliance { |
| 335 | opacity: 0.50; |
| 336 | margin-top: calc( -1 * var(--mwai-spacing)); |
| 337 | padding: calc(var(--mwai-spacing) / 1.5) var(--mwai-spacing); |
| 338 | font-size: smaller; |
| 339 | color: var(--mwai-fontColor); |
| 340 | text-align: left; |
| 341 | } |
| 342 | |
| 343 | .mwai-gallery { |
| 344 | display: grid; |
| 345 | grid-template-columns: repeat(3, 1fr); |
| 346 | grid-gap: 5px; |
| 347 | |
| 348 | img { |
| 349 | width: 100%; |
| 350 | } |
| 351 | } |
| 352 | } |
| 353 | |
| 354 | @import '_common.scss'; |
| 355 | @import '_copybutton.scss'; |
| 356 | @import '_codeLight.scss'; |
| 357 | |
| 358 | .mwai-copy-button { |
| 359 | position: absolute; |
| 360 | left: 15px; |
| 361 | zoom: 0.5; |
| 362 | top: 18px; |
| 363 | filter: revert; |
| 364 | } |
| 365 | |
| 366 | .mwai-ai .mwai-copy-button { |
| 367 | right: 15px; |
| 368 | left: inherit; |
| 369 | filter: brightness(0.4); |
| 370 | } |
| 371 |