UNPKG

magical-css

Version:

A simple, unique, and responsive CSS framework, made with SASS.

106 lines (105 loc) 5.53 kB
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/magical-css@latest/dist/magic.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script><link rel="icon" href="//palkerecsenyi.github.io/magic/documentation/media/icon.png" type="image/x-icon" /> <script defer src="https://use.fontawesome.com/releases/v5.0.3/js/all.js"></script> <link rel="stylesheet" href="../../prism.css"> <meta charset="UTF-8"> <title>Magic - Documentation</title> <script> function openNav(){ document.getElementById("nav-mobile").style.width = "100%"; } function closeNav(){ document.getElementById("nav-mobile").style.width = "0"; } </script> <script src="../../navbar.js"></script> </head> <body> <div id="nav-mobile" class="blue animate"> <a href="javascript:void(0)" class="close" onClick="closeNav()">&times;</a> <a href="https://palkerecsenyi.github.io/magic/">Home</a> <a href="https://palkerecsenyi.github.io/magic/start">Get Started</a> <a href="https://palkerecsenyi.github.io/magic/documentation">Documentation</a> <a href="https://github.com/palkerecsenyi/magic">Github</a> </div> <nav class="blue"> <ul class="nav-left"> <li><a href="/magic" class="nav-brand-text">Magic.CSS</a></li> <li class="nav-mobile-open" onClick="openNav()"><i class="fas fa-bars"></i></li> </ul> <ul class="nav-right"> <li class="nav-item"><a href="https://palkerecsenyi.github.io/magic/">Home</a></li> <li class="nav-item"><a href="https://palkerecsenyi.github.io/magic/start">Get Started</a></li> <li class="nav-item active"><a href="https://palkerecsenyi.github.io/magic/documentation">Documentation</a></li> <li class="nav-item"><a href="https://github.com/palkerecsenyi/magic">Github</a></li> </ul> </nav> <div class="navigation blue"> <div class="links"> <script>addNav(true,"badge");</script> </div> </div> <div class="container"> <h1 class="header">Badges</h1> <h2 class="trailer">Badges are simple components that you can use to represent the status of an item.</h2> <hr class="separator"> <h2>Examples</h2> <p>Badges serve many purposes: they can indicate new notifications, show how many emails you have, etc. Here's a few examples:</p> <span class="badge red">I'm a badge!</span> <span class="badge blue">I'm a blue badge!</span> <span class="badge red round">5</span> <h2>Adding badges</h2> <p>Badges are made with <span class="i-code">&lt;span&gt;</span> tags, so adapt the text item's font size. For example:</p> <h1>Header 1 <span class="badge dark">Badge</span></h1> <h2>Header 2 <span class="badge red">Badge</span></h2> <h3>Header 3 <span class="badge green">Badge</span></h3> <p>Paragraph <span class="badge blue">Badge</span></p> <span class="badge yellow">Badge outside of text</span> <span class="badge gradient-blue">Badge with gradient</span> <pre><code class="language-markup">&lt;h1&gt;Header 1 &lt;span class="badge dark"&gt;Badge&lt;/span&gt;&lt;/h1&gt; &lt;h2&gt;Header 2 &lt;span class="badge red"&gt;Badge&lt;/span&gt;&lt;/h2&gt; &lt;h3&gt;Header 3 &lt;span class="badge green"&gt;Badge&lt;/span&gt;&lt;/h3&gt; &lt;p&gt;Paragraph &lt;span class="badge blue"&gt;Badge&lt;/span&gt;&lt;/p&gt; &lt;span class="badge yellow"&gt;Badge outside of text&lt;/span&gt; &lt;span class="badge gradient-blue"&gt;Badge with gradient&lt;/span&gt;</code></pre> <p>Generally, to add a badge, use <span class="i-code">&lt;span class="badge XXX"&gt;</span>, where XXX is any Magic colour, including gradients.</p> <h2>Rounded badges</h2> <div class="error yellow"> Warning: This feature is not functional yet. DO NOT use it in a production environment. </div> <p>When bades contain only a single number or letter, you can make them circular:</p> <h3><span class="badge red round">5</span></h3> <pre><code class="language-markup">&lt;span class="badge red round"&gt;5&lt;/span&gt;</code></pre> <p>These work exactly the same as regular badges, so can be attached to any text item and have any Magic colour.</p> <h2>Icon badges</h2> <p>Your Magic badges can also have FontAwesome icons:</p> <span class="badge dark"><i class="far fa-envelope"></i> 50 new messages</span> <span class="badge dark"><i class="fas fa-question-circle"></i> 22 new questions</span> <pre><code class="language-markup">&lt;span class="badge dark"&gt;&lt;i class="fas fa-question-circle"&gt;&lt;/i&gt; 22 new questions&lt;/span&gt;</code></pre> </div> <footer class="blue"> <div class="body"> <div class="content"> <h1>Magic.css</h1> <p>Neat and unique CSS framework for dynamic websites</p> </div> <div class="links"> <ul> <li class="header">Pages</li> <li><a href="/magic">Home</a></li> <li><a href="#">Start</a></li> <li><a href="https://github.com/palkerecsenyi/magic/">Github</a></li> </ul> </div> </div> <div class="bottom"> <p>&copy; Magic 2018 <span class="right-float"><a onClick="$('html, body').animate({ scrollTop: 0 }, 'slow');return false;" href="#" class="link"><i class="fas fa-arrow-up"></i> Back to Top</a></span></p> </div> </footer> <script src="../../prism.js"></script> </body> </html>