<?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: Clément Gaudinière</title>
    <description>The latest articles on Forem by Clément Gaudinière (@clementgaudiniere).</description>
    <link>https://forem.com/clementgaudiniere</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%2F610201%2Ffda4d3a8-ecf9-4fe0-a1be-e32aca07d910.png</url>
      <title>Forem: Clément Gaudinière</title>
      <link>https://forem.com/clementgaudiniere</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/clementgaudiniere"/>
    <language>en</language>
    <item>
      <title>JS Copy text to the user's clipboard</title>
      <dc:creator>Clément Gaudinière</dc:creator>
      <pubDate>Wed, 13 Apr 2022 18:36:56 +0000</pubDate>
      <link>https://forem.com/clementgaudiniere/js-copy-text-to-the-users-clipboard-4hp4</link>
      <guid>https://forem.com/clementgaudiniere/js-copy-text-to-the-users-clipboard-4hp4</guid>
      <description>&lt;p&gt;When programming a website, it often happens that you have to copy text in the user's clipboard. Whether it is to copy a piece of code, a token (like on GitHub), a URL, or simply a message. That's why in this article we will see how to copy a text in the user's clipboard, without any libraries, in vanilla javascript.&lt;/p&gt;




&lt;h3&gt;
  
  
  What method should I use ?
&lt;/h3&gt;

&lt;p&gt;To do this, we can use the javascript function: &lt;code&gt;execCommand()&lt;/code&gt;. But according to &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/document/execCommand" rel="noopener noreferrer"&gt;MDN web docs&lt;/a&gt;, this function will soon become obsolete and be removed from the web standards. That's why in this tutorial we will use another method: &lt;code&gt;Clipboard.writeText()&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;The syntax of this function is quite simple:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
 js
let variable = navigator.clipboard.writeText(‘your text’);


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

&lt;/div&gt;

&lt;p&gt;First, we will see how to copy the content of an input to the user's clipboard. Then we will see a more complicated example in which we will have several pieces of code that the user can copy.&lt;/p&gt;




&lt;h3&gt;
  
  
  A simple example
&lt;/h3&gt;

&lt;p&gt;In this example, the user will be able to enter the text he wants in an input and copy the text it contains by clicking on a button provided for this purpose. The first step, as in any web project, is to set up our HTML. In our case, it is very simple: an input and a "copy" button.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
 html
&amp;lt;input type="text" id="textInput" placeholder="Your text"&amp;gt;
&amp;lt;button id="copy" content=""  onclick="copyText(event)" &amp;gt;&amp;lt;/button&amp;gt;


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

&lt;/div&gt;

&lt;p&gt;Anticipating our future JavaScript, we call the &lt;code&gt;copyText()&lt;/code&gt; function when the user clicks on the "copy" button.&lt;/p&gt;

&lt;p&gt;Then, we just have to add our javascript, using the function mentioned before:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
 js
// We select our input 
let input = document.getElementById("textInput");

// Copy the text of the input 
copyText = (e) =&amp;gt; {
  // We check that the input is not empty 
  if (input.value.length) {
    // We copy the text it contains into the clipboard 
    navigator.clipboard.writeText(input.value).then(() =&amp;gt; {
      // We confirm the action in the console 
      console.log("Text Copied !");
    })
  } else {
    console.log("The input is empty ");
  }
}


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

&lt;/div&gt;

&lt;p&gt;Adding a little CSS to make it look a little prettier, we get this:&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/clement-gaudiniere/embed/bGaKjJY?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;(On some browsers the "copy" function can be deactivated in the codepen preview. To test the program you may have to open the program, by clicking on "Edit on CodePen")&lt;/p&gt;




&lt;h3&gt;
  
  
  An example a little more complicated
&lt;/h3&gt;

&lt;p&gt;In this second, slightly more complicated example, we detect the user's click on the "copy" button and then we retrieve the id of the button (by removing the characters before the button number). Then we get the text of the corresponding code block. Then as in the following example we put the content of our variable &lt;code&gt;text&lt;/code&gt; in the user's clipboard. &lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/clement-gaudiniere/embed/qBpymgY?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Going a little further
&lt;/h3&gt;

&lt;p&gt;But that's not all, we can go a bit further because there are other methods for &lt;code&gt;clipboard&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For example we can retrieve the content of the user's clipboard (with their permission), even if it's not text with the &lt;code&gt;read()&lt;/code&gt; method&lt;/li&gt;
&lt;li&gt;If we just want to retrieve the text, we use the &lt;code&gt;readText()&lt;/code&gt; method.&lt;/li&gt;
&lt;li&gt;In the same way we can copy an image with the &lt;code&gt;write()&lt;/code&gt; method&lt;/li&gt;
&lt;li&gt;Finally, the method we used in this tutorial: &lt;code&gt;writeText()&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;I hope you enjoyed this tutorial, if you have any questions, feel free to ask me in the comments. 👍&lt;/p&gt;




&lt;p&gt;You want to support me ?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/clemgaudiniere" rel="noopener noreferrer"&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%2F4b9u45k83m0gjbk2vo8m.png" alt="Buymeacoffee"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OR&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.patreon.com/clementGaudiniere" rel="noopener noreferrer"&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%2Fe784und5tziinkkhg0im.png" alt="Patreon"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Create a parallax effect when the mouse moves</title>
      <dc:creator>Clément Gaudinière</dc:creator>
      <pubDate>Sat, 19 Feb 2022 10:35:13 +0000</pubDate>
      <link>https://forem.com/clementgaudiniere/create-a-parallax-effect-when-the-mouse-moves-3km0</link>
      <guid>https://forem.com/clementgaudiniere/create-a-parallax-effect-when-the-mouse-moves-3km0</guid>
      <description>&lt;p&gt;Animated and interactive pages attract more and more attention from users. For this, we can use complex animations, or others simpler as parallaxes. There are two types of parallaxes: those that are activated when the page is scrolled, and others that are animated when the mouse is moved. Today we will see how to create a parallax effect when moving the mouse in javascript vanilla.&lt;/p&gt;




&lt;h3&gt;
  
  
  Setting up in HTML
&lt;/h3&gt;

&lt;p&gt;The HTML structure will be relatively simple. We will use a main &lt;code&gt;div&lt;/code&gt;, containing several &lt;code&gt;spans&lt;/code&gt;, corresponding to animated balls when moving the mouse around a main title. Here is the HTML:&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&lt;br&gt;
 html&lt;br&gt;
&amp;lt;div class="parallax-wrap"&amp;gt;&lt;br&gt;
  &amp;lt;span value="-15"&amp;gt;&amp;lt;/span&amp;gt;&lt;br&gt;
  &amp;lt;span value="5"&amp;gt;&amp;lt;/span&amp;gt;&lt;br&gt;
  &amp;lt;span value="30"&amp;gt;&amp;lt;/span&amp;gt;&lt;br&gt;
  &amp;lt;span value="-5"&amp;gt;&amp;lt;/span&amp;gt;&lt;br&gt;
  &amp;lt;span value="15"&amp;gt;&amp;lt;/span&amp;gt;&lt;br&gt;
  &amp;lt;h2&amp;gt;Parallax effect&amp;lt;/h2&amp;gt;&lt;br&gt;
&amp;lt;/div&amp;gt;

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

&lt;/div&gt;
&lt;h3&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Setting up the CSS&lt;br&gt;
&lt;/h3&gt;

&lt;p&gt;Concerning the CSS, nothing new, we will use only basic features of the language.&lt;br&gt;
It is important to set &lt;code&gt;overflow&lt;/code&gt; to &lt;code&gt;hidden&lt;/code&gt; in the body, otherwise the animated balls will create a scroll of the page.&lt;br&gt;
The &lt;code&gt;span&lt;/code&gt; must be in &lt;code&gt;position: absolute;&lt;/code&gt;, and have a &lt;code&gt;border-radius&lt;/code&gt; of 100%, in order to create circular blocks. &lt;br&gt;
Then we set each &lt;code&gt;span&lt;/code&gt; one by one, by defining a color, a &lt;code&gt;z-index&lt;/code&gt;, and its position. Here is the CSS (you can see the SCSS code in the codepen at the end) :&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;

&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100vh&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#bd1060&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;hidden&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;box-sizing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;border-box&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.parallax-wrap&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100vh&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;hidden&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.parallax-wrap&lt;/span&gt; &lt;span class="nt"&gt;h2&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;z-index&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.parallax-wrap&lt;/span&gt; &lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.parallax-wrap&lt;/span&gt; &lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="nd"&gt;:nth-child&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;70%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;70%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;z-index&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.parallax-wrap&lt;/span&gt; &lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="nd"&gt;:nth-child&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;2&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;60%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;80%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;yellow&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;z-index&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.parallax-wrap&lt;/span&gt; &lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="nd"&gt;:nth-child&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;3&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;40%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;60%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;green&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;z-index&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.parallax-wrap&lt;/span&gt; &lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="nd"&gt;:nth-child&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;4&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;70%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;40%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;z-index&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.parallax-wrap&lt;/span&gt; &lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="nd"&gt;:nth-child&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;5&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;40%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;purple&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;z-index&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


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

&lt;/div&gt;
&lt;h3&gt;
  
  
  Setting up the JS
&lt;/h3&gt;

&lt;p&gt;First of all we have to detect when the user moves his mouse, with line 1. Then we trigger a &lt;code&gt;parallax&lt;/code&gt; function, which selects all the &lt;code&gt;spans&lt;/code&gt; contained in our main container. Then we animate them as it should be. The Javascript code:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;mousemove&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;parallax&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;parallax&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelectorAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;.parallax-wrap span&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;shift&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;position&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;shift&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getAttribute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;value&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerWidth&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pageX&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;position&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;90&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerHeight&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pageY&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;position&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;90&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="nx"&gt;shift&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;transform&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`translateX(&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;px) translateY(&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;px)`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


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

&lt;/div&gt;
&lt;h3&gt;
  
  
  Final result
&lt;/h3&gt;

&lt;p&gt;Here is the final result. You can of course modify the elements, to replace them, for example, by images. You can also modify the &lt;code&gt;value&lt;/code&gt; in the HTML &lt;code&gt;span&lt;/code&gt;, so that the parallax effect is amplified.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/clement-gaudiniere/embed/podaLKa?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;p&gt;I hope you learned something about parallaxes, feel free to ask me any questions you may have. 👍&lt;/p&gt;




&lt;p&gt;You want to support me ?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/clemgaudiniere" rel="noopener noreferrer"&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%2F4b9u45k83m0gjbk2vo8m.png" alt="Buymeacoffee"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OR&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.patreon.com/clementGaudiniere" rel="noopener noreferrer"&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%2Fe784und5tziinkkhg0im.png" alt="Patreon"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Quiz : What do these acronyms mean ? (HTML, PHP, SQL...)</title>
      <dc:creator>Clément Gaudinière</dc:creator>
      <pubDate>Tue, 28 Dec 2021 13:36:29 +0000</pubDate>
      <link>https://forem.com/clementgaudiniere/quiz-what-do-these-acronyms-mean-html-php-sql-2e02</link>
      <guid>https://forem.com/clementgaudiniere/quiz-what-do-these-acronyms-mean-html-php-sql-2e02</guid>
      <description>&lt;p&gt;Hello, today I propose you a quiz to test your knowledge on the acronyms of the web languages, some will seem easier than others of course, but do you really know all the acronyms of the web languages ?&lt;/p&gt;

