<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mario E. Olivares</title>
    <description>The latest articles on DEV Community by Mario E. Olivares (@meolivares06).</description>
    <link>https://dev.to/meolivares06</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F143085%2F4da2d6c4-85f2-451f-b19f-d0ef18dadd83.jpg</url>
      <title>DEV Community: Mario E. Olivares</title>
      <link>https://dev.to/meolivares06</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/meolivares06"/>
    <language>en</language>
    <item>
      <title>Getting starting with Metro_4</title>
      <dc:creator>Mario E. Olivares</dc:creator>
      <pubDate>Fri, 13 Mar 2020 19:23:49 +0000</pubDate>
      <link>https://dev.to/meolivares06/getting-starting-with-metro4-33jj</link>
      <guid>https://dev.to/meolivares06/getting-starting-with-metro4-33jj</guid>
      <description>&lt;h3&gt;
  
  
  Why Metro_4
&lt;/h3&gt;

&lt;p&gt;Metro 4 is an open source toolkit for developing with HTML, CSS, and JS.&lt;br&gt;
  You can quickly prototype your ideas or build your apps with its extensive set of components, and powerful plugins.&lt;/p&gt;

&lt;p&gt;More info here: &lt;a href="https://metroui.org.ua/"&gt;https://metroui.org.ua/&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  What we are going to see:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Setting up a markup for using the library&lt;br&gt;
    1.1 Initialize the project&lt;br&gt;
    1.2 Initialize the markup&lt;br&gt;
    1.3 Install live-server&lt;br&gt;
    1.4 Run out page&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Creating a login page:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IlIkmjsa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/weq9g27wzk3vhcgudzoe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IlIkmjsa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/weq9g27wzk3vhcgudzoe.png" alt="LoginScreenShot"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Conclusion&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  1. Setting up:
&lt;/h3&gt;

&lt;p&gt;1.1 Create a dir, inside it initialize an npm project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;         ```
     mkdir metro4_login &amp;amp;&amp;amp; npm init -y
         ```
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;1.2 Create a file index.html with this content (you can find this content here: &lt;a href="https://metroui.org.ua/intro.html):"&gt;https://metroui.org.ua/intro.html):&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   ```html
        &amp;lt;!DOCTYPE html&amp;gt;
        &amp;lt;html lang="en"&amp;gt;
        &amp;lt;head&amp;gt;
            &amp;lt;!-- Required meta tags --&amp;gt;
            &amp;lt;meta charset="utf-8"&amp;gt;
            &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"&amp;gt;

            &amp;lt;!-- Metro 4 --&amp;gt;
            &amp;lt;link rel="stylesheet" href="node_modules/metro4/build/css/metro-all.min.css"&amp;gt;
        &amp;lt;/head&amp;gt;
        &amp;lt;body&amp;gt;
            &amp;lt;h1&amp;gt;Hello, world!&amp;lt;/h1&amp;gt;

            &amp;lt;!-- Metro 4 --&amp;gt;
            &amp;lt;script src="node_modules/metro4/build/js/metro.min.js"&amp;gt;&amp;lt;/script&amp;gt;
        &amp;lt;/body&amp;gt;
    &amp;lt;/html&amp;gt;
     ```
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Install if you don't have it live-server (you can use anohter variant for reloading yor page):
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;        npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; live-server
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;With this, inside your project, run:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  live-server
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;You should see a page with Hello World&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Create the login page:
&lt;/h3&gt;

&lt;p&gt;Paste this code inside the body tag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  &amp;lt;div class="container-fluid"&amp;gt;
      &amp;lt;div class="grid "&amp;gt;
        &amp;lt;div class="row d-flex flex-column flex-justify-center h-vh-50" &amp;gt;
          &amp;lt;div class="cell-3 offset-4"&amp;gt;
            &amp;lt;form class="p-6 win-shadow"&amp;gt;
              &amp;lt;span class="mif-4x mif-vpn-lock place-right" style="margin-top: -10px;"&amp;gt;&amp;lt;/span&amp;gt;
              &amp;lt;h2 class="text-light"&amp;gt;Login to service&amp;lt;/h2&amp;gt;
              &amp;lt;hr class="thin mt-4 mb-4 bg-white"&amp;gt;
              &amp;lt;div class="form-group"&amp;gt;
                  &amp;lt;label&amp;gt;Email address&amp;lt;/label&amp;gt;
                  &amp;lt;input type="email" placeholder="Enter email" data-role="input" /&amp;gt;
                  &amp;lt;small class="text-muted"&amp;gt;We'll never share your email with anyone else.&amp;lt;/small&amp;gt;
              &amp;lt;/div&amp;gt;
              &amp;lt;div class="form-group"&amp;gt;
                  &amp;lt;label&amp;gt;Password&amp;lt;/label&amp;gt;
                  &amp;lt;input type="password" placeholder="Enter email" data-role="input" /&amp;gt;
              &amp;lt;/div&amp;gt;
              &amp;lt;div class="form-group mt-10"&amp;gt;
                  &amp;lt;button class="button success" data-role="button"&amp;gt;Submit data&amp;lt;/button&amp;gt;
              &amp;lt;/div&amp;gt;
          &amp;lt;/form&amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;!-- content here --&amp;gt;
    &amp;lt;/div&amp;gt;

    &amp;lt;!-- Metro 4 --&amp;gt;
    &amp;lt;script src="node_modules/metro4/build/js/metro.min.js"&amp;gt;&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Basically the login page structure consists of:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;        .container-fluid
            .grid
                .row
                    .cell
                        form
                            - icon (&amp;lt;span class="mif-4x mif-vpn-lock place-right" style="margin-top: -10px;"&amp;gt;&amp;lt;/span&amp;gt;)
                            h2 
                            hr
                            .form-group (relative to email address)
                            .form-group (relative to email password)
                            .form-group (relative to submit button)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;We use a .container-fluid to place our page all wide into the viewport

&lt;p&gt;With the grid system we give the form a width of 3 columns.&lt;/p&gt;

&lt;p&gt;We also give an offset of 4 for centering horizontal&lt;/p&gt;

&lt;p&gt;With the flex classes we demonstrate flexbox with Metro_4. &lt;/p&gt;

&lt;p&gt;The name off flexbox classes are practically self explanatory.&lt;/p&gt;

&lt;p&gt;Last we can see the use of .form-group for the form items.&lt;br&gt;
&lt;/p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Conclusion:&lt;br&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Metro_4 IS AND IMPRESSIVE COMPONENTS LIBRARY.&lt;/strong&gt;&lt;br&gt;
It have support for &lt;strong&gt;Angular and React&lt;/strong&gt;.&lt;br&gt;
It is &lt;strong&gt;easy&lt;/strong&gt; to use, with &lt;strong&gt;several examples&lt;/strong&gt; and explanation.&lt;br&gt;
It's &lt;strong&gt;free&lt;/strong&gt;, open source and &lt;strong&gt;well supported&lt;/strong&gt;.&lt;br&gt;
It's give us a &lt;strong&gt;huge number of components&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>metro4</category>
    </item>
  </channel>
</rss>
