Spaces:
Running
Running
atualizacao automatica dos dados da CVM
Browse files- .gitattributes +0 -1
- app.js +117 -11
- styles.css +37 -0
.gitattributes
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 2 |
*.duckdb filter=lfs diff=lfs merge=lfs -text
|
| 3 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 4 |
-
media/home_insights.mp4 filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 1 |
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 2 |
*.duckdb filter=lfs diff=lfs merge=lfs -text
|
| 3 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
|
|
app.js
CHANGED
|
@@ -15925,6 +15925,32 @@ async function pageInicio(arg) {
|
|
| 15925 |
.map(([id, txt]) => ({ ...porId.get(id), txt }));
|
| 15926 |
} catch { achados = []; }
|
| 15927 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15928 |
if (!epocaAtual(ep)) return;
|
| 15929 |
|
| 15930 |
// PL por classe (as 4 faixas da legenda), para a versao C e o rodape de todas
|
|
@@ -15934,7 +15960,7 @@ async function pageInicio(arg) {
|
|
| 15934 |
const comum = { tot, casas, fat, totFat, dtRef: estado.meta?.dt_referencia ? dataBR(estado.meta.dt_referencia) : '' };
|
| 15935 |
|
| 15936 |
app.innerHTML = `<div class="home home-v${v}">
|
| 15937 |
-
${v === 'd' ? homeHtmlD(comum, achados) : v === 'a' ? homeHtmlA(comum) : v === 'b' ? homeHtmlB(comum) : homeHtmlC(comum)}
|
| 15938 |
<nav class="home-versoes" aria-label="Versões da página inicial em teste">
|
| 15939 |
<span>versão em teste</span>${HOME_VERSOES.map(([k, t]) =>
|
| 15940 |
`<a href="#/inicio/${k}" class="${k === v ? 'on' : ''}">${k.toUpperCase()} · ${t}</a>`).join('')}
|
|
@@ -15942,7 +15968,7 @@ async function pageInicio(arg) {
|
|
| 15942 |
</div>`;
|
| 15943 |
|
| 15944 |
if (v === 'a' || v === 'd') homeCeu(document.getElementById('homeCeu'), extra, document.getElementById('homeTip'), ep);
|
| 15945 |
-
if (v === 'd') homeCinema();
|
| 15946 |
if (v === 'b') { homeCidade(document.getElementById('homeCidade'), extra, document.getElementById('homeTip'), ep);
|
| 15947 |
homeAnel(document.getElementById('homeAnel'), ep); }
|
| 15948 |
if (v === 'c') { homeTunel(document.getElementById('homeTunel'), fat, ep); homeHistoria(ep); homeCinema(); }
|
|
@@ -16045,7 +16071,51 @@ function homeHtmlA(c) {
|
|
| 16045 |
}
|
| 16046 |
|
| 16047 |
// ------------------------------------------------------------------ versao D --
|
| 16048 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16049 |
const achado = (a, i) => `<a class="home-porta home-achado home-rev" href="#/insights/${encodeURIComponent(a.id)}" style="--i:${i}">
|
| 16050 |
<span class="home-porta-luz" aria-hidden="true"></span>
|
| 16051 |
<span class="home-achado-tema">${esc(a.tema || '')}</span>
|
|
@@ -16058,9 +16128,9 @@ function homeHtmlD(c, achados) {
|
|
| 16058 |
<div class="home-chao" aria-hidden="true"></div>
|
| 16059 |
<div class="home-hero-txt" data-vel="-0.18">
|
| 16060 |
${homeKicker(c)}
|
| 16061 |
-
<h1 class="home-h1">
|
| 16062 |
-
<p class="home-lead">
|
| 16063 |
-
|
| 16064 |
<div class="home-ctas">
|
| 16065 |
<a class="home-btn" href="#/gestoras">Ver as gestoras <span aria-hidden="true">→</span></a>
|
| 16066 |
<a class="home-btn home-btn-2" href="#/titulos">Crédito privado</a>
|
|
@@ -16075,13 +16145,14 @@ function homeHtmlD(c, achados) {
|
|
| 16075 |
${achados.length ? `<section class="home-sec home-portas">
|
| 16076 |
<div class="home-camada home-camada-1" data-vel="0.25" aria-hidden="true"></div>
|
| 16077 |
<div class="home-camada home-camada-2" data-vel="0.5" aria-hidden="true"></div>
|
| 16078 |
-
<div class="home-sec-cab home-rev"><span class="home-num">
|
| 16079 |
<p>Contas feitas sobre a carteira, a cota, a taxa e os documentos de todos os fundos.
|
| 16080 |
Cada cartão abre a lista de casos.</p></div>
|
| 16081 |
<div class="home-grade">${achados.map(achado).join('')}</div>
|
| 16082 |
</section>` : ''}
|
|
|
|
| 16083 |
<section class="home-sec home-cinema-sec">
|
| 16084 |
-
<div class="home-sec-cab home-rev"><span class="home-num">${
|
| 16085 |
<p>Três telas do site gravadas em uso, sem som.</p></div>
|
| 16086 |
<div class="home-cinema" id="homeCinema">
|
| 16087 |
<div class="home-cinema-tela home-tela">
|
|
@@ -16098,7 +16169,7 @@ function homeHtmlD(c, achados) {
|
|
| 16098 |
</div>
|
| 16099 |
</section>
|
| 16100 |
<section class="home-sec home-portas home-portas-d">
|
| 16101 |
-
<div class="home-sec-cab home-rev"><span class="home-num">${
|
| 16102 |
<div class="home-grade">${HOME_PORTAS.map(homePortaHtml).join('')}</div>
|
| 16103 |
</section>
|
| 16104 |
${homeFimHtml()}`;
|
|
@@ -16146,7 +16217,7 @@ function homeHtmlC(c) {
|
|
| 16146 |
<canvas id="homeTunel" class="home-canvas" aria-label="Partículas na proporção do patrimônio por classe"></canvas>
|
| 16147 |
<div class="home-hero-txt home-hero-txt-c">
|
| 16148 |
${homeKicker(c)}
|
| 16149 |
-
<h1 class="home-h1 home-h1-c">
|
| 16150 |
<p class="home-lead">Para onde vai o patrimônio dos fundos brasileiros, quem capta, quem rende e quem
|
| 16151 |
carrega o quê — direto dos dados da CVM.</p>
|
| 16152 |
<div class="home-ctas"><a class="home-btn" href="#/gestoras">Começar <span aria-hidden="true">→</span></a></div>
|
|
@@ -16216,7 +16287,7 @@ function homeEfeitos(ep) {
|
|
| 16216 |
const ioN = new IntersectionObserver(es => es.forEach(e => {
|
| 16217 |
if (e.isIntersecting && !contou.has(e.target)) { contou.add(e.target); homeConta(e.target); }
|
| 16218 |
}), { threshold: 0.4 });
|
| 16219 |
-
raiz.querySelectorAll('.home-stat b, .home-achado-n b').forEach(el => ioN.observe(el));
|
| 16220 |
|
| 16221 |
const io = new IntersectionObserver(es => es.forEach(e => {
|
| 16222 |
if (e.isIntersecting) { e.target.classList.add('home-vis'); io.unobserve(e.target); }
|
|
@@ -16643,6 +16714,41 @@ function homeHistoria(ep) {
|
|
| 16643 |
passos.forEach(p => io.observe(p));
|
| 16644 |
}
|
| 16645 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16646 |
/** VERSAO C: o cinema -- um video grande e os capitulos ao lado. */
|
| 16647 |
function homeCinema() {
|
| 16648 |
const cin = document.getElementById('homeCinema');
|
|
|
|
| 15925 |
.map(([id, txt]) => ({ ...porId.get(id), txt }));
|
| 15926 |
} catch { achados = []; }
|
| 15927 |
}
|
| 15928 |
+
// Conversas (publicas) e cartas (o texto e privado; a contagem por casa nao).
|
| 15929 |
+
// So conversa longa, com 10 assuntos ou mais: as curtas sao, em geral, trecho
|
| 15930 |
+
// de noticiario em que um gestor aparece, e nao cabem numa vitrine.
|
| 15931 |
+
let vozes = null;
|
| 15932 |
+
if (v === 'd') {
|
| 15933 |
+
try {
|
| 15934 |
+
const cartasAbertas = !cfgPriv || privLiberado();
|
| 15935 |
+
const [conv, nConv, nCartas, cartas] = await Promise.all([
|
| 15936 |
+
q(`select v.video_id, v.titulo, v.publicado, v.n_temas, coalesce(g.grupo_nome, v.gestora) gestora
|
| 15937 |
+
from video_lista v left join dim_gestora g using (grupo_id)
|
| 15938 |
+
where v.grupo_id is not null and coalesce(v.n_temas, 0) >= 10 and v.publicado is not null
|
| 15939 |
+
qualify row_number() over (partition by v.grupo_id order by v.publicado desc, v.mencoes desc) <= 2
|
| 15940 |
+
order by v.publicado desc, v.mencoes desc limit 14`),
|
| 15941 |
+
q1(`select count(*)::int n, count(distinct grupo_id)::int g from video_lista where grupo_id is not null`),
|
| 15942 |
+
q1(`select coalesce(sum(n), 0)::int n, count(*)::int g from cartas_contagem where n > 0`),
|
| 15943 |
+
cartasAbertas
|
| 15944 |
+
? q(`select c.grupo_id, coalesce(g.grupo_nome, c.gestora) gestora, c.periodo, c.titulo
|
| 15945 |
+
from cartas c left join dim_gestora g using (grupo_id)
|
| 15946 |
+
where c.periodo is not null and c.grupo_id is not null
|
| 15947 |
+
qualify row_number() over (partition by c.grupo_id order by ${ORDEM_PERIODO_CARTA} desc) = 1
|
| 15948 |
+
order by ${ORDEM_PERIODO_CARTA} desc limit 14`)
|
| 15949 |
+
: Promise.resolve([]),
|
| 15950 |
+
]);
|
| 15951 |
+
vozes = { conv, nConv, nCartas, cartas, cartasAbertas };
|
| 15952 |
+
} catch { vozes = null; }
|
| 15953 |
+
}
|
| 15954 |
if (!epocaAtual(ep)) return;
|
| 15955 |
|
| 15956 |
// PL por classe (as 4 faixas da legenda), para a versao C e o rodape de todas
|
|
|
|
| 15960 |
const comum = { tot, casas, fat, totFat, dtRef: estado.meta?.dt_referencia ? dataBR(estado.meta.dt_referencia) : '' };
|
| 15961 |
|
| 15962 |
app.innerHTML = `<div class="home home-v${v}">
|
| 15963 |
+
${v === 'd' ? homeHtmlD(comum, achados, vozes) : v === 'a' ? homeHtmlA(comum) : v === 'b' ? homeHtmlB(comum) : homeHtmlC(comum)}
|
| 15964 |
<nav class="home-versoes" aria-label="Versões da página inicial em teste">
|
| 15965 |
<span>versão em teste</span>${HOME_VERSOES.map(([k, t]) =>
|
| 15966 |
`<a href="#/inicio/${k}" class="${k === v ? 'on' : ''}">${k.toUpperCase()} · ${t}</a>`).join('')}
|
|
|
|
| 15968 |
</div>`;
|
| 15969 |
|
| 15970 |
if (v === 'a' || v === 'd') homeCeu(document.getElementById('homeCeu'), extra, document.getElementById('homeTip'), ep);
|
| 15971 |
+
if (v === 'd') { homeCinema(); homeTrilhos(ep); }
|
| 15972 |
if (v === 'b') { homeCidade(document.getElementById('homeCidade'), extra, document.getElementById('homeTip'), ep);
|
| 15973 |
homeAnel(document.getElementById('homeAnel'), ep); }
|
| 15974 |
if (v === 'c') { homeTunel(document.getElementById('homeTunel'), fat, ep); homeHistoria(ep); homeCinema(); }
|
|
|
|
| 16071 |
}
|
| 16072 |
|
| 16073 |
// ------------------------------------------------------------------ versao D --
|
| 16074 |
+
/** VERSAO D: conversas e cartas, em duas esteiras que andam sozinhas e se
|
| 16075 |
+
* arrastam. Sem miniatura do YouTube: a imagem seria um pedido ao Google em
|
| 16076 |
+
* toda abertura da pagina inicial (a pagina Conteudo avisa disso; aqui nao). */
|
| 16077 |
+
const homeCasa = g => nomeEmpresa(String(g || '').trim())
|
| 16078 |
+
.replace(/[\s,]+(Ltda\.?|S\.?\s?A\.?|S\/A|Eireli)$/i, '').trim();
|
| 16079 |
+
const semEmoji = t => String(t || '').replace(/[\p{Extended_Pictographic}\u{FE0F}\u{200D}]/gu, '').replace(/\s+/g, ' ').trim();
|
| 16080 |
+
function homeVozesHtml(vz, num) {
|
| 16081 |
+
if (!vz || (!vz.conv.length && !vz.nCartas?.n)) return '';
|
| 16082 |
+
const conv = (r, dup) => `<a class="home-conv${dup ? ' dup' : ''}" href="https://youtu.be/${esc(r.video_id)}"
|
| 16083 |
+
target="_blank" rel="noopener noreferrer" draggable="false"${dup ? ' aria-hidden="true" tabindex="-1"' : ''}>
|
| 16084 |
+
<span class="home-conv-d">${esc(dataBR(r.publicado))} · ${nf(Number(r.n_temas) || 0, 0)} assuntos</span>
|
| 16085 |
+
<span class="home-conv-t">${esc(semEmoji(r.titulo))}</span>
|
| 16086 |
+
<span class="home-conv-q">${esc(homeCasa(r.gestora))}</span></a>`;
|
| 16087 |
+
const carta = (r, dup) => {
|
| 16088 |
+
const tit = semEmoji(r.titulo);
|
| 16089 |
+
const frase = tit.split(' ').length >= 3 && tit.length >= 14;
|
| 16090 |
+
return `<a class="home-conv home-carta${dup ? ' dup' : ''}" href="#/cartas/${r.grupo_id}" draggable="false"${
|
| 16091 |
+
dup ? ' aria-hidden="true" tabindex="-1"' : ''}>
|
| 16092 |
+
<span class="home-conv-d">carta · ${rotuloPeriodoCarta(r.periodo)}</span>
|
| 16093 |
+
<span class="home-conv-t">${esc(homeCasa(r.gestora))}</span>
|
| 16094 |
+
<span class="home-conv-q">${frase ? esc(tit) : ''}</span></a>`;
|
| 16095 |
+
};
|
| 16096 |
+
const trilho = (linhas, f, inv) => `<div class="home-rail${inv ? ' home-rail-inv' : ''}">
|
| 16097 |
+
<div class="home-rail-in">${linhas.map(r => f(r, false)).join('')}${linhas.map(r => f(r, true)).join('')}</div></div>`;
|
| 16098 |
+
const nC = vz.nCartas || { n: 0, g: 0 };
|
| 16099 |
+
return `<section class="home-sec home-vozes">
|
| 16100 |
+
<div class="home-sec-cab home-rev"><span class="home-num">${num}</span><h2>O que os gestores andam dizendo</h2>
|
| 16101 |
+
<p>Entrevistas, lives e cartas de gestão, indexadas por assunto e por ativo citado.</p></div>
|
| 16102 |
+
<div class="home-vozes-nums home-rev">
|
| 16103 |
+
${vz.nConv?.n ? `<div><b data-alvo="${vz.nConv.n}" data-fmt="n">0</b><span>conversas com gestores de ${nf(vz.nConv.g, 0)} casas</span></div>` : ''}
|
| 16104 |
+
${nC.n ? `<div><b data-alvo="${nC.n}" data-fmt="n">0</b><span>cartas de gestão de ${nf(nC.g, 0)} casas</span></div>` : ''}
|
| 16105 |
+
</div>
|
| 16106 |
+
${vz.conv.length ? `<div class="home-rail-rot">CONVERSAS RECENTES <a href="#/conteudo">ver todas →</a></div>${trilho(vz.conv, conv, false)}` : ''}
|
| 16107 |
+
${vz.cartas.length
|
| 16108 |
+
? `<div class="home-rail-rot">CARTAS RECENTES <a href="#/cartas">ver todas →</a></div>${trilho(vz.cartas, carta, true)}`
|
| 16109 |
+
: nC.n ? `<a class="home-trava home-rev" href="#/cartas">
|
| 16110 |
+
<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="5" y="11" width="14" height="10" rx="2"/><path d="M8 11V8a4 4 0 0 1 8 0v3"/></svg>
|
| 16111 |
+
<span><b>As cartas ficam para quem tem conta</b>
|
| 16112 |
+
<span>Cada carta com os ativos que ela cita, e a busca por papel em todas elas. Entre ou crie uma conta para ler.</span></span></a>` : ''}
|
| 16113 |
+
</section>`;
|
| 16114 |
+
}
|
| 16115 |
+
|
| 16116 |
+
function homeHtmlD(c, achados, vozes) {
|
| 16117 |
+
let k = 0;
|
| 16118 |
+
const num = () => String(++k).padStart(2, '0');
|
| 16119 |
const achado = (a, i) => `<a class="home-porta home-achado home-rev" href="#/insights/${encodeURIComponent(a.id)}" style="--i:${i}">
|
| 16120 |
<span class="home-porta-luz" aria-hidden="true"></span>
|
| 16121 |
<span class="home-achado-tema">${esc(a.tema || '')}</span>
|
|
|
|
| 16128 |
<div class="home-chao" aria-hidden="true"></div>
|
| 16129 |
<div class="home-hero-txt" data-vel="-0.18">
|
| 16130 |
${homeKicker(c)}
|
| 16131 |
+
<h1 class="home-h1">Entenda o mercado <span class="home-grad">pelos fundos</span></h1>
|
| 16132 |
+
<p class="home-lead">Carteiras, captação, taxas, crédito privado e o que os gestores dizem em cartas e
|
| 16133 |
+
entrevistas, com dado público atualizado todo dia.</p>
|
| 16134 |
<div class="home-ctas">
|
| 16135 |
<a class="home-btn" href="#/gestoras">Ver as gestoras <span aria-hidden="true">→</span></a>
|
| 16136 |
<a class="home-btn home-btn-2" href="#/titulos">Crédito privado</a>
|
|
|
|
| 16145 |
${achados.length ? `<section class="home-sec home-portas">
|
| 16146 |
<div class="home-camada home-camada-1" data-vel="0.25" aria-hidden="true"></div>
|
| 16147 |
<div class="home-camada home-camada-2" data-vel="0.5" aria-hidden="true"></div>
|
| 16148 |
+
<div class="home-sec-cab home-rev"><span class="home-num">${num()}</span><h2>O que a lâmina não mostra</h2>
|
| 16149 |
<p>Contas feitas sobre a carteira, a cota, a taxa e os documentos de todos os fundos.
|
| 16150 |
Cada cartão abre a lista de casos.</p></div>
|
| 16151 |
<div class="home-grade">${achados.map(achado).join('')}</div>
|
| 16152 |
</section>` : ''}
|
| 16153 |
+
${vozes && (vozes.conv.length || vozes.nCartas?.n) ? homeVozesHtml(vozes, num()) : ''}
|
| 16154 |
<section class="home-sec home-cinema-sec">
|
| 16155 |
+
<div class="home-sec-cab home-rev"><span class="home-num">${num()}</span><h2>Assista antes de entrar</h2>
|
| 16156 |
<p>Três telas do site gravadas em uso, sem som.</p></div>
|
| 16157 |
<div class="home-cinema" id="homeCinema">
|
| 16158 |
<div class="home-cinema-tela home-tela">
|
|
|
|
| 16169 |
</div>
|
| 16170 |
</section>
|
| 16171 |
<section class="home-sec home-portas home-portas-d">
|
| 16172 |
+
<div class="home-sec-cab home-rev"><span class="home-num">${num()}</span><h2>Por onde começar</h2></div>
|
| 16173 |
<div class="home-grade">${HOME_PORTAS.map(homePortaHtml).join('')}</div>
|
| 16174 |
</section>
|
| 16175 |
${homeFimHtml()}`;
|
|
|
|
| 16217 |
<canvas id="homeTunel" class="home-canvas" aria-label="Partículas na proporção do patrimônio por classe"></canvas>
|
| 16218 |
<div class="home-hero-txt home-hero-txt-c">
|
| 16219 |
${homeKicker(c)}
|
| 16220 |
+
<h1 class="home-h1 home-h1-c">Entenda o <span class="home-grad">mercado</span>.</h1>
|
| 16221 |
<p class="home-lead">Para onde vai o patrimônio dos fundos brasileiros, quem capta, quem rende e quem
|
| 16222 |
carrega o quê — direto dos dados da CVM.</p>
|
| 16223 |
<div class="home-ctas"><a class="home-btn" href="#/gestoras">Começar <span aria-hidden="true">→</span></a></div>
|
|
|
|
| 16287 |
const ioN = new IntersectionObserver(es => es.forEach(e => {
|
| 16288 |
if (e.isIntersecting && !contou.has(e.target)) { contou.add(e.target); homeConta(e.target); }
|
| 16289 |
}), { threshold: 0.4 });
|
| 16290 |
+
raiz.querySelectorAll('.home-stat b, .home-achado-n b, .home-vozes-nums b').forEach(el => ioN.observe(el));
|
| 16291 |
|
| 16292 |
const io = new IntersectionObserver(es => es.forEach(e => {
|
| 16293 |
if (e.isIntersecting) { e.target.classList.add('home-vis'); io.unobserve(e.target); }
|
|
|
|
| 16714 |
passos.forEach(p => io.observe(p));
|
| 16715 |
}
|
| 16716 |
|
| 16717 |
+
/** VERSAO D: as esteiras de conversas e cartas. Andam sozinhas (a de cartas
|
| 16718 |
+
* no sentido contrario), param com o mouse em cima e se arrastam; arrasto nao
|
| 16719 |
+
* vira clique. O conteudo vem duplicado para a volta ser continua. Sem
|
| 16720 |
+
* movimento, viram uma faixa com rolagem lateral comum. */
|
| 16721 |
+
function homeTrilhos(ep) {
|
| 16722 |
+
const mexe = homeMovimento();
|
| 16723 |
+
document.querySelectorAll('.home-rail').forEach(rail => {
|
| 16724 |
+
const tira = rail.querySelector('.home-rail-in');
|
| 16725 |
+
if (!mexe) { rail.classList.add('livre'); return; }
|
| 16726 |
+
const dir = rail.classList.contains('home-rail-inv') ? -1 : 1;
|
| 16727 |
+
let x = dir > 0 ? 0 : -tira.scrollWidth / 4, arr = false, ux = 0, moveu = 0, pausa = false, vel = 0;
|
| 16728 |
+
rail.addEventListener('pointerenter', ev => { if (ev.pointerType === 'mouse') pausa = true; });
|
| 16729 |
+
rail.addEventListener('pointerleave', () => { pausa = false; arr = false; });
|
| 16730 |
+
rail.addEventListener('pointerdown', ev => { arr = true; ux = ev.clientX; moveu = 0; vel = 0; });
|
| 16731 |
+
rail.addEventListener('pointermove', ev => {
|
| 16732 |
+
if (!arr) return;
|
| 16733 |
+
const dx = ev.clientX - ux; ux = ev.clientX; moveu += Math.abs(dx);
|
| 16734 |
+
x += dx; vel = dx;
|
| 16735 |
+
});
|
| 16736 |
+
const solta = () => { arr = false; };
|
| 16737 |
+
rail.addEventListener('pointerup', solta);
|
| 16738 |
+
rail.addEventListener('pointercancel', solta);
|
| 16739 |
+
rail.addEventListener('click', ev => { if (moveu > 6) { ev.preventDefault(); ev.stopPropagation(); } moveu = 0; }, true);
|
| 16740 |
+
const quadro = () => {
|
| 16741 |
+
if (!rail.isConnected || !epocaAtual(ep)) return;
|
| 16742 |
+
requestAnimationFrame(quadro);
|
| 16743 |
+
if (!arr) { x += (pausa ? 0 : -0.45 * dir) + vel; vel *= 0.93; }
|
| 16744 |
+
const m = tira.scrollWidth / 2;
|
| 16745 |
+
if (m > 0) x = ((x % m) + m) % m - m;
|
| 16746 |
+
tira.style.transform = `translate3d(${x.toFixed(1)}px, 0, 0)`;
|
| 16747 |
+
};
|
| 16748 |
+
requestAnimationFrame(quadro);
|
| 16749 |
+
});
|
| 16750 |
+
}
|
| 16751 |
+
|
| 16752 |
/** VERSAO C: o cinema -- um video grande e os capitulos ao lado. */
|
| 16753 |
function homeCinema() {
|
| 16754 |
const cin = document.getElementById('homeCinema');
|
styles.css
CHANGED
|
@@ -2934,6 +2934,43 @@ tr.hist-linha > td { padding: 6px 0 14px; background: var(--papel-2); }
|
|
| 2934 |
font-variant-numeric: tabular-nums; text-shadow: 0 0 26px rgba(79,176,122,.35); margin-right: 4px; }
|
| 2935 |
.home-capitulos .home-vir { padding: 4px 4px 0; }
|
| 2936 |
.home-portas-d { padding-top: 40px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2937 |
|
| 2938 |
/* ------------------------------------------------------------ celular */
|
| 2939 |
@media (max-width: 960px) {
|
|
|
|
| 2934 |
font-variant-numeric: tabular-nums; text-shadow: 0 0 26px rgba(79,176,122,.35); margin-right: 4px; }
|
| 2935 |
.home-capitulos .home-vir { padding: 4px 4px 0; }
|
| 2936 |
.home-portas-d { padding-top: 40px; }
|
| 2937 |
+
/* versao D: conversas e cartas */
|
| 2938 |
+
.home-vozes { padding-top: 40px; }
|
| 2939 |
+
.home-vozes-nums { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 18px 56px; margin: -10px 0 36px; }
|
| 2940 |
+
.home-vozes-nums b { display: block; font: 600 clamp(30px, 3.2vw, 44px)/1.05 "IBM Plex Mono", monospace; letter-spacing: -.03em;
|
| 2941 |
+
font-variant-numeric: tabular-nums; text-shadow: 0 0 26px rgba(79,176,122,.3); }
|
| 2942 |
+
.home-vozes-nums span { font-size: 13px; color: var(--tinta-3); }
|
| 2943 |
+
.home-rail-rot { font: 600 10.5px "IBM Plex Mono", monospace; letter-spacing: .16em; color: var(--h-neon); margin: 0 0 12px; }
|
| 2944 |
+
.home-rail-rot a { margin-left: 14px; color: var(--tinta-3); letter-spacing: .06em; text-transform: none; }
|
| 2945 |
+
.home-rail-rot a:hover { color: var(--h-neon); }
|
| 2946 |
+
.home-rail { position: relative; overflow: hidden; margin: 0 -56px 30px; padding: 6px 56px 18px; touch-action: pan-y; cursor: grab; user-select: none;
|
| 2947 |
+
-webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
|
| 2948 |
+
.home-rail:active { cursor: grabbing; }
|
| 2949 |
+
.home-rail-in { display: flex; gap: 16px; width: max-content; will-change: transform; }
|
| 2950 |
+
.home-conv { flex: none; width: 300px; min-height: 152px; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; padding: 18px 18px 16px;
|
| 2951 |
+
border-radius: 14px; color: var(--tinta); text-decoration: none; -webkit-user-drag: none;
|
| 2952 |
+
background: linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); border: 1px solid rgba(236,234,228,.10);
|
| 2953 |
+
transition: border-color .2s, transform .2s, box-shadow .2s; }
|
| 2954 |
+
.home-conv:hover { text-decoration: none; border-color: rgba(79,176,122,.55); transform: translateY(-3px); box-shadow: 0 24px 50px -28px rgba(79,176,122,.5); }
|
| 2955 |
+
.home-conv-d { font: 11px "IBM Plex Mono", monospace; color: var(--tinta-3); letter-spacing: .03em; }
|
| 2956 |
+
.home-conv-t { font: 600 15px/1.35 "Instrument Sans", sans-serif; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
|
| 2957 |
+
.home-conv-q { font-size: 12.5px; color: var(--h-neon); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
| 2958 |
+
.home-carta { background: linear-gradient(160deg, rgba(57,135,229,.09), rgba(255,255,255,.015)); }
|
| 2959 |
+
.home-carta:hover { border-color: rgba(99,168,245,.6); box-shadow: 0 24px 50px -28px rgba(57,135,229,.55); }
|
| 2960 |
+
.home-carta .home-conv-q { color: var(--tinta-2); white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
|
| 2961 |
+
.home-carta .home-conv-d { color: #63a8f5; }
|
| 2962 |
+
.home-rail.livre { overflow-x: auto; cursor: auto; -webkit-mask-image: none; mask-image: none; }
|
| 2963 |
+
.home-rail.livre .dup { display: none; }
|
| 2964 |
+
.home-trava { position: relative; z-index: 2; display: flex; gap: 16px; align-items: center; max-width: 640px; padding: 20px 22px; border-radius: 14px;
|
| 2965 |
+
border: 1px dashed rgba(236,234,228,.22); color: var(--tinta); text-decoration: none; }
|
| 2966 |
+
.home-trava:hover { border-color: rgba(79,176,122,.6); text-decoration: none; }
|
| 2967 |
+
.home-trava svg { width: 28px; height: 28px; flex: none; stroke: var(--h-neon); fill: none; stroke-width: 1.6; stroke-linecap: round; }
|
| 2968 |
+
.home-trava b { display: block; font: 700 16px "Instrument Sans", sans-serif; margin-bottom: 4px; }
|
| 2969 |
+
.home-trava span span { font-size: 13.5px; color: var(--tinta-2); }
|
| 2970 |
+
@media (max-width: 960px) {
|
| 2971 |
+
.home-rail { margin: 0 -20px 26px; padding: 6px 20px 16px; }
|
| 2972 |
+
.home-conv { width: 250px; }
|
| 2973 |
+
}
|
| 2974 |
|
| 2975 |
/* ------------------------------------------------------------ celular */
|
| 2976 |
@media (max-width: 960px) {
|