caminhos de áudio nos instrumentos em projetos
Deploy / Deploy (push) Failing after 9s
Details
Deploy / Deploy (push) Failing after 9s
Details
This commit is contained in:
parent
dafda1d94c
commit
7ea09b39f2
|
@ -88,9 +88,8 @@ title: "{{ page.file }}"
|
|||
<!-- Instrumentos -->
|
||||
{% if page.tracks and page.tracks.size > 0 %}
|
||||
<section class="instruments-section">
|
||||
<h2 class="title is-5"><code>🎚️ Instrumentos</code></h2>
|
||||
<h2 class="title is-5"><code>🎚️ Instrumentos</h2></code>
|
||||
<div class="content">
|
||||
|
||||
<ul style="list-style: none; padding-left: 0;">
|
||||
{% for track in page.tracks %}
|
||||
{% assign tem_instr = false %}
|
||||
|
@ -105,42 +104,30 @@ title: "{{ page.file }}"
|
|||
{% endif %}
|
||||
|
||||
{% if tem_instr %}
|
||||
<ul class="pl-4">
|
||||
{% for instrument in track.instruments %}
|
||||
{% if instrument.instrument_name %}
|
||||
<li style="margin-bottom: 0.4rem;">
|
||||
<!-- Gerar link para filtro por instrumento -->
|
||||
{% assign instrument_slug = instrument.instrument_name | replace: ' ', '+' %}
|
||||
<a href="{{ '/instruments/?instrument=' | append: instrument_slug | relative_url }}" class="tag is-info is-light">
|
||||
<code>{{ instrument.instrument_name }}</code>
|
||||
</a>
|
||||
<ul class="pl-4">
|
||||
{% for instrument in track.instruments %}
|
||||
{% if instrument.instrument_name %}
|
||||
<li style="margin-bottom: 0.4rem;">
|
||||
<!-- Gerar link para filtro por instrumento -->
|
||||
{% assign instrument_slug = instrument.instrument_name | replace: ' ', '+' %}
|
||||
|
||||
<!-- Buscar o caminho do áudio no arquivo JSON -->
|
||||
{% assign found_audio = false %}
|
||||
|
||||
{% for audio_file in site.data.src_audio_files %}
|
||||
{% if audio_file contains instrument.instrument_name %}
|
||||
{% assign audio_file_path = audio_file %}
|
||||
audio_file_path
|
||||
{% assign found_audio = true %}
|
||||
<a href="{{ '/instruments/?instrument=' | append: instrument_slug | relative_url }}" class="tag is-info is-light">
|
||||
<code>{{ instrument.instrument_name }}</code>
|
||||
</a>
|
||||
|
||||
{% if instrument.audiofileprocessor and instrument.audiofileprocessor.src %}
|
||||
<!-- Exibir player de áudio para o instrumento -->
|
||||
<div class="audio-player-section mt-3">
|
||||
<audio controls>
|
||||
<source src="{{ audio_file_path }}" type="audio/wav">
|
||||
<source src="{{ instrument.audiofileprocessor.src | relative_url }}" type="audio/wav">
|
||||
Seu navegador não suporta o elemento <code>audio</code>.
|
||||
</audio>
|
||||
</div>
|
||||
{% break %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if found_audio == false %}
|
||||
<p>Áudio não encontrado para este instrumento.</p>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue