navbar.html 12 KB

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