<?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>DEV Community: plutonium239</title>
    <description>The latest articles on DEV Community by plutonium239 (@plutonium239).</description>
    <link>https://dev.to/plutonium239</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%2F674584%2Fbea000d5-b74f-41a3-9f77-5d215b3a35a9.png</url>
      <title>DEV Community: plutonium239</title>
      <link>https://dev.to/plutonium239</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/plutonium239"/>
    <language>en</language>
    <item>
      <title>My submission for the Frontend Challenge (Dec'24)</title>
      <dc:creator>plutonium239</dc:creator>
      <pubDate>Sat, 28 Dec 2024 13:54:04 +0000</pubDate>
      <link>https://dev.to/plutonium239/my-submission-for-the-frontend-challenge-dec24-426e</link>
      <guid>https://dev.to/plutonium239/my-submission-for-the-frontend-challenge-dec24-426e</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/frontend-2024-12-04"&gt;Frontend Challenge - December Edition, Glam Up My Markup: Winter Solstice&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;The website is live here: &lt;a href="https://plutonium-239.github.io/dev.to-frontend-challenge/"&gt;https://plutonium-239.github.io/dev.to-frontend-challenge/&lt;/a&gt;&lt;br&gt;
My goal was to make the given plain HTML more interactive 🤗, beautiful 🎆 and useful 🤖. I did this by &lt;em&gt;adding consistent styling&lt;/em&gt; to all the sections, &lt;em&gt;highlighting important terms&lt;/em&gt; for grasping content quicker while also &lt;em&gt;adding more contrast&lt;/em&gt;. I also optimized the site for a mobile layout and while it features less interaction, the site is equally well-themed and useful.&lt;/p&gt;
&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Again, the website is available here: &lt;a href="https://plutonium-239.github.io/dev.to-frontend-challenge/"&gt;https://plutonium-239.github.io/dev.to-frontend-challenge/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
  Static Images (click to expand):
  &lt;p&gt;The best way to interact with the website is to see it for yourself!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Filb8222vpg3qaqsr1o98.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Filb8222vpg3qaqsr1o98.png" alt="Cover" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4lq3u7admh4exfm2j7ge.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4lq3u7admh4exfm2j7ge.png" alt="Intro" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2xnxi5ci5kbqdv7nxkxt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2xnxi5ci5kbqdv7nxkxt.png" alt="Celebrations" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F38y01g3a2kjlhkbhhroj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F38y01g3a2kjlhkbhhroj.png" alt="Traditions" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;/p&gt;

&lt;p&gt;The source code is publicly available at&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/plutonium-239" rel="noopener noreferrer"&gt;
        plutonium-239
      &lt;/a&gt; / &lt;a href="https://github.com/plutonium-239/dev.to-frontend-challenge"&gt;
        dev.to-frontend-challenge
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      This is a submission for [Frontend Challenge - December Edition, Glam Up My Markup: Winter Solstice](https://dev.to/challenges/frontend-2024-12-04)
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/frontend-2024-12-04" rel="nofollow"&gt;Frontend Challenge - December Edition, Glam Up My Markup: Winter Solstice&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;What I Built&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;The website is live here: &lt;a href="https://plutonium-239.github.io/dev.to-frontend-challenge/" rel="nofollow"&gt;https://plutonium-239.github.io/dev.to-frontend-challenge/&lt;/a&gt;
My goal was to make the given plain HTML more interactive 🤗, beautiful 🎆 and useful 🤖. I did this by &lt;em&gt;adding consistent styling&lt;/em&gt; to all the sections, &lt;em&gt;highlighting important terms&lt;/em&gt; for grasping content quicker while also &lt;em&gt;adding more contrast&lt;/em&gt;. I also optimized the site for a mobile layout and while it features less interaction, the site is equally well-themed and useful.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Demo&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;The source code is publicly available at &lt;a href="https://github.com/plutonium-239/dev.to-frontend-challenge"&gt;https://github.com/plutonium-239/dev.to-frontend-challenge&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Journey&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Theming/CSS&lt;/h3&gt;

&lt;/div&gt;
&lt;p&gt;I wanted to go with a night sky theme because the Winter Solstice causes the Northern Hemisphere to experience the shortest day of the year. So, I remembered our old friend &lt;code&gt;particles.js&lt;/code&gt;. Except now it has transformed into &lt;a href="https://github.com/tsparticles/tsparticles" rel="noopener noreferrer"&gt;&lt;code&gt;tsParticles&lt;/code&gt;&lt;/a&gt; with a bunch of memory leak fixes, optimizations, and a rewrite…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/plutonium-239/dev.to-frontend-challenge"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;I feel like I need to assert that I did not edit any HTML directly except for adding script tags and link tags - no content was edited. All additions were done through CSS/JS (i.e. at runtime).&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;h3&gt;
  
  
  Theming/CSS
&lt;/h3&gt;

&lt;p&gt;I wanted to go with a night sky theme because the Winter Solstice causes the Northern Hemisphere to experience the shortest day of the year. So, I remembered our old friend &lt;code&gt;particles.js&lt;/code&gt;. Except now it has transformed into &lt;a href="https://github.com/tsparticles/tsparticles" rel="noopener noreferrer"&gt;&lt;code&gt;tsParticles&lt;/code&gt;&lt;/a&gt; with a bunch of memory leak fixes, optimizations, and a rewrite in typescript. This forms the background of the page. I configured it to not be distracting while also looking lively and aesthetically pleasing. Getting this setup was a pain that I did not expect. The latest version has a &lt;code&gt;tsparticles.bundle.js&lt;/code&gt; which is supposed to be everything you need and exports globals so that you can get started in one line, but that was not the case. I tried to manually call it's setup while using the &lt;code&gt;tsparticles.engine.js&lt;/code&gt; to no avail. This suffers from a &lt;em&gt;lack of useful documentation&lt;/em&gt;. I also tried the &lt;code&gt;slim&lt;/code&gt; version which had one example usage but it did not work. I tried just replacing the version with an older one (since what I needed was mostly basic behaviour and not their newer features) and struck gold with &lt;code&gt;1.43.1&lt;/code&gt;. You would expect following the instructions in the readme would get you live, but this was not true here.&lt;/p&gt;

&lt;p&gt;Choosing the color scheme was kind of a funny coincidence. I had seen a screenshot of a tumblr post/meme and really liked the colors in it. I literally searched for a &lt;a href="https://ifunny.co/picture/ii-macklesufficient-follow-almost-peed-my-pants-today-when-my-SCHIZRVdA" rel="noopener noreferrer"&gt;higher res image&lt;/a&gt; through Google Lens and extracted its colours. This provided me with 3 base colours (surface, primary, active). For the other colours, I wanted one of them to be a red-pink shade and one to be greenish/turquoise. I chose some colors in this range and matched the shade so that it was consistent with the current colour palette. I learnt about great tools like &lt;a href="http://colormind.io/" rel="noopener noreferrer"&gt;Colormind&lt;/a&gt; to try alternate colour palettes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://coolors.co/0b021a-9c82cc-856bb1-b953d0-d65586-28afb0" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2r3m3il9r8borputwotp.png" title="Find the palette on coolors" alt="Find the palette on coolors" width="800" height="167"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As for typography, I have known about the &lt;a href="https://fonts.google.com/specimen/Readex+Pro" rel="noopener noreferrer"&gt;Readex Pro&lt;/a&gt; font for quite some time now, and I really like it. It serves well both as a display font for headings and also as a base font for normal text. I did try a couple of others (Noto, Raleway) but ended up going with Readex Pro. I had also thought about going with a monospaced font for all the text, but the content on this page just wasn't compatible with that styling.&lt;/p&gt;

&lt;p&gt;Next, for the scroll-driven animations! I have wanted to use these in real websites for some time now, and I included them in the TOC and the heading. There were some issues with Firefox &lt;em&gt;(still)&lt;/em&gt; not supporting &lt;code&gt;animation-range&lt;/code&gt; (and scroll-driven animations themselves being disabled by default behind a flag&lt;sup id="fnref1"&gt;1&lt;/sup&gt;), so I had to implement a hack-ish fix (but you still need to enable the flag).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Added after posting - I forgot that I had also done this lol&lt;/em&gt;&lt;br&gt;
I have also added snappy scrolling because I wanted it to be a slide-by-slide kind of look. Using &lt;code&gt;scroll-snap-type: y mandatory;&lt;/code&gt; seemed very harsh and actively worked against me, so I settled on &lt;code&gt;scroll-snap-type: y proximity;&lt;/code&gt;, which is considerately weaker but at least doesn't subtract from the experience. Because of this the &lt;code&gt;min-height&lt;/code&gt; of each section was set to &lt;code&gt;100vh - &amp;lt;header&amp;gt;&lt;/code&gt; (except conclusion, which I felt should be shorter).&lt;/p&gt;
&lt;h3&gt;
  
  
  Content/HTML (through JS)/CSS
&lt;/h3&gt;

&lt;p&gt;Coming to the content, I did this in two ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Adding highlights to text through JS&lt;/strong&gt; - essentially needed to replace &lt;code&gt;innerHTML&lt;/code&gt; which feels bad, but not being able to modify HTML is pretty restricting.
I've also added an image to the introduction using JS by inserting an element. I did this because I wanted to add a little fade-in effect to it. Initially, I had done this through a CSS background on the section's &lt;code&gt;::after&lt;/code&gt;, but getting the fade to be consistent &lt;em&gt;(i.e. the top edge of the image to not be visibly sharp)&lt;/em&gt; across various desktop sizes and mobile turned out to be impossible. So, I had to add a new element in the section, and then style the &lt;code&gt;::after&lt;/code&gt; pseudo element constrained to the image itself - which works very well.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adding images to celebrations through CSS&lt;/strong&gt; - For each of the four celebrations, I found fitting pictures through various sources (credited) and added these through pseudo elements. I gave them a nice parallax style and also added a show full-image on hover interaction. Because of the diversity of images, I did my best to find high-resolution ones and then resized them to have a uniform width of 800px using ImageMagick. I implemented this in a clever way making use of the &lt;code&gt;.celebration&lt;/code&gt; class to define the framework and using CSS variables for each particular celebration to define the image URL (and the credits text).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For the traditions page, I changed out the list markers to (and learned how to use) a custom &lt;code&gt;@counter-style&lt;/code&gt; - this is a pretty nifty feature!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Interaction:&lt;/strong&gt; I added a scroll indicator in the TOC using the &lt;code&gt;IntersectionObserver&lt;/code&gt; API. This was fairly straightforward: check for intersection, set a class and that's it!&lt;/p&gt;

&lt;p&gt;There is also a hover effect on the celebration list items, which reveal the whole respective image. I did this through CSS by setting an image as the content of &lt;code&gt;::after&lt;/code&gt; and making it visible on hover.&lt;/p&gt;

&lt;p&gt;
  🤐&lt;del&gt;I might have also added a cool little secret at the end of the page&lt;/del&gt;🤐
  &lt;p&gt;This makes use of the Canvas API and a scroll listener. It looks pretty cool, but I wasn't 100% sure if it fit in with the rest of the styling.&lt;br&gt;
&lt;/p&gt;

&lt;br&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I am not a UI designer/webdev by profession. In fact, I am an ML researcher. But I have designed apps/websites, and I like being creative!&lt;/p&gt;

&lt;p&gt;So, when I saw the challenge post, I thought it was interesting but I didn't think I was going to take it too seriously. However, I coincidentally saw the screenshot talked about above, and a website using an old &lt;code&gt;particles.js&lt;/code&gt; effect, and those two must've clicked at some point. Call that a Christmas miracle! 😅&lt;/p&gt;

&lt;p&gt;I don't really have any future steps in mind, I feel like I did what I planned on doing and more.&lt;/p&gt;

&lt;p&gt;Going over some others' submissions, I think it was not that clear that the HTML could not be edited directly. I have followed this set rule and only added a script tag and link tags for CSS - &lt;strong&gt;without editing any of the actual markup content&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The code is available under the MIT License.&lt;/p&gt;




&lt;ol&gt;

&lt;li id="fn1"&gt;
&lt;p&gt;For anyone on firefox/-based browsers (e.g. Zen), turn on &lt;code&gt;layout.css.scroll-driven-animations.enabled&lt;/code&gt; in &lt;code&gt;about:config&lt;/code&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;

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