|
5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
6 | 6 | <title>Magica Studio Pro</title> |
7 | 7 | <style> |
| 8 | + @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap'); |
| 9 | + |
| 10 | + * { |
| 11 | + box-sizing: border-box; |
| 12 | + } |
| 13 | + |
8 | 14 | body { |
9 | 15 | background: linear-gradient(135deg, #0f172a, #1e293b); |
10 | 16 | color: #fff; |
|
13 | 19 | flex-direction: column; |
14 | 20 | align-items: center; |
15 | 21 | justify-content: center; |
16 | | - height: 100vh; |
| 22 | + min-height: 100vh; |
17 | 23 | margin: 0; |
| 24 | + padding: 20px; |
18 | 25 | text-align: center; |
19 | | - overflow: hidden; |
| 26 | + position: relative; |
20 | 27 | } |
21 | | - h1 { |
22 | | - font-size: 3rem; |
23 | | - margin-bottom: 0.5em; |
| 28 | + |
| 29 | + h1 { |
| 30 | + font-size: clamp(2.5rem, 5vw, 3.5rem); |
| 31 | + margin-bottom: 0.5em; |
| 32 | + font-weight: 700; |
24 | 33 | } |
25 | | - p { |
26 | | - color: #cbd5e1; |
27 | | - max-width: 600px; |
28 | | - margin-bottom: 2em; |
29 | | - line-height: 1.5; |
| 34 | + |
| 35 | + p { |
| 36 | + color: #cbd5e1; |
| 37 | + max-width: 600px; |
| 38 | + margin-bottom: 2em; |
| 39 | + line-height: 1.5; |
| 40 | + font-size: 1.1rem; |
30 | 41 | } |
| 42 | + |
31 | 43 | button { |
32 | 44 | background: #3b82f6; |
33 | 45 | color: #fff; |
34 | 46 | border: none; |
35 | 47 | padding: 15px 40px; |
36 | 48 | border-radius: 12px; |
37 | 49 | font-size: 18px; |
| 50 | + font-weight: 600; |
38 | 51 | cursor: pointer; |
39 | 52 | transition: all 0.2s ease; |
40 | 53 | box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4); |
41 | 54 | } |
| 55 | + |
42 | 56 | button:hover { |
43 | 57 | background: #2563eb; |
44 | 58 | transform: scale(1.05); |
45 | 59 | box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5); |
46 | 60 | } |
47 | | - footer { |
48 | | - position: absolute; |
49 | | - bottom: 15px; |
50 | | - font-size: 0.9rem; |
51 | | - color: #94a3b8; |
| 61 | + |
| 62 | + button:disabled { |
| 63 | + background: #64748b; |
| 64 | + cursor: not-allowed; |
| 65 | + transform: none; |
| 66 | + box-shadow: none; |
| 67 | + } |
| 68 | + |
| 69 | + footer { |
| 70 | + position: absolute; |
| 71 | + bottom: 15px; |
| 72 | + font-size: 0.9rem; |
| 73 | + color: #94a3b8; |
| 74 | + width: 100%; |
| 75 | + text-align: center; |
| 76 | + } |
| 77 | + |
| 78 | + @media (max-width: 480px) { |
| 79 | + h1 { |
| 80 | + font-size: 2rem; |
| 81 | + } |
| 82 | + |
| 83 | + p { |
| 84 | + font-size: 1rem; |
| 85 | + } |
| 86 | + |
| 87 | + button { |
| 88 | + padding: 12px 30px; |
| 89 | + font-size: 16px; |
| 90 | + } |
52 | 91 | } |
53 | 92 | </style> |
54 | 93 | </head> |
55 | 94 | <body> |
56 | 95 | <h1>🚀 Magica Studio Pro</h1> |
57 | | - <p>Crée, édite et publie tes projets avec puissance et style.<br> |
58 | | - Télécharge la dernière version ci-dessous 👇</p> |
| 96 | + <p>Téléchargez toujours la dernière version de MagicaSetup.exe directement depuis les releases GitHub 👇</p> |
59 | 97 |
|
60 | | - <button onclick="window.location.href='https://github.com/MaxiStudioDev/MagicaStudioPro/releases/latest/download/MagicaStudioPro.zip'"> |
61 | | - Télécharger maintenant 📦 |
62 | | - </button> |
| 98 | + <button id="downloadBtn">Charger…</button> |
63 | 99 |
|
64 | 100 | <footer>© 2025 MaxiStudioDev — Tous droits réservés</footer> |
| 101 | + |
| 102 | + <script> |
| 103 | + const btn = document.getElementById("downloadBtn"); |
| 104 | + const owner = "MaxiStudioDev"; |
| 105 | + const repo = "MagicaStudioPro"; |
| 106 | + |
| 107 | + fetch(`https://api.github.com/repos/${owner}/${repo}/releases/latest`) |
| 108 | + .then(res => res.json()) |
| 109 | + .then(data => { |
| 110 | + console.log("Données reçues:", data); // Pour debug |
| 111 | + |
| 112 | + // Cherche d'abord MagicaSetup.exe, sinon prend le premier asset .exe |
| 113 | + let exeAsset = data.assets.find(a => a.name === "MagicaSetup.exe"); |
| 114 | + |
| 115 | + // Si pas trouvé, cherche n'importe quel fichier .exe |
| 116 | + if (!exeAsset) { |
| 117 | + exeAsset = data.assets.find(a => a.name.endsWith('.exe')); |
| 118 | + } |
| 119 | + |
| 120 | + // Si pas trouvé, cherche n'importe quel fichier |
| 121 | + if (!exeAsset && data.assets.length > 0) { |
| 122 | + exeAsset = data.assets[0]; // Prend le premier fichier disponible |
| 123 | + } |
| 124 | + |
| 125 | + if (exeAsset) { |
| 126 | + btn.textContent = `Télécharger ${exeAsset.name} 📦`; |
| 127 | + btn.onclick = () => window.location.href = exeAsset.browser_download_url; |
| 128 | + console.log("Fichier trouvé:", exeAsset.name, exeAsset.browser_download_url); |
| 129 | + } else { |
| 130 | + btn.textContent = "Aucun fichier trouvé dans la dernière version"; |
| 131 | + btn.disabled = true; |
| 132 | + } |
| 133 | + }) |
| 134 | + .catch(err => { |
| 135 | + console.error("Erreur:", err); |
| 136 | + btn.textContent = "Erreur de connexion à GitHub"; |
| 137 | + btn.disabled = true; |
| 138 | + }); |
| 139 | + </script> |
65 | 140 | </body> |
66 | 141 | </html> |
0 commit comments