Ads Area

Best Dog's Food Tool


<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Pawsome Eats - Perfect Food for Your Pooch</title>

    

    <!-- CSS Code Starts Here -->

    <style>

        @import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;700&display=swap');


        :root {

            --primary-color: #e50914; /* Red */

            --secondary-color: #141414; /* Dark Gray / Black */

            --text-color: #ffffff; /* White */

            --card-bg-color: #222222;

            --heading-font: 'Fredoka One', cursive;

            --body-font: 'Nunito', sans-serif;

        }


        * { box-sizing: border-box; margin: 0; padding: 0; }

        body {

            font-family: var(--body-font);

            background-color: var(--secondary-color);

            color: var(--text-color);

            line-height: 1.6;

        }

        .container { max-width: 1100px; margin: auto; padding: 0 20px; }


        /* Header */

        .main-header {

            background: var(--secondary-color); padding: 20px 0;

            border-bottom: 2px solid var(--primary-color);

            position: sticky; top: 0; z-index: 100;

        }

        .main-header .container { display: flex; justify-content: space-between; align-items: center; }

        .logo { font-family: var(--heading-font); font-size: 2.5rem; color: var(--text-color); }

        .logo span { color: var(--primary-color); }

        .main-header nav ul { list-style: none; display: flex; }

        .main-header nav ul li { margin-left: 20px; }

        .main-header nav a { color: var(--text-color); text-decoration: none; font-weight: 700; transition: color 0.3s ease; }

        .main-header nav a:hover { color: var(--primary-color); }


        /* Hero Section */

        .hero-section {

            height: 80vh;

            background: url('https://images.unsplash.com/photo-1543466835-00a7907e9de1?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzNjUyOXwwfDF8c2VhcmNofDN8fGRvZ3xlbnwwfHx8fDE2Mjk4NzUwMzY&ixlib=rb-1.2.1&q=80&w=1920') no-repeat center center/cover;

            position: relative; display: flex; align-items: center; text-align: center;

        }

        .hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7); }

        .hero-content { position: relative; z-index: 1; animation: fadeIn 1.5s ease-in-out; }

        .hero-content h2 { font-family: var(--heading-font); font-size: 4.2rem; margin-bottom: 20px; line-height: 1.2; }

        .hero-content p { font-size: 1.2rem; margin-bottom: 30px; }


        /* Common Button Style */

        .cta-button {

            display: inline-block; background: var(--primary-color); color: var(--text-color);

            padding: 15px 35px; font-size: 1.2rem; text-decoration: none; border-radius: 5px;

            font-weight: 700; font-family: var(--body-font);

            transition: transform 0.3s ease, background-color 0.3s ease;

            border: none; cursor: pointer;

        }

        .cta-button:hover { background: #ff0a16; transform: scale(1.05); }


        /* Quiz Section */

        .quiz-container { padding: 60px 20px; text-align: center; }

        .quiz-title { font-family: var(--heading-font); font-size: 3rem; margin-bottom: 30px; }

        #quiz {

            background: var(--card-bg-color); padding: 40px; border-radius: 10px;

            box-shadow: 0 5px 15px rgba(0,0,0,0.5); animation: slideInUp 1s ease-out;

        }

        #question { font-size: 1.8rem; margin-bottom: 25px; font-weight: 700; }

        .btn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; margin-top: 20px; }

        .btn {

            background: var(--secondary-color); border: 2px solid var(--primary-color);

            color: var(--text-color); padding: 15px; font-size: 1.1rem;

            font-weight: 700; border-radius: 5px; cursor: pointer; transition: all 0.3s ease;

        }

        .btn:hover { background: var(--primary-color); }

        .btn.selected { background: var(--primary-color); border-color: var(--text-color); }

        #next-btn { margin-top: 30px; }

        .hide { display: none; }


        /* Result Card */

        .result-card {

            background: var(--card-bg-color); padding: 30px; margin-top: 30px; border-radius: 10px;

            text-align: left; display: flex; flex-wrap: wrap; gap: 30px; align-items: center;

            animation: fadeIn 1s ease-in;

        }

        .result-card img { max-width: 150px; border-radius: 10px; }

        .result-card h3 { color: var(--primary-color); font-family: var(--body-font); font-weight: 700; font-size: 1.2rem; }

        .result-card h2 { font-family: var(--heading-font); font-size: 2rem; margin: 5px 0 15px; }


        /* Other Sections */

        .reviews-section, .tools-section { padding: 50px 0; }

        .section-title { text-align: center; font-family: var(--heading-font); font-size: 3rem; margin-bottom: 40px; }

        .review-grid, .tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

        .review-card, .tool-card { background: var(--card-bg-color); padding: 30px; border-radius: 10px; text-align: center; }

        .review-card { transition: transform 0.3s ease; }

        .review-card:hover { transform: translateY(-10px); }

        .review-card img { width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--primary-color); margin-bottom: 20px; }

        .review-card h4 { margin-top: 15px; color: var(--primary-color); font-style: italic; }

        .tool-card { border-left: 5px solid var(--primary-color); }

        .tool-card h3 { font-family: var(--heading-font); font-size: 2rem; margin-bottom: 15px; }

        .tool-button {

            display: inline-block; background: transparent; border: 2px solid var(--primary-color); color: var(--primary-color);

            padding: 10px 25px; margin-top: 20px; font-size: 1rem; text-decoration: none;

            border-radius: 5px; font-weight: 700; transition: all 0.3s ease;

        }

        .tool-button:hover { background: var(--primary-color); color: var(--text-color); }

        .main-footer { background: var(--secondary-color); text-align: center; padding: 20px 0; margin-top: 30px; border-top: 2px solid var(--primary-color); }


        /* Animations */

        @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

        @keyframes slideInUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

    </style>

