42 KiB
Executable File
| layout | title | permalink |
|---|---|---|
| default | MMPSearch - Projetos | /projetos/ |
{% assign list_bpm = "" %} {% assign list_plugins = "" %} {% assign list_instruments = "" %} {% assign list_samples = "" %} {% assign list_bassline = "" %} {% assign list_automation = "" %}
{% for p in site.data.all %} {% assign raw_bpm = p.bpm | append: "" %} {% if raw_bpm != "" and raw_bpm != "N/A" and raw_bpm != "nil" %} {% assign list_bpm = list_bpm | append: raw_bpm | append: "|||" %} {% endif %}
{% for item in p.tags.plugin %}{% if item != "" %}{% assign list_plugins = list_plugins | append: item | append: "|||" %}{% endif %}{% endfor %}
{% if p.tags.bassline %}{% for item in p.tags.bassline %}{% if item != "" %}{% assign list_bassline = list_bassline | append: item | append: "|||" %}{% endif %}{% endfor %}{% endif %}
{% if p.tags.automation %}{% for item in p.tags.automation %}{% if item != "" %}{% assign list_automation = list_automation | append: item | append: "|||" %}{% endif %}{% endfor %}{% endif %}
{% for track in p.tracks %}
{% if track.instruments %}{% for inst in track.instruments %}{% if inst.instrument_name %}{% assign list_instruments = list_instruments | append: inst.instrument_name | append: "|||" %}{% endif %}{% endfor %}
{% elsif track.instrument_name %}{% assign list_instruments = list_instruments | append: track.instrument_name | append: "|||" %}{% endif %}
{% if track.sample %}{% for smp in track.sample %}{% assign list_samples = list_samples | append: smp.sample_name | append: "|||" %}{% endfor %}
{% elsif track.sample_name %}{% assign list_samples = list_samples | append: track.sample_name | append: "|||" %}{% endif %}
{% endfor %}
{% endfor %}
{% assign unique_bpm_array = list_bpm | split: "|||" | uniq | sort %} {% assign unique_plugins = list_plugins | split: "|||" | uniq | sort %} {% assign unique_instruments = list_instruments | split: "|||" | uniq | sort %} {% assign unique_samples = list_samples | split: "|||" | uniq | sort %} {% assign unique_bassline = list_bassline | split: "|||" | uniq | sort %} {% assign unique_automation = list_automation | split: "|||" | uniq | sort %}
{% assign min_limit = 0 %} {% assign max_limit = 300 %} {% if unique_bpm_array.size > 0 %} {% assign last_bpm = unique_bpm_array | last | plus: 0 %} {% if last_bpm > max_limit %}{% assign max_limit = last_bpm %}{% endif %} {% endif %}
<div class="tabs is-centered is-boxed is-medium mb-5">
{% include sidebar.html %}
</div>
<div class="columns is-vcentered mb-4">
<div class="column">
<h1 class="title is-3 has-text-grey-dark">📁 Projetos Disponíveis</h1>
<p class="subtitle is-6 has-text-grey">
Utilize os filtros laterais para refinar sua busca.
</p>
</div>
<div class="column is-narrow">
<div class="field is-grouped is-grouped-multiline" style="justify-content: flex-end;">
<div class="control has-icons-left">
<div class="select is-small is-rounded">
<select id="star-filter">
<option value="all">Dificuldade: Todas</option>
<option value="5">🔥 Expert (5)</option>
<option value="4">⚡ Avançado (4)</option>
<option value="3">🔷 Médio (3)</option>
<option value="2">🟢 Básico (2)</option>
</select>
</div>
<div class="icon is-small is-left has-text-warning"><i class="fa-solid fa-star"></i></div>
</div>
<div class="control has-icons-left">
<div class="select is-small is-rounded">
<select id="sort-select">
<option value="default">Ordem Padrão</option>
<option value="stars_desc">⭐ Mais Complexos</option>
<option value="stars_asc">⭐ Mais Simples</option>
<option value="intensity_desc">🔥 Mais Intensos</option>
<option value="intensity_asc">❄️ Mais Calmos</option>
<option value="bpm_desc">⚡ BPM (Rápido)</option>
</select>
</div>
<div class="icon is-small is-left"><i class="fa-solid fa-sort"></i></div>
</div>
<div class="control">
<button id="reset-all-filters" class="button is-danger is-light is-small">
<span class="icon"><i class="fa-solid fa-trash-can"></i></span>
<span>Limpar Tudo</span>
</button>
</div>
</div>
</div>
</div>
<div class="columns">
<div class="column is-3">
<div class="box p-3" style="background: #fcfcfc; border: 1px solid #eee;">
<div class="field mb-5">
<label class="label is-size-7 has-text-grey">BUSCA TEXTUAL</label>
<div class="control has-icons-left has-icons-right">
<input class="input is-small" type="text" id="search-input" placeholder="Nome, plugin...">
<span class="icon is-small is-left"><i class="fa-solid fa-magnifying-glass"></i></span>
<span class="icon is-small is-right is-clickable js-clear-input" style="pointer-events: all; cursor: pointer;">
<i class="fa-solid fa-xmark"></i>
</span>
</div>
</div>
<hr class="my-3">
<details open>
<summary class="menu-label has-text-weight-bold mb-2 clickable-summary">Gêneros (IA)</summary>
<div class="filter-header-actions">
<button class="button is-ghost is-small p-0 js-clear-group" data-target="genres" style="height: auto; font-size: 0.65rem;">
<span class="icon"><i class="fa-solid fa-eraser"></i></span> <span>Limpar</span>
</button>
</div>
<div class="filter-content" id="sidebar-genres" style="max-height: 200px; overflow-y: auto;">
<p class="is-size-7 has-text-grey-light p-1">Carregando...</p>
</div>
</details>
<hr class="my-3">
<details>
<summary class="menu-label has-text-weight-bold mb-2 clickable-summary">Tom / Key</summary>
<div class="filter-header-actions">
<button class="button is-ghost is-small p-0 js-clear-group" data-target="keys" style="height: auto; font-size: 0.65rem;">
<span class="icon"><i class="fa-solid fa-eraser"></i></span> <span>Limpar</span>
</button>
</div>
<div class="filter-content" style="max-height: 200px; overflow-y: auto;">
{% assign keys_list = "C,Cm,C#,C#m,Db,Dm,D,D#m,Eb,E,Em,F,Fm,F#,F#m,Gb,G,Gm,G#,Ab,A,Am,Bb,B,Bm" | split: "," %}
{% for key in keys_list %}
<label class="checkbox is-block mb-1 is-size-7">
<input type="checkbox" class="filter-checkbox" data-category="keys" value="{{ key }}">
🎹 {{ key }}
</label>
{% endfor %}
</div>
</details>
<hr class="my-3">
<details>
<summary class="menu-label has-text-weight-bold mb-2 clickable-summary">Faixa de BPM</summary>
<div class="filter-header-actions">
<button class="button is-ghost is-small p-0 js-clear-group" data-target="bpm" style="height: auto; font-size: 0.65rem;">
<span class="icon"><i class="fa-solid fa-rotate-left"></i></span> <span>Resetar</span>
</button>
</div>
<div class="filter-content px-1 pb-2">
<div class="range-slider-container mt-4 mb-5">
<div class="slider-track" id="slider-track"></div>
<input type="range" id="range-min" min="{{ min_limit }}" max="{{ max_limit }}" value="{{ min_limit }}">
<input type="range" id="range-max" min="{{ min_limit }}" max="{{ max_limit }}" value="{{ max_limit }}">
</div>
<div class="columns is-mobile is-variable is-1">
<div class="column"><input class="input is-small has-text-centered" type="number" id="bpm-min" value="{{ min_limit }}"></div>
<div class="column"><input class="input is-small has-text-centered" type="number" id="bpm-max" value="{{ max_limit }}"></div>
</div>
</div>
</details>
<hr class="my-3">
{% assign filter_groups = "instruments|Instrumentos,plugins|Plugins,bassline|Bassline,automation|Automação,samples|Samples" | split: "," %}
{% for group in filter_groups %}
{% assign parts = group | split: "|" %}
{% assign cat_key = parts[0] %}
{% assign cat_label = parts[1] %}
<details {% if cat_key == 'instruments' or cat_key == 'plugins' %}open{% endif %}>
<summary class="menu-label has-text-weight-bold mb-2 clickable-summary">{{ cat_label }}</summary>
<div class="filter-header-actions">
<button class="button is-ghost is-small p-0 js-clear-group" data-target="{{ cat_key }}" style="height: auto; font-size: 0.65rem;">
<span class="icon"><i class="fa-solid fa-eraser"></i></span> <span>Limpar</span>
</button>
</div>
<div class="filter-content" style="max-height: 200px; overflow-y: auto;">
{% assign current_list = "" %}
{% if cat_key == 'instruments' %}{% assign current_list = unique_instruments %}
{% elsif cat_key == 'plugins' %}{% assign current_list = unique_plugins %}
{% elsif cat_key == 'bassline' %}{% assign current_list = unique_bassline %}
{% elsif cat_key == 'automation' %}{% assign current_list = unique_automation %}
{% elsif cat_key == 'samples' %}{% assign current_list = unique_samples %}
{% endif %}
{% for item in current_list %}{% if item != "" %}
<label class="checkbox is-block mb-1 is-size-7">
<input type="checkbox" class="filter-checkbox" data-category="{{ cat_key }}" value="{{ item }}"> {{ item }}
</label>
{% endif %}{% endfor %}
</div>
</details>
<hr class="my-3">
{% endfor %}
</div>
</div>
<div class="column is-9">
<div class="notification is-info is-light mb-4 is-hidden" id="results-count-bar">
Encontrados <span id="visible-count" class="has-text-weight-bold">0</span> projetos.
</div>
<div id="project-list" class="columns is-multiline">
{% assign project_pages = site.pages | where_exp: "page", "page.path contains 'projetos/'" | sort: "title" %} {% for page in project_pages %} {% if page.url != '/projetos/' %}
{% assign raw_bpm = page.bpm | append: "" %} {% if raw_bpm == "" or raw_bpm == "N/A" or raw_bpm == "nil" %}{% assign p_bpm = 0 %}{% else %}{% assign p_bpm = raw_bpm | plus: 0 %}{% endif %} {% assign p_insts_array = "" | split: "," %} {% for track in page.tracks %}{% if track.instruments %}{% for inst in track.instruments %}{% if inst.instrument_name %}{% assign p_insts_array = p_insts_array | push: inst.instrument_name %}{% endif %}{% endfor %}{% elsif track.instrument_name %}{% assign p_insts_array = p_insts_array | push: track.instrument_name %}{% endif %}{% endfor %} {% assign p_instruments_str = p_insts_array | uniq | join: ',' %} {% assign p_plugins = page.tags.plugin | join: ',' %} {% assign p_bassline = page.tags.bassline | join: ',' %} {% assign p_automation = page.tags.automation | join: ',' %} {% assign p_samples = page.tags.sample | join: ',' %} {% assign p_name = page.title | default: page.name | downcase %}
{{ page.title | default: page.name | replace: '.html', '' }}
🎸 INSTRUMENTS
{% if page.tags.plugin.size > 0 %}
🔌 PLUGINS
{% if page.tags.bassline.size > 0 %}
🎹 BASSLINE
{% if page.tags.automation.size > 0 %}
🎚️ AUTOMATION
{% if page.tags.sample.size > 0 %}
🎤 SAMPLES
<div id="no-results" class="has-text-centered is-hidden mt-6">
<span class="icon is-large has-text-grey-light"><i class="fa-solid fa-face-frown fa-3x"></i></span>
<p class="subtitle mt-3 has-text-grey">Nenhum projeto encontrado.</p>
<button class="button is-small is-info mt-2" onclick="document.getElementById('reset-all-filters').click()">Limpar Filtros</button>
</div>
</div>
</div>
{% include preview-modal.html %}