@@ -121,7 +123,7 @@ permalink: /projetos/
{% else %}
{% endif %}
-
+
{% if page.tags %}
@@ -251,14 +253,21 @@ permalink: /projetos/
.project-card:hover .title {
color: #3273dc !important;
}
- .category-reveal summary {
- list-style: none;
- transition: all 0.2s ease;
+ /* Correção para a barra não esticar */
+ .category-reveal {
+ width: 100%;
+ flex-shrink: 0; /* Impede que encolha demais */
+ flex-grow: 0; /* Impede que cresça para preencher espaço vazio */
}
- .category-reveal summary::-webkit-details-marker { display: none; }
- .category-reveal summary:hover {
- background-color: #f8fbff;
- border-color: #3273dc;
+
+ .category-reveal summary {
+ list-style: none;
+ transition: all 0.2s ease;
+ height: auto !important; /* Força altura automática */
+ min-height: 22px;
+ white-space: normal; /* Permite que o texto quebre se for longo */
+ display: flex;
+ align-items: center;
}
.category-reveal[open] summary {
background-color: #eef6fc !important;
@@ -384,22 +393,33 @@ document.addEventListener('DOMContentLoaded', () => {
})
.catch(console.warn);
- // Função para desenhar as estrelas com COR FIXA (Gold)
- function gerarEstrelas(num) {
- const n = Math.round(num) || 0;
- // Cor #f1c40f é o amarelo padrão de estrelas
- let html = `
`;
-
- for (let i = 1; i <= 5; i++) {
- if (i <= n) {
- html += '';
- } else {
- // Estrela vazia em cinza claro para contraste
- html += '';
- }
+ // Função atualizada para Badge de Dificuldade
+ function renderizarDificuldade(num) {
+ const n = Math.round(num) || 1;
+ let label = "Básico";
+ let icon = "fa-leaf"; // Ícone padrão
+ let colorClass = "is-success"; // Verde
+
+ if (n >= 4.5) {
+ label = "Expert";
+ icon = "fa-fire";
+ colorClass = "is-danger"; // Vermelho
+ } else if (n >= 3.5) {
+ label = "Avançado";
+ icon = "fa-bolt";
+ colorClass = "is-warning"; // Amarelo/Laranja
+ } else if (n >= 2.5) {
+ label = "Intermediário";
+ icon = "fa-layer-group";
+ colorClass = "is-info"; // Azul
}
- html += '
';
- return html;
+
+ // Retorna uma tag HTML bonita e visível
+ return `
+
+ ${label}
+
+ `;
}
function enrichCards(data) {
@@ -450,17 +470,18 @@ document.addEventListener('DOMContentLoaded', () => {
iaDiv.style.display = "flex";
iaDiv.style.flexDirection = "column";
iaDiv.style.alignItems = "center";
- iaDiv.style.gap = "4px";
- iaDiv.className = "mt-2";
+ iaDiv.style.gap = "6px"; // Aumentei um pouco o gap
+ iaDiv.className = "mt-3"; // Margem topo para separar do título
- // 1. Estrelas
- const starsDiv = document.createElement('div');
- starsDiv.innerHTML = gerarEstrelas(estrelas);
- iaDiv.appendChild(starsDiv);
+ // 1. Renderiza a Dificuldade (Nova função)
+ const diffDiv = document.createElement('div');
+ diffDiv.innerHTML = renderizarDificuldade(estrelas);
+ iaDiv.appendChild(diffDiv);
// 2. Tags (Gênero + Tom)
const tagsRow = document.createElement('div');
tagsRow.className = "tags is-centered mb-0";
+ tagsRow.style.gap = "4px";
if(genero !== "Unknown") {
let color = 'is-primary';
@@ -468,12 +489,21 @@ document.addEventListener('DOMContentLoaded', () => {
if(genero === 'Hip Hop') color = 'is-warning';
if(genero === 'Rock') color = 'is-danger';
- tagsRow.innerHTML += `
🤖 ${genero}`;
+ // Tag de Gênero
+ tagsRow.innerHTML += `
🤖 ${genero}`;
}
+ // Adiciona o Tom se existir
tagsRow.innerHTML += tomHtml;
+
iaDiv.appendChild(tagsRow);
+ // Limpa o container antes de adicionar para evitar duplicatas se rodar 2x
+ bpmContainer.innerHTML = '';
+ // Re-adiciona o BPM original se necessário, ou apenas adiciona o novo bloco IA
+ if(card.dataset.bpm_real > 0) {
+ bpmContainer.innerHTML = `
🎵 ${Math.round(card.dataset.bpm_real)} BPM`;
+ }
bpmContainer.appendChild(iaDiv);
}
});
@@ -570,4 +600,4 @@ document.addEventListener('DOMContentLoaded', () => {
border: 1px solid #dbdbdb;
color: #555;
}
-
\ No newline at end of file
+