reformula buscas
Deploy / Deploy (push) Successful in 1m58s Details

This commit is contained in:
JotaChina 2025-12-17 17:09:20 -03:00
parent c2b3ec0176
commit be3e1ff9e9
1 changed files with 67 additions and 68 deletions

View File

@ -269,74 +269,6 @@ permalink: /projetos/
{% elsif track.instrument_name %}{% assign p_insts_array = p_insts_array | push: track.instrument_name %}{% endif %}
{% endfor %}
{% assign has_patterns_display = false %}
{% capture patterns_html_content %}
<div class="px-1 py-1">
{% for track in page.tracks %}
{% if track.instruments %}
{% for inst in track.instruments %}
{% if inst.patterns %}
{% assign current_inst_patterns = "" | split: "," %}
{% for pattern in inst.patterns %}
{% assign p_steps = pattern.steps %}
{% if p_steps and p_steps.size > 0 %}
{% assign total_s = p_steps.size %}
{% assign n_chunks = total_s | divided_by: 4 %}
{% for i in (0..n_chunks) %}
{% assign idx = i | times: 4 %}
{% assign chunk = p_steps | slice: idx, 4 %}
{% if chunk.size > 0 %}
{% assign c_str = "" %}
{% for s in chunk %}
{% if s == true or s == 1 or s == 'true' %}{% assign c_str = c_str | append: "1" %}{% else %}{% assign c_str = c_str | append: "0" %}{% endif %}
{% endfor %}
{% if c_str != "0000" %}
{% unless current_inst_patterns contains c_str %}
{% assign current_inst_patterns = current_inst_patterns | push: c_str %}
{% endunless %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% if current_inst_patterns.size > 0 %}
{% assign has_patterns_display = true %}
<div class="pattern-row">
<span style="font-weight:600; max-width: 45%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;">
{{ inst.instrument_name | truncate: 12 }}
</span>
<div style="display:flex; gap:2px;">
{% for pat in current_inst_patterns %}
<div class="pattern-mini-grid" title="Pattern: {{ pat }}">
{% assign bits = pat | split: '' %}
{% for bit in bits %}
<div class="mini-step {% if bit == '1' %}active{% else %}inactive{% endif %}"></div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
</div>
{% endcapture %}
{% if has_patterns_display %}
<details class="category-reveal mb-1" style="width: 100%;">
<summary class="tag is-white summary-btn">
<div class="tag-label"><span>🥁</span> <span class="tag-text">RITMO</span></div>
<span class="icon is-small chevron"><i class="fa-solid fa-chevron-down"></i></span>
</summary>
<div class="mt-1 mb-2 has-text-left" style="background: #fdfdfd; border-radius: 4px; border: 1px solid #f0f0f0;">
{{ patterns_html_content }}
</div>
</details>
{% endif %}
{% assign p_patterns_str = project_patterns_flat | join: ',' %}
{% assign p_instruments_str = p_insts_array | uniq | join: ',' %}
{% assign p_plugins = page.tags.plugin | join: ',' %}
@ -404,6 +336,73 @@ permalink: /projetos/
</details>
{% endif %}
{% assign has_patterns_display = false %}
{% capture patterns_html_content %}
<div class="px-1 py-1">
{% for track in page.tracks %}
{% if track.instruments %}
{% for inst in track.instruments %}
{% if inst.patterns %}
{% assign current_inst_patterns = "" | split: "," %}
{% for pattern in inst.patterns %}
{% assign p_steps = pattern.steps %}
{% if p_steps and p_steps.size > 0 %}
{% assign total_s = p_steps.size %}
{% assign n_chunks = total_s | divided_by: 4 %}
{% for i in (0..n_chunks) %}
{% assign idx = i | times: 4 %}
{% assign chunk = p_steps | slice: idx, 4 %}
{% if chunk.size > 0 %}
{% assign c_str = "" %}
{% for s in chunk %}
{% if s == true or s == 1 or s == 'true' %}{% assign c_str = c_str | append: "1" %}{% else %}{% assign c_str = c_str | append: "0" %}{% endif %}
{% endfor %}
{% if c_str != "0000" %}
{% unless current_inst_patterns contains c_str %}
{% assign current_inst_patterns = current_inst_patterns | push: c_str %}
{% endunless %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% if current_inst_patterns.size > 0 %}
{% assign has_patterns_display = true %}
<div class="pattern-row">
<span style="font-weight:600; max-width: 45%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;">
{{ inst.instrument_name | truncate: 12 }}
</span>
<div style="display:flex; gap:2px;">
{% for pat in current_inst_patterns %}
<div class="pattern-mini-grid" title="Pattern: {{ pat }}">
{% assign bits = pat | split: '' %}
{% for bit in bits %}
<div class="mini-step {% if bit == '1' %}active{% else %}inactive{% endif %}"></div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
</div>
{% endcapture %}
{% if has_patterns_display %}
<details class="category-reveal mb-1" style="width: 100%;">
<summary class="tag is-white summary-btn">
<div class="tag-label"><span>🥁</span> <span class="tag-text">RITMO</span></div>
<span class="icon is-small chevron"><i class="fa-solid fa-chevron-down"></i></span>
</summary>
<div class="mt-1 mb-2 has-text-left" style="background: #fdfdfd; border-radius: 4px; border: 1px solid #f0f0f0;">
{{ patterns_html_content }}
</div>
</details>
{% endif %}
{% if page.tags.plugin.size > 0 %}
<details class="category-reveal mb-1" style="width: 100%;">
<summary class="tag is-white summary-btn"><div class="tag-label"><span>🔌</span> <span class="tag-text">PLUGINS</span></div><span class="icon is-small chevron"><i class="fa-solid fa-chevron-down"></i></span></summary>