Add btn in video desc to show transcript

This commit is contained in:
syeopite 2024-06-12 10:00:16 -07:00
parent 81ca831439
commit 654f5fd45e
No known key found for this signature in database
GPG Key ID: A73C186DA3955A1A
3 changed files with 28 additions and 2 deletions

View File

@ -816,3 +816,20 @@ h1, h2, h3, h4, h5, p,
#download_widget {
width: 100%;
}
.description-widget {
display: flex;
white-space: normal;
gap: 15px;
border-top: 1px solid black;
}
.description-show-transcript-widget {
padding: 10px;
flex-direction: column
}
.description-show-transcript-widget > * {
margin: 0;
}

View File

@ -501,5 +501,7 @@
"toggle_theme": "Toggle Theme",
"carousel_slide": "Slide {{current}} of {{total}}",
"carousel_skip": "Skip the Carousel",
"carousel_go_to": "Go to slide `x`"
"carousel_go_to": "Go to slide `x`",
"video_description_show_transcript_section_label": "Transcripts",
"video_description_show_transcript_section_button": "Show transcript"
}

View File

@ -256,7 +256,14 @@ we're going to need to do it here in order to allow for translations.
<div id="descriptionWrapper"><%= video.description_html %></div>
<% else %>
<input id="descexpansionbutton" type="checkbox"/>
<div id="descriptionWrapper"><%= video.description_html %></div>
<div id="descriptionWrapper"><%-= video.description_html %>
<% if captions %>
<div class="description-widget description-show-transcript-widget">
<h4><%=HTML.escape(translate(locale, "video_description_show_transcript_section_label"))%></h4>
<a class="pure-button pure-button-secondary"><%=HTML.escape(translate(locale, "video_description_show_transcript_section_button"))%></a>
</div>
<% end %>
</div>
<label for="descexpansionbutton">
<a></a>
</label>