Skip to content

Commit

Permalink
U
Browse files Browse the repository at this point in the history
  • Loading branch information
nanqic committed Feb 18, 2024
1 parent 0d6ac08 commit 91a0758
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 0 additions & 5 deletions src/assets/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,3 @@ div>p {
.text-editor textarea {
line-height: 1.5;
}

.highlight {
color: #2584f0;
zoom: 1.2;
}
6 changes: 4 additions & 2 deletions src/pages/SubtitlePlayer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,13 @@ const VideoPlayer = () => {
<ul className="mx-5 my-2 subtitles-box overflow-y-scroll h-80">
{subtitles.map((subtitle, index) => (
<li
onClick={()=>videoRef.current.currentTime = parseTime(subtitle.startTime)}
key={index}
id={`subtitle-${index}`}
className={`subtitle-line ${index === currentSubtitleIndex && 'highlight'}`}
className={`subtitle-line cursor-pointer`}
>
{subtitle.text}
<span className='p-1 font-thin text-xs'>{subtitle.startTime.split(',')[0]}</span>
<span className={`hover:text-blue-400 ${index === currentSubtitleIndex && 'text-blue-400 text-lg'}`}>{subtitle.text}</span>
</li>
))}
</ul>
Expand Down

0 comments on commit 91a0758

Please sign in to comment.