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

editor.css 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. div.container {
  2. width: 640px;
  3. margin-bottom: 2rem;
  4. }
  5. h1 {
  6. font-weight: 500;
  7. margin-top: 2rem;
  8. font-size: 48px;
  9. }
  10. .red {
  11. color: #c00;
  12. }
  13. /* Buttons/controls */
  14. button,
  15. .button {
  16. display: inline-block;
  17. padding: 6px 12px;
  18. margin-bottom: 0;
  19. font-weight: 400;
  20. text-align: center;
  21. white-space: nowrap;
  22. vertical-align: middle;
  23. -ms-touch-action: manipulation;
  24. touch-action: manipulation;
  25. cursor: pointer;
  26. -webkit-user-select: none;
  27. -moz-user-select: none;
  28. -ms-user-select: none;
  29. user-select: none;
  30. background-image: none;
  31. border: 1px solid #ccc;
  32. border-radius: 4px;
  33. color: #333;
  34. background-color: #fff;
  35. margin: 3px;
  36. outline: 0;
  37. font-size: 16px;
  38. }
  39. #download {
  40. padding: 9px 12px 6px 12px;
  41. color: #fff;
  42. background-color: #5bc0de;
  43. border-color: #46b8da;
  44. }
  45. #download:hover {
  46. background-color: #31b0d5;
  47. border-color: #269abc;
  48. }
  49. button:hover,
  50. input[type='submit']:hover {
  51. color: #333;
  52. background-color: #e6e6e6;
  53. border-color: #adadad;
  54. }
  55. button:active,
  56. #download:active,
  57. input[type='submit']:active {
  58. box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
  59. }
  60. #tip {
  61. color: #333;
  62. font-size: 13px;
  63. text-align: left;
  64. float: left;
  65. margin-top: 3px;
  66. }
  67. #duration {
  68. display: inline-block;
  69. padding-top: 6px;
  70. margin-bottom: 0;
  71. font-weight: 400;
  72. vertical-align: middle;
  73. color: #333;
  74. font-size: 13px;
  75. margin-right: 3px;
  76. }
  77. .note {
  78. color: #999;
  79. font-size: 12px;
  80. }
  81. #play {
  82. width: 66px;
  83. }
  84. #controls {
  85. text-align: right;
  86. }
  87. #controls i.fa {
  88. margin-right: 4px;
  89. }
  90. i.fa {
  91. margin-right: 6px;
  92. }
  93. i.fa-play {
  94. position: relative;
  95. bottom: 1px;
  96. }
  97. #controls button {
  98. padding: 3px 6px;
  99. font-size: 13px;
  100. }
  101. #error {
  102. color: #c00;
  103. font-weight: 600;
  104. }
  105. .row.error input,
  106. .row.error label {
  107. color: #c00;
  108. }
  109. /* Form */
  110. .row {
  111. margin: 1rem 0;
  112. }
  113. label {
  114. display: block;
  115. margin-bottom: 0.25rem;
  116. font-weight: 500;
  117. }
  118. select {
  119. margin-top: 6px;
  120. padding: 6px;
  121. }
  122. input[type='text'] {
  123. width: 100%;
  124. padding: 6px;
  125. color: #666;
  126. font-size: 16px;
  127. border: 1px solid #ddd;
  128. border-radius: 4px;
  129. box-shadow: 0 0 0 0;
  130. }
  131. /* Preview canvas */
  132. #canvas {
  133. position: relative;
  134. }
  135. #preview-label {
  136. position: absolute;
  137. top: 0;
  138. left: 0;
  139. padding: 0.5rem;
  140. text-transform: uppercase;
  141. opacity: 0.2;
  142. font-size: 28px;
  143. }
  144. #canvas,
  145. #video {
  146. margin-left: auto;
  147. margin-right: auto;
  148. }
  149. /* Minimap */
  150. svg {
  151. border-top: 1px solid #444;
  152. background-color: #dedede;
  153. }
  154. g.background path {
  155. fill: #999;
  156. }
  157. g.background line {
  158. stroke: #999;
  159. }
  160. g.foreground path {
  161. fill: #de1e3d;
  162. }
  163. g.foreground line {
  164. stroke: #de1e3d;
  165. }
  166. g.brush .extent {
  167. fill: none;
  168. stroke: none;
  169. }
  170. g.brush line {
  171. stroke-width: 3px;
  172. stroke: #de1e3d;
  173. }
  174. g.time {
  175. pointer-events: none;
  176. }
  177. g.time line {
  178. stroke-width: 1px;
  179. stroke: #0eb8ba;
  180. }
  181. /* UI states */
  182. #audio {
  183. display: none;
  184. }
  185. #loading,
  186. #error,
  187. #video,
  188. #download,
  189. #return,
  190. .loading #loaded,
  191. .rendered #preview,
  192. .rendered #submit,
  193. .rendered .form-row {
  194. display: none;
  195. }
  196. .loading #loading,
  197. .error #error,
  198. .rendered #video {
  199. display: block;
  200. }
  201. .rendered #download,
  202. .rendered #return {
  203. display: inline-block;
  204. }
  205. /* Loading styles */
  206. #loading-message {
  207. font-size: 24px;
  208. text-align: center;
  209. color: #de1e3d;
  210. }
  211. #loading-bars {
  212. margin: 60px auto 40px auto;
  213. width: 200px;
  214. height: 120px;
  215. text-align: center;
  216. font-size: 10px;
  217. }
  218. #loading-bars > div {
  219. background-color: #de1e3d;
  220. height: 100%;
  221. width: 16px;
  222. margin-right: 3px;
  223. display: inline-block;
  224. -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;
  225. animation: sk-stretchdelay 1.2s infinite ease-in-out;
  226. }
  227. #loading-bars .r2 {
  228. -webkit-animation-delay: -1.1s;
  229. animation-delay: -1.1s;
  230. }
  231. #loading-bars .r3 {
  232. -webkit-animation-delay: -1.0s;
  233. animation-delay: -1.0s;
  234. }
  235. #loading-bars .r4 {
  236. -webkit-animation-delay: -0.9s;
  237. animation-delay: -0.9s;
  238. }
  239. #loading-bars .r5 {
  240. -webkit-animation-delay: -0.8s;
  241. animation-delay: -0.8s;
  242. margin-right: 0;
  243. }
  244. @-webkit-keyframes sk-stretchdelay {
  245. 0%, 40%, 100% { -webkit-transform: scaleY(0.4) }
  246. 20% { -webkit-transform: scaleY(1.0) }
  247. }
  248. @keyframes sk-stretchdelay {
  249. 0%, 40%, 100% {
  250. transform: scaleY(0.4);
  251. -webkit-transform: scaleY(0.4);
  252. } 20% {
  253. transform: scaleY(1.0);
  254. -webkit-transform: scaleY(1.0);
  255. }
  256. }