您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

180 行
5.9 KiB

  1. <html>
  2. <head>
  3. <style>
  4. /* Some miscellenous widget manipulation */
  5. .rw-launcher {
  6. -webkit-animation-delay: 0;
  7. -webkit-animation-duration: 0.5s;
  8. -webkit-animation-name: slide-in;
  9. -webkit-animation-fill-mode: forwards;
  10. -moz-animation-delay: 0;
  11. -moz-animation-duration: 0.5s;
  12. -moz-animation-name: slide-in;
  13. -moz-animation-fill-mode: forwards;
  14. animation-delay: 0;
  15. animation-duration: 0.5s;
  16. animation-name: slide-in;
  17. animation-fill-mode: forwards;
  18. display: flex;
  19. align-items: center !important;
  20. justify-content: center;
  21. background-color: white !important;
  22. border: 0 !important;
  23. box-shadow: 0 2px 10px 1px white!important;
  24. height: 125px !important;
  25. margin: 0;
  26. width: 125px !important;
  27. box-sizing:border-box
  28. }
  29. /* Resizing the widget */
  30. .rw-launcher img {
  31. width: 125 !important;
  32. max-height: 125 !important;
  33. object-fit: contain !important;
  34. }
  35. /* Getting rid of the rotation animation of the widget while closing */
  36. .rw-close-launcher {
  37. -webkit-animation-delay: 0;
  38. -webkit-animation-duration: 0s !important;
  39. -webkit-animation-name: rotation-lr !important;
  40. -webkit-animation-fill-mode: forwards;
  41. -moz-animation-delay: 0;
  42. -moz-animation-duration: 0s !important;
  43. -moz-animation-name: rotation-lr !important;
  44. -moz-animation-fill-mode: forwards;
  45. animation-delay: 0;
  46. animation-duration: 0s !important;
  47. animation-name: rotation-lr !important;
  48. animation-fill-mode: forwards;
  49. }
  50. /* Getting rid of the rotation animation of the widget while opening */
  51. .rw-open-launcher {
  52. -webkit-animation-delay: 0;
  53. -webkit-animation-duration: 0.5s;
  54. -webkit-animation-name: rotation-rl;
  55. -webkit-animation-fill-mode: forwards;
  56. -moz-animation-delay: 0;
  57. -moz-animation-duration: .5s;
  58. -moz-animation-name: rotation-rl;
  59. -moz-animation-fill-mode: forwards;
  60. animation-delay: 0;
  61. animation-duration: 0s !important;
  62. animation-name: rotation-rl;
  63. animation-fill-mode: forwards;
  64. }
  65. </style>
  66. </head>
  67. <body>
  68. <style>
  69. /* Background color for the header */
  70. .rw-conversation-container .rw-header{background-color: #233e80;}
  71. /* Correction of the shadow for the chat window */
  72. .rw-conversation-container {
  73. -webkit-animation-delay: 0;
  74. -webkit-animation-duration: .5s;
  75. -webkit-animation-name: slide-in;
  76. -webkit-animation-fill-mode: forwards;
  77. -moz-animation-delay: 0;
  78. -moz-animation-duration: .5s;
  79. -moz-animation-name: slide-in;
  80. -moz-animation-fill-mode: forwards;
  81. animation-delay: 0;
  82. animation-duration: .5s;
  83. animation-name: slide-in;
  84. animation-fill-mode: forwards;
  85. border-radius: 10px;
  86. box-shadow: 0px -20px 12px 0px hsl(0deg 14% 89% / 0%), inset 4px -7px 3.7px -1px rgb(0 0 0 / 7%), 0 5px 7px -1px hsl(0deg 0% 0% / 9%), 2px -8px 12.5px -1px rgb(84 25 25 / 10%), 2px -6px 23.4px 0px rgb(255 0 0 / 12%), inset -3px -5px 56px 0px rgb(237 0 0 / 17%);
  87. overflow: hidden;
  88. width: 370px;
  89. }
  90. /* Resizing avatar (to the left of replies) */
  91. .rw-conversation-container .rw-avatar {
  92. width: 55px;
  93. height: 55px;
  94. border-radius: 100%;
  95. margin-right: -3px;
  96. /* position: relative; */
  97. bottom: 0px;
  98. }
  99. /* Positioning the avatar to the left of replies rather than at the top*/
  100. .rw-conversation-container .rw-message {
  101. margin: 10px;
  102. font-size: 16px;
  103. line-height: 20px;
  104. display: flex;
  105. font-family: Inter,sans-serif;
  106. flex-wrap: unset !important;
  107. position: relative;
  108. }
  109. /* Header avatar resizing */
  110. .rw-conversation-container .rw-header .rw-avatar {
  111. all: initial;
  112. height: 57px;
  113. width: 57px;
  114. position: absolute;
  115. top: 4px;
  116. left: 0px;
  117. }
  118. /* Color box for buttons (payload) */
  119. .rw-conversation-container .rw-reply {
  120. -webkit-transition: box-shadow .3s ease,top .3s ease;
  121. -moz-transition: box-shadow .3s ease,top .3s ease;
  122. -o-transition: box-shadow .3s ease,top .3s ease;
  123. transition: box-shadow .3s ease,top .3s ease;
  124. display: -webkit-box;
  125. display: -webkit-flex;
  126. display: -moz-box;
  127. display: -ms-flexbox;
  128. display: flex;
  129. -webkit-flex-align: center;
  130. -ms-flex-align: center;
  131. -webkit-align-items: center;
  132. align-items: center;
  133. background-color: #fafafa;
  134. border: 1px solid #135afe;
  135. border-radius: 15px;
  136. color: #233e80;
  137. padding: 4px 8px;
  138. max-width: 215px;
  139. min-height: 1.7em;
  140. font-weight: 500;
  141. text-align: center;
  142. font-family: Inter,sans-serif;
  143. cursor: pointer;
  144. margin: 0.25em;
  145. text-decoration: unset;
  146. box-shadow: unset !important/*0 .2px .7px -7pxrgba(0,0,0,.277),0 .5px 1.8px -7pxrgba(0,0,0,.369),0 1.2px 3.8px -7pxrgba(0,0,0,.442),0 4px 13px -7pxrgba(0,0,0,.64);*/
  147. }
  148. </style>
  149. <script>!(function () {
  150. let e = document.createElement("script"),
  151. t = document.head || document.getElementsByTagName("head")[0];
  152. (e.src =
  153. "https://cdn.jsdelivr.net/npm/rasa-webchat@1.x.x/lib/index.js"),
  154. // Replace 1.x.x with the version that you want
  155. (e.async = !0),
  156. (e.onload = () => {
  157. window.localStorage.clear()
  158. window.WebChat.default(
  159. {
  160. initPayload: '/greet',
  161. customData: { language: "en" },
  162. socketUrl: "http://localhost:5005",
  163. profileAvatar: "./assets/bot_widget-removebg-preview.png",
  164. openLauncherImage: "./assets/robo_small.gif",
  165. closeImage: "./assets/robo_small.gif",
  166. title: "PM-KUSUM",
  167. inputTextFieldHint: "Start a conversation",
  168. connectingText: 'Waiting for server...',
  169. showCloseButton: true
  170. // add other props here
  171. },
  172. null
  173. );
  174. }),
  175. t.insertBefore(e, t.firstChild);
  176. })();
  177. </script>
  178. </body>
  179. </html>