Cici responsive + customizations

Cici website is more suitable for wide screens.

目前為 2025-01-05 提交的版本,檢視 最新版本

  1. /* ==UserStyle==
  2. @name Cici responsive + customizations
  3. @version 1.0.8
  4. @description Cici 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/cici
  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 select customciciface "Custom Cici face" {
  13. "Large Cici face": "cmlgciciface",
  14. "Small Cici face": "cmsmciciface",
  15. "Hidden": "nocmciciface"
  16. }
  17. @var text cmcicifaceurl "Custom Cici face URL" '"https://gitlab.com/breatfr/cici/-/raw/main/docs/cici-icon.png"'
  18. @var text cmciciavatarcorner "Custom Cici avatar corner" 22%
  19. @var text fontsize "Custom font size" 1.2rem
  20. @var checkbox chatmode "Chat mode (Require Our avatar URL)" 0
  21. @var text ouravatarurl "Our avatar URL (Require Chat mode)" '"https://pbs.twimg.com/profile_images/1676568728585007105/9DebaQOc_400x400.jpg"'
  22. @var checkbox darkmode "Dark mode" 1
  23. @var checkbox widemode "Wide mode" 1
  24. ==/UserStyle== */
  25.  
  26. /* === Credits ===
  27. Website https://breat.fr
  28. facebook https://www.facebook.com/breatfroff
  29. mastodon https://mastodon.social/@breat_fr
  30. telegram https://t.me/breatfr
  31. vk https://vk.com/breatfroff
  32. X (twitter) https://x.com/breatfroff
  33. === Credits === */
  34.  
  35. @-moz-document url-prefix("https://www.ciciai.com/chat/") {
  36. /* ========================================================
  37. Website theme
  38. ======================================================== */
  39. /* Versions */
  40. :root {
  41. --themeversion: 'Theme v1.0.8 · ';
  42. --scriptversion: 'Script v1.0.1 ';
  43. --author: 'by BreatFR (https://breat.fr)';
  44. --install1: ' usercssjs.breat.fr \A';
  45. --install2: ' gitlab.com/breatfr/cici \A \A';
  46. --support1: ' ko-fi.com/breatfr \A';
  47. --support2: ' paypal.me/breat';
  48.  
  49. --chat-area-max-width: 100%;
  50. --self-message-box-max-width: 100%;
  51. --chat-bg-color: #212121;
  52. --color-neutral-100: #cbcbcb;
  53. --dot-flashing-from: #cbcbcb;
  54. --dot-flashing-to: rgba(203, 203, 203, 0.8);
  55. --s-color-bg-primary: #2f2f2f;
  56. --s-color-bg-secondary: #2f2f2f;
  57. --s-color-bg-tertiary: #171717;
  58. --s-color-bg-trans: rgba(255, 255, 255, 0.2);
  59. --s-color-brand-primary-default: #7e94fe;
  60. --s-color-text-primary: #cbcbcb;
  61. --s-color-text-secondary: #cbcbcb;
  62. --s-color-text-tertiary: #cbcbcb;
  63. --s-color-text-quaternary: #cbcbcb;
  64. }
  65. @media (min-width: 900px) {
  66. [data-testid="chat_header_avatar_button"]::before {
  67. background: linear-gradient(88.55deg, rgb(139, 109, 255) 22.43%, rgb(254, 132, 132) 92.28%);
  68. background-clip: text;
  69. -webkit-background-clip: text;
  70. color: transparent;
  71. content: var(--themeversion) var(--scriptversion) var(--author);
  72. display: block;
  73. font-family: Montserrat;
  74. font-size: 1.2rem;
  75. left: 50%;
  76. line-height: 1.5;
  77. max-width: max-content;
  78. pointer-events: none;
  79. position: fixed;
  80. text-align: center;
  81. top: .75em;
  82. transform: translateX(-25%);
  83. width: 100%;
  84. white-space: wrap;
  85. }
  86. }
  87.  
  88. [class*="leftVisible-"] [data-testid="bookmark_entry"]::after {
  89. background: linear-gradient(88.55deg, rgb(139, 109, 255) 22.43%, rgb(254, 132, 132) 92.28%);
  90. background-clip: text;
  91. -webkit-background-clip: text;
  92. bottom: 1em;
  93. color: transparent;
  94. 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);
  95. display: block;
  96. font-family: Montserrat;
  97. font-size: 1rem;
  98. left: 0;
  99. line-height: 1.5;
  100. max-width: 280px;
  101. pointer-events: none;
  102. position: fixed;
  103. text-align: center;
  104. width: 100%;
  105. white-space: pre-line;
  106. }
  107. if (customciciface=="cmlgciciface") {
  108. [data-testid="guidance_panel"]::before {
  109. aspect-ratio: 1 / 1;
  110. background: url(cmcicifaceurl) no-repeat center center / cover;
  111. border-radius: cmciciavatarcorner;
  112. content: "";
  113. display: inline-block;
  114. height: 100%;
  115. margin: auto;
  116. max-height: 256px;
  117. min-height: 100px;
  118. width: auto;
  119. }
  120. [data-testid="chat_siderbar"] img[style="width: 36px; height: 36px;"] {
  121. aspect-ratio: 1 / 1;
  122. background: url(cmcicifaceurl) no-repeat center center / cover;
  123. border-radius: cmciciavatarcorner;
  124. height: 0;
  125. padding-left: 36px;
  126. padding-top: 36px;
  127. width: 0;
  128. }
  129. }
  130. if (customciciface=="cmsmciciface") {
  131. [data-testid="guidance_panel"] > div:nth-of-type(1) > div::before {
  132. aspect-ratio: 1 / 1;
  133. align-self: center;
  134. background: url(cmcicifaceurl) no-repeat center center / cover;
  135. border-radius: cmciciavatarcorner;
  136. content: "";
  137. display: inline-block;
  138. height: 100%;
  139. margin: auto;
  140. margin-right: 0.5em;
  141. max-height: 256px;
  142. min-height: 100px;
  143. width: auto;
  144. }
  145. [data-testid="chat_siderbar"] img[style="width: 36px; height: 36px;"] {
  146. aspect-ratio: 1 / 1;
  147. background: url(cmcicifaceurl) no-repeat center center / cover;
  148. border-radius: cmciciavatarcorner;
  149. height: 0;
  150. padding-left: 36px;
  151. padding-top: 36px;
  152. width: 0;
  153. }
  154. [data-testid="guidance_panel"] > div:nth-of-type(1) > div {
  155. align-items: center;
  156. }
  157. }
  158. if (customciciface=="nocmciciface") {
  159. [data-testid="guidance_panel"] > div:nth-of-type(1) > div::before {
  160. background: none;
  161. display: none;
  162. }
  163. }
  164.  
  165. /* Custom font size */
  166. .skill-bar-button *,
  167. [data-testid="bot_discover_recommend_list"] *,
  168. [data-testid="carousel-item"] *,
  169. [data-testid="chat_input_input"] *,
  170. [data-testid="guidance_groups_skill_card"] *,
  171. [data-testid="union_message"] *,
  172. textarea {
  173. font-size: fontsize !important;
  174. line-height: 1.5 !important;
  175. text-overflow: initial !important;
  176. }
  177. if chatmode && ouravatarurl {
  178. [data-testid="send_message"] > div:nth-of-type(1)::before {
  179. align-self: center;
  180. aspect-ratio: 1 / 1;
  181. background: url(ouravatarurl) no-repeat center center / cover;
  182. border-radius: 50%;
  183. content: "";
  184. display: inline-flex;
  185. height: 40px;
  186. margin-bottom: auto;
  187. margin-left: .5em;
  188. width: 40px;
  189. }
  190. [data-testid="receive_message"] > div:nth-of-type(1)::before {
  191. align-self: center;
  192. aspect-ratio: 1 / 1;
  193. background: url(cmcicifaceurl) no-repeat center center / cover;
  194. border-radius: 50%;
  195. content: "";
  196. display: inline-flex;
  197. height: 40px;
  198. margin-bottom: auto;
  199. margin-right: .5em;
  200. width: 40px;
  201. }
  202. }
  203. if darkmode {
  204. [data-testid="chat_siderbar"] {
  205. border-right: 1px solid #7e94fe !important;
  206. }
  207. [class*="send-message-box-content-"],
  208. [class*="send-message-box-content-coco-"] {
  209. background: rgba(50, 50, 50, 0.85);
  210. border-radius: 1.5rem;
  211. }
  212. body {
  213. color: #cbcbcb;
  214. }
  215.  
  216. [class*="chat-input-container"] {
  217. box-shadow: rgba(126, 148, 254, 0.2) -2px -2px 2px 2px,
  218. rgba(126, 148, 254, 0.2) -2px 2px 2px 2px,
  219. rgba(0, 87, 255, 0.2) 2px -2px 2px 2px,
  220. rgba(0, 87, 255, 0.2) 2px 2px 2px 2px;
  221. }
  222. [data-testid="create_conversation_button"] svg path,
  223. svg[class*="short-cut-"] path,
  224. svg[class*="short-cut-"] rect {
  225. stroke: #7e94fe;
  226. }
  227. [data-testid="scroll_view"] svg path {
  228. stroke: #cbcbcb;
  229. }
  230. .semi-space svg path {
  231. fill: #cbcbcb;
  232. }
  233. [class*="thread-creation-"] {
  234. color: var(--s-color-brand-primary-default, #7e94fe);
  235. }
  236. [class*="chat-input-"],
  237. [class*="semi-input-textarea-wrapper"],
  238. [data-testid="chat_input_input"] {
  239. background: #2f2f2f !important;
  240. border: 0 !important;
  241. border-radius: 12px !important;
  242. }
  243. [data-testid="chat_input_send_button"]:disabled {
  244. background-color: grey;
  245. }
  246. a[class*="section-item-"]:not([class*="active-"]):hover {
  247. background: rgba(126, 148, 254, 0.2) !important;
  248. }
  249. [class*="to-bottom-button-"] {
  250. background: var(--s-color-bg-tertiary);
  251. }
  252. ::selection {
  253. background: rgba(126, 148, 254, 0.2);
  254. }
  255. /* Dots when Cici is writing */
  256. [data-testid="message_loading"] [class*="dot-flashing-"],
  257. [data-testid="message_loading"] [class*="dot-flashing-"]::after,
  258. [data-testid="message_loading"] [class*="dot-flashing-"]::before {
  259. background-color: rgba(203, 203, 203, 0.8) !important;
  260. color: rgba(203, 203, 203, 0.8) !important;
  261. }
  262. }
  263.  
  264. if widemode {
  265. /* Wide chat */
  266. [style*="--right-side-width: 0px; --center-content-max-width:"] {
  267. --center-content-max-width: 100% !important;
  268. }
  269. /* Cici's face on home page */
  270. @media (max-width: 600px) {
  271. [class*="guidance-view-layout-"] {
  272. display: flex;
  273. flex-direction: column;
  274. height: calc(100vh - 216px);
  275. justify-content: center;
  276. padding: 10px 0;
  277. }
  278. }
  279. /* Full code block */
  280. [class*="code-block-element-"] [class*="code-area-"] [class*="content-"] {
  281. max-height: fit-content !important;
  282. }
  283. [class*="code-block-element-"] [class*="code-area-"] [class*="mask-"] {
  284. background: transparent !important;
  285. }
  286. /* Images sent by us */
  287. [data-testid="message_content"] [class*="container-"] {
  288. margin-left: auto;
  289. }
  290. [data-testid="mdbox_image"] {
  291. border: 1px solid #7e94fe !important;
  292. border-radius: 12px;
  293. }
  294. /* Chat "bubbles" */
  295. [class*="message-box__reverse-"] {
  296. margin-left: auto;
  297. }
  298. [class*="send-message-"] {
  299. display: flex;
  300. justify-content: flex-end;
  301. margin-left: auto;
  302. max-width: 100%;
  303. }
  304. [data-testid="send_message"] [data-testid="message_content"] > div > [data-testid="message_text_content"] {
  305. padding-bottom: 0.625rem !important;
  306. padding-left: 1.25rem !important;
  307. padding-right: 1.25rem !important;
  308. padding-top: 0.625rem !important;
  309. }
  310. [data-testid="send_message"],
  311. [data-testid="receive_message"] {
  312. max-width: 80%;
  313. min-width: 80%;
  314. width: 100%;
  315. }
  316. /* Avatar */
  317. .semi-avatar img {
  318. background-color: transparent !important;
  319. }
  320. [data-testid="chat_header_avatar_button"] {
  321. height: 36px !important;
  322. width: 36px !important;
  323. }
  324. /* Help and comments */
  325. [data-testid="feedback_modal"] > div:nth-of-type(2) > div {
  326. width: 80% !important;
  327. }
  328. }
  329. }
  330.  
  331. @-moz-document url-prefix("http://"), url-prefix("https://") {
  332. /* ========================================================
  333. Browser plugin
  334. ======================================================== */
  335. /* Translated by Cici */
  336. if (customciciface=="cmlgciciface") || (customciciface=="cmsmciciface") {
  337. .__Cici_translate_translated_inject_node__:before {
  338. aspect-ratio: 1 / 1;
  339. background: url(cmcicifaceurl) no-repeat center center / cover;
  340. border-radius: cmciciavatarcorner;
  341. content: "";
  342. display: inline-block;
  343. height: 1em;
  344. margin: auto;
  345. margin-right: .25em;
  346. vertical-align: text-top;
  347. width: 1em;
  348. }
  349. }
  350. if (customciciface=="nocmciciface") {
  351. .__Cici_translate_translated_inject_node__:before {
  352. background: none;
  353. display: none;
  354. }
  355. }
  356. .__Cici_translate_translated_inject_node__ {
  357. box-shadow: rgba(126, 148, 254, 0.2) -2px -2px 2px 2px,
  358. rgba(126, 148, 254, 0.2) -2px 2px 2px 2px,
  359. rgba(0, 87, 255, 0.2) 2px -2px 2px 2px,
  360. rgba(0, 87, 255, 0.2) 2px 2px 2px 2px;
  361. border-radius: 12px;
  362. padding: .25em;
  363. width: fit-content;
  364. }
  365. }