mirror of
https://github.com/iv-org/invidious.git
synced 2024-08-30 18:23:25 +00:00
Community: Minor HTML/CSS fixes (#3783)
This commit is contained in:
commit
febd14f703
@ -321,6 +321,30 @@ p.channel-name { margin: 0; }
|
|||||||
p.video-data { margin: 0; font-weight: bold; font-size: 80%; }
|
p.video-data { margin: 0; font-weight: bold; font-size: 80%; }
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Comments & community posts
|
||||||
|
*/
|
||||||
|
|
||||||
|
#comments {
|
||||||
|
max-width: 800px;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-iframe-wrapper {
|
||||||
|
position: relative;
|
||||||
|
height: 0;
|
||||||
|
padding-bottom: 56.25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-iframe {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Footer
|
* Footer
|
||||||
*/
|
*/
|
||||||
|
@ -372,32 +372,25 @@ def template_youtube_comments(comments, locale, thin_mode, is_replies = false)
|
|||||||
</div>
|
</div>
|
||||||
END_HTML
|
END_HTML
|
||||||
when "video"
|
when "video"
|
||||||
html << <<-END_HTML
|
|
||||||
<div class="pure-g">
|
|
||||||
<div class="pure-u-1 pure-u-md-1-2">
|
|
||||||
<div style="position:relative;width:100%;height:0;padding-bottom:56.25%;margin-bottom:5px">
|
|
||||||
END_HTML
|
|
||||||
|
|
||||||
if attachment["error"]?
|
if attachment["error"]?
|
||||||
html << <<-END_HTML
|
html << <<-END_HTML
|
||||||
|
<div class="pure-g video-iframe-wrapper">
|
||||||
<p>#{attachment["error"]}</p>
|
<p>#{attachment["error"]}</p>
|
||||||
|
</div>
|
||||||
END_HTML
|
END_HTML
|
||||||
else
|
else
|
||||||
html << <<-END_HTML
|
html << <<-END_HTML
|
||||||
<iframe id='ivplayer' style='position:absolute;width:100%;height:100%;left:0;top:0' src='/embed/#{attachment["videoId"]?}?autoplay=0' style='border:none;'></iframe>
|
<div class="pure-g video-iframe-wrapper">
|
||||||
|
<iframe class="video-iframe" src='/embed/#{attachment["videoId"]?}?autoplay=0'></iframe>
|
||||||
|
</div>
|
||||||
END_HTML
|
END_HTML
|
||||||
end
|
end
|
||||||
|
|
||||||
html << <<-END_HTML
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
END_HTML
|
|
||||||
else nil # Ignore
|
else nil # Ignore
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
html << <<-END_HTML
|
html << <<-END_HTML
|
||||||
|
<p>
|
||||||
<span title="#{Time.unix(child["published"].as_i64).to_s(translate(locale, "%A %B %-d, %Y"))}">#{translate(locale, "`x` ago", recode_date(Time.unix(child["published"].as_i64), locale))} #{child["isEdited"] == true ? translate(locale, "(edited)") : ""}</span>
|
<span title="#{Time.unix(child["published"].as_i64).to_s(translate(locale, "%A %B %-d, %Y"))}">#{translate(locale, "`x` ago", recode_date(Time.unix(child["published"].as_i64), locale))} #{child["isEdited"] == true ? translate(locale, "(edited)") : ""}</span>
|
||||||
|
|
|
|
||||||
END_HTML
|
END_HTML
|
||||||
@ -416,6 +409,7 @@ def template_youtube_comments(comments, locale, thin_mode, is_replies = false)
|
|||||||
|
|
||||||
html << <<-END_HTML
|
html << <<-END_HTML
|
||||||
<i class="icon ion-ios-thumbs-up"></i> #{number_with_separator(child["likeCount"])}
|
<i class="icon ion-ios-thumbs-up"></i> #{number_with_separator(child["likeCount"])}
|
||||||
|
</p>
|
||||||
END_HTML
|
END_HTML
|
||||||
|
|
||||||
if child["creatorHeart"]?
|
if child["creatorHeart"]?
|
||||||
|
Loading…
Reference in New Issue
Block a user