Mistral Chat responsive + customizations

Mistral Chat website is more suitable for wide screens.

当前为 2025-01-01 提交的版本,查看 最新版本

  1. /* ==UserStyle==
  2. @name Mistral Chat responsive + customizations
  3. @version 1.0.1
  4. @description Mistral Chat website is more suitable for wide screens.
  5. @author BreatFR (https://breat.fr)
  6. @namespace https://gitlab.com/breatfr
  7. @homepageURL https://gitlab.com/breatfr/mistral-chat
  8. @supportURL https://discord.gg/Q8KSHzdBxs
  9. @license AGPL-3.0-or-later; https://www.gnu.org/licenses/agpl-3.0.txt
  10. @preprocessor stylus
  11.  
  12. @var checkbox darkmode "Better dark mode" 1
  13. @var checkbox avatar "Custom avatar" 1
  14. @var text avatarurl "Custom avatar URL" "URL between quotes"
  15. @var text fontsize "Custom font size" 1.2rem
  16. @var checkbox widemode "Wide mode" 1
  17. ==/UserStyle== */
  18.  
  19. /* === Credits ===
  20. Website https://breat.fr
  21. facebook https://www.facebook.com/breatfroff
  22. mastodon https://mastodon.social/@breat_fr
  23. telegram https://t.me/breatfr
  24. vk https://vk.com/breatfroff
  25. X (twitter) https://x.com/breatfroff
  26. === Credits === */
  27.  
  28. @-moz-document domain("chat.mistral.ai") {
  29. /* Versions */
  30. :root {
  31. --themeversion: 'Theme v1.0.1 by BreatFR (https://breat.fr)';
  32. --install1: ' usercssjs.breat.fr \A';
  33. --install2: ' gitlab.com/breatfr/cici \A \A';
  34. --support1: ' ko-fi.com/breatfr \A';
  35. --support2: ' paypal.me/breat';
  36. }
  37.  
  38. @media (min-width: 900px) {
  39. [data-sidebar="trigger"]::after {
  40. background: linear-gradient(88.55deg, rgb(139, 109, 255) 22.43%, rgb(254, 132, 132) 92.28%);
  41. background-clip: text;
  42. -webkit-background-clip: text;
  43. color: transparent;
  44. content: var(--themeversion);
  45. display: block;
  46. font-family: ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
  47. font-size: 1.2rem;
  48. left: 50%;
  49. line-height: 1.5;
  50. max-width: max-content;
  51. pointer-events: none;
  52. position: fixed;
  53. text-align: center;
  54. top: .75em;
  55. transform: translateX(-25%);
  56. width: 100%;
  57. white-space: wrap;
  58. }
  59. }
  60.  
  61. [data-state="expanded"] [data-sidebar="sidebar"]::after {
  62. background: linear-gradient(88.55deg, rgb(139, 109, 255) 22.43%, rgb(254, 132, 132) 92.28%);
  63. background-clip: text;
  64. -webkit-background-clip: text;
  65. bottom: 1em;
  66. color: transparent;
  67. content: 'Install: \A' url("https://gitlab.com/breatfr/kindroid/-/raw/main/images/icon_breat.fr.png") var(--install1) url("https://gitlab.com/breatfr/kindroid/-/raw/main/images/icon_gitlab.png") var(--install2) 'Support me: \A' url("https://gitlab.com/breatfr/kindroid/-/raw/main/images/icon_ko-fi.png") var(--support1) url("https://gitlab.com/breatfr/kindroid/-/raw/main/images/icon_paypal.png") var(--support2);
  68. display: block;
  69. font-family: ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
  70. font-size: 1.2rem;
  71. left: 0;
  72. line-height: 1.5;
  73. max-width: 256px;
  74. pointer-events: none;
  75. position: fixed;
  76. text-align: center;
  77. width: 100%;
  78. white-space: pre-line;
  79. }
  80. /* Custom font size */
  81. .prose,
  82. code,
  83. textarea,
  84. .max-w-screen-md:has(textarea) button {
  85. font-size: fontsize !important;
  86. line-height: 1.5 !important;
  87. }
  88. textarea.py-2 {
  89. min-height: max-content !important;
  90. }
  91. if avatar {
  92. [data-sidebar="menu-button"] > div:nth-of-type(1) {
  93. background: transparent;
  94. color: transparent;
  95. }
  96. [class="group relative flex w-full gap-3"] > span > span {
  97. display: none;
  98. }
  99. [data-sidebar="menu-button"] > div:nth-of-type(1):before,
  100. [class="group relative flex w-full gap-3"] > span:before {
  101. background: url(avatarurl) no-repeat center center / cover;
  102. border-radius: 50%;
  103. content: "";
  104. display: inline-block;
  105. height: 32px;
  106. width: 32px;
  107. }
  108. }
  109. if chatmode {
  110. [class="group relative flex w-full gap-3"] > span {
  111. order: 2;
  112. }
  113. [class="group relative flex w-full gap-3"] > div {
  114. order: 1;
  115. }
  116. [class="group relative flex w-full gap-3"] {
  117. align-self: flex-end !important;
  118. justify-content: flex-end !important;
  119. max-width: 80% !important;
  120. }
  121. [class="group relative flex w-full gap-3"] * {
  122. justify-content: flex-end !important;
  123. margin-left: auto !important;
  124. }
  125. [class="group flex w-full gap-3"] > div {
  126. max-width: 80%;
  127. }
  128. [class="group flex w-full gap-3"] {
  129. border-bottom: 1px solid rgba(255, 149, 0, 0.4);
  130. border-top: 1px solid rgba(255, 149, 0, 0.4);
  131. margin-bottom: 28px;
  132. padding-top: 28px;
  133. }
  134. [class="group flex w-full gap-3"]:last-child {
  135. border-bottom: 0;
  136. border-top: 1px solid rgba(255, 149, 0, 0.4);
  137. }
  138. }
  139. if darkmode {
  140. .dark,
  141. .light {
  142. --background: 240 5.9% 10%;
  143. --secondary-200: 240 5.9% 10%;
  144. --sidebar-background: 0 0% 5%;
  145. }
  146. .shadow-lg {
  147. box-shadow: rgba(255, 149, 0, 0.4) -2px -2px 2px 2px,
  148. rgba(255, 149, 0, 0.4) -2px 2px 2px 2px,
  149. rgba(255, 69, 0, 0.4) 2px -2px 2px 2px,
  150. rgba(255, 69, 0, 0.4) 2px 2px 2px 2px;
  151. }
  152. }
  153. if widemode {
  154. .max-w-screen-md {
  155. max-width: 100%;
  156. }
  157. .max-w-screen-md:has(textarea) {
  158. max-width: 100%;
  159. padding: 20px;
  160. }
  161. /* Avatars */
  162. .h-7 {
  163. height: 32px;
  164. }
  165. .w-7 {
  166. width: 32px;
  167. }
  168. }
  169. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址