Untitled

 avatar
unknown
plain_text
3 months ago
8.1 kB
8
Indexable
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>The Dozen: UFC Edition</title>
    <style>
        :root {
            --primary: #d20a0a;
            --secondary: #1a1a1a;
            --text: #ffffff;
            --accent: #ffd700;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: var(--secondary);
            color: var(--text);
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            margin: 0;
        }

        #game-container {
            background: #252525;
            padding: 2rem;
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            width: 90%;
            max-width: 600px;
            text-align: center;
            border-top: 5px solid var(--primary);
        }

        .header {
            margin-bottom: 2rem;
        }

        .category-tag {
            background: var(--primary);
            padding: 5px 15px;
            border-radius: 20px;
            font-size: 0.8rem;
            text-transform: uppercase;
            font-weight: bold;
            letter-spacing: 1px;
        }

        h1 { margin: 10px 0; font-size: 1.5rem; }

        .question-box {
            font-size: 1.2rem;
            margin-bottom: 1.5rem;
            min-height: 80px;
        }

        .options-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }

        button {
            background: #333;
            border: 2px solid #444;
            color: white;
            padding: 15px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 1rem;
        }

        button:hover {
            background: #444;
            border-color: var(--primary);
        }

        .stats {
            margin-top: 2rem;
            display: flex;
            justify-content: space-between;
            font-size: 0.9rem;
            color: #888;
        }

        #result-screen { display: none; }
        
        .correct { background: #2e7d32 !important; }
        .wrong { background: #c62828 !important; }
    </style>
</head>
<body>

<div id="game-container">
    <div id="quiz-screen">
        <div class="header">
            <span id="category" class="category-tag">Loading...</span>
            <h1 id="question-num">Question 1/12</h1>
        </div>
        <div id="question" class="question-box"></div>
        <div id="options" class="options-grid"></div>
        <div class="stats">
            <span>Score: <span id="score">0</span></span>
            <span>The Dozen: UFC Edition</span>
        </div>
    </div>

    <div id="result-screen">
        <h2>Game Over</h2>
        <p id="final-stats"></p>
        <button onclick="location.reload()">Try Again</button>
    </div>
</div>

<script>
    const questions = [
        {
            cat: "Geography",
            q: "UFC 1 was held in 1993 at the McNichols Sports Arena in which US city?",
            options: ["Las Vegas", "Denver", "Miami", "Dallas"],
            answer: 1
        },
        {
            cat: "Niche: BMF",
            q: "Who did Max Holloway knockout in the final second of the fight to win the BMF title at UFC 300?",
            options: ["Justin Gaethje", "Dustin Poirier", "Jorge Masvidal", "Conor McGregor"],
            answer: 0
        },
        {
            cat: "Records",
            q: "Who holds the record for the most successful title defenses in UFC history (11)?",
            options: ["Anderson Silva", "Jon Jones", "Demetrious Johnson", "Georges St-Pierre"],
            answer: 2
        },
        {
            cat: "Debut",
            q: "Which legendary fighter won the Season 1 finale of The Ultimate Fighter against Stephan Bonnar?",
            options: ["Diego Sanchez", "Rashad Evans", "Forrest Griffin", "Kenny Florian"],
            answer: 2
        },
        {
            cat: "Niche: Nicknames",
            q: "Which former Heavyweight champion is known as 'The Natural'?",
            options: ["Josh Barnett", "Randy Couture", "Brock Lesnar", "Stipe Miocic"],
            answer: 1
        },
        {
            cat: "History",
            q: "In what year did Zuffa (led by Dana White and the Fertittas) purchase the UFC?",
            options: ["1999", "2001", "2003", "2005"],
            answer: 1
        },
        {
            cat: "Champ-Champ",
            q: "Who was the first fighter in UFC history to hold titles in two weight classes simultaneously?",
            options: ["Daniel Cormier", "Amanda Nunes", "Henry Cejudo", "Conor McGregor"],
            answer: 3
        },
        {
            cat: "Geography",
            q: "UFC 193, where Holly Holm defeated Ronda Rousey, set an attendance record in which city?",
            options: ["Melbourne", "London", "Toronto", "Rio de Janeiro"],
            answer: 0
        },
        {
            cat: "Niche: Stats",
            q: "Which fighter holds the record for the most finishes in UFC history?",
            options: ["Charles Oliveira", "Donald Cerrone", "Jim Miller", "Vitor Belfort"],
            answer: 0
        },
        {
            cat: "Weight Classes",
            q: "What is the maximum weight limit for the UFC Strawweight division?",
            options: ["105 lbs", "115 lbs", "125 lbs", "135 lbs"],
            answer: 1
        },
        {
            cat: "The Walkout",
            q: "Which fighter is famous for walking out to the song 'Sandstorm' by Darude?",
            options: ["Mirko Cro Cop", "Wanderlei Silva", "Lyoto Machida", "Rich Franklin"],
            answer: 1
        },
        {
            cat: "The Finale",
            q: "Who was the referee for the main event of UFC 1?",
            options: ["Herb Dean", "Big John McCarthy", "Hélio Gracie", "There was no referee"],
            answer: 3
        }
    ];

    let currentQ = 0;
    let score = 0;

    function loadQuestion() {
        const qData = questions[currentQ];
        document.getElementById('category').innerText = qData.cat;
        document.getElementById('question-num').innerText = `Question ${currentQ + 1}/12`;
        document.getElementById('question').innerText = qData.q;
        
        const optionsDiv = document.getElementById('options');
        optionsDiv.innerHTML = '';
        
        qData.options.forEach((opt, index) => {
            const btn = document.createElement('button');
            btn.innerText = opt;
            btn.onclick = () => checkAnswer(index);
            optionsDiv.appendChild(btn);
        });
    }

    function checkAnswer(selected) {
        const btns = document.querySelectorAll('.options-grid button');
        const correct = questions[currentQ].answer;
        
        if (selected === correct) {
            btns[selected].classList.add('correct');
            score++;
            document.getElementById('score').innerText = score;
        } else {
            btns[selected].classList.add('wrong');
            btns[correct].classList.add('correct');
        }

        // Disable all buttons after choice
        btns.forEach(b => b.disabled = true);

        setTimeout(() => {
            currentQ++;
            if (currentQ < questions.length) {
                loadQuestion();
            } else {
                showResults();
            }
        }, 1500);
    }

    function showResults() {
        document.getElementById('quiz-screen').style.display = 'none';
        document.getElementById('result-screen').style.display = 'block';
        const rank = score === 12 ? "Undisputed Champion" : score > 8 ? "Top Contender" : "Gatekeeper";
        document.getElementById('final-stats').innerText = `You scored ${score} out of 12.\nRank: ${rank}`;
    }

    loadQuestion();
</script>

</body>
</html>
Editor is loading...
Leave a Comment