mirror of
https://github.com/Xevion/grain.git
synced 2025-12-05 23:15:08 -06:00
More post content, index.html title
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Noise Test</title>
|
||||
<title>Grain</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { SparklesIcon } from "@heroicons/react/20/solid";
|
||||
|
||||
const Post = () => {
|
||||
return (
|
||||
<>
|
||||
@@ -9,18 +11,49 @@ const Post = () => {
|
||||
<span className="pl-1 py-1 text-zinc-500">
|
||||
Created by{" "}
|
||||
<a
|
||||
href="https://github.com/Xevion"
|
||||
href="https://xevion.dev"
|
||||
target="_blank"
|
||||
className="text-zinc-800 hover:text-sky-700"
|
||||
className="transition-colors text-sky-800 hover:text-sky-600"
|
||||
>
|
||||
Ryan Walters
|
||||
</a>
|
||||
<a href="https://github.com/Xevion" target="_blank" className="hover:text-yellow-600 transition-colors cursor-pointer">
|
||||
<SparklesIcon className="h-4 inline mb-2.5 m-2 " />
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<div className="space-y-4">
|
||||
<p className="semibold-children">
|
||||
A small experiment on creating beautiful, dynamic backgrounds with
|
||||
colorful gradients & film grain. Built in <b>React</b> & <b>Vite</b> with <b>SVGs</b> and layers of <b>Radial Gradients</b>.
|
||||
colorful gradients & film grain. Built in <b>React</b> & <b>Vite</b>{" "}
|
||||
with <b>SVGs</b> and layers of <b>Radial Gradients</b>.
|
||||
</p>
|
||||
<p>
|
||||
This app was inspired by the gradients used{" "}
|
||||
<a
|
||||
href="https://www.instagram.com/p/ClUe3ONJaER/"
|
||||
target="_blank"
|
||||
className="text-sky-800 hover:text-sky-600"
|
||||
>
|
||||
certain popular instagram post
|
||||
</a>{" "}
|
||||
with beautiful gradients and a slight film grain applied. I wanted
|
||||
to create something similar, but in a website form.
|
||||
</p>
|
||||
<p>
|
||||
By using a SVG with a{" "}
|
||||
<pre className="inline"><feTurbulence></pre> filter inside,
|
||||
stacked upon several <pre className="inline">radial-gradient</pre>{" "}
|
||||
background images, the same effect can be created. Since SVGs do not
|
||||
naturally repeat internally, the SVG itself must be generated in
|
||||
such a way that the noise always displays the same way.
|
||||
</p>
|
||||
<p>
|
||||
React comes in handy here, allowing composition of an SVG, and then
|
||||
conversion to a <pre className="inline">base64</pre> encoded string.
|
||||
As a <pre className="inline">base64</pre> image, it can be fed into
|
||||
the <pre className="inline">background</pre> CSS property, allowing
|
||||
dynamic SVG generation.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -41,3 +41,7 @@ body {
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
pre.inline {
|
||||
@apply text-zinc-900;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user