navbar.html 12 KB

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