<?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: Luke</title>
    <description>The latest articles on DEV Community by Luke (@developedbyluke).</description>
    <link>https://dev.to/developedbyluke</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%2F1191552%2Fbeee3f92-99bd-44e6-9037-7114901592ca.jpg</url>
      <title>DEV Community: Luke</title>
      <link>https://dev.to/developedbyluke</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/developedbyluke"/>
    <language>en</language>
    <item>
      <title>Make noise overlay used in award-winning sites in 3 steps</title>
      <dc:creator>Luke</dc:creator>
      <pubDate>Mon, 23 Oct 2023 10:43:35 +0000</pubDate>
      <link>https://dev.to/developedbyluke/make-noise-overlay-used-in-award-winning-sites-in-3-steps-3omb</link>
      <guid>https://dev.to/developedbyluke/make-noise-overlay-used-in-award-winning-sites-in-3-steps-3omb</guid>
      <description>&lt;p&gt;You may have come across this trend on &lt;a href="https://www.awwwards.com/"&gt;Awwwards&lt;/a&gt;, especially in some portfolio sites on there.&lt;/p&gt;

&lt;p&gt;You can see it clearly on &lt;a href="https://www.davidobodo.com/"&gt;David Obodo's site.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The starting point is to find a noise overlay texture image that we can use. Something subtle with a transparent background works best.&lt;/p&gt;

&lt;p&gt;This is the one I'm going to be using. Just right click and save the image to use it with me 👇&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UEZGsIOe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/clu8w1lontu7604euvkx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UEZGsIOe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/clu8w1lontu7604euvkx.png" alt="noise texture overlay" width="500" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The HTML&lt;/strong&gt;&lt;br&gt;
Let's make a div and give it a class. It's best to have this div just inside the body but separate from everything else.&lt;/p&gt;

