diff --git a/_layouts/projetos.html b/_layouts/projetos.html
index 07ef033..d8ed794 100644
--- a/_layouts/projetos.html
+++ b/_layouts/projetos.html
@@ -149,35 +149,79 @@ title: "{{ page.file }}"
{% comment %}
- >>> INÍCIO DA LÓGICA DE STEPS MELHORADA <<<
- Container da grade de steps
+ >>> INÍCIO DA LÓGICA DE STEPS CLICÁVEIS (4-steps) <<<
+ (O container agora é 'row' para manter os chunks na horizontal)
{% endcomment %}
-
- {% for step_active in pattern_steps %}
+
- {% comment %} >>> FIM DA LÓGICA DE STEPS MELHORADA <<< {% endcomment %}
+ {% comment %} >>> FIM DA LÓGICA DE STEPS CLICÁVEIS <<< {% endcomment %}
{% endif %}
{% endfor %}
diff --git a/pattern.html b/pattern.html
new file mode 100644
index 0000000..c7da1d3
--- /dev/null
+++ b/pattern.html
@@ -0,0 +1,404 @@
+---
+layout: default
+title: Projetos por Pattern Rítmico
+permalink: /pattern/
+---
+
+
+ {% include sidebar.html %}
+
+
+
+
+
+ Projetos que possuem patterns similares:
+
+
+
+
+ Limpar filtro
+
+
+
+
+
+
Desenhe um pattern (até 16 steps) para buscar:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% comment %}
+ ... O SEU LOOP LIQUID DE PROJETOS VEM AQUI ...
+ NENHUMA MUDANÇA É NECESSÁRIA NO LIQUID.
+ Ele continua exatamente como estava, gerando os 'project-item'
+ e os 'data-patterns' com chunks de 4 steps.
+ {% endcomment %}
+
+ {% for projeto in site.data.all %}
+
+ {% assign project_patterns_flat = "" | split: "," %}
+ {% assign project_patterns_data = "" | split: "," %}
+
+ {% for track in projeto.tracks %}
+ {% if track.instruments %}
+ {% for instrument in track.instruments %}
+
+ {% assign display_name = instrument.instrument_name %}
+ {% if display_name contains "audiofileprocessor" and instrument.patterns %}
+ {% assign first_pattern_name = instrument.patterns | map: 'name' | first %}
+ {% if first_pattern_name and first_pattern_name != empty %}
+ {% assign display_name = first_pattern_name | remove: ".ogg" | remove: ".wav" | remove: ".flac" | remove: ".mp3" %}
+ {% elsif instrument.audiofileprocessor.src %}
+ {% assign src_parts = instrument.audiofileprocessor.src | split: '/' %}
+ {% assign file_name = src_parts | last %}
+ {% assign display_name = file_name | remove: ".ogg" | remove: ".wav" | remove: ".flac" | remove: ".mp3" %}
+ {% endif %}
+ {% endif %}
+ {% if display_name == nil or display_name == "" %}
+ {% assign display_name = "Instrumento" %}
+ {% endif %}
+
+
+ {% if instrument.patterns %}
+ {% for pattern in instrument.patterns %}
+ {% assign pattern_steps = pattern.steps %}
+ {% if pattern_steps and pattern_steps.size > 0 %}
+
+ {% assign total_steps = pattern_steps.size %}
+ {% assign chunk_size = 4 %}
+ {% assign num_chunks = total_steps | divided_by: chunk_size %}
+
+ {% assign remainder = total_steps | modulo: chunk_size %}
+ {% if remainder > 0 %}
+ {% assign num_chunks = num_chunks | plus: 1 %}
+ {% endif %}
+
+ {% for i in (0..num_chunks) %}
+ {% assign start_index = i | times: chunk_size %}
+ {% assign current_chunk_array = pattern_steps | slice: start_index, chunk_size %}
+
+ {% if current_chunk_array.size > 0 %}
+ {% assign chunk_string = "" %}
+ {% for step in current_chunk_array %}
+ {% if step == true or step == 'true' or step == 1 %}
+ {% assign chunk_string = chunk_string | append: '1' %}
+ {% else %}
+ {% assign chunk_string = chunk_string | append: '0' %}
+ {% endif %}
+ {% endfor %}
+
+ {% assign data_pair = chunk_string | append: '::' | append: display_name %}
+
+ {% unless project_patterns_flat contains chunk_string %}
+ {% assign project_patterns_flat = project_patterns_flat | push: chunk_string %}
+ {% endunless %}
+
+ {% unless project_patterns_data contains data_pair %}
+ {% assign project_patterns_data = project_patterns_data | push: data_pair %}
+ {% endunless %}
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+ {% endfor %}
+
+ {% if project_patterns_flat.size > 0 %}
+ {% assign project_patterns_string = project_patterns_flat | join: ',' %}
+
+
+
+ {% 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' %}
+
+
+ {{ projeto.file }}
+
+
+
+
Patterns (4-steps):
+
+
+
+
+
+ {% endif %}
+ {% endfor %}
+
+
+
+
+
+{% comment %}
+ SCRIPT FINAL (TOTALMENTE REESCRITO PARA 16-STEPS "AND" FILTER)
+{% endcomment %}
+
\ No newline at end of file