Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions assets/js/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@


function fetchGitHubStars() {
return fetch('https://api.github.com/orgs/CodandoTV/repos')
.then(function (res) {
if (!res.ok) return null;
return res.json();
})
.then(function (repos) {
if (!repos || !Array.isArray(repos)) return null;
var map = {};
repos.forEach(function (r) { map[r.name] = r.stargazers_count; });
return map;
})
.catch(function () { return null; });
}

function _applyGitHubStars(starMap) {
if (!starMap) return;

var total = 0;
Object.values(starMap).forEach(function (v) { total += v; });

var statEl = document.querySelector('.stat-num');
if (statEl) statEl.textContent = '⭐ ' + total + '+';

[libraryContentData_ptBR, libraryContentData_enUs].forEach(function (dataArr) {
dataArr.forEach(function (lib) {
lib.multirepo.forEach(function (repo) {
if (starMap[repo.name] !== undefined) {
repo.stars = String(starMap[repo.name]);
}
});
});
});

var activeBtn = document.querySelector('.libs-tab.active');
if (activeBtn) {
var tabs = Array.from(document.querySelectorAll('.libs-tab'));
var idx = tabs.indexOf(activeBtn);
if (idx >= 0) onLibsContentRender(idx, activeBtn);
}
}

function _onLoadContentCreators() {
var cc = document.getElementById('codandotv_creators');
if (!cc) return;
Expand Down Expand Up @@ -153,4 +195,6 @@ document.addEventListener('DOMContentLoaded', function () {
onLibsContentRender(0, document.querySelector('.libs-tab.active'));
_onLoadContentCreators();
_onLoadSpeechContent();

fetchGitHubStars().then(_applyGitHubStars);
});
32 changes: 22 additions & 10 deletions assets/js/data/library_content_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ const libraryContentData_ptBR = [
desc: 'Um framework para implementar Server-Driven UI de forma rápida e simples em Android, iOS, Flutter e KMP. Permite que as interfaces sejam controladas pelo servidor, tornando as atualizações mais ágeis e sem necessidade de publicar uma nova versão do app.',
img: 'assets/images/libs/CraftD.mp4',
video: true,
multirepo: []
multirepo: [
{ name: 'CraftD', stars: '82', url: 'https://github.com/CodandoTV/CraftD' }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fallback hard coded se falhar o request das estrelas

]
},
{
title: 'Popcorn Guineapig',
Expand All @@ -24,15 +26,19 @@ const libraryContentData_ptBR = [
desc: 'Uma ferramenta CLI em Dart para enforçar regras de arquitetura em projetos Flutter/Dart. Mantém o código organizado e as dependências sob controle.',
img: 'assets/images/libs/eagle-eye.png',
video: false,
multirepo: []
multirepo: [
{ name: 'eagle-eye', stars: '9', url: 'https://github.com/CodandoTV/eagle-eye' }
]
},
{
title: 'jujubaSVG',
support: ['Android', 'Flutter'],
desc: 'Uma biblioteca para manipular arquivos SVG em apps Android e Flutter, criada pela CodandoTV para facilitar o uso de SVGs dinâmicos no mobile.',
support: ['Android', 'Flutter', 'CMP'],
desc: 'Uma biblioteca para manipular arquivos SVG em apps Compose Multiplatform, Android e Flutter, criada pela CodandoTV para facilitar o uso de SVGs dinâmicos no mobile.',
img: 'assets/images/libs/jujubaSVG.png',
video: false,
multirepo: []
multirepo: [
{ name: 'jujubaSVG', stars: '19', url: 'https://github.com/CodandoTV/jujubaSVG' }
]
},
{
title: 'Netflix',
Expand All @@ -54,7 +60,9 @@ const libraryContentData_enUs = [
desc: 'A framework to implement Server-Driven UI quickly and easily on Android, iOS, Flutter, and KMP. It allows interfaces to be controlled by the server, making updates faster and without the need to publish a new version of the app.',
img: 'assets/images/libs/CraftD.mp4',
video: true,
multirepo: []
multirepo: [
{ name: 'CraftD', stars: '82', url: 'https://github.com/CodandoTV/CraftD' }
]
},
{
title: 'Popcorn Guineapig',
Expand All @@ -73,15 +81,19 @@ const libraryContentData_enUs = [
desc: 'A CLI tool in Dart to enforce architecture rules in Flutter/Dart projects. It keeps the code organized and dependencies under control.',
img: 'assets/images/libs/eagle-eye.png',
video: false,
multirepo: []
multirepo: [
{ name: 'eagle-eye', stars: '9', url: 'https://github.com/CodandoTV/eagle-eye' }
]
},
{
title: 'jujubaSVG',
support: ['Android', 'Flutter'],
desc: 'A library to manipulate SVG files in Android and Flutter apps, created by CodandoTV to facilitate the use of dynamic SVGs in mobile.',
support: ['Android', 'Flutter', 'CMP'],
desc: 'A library to manipulate SVG files in Android, Flutter, and CMP apps, created by CodandoTV to facilitate the use of dynamic SVGs in mobile.',
img: 'assets/images/libs/jujubaSVG.png',
video: false,
multirepo: []
multirepo: [
{ name: 'jujubaSVG', stars: '19', url: 'https://github.com/CodandoTV/jujubaSVG' }
]
},
{
title: 'Netflix',
Expand Down
12 changes: 6 additions & 6 deletions assets/js/data/speech_content_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ const speechContentData_ptBR = [
youtubeCategories: ["Android", "Flutter", "iOS"]
},
{
youtubeTitle: "Kotzilla no Compose Multiplatform: Setup Completo",
youtubeTitle: "Como Configurar o MCP da Kotzilla na Prática | IA com Contexto Real no Kotlin",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Atualizando pra ficar certinho (YouTube vs Site)

youtubeDescription: "Observabilidade gratuita para open source. Analise comportamento, performance e issues do seu app KMP.",
youtubeUrl: "https://www.youtube.com/embed/O9g7RX6OrRI",
youtubeCategories: ["CMP", "Observabilidade"]
youtubeUrl: "https://youtu.be/LyXl3EGrVWw?si=qCIxo-GotkLvktV7",
youtubeCategories: ["CMP", "Observabilidade", "IA"]
},
{
youtubeTitle: "Mockito no Flutter: Testes Unitários com Mocks",
Expand Down Expand Up @@ -57,10 +57,10 @@ const speechContentData_enUs = [
youtubeCategories: ["Android", "Flutter", "iOS"]
},
{
youtubeTitle: "Kotzilla on Compose Multiplatform: Complete Setup",
youtubeTitle: "How to Set Up Kotzilla's MCP in Practice | AI with Real Context in Kotlin",
youtubeDescription: "Free observability for open source. Analyze behavior, performance and issues of your KMP app.",
youtubeUrl: "https://www.youtube.com/embed/O9g7RX6OrRI",
youtubeCategories: ["CMP", "Observability"]
youtubeUrl: "https://youtu.be/LyXl3EGrVWw?si=qCIxo-GotkLvktV7",
youtubeCategories: ["CMP", "Observability", "IA"]
},
{
youtubeTitle: "Mockito in Flutter: Unit Testing with Mocks",
Expand Down