navbar.html 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370
  1. <style>
  2. nav-bar {
  3. position: absolute;
  4. height: 48px;
  5. width: 100%;
  6. bottom: 10px;
  7. display: flex;
  8. justify-content: center;
  9. }
  10. nav-bar .nav-container {
  11. display: flex;
  12. flex-direction: row;
  13. margin: 0 10px;
  14. height: 100%;
  15. width: 100%;
  16. justify-content: center;
  17. }
  18. nav-bar .animation-control {
  19. background-color: rgba(91, 93, 107, .75);
  20. display: flex;
  21. flex-direction: row;
  22. height: 100%;
  23. width: 100%;
  24. max-width: 1280px;
  25. justify-content: center;
  26. }
  27. nav-bar .flex-container {
  28. display: flex;
  29. flex-direction: row;
  30. justify-content: center;
  31. height: 100%;
  32. width: 100%;
  33. }
  34. nav-bar button {
  35. background: none;
  36. border: none;
  37. color: white;
  38. margin: 0;
  39. padding: 0;
  40. height: 100%;
  41. min-width: 48px;
  42. cursor: pointer;
  43. }
  44. nav-bar button:hover,
  45. nav-bar button:active,
  46. nav-bar button:focus {
  47. background: none;
  48. border: none;
  49. outline: none;
  50. }
  51. nav-bar button:hover {
  52. background-color: rgba(22, 24, 26, .20);
  53. }
  54. nav-bar .control-text {
  55. font-family: "Segoe UI";
  56. font-size: 12px;
  57. font-weight: 400;
  58. pointer-events: none;
  59. }
  60. nav-bar img,
  61. nav-bar .icon {
  62. pointer-events: none;
  63. }
  64. .logo-button {
  65. display: flex;
  66. align-items: center;
  67. flex-direction: row;
  68. justify-content: center;
  69. background-color: rgba(91, 93, 107, .75);
  70. height: 48px;
  71. min-width: 48px;
  72. margin-right: 4px;
  73. }
  74. .logo-button img {
  75. height: 20px;
  76. width: 20px;
  77. }
  78. .types {
  79. display: flex;
  80. flex-direction: column;
  81. width: 48px;
  82. }
  83. .types .flex-container,
  84. .speed .flex-container {
  85. align-items: center;
  86. }
  87. .menu-options {
  88. position: absolute;
  89. bottom: 48px;
  90. width: 48px;
  91. background-color: rgba(22, 24, 26, .90);
  92. }
  93. .logo-button,
  94. .animation-label,
  95. .types-icon,
  96. .help,
  97. .speed {
  98. display: none;
  99. }
  100. .types-icon:after {
  101. font-size: 16px;
  102. content: "\F6BE";
  103. }
  104. .up-icon:after {
  105. font-size: 12px;
  106. content: "\E70E";
  107. }
  108. .play-icon:after {
  109. font-size: 16px;
  110. content: "\E768";
  111. }
  112. .pause-icon:after {
  113. font-size: 16px;
  114. content: "\E769";
  115. }
  116. .fullscreen-icon:after {
  117. font-size: 16px;
  118. content: "\E740";
  119. }
  120. .help-icon:after {
  121. /* TODO: wrong Icon, need font update */
  122. font-size: 16px;
  123. content: "\F70C";
  124. }
  125. .progress-control {
  126. display: flex;
  127. flex: 1;
  128. position: relative;
  129. overflow: hidden;
  130. cursor: pointer;
  131. }
  132. .progress-bar-container {
  133. position: relative;
  134. overflow: hidden;
  135. }
  136. .progress-bar {
  137. align-self: center;
  138. flex: 1;
  139. background-color: rgb(255, 255, 255);
  140. height: 2px;
  141. position: absolute;
  142. width: 100%;
  143. right: 0;
  144. pointer-events: none;
  145. }
  146. .animation-number {
  147. margin: 0 6px;
  148. }
  149. .speed-text {
  150. margin-right: 6px;
  151. }
  152. .progress-wrapper {
  153. height: 0px;
  154. background-color: rgba(91, 93, 107, .75);
  155. width: 100%;
  156. border-top: 2px solid rgba(204, 210, 214, .4);
  157. }
  158. .progress-circle {
  159. width: 12px;
  160. height: 12px;
  161. border: 2px solid rgb(255, 255, 255);
  162. border-radius: 50%;
  163. background-color: rgb(91, 93, 107);
  164. cursor: pointer;
  165. position: relative;
  166. bottom: 10px;
  167. pointer-events: none;
  168. }
  169. .default-control {
  170. display: flex;
  171. flex-direction: row;
  172. height: 100%;
  173. background-color: rgba(91, 93, 107, .75);
  174. }
  175. .menu-options button {
  176. width: 100%;
  177. height: 48px;
  178. color: rgb(142, 147, 155);
  179. }
  180. .menu-options button {
  181. width: 100%;
  182. height: 48px;
  183. color: rgb(142, 147, 155);
  184. }
  185. .menu-options button:hover {
  186. background-color: transparent;
  187. color: rgb(255, 255, 255);
  188. }
  189. .menu-options .animation-number {
  190. margin: 0 18px 0 6px;
  191. }
  192. .menu-options .speed-text {
  193. margin-right: 18px;
  194. }
  195. .menu-options {
  196. visibility: hidden;
  197. }
  198. .open .menu-options {
  199. visibility: visible;
  200. }
  201. @media screen and (min-width: 540px) {
  202. .help,
  203. .types-icon,
  204. .speed {
  205. display: inline-block;
  206. }
  207. .logo-button {
  208. display: flex;
  209. }
  210. .types {
  211. width: 84px;
  212. }
  213. .progress-bar-container {
  214. margin: 0 12px;
  215. }
  216. .types .menu-options {
  217. width: 84px;
  218. }
  219. .speed {
  220. width: 64px;
  221. }
  222. .speed .menu-options {
  223. width: 64px;
  224. }
  225. }
  226. @media screen and (min-width: 1024px) {
  227. .animation-label {
  228. display: block;
  229. margin-left: 6px;
  230. }
  231. .progress-bar-container {
  232. margin: 0 12px;
  233. }
  234. .types {
  235. width: 144px;
  236. }
  237. .types .menu-options {
  238. width: 144px;
  239. }
  240. }
  241. </style>
  242. {{#if (or (not animations) hideAnimations)}} {{#if hideLogo}}
  243. <style>
  244. nav-bar .nav-container {
  245. justify-content: flex-end;
  246. }
  247. </style>
  248. {{else}}
  249. <style>
  250. nav-bar .nav-container {
  251. justify-content: space-between;
  252. }
  253. </style>
  254. {{/if}} {{/if}}
  255. <div class="nav-container" id="navbar-control">
  256. {{#unless hideLogo}}
  257. <div class="logo-button" title="{{logoText}}">
  258. <img src="{{logoImg}}">
  259. </div>
  260. {{/unless}} {{#unless (or (not animations) hideAnimations)}}
  261. <div class="animation-control">
  262. <div class="types">
  263. <button class="flex-container" id="types-button">
  264. <span class="icon types-icon"></span>
  265. <span class="control-text animation-label">Animation</span>
  266. <span class="control-text animation-number">{{selectedAnimation}}</span>
  267. {{#if (gt (count animations) 1)}}
  268. <span class="icon up-icon"></span>
  269. {{/if}}
  270. </button>
  271. <div class="menu-options">
  272. {{#each animations}} {{#unless (eq ../selectedAnimation (add @index 1))}}
  273. <button class="flex-container" id="label-option-button" data-value="{{this}}">
  274. <span class="icon types-icon"></span>
  275. <span class="control-text animation-label">Animation</span>
  276. <span class="control-text animation-number">{{add @index 1}}</span>
  277. </button>
  278. {{/unless}} {{/each}}
  279. </div>
  280. </div>
  281. <div class="progress-control" id="progress-control">
  282. <button class="play-pause" id="play-pause-button">
  283. {{#if paused}}
  284. <span class="icon play-icon"></span>
  285. {{else}}
  286. <span class="icon pause-icon"></span>
  287. {{/if}}
  288. </button>
  289. <div class="progress-bar-container flex-container" id="progress-bar-container">
  290. <div class="progress-bar">
  291. <div class="progress-wrapper" id="progress-wrapper">
  292. <div class="progress-circle" id="progress-circle"></div>
  293. </div>
  294. </div>
  295. </div>
  296. </div>
  297. <div class="speed">
  298. <button class="flex-container" id="speed-button">
  299. <span class="control-text speed-text">{{selectedSpeed}}</span>
  300. <span class="icon up-icon"></span>
  301. </button>
  302. <div class="menu-options">
  303. {{#eachInMap speedList}} {{#unless (eq ../selectedSpeed id)}}
  304. <button class="flex-container" id="speed-option-button" data-value="{{value}}">
  305. <span class="control-text speed-text">{{id}}</span>
  306. </button>
  307. {{/unless}} {{/eachInMap}}
  308. </div>
  309. </div>
  310. </div>
  311. {{/unless}}
  312. <div class="default-control">
  313. {{#unless hideHelp}}
  314. <button class="help" id="help-button" title="Help">
  315. <span class="icon help-icon"></span>
  316. </button>
  317. {{/unless}} {{#unless hideFullScreen}}
  318. <button class="fullscreen" id="fullscreen-button" title="Fullscreen">
  319. <span class="icon fullscreen-icon"></span>
  320. </button>
  321. {{/unless}}
  322. </div>
  323. </div>