navbar.html 12 KB

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