Fix bugs in section files

This commit is contained in:
2025-05-12 23:14:24 +02:00
parent f9b1b53c9f
commit c405d0109c
11 changed files with 103 additions and 40 deletions

View File

@@ -15,5 +15,6 @@
<link href="{{ url_for('static', filename='up.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='cover.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='simplemde.min.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='glightbox.min.css') }}" rel="stylesheet">
</head>

View File

@@ -1 +1,45 @@
<script src="{{ url_for('static', filename='docs.min.js') }}"></script>
<script src="{{ url_for('static', filename='glightbox.min.js') }}"></script>
<script>
var lightbox = GLightbox();
lightbox.on('open', (target) => {
console.log('lightbox opened');
});
var lightboxDescription = GLightbox({
selector: '.glightbox2'
});
var lightboxVideo = GLightbox({
selector: '.glightbox3'
});
lightboxVideo.on('slide_changed', ({ prev, current }) => {
console.log('Prev slide', prev);
console.log('Current slide', current);
const { slideIndex, slideNode, slideConfig, player } = current;
if (player) {
if (!player.ready) {
// If player is not ready
player.on('ready', (event) => {
// Do something when video is ready
});
}
player.on('play', (event) => {
console.log('Started play');
});
player.on('volumechange', (event) => {
console.log('Volume change');
});
player.on('ended', (event) => {
console.log('Video ended');
});
}
});
var lightboxInlineIframe = GLightbox({
selector: '.glightbox4'
});
</script>

View File

@@ -41,16 +41,17 @@
<li{% if section == "Files" %} class="active" {% endif %} >
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span> Mes Fichiers</a>
<span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span> Fichiers </a>
<ul class="dropdown-menu" role="menu">
<li><a href="/view/"> <span class="glyphicon glyphicon-cloud-download" aria-hidden="true"></span>
Fichiers envoyés </a></li>
<li><a href="/filesupload/"><span class="glyphicon glyphicon-cloud-upload" aria-hidden="true"></span>
Envoyer des fichiers</a></li>
<li><a href="/gallery/"><span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
Gallerie d'images
Mes Fichiers </a></li>
<li><a href="/gallery/">
<span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
Ma Gallerie d'images
</a></li>
<li><a href="/filesupload/">
<span class="glyphicon glyphicon-cloud-upload" aria-hidden="true"></span>
Envoyer des fichiers</a></li>
</ul>
</li>
<li{% if section == "mailbox" %} class="active" {% endif %} >

View File

@@ -3,24 +3,31 @@
{% block main %}
<div class="container theme-showcase" role="main">
<br />
<div id="gallery center" style= "margin-top:10vw;">
{% if fichiers %}
<div id="gallery">
{% for image in fichiers %}
<img src="/myfiles/images/thumbnails/{{ image }}" class="img-rounded" alt=""/>
{% for image in fichiers %}
<a href="/myfiles/images/{{ image }}" class="glightbox">
<img src="/myfiles/images/thumbnails/{{ image }}" class="img-rounded gallery" alt=""/>
</a>
{% endfor %}
{% else %}
</div>
<h2> Il n'y a aucunes images dans votre gallerie </h2>
{% endif %}
</div>
</div>
{% endblock %}

View File

@@ -13,11 +13,13 @@
<div class="container theme-showcase" role="main">
{% block main %}{% endblock %}
</div>
{% include '_flash_msgs.html' %}
{% include '_footer.html' %}
{% include '_js.html' %}
{% include '_js-core.html' %}
{% include '_js-gallery.html' %}
</body>