Skip to content

Commit 7d79ae5

Browse files
Merge pull request #1 from Bit-Scripts/feat/redesign-and-eddy-projects
Refonte graphique + ajout de 3 projets d'Eddy
2 parents d70ef01 + f2b963f commit 7d79ae5

23 files changed

Lines changed: 5049 additions & 199 deletions

‎context/GlobalProvider.jsx‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
import { createContext, useState, useEffect } from "react";
2-
import { fetchReposData } from "../utils/helpers";
3-
import { ORGNAME } from "../config/globals";
2+
import { fetchReposData, getRepoFullName } from "../utils/helpers";
3+
import { cardsData } from "../data/cardsData";
4+
5+
// Propriétaires (orgs ou utilisateurs) des dépôts référencés par les cartes
6+
const REPO_OWNERS = [
7+
...new Set(
8+
cardsData
9+
.map((card) => getRepoFullName(card.github)?.split("/")[0])
10+
.filter(Boolean),
11+
),
12+
];
413

514
export const GlobalContext = createContext();
615

@@ -10,7 +19,7 @@ const GlobalProvider = ({ children }) => {
1019

1120
useEffect(() => {
1221
if (!reposData) {
13-
fetchReposData(ORGNAME)
22+
fetchReposData(REPO_OWNERS)
1423
.then((res) => {
1524
if (res) {
1625
setReposData(res);

‎data/cardsData.js‎

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* @property {string} imageCover - Nom du fichier image avec extension.
1212
* @property {string} title - Nom du projet affiché sur la carte.
1313
* @property {string} author - Auteur du projet affiché sur la carte.
14-
* @property {string} github - lien vers le repo
14+
* @property {string} github - lien vers le repo (sert aussi à récupérer langage, licence et date via l'API GitHub)
1515
* @property {string} demo - URL de démo du projet.
1616
* @property {Translation[]} translations - Description du projet dans toutes les langues souhaitées. Dans le cas où vous ne fournissez qu'une langue, ce doit être l'anglais.
1717
*/
@@ -22,6 +22,87 @@
2222
*/
2323

2424
export const cardsData = [
25+
{
26+
githubRepoName: "quillpad-backup-to-markdown",
27+
project: "quillpadBackupToMarkdown",
28+
imageCover: "quillpad-backup-to-markdown.jpg",
29+
title: "Quillpad Backup to Markdown",
30+
author: "Eddy",
31+
github: "https://github.com/generalentropy/quillpad-backup-to-markdown",
32+
demo: "https://quillpad-backup-to-markdown.visualartisan.fr",
33+
license: "AGPL-3.0",
34+
translations: [
35+
{
36+
lang: "en",
37+
description:
38+
"Converts a Quillpad backup archive into one Markdown file per note, with notebooks kept as folders, ready for Obsidian, Logseq or Typora. Runs entirely in the browser.",
39+
},
40+
{
41+
lang: "fr",
42+
description:
43+
"Convertit une sauvegarde Quillpad en un fichier Markdown par note, en conservant les carnets sous forme de dossiers, prêts pour Obsidian, Logseq ou Typora. Tout se passe dans le navigateur.",
44+
},
45+
{
46+
lang: "es",
47+
description:
48+
"Convierte una copia de seguridad de Quillpad en un archivo Markdown por nota, conservando los cuadernos como carpetas, listos para Obsidian, Logseq o Typora. Todo ocurre en el navegador.",
49+
},
50+
],
51+
},
52+
{
53+
githubRepoName: "entropy-next-blueprint",
54+
project: "entropyNextBlueprint",
55+
imageCover: "entropy-next-blueprint.jpg",
56+
title: "Entropy Next Blueprint",
57+
author: "Eddy",
58+
github: "https://github.com/generalentropy/entropy-next-blueprint",
59+
demo: "https://entropy-next-blueprint.netlify.app",
60+
license: "MIT",
61+
translations: [
62+
{
63+
lang: "en",
64+
description:
65+
"A Next.js 16 starter with TypeScript, Tailwind 4, shadcn/ui, Prisma, React Query and Zustand, with ESLint and Prettier already configured to start a project in minutes.",
66+
},
67+
{
68+
lang: "fr",
69+
description:
70+
"Un starter Next.js 16 avec TypeScript, Tailwind 4, shadcn/ui, Prisma, React Query et Zustand, ESLint et Prettier déjà configurés pour démarrer un projet en quelques minutes.",
71+
},
72+
{
73+
lang: "es",
74+
description:
75+
"Una plantilla de Next.js 16 con TypeScript, Tailwind 4, shadcn/ui, Prisma, React Query y Zustand, con ESLint y Prettier ya configurados para empezar un proyecto en minutos.",
76+
},
77+
],
78+
},
79+
{
80+
githubRepoName: "catppuccin-vibes",
81+
project: "catppuccinVibes",
82+
imageCover: "catppuccin-vibes.jpg",
83+
title: "Catppuccin Vibes",
84+
author: "Eddy",
85+
github: "https://github.com/generalentropy/catppuccin-vibes",
86+
demo: "",
87+
license: "MIT",
88+
translations: [
89+
{
90+
lang: "en",
91+
description:
92+
"Icons and wallpapers inspired by the Catppuccin palette, in three sets: muted, vibrant and softy peachy.",
93+
},
94+
{
95+
lang: "fr",
96+
description:
97+
"Icônes et fonds d'écran inspirés de la palette Catppuccin, en trois déclinaisons : muted, vibrant et softy peachy.",
98+
},
99+
{
100+
lang: "es",
101+
description:
102+
"Iconos y fondos de pantalla inspirados en la paleta Catppuccin, en tres variantes: muted, vibrant y softy peachy.",
103+
},
104+
],
105+
},
25106
{
26107
"githubRepoName": "SocialHubDashboard",
27108
"project": "socialHubDashboard",

‎hooks/useProjectInfo.jsx‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
import { useMemo } from "react";
2+
import { getRepoFullName } from "../utils/helpers";
23

3-
function useProjectInfo(reposData, githubRepoName) {
4-
const findProjectObjectByName = (array, name) => {
4+
function useProjectInfo(reposData, githubProjectUrl) {
5+
const findProjectObjectByFullName = (array, fullName) => {
56
if (!array) {
67
// console.log("Vous devez fournir un tableau");
78
return null;
89
}
910

10-
if (!name) {
11+
if (!fullName) {
1112
// console.log("Vous devez fournir un élément à rechercher");
1213
return null;
1314
}
14-
return array.find((item) => item.name === name);
15+
return array.find((item) => item.full_name.toLowerCase() === fullName);
1516
};
1617

1718
const projectInfo = useMemo(() => {
18-
return findProjectObjectByName(reposData, githubRepoName);
19-
}, [reposData, githubRepoName]);
19+
return findProjectObjectByFullName(
20+
reposData,
21+
getRepoFullName(githubProjectUrl),
22+
);
23+
}, [reposData, githubProjectUrl]);
2024

2125
return projectInfo;
2226
}

‎index.html‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44
<meta charset="UTF-8" />
55
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<meta name="theme-color" content="#0a0a0a" />
8+
<meta
9+
name="description"
10+
content="Bit-Scripts — logiciels, scripts et bots open source."
11+
/>
12+
<link rel="preconnect" href="https://fonts.googleapis.com" />
13+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
14+
<link
15+
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap"
16+
rel="stylesheet"
17+
/>
718
<title>Bit-Scripts</title>
819
</head>
920
<body>

‎package.json‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,29 @@
1414
},
1515
"dependencies": {
1616
"@chakra-ui/react": "^2.8.2",
17-
"@emotion/react": "^11.11.4",
18-
"@emotion/styled": "^11.11.5",
17+
"@emotion/react": "^11.14.0",
18+
"@emotion/styled": "^11.14.1",
1919
"flowbite-react": "^0.10.1",
2020
"framer-motion": "^11.2.13",
21-
"gh-pages": "^6.1.1",
21+
"gh-pages": "^6.3.0",
2222
"i18next": "^23.11.5",
23-
"i18next-browser-languagedetector": "^8.0.0",
23+
"i18next-browser-languagedetector": "^8.2.3",
2424
"react": "^18.3.1",
2525
"react-dom": "^18.3.1",
2626
"react-i18next": "^14.1.2",
27-
"react-icons": "^5.2.1"
27+
"react-icons": "^5.7.0"
2828
},
2929
"devDependencies": {
3030
"@types/react": "^18.3.3",
3131
"@types/react-dom": "^18.3.0",
3232
"@vitejs/plugin-react": "^4.3.1",
33-
"autoprefixer": "^10.4.19",
33+
"autoprefixer": "^10.6.2",
3434
"eslint": "^8.57.0",
35-
"eslint-plugin-react": "^7.34.2",
35+
"eslint-plugin-react": "^7.37.5",
3636
"eslint-plugin-react-hooks": "^4.6.2",
3737
"eslint-plugin-react-refresh": "^0.4.7",
38-
"postcss": "^8.4.39",
39-
"prettier": "^3.3.2",
38+
"postcss": "^8.5.32",
39+
"prettier": "^3.9.10",
4040
"prettier-plugin-tailwindcss": "^0.6.5",
4141
"tailwindcss": "^3.4.4",
4242
"vite": "^5.3.1"

0 commit comments

Comments
 (0)