Upgrade interface do MMPSearch
This commit is contained in:
1 parent
7d9d2b0f63
commit
fd52173666
21 files changed
+2438
-1547
No files matched your search
@@ -0,0 +1,104 @@
|
||||
<div
|
||||
class="instrument-wrapper mb-4 p-2"
|
||||
style="border-left: 3px solid #3298dc; background: #fff"
|
||||
data-plugin-name="{{ instrument.instrument_name | downcase }}"
|
||||
data-params="{{ instrument | jsonify | escape }}"
|
||||
>
|
||||
<li style="list-style: none">
|
||||
<details {% if should_open %}open{% endif %}>
|
||||
<summary style="cursor: pointer; outline: none; margin-bottom: 0.5rem">
|
||||
<div style="display: inline-flex; align-items: center; gap: 8px">
|
||||
{% assign display_name = instrument.instrument_name %} {% assign
|
||||
plugin_name = instrument.instrument_name | downcase %} {% assign
|
||||
is_sample = false %} {% if plugin_name == 'audiofileprocessor' or
|
||||
instrument.audiofileprocessor %}{% assign is_sample = true %}{% endif
|
||||
%} {% if is_sample %} {% if display_name contains "audiofileprocessor"
|
||||
and instrument.patterns %} {% assign first_pattern =
|
||||
instrument.patterns | first %} {% if first_pattern.name %}{% assign
|
||||
display_name = first_pattern.name %}{% endif %} {% elsif
|
||||
instrument.audiofileprocessor.src %} {% assign src_parts =
|
||||
instrument.audiofileprocessor.src | split: '/' %} {% assign
|
||||
display_name = src_parts | last %} {% endif %} {% assign display_name
|
||||
= display_name | remove: ".ogg" | remove: ".wav" %} {% endif %} {%
|
||||
assign instrument_slug = display_name | replace: ' ', '+' %}
|
||||
<a
|
||||
href="{{ '/instruments/?instrument=' | append: instrument_slug | relative_url }}"
|
||||
class="tag is-info is-light"
|
||||
>
|
||||
<strong>{{ display_name }}</strong>
|
||||
{% unless is_sample %}
|
||||
<span class="ml-1" style="font-size: 0.7em">(Synth 🎹)</span>{%
|
||||
endunless %}
|
||||
</a>
|
||||
</div>
|
||||
</summary>
|
||||
|
||||
{% for pattern in instrument.patterns %} {% assign pattern_steps =
|
||||
pattern.steps %} {% if pattern_steps and pattern_steps.size > 0 %}
|
||||
<div
|
||||
class="mt-2 ml-4"
|
||||
style="display: flex; align-items: center; gap: 4px"
|
||||
>
|
||||
<div
|
||||
class="patterns-container"
|
||||
style="display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px"
|
||||
>
|
||||
{% 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 %}
|
||||
<a
|
||||
href="{{ '/pattern/?p=' | append: chunk_string | relative_url }}"
|
||||
style="display: inline-block; opacity: 0.8"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
border: 1px solid #ccc;
|
||||
padding: 1px;
|
||||
background: #fff;
|
||||
"
|
||||
>
|
||||
{% for step_active in current_chunk_array %}
|
||||
<div
|
||||
style="width: 4px; height: 8px; margin-right: 1px; background-color: {% if step_active == true or step_active == 1 %}#4caf50{% else %}#ddd{% endif %};"
|
||||
></div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</a>
|
||||
{% endif %} {% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %} {% endfor %}
|
||||
</details>
|
||||
|
||||
<div class="playback-controls mt-2 pl-4">
|
||||
{% if is_sample %} {% assign sample_src =
|
||||
instrument.audiofileprocessor.src | default: "" | strip %} {% if
|
||||
sample_src != "" %} {% assign audio_filename_with_path = 'src/samples/' |
|
||||
append: sample_src %}
|
||||
<audio
|
||||
controls
|
||||
class="js-sample-player"
|
||||
style="height: 25px; width: 200px"
|
||||
>
|
||||
<source
|
||||
src="{{ audio_filename_with_path | relative_url }}"
|
||||
type="audio/ogg"
|
||||
/>
|
||||
</audio>
|
||||
{% endif %} {% else %}
|
||||
<button class="button is-small is-primary is-outlined js-play-synth-btn">
|
||||
Testar
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
+27
-14
@@ -1,14 +1,27 @@
|
||||
<link rel="stylesheet" href="{{ 'assets/css/sidebar.css' | relative_url }}">
|
||||
|
||||
<div class="subheader">
|
||||
<div class="submenu">
|
||||
<a href="{{ site.baseurl }}">🏠 Home</a>
|
||||
<a href="{{ site.baseurl }}quantasVezesAparecemInstrumentos">🔁 Repetições</a>
|
||||
<a href="{{ site.baseurl }}projetosPorTrack/">📁 Projetos por tipo de track</a>
|
||||
<a href="{{ site.baseurl }}beatsDisponiveis/">🎧 Beats Disponíveis</a>
|
||||
<a href="{{ site.baseurl }}mmp_pages/">🎼 Projetos</a>
|
||||
<a href="{{ site.baseurl }}">🔎 Buscas</a>´
|
||||
<a href="{{ site.baseurl }}creation.html">🧠 Crie seu projeto</a>
|
||||
<a href="{{ site.baseurl }}about/">ℹ️ Sobre</a>
|
||||
</div>
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ '/mmp_pages/' | relative_url }}"
|
||||
><span class="icon is-small"><i class="fa-solid fa-folder-open"></i></span
|
||||
><span>Projetos Disponíveis</span></a
|
||||
>
|
||||
</li>
|
||||
<li class="is-active">
|
||||
<a href="{{ '/projetosPorTrack/' | relative_url }}"
|
||||
><span class="icon is-small"
|
||||
><i class="fa-solid fa-magnifying-glass"></i></span
|
||||
><span>Buscas</span></a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ '/beats/' | relative_url }}"
|
||||
><span class="icon is-small"><i class="fa-solid fa-headphones"></i></span
|
||||
><span>Beats</span></a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ '/creation/' | relative_url }}" class="has-text-primary"
|
||||
><span class="icon is-small"><i class="fa-solid fa-plus-circle"></i></span
|
||||
><span>Crie seu projeto</span></a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
Reference in new issue
Block a user