Template

Difference between revisions of "Main"

From Shadow Era Wiki

m
m
Line 36: Line 36:
 
<td>
 
<td>
 
     <img src="" id="randomCard" alt="Carte Aléatoire" style="max-width: 100%; height: auto;" />
 
     <img src="" id="randomCard" alt="Carte Aléatoire" style="max-width: 100%; height: auto;" />
 +
    <noinclude>
 
     <script>
 
     <script>
         var cardCount = 100; // Remplacez par le nombre total de cartes disponibles.
+
         document.addEventListener('DOMContentLoaded', function() {
        var randomIndex = Math.floor(Math.random() * cardCount) + 1; // Générez un nombre aléatoire.
+
            var cardCount = 100; // Remplacez par le nombre total de cartes disponibles.
        document.getElementById('randomCard').src = 'https://www.shadowera.com/cards/card' + randomIndex + '.jpg'; // Modifiez ce chemin selon la structure des URLs des cartes.
+
            var randomIndex = Math.floor(Math.random() * cardCount) + 1; // Générez un nombre aléatoire.
 +
            document.getElementById('randomCard').src = 'https://www.shadowera.com/cards/card' + randomIndex + '.jpg'; // Modifiez ce chemin selon la structure des URLs des cartes.
 +
        });
 
     </script>
 
     </script>
 +
    </noinclude>
 
</td>
 
</td>
 
</tr>
 
</tr>

Revision as of 21:20, 6 October 2024

{{{title1}}}
{{{content1}}}
{{{title2}}}
{{{content2}}}
Carte Aléatoire
   Carte Aléatoire
   
   <script>
       document.addEventListener('DOMContentLoaded', function() {
           var cardCount = 100; // Remplacez par le nombre total de cartes disponibles.
           var randomIndex = Math.floor(Math.random() * cardCount) + 1; // Générez un nombre aléatoire.
           document.getElementById('randomCard').src = 'https://www.shadowera.com/cards/card' + randomIndex + '.jpg'; // Modifiez ce chemin selon la structure des URLs des cartes.
       });
   </script>
   
{{{title3}}}
{{{content3}}}