index.html 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <!DOCTYPE html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  4. <title>化学</title>
  5. <script type="text/javascript" src="/js/jquery.min.js"></script>
  6. <link rel="stylesheet" href="/css/bootstrap.min.css">
  7. <script type="text/javascript" src="/js/bootstrap.min.js"></script>
  8. <link rel="stylesheet" href="/css/style.css">
  9. <link rel="preconnect" href="https://fonts.googleapis.com">
  10. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  11. <link href="https://fonts.googleapis.com/css2?family=Anonymous+Pro:ital,wght@0,400;0,700;1,400;1,700
  12. &family=Noto+Serif+SC:wght@300;400;500;600;700&display=swap" rel="stylesheet">
  13. <style>
  14. .well {
  15. padding: 10px;
  16. border: 1px solid rgb(173, 173, 173);
  17. background-color: #f5f5f5;
  18. margin-top: 5px;
  19. min-height: 160px;
  20. border-radius: 5px;
  21. width: 100%;
  22. overflow-x: auto;
  23. overflow-y: auto;
  24. }
  25. pre {
  26. overflow-x: auto;
  27. overflow-y: auto;
  28. white-space: pre-wrap;
  29. }
  30. .btn-default:focus,
  31. .btn-default:focus-visible,
  32. .btn-default:focus-within,
  33. .btn-default:active:focus {
  34. outline: none;
  35. }
  36. .btn.disabled {
  37. cursor: default;
  38. pointer-events: none;
  39. z-index: 0;
  40. }
  41. .text-muted a {
  42. color: rgb(173, 173, 173);
  43. }
  44. a {
  45. transition-duration: 300ms;
  46. }
  47. /*
  48. a:hover {
  49. box-shadow: inset 1px 1px 6px rgba(59, 86, 100, 0.3);
  50. } */
  51. .label {
  52. padding: .2em .4em .2em;
  53. font-family: 'Courier New';
  54. display: inline-block;
  55. transform: translateY(-2px);
  56. }
  57. .MathJax {
  58. color: midnightblue;
  59. }
  60. .result {
  61. color: slategrey;
  62. border-bottom: 1px solid;
  63. border-image: linear-gradient(to right, transparent, rgba(143, 65, 233, 0.5), #578aef, transparent) 1;
  64. }
  65. .result:hover {
  66. background-color: rgba(159, 186, 200, 0.1);
  67. }
  68. .glyphicon-share-alt {
  69. transform: rotateX(180deg);
  70. }
  71. .btn {
  72. height: 34px;
  73. }
  74. .addInput {
  75. margin-top: -1px;
  76. }
  77. .addInput:not(:last-child)>:is(span, input) {
  78. border-radius: 0;
  79. }
  80. .addInput>:is(span, input, textarea) {
  81. border-top-left-radius: 0;
  82. border-top-right-radius: 0;
  83. }
  84. </style>
  85. <script id="MathJax-script" src="https://cdn.bootcss.com/mathjax/3.2.0/es5/tex-chtml.js"></script>
  86. <script src="/js/chem.js"></script>
  87. </head>
  88. <body>
  89. <div class="row">
  90. <div class="col-lg-2 col-md-2 col-xs-12">
  91. <a class="btn btn-info" href="/"><i class="glyphicon glyphicon-home" aria-hidden="true"></i>&nbsp;返回</a>
  92. <hr>
  93. <button type="button" class="btn btn-default btn-warning active" data-toggle="button" onclick="$(this).toggleClass('btn-warning');preview=!preview" id="preview" title="性能降低时关闭"><span class="glyphicon glyphicon-cog"></span> 实时预览</button>
  94. <hr>
  95. <p>小提示:<br><code>&lt;e+&gt;</code>、<code>&lt;2e-&gt;</code> 用于标注电荷,<code>.</code> 用于代替水合物等中间的点。输入 ! 快速查询并导入结果。</p>
  96. </div>
  97. <div class="col-lg-8 col-md-10 col-xs-12">
  98. <h2>化学小工具
  99. <div class="btn-group" data-toggle="buttons">
  100. <label class="btn btn-default active" onclick="setBal()">
  101. <input type="radio"> 配平
  102. </label>
  103. <label class="btn btn-default" onclick="setWeigh()">
  104. <input type="radio"> 相对质量
  105. </label>
  106. </div>
  107. <button type="button" class="btn btn-default" style="display: none;" data-toggle="button" onclick="$(this).toggleClass('btn-info');precise=!precise;input()" id="precise"><span class="glyphicon glyphicon-cog"></span> 高精度</button>
  108. <a class="btn btn-default" href="/chemist">
  109. <span class="glyphicon glyphicon-link"></span> 配平接口
  110. </a>
  111. </h2>
  112. <div class="input-group">
  113. <input id="balInput" type="text" class="form-control" oninput="input()" autocomplete="off">
  114. <span class="input-group-btn">
  115. <button type="button" class="btn btn-default" onclick="balance()" id="balBtn">配平</button>
  116. </span>
  117. </div>
  118. <hr>
  119. <div class="well frame">
  120. </div>
  121. <hr>
  122. <h2>数据库
  123. <div class="btn-group" data-toggle="buttons">
  124. <label class="btn btn-default active" onclick="setQryEq()">
  125. <input type="radio"> 查询
  126. </label>
  127. <label class="btn btn-default" onclick="setAddEq()">
  128. <input type="radio"> 上传
  129. </label>
  130. <label class="btn btn-default" onclick="setUpdEq()">
  131. <input type="radio"> 修改
  132. </label>
  133. </div>
  134. <button type="button" class="btn btn-default" style="display: none;" data-toggle="button" onclick="$(this).toggleClass('btn-info');strict=!strict;toggl('查询方程式 <span class=\'glyphicon glyphicon-search\'></span>', 0, strict);input()" id="strict"><span class="glyphicon glyphicon-cog"></span> 限制等号左右</button>
  135. <button type="button" class="btn btn-default" style="display: none;" data-toggle="button" onclick="$(this).toggleClass('btn-info');qryToggleMatch()" id="qryMatch"><span class="glyphicon glyphicon-cog"></span> 匹配分子</button>
  136. </h2>
  137. <div class="input-group">
  138. <input style="border-bottom-left-radius: 0;" id="qryInput" type="text" class="form-control qryInput" autocomplete="off" oninput="input2()">
  139. <span class="input-group-addon qryInputHidable" style="display:none">=</span>
  140. <input id="qryInput2" type="text" class="form-control qryInput qryInputHidable" style="display:none" autocomplete="off" oninput="input2()">
  141. <span class="input-group-btn">
  142. <button style="border-bottom-right-radius: 0;" type="button" class="btn btn-default" onclick="query()" id="qryBtn">查询方程式</button>
  143. </span>
  144. </div>
  145. <div>
  146. <span class="input-group addInput" id="addId"><span class="input-group-addon">id</span>
  147. <input type="text" class="form-control" id="addIdText" oninput="inputId()" autocomplete="off" placeholder="输入 id">
  148. </span>
  149. <span class="input-group addInput">
  150. <span class="input-group-addon">反应条件</span>
  151. <input id="addCondition" type="text" class="form-control" autocomplete="off" placeholder="加热;高温;点燃;通电;光照;MnO2">
  152. </span>
  153. <span class="input-group addInput">
  154. <span class="input-group-addon">描述</span>
  155. <textarea id="addDescription" type="text" class="form-control" autocomplete="off" style="resize:vertical"></textarea>
  156. </span>
  157. </div>
  158. <pre class="ok" style="font-family: Chalkduster,Consolas;top: -1px;position: relative;border-top-left-radius: 0;border-top-right-radius: 0;"></pre>
  159. <hr>
  160. <div class="well frame">
  161. <span id="qryInputRender"></span>
  162. </div>
  163. </div>
  164. <div class="col-lg-2 col-md-12 col-xs-12">
  165. <img class="img-responsive" src="2.png">
  166. </div>
  167. </div>
  168. </body>