&lt;p&gt;For all questions, a list of answers is proposed, only one answer is correct. For each question, feel free to note your answer on a piece of paper in order to count your final score after the correction. You are ready, so let's go. &lt;/p&gt;

&lt;p&gt;I - &lt;strong&gt;API means :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Abbreviation Program Internet&lt;/li&gt;
&lt;li&gt;Application Programming Interface &lt;/li&gt;
&lt;li&gt;Accessible Page Internet &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;II - &lt;strong&gt;HTML means :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;HyperTheme Markup Language&lt;/li&gt;
&lt;li&gt;HyperText Markup Language&lt;/li&gt;
&lt;li&gt;HyperTheme Model Language&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;III - &lt;strong&gt;CSS means :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Cascading Style Software &lt;/li&gt;
&lt;li&gt;Cascading Style Sheets&lt;/li&gt;
&lt;li&gt;Cascading Structured Style&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;IV - &lt;strong&gt;DOM means :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Document Object Model&lt;/li&gt;
&lt;li&gt;Document Object Markup &lt;/li&gt;
&lt;li&gt;Document Optimization Markup &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;V - &lt;strong&gt;IDE means :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Integrated Development Experience&lt;/li&gt;
&lt;li&gt;Integrated Document Explorer &lt;/li&gt;
&lt;li&gt;Integrated Development Environment&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;VI - &lt;strong&gt;HTTP means :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;HyperText Transfer Page&lt;/li&gt;
&lt;li&gt;HyperText Transfer Protocol&lt;/li&gt;
&lt;li&gt;HyperText Technology Power&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;VII - &lt;strong&gt;ARIA means :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Accessible Rich Internet Applications&lt;/li&gt;
&lt;li&gt;Asynchronous Rich Internet Applications &lt;/li&gt;
&lt;li&gt;Array Rich Internet Applications &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;VIII - &lt;strong&gt;AJAX means :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Asynchronous JavaScript And XML&lt;/li&gt;
&lt;li&gt;Application JavaScript Asynchronous XML&lt;/li&gt;
&lt;li&gt;Asynchronous JavaScript Application XML&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;IX - &lt;strong&gt;JS means :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Justify String&lt;/li&gt;
&lt;li&gt;Java Sring&lt;/li&gt;
&lt;li&gt;JavaScript &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;X - &lt;strong&gt;JSON means :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;JavaScript Object Navigator &lt;/li&gt;
&lt;li&gt;JavaScript Object Notation&lt;/li&gt;
&lt;li&gt;JavaScript Object Network &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;XI - &lt;strong&gt;AMP means :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Applications Markup Pages&lt;/li&gt;
&lt;li&gt;Attribute Markup Pages&lt;/li&gt;
&lt;li&gt;Accelerated Mobile Pages&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;XII - &lt;strong&gt;REGEX means :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Regular Expression&lt;/li&gt;
&lt;li&gt;Regrown Experience &lt;/li&gt;
&lt;li&gt;Regenerative Expression &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;XIII - &lt;strong&gt;SQL means :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Switch Query Language &lt;/li&gt;
&lt;li&gt;Simple Query Language&lt;/li&gt;
&lt;li&gt;Structured Query Language &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;XIV - &lt;strong&gt;CDN means :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Classical Document Number&lt;/li&gt;
&lt;li&gt;Classical Delivery Network&lt;/li&gt;
&lt;li&gt;Content Delivery Network&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;XV - &lt;strong&gt;SEO means :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;String Expression Object &lt;/li&gt;
&lt;li&gt;Search Engine Optimization&lt;/li&gt;
&lt;li&gt;Suffix Expression Object &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;XVI - &lt;strong&gt;PHP means :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Hypertext Page Preparator&lt;/li&gt;
&lt;li&gt;Hypertext Preprocessor&lt;/li&gt;
&lt;li&gt;Page Hypertext Preparator&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;XVII - &lt;strong&gt;UX means :&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;User Experience&lt;/li&gt;
&lt;li&gt;Universal Explications&lt;/li&gt;
&lt;li&gt;Universal Experience &lt;/li&gt;
&lt;li&gt;User Explications &lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Correction
&lt;/h3&gt;

&lt;p&gt;I hope you have written down your answers as it is time for the correction.&lt;/p&gt;

&lt;p&gt;I - &lt;br&gt;
API means Application Programming Interface (2). It allows applications to communicate with each other and exchange services or data.&lt;/p&gt;

&lt;p&gt;II - &lt;br&gt;
HTML means HyperText Markup Language (2). It is the code used to structure a web page and its content.&lt;/p&gt;

&lt;p&gt;III - &lt;br&gt;
CSS means Cascading Style Sheets (2). It is the language we use to style an HTML document. &lt;/p&gt;

&lt;p&gt;IV - &lt;br&gt;
DOM means Document Object Model (1). It is a programming interface standardized by the W3C, which allows scripts to examine and modify the content of the web browser.&lt;/p&gt;

&lt;p&gt;V - &lt;br&gt;
IDE means Integrated Development Environment (3). It is a software application that provides comprehensive facilities to computer programmers for software development.&lt;/p&gt;

&lt;p&gt;VI -&lt;br&gt;
HTTP means HyperText Transfer Protocol (2). It is a client-server communication protocol developed for the World Wide Web.&lt;/p&gt;

&lt;p&gt;VII - &lt;br&gt;
ARIA means Accessible Rich Internet Applications (1). ARIA complements HTML so that interactive elements and widgets can be used by assistive tools when standard functionality does not allow it. &lt;/p&gt;

&lt;p&gt;VIII -&lt;br&gt;
AJAX means Asynchronous JavaScript And XML (1). It is a method using different technologies added to web browsers between 1995 and 2005, and whose particularity is to allow to make requests to the web server and, consequently, to partially modify the web page displayed on the client computer without having to display a new complete page.&lt;/p&gt;

&lt;p&gt;IX -&lt;br&gt;
JS means JavaScript (3).It is a scripting language mainly used in interactive web pages and as such is an essential part of web applications.&lt;/p&gt;

&lt;p&gt;X - &lt;br&gt;
JSON means JavaScript Object Notation (2). It is a standard format used to represent structured data in a way similar to Javascript objects.&lt;/p&gt;

&lt;p&gt;XI - &lt;br&gt;
AMP means Accelerated Mobile Pages (3).It is an open source technology developed by the AMP Open Source Project and supported by Google. It allows as its name suggests to load mobile pages faster.&lt;/p&gt;

&lt;p&gt;XII -&lt;br&gt;
REGEX means Regular Expression (1). It is a character string, which describes, according to a precise syntax, a set of possible character strings. Regular expressions are also called regex (a word-value formed from the English regular expression).&lt;/p&gt;

&lt;p&gt;XIII -&lt;br&gt;
SQL means Structured Query Language (3). It is a standardized programming language used to operate relational databases.&lt;/p&gt;

&lt;p&gt;XIV - &lt;br&gt;
CDN means Content Delivery Network (3). It is a geographically distributed network of proxy servers and their data centers. The goal is to provide high availability and performance by distributing the service spatially relative to end users.&lt;/p&gt;

&lt;p&gt;XV -&lt;br&gt;
SEO means Search Engine Optimization (2). It is the set of techniques that aim to improve the positioning of a page, a site or a web application in the results page of a search engine. &lt;/p&gt;

&lt;p&gt;XVI - &lt;br&gt;
PHP means Hypertext Preprocessor (2). It is a recursive acronyms. Php is a free programming language, mainly used to produce dynamic web pages via an HTTP server, but can also work as any locally interpreted language.  PHP is an object-oriented imperative language.&lt;/p&gt;

&lt;p&gt;XVII - &lt;br&gt;
UX means User Experience (1). This refers to the quality of the user's experience in any interaction situation.&lt;/p&gt;




&lt;p&gt;Source :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/fr/"&gt;MDN Web Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.wikipedia.org/"&gt;Wikipedia&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Feel free to share your score in the comments or suggest other web acronyms you think we should know. 👍&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>quiz</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Understanding Web Cookies</title>
      <dc:creator>Clément Gaudinière</dc:creator>
      <pubDate>Sun, 19 Dec 2021 12:30:42 +0000</pubDate>
      <link>https://forem.com/clementgaudiniere/understanding-web-cookies-3161</link>
      <guid>https://forem.com/clementgaudiniere/understanding-web-cookies-3161</guid>
      <description>&lt;p&gt;&lt;em&gt;Web cookies often have a negative connotation. In reality, they are indispensable tools for websites and sometimes save you time. In this article, we will look at how cookies work, the different types of cookies, what benefits they can bring to your website or the regulations concerning them... In a next article we will see how to implement them in our web page code.&lt;/em&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Received ideas
&lt;/h3&gt;

&lt;p&gt;Since the creation of cookies, many rumors have developed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cookies are like viruses, they infect users' hard drives.&lt;/li&gt;
&lt;li&gt;Cookies are used to send spam.&lt;/li&gt;
&lt;li&gt;Cookies are used only for advertising. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We will see in this article that all these rumors are false.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mFDSCgY2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yk5xpfo9ced5u7l0t9ie.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mFDSCgY2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yk5xpfo9ced5u7l0t9ie.png" alt="Cookie hide" width="880" height="462"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  How it works ?
&lt;/h3&gt;

&lt;p&gt;A web cookie is defined by the HTTP communication protocol as a small text sent by an HTTP server to an HTTP client, which the latter will send back the next time it connects to servers sharing the same domain name. It consists of a text containing an arbitrary sequence of key-value pairs. It is stored on the client's computer for a specific period of time.&lt;/p&gt;

&lt;p&gt;For example, if you log in to a website and don't want to log in the next time, sometimes you can check the box "keep my session active" or "remember me". In this case, one or more cookies are created and stored on your computer to automatically log you in the next time you access that website. The cookies can be the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;nickname : mypseudo&lt;/li&gt;
&lt;li&gt;password : azerty&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(In reality the password cookies are often encrypted, for security)&lt;/p&gt;




&lt;h3&gt;
  
  
  A bit of history
&lt;/h3&gt;

&lt;p&gt;Now we can ask ourselves how long have cookies been around ? &lt;/p&gt;

&lt;p&gt;The term cookie is a derivation of magic cookie. In programming, a magic cookie is a packet of data that a program receives and sends back unchanged. In 1994, Lou Montulli, an American computer scientist, had the idea of using cookies for client-server exchanges on the Web. At the time, he was an employee of Netscape Communications, a company developing Web browsers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wkAFzJ-3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1pk6hze5urugnrxx8cmz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wkAFzJ-3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1pk6hze5urugnrxx8cmz.jpg" alt="Netscape Browser logo" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first use of cookies was to determine whether visitors to the Netscape website had visited the site before. &lt;/p&gt;

&lt;p&gt;After being implemented in the Netscape 0.9 beta Web browser in 1994, cookies were integrated into Internet Explorer 2, released in October 1995. &lt;/p&gt;

