navbar.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  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. line-height: 16px;
  106. font-size: 12px;
  107. content: "\E70E";
  108. }
  109. .play-icon:after {
  110. font-size: 16px;
  111. content: "\E768";
  112. }
  113. .pause-icon:after {
  114. font-size: 16px;
  115. content: "\E769";
  116. }
  117. .fullscreen-icon:after {
  118. font-size: 16px;
  119. content: "\E740";
  120. }
  121. .help-icon:after {
  122. /* TODO: wrong Icon, need font update */
  123. font-size: 16px;
  124. content: "\F70C";
  125. }
  126. .progress-control {
  127. display: flex;
  128. flex: 1;
  129. position: relative;
  130. overflow: hidden;
  131. cursor: pointer;
  132. }
  133. .animation-number {
  134. margin: 0 6px;
  135. }
  136. .speed-text {
  137. margin-right: 6px;
  138. }
  139. .progress-circle {
  140. width: 12px;
  141. height: 12px;
  142. border: 2px solid rgb(255, 255, 255);
  143. border-radius: 50%;
  144. background-color: rgb(91, 93, 107);
  145. cursor: pointer;
  146. position: relative;
  147. bottom: 10px;
  148. pointer-events: none;
  149. }
  150. .default-control {
  151. display: flex;
  152. flex-direction: row;
  153. height: 100%;
  154. background-color: rgba(91, 93, 107, .75);
  155. }
  156. .menu-options button {
  157. width: 100%;
  158. height: 48px;
  159. color: rgb(142, 147, 155);
  160. }
  161. .menu-options button {
  162. width: 100%;
  163. height: 48px;
  164. color: rgb(142, 147, 155);
  165. }
  166. .menu-options button:hover {
  167. background-color: transparent;
  168. color: rgb(255, 255, 255);
  169. }
  170. .menu-options .animation-number {
  171. margin: 0 18px 0 6px;
  172. }
  173. .menu-options .speed-text {
  174. margin-right: 18px;
  175. }
  176. .menu-options {
  177. visibility: hidden;
  178. }
  179. .open .menu-options {
  180. visibility: visible;
  181. }
  182. .types .menu-options {
  183. width: 144px;
  184. }
  185. .types .menu-options button {
  186. padding: 0 8px;
  187. justify-content: left;
  188. }
  189. .types .menu-options button>* {
  190. display: flex;
  191. margin: 8px;
  192. }
  193. .types .menu-options button span.animation-number {
  194. display: none;
  195. }
  196. @media screen and (min-width: 540px) {
  197. .help,
  198. .types-icon,
  199. .speed {
  200. display: inline-block;
  201. }
  202. .logo-button {
  203. display: flex;
  204. }
  205. .types {
  206. width: 84px;
  207. }
  208. .progress-bar-container {
  209. margin: 0 12px;
  210. }
  211. .speed {
  212. width: 64px;
  213. }
  214. .speed .menu-options {
  215. width: 64px;
  216. }
  217. }
  218. @media screen and (min-width: 1024px) {
  219. .animation-label {
  220. display: block;
  221. margin-left: 6px;
  222. text-overflow: ellipsis;
  223. overflow: hidden;
  224. }
  225. nav-bar button.animation-buttons {
  226. padding: 0 8px;
  227. justify-content: left;
  228. }
  229. .icon.up-icon {
  230. margin-left: 8px;
  231. }
  232. nav-bar button.animation-buttons>div {
  233. display: flex;
  234. pointer-events: none;
  235. }
  236. .animation-number {
  237. display: none;
  238. }
  239. .progress-bar-container {
  240. margin: 0 12px;
  241. }
  242. .types {
  243. width: 144px;
  244. }
  245. }
  246. .progress-wrapper {
  247. -webkit-appearance: none;
  248. cursor: pointer;
  249. width: 100%;
  250. outline: none;
  251. margin: 0 12px;
  252. background-color: transparent;
  253. }
  254. /*Chrome -webkit */
  255. .progress-wrapper::-webkit-slider-thumb {
  256. -webkit-appearance: none;
  257. width: 20px;
  258. height: 20px;
  259. border: 2px solid white;
  260. border-radius: 50%;
  261. background: rgba(91, 93, 107, 1);
  262. margin-top: -10px;
  263. }
  264. .progress-wrapper::-webkit-slider-runnable-track {
  265. height: 2px;
  266. -webkit-appearance: none;
  267. background-color: white;
  268. }
  269. /** FireFox -moz */
  270. .progress-wrapper::-moz-range-progress {
  271. background-color: white;
  272. height: 2px;
  273. }
  274. .progress-wrapper::-moz-range-thumb {
  275. width: 20px;
  276. height: 20px;
  277. border: 2px solid white;
  278. border-radius: 50%;
  279. background: rgba(91, 93, 107, 1);
  280. }
  281. .progress-wrapper::-moz-range-track {
  282. background: white;
  283. height: 2px;
  284. }
  285. /** IE -ms */
  286. .progress-wrapper::-ms-track {
  287. height: 2px;
  288. /*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */
  289. background: transparent;
  290. /*leave room for the larger thumb to overflow with a transparent border */
  291. border-color: transparent;
  292. border-width: 10px 0;
  293. /*remove default tick marks*/
  294. color: transparent;
  295. }
  296. .progress-wrapper::-ms-fill-lower {
  297. background: white;
  298. border-radius: 5px;
  299. }
  300. .progress-wrapper::-ms-fill-upper {
  301. background: white;
  302. border-radius: 5px;
  303. }
  304. .progress-wrapper::-ms-thumb {
  305. width: 16px;
  306. height: 16px;
  307. border: 2px solid white;
  308. border-radius: 50%;
  309. background: rgba(91, 93, 107, 1);
  310. margin-top: 0px;
  311. }
  312. span {
  313. display: inline-block;
  314. }
  315. </style>
  316. {{#if (or (not animations) hideAnimations)}} {{#if hideLogo}}
  317. <style>
  318. nav-bar .nav-container {
  319. justify-content: flex-end;
  320. }
  321. </style>
  322. {{else}}
  323. <style>
  324. nav-bar .nav-container {
  325. justify-content: space-between;
  326. }
  327. </style>
  328. {{/if}} {{/if}} {{#if disableOnFullscreen}}
  329. <style>
  330. viewer:fullscreen nav-bar {
  331. display: none;
  332. }
  333. viewer:-moz-full-screen nav-bar {
  334. display: none;
  335. }
  336. viewer:-webkit-full-screen nav-bar {
  337. display: none;
  338. }
  339. </style>
  340. {{/if}}
  341. <div class="nav-container" id="navbar-control">
  342. {{#unless hideLogo}}
  343. <div class="logo-button" title="{{logoText}}">
  344. {{#if logoLink}}
  345. <a href="{{logoLink}}" target="_blank">
  346. <img src="{{logoImage}}">
  347. </a>
  348. {{else}}
  349. <img src="{{logoImage}}"> {{/if}}
  350. </div>
  351. {{/unless}}{{#unless (or (not animations) hideAnimations)}}
  352. <div class="animation-control">
  353. <div class="types">
  354. <button class="flex-container animation-buttons" id="types-button">
  355. <!-- <div> -->
  356. <span class="icon types-icon"></span>
  357. <span class="control-text animation-label">{{selectedAnimationName}}</span>
  358. <span class="control-text animation-number">{{selectedAnimation}}</span>
  359. <!-- </div> -->
  360. {{#if (gt (count animations) 1)}}
  361. <span class="icon up-icon"></span>
  362. {{/if}}
  363. </button>
  364. <div class="menu-options">
  365. {{#each animations}} {{#unless (eq ../selectedAnimation (add @index 1))}}
  366. <button class="flex-container animation-buttons" id="label-option-button" data-value="{{this}}">
  367. <!-- <div> -->
  368. <span class="icon types-icon"></span>
  369. <span class="control-text animation-label">{{this}}</span>
  370. <span class="control-text animation-number">{{add @index 1}}</span>
  371. <!-- </div> -->
  372. </button>
  373. {{/unless}} {{/each}}
  374. </div>
  375. </div>
  376. <div class="progress-control" id="progress-control">
  377. <button class="play-pause" id="play-pause-button">
  378. {{#if paused}}
  379. <span class="icon play-icon"></span>
  380. {{else}}
  381. <span class="icon pause-icon"></span>
  382. {{/if}}
  383. </button>
  384. <input class="progress-wrapper" id="progress-wrapper" type="range" min="0" max="100" step="0.01">
  385. </div>
  386. <div class="speed">
  387. <button class="flex-container" id="speed-button">
  388. <span class="control-text speed-text">{{selectedSpeed}}</span>
  389. <span class="icon up-icon"></span>
  390. </button>
  391. <div class="menu-options">
  392. {{#eachInMap speedList}} {{#unless (eq ../selectedSpeed id)}}
  393. <button class="flex-container" id="speed-option-button" data-value="{{value}}">
  394. <span class="control-text speed-text">{{id}}</span>
  395. </button>
  396. {{/unless}} {{/eachInMap}}
  397. </div>
  398. </div>
  399. </div>
  400. {{/unless}}
  401. <div class="default-control">
  402. {{#unless hideHelp}}
  403. <button class="help" id="help-button" title="Help">
  404. <span class="icon help-icon"></span>
  405. </button>
  406. {{/unless}} {{#unless hideFullScreen}}
  407. <button class="fullscreen" id="fullscreen-button" title="Fullscreen">
  408. <span class="icon fullscreen-icon"></span>
  409. </button>
  410. {{/unless}}
  411. </div>
  412. </div>