<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: zaihl</title>
    <description>The latest articles on Forem by zaihl (@_zaihl).</description>
    <link>https://forem.com/_zaihl</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1584642%2Fe804e7bb-5b38-4b36-970e-f44aa2c63c32.jpg</url>
      <title>Forem: zaihl</title>
      <link>https://forem.com/_zaihl</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/_zaihl"/>
    <language>en</language>
    <item>
      <title>Glammed Up The Beaches With Blurry Animations.</title>
      <dc:creator>zaihl</dc:creator>
      <pubDate>Mon, 10 Jun 2024 00:13:38 +0000</pubDate>
      <link>https://forem.com/_zaihl/glammed-up-with-blurry-animations-401o</link>
      <guid>https://forem.com/_zaihl/glammed-up-with-blurry-animations-401o</guid>
      <description>&lt;h2&gt;
  
  
  Submission for &lt;a href="https://dev.to/challenges/frontend-2024-05-29"&gt;Frontend Challenge v24.04.17&lt;/a&gt;, Glam Up My Markup: Beaches 🏖️
&lt;/h2&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;For this challenge, I created a dynamic, animated web page featuring a day/night mode toggle 🌞🌜, an infinite carousel 🔄, and several other interactive elements. My goal was to brush up on my HTML, CSS, and vanilla JavaScript skills while experimenting with animations and DOM manipulation. This project was a deep dive into pure JavaScript without relying on any external libraries (except for Font Awesome), pushing me to understand and leverage core web technologies.&lt;/p&gt;

&lt;p&gt;There are five main sections in the website:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Intro Page&lt;/strong&gt;: The intro page welcomes you with a "Take me to the beach" button at the center. Here, you can toggle between day and night mode and enjoy the animations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Beach Carousel&lt;/strong&gt;: Clicking "Take me to the beach" transports you to a serene, animated beach scene with an infinite carousel of beach images.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Carousel Items&lt;/strong&gt;: Each item in the carousel can be expanded for a closer look at the beautiful beaches 🏝️.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Return to Intro&lt;/strong&gt;: If you missed the day/night toggle animations, you can go back by clicking the 'eye' icon on the top right 👁️.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hide Carousel&lt;/strong&gt;: A button to hide the carousel and fully appreciate the background animations.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;I have pushed the website on GitHub and Vercel. Here is the link in case you want to check it out:&lt;br&gt;
&lt;a href="https://github.com/zaihl/dev.to-frontend-challenge"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Or you can just look at my CodePen below:&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/SI-the-typescripter/embed/QWRMJeN?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;I recommend visiting &lt;a href="https://dev-to-frontend-challenge.vercel.app/"&gt;this link&lt;/a&gt; if you are on a mobile.&lt;/p&gt;

&lt;h2&gt;
  
  
  Journey
&lt;/h2&gt;

&lt;p&gt;Here is my journey of building a completely vanilla JavaScript project. I hope you enjoy the read 📖.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Moment of Discovery
&lt;/h3&gt;

&lt;p&gt;It all started on June 6th. Up until that moment, I was a wanderer on dev.to without an account, simply breezing through the website. Suddenly, a "dev challenges" section caught my eye 👀. Intrigued, I clicked on it, not fully understanding what was expected in the challenge. After some contemplation, I decided to participate. This marked my first foray into a development challenge, driven by a deep-seated pursuit of knowledge 📚.&lt;/p&gt;

&lt;h3&gt;
  
  
  Embarking on a Tutorial Spree
&lt;/h3&gt;

&lt;p&gt;Hi, I'm a pre-final year undergraduate college student. The programming industry is incredibly competitive, and standing out is crucial. During my summer vacation, I decided to dive into learning as much as possible. I purposefully entered what many call "tutorial hell" 🔥. There were numerous concepts I couldn't grasp, a common struggle for novice full-stack developers. I'm the type of person who prefers to understand everything before moving forward rather than reverse-engineering tutorials.&lt;/p&gt;

&lt;p&gt;Recently, I dabbled in Next.js with TypeScript and noticed my JavaScript skills deteriorating. Despite being in college for three years, I had never built a full-fledged project from scratch. Shocking, right? So, I challenged myself. Even though I had forgotten much about DOM manipulation with JavaScript and had many gaps in my CSS knowledge, I took on this challenge. It took me over 15 hours ⏱️, but I'm proud of what I've built. It's not perfect, but it's a significant accomplishment for me.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Tale of Two Versions
&lt;/h3&gt;

&lt;p&gt;This project you are viewing is actually the second version. My initial attempt was based on a misconception: I thought I couldn't modify the HTML at all, even with JavaScript. It was only after reviewing the previous winners' projects that I realized my mistake 🤦. This revelation led to a complete disappointment. I did not touch this challenge for the next two days. Finally, after coming to terms with myself, I created a version that leverages extensive DOM manipulation. The second version employs techniques like &lt;code&gt;appendChild&lt;/code&gt;, &lt;code&gt;insertAdjacentElement&lt;/code&gt;, &lt;code&gt;createElement&lt;/code&gt;, and &lt;code&gt;classList&lt;/code&gt; manipulations to dynamically create and manage elements.&lt;/p&gt;

&lt;p&gt;I apologize if you've taken a look at my JavaScript. It's messy 🌀. In my defense, I wrote most of it while sleep-deprived 😴.&lt;/p&gt;

&lt;h3&gt;
  
  
  Challenges and Obsessions
