mmpSearch/instruments.md

5.3 KiB

layout title permalink
default Projetos com Instrumentos /instruments/
{% include sidebar.html %}

Projetos e seus instrumentos:

Limpar filtro
<!-- Projetos -->
<div id="project-list" class="columns is-multiline">
  {% for projeto in site.data.all %}
    <div class="column is-6 project-item" data-project-id="{{ projeto.file }}">
      <div class="box">
        <!-- Botão do projeto -->
        {% assign file_url = 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' %}

        <a href="../mmp_pages/{{ file_url }}.html" class="button is-link is-fullwidth">
          {{ projeto.file }}
        </a>

        <!-- Lista de Instrumentos clicáveis -->
        <div class="instruments">
          {% assign instruments_exibidos = "" %}
          {% for track in projeto.tracks %}
            {% if track.instruments %}
              {% for instrument in track.instruments %}
                {% unless instruments_exibidos contains instrument.instrument_name %}
                  {% capture instruments_exibidos %}{{ instruments_exibidos }},{{ instrument.instrument_name }}{% endcapture %}

                  <!-- Gerar link para o instrumento -->
                  {% assign instrument_slug = instrument.instrument_name %}
                  <a href="{{ '/instruments/?instrument=' | append: instrument_slug | encodeURIComponent | relative_url }}" class="button is-link instrument-button" style="margin: 0.5rem;">
                    {{ instrument.instrument_name }}
                  </a>

                {% endunless %}
              {% endfor %}
            {% endif %}
          {% endfor %}
        </div>
      </div>
    </div>
  {% endfor %}
</div>