Mistral Chat responsive + customizations

Mistral Chat website is more suitable for wide screens.

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

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

QingJ © 2025

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