&lt;p&gt;Cookies were accepted by default in browser settings, and users were not informed of their presence. The general public only learned of their existence after the Financial Times published an article on February 12, 1996. That same year, cookies received a lot of media attention because of possible privacy intrusions. &lt;/p&gt;

&lt;p&gt;From the end of 2014, we see a banner about cookies on many sites. Depending on the country and continent, the regulations are not the same.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---_ENPist--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6wxnjuy5d4298fb8dggy.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---_ENPist--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6wxnjuy5d4298fb8dggy.jpg" alt="Cookie Banner exemple" width="880" height="356"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Why they have a bad reputation ?
&lt;/h3&gt;

&lt;p&gt;So why do they have such a bad reputation ? &lt;/p&gt;

&lt;p&gt;On the one hand, cookies are stored on the customer's computer and therefore take up storage space. Even if it is often tiny, the accumulation of cookies can end up weighing a real weight in the storage of the device. &lt;/p&gt;

&lt;p&gt;On the other hand, as we have seen before, they can be an intrusion of privacy. Indeed, other types of cookies, called third-party cookies, can track users through the different sites they visit. For example, some advertising companies can track users across all pages where they have placed advertising images or a spy pixel. The knowledge of the pages visited by the user allows the advertising companies to target the user's advertising preferences. &lt;/p&gt;

&lt;p&gt;The ability to build a user profile is considered by some to be an invasion of privacy, especially when tracking is done through different domains using third-party cookies. For this reason, some countries have cookie legislation.&lt;/p&gt;




&lt;h3&gt;
  
  
  To be in order
&lt;/h3&gt;

&lt;p&gt;To be sure to comply with regulations, it is best to set up a cookie banner warning users. Ideally, the user can either accept all cookies or manage their preferences.&lt;/p&gt;

&lt;p&gt;To save time when developing websites, many developers use cookie consent libraries. This way, their site follows the legislation, without requiring a large development effort.&lt;/p&gt;

&lt;p&gt;For my part, I use &lt;a href="https://github.com/clement-gaudiniere/librairie-cookie-consent"&gt;this library&lt;/a&gt;, developed by myself 😆. It is very easy to use, and offers a clean and customizable banner for your website. To understand how it works, just read the github documentation. I will make an article detailing it later.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/clement-gaudiniere"&gt;
        clement-gaudiniere
      &lt;/a&gt; / &lt;a href="https://github.com/clement-gaudiniere/librairie-cookie-consent"&gt;
        librairie-cookie-consent
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      This easy-to-use library allows you to ask your users for feedback on various parameters that can be set directly in the code. For more information, see the README file.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;p&gt;
    &lt;a rel="noopener noreferrer" href="https://raw.githubusercontent.com/clement-gaudiniere/librairie-cookie-consent/main/img/logo.png"&gt;&lt;img alt="Logo de la librairie" src="https://res.cloudinary.com/practicaldev/image/fetch/s--OOAsJsJp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/clement-gaudiniere/librairie-cookie-consent/main/img/logo.png" width="200"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
  &lt;a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="nofollow"&gt;&lt;img alt="cc by-nc-sa 4.0" src="https://camo.githubusercontent.com/61c9f8c725565f541455e7e78ffd61731f25e6ec167b8f4560e548eab1e877bd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d434325323042592d2d4e432d2d5341253230342e302d3532353235322e7376673f6c6162656c436f6c6f723d323932393239266c6f676f3d6372656174697665253230636f6d6d6f6e73267374796c653d666f722d7468652d6261646765"&gt;&lt;/a&gt;
  &lt;a href="https://github.com/clement-gaudiniere/librairie-cookie-consent/issues"&gt;&lt;img alt="Issues" src="https://camo.githubusercontent.com/89a523399e950708848e7ab203766f5faadc19f48af56564975fca304995c562/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f636c656d656e742d67617564696e696572652f6c69627261697269652d636f6f6b69652d636f6e73656e742f6c69627261697269652e7376673f6c6162656c436f6c6f723d323932393239266c6f676f3d676974267374796c653d666f722d7468652d6261646765"&gt;&lt;/a&gt;&lt;br&gt;
  &lt;a href="https://github.com/clement-gaudiniere/librairie-cookie-consent/releases"&gt;&lt;img alt="Releases" src="https://camo.githubusercontent.com/81ca005101f37ac281a9d54204f226701dd514a56d442c522c8175c6206e9886/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f636c656d656e742d67617564696e696572652f6c69627261697269652d636f6f6b69652d636f6e73656e743f6c6162656c436f6c6f723d323932393239266c6f676f436f6c6f723d7768697465266c6f676f3d446f63755369676e267374796c653d666f722d7468652d6261646765"&gt;&lt;/a&gt;
  &lt;a href="https://github.com/clement-gaudiniere/librairie-cookie-consent"&gt;&lt;img alt="Forks" src="https://camo.githubusercontent.com/b8042578dcc17b6f54eb6775472827cb0ecb585807cfaf08485f55e9a6b3e8cd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f636c656d656e742d67617564696e696572652f6c69627261697269652d636f6f6b69652d636f6e73656e743f7374796c653d666f722d7468652d6261646765266c6162656c436f6c6f723d323932393239266c6f676f3d53686f77706164266c6f676f436f6c6f723d7768697465"&gt;&lt;/a&gt;
  &lt;a href="https://github.com/clement-gaudiniere/librairie-cookie-consent"&gt;&lt;img alt="Stars" src="https://camo.githubusercontent.com/53d5a7c6959d2bd961c9b0e81fe72cd76aca80dfe92147c14f1853473cb1bdf2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f636c656d656e742d67617564696e696572652f6c69627261697269652d636f6f6b69652d636f6e73656e743f7374796c653d666f722d7468652d6261646765266c6162656c436f6c6f723d323932393239266c6f676f3d536f757468776573742d4169726c696e6573266c6f676f436f6c6f723d7768697465"&gt;&lt;/a&gt;
  &lt;a href="https://github.com/clement-gaudiniere/librairie-cookie-consent"&gt;&lt;img alt="Watchers" src="https://camo.githubusercontent.com/6bba44597e9a441f02ca72ffc7d980ddd4a1fb7a766dc54b6db2da11da791c62/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f77617463686572732f636c656d656e742d67617564696e696572652f6c69627261697269652d636f6f6b69652d636f6e73656e743f7374796c653d666f722d7468652d6261646765266c6162656c436f6c6f723d323932393239266c6f676f3d476974487562266c6f676f436f6c6f723d7768697465"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;h1&gt;
librairie-cookie-consent&lt;/h1&gt;

&lt;p&gt;Because the users' agreement counts.&lt;/p&gt;

&lt;p&gt;This easy-to-use library allows you to ask your users for feedback on various parameters that can be set directly in the code. For more information, see the README documentation. IMPORTANT NOTE: for use with jQuery.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://clement-gaudiniere.github.io/librairie-cookie-consent/" rel="nofollow"&gt;Demo&lt;/a&gt;&lt;/p&gt;


  &lt;b&gt;Exemple&lt;/b&gt;
    &lt;p&gt;If you want to see the result directly, download the latest &lt;a href="https://github.com/clement-gaudiniere/librairie-cookie-consent/releases"&gt;release&lt;/a&gt;, and go to the Example folder. Then run the index.html file. You can see below the popup of the library, below, of course, the style is fully configurable in the CSS document
    &lt;/p&gt;
    &lt;p&gt;
        &lt;a rel="noopener noreferrer" href="https://raw.githubusercontent.com/clement-gaudiniere/librairie-cookie-consent/main/img/popup.png"&gt;&lt;img alt="Popup" src="https://res.cloudinary.com/practicaldev/image/fetch/s--qtSTDQjU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/clement-gaudiniere/librairie-cookie-consent/main/img/popup.png" width="400"&gt;&lt;/a&gt;
    &lt;/p&gt;
    &lt;p&gt;
        &lt;a rel="noopener noreferrer" href="https://raw.githubusercontent.com/clement-gaudiniere/librairie-cookie-consent/main/img/popup-confi-section.png"&gt;&lt;img alt="Popup" src="https://res.cloudinary.com/practicaldev/image/fetch/s--YwEVDXTm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/clement-gaudiniere/librairie-cookie-consent/main/img/popup-confi-section.png" width="400"&gt;&lt;/a&gt;
    &lt;/p&gt;


&lt;h3&gt;
How to install it ?&lt;/h3&gt;

&lt;p&gt;You can download the entire library in three different ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;via the library-cookie-consent &lt;a href="https://github.com/clement-gaudiniere/librairie-cookie-consent/releases"&gt;release page&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;via NPM : &lt;code&gt;npm install librairie-cookie-consent&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;via Bower : &lt;em&gt;Not yet available&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
How to use it ?&lt;/h3&gt;

&lt;p&gt;Before starting any manipulation with the library, the CSS file &lt;code&gt;popupConsent.css&lt;/code&gt;, the file &lt;code&gt;popupConsent.js&lt;/code&gt; or &lt;code&gt;popupConsent.min.js&lt;/code&gt;, and the jQuery framework must be…&lt;/p&gt;
&lt;/div&gt;


&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/clement-gaudiniere/librairie-cookie-consent"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;





&lt;p&gt;I hope you learned something about cookies, feel free to ask me any questions you may have. 👍&lt;/p&gt;




&lt;p&gt;You want to support me ?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/clemgaudiniere"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gIpANVzM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4b9u45k83m0gjbk2vo8m.png" alt="Buymeacoffee" width="434" height="100"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OR&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.patreon.com/clementGaudiniere"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AFQGmkBW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e784und5tziinkkhg0im.png" alt="Patreon" width="499" height="125"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>codenewbie</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Move from one page to another without loading</title>
      <dc:creator>Clément Gaudinière</dc:creator>
      <pubDate>Wed, 27 Oct 2021 11:20:42 +0000</pubDate>
      <link>https://forem.com/clementgaudiniere/move-from-one-page-to-another-without-loading-jlb</link>
      <guid>https://forem.com/clementgaudiniere/move-from-one-page-to-another-without-loading-jlb</guid>
      <description>&lt;p&gt;Hello everyone, today we meet in a new tutorial. We are going to see how to go from one page to another without loading the page. You have probably noticed it if you are attentive, on some websites, when you go from one page to another there is no loading. There are different techniques more or less heavy to do this, we can for example use the PHP Symfony framework but you have to organize your files in a precise architecture, it is therefore more complicated to implement when the website already exists. That's why today we use AJAX, and to make it faster, jQuery.&lt;br&gt;
Important note : all files will be in PHP, make sure you can run them.&lt;/p&gt;
&lt;h3&gt;
  
  
  The basics
&lt;/h3&gt;

