mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-02-03 00:31:25 -08:00
audio posts
This commit is contained in:
parent
106ceba33f
commit
54be336b77
5 changed files with 32 additions and 0 deletions
|
@ -291,6 +291,15 @@ h1 {
|
|||
}
|
||||
}
|
||||
|
||||
.fe-audio {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
left: 0;
|
||||
&:before {
|
||||
content: "\e9fc";
|
||||
}
|
||||
}
|
||||
|
||||
.fe-poll {
|
||||
position: relative;
|
||||
top: 2px;
|
||||
|
|
|
@ -314,6 +314,15 @@ h1 .fe-bell, h1 .fe-no-bell {
|
|||
content: "\ea05";
|
||||
}
|
||||
|
||||
.fe-audio {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
left: 0;
|
||||
}
|
||||
.fe-audio:before {
|
||||
content: "\e9fc";
|
||||
}
|
||||
|
||||
.fe-poll {
|
||||
position: relative;
|
||||
top: 2px;
|
||||
|
|
|
@ -313,6 +313,15 @@ h1 .fe-bell, h1 .fe-no-bell {
|
|||
content: "\ea05";
|
||||
}
|
||||
|
||||
.fe-audio {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
left: 0;
|
||||
}
|
||||
.fe-audio:before {
|
||||
content: "\e9fc";
|
||||
}
|
||||
|
||||
.fe-poll {
|
||||
position: relative;
|
||||
top: 2px;
|
||||
|
|
|
@ -86,6 +86,9 @@
|
|||
{% if post.type == POST_TYPE_LINK %}
|
||||
<p><a href="{{ post.url }}" rel="nofollow ugc" target="_blank" class="post_link">{{ post.url|shorten_url }}
|
||||
<span class="fe fe-external"></span></a></p>
|
||||
{% if post.url.endswith('.mp3') %}
|
||||
<p><audio controls preload="{{ 'none' if low_bandwidth else 'metadata' }}" src="{{ post.url }}"></audio></p>
|
||||
{% endif %}
|
||||
{% if 'youtube.com' in post.url %}
|
||||
<div style="padding-bottom: 56.25%; position: relative;"><iframe style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;" src="https://www.youtube.com/embed/{{ post.youtube_embed() }}?rel=0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture; fullscreen" width="100%" height="100%" frameborder="0"></iframe></div>
|
||||
{% endif %}
|
||||
|
|
|
@ -42,6 +42,8 @@
|
|||
{% if post.type == POST_TYPE_LINK and post.domain_id %}
|
||||
{% if post.url and 'youtube.com' in post.url %}
|
||||
<span class="fe fe-video" aria-hidden="true"></span>
|
||||
{% elif post.url.endswith('.mp3') %}
|
||||
<span class="fe fe-audio" aria-hidden="true"></span>
|
||||
{% endif %}
|
||||
<span class="domain_link" aria-hidden="true">(<a href="/d/{{ post.domain_id }}" aria-label="{{ _('All posts about this domain') }}">{{ post.domain.name }}</a>)</span>
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Reference in a new issue