mmpSearch/pages/samples.md

20 KiB

layout title permalink
default MMPSearch - Samples Disponíveis /samples/
<div class="container">
  <br />

  <div class="tabs is-centered is-boxed is-medium mb-6">
    {% include sidebar.html %}
  </div>

  <div class="has-text-centered mb-5">
    <h1 class="title is-3 has-text-grey-dark">🎤 Biblioteca de Samples</h1>
    <p class="subtitle is-6 has-text-grey">Navegue pelas pastas para ouvir e filtrar projetos.</p>
    <div style="width: 60px; height: 4px; background-color: #3273dc; margin: 1rem auto; border-radius: 2px;"></div>
  </div>

  <div class="box p-0 mb-6" style="border: 1px solid #cfe8fc; overflow: hidden; background-color: #fff; min-height: 400px; display: flex; flex-direction: column; box-shadow: 0 4px 10px rgba(0,0,0,0.05);">
      
      <div class="p-3 has-background-white-ter" style="border-bottom: 1px solid #cfe8fc; display: flex; align-items: center;">
          <button id="btn-home" class="button is-small is-info is-light mr-3" title="Voltar ao início">
              <i class="fa-solid fa-house"></i>
          </button>
          <nav class="breadcrumb is-small mb-0" aria-label="breadcrumbs">
              <ul id="breadcrumb-list">
                  <li class="is-active"><a href="#">Raiz</a></li>
              </ul>
          </nav>
      </div>

      <div id="browser-view" class="p-4" style="flex: 1;">
          <p class="has-text-centered has-text-grey-light mt-6">Carregando biblioteca...</p>
      </div>

      <div id="preview-bar" class="p-3 has-background-info-light is-hidden" style="border-top: 1px solid #cfe8fc; display: flex; align-items: center; justify-content: space-between;">
          <div style="display: flex; align-items: center; gap: 10px; overflow: hidden;">
              <span class="icon has-text-info"><i class="fa-solid fa-music"></i></span>
              <div>
                  <strong id="preview-filename" style="display:block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; line-height: 1;">Nome do Arquivo</strong>
                  <span class="is-size-7 has-text-grey">Filtrando projetos abaixo...</span>
              </div>
          </div>
          <audio id="browser-audio-player" controls style="height: 30px; max-width: 300px;"></audio>
      </div>
  </div>

  <div class="columns is-mobile is-vcentered mb-5">
    <div class="column is-auto">
      <h2 class="title is-4 has-text-grey-dark">
        <span class="icon has-text-info mr-2"><i class="fa-solid fa-filter"></i></span>
        Filtro: <code id="filter-display-name" style="color: #d63384;">(nenhum selecionado)</code>
      </h2>
    </div>
    <div class="column is-narrow">
      <button id="clearFilterButton" class="button is-small is-danger is-light">
        <span class="icon is-small"><i class="fa-solid fa-xmark"></i></span>
        <span>Limpar Filtro</span>
      </button>
    </div>
  </div>

  <div id="project-list" class="columns is-multiline">
    {% for projeto in site.data.all %}
      
      {% assign project_samples_list = "" %}
      {% for track in projeto.tracks %}
          {% if track.sample %}
              {% for inst in track.sample %}
                  {% if inst.sample_name %}
                      {% assign project_samples_list = project_samples_list | append: inst.sample_name | append: "," %}
                  {% endif %}
              {% endfor %}
          {% elsif track.sample_name %}
              {% assign project_samples_list = project_samples_list | append: track.sample_name | append: "," %}
          {% endif %}
      {% endfor %}

      {% if project_samples_list != "" %}
        
        <div class="column is-12-mobile is-6-tablet is-4-desktop is-3-widescreen project-item" 
             data-samples="{{ project_samples_list }}">
          
          <div class="card project-card" style="height: 100%; background-color: #f0f8ff; border: 1px solid #cfe8fc; border-radius: 12px; display: flex; flex-direction: column; position: relative;">

            {% 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' %}
            {% assign page_url = '../mmp_pages/' | append: file_url | append: '.html' %}

            <a href="{{ page_url }}" style="text-decoration: none; flex: 1; display: flex; flex-direction: column;">
                <div class="card-content has-text-centered p-4" style="flex: 1; display: flex; flex-direction: column;">

                  <div style="width: 50px; height: 50px; background-color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 0.5rem auto; box-shadow: 0 2px 5px rgba(0,0,0,0.05);">
                    <span class="icon" style="color: #3273dc;"><i class="fa-solid fa-microphone-lines fa-lg"></i></span>
                  </div>

                  <p class="title is-6 mb-2" style="color: #205081; word-break: break-word; font-weight: 700; line-height: 1.2;">
                    {{ projeto.file }}
                  </p>

                  {% if projeto.bpm %}
                    <div class="mb-3">
                        <span class="tag is-dark is-rounded is-light" style="font-size: 0.7rem; font-weight: bold; border: 1px solid #ccc;">
                            🎵 {{ projeto.bpm }} BPM
                        </span>
                    </div>
                  {% else %}
                    <div class="mb-3" style="height: 24px;"></div>
                  {% endif %}

                  <div style="flex: 1;"></div> 

                  <div class="tags is-centered is-gapless mb-0 mt-2" style="gap: 4px; justify-content: center;">
                       {% assign unique_list = project_samples_list | split: "," | uniq %}
                       {% for item in unique_list %}
                         {% if item != "" %}
                           {% assign item_display = item | split: '/' | last | split: '\\' | last %}
                           <span class="tag is-white sample-tag-item clickable-tag" data-value="{{ item }}"
                              style="font-size: 0.65rem; border: 1px solid #deeaf6; color: #5b7da3; padding: 0 6px; height: 1.5em; text-decoration: none; cursor: pointer;">
                               {{ item_display | truncate: 15 }}
                           </span>
                         {% endif %}
                       {% endfor %}
                  </div>
                </div>
            </a>

            <footer class="card-footer" style="border-top: 1px solid #cfe8fc; background-color: #fff; border-radius: 0 0 12px 12px; overflow: hidden;">
              <a href="#" class="card-footer-item js-open-modal" data-target-url="{{ page_url }}" data-modal-title="Detalhes: {{ projeto.file }}" data-full-btn-text="Ir para Página" data-full-btn-link="{{ page_url }}" style="color: #5b7da3; font-size: 0.8rem; font-weight: 600; border-right: 1px solid #eee; transition: background 0.2s;">Ver</a>
              {% assign creation_url = '/mmpSearch/creation.html?project=' | append: projeto.file %}
              {% assign embed_url = creation_url | append: '&embed=true' %}
              <a href="#" class="card-footer-item js-open-modal" data-target-url="{{ embed_url }}" data-modal-title="Editor: {{ projeto.file }}" data-full-btn-text="Abrir Editor" data-full-btn-link="{{ creation_url }}" style="color: #3273dc; font-size: 0.8rem; font-weight: 600;">Editar</a>
            </footer>

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

</div>

Preview

Fechar Abrir