&lt;p&gt;To begin with, I propose the following architecture for our files :&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%2F8el5722nnd4jw6xa1loa.jpg" 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%2F8el5722nnd4jw6xa1loa.jpg" alt="Architecture for our files"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You don't have to follow it, but you will have to be careful and rigorous about the location of the files.&lt;br&gt;
Our site will be called &lt;code&gt;www.site.com&lt;/code&gt; in this example, you will have to replace this name with your domain name, the IP of your site or the location of your PHP file on your computer if you use a local web server. The &lt;code&gt;index.php&lt;/code&gt; file will contain our home page, while the &lt;code&gt;login.php&lt;/code&gt; page will contain a connection form. The &lt;code&gt;src&lt;/code&gt; folder contains several other folders, the one we are interested in here is &lt;code&gt;php&lt;/code&gt;, which contains the start and end of each web page. You will understand later why it is important to create these two files.&lt;/p&gt;
&lt;h3&gt;
  
  
  → &lt;code&gt;index.php&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Our index page is quite simple, it contains a php title variable, the file &lt;code&gt;early.php&lt;/code&gt; if we want it to be whole and not just ask for the content. The content of the index page is : a title and a paragraph. Finally, it contains the end file &lt;code&gt;end.php&lt;/code&gt; if we want it to be whole and we don't just ask for the content. Otherwise we change the name of the page with a script. So our index page looks like this :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
  &lt;span class="nv"&gt;$title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Index page title"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="k"&gt;isset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$_GET&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'section'&lt;/span&gt;&lt;span class="p"&gt;])){&lt;/span&gt;
    &lt;span class="k"&gt;include&lt;/span&gt; &lt;span class="s1"&gt;'src/php/early.php'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
 &lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;I'm the title&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Morbi tincidunt congue diam, at vestibulum elit tempor a. 
Donec id mi malesuada, auctor ligula in, aliquam metus. 
Vestibulum in faucibus massa. Nullam luctus et diam et posuere. 
Nulla massa metus, mattis et efficitur eu, vehicula in lectus. 
Sed a sapien quis tellus rhoncus efficitur. 
Integer sed ultrices nisl, vitae aliquam tellus.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;


