From c688a1734f99e336938c59966b06ef9298bf8e49 Mon Sep 17 00:00:00 2001 From: JotaChina Date: Wed, 17 Dec 2025 16:05:56 -0300 Subject: [PATCH] reformula buscas --- pages/projetos.html | 98 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/pages/projetos.html b/pages/projetos.html index 5d6c1328..27376e90 100755 --- a/pages/projetos.html +++ b/pages/projetos.html @@ -269,6 +269,74 @@ 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 %} +
+ {% 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 %} +
+ + {{ inst.instrument_name | truncate: 12 }} + +
+ {% for pat in current_inst_patterns %} +
+ {% assign bits = pat | split: '' %} + {% for bit in bits %} +
+ {% endfor %} +
+ {% endfor %} +
+
+ {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% endfor %} +
+ {% endcapture %} + + {% if has_patterns_display %} +
+ +
🥁 RITMO
+ +
+
+ {{ patterns_html_content }} +
+
+ {% 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: ',' %} @@ -450,6 +518,36 @@ permalink: /projetos/ background-color: #3273dc !important; border-color: #205081 !important; } + /* Steps nos cards dos projetos */ + .pattern-mini-grid { + display: inline-flex; + gap: 1px; + padding: 1px; + border: 1px solid #deeaf6; + border-radius: 2px; + background-color: #fff; + margin-right: 2px; + vertical-align: middle; + } + .mini-step { + width: 3px; + height: 6px; + border-radius: 1px; + } + .mini-step.active { background-color: #3273dc; } + .mini-step.inactive { background-color: #eee; } + + /* Ajuste para o container dos patterns dentro do card */ + .pattern-row { + display: flex; + align-items: center; + justify-content: space-between; + font-size: 0.6rem; + color: #555; + padding: 2px 4px; + border-bottom: 1px dashed #f0f0f0; + } + .pattern-row:last-child { border-bottom: none; }