Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move timestamps to CSS div:before statements #133

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions droppdf/apps/_templates/youtube.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,19 @@
padding-bottom: .5em;
}

.sub-text:before {
width: 2em;
display: inline-block;
border-right: 1px solid black;
margin-right: 0.5em;
}

.sub-text {
flex: 1;
flex-basis: 0;
padding-left: 6.5em;
text-indent: -2.6em;
margin-right: 3em;
}

.sub-label {
Expand Down Expand Up @@ -263,6 +273,8 @@
height: 100%;
}

{% for sub in transcript %}div.sub-text div.line{{ loop.index }}:before {content: "{{ sub.start_display }}";}

@media (max-width: 992px) {
body {
height: 97vh;
Expand Down Expand Up @@ -432,11 +444,7 @@
<div id="substart-text" class="sub-text italic">Select text to annotate, Click play in YouTube to begin</div>
</div>
{% for sub in transcript %}
<div class="sub" dir="ltr">
<div class="sub-time">
{{ sub.start_display }}
</div>
<div class="sub-text" onclick="updatePlayerTime({{ sub.start }});">
<div class="sub-text line{{ loop.index }}" onclick="updatePlayerTime({{ sub.start }});" dir="ltr">
{{ sub.text }}
</div>
</div>
Expand Down