&lt;p&gt;HTML:&lt;br&gt;
&lt;code&gt;&amp;lt;div class="noise"&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;JSX (React):&lt;br&gt;
&lt;code&gt;&amp;lt;div className="noise"&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Setting the background image and making it fill the screen&lt;/strong&gt;&lt;br&gt;
It might seem strange that we are making the image much bigger than the screen but it is necessary as it's going to be getting moved around a lot when we bring in the animation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.noise {
    background-image: url("../assets/noise.png");
    position: fixed; // To show noise at all times
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200vh;
    opacity: 0.5; // To make the effect more subtle. You can adjust this to your liking.
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Adding a noise animation&lt;/strong&gt;&lt;br&gt;
The idea here is to move the image around very quickly. First we need to add the animation property to our existing .noise selector.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.noise {
    // Your existing code
    animation: noise 0.3s infinite;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now for the keyframes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@keyframes noise {
    0% {
        transform: translate(0, 0);
    }
    10% {
        transform: translate(-5%, -5%);
    }
    20% {
        transform: translate(-10%, 5%);
    }
    30% {
        transform: translate(5%, -10%);
    }
    40% {
        transform: translate(-5%, 15%);
    }
    50% {
        transform: translate(-10%, 5%);
    }
    60% {
        transform: translate(15%, 0);
    }
    70% {
        transform: translate(0, 10%);
    }
    80% {
        transform: translate(-15%, 0);
    }
    90% {
        transform: translate(10%, 5%);
    }
    100% {
        transform: translate(5%, 0);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;That's it!&lt;/strong&gt;&lt;br&gt;
If you now set your body's background colour to a dark colour you should have something that looks like this 👇&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IMLgXKTW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wccomeyqyr4stzwmx57z.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IMLgXKTW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wccomeyqyr4stzwmx57z.gif" alt="end result preview" width="800" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>design</category>
    </item>
    <item>
      <title>Make rotating circular text using Tailwind or plain CSS</title>
      <dc:creator>Luke</dc:creator>
      <pubDate>Sun, 22 Oct 2023 22:35:03 +0000</pubDate>
      <link>https://dev.to/developedbyluke/make-a-rotating-circular-text-button-1nlh</link>
      <guid>https://dev.to/developedbyluke/make-a-rotating-circular-text-button-1nlh</guid>
      <description>&lt;p&gt;A preview of the end result!&lt;br&gt;
&lt;a href="https://media.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%2Frea1f3hn7egi9savmnzp.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Frea1f3hn7egi9savmnzp.gif" alt="End result"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To get started, we're going to need to create some text with the letters following a circular path.&lt;/p&gt;

&lt;p&gt;Photoshop makes it easy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Select the ellipse tool&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fvafw67vf8x7h81ratqr9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fvafw67vf8x7h81ratqr9.png" alt="Ellipse tool location in Photoshop"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Change the mode from shape to path&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fm6oykypf4zdxlkevx4iz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fm6oykypf4zdxlkevx4iz.png" alt="Ellipse tool mode switch from shape to path"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Draw a circular path for the letters to follow&lt;/strong&gt;&lt;br&gt;
Tip: hold shift + option/alt for a perfect circle&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fcfoecz7zgynuqbqcxxa7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fcfoecz7zgynuqbqcxxa7.png" alt="Circle path example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Select the horizontal type tool&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2F35ihbkasckhr72v40krm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F35ihbkasckhr72v40krm.png" alt="Horizontal type tool location in Photoshop"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Type your text&lt;/strong&gt;&lt;br&gt;
Tip: hover over your circle path and click when you see the squiggly line icon showing&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fkrcrazawefabtxy6u0j8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fkrcrazawefabtxy6u0j8.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Export as PNG, place it somewhere in your project folder and import it into your project&lt;/strong&gt;&lt;br&gt;
I'm using React so I'm importing it like so:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

import CircularText from "./images/circular_text.png"

export default function App() {
    return (
        &amp;lt;img src={CircularText} /&amp;gt;
    )
}


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;7. Apply an animation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Using tailwind:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;img
    src={CircularText}
    className="animate-spin"
/&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Using plain CSS:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

img {
    animation-name: rotate;
    animation-duration: 5s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

@keyframes rotate{
    from{ transform: rotate(-360deg); }
    to{ transform: rotate(360deg); }
}


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;8. Adding something in the middle&lt;/strong&gt;&lt;br&gt;
I'm going to do so by grouping the images in a &lt;code&gt;div&lt;/code&gt; and centering the middle image using absolute positioning.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;div className="relative"&amp;gt;
    &amp;lt;img src={CircularText} className="animate-spin"/&amp;gt;
    &amp;lt;img src={MiddleImage}
         className="absolute left-1/2 top-1/2 w-11 -translate-x-1/2 -translate-y-1/2 transform"
    /&amp;gt;
&amp;lt;/div&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;9. Changing animation speed&lt;/strong&gt;&lt;br&gt;
If you're using plain CSS, you can change the animation speed by adjusting the value of the animation-duration property.&lt;/p&gt;

&lt;p&gt;Tailwind users, you're going to have to jump into the tailwind.config.js file. Here, I'm extending the default spin animation into a new animation I've called spin-slow. Make sure to use the name of your new animation back in your &lt;code&gt;&amp;lt;img /&amp;gt;&lt;/code&gt; e.g. &lt;code&gt;&amp;lt;img src={CircularText} className="animate-spin-slow" /&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

/** @type {import('tailwindcss').Config} */
module.exports = {
    content: ["./src/**/*.{js,ts,jsx,tsx,html}"],
    theme: {
        extend: {
            animation: {
                "spin-slow": "spin 25s linear infinite",
            },
        },
    },
    plugins: [],
};


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://emanuelepapale.com/" rel="noopener noreferrer"&gt;Credit to Emanuele Papale for the inspiration&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/luke-horton-7648bb283" rel="noopener noreferrer"&gt;Connect with me on LinkedIn&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>beginners</category>
      <category>tailwindcss</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
