app.css 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  1. .pywebio {
  2. min-height: 100vh;
  3. padding-top: 20px;
  4. padding-bottom: 1px; /* if set 0, safari has min-height issue */
  5. }
  6. .markdown-body hr {
  7. height: 2px;
  8. padding: 0;
  9. margin: 24px 0;
  10. background-color: #eaecef;
  11. border: 0;
  12. }
  13. .container {
  14. margin-top: 0;
  15. max-width: 880px;
  16. }
  17. #input-cards{
  18. max-width: 880px;
  19. }
  20. #output-container {
  21. -webkit-font-smoothing: antialiased;
  22. margin-bottom: 20px;
  23. }
  24. #input-container h5.card-header {
  25. padding: .4rem 1.25rem;
  26. }
  27. #input-container {
  28. z-index: 100;
  29. background: white;
  30. position: static;
  31. height: fit-content;
  32. box-shadow: none;
  33. margin-top: 0;
  34. margin-bottom: 40px; /* must equal #input-container.fixed padding-bottom */
  35. }
  36. #input-container.fixed {
  37. position: fixed !important;
  38. overflow: visible;
  39. bottom: 0;
  40. left: 0;
  41. right: 0;
  42. height: 0;
  43. box-shadow: 0 0 12px 1px rgba(80, 80, 80, 0.2);
  44. margin-bottom: 0;
  45. padding: 40px 0; /* must equal #input-container margin-bottom */
  46. }
  47. #input-container .card {
  48. margin: 0 auto;
  49. }
  50. .footer {
  51. height: 50px;
  52. text-align: center;
  53. color: gray;
  54. background-color: #efefef;
  55. line-height: 50px; /*设置line-height与父级元素的height相等, 以实现垂直居中*/
  56. margin: 0 auto;
  57. }
  58. .footer hr {
  59. margin-bottom: 0.5rem;
  60. }
  61. .footer a:visited {
  62. color: #9B59B6;
  63. }
  64. .footer a {
  65. color: #2980B9;
  66. text-decoration: none;
  67. cursor: pointer;
  68. }
  69. #title {
  70. text-align: center;
  71. position: absolute;
  72. left: 50%;
  73. transform: translateX(-50%);
  74. white-space: nowrap;
  75. }
  76. /* Amend markdown style */
  77. .markdown-body {
  78. font-family: inherit;
  79. color: inherit;
  80. }
  81. .markdown-body blockquote, .markdown-body dl, .markdown-body ol, .markdown-body p, .markdown-body pre, .markdown-body table, .markdown-body ul, .markdown-body details {
  82. margin-bottom: 10px;
  83. }
  84. .CodeMirror {
  85. font-size: 13px
  86. }
  87. h5.card-header:empty {
  88. padding: 0 !important;
  89. border-bottom: 0 !important;
  90. }
  91. button {
  92. margin-bottom: 8px;
  93. }
  94. td blockquote, td dl, td ol, td p, td pre, td table, td ul, td button, td pre {
  95. margin-bottom: 0 !important;
  96. }
  97. .input-container .form-group {
  98. margin-bottom: 0;
  99. }
  100. img {
  101. -webkit-animation-name: image-load-in;
  102. animation-name: image-load-in;
  103. -webkit-animation-duration: .6s;
  104. animation-duration: .6s
  105. }
  106. .no-animation img {
  107. -webkit-animation-name: none;
  108. animation-name: none
  109. }
  110. @-webkit-keyframes image-load-in {
  111. 0% {
  112. -webkit-filter: blur(8px);
  113. filter: blur(8px);
  114. opacity: 0
  115. }
  116. 100% {
  117. -webkit-filter: blur(0);
  118. filter: blur(0);
  119. opacity: 1
  120. }
  121. }
  122. @keyframes image-load-in {
  123. 0% {
  124. -webkit-filter: blur(8px);
  125. filter: blur(8px);
  126. opacity: 0
  127. }
  128. 100% {
  129. -webkit-filter: blur(0);
  130. filter: blur(0);
  131. opacity: 1
  132. }
  133. }
  134. .custom-file {
  135. margin-bottom: 8px;
  136. }
  137. summary:focus {
  138. outline: none;
  139. }
  140. details {
  141. border: 1px solid rgba(0,0,0,.125);
  142. border-radius: 4px;
  143. padding: .5em .5em 0;
  144. }
  145. summary {
  146. /*font-weight: bold;*/
  147. margin: -.5em -.5em 0;
  148. padding: .5em;
  149. background-color: rgba(0,0,0,.03);
  150. }
  151. details[open] {
  152. padding: .5em;
  153. }
  154. details[open]>summary {
  155. border-bottom: 1px solid rgba(0,0,0,.125);
  156. margin-bottom: .5em;
  157. }
  158. .actions-result {
  159. display: inline-block;
  160. font-weight: 400;
  161. color: #212529;
  162. text-align: center;
  163. vertical-align: middle;
  164. padding: .375rem .75rem;
  165. font-size: 1rem;
  166. line-height: 1.5;
  167. margin-bottom: 8px;
  168. }
  169. .hide{
  170. display: none;
  171. }
  172. .single-input-action-btn{
  173. border-top-right-radius: 0.25rem!important;
  174. border-bottom-right-radius: 0.25rem!important;
  175. }
  176. .alert-success > a {
  177. color: #0b2e13;
  178. }
  179. .alert-danger > a {
  180. color: #491217;
  181. }
  182. .alert-warning > a {
  183. color: #533f03;
  184. }
  185. .alert-info > a {
  186. color: #062c33;
  187. }
  188. .alert > a {
  189. font-weight: 700;
  190. }
  191. /*Tabs widget style*/
  192. /*Credit: https://themes.gohugo.io/theme/hugo-book/docs/shortcodes/tabs/ Licensed by MIT */
  193. .webio-tabs {
  194. margin-top: 1rem;
  195. margin-bottom: 1rem;
  196. border: 1px solid #e9ecef;
  197. border-radius: .25rem;
  198. display: flex;
  199. flex-wrap: wrap;
  200. align-content: flex-start;
  201. }
  202. .webio-tabs > label {
  203. display: inline-block;
  204. padding: .5rem 1rem;
  205. border-bottom: 1px transparent;
  206. cursor: pointer;
  207. margin-bottom: 0!important;
  208. }
  209. .webio-tabs > label:hover {
  210. background-color: #e9ecef;
  211. }
  212. .webio-tabs > .webio-tabs-content {
  213. order: 999;
  214. width: 100%;
  215. border-top: 1px solid #f5f5f5;
  216. padding: 1rem;
  217. display: none
  218. }
  219. .webio-tabs > input[type=radio]:checked + label {
  220. border-bottom: 2px solid #0055bb
  221. }
  222. .webio-tabs > input[type=radio]:checked + label + .webio-tabs-content {
  223. display: block
  224. }
  225. .webio-tabs > input.toggle {
  226. height: 0;
  227. width: 0;
  228. overflow: hidden;
  229. opacity: 0;
  230. position: absolute;
  231. }
  232. .webio-tabs > [type=radio] {
  233. box-sizing: border-box;
  234. padding: 0;
  235. }
  236. /*End of Tabs widget*/
  237. .custom-file-label > span {
  238. overflow: hidden;
  239. width: calc(100% - 6ch - 0.75rem) !important; /* 6ch is for "Browse", 0.75rem is for the padding of "Browse" button */
  240. text-overflow: ellipsis;
  241. white-space: nowrap;
  242. display: inline-block !important;
  243. }
  244. .CodeMirror-fullscreen {
  245. position: fixed;
  246. top: 0; left: 0; right: 0; bottom: 0;
  247. height: auto;
  248. z-index: 9;
  249. }
  250. .pywebio-clickable{
  251. cursor: pointer;
  252. }
  253. /* scrollable widget */
  254. .webio-scrollable{
  255. overflow: auto;
  256. margin-bottom: 10px;
  257. }
  258. .webio-scrollable.scrollable-border{
  259. padding: 10px;
  260. border: 1px solid rgba(0,0,0,.125);
  261. box-shadow: inset 0 0 2px 0 rgba(0,0,0,.1);
  262. }
  263. /* dark theme */
  264. .webio-theme-dark #input-container {
  265. background: #0d1117;
  266. }
  267. .webio-theme-dark #input-container.fixed {
  268. box-shadow: 0px 0px 8px 5px rgb(0 0 0);
  269. }
  270. .webio-theme-dark .footer {
  271. background-color: #0d1117;
  272. border-top: 1px solid #30363d;
  273. }
  274. .webio-theme-dark .webio-tabs {
  275. border: 1px solid #343a40;
  276. }
  277. .webio-theme-dark .webio-tabs > .webio-tabs-content {
  278. border-top: 1px solid #343a40;
  279. }
  280. .webio-theme-dark .webio-tabs > label:hover {
  281. background-color: #000;
  282. }
  283. .webio-theme-dark .webio-tabs > input[type=radio]:checked + label {
  284. border-bottom: 2px solid #0040a1;
  285. }
  286. .webio-theme-dark .scrollable-border{
  287. border: 1px solid #343a40;
  288. }
  289. .webio-theme-dark details{
  290. border: 1px solid #343a40;
  291. }
  292. .webio-theme-dark details>summary{
  293. background-color: #191d21;
  294. }
  295. .webio-theme-dark details[open]>summary{
  296. border-bottom: 1px solid #343a40;
  297. }
  298. /* dark theme end */
  299. /* For range input */
  300. .form-control-range {
  301. display:inline;
  302. width:calc(100% - 40px);
  303. }
  304. .form-control-range-value{
  305. display: inline-block;
  306. max-width: 35px;
  307. white-space: nowrap;
  308. color: #6c757d;
  309. line-height: 14px;
  310. vertical-align: text-top;
  311. }