<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Cristian Marquez on Medium]]></title>
        <description><![CDATA[Stories by Cristian Marquez on Medium]]></description>
        <link>https://medium.com/@cristianmmaquez?source=rss-b7faa258f185------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*wg_49vpB0wUg44j6.jpg</url>
            <title>Stories by Cristian Marquez on Medium</title>
            <link>https://medium.com/@cristianmmaquez?source=rss-b7faa258f185------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 17:40:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cristianmmaquez/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A Simple CSS Text Animation]]></title>
            <link>https://medium.com/@cristianmmaquez/a-simple-css-text-animation-eaf0b6f9ad05?source=rss-b7faa258f185------2</link>
            <guid isPermaLink="false">https://medium.com/p/eaf0b6f9ad05</guid>
            <dc:creator><![CDATA[Cristian Marquez]]></dc:creator>
            <pubDate>Thu, 30 Jul 2020 02:11:15 GMT</pubDate>
            <atom:updated>2020-07-30T02:11:15.728Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’re trying to spice up your Header with simple text animation, you have come to the right place!</p><p>HTML stands for HyperText Markup Language</p><p>CSS stands for Cascading Style Sheets</p><p>Animations — <strong>CSS animations</strong> make it possible to animate transitions from one CSS style configuration to another.</p><h3>PART 1: The Setup</h3><p>Before we start animating, lets set up our work environment and make sure we have everything we need in our code.<br><strong>And the best part</strong> — You can alter anything and everything without changing the document flow.</p><p>These are the steps to set everything up.</p><ol><li><strong>First</strong>, create a basic HTML document</li></ol><pre>&lt;html lang=&quot;en&quot;&gt;</pre><pre>&lt;head&gt;</pre><pre>&lt;meta charset=&quot;UTF-8&quot;&gt;</pre><pre>&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=&quot;&gt;</pre><pre>&lt;title&gt;Text animation&lt;/title&gt;</pre><pre>&lt;/head&gt;</pre><pre>&lt;body&gt;</pre><pre>&lt;header&gt;</pre><pre>&lt;h1&gt;Large Text&lt;/h1&gt;</pre><pre>&lt;h2&gt;Small text&lt;/h2&gt;</pre><pre>&lt;/header&gt;</pre><pre>&lt;/body&gt;</pre><pre>&lt;/html&gt;</pre><p>2. Second, create a CSS document.</p><pre>New File : Style.css</pre><p>3. Third, link your CSS document to your HTML</p><p>add your &lt;link rel=”stylesheet” href=”style.css”&gt; inside your header tag to connect your style sheet to your HTML document.</p><pre>&lt;html lang=&quot;en&quot;&gt;</pre><pre>&lt;head&gt;</pre><pre>&lt;meta charset=&quot;UTF-8&quot;&gt;</pre><pre>&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=&quot;&gt;</pre><pre>&lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;&gt;</pre><pre>&lt;title&gt;Text animation&lt;/title&gt;</pre><pre>&lt;/head&gt;</pre><pre>&lt;body&gt;</pre><pre>&lt;header&gt;</pre><pre>&lt;h1&gt;Large Text&lt;/h1&gt;</pre><pre>&lt;h2&gt;Small text&lt;/h2&gt;</pre><pre>&lt;/header&gt;</pre><pre>&lt;/body&gt;</pre><pre>&lt;/html&gt;</pre><p>Now that our files are connected let’s dig a little deeper, shall we?</p><h3>PART 2: Styling Our Elements</h3><p>In this section, we will style our body, header, h1, and h2 <strong>elements </strong>to prepare for our text animation.</p><h4>Let’s start with our body element</h4><p>We can either add an image for our background or color.</p><p>I choose to go with a high-quality photo from Unsplash.com, Unsplash has Beautiful, free images and photos that you can download and use for any project. Better than any royalty free or stock photos.</p><pre>body   {</pre><pre>background-image: url(https://medium.com/&quot;https://images.unsplash.com/photo-1593642634367-d91a135587b5?ixlib=rb-1.2.1&amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;auto=format&amp;fit=crop&amp;w=1350&amp;q=80&quot;);</pre><pre>background-position: no-repeat;</pre><pre>background-size: cover;</pre><pre>}</pre><p>In our style sheet, I have included three CSS properties</p><ol><li>background-image: URL(<strong>Include image URL here</strong> )</li><li>background-position: cover</li><li>background-size:cover</li></ol><p>These three styling properties allow me to choose a background image and change the size and position of that background. <strong>Learn </strong>more about <strong>background properties</strong> and how they work<strong>, </strong>here at <a href="https://www.w3schools.com/cssref/css3_pr_background.asp">w3schools</a></p><h4>Next, let’s handle our Header Element</h4><pre>header {</pre><pre>margin-top: 40px;</pre><pre>text-align: center;</pre><pre>}</pre><p>Here we are centering our text and giving it a spacing of 40px from the top.</p><h4>Finally, let us add our h1 and h2 styling</h4><pre>header h1 {</pre><pre>font-size: 85px;</pre><pre>color: rgb(255, 255, 255);</pre><pre>}</pre><pre>header h2 {</pre><pre>font-size: 70px;</pre><pre>color: rgba(51, 107, 73, 0.877);</pre><pre>text-shadow: 2px 2px 5px rgb(0, 0, 0);</pre><pre>}</pre><p>Inside our header, we have our h1 and h2 elements we will be adding a large font-size and different colors to each element. You don’t have to follow the same colors as the tutorial. Choose the most appropriate colors that work with your image or colored background.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iCiYbhx2Am_kC9vtJu9s0Q.png" /></figure><p>At this point, we should have something like this.</p><h3>PART 3: Animations</h3><p>CSS has a plethora of different animation properties we can use in our tutorial, but we will keep it simple.</p><p>In this final section, we will be discussing</p><ul><li>keyframes</li><li>animations-name</li><li>animation-duration</li><li>transitions</li></ul><p><strong>Keyframes </strong>are used to specify the values for the animating properties at various stages of the animation.</p><p><strong>Animations-name — </strong>Our animations name’s will go after our keyframe property.</p><p><strong>Animation-duration — </strong>property defines how long an <strong>animation</strong> should take to complete one cycle.</p><p><strong>Transitions </strong>— <strong>ease-in</strong>-out — specifies a <strong>transition</strong> effect with a slow start and end</p><p>The following code is what you should add next to your Style.CSS</p><pre>@keyframes moveInLeft {</pre><pre>0%{</pre><pre>opacity: 0;</pre><pre>transform: translateX(-100px);</pre><pre>}</pre><pre>80% {</pre><pre>transform: translateX(10px);</pre><pre>}</pre><pre>100% {</pre><pre>opacity: 1;</pre><pre>transform: translate(0);</pre><pre>}</pre><pre>}</pre><pre>@keyframes moveInRight {</pre><pre>0%{</pre><pre>opacity: 0;</pre><pre>transform: translateX(100px);</pre><pre>}</pre><pre>80% {</pre><pre>}</pre><pre>100% {</pre><pre>opacity: 1;</pre><pre>transform: translate(0);</pre><pre>}</pre><pre>}</pre><p>Here we are creating multiple animations that start from one position and end at another. TrasnlateX allows us to traverse horizontally across the screen, specifically to the amount of px we input. This will give us the sliding animation for the text.</p><p>Each animation starts at 0% and ends at 100% either going right or left.</p><h4><strong>Lastly</strong></h4><p>In order to add our animation to our Text, we must add the properties animation-name, animation duration, and transition to our h1 and h2 tags.</p><pre>header h1 {</pre><pre>font-size: 85px;</pre><pre>color: rgb(255, 255, 255);</pre><pre>animation-name: moveInLeft;</pre><pre>animation-duration: 2s;</pre><pre>transition: ease-in;</pre><pre>}</pre><pre>header h2 {</pre><pre>font-size: 70px;</pre><pre>color: rgba(51, 107, 73, 0.877);</pre><pre>text-shadow: 2px 2px 5px rgb(0, 0, 0);</pre><pre>animation-name: moveInRight;</pre><pre>animation-duration: 2s;</pre><pre>transition: ease-in;</pre><pre>}</pre><p><strong>Once everything is said and done, Our final style sheet should look like this.</strong></p><pre>body   {</pre><pre>background-image: url(https://medium.com/&quot;https://images.unsplash.com/photo-1593642634367-d91a135587b5?ixlib=rb-1.2.1&amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;auto=format&amp;fit=crop&amp;w=1350&amp;q=80&quot;);</pre><pre>background-position: no-repeat;</pre><pre>background-size: cover;</pre><pre>}</pre><pre>header {</pre><pre>margin-top: 40px;</pre><pre>text-align: center;</pre><pre>}</pre><pre>header h1 {</pre><pre>font-size: 85px;</pre><pre>color: rgb(255, 255, 255);</pre><pre>animation-name: moveInLeft;</pre><pre>animation-duration: 2s;</pre><pre>transition: ease-in;</pre><pre>}</pre><pre>header h2 {</pre><pre>font-size: 70px;</pre><pre>color: rgba(51, 107, 73, 0.877);</pre><pre>text-shadow: 2px 2px 5px rgb(0, 0, 0);</pre><pre>animation-name: moveInRight;</pre><pre>animation-duration: 2s;</pre><pre>transition: ease-in;</pre><pre>}<br></pre><pre>/* creating an animation */<br></pre><pre>@keyframes moveInLeft {</pre><pre>0%{</pre><pre>opacity: 0;</pre><pre>transform: translateX(-100px);</pre><pre>}</pre><pre>80% {</pre><pre>transform: translateX(10px);</pre><pre>}</pre><pre>100% {</pre><pre>opacity: 1;</pre><pre>transform: translate(0);</pre><pre>}</pre><pre>}</pre><pre>@keyframes moveInRight {</pre><pre>0%{</pre><pre>opacity: 0;</pre><pre>transform: translateX(100px);</pre><pre>}</pre><pre>80% {</pre><pre>}</pre><pre>100% {</pre><pre>opacity: 1;</pre><pre>transform: translate(0);</pre><pre>}</pre><pre>}</pre><p>Thanks for reading! My name is Cristian M., and I often write about learning new stuff. You can check out the full animation at <a href="https://codepen.io/CristianM123456/pen/OJMegJZ">codepen</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eaf0b6f9ad05" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Router]]></title>
            <link>https://medium.com/@cristianmmaquez/react-router-c5c109734951?source=rss-b7faa258f185------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5c109734951</guid>
            <category><![CDATA[react-router-dom]]></category>
            <dc:creator><![CDATA[Cristian Marquez]]></dc:creator>
            <pubDate>Thu, 23 Jul 2020 00:48:06 GMT</pubDate>
            <atom:updated>2020-07-23T00:48:06.694Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gI9ZKnZwZX-BQvw8SjXtEw.jpeg" /></figure><p>In this post, we’ll understand what React Router is, how it works, and how to use it. Since this will be a React Router tutorial, You should already know-how to create a react app. If you don’t that’s fine. Here’s a great tutorial on how to create your <a href="https://medium.com/better-programming/getting-started-with-react-js-part-1-59598ef17780">First React App.</a></p><h3>What is React Router?</h3><p>React-Router is a tool that allows you to handle routes in a React Web App, using dynamic routing. Dynamic Routing takes place as the App is rendering. In the traditional way of routing, routing is handled in a configuration out of the running app. With React Routing any subsequent request we make inside a React root Component (App.js) will be handle by React-Router. Instead of going all the way to the server, React-Router will serve up your request and inject it into your root component(App.js). We will be using the <a href="https://reactrouter.com/web/guides/philosophy">React-Router </a>library. Take note that, this library has three variants, but in this tutorial, we will only be covering the <strong>react-router-dom </strong>variant<strong>.</strong></p><h4>What We’ll Build Today</h4><p>Today we will build a navigation that uses the React-Router package to render out different components(Pages) to our web application.</p><h3>What we Will need First!</h3><h4>Install Node</h4><p>First, you will need to install Node onto your terminal.Node.js is an open-source, cross-platform, JavaScript runtime environment that executes JavaScript code outside a web browser. You can download Node.JS <a href="https://nodejs.org/en/download/">here</a>. Node will also allow you to install the Node Package Manager or NPM to install different packages to our application.</p><h4>React-Router-Dom</h4><p>Next, We’ll layout most of the groundwork to start using React Router. You will need to install a react-router-dom package into your React Application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*JbEqm0mrXmOt9AB77DRwxw.png" /></figure><p>Once Installed, we can now start setting up our routes. Let’s create a couple of components to route to. Name them whatever you like. For this tutorial, we will use“ Home.js”,“ About.js”, “Contact.js”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*sGobzm5RdyV3X7jPbiF3ag.png" /></figure><p>Here we have constructed three <a href="https://medium.com/@Zwenza/functional-vs-class-components-in-react-231e3fbd7108#:~:text=A%20functional%20component%20is%20just,which%20returns%20a%20React%20element.">function-based components</a>. Import each new component into our main App.js to render.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*LLWBE7Ie2EbPiBVdP-o9Hg.png" /></figure><p>Once imported, start the application and check if your components are rendering. Your React App Should look something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8D4_4BwtHqzz3_OiCCuSfg.png" /></figure><h3>Setting Up Our Index</h3><p>The goal is to have these components render in separate paths. First, we must go into our Index.js and import BrowserRouter, then wrap the BrowserRouter component around our App component.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*mRwTo5n-_1lZHbZGxvu8dw.png" /></figure><p>This will now allow us to use the<strong> route methods</strong> within our App.js Component. In your App.js import <strong>link </strong>right after <strong>Route </strong>from react-router-dom. Remove and replace the code within our div container with the code below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*qQSqQ6PIP7JkS7zpAigUbQ.png" /></figure><p>As you can see, now each component will have its own pathway. This is essentially how the React-Router-Dom works. Now that we have our routes figured out, let’s create a simple Navigation.</p><h3>Create a Navigation</h3><p>Lastly, let’s create a simple Navbar Component. Which you can style and use to switch between pages. When creating our new Navbar component remember to import <strong>Link</strong>. The <strong>Link </strong>will allow us to do client-side routing. This means we won’t have to create a get request, instead the component will load instantly.</p><p>Inside our Navbar function, we will add our <strong>Link </strong>method to route to each pathway.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*1g9BbDd1Vr058GYn6aoZyA.png" /></figure><p>Then we will import our Navbar component to our App.js.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/1*zRjdc9UtgNWYwpfoJlHu0g.png" /></figure><p>Once imported we will use that component inside our App function, to render to our navigation. Make sure to place your Navbar component above the rest of your code. All that’s left is to start your application again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*aOSCOBk_FVtFvba2z50SYw.png" /></figure><h3>Conclusion</h3><p>Now you, are fully equipped to build <strong>React </strong>application with multiple <strong>Routes </strong>to various components. Hopefully, you have enjoyed this article and are on your way to creating complex react apps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5c109734951" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>