ChatGPT.module.css
3 years ago
ChatGPT.module.scss
3 years ago
Messages.module.css
3 years ago
Messages.module.scss
3 years ago
_common.scss
3 years ago
_copybutton.scss
3 years ago
Messages.module.scss
315 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: white; |
| 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 | background: var(--mwai-backgroundPrimaryColor); |
| 25 | font-size: var(--mwai-fontSize); |
| 26 | color: var(--mwai-fontColor); |
| 27 | border-radius: var(--mwai-borderRadius); |
| 28 | flex-direction: column; |
| 29 | } |
| 30 | |
| 31 | .mwai-conversation { |
| 32 | display: flex; |
| 33 | flex-direction: column; |
| 34 | overflow: auto; |
| 35 | max-height: var(--mwai-maxHeight); |
| 36 | padding: var(--mwai-spacing); |
| 37 | |
| 38 | .mwai-reply { |
| 39 | margin-bottom: var(--mwai-spacing); |
| 40 | padding: 7px 12px; |
| 41 | border-radius: 15px; |
| 42 | font-size: var(--mwai-fontSize); |
| 43 | color: var(--mwai-fontColor); |
| 44 | position: relative; |
| 45 | |
| 46 | .mwai-name { |
| 47 | display: none; |
| 48 | } |
| 49 | |
| 50 | .mwai-name-text { |
| 51 | display: none; |
| 52 | } |
| 53 | |
| 54 | & * { |
| 55 | &:first-child { margin-top: 0px; } |
| 56 | &:last-child { margin-bottom: 0px; } |
| 57 | } |
| 58 | |
| 59 | &.mwai-ai { |
| 60 | align-self: flex-start; |
| 61 | background: var(--mwai-backgroundAiColor); |
| 62 | margin-left: 5px; |
| 63 | |
| 64 | &::before, &::after { |
| 65 | content: ""; |
| 66 | position: absolute; |
| 67 | z-index: 1; |
| 68 | bottom: 0; |
| 69 | left: -10px; |
| 70 | width: 10px; |
| 71 | height: 20px; |
| 72 | background: var(--mwai-backgroundPrimaryColor); |
| 73 | border-bottom-right-radius: 10px; |
| 74 | } |
| 75 | |
| 76 | &::before { |
| 77 | z-index: 0; |
| 78 | left: -7px; |
| 79 | height: 20px; |
| 80 | width: 20px; |
| 81 | background: var(--mwai-backgroundAiColor); |
| 82 | border-bottom-right-radius: 15px; |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | &.mwai-user { |
| 87 | align-self: flex-end; |
| 88 | background: var(--mwai-backgroundUserColor); |
| 89 | color: white; |
| 90 | margin-right: 10px; |
| 91 | text-align: right; |
| 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 | textarea { |
| 235 | flex: auto; |
| 236 | padding: 5px 10px; |
| 237 | height: 32px; |
| 238 | font-family: inherit; |
| 239 | |
| 240 | &:focus { |
| 241 | outline: none; |
| 242 | box-shadow: none; |
| 243 | } |
| 244 | |
| 245 | &::placeholder { |
| 246 | color: var(--mwai-fontColor); |
| 247 | opacity: 0.5; |
| 248 | } |
| 249 | } |
| 250 | |
| 251 | button { |
| 252 | margin-left: var(--mwai-spacing); |
| 253 | padding: 5px 15px; |
| 254 | background-color: var(--mwai-backgroundUserColor); |
| 255 | color: white; |
| 256 | border: none; |
| 257 | border-radius: var(--mwai-borderRadius); |
| 258 | cursor: pointer; |
| 259 | height: 32px; |
| 260 | width: 110px; |
| 261 | display: flex; |
| 262 | justify-content: center; |
| 263 | align-items: center; |
| 264 | |
| 265 | .mwai-timer { |
| 266 | margin-left: 5px; |
| 267 | margin-right: 5px; |
| 268 | font-size: 11px; |
| 269 | } |
| 270 | |
| 271 | &:hover { |
| 272 | filter: brightness(1.2); |
| 273 | } |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | .mwai-compliance { |
| 278 | opacity: 0.50; |
| 279 | margin-top: calc( -1 * var(--mwai-spacing)); |
| 280 | padding: calc(var(--mwai-spacing) / 1.5) var(--mwai-spacing); |
| 281 | font-size: smaller; |
| 282 | color: var(--mwai-fontColor); |
| 283 | text-align: left; |
| 284 | } |
| 285 | |
| 286 | .mwai-gallery { |
| 287 | display: grid; |
| 288 | grid-template-columns: repeat(3, 1fr); |
| 289 | grid-gap: 5px; |
| 290 | |
| 291 | img { |
| 292 | width: 100%; |
| 293 | } |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | @import '_common.scss'; |
| 298 | @import '_copybutton.scss'; |
| 299 | |
| 300 | .mwai-copy-button { |
| 301 | position: absolute; |
| 302 | left: 15px; |
| 303 | zoom: 0.5; |
| 304 | top: 18px; |
| 305 | filter: revert; |
| 306 | } |
| 307 | |
| 308 | .mwai-ai .mwai-copy-button { |
| 309 | right: 15px; |
| 310 | left: inherit; |
| 311 | filter: brightness(0.4); |
| 312 | } |
| 313 | |
| 314 | |
| 315 |