upload de projetos funcional + busca por bpm

This commit is contained in:
JotaChina committed 2025-12-08 10:59:31 -03:00
1 parent 8575b205d7
commit 764bceec4d
5 files changed
+334565 -336200

No files matched your search

+49 -46
View File
@@ -23,55 +23,58 @@ permalink: /beats/
</div>
<div class="columns is-multiline">
{% assign files = site.static_files %}
{% for file in files %}
{% if file.path contains '/wav/' %}
<div class="column is-12-mobile is-6-tablet is-4-desktop is-3-widescreen">
<div class="card beat-card"
style="height: 100%; background-color: #f0f8ff; border: 1px solid #cfe8fc; border-radius: 12px; display: flex; flex-direction: column; transition: all 0.3s ease;">
<div class="card-content has-text-centered p-4" style="flex: 1; display: flex; flex-direction: column; justify-content: center;">
<div class="mb-3" style="width: 60px; height: 60px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto; box-shadow: 0 4px 10px rgba(0,0,0,0.05);">
<span class="icon is-large has-text-info"><i class="fa-solid fa-compact-disc fa-2x fa-spin-hover"></i></span>
{% if site.data.beats %}
{% for filename in site.data.beats %}
<div class="column is-12-mobile is-6-tablet is-4-desktop is-3-widescreen">
<div class="card beat-card"
style="height: 100%; background-color: #f0f8ff; border: 1px solid #cfe8fc; border-radius: 12px; display: flex; flex-direction: column; transition: all 0.3s ease;">
<div class="card-content has-text-centered p-4" style="flex: 1; display: flex; flex-direction: column; justify-content: center;">
<div class="mb-3" style="width: 60px; height: 60px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto; box-shadow: 0 4px 10px rgba(0,0,0,0.05);">
<span class="icon is-large has-text-info"><i class="fa-solid fa-compact-disc fa-2x fa-spin-hover"></i></span>
</div>
{% assign file_name_clean = filename | remove: '.wav' | remove: '.mp3' %}
{% assign project_url = "" %}
{% for projeto in site.data.all %}
{% if projeto.file == file_name_clean %}
{% assign project_slug = projeto.file | slugify %}
{% assign project_url = "/projetos/" | append: project_slug | append: ".html" %}
{% endif %}
{% endfor %}
<h3 class="title is-6 mb-3" style="color: #205081; word-break: break-word;">
{% if project_url != "" %}
<a href="{{ project_url | relative_url }}" class="beat-link" title="Ir para o projeto">
{{ file_name_clean }} <i class="fa-solid fa-arrow-up-right-from-square" style="font-size: 0.7em; margin-left: 4px;"></i>
</a>
{% else %}
{{ file_name_clean }}
{% endif %}
</h3>
<div class="audio-wrapper" style="width: 100%;">
<audio class="audio-player" controls style="width: 100%; height: 32px; border-radius: 20px;">
<source src="/mmpSearch/src_mmpSearch/wav/{{ filename }}" type="audio/wav">
Seu navegador não suporta áudio.
</audio>
</div>
</div>
</div>
{% assign file_name_clean = file.name | remove: '.wav' %}
{% assign project_url = "" %}
{% for projeto in site.data.all %}
{% if projeto.file == file_name_clean %}
{% assign project_url = "/projetos/"
| append: projeto.file | downcase
| replace: ' ', '-' | replace: 'ç', 'c' | replace: 'ã', 'a' | replace: 'á', 'a' | replace: 'â', 'a' | replace: 'é', 'e' | replace: 'ê', 'e' | replace: 'í', 'i' | replace: 'ó', 'o' | replace: 'ô', 'o' | replace: 'õ', 'o' | replace: 'ú', 'u'
| append: ".html" %}
{% endif %}
{% endfor %}
<h3 class="title is-6 mb-3" style="color: #205081; word-break: break-word;">
{% if project_url != "" %}
<a href="{{ project_url | relative_url }}" class="beat-link" title="Ir para o projeto">
{{ file_name_clean }} <i class="fa-solid fa-arrow-up-right-from-square" style="font-size: 0.7em; margin-left: 4px;"></i>
</a>
{% else %}
{{ file_name_clean }}
{% endif %}
</h3>
<div class="audio-wrapper" style="width: 100%;">
<audio class="audio-player" controls style="width: 100%; height: 32px; border-radius: 20px;">
<source src="{{ file.path | relative_url }}" type="audio/wav">
Seu navegador não suporta áudio.
</audio>
</div>
</div>
</div>
{% endfor %}
{% else %}
<div class="column is-12">
<div class="notification is-warning has-text-centered">
Nenhum beat encontrado no manifesto (beats.json). Tente fazer um upload novo para regenerar a lista.
</div>
</div>
{% endif %}
{% endfor %}
{% endif %}
</div>
</div>