flex_06-ref.rml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <rml>
  2. <head>
  3. <title>Flex 06 - Player list</title>
  4. <link type="text/rcss" href="../../style.rcss"/>
  5. <meta name="Reference" content="The reference is also implemented using flexbox. However, the header and footer is explicitly set to 'flex: none', so that their size is always fixed. The player list uses 'flex: 1' so that it expands to the remaining available space. Being explicit like here is generally recommended practice, since it may avoid unnecessary content-based sizing which can impact performance." />
  6. <style>
  7. body {
  8. box-sizing: border-box;
  9. height: 50%;
  10. top: 20%;
  11. left: 55%;
  12. min-width: 450dp;
  13. min-height: 250dp;
  14. padding: 30dp 0 0 0;
  15. border: 1px #a0a0a0;
  16. }
  17. scrollbarvertical sliderbar, scrollbarvertical slidertrack {
  18. border-width: 0;
  19. }
  20. handle#title {
  21. width: auto;
  22. height: auto;
  23. display: block;
  24. top: 0;
  25. right: 0;
  26. left: 0;
  27. bottom: auto;
  28. cursor: move;
  29. background-color: #a0a0a0;
  30. padding: 5dp 20dp;
  31. font-weight: bold;
  32. font-size: 1.25em;
  33. }
  34. handle#resizer {
  35. width: 12dp;
  36. height: 12dp;
  37. background: #a0a0a0;
  38. }
  39. input.text {
  40. box-sizing: border-box;
  41. width: 100%;
  42. padding: 10dp;
  43. border: 1dp #bbb;
  44. border-radius: 3dp;
  45. font-size: 1.1em;
  46. line-height: 1.4;
  47. cursor: text;
  48. }
  49. #contents {
  50. display: flex;
  51. flex-direction: column;
  52. box-sizing: border-box;
  53. height: 100%;
  54. padding: 20dp;
  55. }
  56. #panel_info {
  57. flex: none;
  58. display: flex;
  59. justify-content: space-between;
  60. font-size: .95em;
  61. }
  62. #players {
  63. flex: 1;
  64. margin: 15dp 0;
  65. overflow: auto;
  66. border: 1px #bbb;
  67. }
  68. #footer {
  69. flex: none;
  70. }
  71. table thead tr {
  72. font-weight: bold;
  73. padding-bottom: 1dp;
  74. }
  75. table td {
  76. padding: 14dp 4dp;
  77. }
  78. table td.data_column {
  79. width: 70dp;
  80. text-align: center;
  81. }
  82. table tbody td.data_column {
  83. font-size: .9em;
  84. }
  85. table td.tag_column {
  86. width: 90dp;
  87. }
  88. </style>
  89. </head>
  90. <body>
  91. <handle id="title" move_target="#document">Player List</handle>
  92. <div id="contents">
  93. <div id="panel_info">
  94. <div>Server: Europe #56763</div>
  95. <div>Players: 99</div>
  96. </div>
  97. <div id="players">
  98. <table>
  99. <thead>
  100. <tr>
  101. <td class="data_column">ID</td>
  102. <td class="tag_column">Player Tag</td>
  103. <td></td>
  104. <td class="data_column">Ping</td>
  105. <td class="data_column">Score</td>
  106. </tr>
  107. </thead>
  108. <tbody>
  109. <tr>
  110. <td class="data_column">10</td>
  111. <td>tag</td>
  112. <td>Player name</td>
  113. <td class="data_column">55 ms</td>
  114. <td class="data_column">108</td>
  115. </tr>
  116. <tr>
  117. <td class="data_column">11</td>
  118. <td>tag</td>
  119. <td>Player name</td>
  120. <td class="data_column">55 ms</td>
  121. <td class="data_column">108</td>
  122. </tr>
  123. <tr>
  124. <td class="data_column">12</td>
  125. <td>tag</td>
  126. <td>Player name</td>
  127. <td class="data_column">55 ms</td>
  128. <td class="data_column">108</td>
  129. </tr>
  130. <tr>
  131. <td class="data_column">13</td>
  132. <td>tag</td>
  133. <td>Player name</td>
  134. <td class="data_column">55 ms</td>
  135. <td class="data_column">108</td>
  136. </tr>
  137. <tr>
  138. <td class="data_column">14</td>
  139. <td>tag</td>
  140. <td>Player name</td>
  141. <td class="data_column">55 ms</td>
  142. <td class="data_column">108</td>
  143. </tr>
  144. <tr>
  145. <td class="data_column">15</td>
  146. <td>tag</td>
  147. <td>Player name</td>
  148. <td class="data_column">55 ms</td>
  149. <td class="data_column">108</td>
  150. </tr>
  151. <tr>
  152. <td class="data_column">16</td>
  153. <td>tag</td>
  154. <td>Player name</td>
  155. <td class="data_column">55 ms</td>
  156. <td class="data_column">108</td>
  157. </tr>
  158. <tr>
  159. <td class="data_column">17</td>
  160. <td>tag</td>
  161. <td>Player name</td>
  162. <td class="data_column">55 ms</td>
  163. <td class="data_column">108</td>
  164. </tr>
  165. <tr>
  166. <td class="data_column">18</td>
  167. <td>tag</td>
  168. <td>Player name</td>
  169. <td class="data_column">55 ms</td>
  170. <td class="data_column">108</td>
  171. </tr>
  172. <tr>
  173. <td class="data_column">19</td>
  174. <td>tag</td>
  175. <td>Player name</td>
  176. <td class="data_column">55 ms</td>
  177. <td class="data_column">108</td>
  178. </tr>
  179. <tr>
  180. <td class="data_column">20</td>
  181. <td>tag</td>
  182. <td>Player name</td>
  183. <td class="data_column">55 ms</td>
  184. <td class="data_column">108</td>
  185. </tr>
  186. </tbody>
  187. </table>
  188. </div>
  189. <div id="footer">
  190. <input type="text"/>
  191. </div>
  192. </div>
  193. <handle size_target="#document" id="resizer"/>
  194. </body>
  195. </rml>