&lt;/h3&gt;

&lt;p&gt;The journey wasn't without its hurdles. I wasted an entire day on a self-imposed challenge that existed only in my mind. Transitioning to the second version was both exhausting and exhilarating. I had never developed a project with DOM manipulation before; I had only seen others do it. Naturally, I became deeply interested. I developed an obsession with animations, despite having little prior experience. I wanted to recreate the SAO link start animation... but yeah, that's inhumanely difficult 🚀. Learning to implement animations and transitions had its learning curve, but in hindsight, I'm proud of the results – even if I might have overused them a bit! The dark mode and light mode toggles are my favorite. After approximately 15 hours of work, including learning, I was finally finished. Yes, it sounds excessive, but being a perfectionist, I couldn't help myself.&lt;/p&gt;

&lt;p&gt;Take a look at my favorite part:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi9lyg5oiufbwdkywinv0.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi9lyg5oiufbwdkywinv0.gif" alt="GIF showing the dark mode toggle animation" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  JavaScript Magic: Dynamic HTML Creation
&lt;/h3&gt;

&lt;p&gt;I didn't alter the &lt;code&gt;.html&lt;/code&gt; file directly but used JavaScript to create numerous elements dynamically. Here's a breakdown of what I achieved:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Meta Tag &amp;amp; Font Library&lt;/strong&gt;: I modified the &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tag to prevent double-tap zooming and added the Font Awesome library.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Day/Night Mode Container&lt;/strong&gt;: I created a container for toggling between dark and light modes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Infinite Carousel&lt;/strong&gt;: An infinite carousel was born, with a working next button and a previous button that needs some tweaks. There's a bug that might cause storage issues, which I couldn't quite resolve.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expanded Container&lt;/strong&gt;: Clicking on any carousel item expands it into a detailed container.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hide Carousel Button&lt;/strong&gt;: I added a button to hide the carousel, allowing users to fully appreciate the animations.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Mobile-First Approach 📱
&lt;/h3&gt;

&lt;p&gt;I adopted a mobile-first approach, ensuring the design and functionality worked seamlessly on smaller screens before scaling up to desktop. I tackled each of the five major features one at a time, meticulously refining each element. Testing on various devices, from phones to iPads, was crucial. Unfortunately, I don't have a screen larger than 1440p, so we'll need to see how it performs on larger displays 🖥️.&lt;/p&gt;

&lt;p&gt;When all the features were implemented, that's when the real bug-solving began. There were countless adjustments, media queries, and keyframes. I was nearly burnt out 🔥.&lt;/p&gt;

&lt;h3&gt;
  
  
  Code Organization
&lt;/h3&gt;

&lt;p&gt;Let's be honest – my code is a bit (a lot) messy. Feel free to dive in and see for yourself, or perhaps ask ChatGPT or Gemini to clean it up 🧹!&lt;/p&gt;

&lt;h3&gt;
  
  
  Vanilla Challenge: No Libraries Allowed
&lt;/h3&gt;

&lt;p&gt;I set myself the challenge of using no external libraries, aiming to become fully proficient in vanilla JavaScript. The only exception was the Font Awesome library. This self-imposed rule pushed me to deeply understand the core technologies and enhance my problem-solving skills 🧠.&lt;/p&gt;

&lt;h3&gt;
  
  
  Growth in CSS Skills 🎨
&lt;/h3&gt;

&lt;p&gt;My CSS skills have definitely improved through this project. As a relatively new front-end developer, I lacked hands-on practice. This project served as a valuable opportunity to hone my skills, especially in crafting complex animations and responsive layouts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Thoughts
&lt;/h3&gt;

&lt;p&gt;Ultimately, my advice to anyone taking on a similar challenge is simple: have fun 🎉. Don't do it solely for the first place; do it to push your limits, learn something new, and challenge yourself to solve problems. Each feature I developed wasn't pre-planned. I'd sit there, often clueless at first, but the moments of deep thought and problem-solving led to my work flourishing 🌱.&lt;/p&gt;

&lt;p&gt;Before I end this, I would like to visually show the features.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Intro&lt;/strong&gt;: This is where you start.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F794a56g22itmhxh09xr7.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F794a56g22itmhxh09xr7.gif" alt="Intro GIF" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Infinite Carousel&lt;/strong&gt;: Built with pure vanilla JavaScript.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2yvnuqtx21s1svfzkgys.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2yvnuqtx21s1svfzkgys.gif" alt="Carousel GIF" width="1280" height="587"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Expanding Each Beach&lt;/strong&gt;: Each beach can be expanded for a closer look.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frmc4bc3aiyfkmamo98wg.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frmc4bc3aiyfkmamo98wg.gif" alt="Expand GIF" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Hiding the Carousel&lt;/strong&gt;: See the intro again by hiding the carousel.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9yv61b6dp78q0fohq2mc.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9yv61b6dp78q0fohq2mc.gif" alt="Hide GIF" width="1280" height="587"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Thank you for taking the time to read about my journey. I hope it inspires you to embark on your own projects, pushing past your boundaries and discovering the joy of creating something from scratch ✨.&lt;/p&gt;

&lt;p&gt;PS. Finally got over my 'first post phobia'. Now I won't feel nervous to make more posts 😌.&lt;br&gt;
PSS. I can finally sleep now! A good night's sleep 🛌.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>frontendchallenge</category>
      <category>css</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