</head>

<body>


    <header class="main-header">

        <div class="container"> <h1 class="logo">Pawsome<span>Eats</span></h1> <nav> <ul> <li><a href="#quiz-section">Find Food</a></li> <li><a href="#reviews">Reviews</a></li> <li><a href="#tools">Dog Tools</a></li> </ul> </nav> </div>

    </header>


    <main>

        <section class="hero-section">

            <div class="hero-overlay"></div>

            <div class="hero-content container">

                <h2>Find the Perfect Meal for Your Best Friend</h2>

                <p>Answer a few quick questions to get a personalized dog food recommendation!</p>

                <a href="#quiz-section" class="cta-button">Get Started</a>

            </div>

        </section>


        <section id="quiz-section" class="quiz-container container">

            <div id="quiz">

                <h2 class="quiz-title">Dog Food Finder</h2>

                <div id="question-container">

                    <p id="question"></p>

                    <div id="answer-buttons" class="btn-grid"></div>

                </div>

                <button id="next-btn" class="cta-button hide">Next</button>

            </div>

            <div id="result-container" class="hide result-card"></div>

        </section>


        <section id="reviews" class="reviews-section">

            <div class="container">

                <h2 class="section-title">Happy Pups, Happy Parents</h2>

                <div class="review-grid">

                    <div class="review-card"><img src="https://placedog.net/100/100?id=1" alt="Happy Dog 1"><p>"My husky's coat has never been shinier! He absolutely loves the salmon recipe."</p><h4>- Sarah J. & Bolt</h4></div>

                    <div class="review-card"><img src="https://placedog.net/100/100?id=2" alt="Happy Dog 2"><p>"Finally, a food that doesn't upset my pug's sensitive stomach. The grain-free option was a lifesaver."</p><h4>- Mike P. & Winston</h4></div>

                    <div class="review-card"><img src="https://placedog.net/100/100?id=3" alt="Happy Dog 3"><p>"As a senior dog, Max needs special care. The quiz pointed us to the perfect senior formula, and he's more active."</p><h4>- Linda K. & Max</h4></div>

                </div>

            </div>

        </section>


        <section id="tools" class="tools-section">

            <div class="container">

                <h2 class="section-title">Useful Dog Tools</h2>

                <div class="tools-grid">

                    <div class="tool-card"><h3>Dog Age Calculator</h3><p>Curious about your dog's age in human years? Use this simple calculator.</p><a href="techpk" target="_blank" class="tool-button">Calculate Now</a></div>

                    <div class="tool-card"><h3>Calorie Calculator</h3><p>Ensure your dog is getting the right amount of daily calories for their needs.</p><a href="techpk" target="_blank" class="tool-button">Check Calories</a></div>

                    <div class="tool-card"><h3>Breed Identifier</h3><p>Have a mixed-breed dog? This tool can help you identify their lineage.</p><a href="techpk" target="_blank" class="tool-button">Identify Breed</a></div>

                </div>

            </div>

        </section>

    </main>


    <footer class="main-footer">

        <div class="container"> <p>&copy; 2025 Pawsome Eats. All Rights Reserved.</p> </div>

    </footer>


    <!-- JavaScript Code Starts Here -->

    <script>

        document.addEventListener('DOMContentLoaded', () => {

            const questionElement = document.getElementById('question');

            const answerButtonsElement = document.getElementById('answer-buttons');

            const resultContainer = document.getElementById('result-container');

            const quizDiv = document.getElementById('quiz');

            const nextButton = document.getElementById('next-btn');


            let currentQuestionIndex = 0;

            let userAnswers = {};


            const questions = [

                { question: "What is your dog's age?", answers: [{ text: 'Puppy (0-1 year)', value: 'puppy' }, { text: 'Adult (1-7 years)', value: 'adult' }, { text: 'Senior (7+ years)', value: 'senior' }], key: 'age' },

                { question: 'What is your dog\'s size?', answers: [{ text: 'Small (under 10kg)', value: 'small' }, { text: 'Medium (10-25kg)', value: 'medium' }, { text: 'Large (over 25kg)', value: 'large' }], key: 'size' },

                { question: 'Does your dog have any special needs?', answers: [{ text: 'No, my dog is healthy', value: 'healthy' }, { text: 'Sensitive Stomach / Allergies', value: 'sensitive' }, { text: 'Needs Weight Management', value: 'weight' }], key: 'health' }

            ];


            // *** UPDATED CLICK LISTENER ***

            nextButton.addEventListener('click', () => {

                // Check if the user is on the last question

                if (currentQuestionIndex === questions.length - 1) {

                    // This is the "See Results" click.

                    // Open techpk in a new tab immediately. This is less likely to be blocked.

                    window.open('techpk', '_blank');

                    // Now, show the results on the current page.

                    showResult();

                } else {

                    // This is a "Next" click.

                    currentQuestionIndex++;

                    setNextQuestion();

                }

            });

            

            setNextQuestion();


            function setNextQuestion() {

                resetState();

                showQuestion(questions[currentQuestionIndex]);

            }


            function showQuestion(questionData) {

                questionElement.innerText = questionData.question;

                questionData.answers.forEach(answer => {

                    const button = document.createElement('button');

                    button.innerText = answer.text;

                    button.classList.add('btn');

                    button.addEventListener('click', (e) => selectAnswer(e.target, answer.value, questionData.key));

                    answerButtonsElement.appendChild(button);

                });

            }


            function resetState() {

                nextButton.classList.add('hide');

                while (answerButtonsElement.firstChild) {

                    answerButtonsElement.removeChild(answerButtonsElement.firstChild);

                }

            }


            function selectAnswer(selectedButton, value, key) {

                Array.from(answerButtonsElement.children).forEach(button => {

                    button.classList.remove('selected');

                });

                selectedButton.classList.add('selected');

                

                userAnswers[key] = value;

                nextButton.classList.remove('hide');

                

                if (currentQuestionIndex === questions.length - 1) {

                    nextButton.innerText = 'See Results';

                } else {

                    nextButton.innerText = 'Next';

                }

            }


            function showResult() {

                // The window.open command has been moved to the click listener

                // for better reliability against pop-up blockers.

                

                quizDiv.classList.add('hide');

                resultContainer.classList.remove('hide');

                resultContainer.innerHTML = ''; 


                const recommendation = getRecommendation(userAnswers);


                const resultHTML = `

                    <img src="${recommendation.image}" alt="${recommendation.name}">

                    <div class="result-info">

                        <h3>Your Personalized Recommendation:</h3>

                        <h2>${recommendation.name}</h2>

                        <p>${recommendation.description}</p>

                        <a href="${recommendation.buyLink}" target="_blank" class="cta-button">Buy Now on Amazon</a>

                    </div>

                `;

                resultContainer.innerHTML = resultHTML;

            }


            function getRecommendation(answers) {

                if (answers.health === 'sensitive') {

                    return { name: "Hill's Science Diet Sensitive Stomach & Skin", description: "A great choice for adult dogs with digestive issues or skin sensitivities. Formulated with prebiotic fiber.", buyLink: "techpk1", image: "https://m.media-amazon.com/images/I/716Dre5VYWL._AC_SX679_.jpg" };

                } else if (answers.age === 'puppy') {

                    return { name: "Royal Canin Size Health Nutrition X-Small Puppy Dry Dog Food", description: "Perfectly formulated for the high energy needs of small breed puppies up to 10 months old.", buyLink: "techpk1", image: "https://m.media-amazon.com/images/I/716LqKrtmIL._AC_SX679_.jpg" };

                } else if (answers.age === 'senior') {

                     return { name: "Blue Buffalo Life Protection Formula Senior", description: "Made with high-quality protein and essential nutrients to support the mobility and energy needs of senior dogs.", buyLink: "techpk1", image: "https://m.media-amazon.com/images/I/61j-z3m2qSL._AC_SY300_SX300_QL70_FMwebp_.jpg" };

                } else {

                    return { name: "Kibbles 'n Bits Dry Dog Food, Savory Bacon & Steak Flavor", description: "A grain-free formula with novel proteins like bison and venison, great for active adult dogs.", buyLink: "techpk1", image: "https://m.media-amazon.com/images/I/81-o6u4OL8L._AC_SX679_.jpg" };

                }

            }

        });

    </script>

    <!-- JavaScript Code Ends Here -->

</body>

</html>

Top Post Ad

Below Post Ad

Ads Area