DEV Community

Cover image for Front-end Challenge
Nizamuddin Shaikh
Nizamuddin Shaikh

Posted on

Front-end Challenge

This is a submission for Frontend Challenge - December Edition, Glam Up My Markup: Winter Solstice

What I Built

The given unstyled HTML page is sufficient for the subject. What I was looking is to style the page in Winter Solstice Colors with minimal styling making the page responsive. I have not used JavaScript at all, since page is already interactive.

Demo

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Winter Solstice Celebrations Around the World</title>
    <style>
        body {
            box-sizing: border-box;
            display: grid;
            font-family: sans-serif;
            font-size: 15px;
            background-color: rgb(211, 197, 147);
            padding: 8px;
        }
        p {
            text-align: justify;
            padding: 7px;
        }
        #main-nav  {
            background-color: antiquewhite;
            padding: 5px;
            ul {
                display: grid;
                justify-content: center;
                grid-template-columns: repeat(auto-fit, 15rem);
                gap: 5px;
                li {
                    list-style: none;
                    a {
                        text-decoration: none;
                        background-color: hsl(330, 100%, 20%);
                        color: white;
                        border-radius: 10px;
                        padding: 15px;
                        white-space: nowrap;
                        display: block;
                        width: 200px;
                        text-align: center;
                    }
                    a:hover {
                        outline: 2px solid hsl(330, 100%, 20%);
                        outline-offset: 1px;
                    }
                }
            }
        }
        #main-footer {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            background-color: rgb(179, 168, 132);
            padding: 5px;
            border: 1px solid white;
            p, nav, ul, li {
                display: inline;
            }
            p {
                white-space: nowrap;
            }
            ul {
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                li {
                    list-style: none;
                    margin-left: 20px;
                    white-space: nowrap;
                    a {
                        color: black;
                        text-decoration: none;
                    }
                }
            }
        }
    </style>
