formha/templates/h_tmp_usr/d_read_post.html
2025-05-03 15:47:24 -06:00

79 lines
1.6 KiB
HTML

{% extends 'h_tmp_usr/z_tmp.html' %}
{% block css %}
<link rel="stylesheet" href="{{ url_for( 'static', filename='h_tmp_user/d_read_post/read_post.css' ) }}">
{% endblock css %}
{% block body %}
<style>
.video-responsive {
position: relative;
width: 100%;
padding-bottom: 56.25%; /* 16:9 ratio */
height: 0;
overflow: hidden;
}
.video-responsive iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 0;
}
</style>
<div class="pst-cont">
<h1>{{data[2]}}</h1>
<span>
<i class="bi bi-calendar-week"></i> {{data[0]}}
{% if data[1] is not none %} | <i class="bi bi-arrow-repeat"></i> {{data[1]}}{% endif %}
| <i class="bi bi-clock-fill"></i> {{time_read}}
</span>
<div>
<a type="button" class="btn btn-info" href="{{ url_for('my_posts') }}"><i class="bi bi-arrow-left"></i> Mis Publicaciones.</a>
<a type="button" class="btn btn-secondary" href="{{ url_for('edit_post', id_post= post_id ) }}"><i class="bi bi-vector-pen"></i> Editar.</a>
</div>
<div class="bd-post">
{{data[3] | safe}}
</div>
</div>
<script>
document.addEventListener("DOMContentLoaded", () => {
const iframes = document.querySelectorAll("iframe.note-video-clip");
iframes.forEach(iframe => {
const wrapper = document.createElement("div");
wrapper.className = "video-responsive";
iframe.parentNode.insertBefore(wrapper, iframe);
wrapper.appendChild(iframe);
});
});
</script>
{% endblock body %}
{% block js %}
<!-- {# flecha ir hasta arriba #} -->
{% include 'z_comps/arrow_to_up.html' %}
{% endblock js %}