Turn audio into a shareable video. forked from nypublicradio/audiogram

editor.css 8.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  1. div.container {
  2. width: 640px;
  3. margin-bottom: 2rem;
  4. padding: 0 20px;
  5. }
  6. h1 {
  7. font-weight: 500;
  8. margin-top: 2rem;
  9. font-size: 48px;
  10. }
  11. .red {
  12. color: #c00;
  13. }
  14. code {
  15. padding: 0.2em 0.4em;
  16. margin: 0;
  17. font-size: 85%;
  18. background-color: rgba(27,31,35,0.05);
  19. border-radius: 3px;
  20. }
  21. /* Buttons/controls */
  22. button,
  23. .button {
  24. display: inline-block;
  25. padding: 6px 12px;
  26. margin-bottom: 0;
  27. font-weight: 400;
  28. text-align: center;
  29. white-space: nowrap;
  30. vertical-align: middle;
  31. -ms-touch-action: manipulation;
  32. touch-action: manipulation;
  33. cursor: pointer;
  34. -webkit-user-select: none;
  35. -moz-user-select: none;
  36. -ms-user-select: none;
  37. user-select: none;
  38. background-image: none;
  39. border: 1px solid #ccc;
  40. border-radius: 4px;
  41. color: #333;
  42. background-color: #fff;
  43. margin: 3px;
  44. outline: 0;
  45. font-size: 16px;
  46. }
  47. #download {
  48. padding: 9px 12px 6px 12px;
  49. color: #fff;
  50. background-color: #5bc0de;
  51. border-color: #46b8da;
  52. }
  53. #download:hover {
  54. background-color: #31b0d5;
  55. border-color: #269abc;
  56. }
  57. button:hover,
  58. input[type='submit']:hover {
  59. color: #333;
  60. background-color: #e6e6e6;
  61. border-color: #adadad;
  62. }
  63. button:active,
  64. #download:active,
  65. input[type='submit']:active {
  66. box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
  67. }
  68. #tip {
  69. color: #333;
  70. font-size: 13px;
  71. text-align: left;
  72. float: left;
  73. margin-top: 3px;
  74. }
  75. #duration {
  76. display: inline-block;
  77. padding-top: 6px;
  78. margin-bottom: 0;
  79. font-weight: 400;
  80. vertical-align: middle;
  81. color: #333;
  82. font-size: 13px;
  83. margin-right: 3px;
  84. }
  85. .note {
  86. color: #999;
  87. font-size: 12px;
  88. }
  89. #play {
  90. width: 66px;
  91. }
  92. #controls {
  93. text-align: right;
  94. }
  95. #controls i.fa {
  96. margin-right: 4px;
  97. }
  98. i.fa {
  99. margin-right: 6px;
  100. }
  101. i.fa-play {
  102. position: relative;
  103. bottom: 1px;
  104. }
  105. #controls button {
  106. padding: 3px 6px;
  107. font-size: 13px;
  108. }
  109. #error {
  110. color: #c00;
  111. font-weight: 600;
  112. }
  113. .row.error input,
  114. .row.error label {
  115. color: #c00;
  116. }
  117. /* Form */
  118. .row {
  119. margin: 1rem 0;
  120. }
  121. label {
  122. display: block;
  123. margin-bottom: 0.25rem;
  124. font-weight: 500;
  125. }
  126. select {
  127. margin-top: 6px;
  128. padding: 6px;
  129. }
  130. input[type='text'] {
  131. width: 100%;
  132. padding: 6px;
  133. color: #666;
  134. font-size: 16px;
  135. border: 1px solid #ddd;
  136. border-radius: 4px;
  137. box-shadow: 0 0 0 0;
  138. }
  139. /* Preview canvas */
  140. #canvas {
  141. position: relative;
  142. }
  143. #preview-label {
  144. position: absolute;
  145. top: 0;
  146. left: 0;
  147. padding: 0.5rem;
  148. text-transform: uppercase;
  149. opacity: 0.2;
  150. font-size: 28px;
  151. }
  152. #canvas,
  153. #video {
  154. margin-left: auto;
  155. margin-right: auto;
  156. }
  157. /* Minimap */
  158. svg {
  159. border-top: 1px solid #444;
  160. background-color: #dedede;
  161. }
  162. g.background path {
  163. fill: #999;
  164. }
  165. g.background line {
  166. stroke: #999;
  167. }
  168. g.foreground path {
  169. fill: #de1e3d;
  170. }
  171. g.foreground line {
  172. stroke: #de1e3d;
  173. }
  174. g.brush .extent {
  175. fill: none;
  176. stroke: none;
  177. }
  178. g.brush line {
  179. stroke-width: 3px;
  180. stroke: #de1e3d;
  181. }
  182. g.time {
  183. pointer-events: none;
  184. }
  185. g.time line {
  186. stroke-width: 1px;
  187. stroke: #0eb8ba;
  188. }
  189. /* UI states */
  190. #audio {
  191. display: none;
  192. }
  193. #loading,
  194. #error,
  195. #video,
  196. #download,
  197. #return,
  198. .loading #loaded,
  199. .rendered #preview,
  200. .rendered #submit,
  201. .rendered .form-row {
  202. display: none;
  203. }
  204. .loading #loading,
  205. .error #error,
  206. .rendered #video {
  207. display: block;
  208. }
  209. .rendered #download,
  210. .rendered #return {
  211. display: inline-block;
  212. }
  213. /* Loading styles */
  214. #loading-message {
  215. font-size: 24px;
  216. text-align: center;
  217. color: #de1e3d;
  218. }
  219. #loading-bars {
  220. margin: 60px auto 40px auto;
  221. width: 200px;
  222. height: 120px;
  223. text-align: center;
  224. font-size: 10px;
  225. }
  226. #loading-bars > div {
  227. background-color: #de1e3d;
  228. height: 100%;
  229. width: 16px;
  230. margin-right: 3px;
  231. display: inline-block;
  232. -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;
  233. animation: sk-stretchdelay 1.2s infinite ease-in-out;
  234. }
  235. #loading-bars .r2 {
  236. -webkit-animation-delay: -1.1s;
  237. animation-delay: -1.1s;
  238. }
  239. #loading-bars .r3 {
  240. -webkit-animation-delay: -1.0s;
  241. animation-delay: -1.0s;
  242. }
  243. #loading-bars .r4 {
  244. -webkit-animation-delay: -0.9s;
  245. animation-delay: -0.9s;
  246. }
  247. #loading-bars .r5 {
  248. -webkit-animation-delay: -0.8s;
  249. animation-delay: -0.8s;
  250. margin-right: 0;
  251. }
  252. @-webkit-keyframes sk-stretchdelay {
  253. 0%, 40%, 100% { -webkit-transform: scaleY(0.4) }
  254. 20% { -webkit-transform: scaleY(1.0) }
  255. }
  256. @keyframes sk-stretchdelay {
  257. 0%, 40%, 100% {
  258. transform: scaleY(0.4);
  259. -webkit-transform: scaleY(0.4);
  260. } 20% {
  261. transform: scaleY(1.0);
  262. -webkit-transform: scaleY(1.0);
  263. }
  264. }
  265. #theme-edit i.fa,
  266. #new-theme i.fa{
  267. margin: 0;
  268. }
  269. #themeEditor{
  270. width: 100%;
  271. max-width: 900px;
  272. }
  273. #themeEditor #row-instructions p{
  274. line-height: 1.3;
  275. margin: 0 auto;
  276. padding: 10.5px 0;
  277. }
  278. #themeEditor #row-instructions p:first-of-type{
  279. padding-top: 0;
  280. }
  281. #themeEditor #row-instructions i.fa{
  282. margin: 0 2px;
  283. }
  284. #themeEditor #row-instructions #toggle-more-instructions{
  285. cursor: pointer;
  286. }
  287. #themeEditor #row-instructions #toggle-more-instructions:hover{
  288. text-decoration: underline;
  289. }
  290. #themeEditor #row-instructions #more-instructions{
  291. display: none;
  292. }
  293. #themeEditor #editor-tools{
  294. display: -webkit-box;
  295. display: -ms-flexbox;
  296. display: flex;
  297. width: 100%;
  298. }
  299. #themeEditor #editor-tools #options-container,
  300. #themeEditor #editor-tools #preview-container{
  301. width: 50%;
  302. }
  303. #themeEditor #preview.sticky{
  304. top: 6px;
  305. position: fixed;
  306. }
  307. #themeEditor #editor-tools #options-container{
  308. padding-right: 20px;
  309. }
  310. #themeEditor .section{
  311. padding: 13px 0;
  312. border-top: 1px solid #e0e0e0;
  313. }
  314. #themeEditor .section:first-child{
  315. padding-top: 0;
  316. border-top: none;
  317. }
  318. #themeEditor .section-header{
  319. cursor: pointer;
  320. }
  321. #themeEditor .section-toggle{
  322. float: right;
  323. width: 15px;
  324. height: 15px;
  325. margin: 2px 0 0 1px;
  326. background-color: transparent;
  327. border: 0;
  328. padding-top: 3px;
  329. }
  330. #themeEditor .section-toggle.toggled{
  331. -webkit-transform: rotate(180deg);
  332. -ms-transform: rotate(180deg);
  333. transform: rotate(180deg);
  334. }
  335. #themeEditor .section-options{
  336. overflow: hidden;
  337. }
  338. #themeEditor .options-attribute{
  339. display: -webkit-box;
  340. display: -ms-flexbox;
  341. display: flex;
  342. -webkit-box-orient: horizontal;
  343. -webkit-box-direction: normal;
  344. -ms-flex-direction: row;
  345. flex-direction: row;
  346. -webkit-box-align: center;
  347. -ms-flex-align: center;
  348. align-items: center;
  349. margin-bottom: 15px;
  350. }
  351. #themeEditor .options-attribute:first-of-type{
  352. margin-top: 10px;
  353. }
  354. #themeEditor .options-attribute:last-of-type{
  355. margin-bottom: 10px;
  356. }
  357. #themeEditor .section:last-of-type .options-attribute:last-of-type{
  358. margin-bottom: 0;
  359. }
  360. #themeEditor .options-attribute-child{
  361. -webkit-box-flex: 0;
  362. -ms-flex-positive: 0;
  363. flex-grow: 0;
  364. margin: 0 10px;
  365. }
  366. #themeEditor .options-attribute-child:first-child{
  367. -webkit-box-flex: 0;
  368. -ms-flex-positive: 0;
  369. flex-grow: 0;
  370. margin: 0 10px 0 0;
  371. }
  372. #themeEditor .options-attribute-child:last-child{
  373. margin: 0 0 0 10px;
  374. }
  375. #themeEditor .options-attribute label{
  376. text-align: right;
  377. margin-right: 0;
  378. min-width: 130px;
  379. }
  380. #themeEditor .options-attribute .attribute-help{
  381. margin-left: 0px;
  382. border: 0px;
  383. border-radius: 50px;
  384. background-color: white;
  385. padding: 3px 0px 7px 1px;
  386. -webkit-box-sizing: border-box;
  387. box-sizing: border-box;
  388. font-size: 10px;
  389. cursor: help;
  390. }
  391. #themeEditor .options-attribute .options-attribute-input{
  392. -webkit-box-flex: 1;
  393. -ms-flex-positive: 1;
  394. flex-grow: 1;
  395. width: auto;
  396. padding: 6px;
  397. color: #666;
  398. font-size: 16px;
  399. border: 1px solid #ddd;
  400. border-radius: 4px;
  401. -webkit-box-shadow: 0 0 0 0;
  402. box-shadow: 0 0 0 0;
  403. }
  404. #themeEditor .options-attribute .options-attribute-input[type="color"]{
  405. padding: 0px;
  406. border: 0px;
  407. margin: 10px 6px;
  408. }
  409. #themeEditor .options-attribute .options-attribute-input[disabled=""]{
  410. cursor: not-allowed;
  411. }
  412. #themeEditor .options-note{
  413. margin-top: -7px;
  414. }
  415. #themeEditor .options-note:empty{
  416. display: none;
  417. }
  418. #themeEditor #imgUploader-label{
  419. min-width: 0;
  420. }
  421. #themeEditor #imgUploader-label.button:hover{
  422. color: #333;
  423. background-color: #e6e6e6;
  424. border-color: #adadad;
  425. }
  426. #themeEditor #imgUploader-label.button:active{
  427. -webkit-box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
  428. box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
  429. }
  430. #themeEditor #imgUploader-label i{
  431. margin-right: 0;
  432. }
  433. #themeEditor #imgUploader{
  434. width: 0.1px;
  435. height: 0.1px;
  436. opacity: 0;
  437. overflow: hidden;
  438. position: absolute;
  439. z-index: -1;
  440. }
  441. #themeEditor #themeButtons button:first-child{
  442. margin-left: 0;
  443. }
  444. #themeEditor #themeButtons i.fa{
  445. margin: 0;
  446. }
  447. @media (max-width: 760px) {
  448. #themeEditor #editor-tools{
  449. -webkit-box-orient: vertical;
  450. -webkit-box-direction: normal;
  451. -ms-flex-direction: column;
  452. flex-direction: column;
  453. }
  454. #themeEditor #editor-tools #options-container,
  455. #themeEditor #editor-tools #preview-container{
  456. width: 100%;
  457. }
  458. #themeEditor #preview.sticky{
  459. top: 0;
  460. position: initial;
  461. }
  462. }