&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="k"&gt;isset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$_GET&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'section'&lt;/span&gt;&lt;span class="p"&gt;])){&lt;/span&gt;
    &lt;span class="k"&gt;include&lt;/span&gt; &lt;span class="s1"&gt;'src/php/end.php'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text/javascript"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;?=&lt;/span&gt; &lt;span class="nv"&gt;$title&lt;/span&gt; &lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
    &lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  → &lt;code&gt;login.php&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;login.php&lt;/code&gt; page, contains basically the same thing except that the title is not the same and the content is different :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
  &lt;span class="nv"&gt;$title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Login page title"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="k"&gt;isset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$_GET&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'section'&lt;/span&gt;&lt;span class="p"&gt;])){&lt;/span&gt;
    &lt;span class="k"&gt;include&lt;/span&gt; &lt;span class="s1"&gt;'src/php/early.php'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
 &lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Login&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"post"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;!-- Form to be completed later (optional) --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;

&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="k"&gt;isset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$_GET&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'section'&lt;/span&gt;&lt;span class="p"&gt;])){&lt;/span&gt;
    &lt;span class="k"&gt;include&lt;/span&gt; &lt;span class="s1"&gt;'src/php/end.php'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text/javascript"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;?=&lt;/span&gt; &lt;span class="nv"&gt;$title&lt;/span&gt; &lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
    &lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  → &lt;code&gt;early.php&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;As you may have realised before, the &lt;code&gt;early.php&lt;/code&gt; page is the start of our other two pages: &lt;code&gt;index.php&lt;/code&gt; and &lt;code&gt;login.php&lt;/code&gt;. This file should be started as a well presented HTML document. We need to include jQuery, you can include it via a CDN or directly host it on your server or computer. Finally, you can add a header. The file ends with the beginning of the div with the id &lt;code&gt;main-content&lt;/code&gt; which will contain the content of our pages afterwards :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt; &lt;span class="na"&gt;dir=&lt;/span&gt;&lt;span class="s"&gt;"ltr"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"utf-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

    &lt;span class="c"&gt;&amp;lt;!-- A style file that can be created after  --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"src/style/css/style.css"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

    &lt;span class="c"&gt;&amp;lt;!-- We include jQuery with the Google CDN  --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content= &lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;?= $title ?&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;header&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"index.php"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"crayons-btn crayons-btn-main"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;index&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"login.php"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"crayons-btn crayons-btn-scd"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Login&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"main-content"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  → &lt;code&gt;end.php&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;This file will contain the end of our pages, so it will be necessary to close some tags like the main div, or the body or the html tags. We will include the AJAX part :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text/javascript"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nf"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;a&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;click&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preventDefault&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ajax&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
       &lt;span class="na"&gt;url&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;attr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;href&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;?section=true&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="na"&gt;type&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;GET&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="na"&gt;dataType&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;html&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="na"&gt;success&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;code_html&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;statut&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
          &lt;span class="nf"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#main-content&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;html&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;code_html&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
       &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;history&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pushState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;attr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;href&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's unpack this AJAX code which can be complex if you don't know how AJAX requests work. First of all the first line of the script detects the event: "When someone clicks on a link". If this is the case, it launches the function. The second line tells the browser not to load the link if it is compatible with AJAX requests. Then we make our AJAX request by specifying the url and passing as a parameter &lt;code&gt;section=true&lt;/code&gt;, so the page will not load completely. We then specify the type of request here &lt;code&gt;GET&lt;/code&gt;. If successful, we update the content of the "main-content" div with the new content. Finally, we modify the url of the page.&lt;/p&gt;

&lt;h3&gt;
  
  
  Add some style
&lt;/h3&gt;

&lt;p&gt;You can then create a file to add some style. This will be placed in the &lt;code&gt;src&lt;/code&gt; then &lt;code&gt;style&lt;/code&gt; then &lt;code&gt;css&lt;/code&gt; file, and will be called &lt;code&gt;style.css&lt;/code&gt;. For my part, my file looks like this :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nf"&gt;#main-content&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1000px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;95%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;cursive&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;#main-content&lt;/span&gt; &lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;80px&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;header&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;whitesmoke&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;fixed&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;header&lt;/span&gt; &lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1000px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;flex-wrap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;nowrap&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;align-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex-end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;13px&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.crayons-btn&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;5px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.5rem&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;inline-block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;outline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;user-select&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;inherit&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;500&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;text-decoration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;pointer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;white-space&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;nowrap&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;all&lt;/span&gt; &lt;span class="n"&gt;cubic-bezier&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0.17&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.67&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.71&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="m"&gt;100ms&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;overflow-wrap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;normal&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;-apple-system&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;BlinkMacSystemFont&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;'Segoe UI'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Roboto&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Helvetica&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Arial&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.crayons-btn-main&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;transparent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;box-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="m"&gt;3px&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.05&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#f9fafa&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.crayons-btn-main&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#6b6bf1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.crayons-btn-scd&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#f1f1f1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;transparent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;box-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="m"&gt;3px&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.05&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#363d44&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.crayons-btn-scd&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#dddddd&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The result
&lt;/h3&gt;

&lt;p&gt;Below you can see the final result, when you click on one of the two buttons: &lt;code&gt;index&lt;/code&gt; or &lt;code&gt;login&lt;/code&gt;, the page only loads the &lt;code&gt;main-content&lt;/code&gt; part, the rest does not move.&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%2Fg3g5q2xzu525c61rf0vw.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%2Fg3g5q2xzu525c61rf0vw.PNG" alt="Overview of the result"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope you enjoyed this tutorial, if you have any questions, feel free to ask me in the comments. 👍&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Why the 404 error ?</title>
      <dc:creator>Clément Gaudinière</dc:creator>
      <pubDate>Wed, 20 Oct 2021 15:56:39 +0000</pubDate>
      <link>https://forem.com/clementgaudiniere/why-404-error--1n89</link>
      <guid>https://forem.com/clementgaudiniere/why-404-error--1n89</guid>
      <description>&lt;p&gt;Hello everyone, today we're going to look at HTTP errors, you know like when you get a page not found with the 404 error. In reality there are almost a hundred different error codes. Don't worry, it's difficult to know them all by heart, but there are techniques to find out roughly where the error comes from. You are ready, so let's go !&lt;/p&gt;

&lt;h3&gt;
  
  
  Why did you invent these numbers ?
&lt;/h3&gt;

&lt;p&gt;But then why did we invent these error numbers? The answer is actually quite simple, when a user requests a web page through his browser, the browser will send a request to the server under the world famous HTTP protocol. The server will also respond in HTTP format, and if all goes well will send the requested resource (in our case the web page). But everything gets complicated when there is an error. Knowing that there is an error is good, but knowing where is even better. This is why error numbers were quickly assigned to each different type of error. This is much more practical and saves time for many developers. For example, errors starting with 5 are problems at the server level. &lt;/p&gt;

&lt;h3&gt;
  
  
  The five categories of error
&lt;/h3&gt;

&lt;p&gt;To simplify the whole thing, and to put some order in all these errors, categories have been created. There are three different categories: &lt;br&gt;
1 - Informations&lt;br&gt;
2 - Success&lt;br&gt;
3 - Redirects&lt;br&gt;
4 - Web client errors&lt;br&gt;
5 - Server errors&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%2F641cck3qcpk7m2oc4krl.jpg" 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%2F641cck3qcpk7m2oc4krl.jpg" alt="The five categories of error"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So if an error number starts with 4, we know directly that the problem comes from the web client.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why 404 error ?
&lt;/h3&gt;

&lt;p&gt;But why 404 errors? If you have been following this, you will notice that the first number is a 4 and that the error comes directly from the web client and not from the server. Indeed, the 404 error means that the resource is not found, the server has searched for it on its side but has not found it, so the error comes from the web client which has not provided the right url.&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%2Fbp6qdfennctlljpd4q37.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%2Fbp6qdfennctlljpd4q37.png" alt="404 error"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Going further with error 418
&lt;/h3&gt;

&lt;p&gt;The HTTP error 418 has nothing to do with the other errors. Indeed its meaning is "I'm a teapot". It is actually a joke since it first appeared in the famous RFC 2324 on April 1, 1998. The explanations given by the developers are: " There is coffee all over the world. Increasingly, in a world in which computing is ubiquitous, the computists want to make coffee. Coffee brewing is an art, but the distributed intelligence of the web- connected world transcends art. Thus, there is a strong, dark, rich requirement for a protocol designed expressly for the brewing of coffee. Coffee is brewed using coffee pots. Networked coffee pots require a control protocol if they are to be controlled".&lt;br&gt;
In other words, the famous Hyper Text Coffee Pot Control Protocol, or HTCPCP, is intended to send an error back to all those who would like to control a coffee pot remotely, telling them that they have mistakenly addressed themselves to ... a teapot 😂.&lt;br&gt;
This April 1st "joke" had its heyday at the time and is still featured on a number of official links in which its error code has been preserved.&lt;br&gt;
There are still people asking questions about this 418 error, even today!&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%2Furbg4ysdsbn36dg5kzxs.jpg" 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%2Furbg4ysdsbn36dg5kzxs.jpg" alt="Google teapot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Specific errors
&lt;/h3&gt;

&lt;p&gt;For those who wish to find a specific error, you can refer to these different tables classified by categories.&lt;br&gt;
Some codes are not yet in use, but are intended for future use. Other codes do not result in any specific display to the user, but are implied (e.g. codes 200 or 304, which are never seen by the client as they concern the majority of successful requests).&lt;/p&gt;

&lt;p&gt;All major HTTP errors are represented in these different tables, of the different error types:&lt;/p&gt;

&lt;p&gt;Codes beginning with 1 (Informations):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Code&lt;/th&gt;
&lt;th&gt;Message&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt;Continue&lt;/td&gt;
&lt;td&gt;Waiting for the application to be processed.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;101&lt;/td&gt;
&lt;td&gt;Switching Protocols&lt;/td&gt;
&lt;td&gt;Acceptance of the change of protocol.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;102&lt;/td&gt;
&lt;td&gt;Processing&lt;/td&gt;
&lt;td&gt;Processing in progress (prevents the customer from exceeding the waiting time limit).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;103&lt;/td&gt;
&lt;td&gt;Early Hints&lt;/td&gt;
&lt;td&gt;While waiting for the final response, the server returns links that the client can start downloading.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Codes beginning with 2 (Success):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Code&lt;/th&gt;
&lt;th&gt;Message&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;200&lt;/td&gt;
&lt;td&gt;OK&lt;/td&gt;
&lt;td&gt;Request successfully processed. The response will depend on the query method used.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;201&lt;/td&gt;
&lt;td&gt;Created&lt;/td&gt;
&lt;td&gt;Request successfully processed and document created.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;202&lt;/td&gt;
&lt;td&gt;Accepted&lt;/td&gt;
&lt;td&gt;Request processed, but no guarantee of result.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;203&lt;/td&gt;
&lt;td&gt;Non-Authoritative Information&lt;/td&gt;
&lt;td&gt;Information returned, but generated by an uncertified source.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;204&lt;/td&gt;
&lt;td&gt;No Content&lt;/td&gt;
&lt;td&gt;Request successfully processed but no information to return.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;205&lt;/td&gt;
&lt;td&gt;Reset Content&lt;/td&gt;
&lt;td&gt;Request successfully processed, current page can be deleted.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;206&lt;/td&gt;
&lt;td&gt;Partial Content&lt;/td&gt;
&lt;td&gt;Only part of the resource has been transmitted.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;207&lt;/td&gt;
&lt;td&gt;Multi-Status&lt;/td&gt;
&lt;td&gt;Multiple answers.(WebDav)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;208&lt;/td&gt;
&lt;td&gt;Already Reported&lt;/td&gt;
&lt;td&gt;The document was previously sent in this collection.(WebDav)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;210&lt;/td&gt;
&lt;td&gt;Content Different&lt;/td&gt;
&lt;td&gt;The copy of the resource on the client side differs from that on the server (content or properties).(WebDav)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;226&lt;/td&gt;
&lt;td&gt;IM Used&lt;/td&gt;
&lt;td&gt;The server has completed the request for the resource, and the response is a representation of the result of one or more instance manipulations applied to the current instance.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Codes beginning with 3 (Redirects):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Code&lt;/th&gt;
&lt;th&gt;Message&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;300&lt;/td&gt;
&lt;td&gt;Multiple Choices&lt;/td&gt;
&lt;td&gt;The requested URI refers to several resources.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;301&lt;/td&gt;
&lt;td&gt;Moved Permanently&lt;/td&gt;
&lt;td&gt;Permanently moved document.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;302&lt;/td&gt;
&lt;td&gt;Found&lt;/td&gt;
&lt;td&gt;Document moved temporarily.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;303&lt;/td&gt;
&lt;td&gt;See Other&lt;/td&gt;
&lt;td&gt;The answer to this request lies elsewhere.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;304&lt;/td&gt;
&lt;td&gt;Not Modified&lt;/td&gt;
&lt;td&gt;Document not modified since the last request.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;305&lt;/td&gt;
&lt;td&gt;Use Proxy (since HTTP/1.1)&lt;/td&gt;
&lt;td&gt;The request must be re-addressed to the proxy.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;306&lt;/td&gt;
&lt;td&gt;Switch Proxy&lt;/td&gt;
&lt;td&gt;Code used by an older version of RFC 26167, now reserved. It meant "The following requests must use the specified proxy ".&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;307&lt;/td&gt;
&lt;td&gt;Temporary Redirect&lt;/td&gt;
&lt;td&gt;The request must be temporarily redirected to the specified URI.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;308&lt;/td&gt;
&lt;td&gt;Permanent Redirect&lt;/td&gt;
&lt;td&gt;The request must be permanently redirected to the specified URI.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;310&lt;/td&gt;
&lt;td&gt;Too many Redirects&lt;/td&gt;
&lt;td&gt;The request has to be redirected too many times, or falls victim to a redirection loop.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Codes beginning with 4 (Web client errors):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Code&lt;/th&gt;
&lt;th&gt;Message&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;Bad Request&lt;/td&gt;
&lt;td&gt;The syntax of the query is wrong.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;401&lt;/td&gt;
&lt;td&gt;Unauthorized&lt;/td&gt;
&lt;td&gt;Authentication is required to access the resource.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;402&lt;/td&gt;
&lt;td&gt;Payment Required&lt;/td&gt;
&lt;td&gt;Payment required to access the resource.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;403&lt;/td&gt;
&lt;td&gt;Forbidden&lt;/td&gt;
&lt;td&gt;The server has understood the request, but refuses to execute it. Unlike the 401 error, authenticating will not make any difference. On servers where authentication is required, this usually means that authentication has been accepted but the access rights do not allow the client to access the resource.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;404&lt;/td&gt;
&lt;td&gt;Not Found&lt;/td&gt;
&lt;td&gt;Resource not found.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;405&lt;/td&gt;
&lt;td&gt;Method Not Allowed&lt;/td&gt;
&lt;td&gt;Unauthorised query method.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;406&lt;/td&gt;
&lt;td&gt;Not Acceptable&lt;/td&gt;
&lt;td&gt;The requested resource is not available in a format that would respect the "Accept" headers of the request.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;407&lt;/td&gt;
&lt;td&gt;Proxy Authentication Required&lt;/td&gt;
&lt;td&gt;Access to the resource allowed by identification with the proxy.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;408&lt;/td&gt;
&lt;td&gt;Request Time-out&lt;/td&gt;
&lt;td&gt;The amount of time a request from the client has been waiting on the server side. According to the HTTP specification: "The client did not produce a request within the time the server was willing to wait. The client MAY repeat the request without modification at any later time ".&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;409&lt;/td&gt;
&lt;td&gt;Conflict&lt;/td&gt;
&lt;td&gt;The request cannot be processed at this time.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;410&lt;/td&gt;
&lt;td&gt;Gone&lt;/td&gt;
&lt;td&gt;The resource is no longer available and no redirection address is known.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;411&lt;/td&gt;
&lt;td&gt;Length Required&lt;/td&gt;
&lt;td&gt;The length of the request was not specified.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;412&lt;/td&gt;
&lt;td&gt;Precondition Failed&lt;/td&gt;
&lt;td&gt;Preconditions sent by the request not checked.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;413&lt;/td&gt;
&lt;td&gt;Request Entity Too Large&lt;/td&gt;
&lt;td&gt;Treatment abandoned due to too high a demand.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;414&lt;/td&gt;
&lt;td&gt;Request-URI Too Long&lt;/td&gt;
&lt;td&gt;URI too long.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;415&lt;/td&gt;
&lt;td&gt;Unsupported Media Type&lt;/td&gt;
&lt;td&gt;Unsupported query format for a given method and resource.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;416&lt;/td&gt;
&lt;td&gt;Requested range unsatisfiable&lt;/td&gt;
&lt;td&gt;Incorrect "range" query header fields.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;417&lt;/td&gt;
&lt;td&gt;Expectation failed&lt;/td&gt;
&lt;td&gt;Expected and defined behaviour in the header of the unsatisfactory request.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;418&lt;/td&gt;
&lt;td&gt;I’m a teapot&lt;/td&gt;
&lt;td&gt;"I am a teapot": This code is defined in RFC 232410 dated 1 April 1998, Hyper Text Coffee Pot Control Protocol. It is a webmaster's joke, intended to send an error back to anyone who wants to remotely control a coffee pot, telling them that they have mistakenly addressed a teapot :)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;421&lt;/td&gt;
&lt;td&gt;Bad mapping / Misdirected Request&lt;/td&gt;
&lt;td&gt;The request has been sent to a server that is not capable of producing a response (for example, because a connection has been reused).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;422&lt;/td&gt;
&lt;td&gt;Unprocessable entity&lt;/td&gt;
&lt;td&gt;The entity provided with the request is incomprehensible or incomplete.(WebDAV)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;423&lt;/td&gt;
&lt;td&gt;Locked&lt;/td&gt;
&lt;td&gt;The operation cannot take place because the resource is locked.(WebDAV)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;424&lt;/td&gt;
&lt;td&gt;Method failure&lt;/td&gt;
&lt;td&gt;A method in the transaction has failed.(WebDAV)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;425&lt;/td&gt;
&lt;td&gt;Too Early&lt;/td&gt;
&lt;td&gt;The server cannot process the request as it may be replayed.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;426&lt;/td&gt;
&lt;td&gt;Upgrade Required&lt;/td&gt;
&lt;td&gt;The client should change the protocol, for example to TLS/1.0.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;428&lt;/td&gt;
&lt;td&gt;Precondition Required&lt;/td&gt;
&lt;td&gt;The request must be conditional.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;429&lt;/td&gt;
&lt;td&gt;Too Many Requests&lt;/td&gt;
&lt;td&gt;The customer has made too many requests within a given time frame.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;431&lt;/td&gt;
&lt;td&gt;Request Header Fields Too Large&lt;/td&gt;
&lt;td&gt;The HTTP headers sent exceed the maximum size allowed by the server.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;449&lt;/td&gt;
&lt;td&gt;Retry With&lt;/td&gt;
&lt;td&gt;Code defined by Microsoft. The request should be returned after performing an action.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;450&lt;/td&gt;
&lt;td&gt;Blocked by Windows Parental Controls&lt;/td&gt;
&lt;td&gt;Code set by Microsoft. This error occurs when Windows Parental Controls are enabled and block access to the page.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;451&lt;/td&gt;
&lt;td&gt;Unavailable For Legal Reasons&lt;/td&gt;
&lt;td&gt;This error code indicates that the requested resource is inaccessible for legal reasons.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;456&lt;/td&gt;
&lt;td&gt;Unrecoverable Error&lt;/td&gt;
&lt;td&gt;Unrecoverable error.(WebDAV)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Codes beginning with 5 (Server errors):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Code&lt;/th&gt;
&lt;th&gt;Message&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;500&lt;/td&gt;
&lt;td&gt;Internal Server Error&lt;/td&gt;
&lt;td&gt;Internal server error.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;501&lt;/td&gt;
&lt;td&gt;Not Implemented&lt;/td&gt;
&lt;td&gt;Claimed functionality not supported by the server.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;502&lt;/td&gt;
&lt;td&gt;Bad Gateway ou Proxy Error&lt;/td&gt;
&lt;td&gt;By acting as a proxy or gateway server, the server received an invalid response from the remote server.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;503&lt;/td&gt;
&lt;td&gt;Service Unavailable&lt;/td&gt;
&lt;td&gt;Service temporarily unavailable or under maintenance.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;504&lt;/td&gt;
&lt;td&gt;Gateway Time-out&lt;/td&gt;
&lt;td&gt;Time taken to wait for a response from a server to an intermediate server.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;505&lt;/td&gt;
&lt;td&gt;HTTP Version not supported&lt;/td&gt;
&lt;td&gt;HTTP version not supported by the server.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;506&lt;/td&gt;
&lt;td&gt;Variant Also Negotiates&lt;/td&gt;
&lt;td&gt;Negotiation error.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;507&lt;/td&gt;
&lt;td&gt;Insufficient storage&lt;/td&gt;
&lt;td&gt;Insufficient space to edit properties or build the collection.(WebDAV)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;508&lt;/td&gt;
&lt;td&gt;Loop detected&lt;/td&gt;
&lt;td&gt;Loop in a resource linkage.(WebDAV)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;509&lt;/td&gt;
&lt;td&gt;Bandwidth Limit Exceeded&lt;/td&gt;
&lt;td&gt;Used by many servers to indicate a quota overrun.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;510&lt;/td&gt;
&lt;td&gt;Not extended&lt;/td&gt;
&lt;td&gt;The request does not respect the extended HTTP resource access policy.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;511&lt;/td&gt;
&lt;td&gt;Network authentication required&lt;/td&gt;
&lt;td&gt;The client must authenticate to access the network. Used by captive portals to redirect clients to the authentication page.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;I hope you have enjoyed this article.  If you have any questions, feel free to ask me in the comments. 👍&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>productivity</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Have fun with Windows message boxes</title>
      <dc:creator>Clément Gaudinière</dc:creator>
      <pubDate>Sat, 02 Oct 2021 16:40:17 +0000</pubDate>
      <link>https://forem.com/clementgaudiniere/have-fun-with-windows-message-boxes-ckl</link>
      <guid>https://forem.com/clementgaudiniere/have-fun-with-windows-message-boxes-ckl</guid>
      <description>&lt;p&gt;Hello everyone, today we are going to focus on our computers and more particularly on those under Windows. We will generate a Windows message box using the following programming language: Visual Basic. Don't worry, no prerequisites are necessary to follow this tutorial and all the steps will be explained. Through this article we will also see how to enrich and improve our message box, so that, for example, it can no longer be closed, that it remains in the foreground, etc. This way you can joke with your friends in a friendly manner, as there are several solutions to remove a dialogue box that cannot be closed. This type of dialog box can also be called fake virus, since it can worry the person at first, even if it does not affect the user's computer in any way. You can already see what the dialog box will look like at the end:&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%2F8ymg5gfkgtfcg5dbt9uk.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%2F8ymg5gfkgtfcg5dbt9uk.PNG" alt="Box message exemple"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The basics
&lt;/h3&gt;

&lt;p&gt;To begin with, you will need your computer running the Windows operating system. Once turned on, we will use the basic notepad software installed on almost all computers in the operating system. If you do not have a notepad, you can also use a code editor.&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%2Fgjkpa3db1p5z0i2th7uf.jpg" 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%2Fgjkpa3db1p5z0i2th7uf.jpg" alt="Notepad editor"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once open we will write our first line of code :&lt;/p&gt;

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

&lt;span class="n"&gt;msgbox&lt;/span&gt; &lt;span class="s"&gt;"Your text here"&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;Once written, click on "File", then on "Save as", now give your file a name in the following form: &lt;code&gt;name.vbs&lt;/code&gt;. Then click on "Save". It is important to specify the extension of the .vbs file, otherwise the file will be executed as a text file and no action will be performed. VBS means Visual Basic Script. Once saved, the file icon will normally look like this:&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%2Fe8ydgh4rrdydxmyc3aha.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%2Fe8ydgh4rrdydxmyc3aha.PNG" alt="File vbs"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you double click on this file you will see a windows dialogue box open, which you can close by clicking on "Ok" or on the cross.&lt;/p&gt;

&lt;h3&gt;
  
  
  A non-closable message box
&lt;/h3&gt;

&lt;p&gt;Now we are going to add a few lines of code so that our box can no longer be closed simply with the cross, nor with "Ok". To do this, we will use the Visual Basic &lt;code&gt;Do...Loop&lt;/code&gt; statement. The previously written code will be wrapped up in the &lt;code&gt;do&lt;/code&gt; and &lt;code&gt;loop&lt;/code&gt; instructions :&lt;/p&gt;

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

&lt;span class="n"&gt;do&lt;/span&gt;
&lt;span class="n"&gt;msgbox&lt;/span&gt; &lt;span class="s"&gt;"Your text here"&lt;/span&gt;
&lt;span class="n"&gt;loop&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;We re-save the file as a &lt;code&gt;.vbs&lt;/code&gt; file, and when we execute the file, we will not be able to close it simply with the cross or with the "Ok" button, since the &lt;code&gt;loop&lt;/code&gt; instruction allows to create an infinite loop. &lt;/p&gt;

&lt;p&gt;You can also put several messages in your code :&lt;/p&gt;

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

&lt;span class="n"&gt;do&lt;/span&gt;
&lt;span class="n"&gt;msgbox&lt;/span&gt; &lt;span class="s"&gt;"Your text here"&lt;/span&gt;
&lt;span class="n"&gt;msgbox&lt;/span&gt; &lt;span class="s"&gt;"Your other text here"&lt;/span&gt;
&lt;span class="n"&gt;loop&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;So once both messages have been read, the code will go back to the beginning and read the first and second messages over and over again. To permanently close a message box, go to the Windows Task Manager. For example, you can right-click in the navigation bar and then click on Task Manager. Once this is done, click on "Microsoft Windows Based Script Host" and then on "End Task". If you can't find it, here's an overview of what to find :&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%2Fyruk4xv3hfxxz0xiruoi.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%2Fyruk4xv3hfxxz0xiruoi.PNG" alt="Task"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also turn off your computer, and all messages will be gone the next time you turn it on.&lt;/p&gt;

&lt;h3&gt;
  
  
  Customise the message box
&lt;/h3&gt;

&lt;p&gt;Before you become a Windows message box pro, you need to know the different ways to customise it. Indeed you can for example give a title to your message box, add a critical error icon, a questioning warning... We will also see how to make sure that our dialog box is always in the foreground. In the following non-functional piece of code, the variables x, y, z can have several values :&lt;/p&gt;

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

&lt;span class="c1"&gt;' Non-functional code&lt;/span&gt;
&lt;span class="n"&gt;do&lt;/span&gt;
&lt;span class="n"&gt;msgbox&lt;/span&gt; &lt;span class="s"&gt;"Your text here"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"Title"&lt;/span&gt;
&lt;span class="n"&gt;loop&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;We will detail these values later, but first let's break down the msgbox. The first string in quotes represents the text inside the dialog box, the &lt;code&gt;x&lt;/code&gt; allows you to define the buttons of the dialog box, the &lt;code&gt;y&lt;/code&gt; enables you to put an icon, and the &lt;code&gt;z&lt;/code&gt; permits you to make the message box always in the foreground. Finally, the last string represents the title of the popup.&lt;/p&gt;

&lt;p&gt;Let's first look at the &lt;code&gt;x&lt;/code&gt;, this is a number which can have different values and which allows the buttons to be defined. All the values of x and their effects are here, in the table below :&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;x&lt;/th&gt;
&lt;th&gt;Effect&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;OK button&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;OK and Cancel buttons&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Abort, Restart and Ignore buttons&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Yes, No and Cancel buttons&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Yes and No buttons&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;Restart and Cancel buttons&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Then the values of &lt;code&gt;y&lt;/code&gt; can be as follows :&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;y&lt;/th&gt;
&lt;th&gt;Effect&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;16&lt;/td&gt;
&lt;td&gt;Critical error icon&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;32&lt;/td&gt;
&lt;td&gt;Interrogative warning icon&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;48&lt;/td&gt;
&lt;td&gt;Simple warning icon&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;64&lt;/td&gt;
&lt;td&gt;Message icon&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Finally, the &lt;code&gt;z&lt;/code&gt; values can be :&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;z&lt;/th&gt;
&lt;th&gt;Effect&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;Normal dialogue box&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4096&lt;/td&gt;
&lt;td&gt;Dialog box always in the foreground&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Let's put into practice what we have just learned, if we want to create a message box that is always in the foreground, with the title "Virus", the content "Trojan Horse", with the Ok and Cancel buttons and with a critical error icon, our code will look like this :&lt;/p&gt;


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

&lt;p&gt;&lt;span class="n"&gt;do&lt;/span&gt;&lt;br&gt;
&lt;span class="n"&gt;msgbox&lt;/span&gt; &lt;span class="s"&gt;"Trojan Horse"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;4096&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"Virus"&lt;/span&gt;&lt;br&gt;
&lt;span class="n"&gt;loop&lt;/span&gt;&lt;/p&gt;

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

&lt;/div&gt;
&lt;h3&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  To go further&lt;br&gt;
&lt;/h3&gt;

&lt;p&gt;To go further and make a joke to your friends, we will see how to customize the appearance of our &lt;code&gt;vbs&lt;/code&gt; file, so that it looks like a web browser. For example the following icon refers to a vbs file which opens an infinite message box :&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%2F1y2f9jrvijxanial6ihr.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%2F1y2f9jrvijxanial6ihr.PNG" alt="Shortcut"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To do this, you need to save your &lt;code&gt;vbs&lt;/code&gt; file anywhere unobtrusively. Then right click and click on "copy". Then go to the place where you want to create your shortcut and right click and "paste shortcut". Then right click on the item you have just created and click on "Properties" and then "Change Icon" in the "Shortcut" tab. Choose the icon you prefer then click on "Ok" then on "Apply". All that's left to do is rename it and you're done!&lt;/p&gt;

&lt;p&gt;I hope you enjoyed this tutorial, if you liked the concept, I might do another article on fake viruses. If you have any questions, feel free to ask me in the comments. 👍&lt;/p&gt;

</description>
      <category>vbs</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Create a QR code generator</title>
      <dc:creator>Clément Gaudinière</dc:creator>
      <pubDate>Sun, 19 Sep 2021 16:43:34 +0000</pubDate>
      <link>https://forem.com/clementgaudiniere/create-a-qr-code-generator-1b0p</link>
      <guid>https://forem.com/clementgaudiniere/create-a-qr-code-generator-1b0p</guid>
      <description>&lt;p&gt;Hello everyone, today we will see how to create a qr code generator with the open source library &lt;a href="https://github.com/neocotic/qrious" rel="noopener noreferrer"&gt;qrious.js&lt;/a&gt;. This library generates a qr code using different algorithms based on the principles discussed in the last article (module, alignment marker, timing patern, etc.), which I strongly invite you to read to better understand how qr codes work :&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/clementgaudiniere" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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%2Fuser%2Fprofile_image%2F610201%2Ffda4d3a8-ecf9-4fe0-a1be-e32aca07d910.png" alt="clementgaudiniere"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/clementgaudiniere/how-does-a-qr-code-work-c2a" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;How does a QR code work ?&lt;/h2&gt;
      &lt;h3&gt;Clément Gaudinière ・ Aug 3 '21&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#qrcodes&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#flashcodes&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#tech&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#programming&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  Let's go
&lt;/h3&gt;

&lt;p&gt;The first thing to do is to get hold of the librairie. You can for example use a CDN (Content Delivery Network), or download it directly to your computer/server.&lt;/p&gt;

&lt;p&gt;For those wishing to use a CDN, I recommend this link to include in your document :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://cdnjs.cloudflare.com/ajax/libs/qrious/4.0.2/qrious.min.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For those who want to download the library, you can download it via NPM: &lt;code&gt;$ npm install --save qrious&lt;/code&gt; or Bower: &lt;code&gt;$ bower install --save qrious&lt;/code&gt; or via the &lt;a href="https://github.com/neocotic/qrious/releases" rel="noopener noreferrer"&gt;latest releases page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Once included in your document, we will create the HTML structure :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Are you ready to create your own Qr code?&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"container-divided"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;textarea&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"Type something"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"qrCodeTextArea"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/textarea&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;canvas&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"qr"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/canvas&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The qrious.js library generates qr codes via the html  elements, without them you will not be able to generate your qr code. You can however give the id of your choice to the &lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt; element.&lt;/p&gt;

&lt;h3&gt;
  
  
  Adding style
&lt;/h3&gt;

&lt;p&gt;Now I'm going to add some styling to my various elements, you can of course, if you wish, customise the CSS.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="sx"&gt;url("https://fonts.googleapis.com/css2?family=Lato&amp;amp;display=swap")&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;545px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nt"&gt;html&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url("https://i.ibb.co/f0sL4rx/t-l-chargement.jpg")&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cover&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-repeat&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;no-repeat&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;backdrop-filter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;saturate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;180%&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;blur&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;-webkit-backdrop-filter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;saturate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;180%&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;blur&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;z-index&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;"Lato"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt; &lt;span class="m"&gt;25px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;column&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;align-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;space-around&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="nc"&gt;.container-divided&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;flex-wrap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;wrap&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;900px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;95%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fit-content&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;space-around&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50px&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="nc"&gt;.container-divided&lt;/span&gt; &lt;span class="nt"&gt;textarea&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;50px&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#eaeaea&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;14px&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;outline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;300px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;95%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;250px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;left&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;resize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;vertical&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;text-indent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;15px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="nc"&gt;.container-divided&lt;/span&gt; &lt;span class="nt"&gt;textarea&lt;/span&gt;&lt;span class="nd"&gt;::-moz-selection&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;inherit&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;118&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;199&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;239&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.54&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="nc"&gt;.container-divided&lt;/span&gt; &lt;span class="nt"&gt;textarea&lt;/span&gt;&lt;span class="nd"&gt;::selection&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;inherit&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;118&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;199&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;239&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.54&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;input&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;"Open Sans"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;#fff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;transparent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;outline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;input&lt;/span&gt;&lt;span class="nd"&gt;::placeholder&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;input&lt;/span&gt;&lt;span class="nd"&gt;::-moz-placeholder&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;input&lt;/span&gt;&lt;span class="nd"&gt;:-ms-input-placeholder&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;canvas&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;200px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;200px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Setting up the librarie
&lt;/h3&gt;

&lt;p&gt;To set up this library, you can use the documentation located on github, or use this table which allows you to understand the different parameters that can be set within this library.&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%2Fqgfjvsu6wakhq9x30v8i.jpg" 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%2Fqgfjvsu6wakhq9x30v8i.jpg" alt="Table"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The resulting JS code looks like this :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Our textarea&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#qrCodeTextArea&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Our canvas element with 'qr' id&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;canvas&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;qr&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// The various parameters&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;createQR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;v&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;QRious&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;element&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;v&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;level&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;L&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;backgroundAlpha&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;foreground&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// We create the qr code&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;qr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createQR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// If the text box changes, update the qr code.&lt;/span&gt;
&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;input&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;qr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createQR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After a few minutes of code, you can see the result below :&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/clement-gaudiniere/embed/YzVjYqZ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;I hope you enjoyed this tutorial, if you have any questions, feel free to ask me in the comments. 👍&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Create a skeleton loading</title>
      <dc:creator>Clément Gaudinière</dc:creator>
      <pubDate>Sat, 04 Sep 2021 16:31:22 +0000</pubDate>
      <link>https://forem.com/clementgaudiniere/create-a-skeleton-loading-m1h</link>
      <guid>https://forem.com/clementgaudiniere/create-a-skeleton-loading-m1h</guid>
      <description>&lt;p&gt;Hello everyone, today we are going to take a look at a rather special method of loading content, in fact we are going to talk about skeleton loading, a method of loading pages that is quite widespread and quite original to make users wait while your page is loading. You are ready, so let's go !&lt;/p&gt;

&lt;h3&gt;
  
  
  What is it ?
&lt;/h3&gt;

&lt;p&gt;But what does a page using skeleton loading look like? In fact, you see them on every platform: Twitter, YouTube, Netflix... Below you can see glimpses of skeleton loading on various websites mentioned above.&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%2Fdn1cmfwkc5iksmu2yw16.jpg" 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%2Fdn1cmfwkc5iksmu2yw16.jpg" alt="Youtube Skeleton Loading View"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/tirsolecointere/embed/jRJKWa?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;As you can see, skeleton loading is used by high profile sites for a reason: it allows the user to directly understand where and how the information will be organised after loading.&lt;/p&gt;

&lt;h3&gt;
  
  
  Let's code
&lt;/h3&gt;

&lt;p&gt;Now we're going to start making a page that uses skeleton loading to present videos. Please note that if you want to use skeletons loading on your website, you will need to use an AJAX add-on to fully load the videos. In our case, we will implement the skeleton loading system, without loading real videos.&lt;/p&gt;

&lt;p&gt;First we will write our HTML structure :&lt;/p&gt;

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

&lt;span class="c"&gt;&amp;lt;!-- This div is used as a container --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"wrapper shine"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;!-- Title --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Coming soon&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;!-- Container of card (videos that load) --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"container"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;  
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Best sellers&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"container"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Recommended&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"container"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;Then we add some style :&lt;/p&gt;

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

&lt;span class="c"&gt;/* Fonts */&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="sx"&gt;url("https://fonts.googleapis.com/css2?family=Roboto:wght@300&amp;amp;display=swap")&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c"&gt;/* Style */&lt;/span&gt;
&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#dedede&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.wrapper&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;900px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;95%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;55px&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.wrapper&lt;/span&gt; &lt;span class="nt"&gt;h2&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;letter-spacing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;5px&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;"Roboto"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.wrapper&lt;/span&gt; &lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;flex-wrap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;wrap&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;align-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex-start&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.wrapper&lt;/span&gt; &lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="nc"&gt;.card&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;160px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;90px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;90deg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#e2e2e2&lt;/span&gt; &lt;span class="m"&gt;0px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#efefef&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#e2e2e2&lt;/span&gt; &lt;span class="m"&gt;60px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;background-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;160px&lt;/span&gt; &lt;span class="err"&gt;+&lt;/span&gt; &lt;span class="m"&gt;160px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;animation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;refresh&lt;/span&gt; &lt;span class="m"&gt;1.2s&lt;/span&gt; &lt;span class="n"&gt;infinite&lt;/span&gt; &lt;span class="n"&gt;ease-out&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* Animation */&lt;/span&gt;
&lt;span class="k"&gt;@keyframes&lt;/span&gt; &lt;span class="n"&gt;refresh&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="err"&gt;0&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;-160px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="err"&gt;60&lt;/span&gt;&lt;span class="o"&gt;%,&lt;/span&gt; &lt;span class="err"&gt;100&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;160px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;You can see the final result below :&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/clement-gaudiniere/embed/ZEyQbwG?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;If you want to load the video thumbnails, you will have to use AJAX. To do this, it is highly recommended to use jQuery which simplifies the requests and makes them more reliable. An example code in AJAX :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
 html
&amp;lt;script&amp;gt;
  $(document).ready(function() { 
   $(".card").load("https://www.site.com/videoCharging.php");
  });
&amp;lt;/script&amp;gt;


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

&lt;/div&gt;

&lt;p&gt;I hope you enjoyed this tutorial, if you have any questions, feel free to ask me in the comments. 👍&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>webdev</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>How does a QR code work ?</title>
      <dc:creator>Clément Gaudinière</dc:creator>
      <pubDate>Tue, 03 Aug 2021 15:45:11 +0000</pubDate>
      <link>https://forem.com/clementgaudiniere/how-does-a-qr-code-work-c2a</link>
      <guid>https://forem.com/clementgaudiniere/how-does-a-qr-code-work-c2a</guid>
      <description>&lt;p&gt;Hello everyone, as you have seen in the title, today we are going to go back to the origins of the QR code. Nowadays, QR codes are used all the time, they allow you to link something physical to something digital. For example, you can simply scan a QR code to access a link, rather than copying the whole link.&lt;br&gt;
That's why it's important to understand how they work, and why not in a future article how to create one !&lt;/p&gt;

&lt;h3&gt;
  
  
  How long has it been around ?
&lt;/h3&gt;

&lt;p&gt;Firstly, since when have qr codes existed ? They have been around longer than you might think, in fact they were invented in 1994 by the company Denso-Wave.  They were used to track the transport of spare parts in Toyota factories. Denso Wave made the qr code free in 1999, but it was not really used until the rise of smartphones, about ten years later.&lt;/p&gt;

&lt;h3&gt;
  
  
  Principle
&lt;/h3&gt;

&lt;p&gt;Now we will discuss the principle of qr code. To do this, we will use this qr code, which refers to the dev.to link :&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%2Fnwa4yvpw7zw3t6yvluxf.jpg" 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%2Fnwa4yvpw7zw3t6yvluxf.jpg" alt="dev.to qr code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To begin with, a qr code is made up of large white and black squares in three of its corners. These squares are called modules. Some of these modules must not be covered or modified, otherwise the code cannot be scanned. These are the position markers. They tell the scanner where the edges of the QR Code are. The modules are shown here with a red overlay :&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%2Fpt3dptdhcvprogwgqust.jpg" 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%2Fpt3dptdhcvprogwgqust.jpg" alt="dev.to qr code modul"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we're going to take a slightly longer link and generate a qr code, so I've chosen to generate the qr code from youtube.com :&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%2Fq91gcktivq21vyot29m3.jpg" 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%2Fq91gcktivq21vyot29m3.jpg" alt="youtube.com qr code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One can notice inside this new qr code an alignment marker, in red in the image below :&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%2Ffodfz4iz1h4fmubrq3pz.jpg" 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%2Ffodfz4iz1h4fmubrq3pz.jpg" alt="youtube.com qr code alignment marker"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It acts as a reference point for the scanner, ensuring that everything lines up correctly. On larger codes there are several reference points.&lt;/p&gt;

&lt;p&gt;In this qr code, from the systemid.com website :&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%2F87alze5i0mznkzv3igu1.jpg" 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%2F87alze5i0mznkzv3igu1.jpg" alt="systemid.com qr code legende"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Red stripes can be observed which are called timing patterns. They define the positioning of the rows and columns. In addition, the green sections indicate to the reader the format of the QR Code, whether it is a website, a text or other. Finally, the blue modules represent the version number, i.e. the more modules there are, the higher the version.Until v40 which represents 177 * 177 modules. Once all these modules are deconstructed we are left with the grey part :&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%2Fjf7da0l25f1izdwkugeb.jpg" 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%2Fjf7da0l25f1izdwkugeb.jpg" alt="systemid.com qr code grey part"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The remaining modules are grouped in 8 groups, thus forming a byte. (A byte was composed of 8 bits).&lt;/p&gt;

&lt;h3&gt;
  
  
  Error correction
&lt;/h3&gt;

&lt;p&gt;QR codes are practical, they are so fast that it sometimes takes less than a second to flash one, their secret ? They don't need to be scanned in full to be read. So if part of the code is damaged it doesn't matter, and the QR code can be read. But how does it do that ? The qr code has a self-correcting error system based on the Reed-Solomon code which is a so-called perfect code invented by mathematicians Irving S. Reed and Gustave Solomon. The fact that part of the code can be covered without preventing its correct reading allows us to make the Qr code more attractive by integrating graphic elements :&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%2Fdrnruuwj5on2uccnatws.jpg" 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%2Fdrnruuwj5on2uccnatws.jpg" alt="custom qr code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to create your own qr code, I recommend the &lt;a href="https://www.unitag.io/qrcode" rel="noopener noreferrer"&gt;Unitag.io&lt;/a&gt;  website, which allows you to manage many customization effects. &lt;/p&gt;

&lt;p&gt;In a next tutorial, we will see how to create a QR code generator in javascript. I hope this tutorial has helped you understand the different processes behind QR codes, if you have any questions, feel free to ask me in the comments. 👍&lt;/p&gt;

</description>
      <category>qrcodes</category>
      <category>flashcodes</category>
      <category>tech</category>
      <category>programming</category>
    </item>
    <item>
      <title>Custom cursor on a webpage in pure CSS</title>
      <dc:creator>Clément Gaudinière</dc:creator>
      <pubDate>Thu, 29 Jul 2021 07:38:58 +0000</pubDate>
      <link>https://forem.com/clementgaudiniere/custom-cursor-on-a-webpage-in-pure-css-1dmk</link>
      <guid>https://forem.com/clementgaudiniere/custom-cursor-on-a-webpage-in-pure-css-1dmk</guid>
      <description>&lt;p&gt;Hello everyone, today we are going to look at the cursor property available in CSS. And why not use a custom cursor ?&lt;/p&gt;

&lt;h3&gt;
  
  
  Pre-integrated cursors
&lt;/h3&gt;

&lt;p&gt;The CSS allows us to choose a cursor from over thirty pre-built cursors. Some browsers automatically switch to certain cursors, for example when the cursor passes over a link, the browser instinctively understands that it is a clickable element and switches the mouse cursor to the &lt;code&gt;cursor: pointer;&lt;/code&gt; property.&lt;/p&gt;

&lt;p&gt;To summarise, here is a table of almost all the sliders currently available in CSS :&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CSS value&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;auto&lt;/td&gt;
&lt;td&gt;The UA will determine the cursor to display based on the current context. E.g., equivalent to text when hovering text.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;default&lt;/td&gt;
&lt;td&gt;The platform-dependent default cursor. Typically an arrow.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;No cursor is rendered.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;context-menu&lt;/td&gt;
&lt;td&gt;A context menu is available.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;pointer&lt;/td&gt;
&lt;td&gt;Help information is available.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;The cursor is a pointer that indicates a link. Typically an image of a pointing hand.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;progress&lt;/td&gt;
&lt;td&gt;The program is busy in the background, but the user can still interact with the interface (in contrast to &lt;code&gt;wait&lt;/code&gt;).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;cell&lt;/td&gt;
&lt;td&gt;The table cell or set of cells can be selected.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;crosshair&lt;/td&gt;
&lt;td&gt;Cross cursor, often used to indicate selection in a bitmap.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;text&lt;/td&gt;
&lt;td&gt;The text can be selected. Typically the shape of an I-beam.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;vertical-text&lt;/td&gt;
&lt;td&gt;The vertical text can be selected. Typically the shape of a sideways I-beam.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;alias&lt;/td&gt;
&lt;td&gt;An alias or shortcut is to be created.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;copy&lt;/td&gt;
&lt;td&gt;Something is to be copied.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;move&lt;/td&gt;
&lt;td&gt;Something is to be moved.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;no-drop&lt;/td&gt;
&lt;td&gt;An item may not be dropped at the current location. On Windows and Mac OS X, no-drop is the same as not-allowed.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;not-allowed&lt;/td&gt;
&lt;td&gt;The requested action will not be carried out.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;grab&lt;/td&gt;
&lt;td&gt;Something can be grabbed (dragged to be moved).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;grabbing&lt;/td&gt;
&lt;td&gt;Something is being grabbed (dragged to be moved).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;all-scroll&lt;/td&gt;
&lt;td&gt;Something can be scrolled in any direction (panned). On Windows, all-scroll is the same as move.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;col-resize&lt;/td&gt;
&lt;td&gt;The item/column can be resized horizontally. Often rendered as arrows pointing left and right with a vertical bar separating them.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;row-resize&lt;/td&gt;
&lt;td&gt;The item/row can be resized vertically. Often rendered as arrows pointing up and down with a horizontal bar separating them.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;zoom-in&lt;/td&gt;
&lt;td&gt;Something can be zoomed (magnified) in.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;zoom-out&lt;/td&gt;
&lt;td&gt;Something can be zoomed (magnified) out.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For more information, you can also consult the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/cursor"&gt;documentation on the CSS cursor property&lt;/a&gt; on the MDN Web Docs site.&lt;/p&gt;

&lt;p&gt;You can see a demo of some of the cursors below :&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/clement-gaudiniere/embed/xxdGNaa?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Custom cursor
&lt;/h3&gt;

&lt;p&gt;Fortunately we are not limited to pre-built cursors, we can use custom cursors in pure CSS. &lt;br&gt;
To add a custom cursor, it's quite simple, we use url: cursor: url(one.svg);. But we are not limited to urls, we can also put an svg as in the code below, where we ask the browser to replace our mouse cursor with the svg :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;html&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url("data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='24px' height='24px' viewBox='0 0 512 512' style='enable-background:new 0 0 512.011 512.011;' xml:space='preserve'%3E %3Cpath fill='DeepSkyBlue' d='M434.215,344.467L92.881,3.134c-4.16-4.171-10.914-4.179-15.085-0.019  c-2.011,2.006-3.139,4.731-3.134,7.571v490.667c0.003,4.382,2.685,8.316,6.763,9.92c4.081,1.603,8.727,0.545,11.712-2.667  l135.509-145.92h198.016c5.891,0.011,10.675-4.757,10.686-10.648C437.353,349.198,436.226,346.473,434.215,344.467z'/%3E %3C/svg%3E")&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;pointer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can see the result of our code below :&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/clement-gaudiniere/embed/RwVMyae?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;I hope this tutorial has allowed you to add your own custom sliders to your website, or at least to have discovered how to use them, if you have any questions, feel free to ask me in the comments. 👍&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Add shiels on github</title>
      <dc:creator>Clément Gaudinière</dc:creator>
      <pubDate>Thu, 01 Jul 2021 08:53:50 +0000</pubDate>
      <link>https://forem.com/clementgaudiniere/add-shiels-on-github-3n55</link>
      <guid>https://forem.com/clementgaudiniere/add-shiels-on-github-3n55</guid>
      <description>&lt;p&gt;Hello everyone, today we are going to discuss another way to customize your README.md file from a github repository. Indeed, we will see how to add shields. Shields are SVG badges that automatically update themselves according to the interactions related to your repository. For example, if a new release appears, the "release" badge will automatically update to show the latest release.&lt;br&gt;
So I propose to discover together how to handle shields, and why not use them later for your next projects.&lt;/p&gt;
&lt;h3&gt;
  
  
  Let's start
&lt;/h3&gt;

&lt;p&gt;To begin, go to your GitHub repository, if you have not already created a README.md file you will have to create it since it is on this file that we will work.&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%2F838mb3i85b8l7bp7z4y4.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%2F838mb3i85b8l7bp7z4y4.PNG" alt="Create README.md file"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then go to the editing area of your README file, to start, we will create a centered paragraph, with some links and some images that will be our badges later on :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;align=&lt;/span&gt;&lt;span class="s"&gt;"center"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We want to add a badge that will display the latest version of our release, so our first &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tag will look like this in our README file (of course replacing the text in square brackets with your username and repository) :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;align=&lt;/span&gt;&lt;span class="s"&gt;"center"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://github.com/[user]/[repository]/releases/"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now it's time to get serious: we're finally going to add our badge !&lt;br&gt;
Go to &lt;a href="https://shields.io" rel="noopener noreferrer"&gt;Shields.io&lt;/a&gt;, and click on : "GitHub release (latest by date)" as shown in the following illustration:&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%2F2nb72oxe2bwml10ud92j.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%2F2nb72oxe2bwml10ud92j.PNG" alt="Latest release on github"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You now arrive at this window, where you fill in various information such as your username, and the name of your repository. For the style, I advise you to use the &lt;code&gt;for-the-badge&lt;/code&gt;, even if it is quite subjective.  In the input "override label" you can specify the label of the badge, whereas in the "override color" you can specify a colour.&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%2F1s09j60ht9m2daqjk0k2.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%2F1s09j60ht9m2daqjk0k2.PNG" alt="Window"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to add a logo, it is quite possible and this is what we will see now. Open a new tab and go to &lt;a href="https://simpleicons.org" rel="noopener noreferrer"&gt;Simple Icons.org&lt;/a&gt; to search for a logo you like. In my case, I will choose the DocuSign logo :&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%2F1qv3q64iugjor9xvqkky.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%2F1qv3q64iugjor9xvqkky.PNG" alt="Logo Choice"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go back to the shields.io tab, and the previously opened window. In the input named logo, enter the name of your logo, in my case : DocuSign. &lt;br&gt;
You can also give your logo a colour in the input named "override logo color" :&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%2Fynvo2woqrmp6zumdi3qv.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%2Fynvo2woqrmp6zumdi3qv.PNG" alt="Parameters"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once this is done, you can click on : "Copy badge url", which will generate a url with the different parameters you have just entered.&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%2Fulz0tbm4b20r51juj35m.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%2Fulz0tbm4b20r51juj35m.PNG" alt="Copy badge url"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let's go back to our README.md file, and the code we wrote earlier. In the first link of our paragraph, which is the release page, we will change the source of the image within it. As you may have guessed, we will paste the url previously copied thanks to the "Copy badge url" button.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;align=&lt;/span&gt;&lt;span class="s"&gt;"center"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://github.com/[user]/[repository]/releases/"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Releases"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://img.shields.io/github/v/release/[user]/[repository]?label=release&amp;amp;logo=DocuSign&amp;amp;logoColor=%23fff&amp;amp;style=for-the-badge"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save your README.md file and you will see the release badge appear. If you create a new release, the badge will automatically update. You can also try with other badges such as the number of "forks", "stars", "watchers"...&lt;/p&gt;

&lt;p&gt;For my part, my badge looks like this : &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%2Fjz6ide2c6un2155elk66.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%2Fjz6ide2c6un2155elk66.png" alt="Latest Releases"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope this tutorial has allowed you to add your own shields on GitHub, or at least to have discovered how to use them, if you have any questions, don't hesitate to ask me in the comments, or even to share a repository in which you have added badges. 👍&lt;/p&gt;

</description>
      <category>github</category>
      <category>beginners</category>
      <category>productivity</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
