|
64 | 64 | justify-content: space-between; |
65 | 65 | padding: 18px 20px; |
66 | 66 | gap: 20px; |
67 | | - transition: opacity var(--transition); |
| 67 | + transition: opacity var(--transition), transform var(--transition); |
68 | 68 | } |
69 | 69 |
|
70 | 70 | .controls>div { |
71 | 71 | display: flex; |
72 | 72 | gap: 20px; |
73 | 73 | } |
74 | 74 |
|
| 75 | + @media (hover: hover) and (pointer: fine) { |
| 76 | + .controls#top.hidden { |
| 77 | + opacity: 0; |
| 78 | + transform: translateY(-5px); |
| 79 | + } |
| 80 | + |
| 81 | + .controls#bottom.hidden { |
| 82 | + opacity: 0; |
| 83 | + transform: translateY(5px); |
| 84 | + } |
| 85 | + } |
| 86 | + |
| 87 | + /* Keep controls visible on mobile */ |
| 88 | + @media (hover: none) and (pointer: coarse) { |
| 89 | + |
| 90 | + .controls#top.hidden, |
| 91 | + .controls#bottom.hidden { |
| 92 | + opacity: 1; |
| 93 | + transform: none; |
| 94 | + } |
| 95 | + } |
| 96 | + |
75 | 97 | .btn { |
76 | 98 | cursor: pointer; |
77 | 99 | font-size: 15px; |
|
134 | 156 |
|
135 | 157 | .scroll-fade.top { |
136 | 158 | top: 0; |
137 | | - mask-image: linear-gradient(to bottom, black 50%, transparent 100%); |
138 | | - -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%); |
| 159 | + mask-image: linear-gradient(to bottom, black 25%, transparent 100%); |
| 160 | + -webkit-mask-image: linear-gradient(to bottom, black 25%, transparent 100%); |
139 | 161 | } |
140 | 162 |
|
141 | 163 | .scroll-fade.bottom { |
142 | 164 | bottom: 0; |
143 | | - mask-image: linear-gradient(to top, black 50%, transparent 100%); |
144 | | - -webkit-mask-image: linear-gradient(to top, black 50%, transparent 100%); |
| 165 | + mask-image: linear-gradient(to top, black 25%, transparent 100%); |
| 166 | + -webkit-mask-image: linear-gradient(to top, black 25%, transparent 100%); |
145 | 167 | } |
146 | 168 | </style> |
147 | 169 | </head> |
|
308 | 330 | document.addEventListener('click', e => { |
309 | 331 | const action = e.target.dataset.action; |
310 | 332 | if (action && actions[action]) { |
| 333 | + e.preventDefault(); |
311 | 334 | actions[action](); |
312 | | - if (!('ontouchstart' in window)) { |
313 | | - this.editor.focus(); |
314 | | - } |
315 | 335 | } |
316 | 336 | }); |
317 | 337 |
|
|
394 | 414 | const minutes = Math.ceil(wordCount / wordsPerMinute); |
395 | 415 |
|
396 | 416 | if (minutes === 0) { |
397 | | - return '<1 min'; |
| 417 | + return '<1 minute'; |
398 | 418 | } else if (minutes < 60) { |
399 | | - return `~${minutes} min${minutes !== 1 ? 's' : ''}`; |
| 419 | + return `~${minutes} minute${minutes !== 1 ? 's' : ''}`; |
400 | 420 | } else if (minutes < 1440) { |
401 | 421 | const hours = Math.ceil(minutes / 60); |
402 | 422 | return `~${hours} hour${hours !== 1 ? 's' : ''}`; |
|
0 commit comments