</head>
<body>
    <header id="main-header">
        <h1>Celebrating the Winter Solstice</h1>
        <nav id="main-nav">
            <ul>
                <li><a href="#introduction">Introduction</a></li>
                <li><a href="#science">The Science</a></li>
                <li><a href="#hemispheres">Solstice Across Hemispheres</a></li>
                <li><a href="#celebrations">Global Celebrations</a></li>
                <li><a href="#traditions">Solstice Traditions</a></li>
                <li><a href="#conclusion">Conclusion</a></li>
            </ul>
        </nav>
    </header>
    <section id="introduction">
        <h2>Introduction to the Winter Solstice</h2>
        <p>The winter solstice is a significant astronomical event that marks the shortest day and the longest night of the year. It occurs annually in December in the Northern Hemisphere and in June in the Southern Hemisphere. This event has been observed and celebrated by cultures around the world for thousands of years, often symbolizing rebirth, reflection, and the triumph of light over darkness.</p>
    </section>
    <section id="science">
        <h2>The Science Behind the Solstice</h2>
        <p>The solstices occur due to the Earth's axial tilt of approximately 23.5 degrees relative to its orbital plane around the Sun. This tilt causes different parts of the Earth to receive varying amounts of sunlight throughout the year, leading to the changing seasons. During the winter solstice, one hemisphere is tilted the farthest away from the Sun, resulting in the shortest period of daylight.</p>
        <p>At the exact moment of the solstice, the Sun reaches its lowest maximum elevation in the sky. In the Northern Hemisphere, this happens around December 21st or 22nd, when the Sun is directly over the Tropic of Capricorn at 23.5 degrees south latitude. In the Southern Hemisphere, the winter solstice occurs around June 20th or 21st, when the Sun is over the Tropic of Cancer at 23.5 degrees north latitude.</p>
        <p>The solstice is a precise moment in time, but its effects are felt throughout the day. The term "solstice" comes from the Latin words "sol" (sun) and "sistere" (to stand still), because the Sun's apparent movement north or south comes to a stop before reversing direction.</p>
    </section>
    <section id="hemispheres">
        <h2>Solstice Across Hemispheres</h2>
        <p>The experience of the solstice differs greatly between the Northern and Southern Hemispheres due to their opposite seasons.</p>
        <article class="hemisphere" id="northern-hemisphere">
            <h3>Northern Hemisphere</h3>
            <p>In the Northern Hemisphere, the December solstice marks the beginning of winter. Countries like the United States, Canada, Russia, and much of Europe experience their shortest day and longest night. The weather typically becomes colder, and many cultures have developed traditions to bring light and warmth into this dark time of year.</p>
        </article>
        <article class="hemisphere" id="southern-hemisphere">
            <h3>Southern Hemisphere</h3>
            <p>Conversely, in the Southern Hemisphere, the December solstice signals the start of summer. Nations such as Australia, South Africa, and Argentina enjoy their longest day and shortest night. This time is associated with warmth, outdoor activities, and often, summer vacations.</p>
        </article>
        <p>This opposite experience of the solstice underscores the diversity of cultural responses to the same astronomical event, influenced by local climate and historical traditions.</p>
    </section>
    <section id="celebrations">
        <h2>Global Celebrations of the Winter Solstice</h2>
        <article class="celebration" id="newgrange">
            <h3>Newgrange - Ireland</h3>
            <p>The prehistoric monument of Newgrange is aligned with the rising sun on the winter solstice. Built over 5,000 years ago, it predates Stonehenge and the Egyptian pyramids. Each year, a beam of sunlight illuminates the inner chamber, symbolizing the victory of light over darkness.</p>
        </article>
        <article class="celebration" id="intiraymi">
            <h3>Inti Raymi - Peru</h3>
            <p>Although traditionally held during the June solstice, which is the winter solstice in the Southern Hemisphere, Inti Raymi is an ancient Incan festival honoring the Sun god Inti. The celebration includes music, dancing, and sacrifices, reflecting the importance of the Sun in agricultural societies.</p>
        </article>
        <article class="celebration" id="modranicht">
            <h3>Modranicht - Anglo-Saxon Tradition</h3>
            <p>Meaning "Mother's Night," Modranicht was observed by the Anglo-Saxons on the eve of the winter solstice. It was a time to honor female deities and ancestral mothers, symbolizing fertility and the rebirth of the Sun.</p>
        </article>
        <article class="celebration" id="koliada">
            <h3>Koliada - Eastern Europe</h3>
            <p>Koliada is a Slavic festival celebrated during the winter solstice. Traditions include singing carols, feasting, and lighting fires to symbolize the return of the Sun. The festival has influenced modern Christmas and New Year traditions in the region.</p>
        </article>
    </section>
    <section id="traditions">
        <h2>Common Solstice Traditions</h2>
        <ul>
            <li><strong>Bonfires and Candles:</strong> Lighting fires and candles is a widespread tradition to represent light overcoming darkness.</li>
            <li><strong>Feasting:</strong> Communities gather to share meals, strengthening social bonds during the cold months.</li>
            <li><strong>Gift-Giving:</strong> Exchanging gifts symbolizes goodwill and sharing abundance.</li>
            <li><strong>Decorating with Evergreens:</strong> Using evergreen plants like holly and mistletoe represents eternal life and protection.</li>
            <li><strong>Reflection and Renewal:</strong> The solstice is a time for introspection, setting intentions for the coming year.</li>
        </ul>
    </section>
    <section id="conclusion">
        <h2>Conclusion</h2>
        <p>The winter solstice is a profound event that connects humanity across time and space. Despite differences in culture and climate, people around the world share common themes in their celebrations—hope, renewal, and the enduring human spirit. Understanding the science behind the solstice enhances our appreciation of these traditions and highlights our connection to the cosmos.</p>
    </section>
    <footer id="main-footer">
        <p>&copy; 2024 Winter Solstice Celebrations</p>
        <nav id="footer-nav">
            <ul>
                <li><a href="#main-header">Back to Top</a></li>
                <li><a href="#contact">Contact Us</a></li>
            </ul>
        </nav>
    </footer>
</body>
</html>
Enter fullscreen mode Exit fullscreen mode

Journey

In the process, I learnt

  • Using CSS Grid
  • Using colors to match mood of subject matter in a page

I also used nesting in CSS and found it wonderfully useful. I allow all to use contents of my code. I thank the DEV Platform to provide me opportunity to test my skills and display them on this platform.

Thank you all

Top comments (0)