Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An initial Version of my Component Library #1

Open
wants to merge 45 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
4edd505
alert component
hrshmistry Mar 28, 2021
f5567b3
refactor: outer-div
hrshmistry Mar 28, 2021
eaf4a53
refactor: file structure
hrshmistry Mar 28, 2021
398688d
[IMPROVED] doc-site-layout
hrshmistry Mar 29, 2021
a98be3f
added font awesome kit
hrshmistry Mar 29, 2021
97bfb39
feat: nav + aside
hrshmistry Mar 29, 2021
2035c09
feat: added button component
hrshmistry Mar 29, 2021
ecdebe7
minor changes
hrshmistry Mar 29, 2021
17de04b
added favicon
hrshmistry Mar 29, 2021
5e9b8ac
refactor: whole code
hrshmistry Mar 29, 2021
54e5a20
minor changes
hrshmistry Mar 29, 2021
541cfba
feat: home page & refactor: file structure
hrshmistry Mar 29, 2021
4b4e302
feat: added badge component and code refactor
hrshmistry Mar 30, 2021
6e60a0e
feat: added card component
hrshmistry Mar 30, 2021
7cf60dd
refactor: code
hrshmistry Mar 30, 2021
349c498
refactor: entire file structure
hrshmistry Mar 30, 2021
3672ccc
minor change
hrshmistry Mar 30, 2021
882b2f8
minor change
hrshmistry Mar 30, 2021
ee48109
added meta contents
hrshmistry Mar 30, 2021
f124a81
minor change
hrshmistry Mar 30, 2021
6a5a584
minor changes
hrshmistry Mar 30, 2021
6789ec6
refactore: coming soon part
hrshmistry Mar 30, 2021
ac2adba
feat: meta tags updated
hrshmistry Mar 31, 2021
614ed54
minor change
hrshmistry Mar 31, 2021
d9d67c1
minor
hrshmistry Mar 31, 2021
ab1c5b6
minor
hrshmistry Mar 31, 2021
642fb2d
minor
hrshmistry Mar 31, 2021
18041bf
refactore: minor change
hrshmistry Mar 31, 2021
9e351be
fix: side menu hover effect
hrshmistry Apr 2, 2021
7ee9345
minor change
hrshmistry Apr 2, 2021
c8f4fad
minor changes
hrshmistry Apr 3, 2021
9fc5373
Update README.md
hrshmistry Apr 3, 2021
fcd0fce
fix: mobile responsiveness
hrshmistry Apr 3, 2021
94a40fa
Add files via upload
hrshmistry Apr 5, 2021
8c55942
Update README.md
hrshmistry Apr 5, 2021
691fbc6
style: added linear gradient to docs link
hrshmistry Jun 21, 2021
49534bf
style: added linear gradient to logo
hrshmistry Jun 21, 2021
9d52fb8
fix: broken url
hrshmistry Jun 21, 2021
be32ecd
minor change
hrshmistry Jun 21, 2021
db04f14
feat: added CND
hrshmistry Jun 22, 2021
9d10aff
fix: installation link
hrshmistry Jun 22, 2021
92984e8
feat: added floating action button and fixed meta tags
hrshmistry Aug 14, 2021
6b3726c
fix: images and bordertop
hrshmistry Aug 15, 2021
47c24b9
minor fix
hrshmistry Aug 16, 2021
019e12b
added smooth scroll
hrshmistry Apr 22, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}
Binary file added Assets/Compact-CSS_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Compact-CSS_favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/final_v1_gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 59 additions & 0 deletions Components/Alert/alert.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
@import url("/Util/util.css");

/* Alert */
.alert {
display: flex;
align-items: center;
justify-content: flex-start;
border-radius: 0.2rem;
margin: 0.5rem 0;
padding: 1rem;
}

.alert>p {
padding-left: 1rem;
}

.alert-info {
background-color: #DBEAFE;
color: #1E3A8A;
}

.alert-success {
background-color: #D1FAE5;
color: #064E3B;
}

.alert-warning {
background-color: #FEF3C7;
color: #78350F;
}

.alert-danger {
background-color: #FEE2E2;
color: #7F1D1D;
}

.outline-alert-info {
background-color: #DBEAFE;
color: #1E3A8A;
border: solid 1px #1E3A8A;
}

.outline-alert-success {
background-color: #D1FAE5;
color: #064E3B;
border: solid 1px #064E3B;
}

.outline-alert-warning {
background-color: #FEF3C7;
color: #78350F;
border: solid 1px #78350F;
}

.outline-alert-danger {
background-color: #FEE2E2;
color: #7F1D1D;
border: solid 1px #7F1D1D;
}
72 changes: 72 additions & 0 deletions Components/Alert/alert.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Alert</title>
<script src="https://kit.fontawesome.com/4dbfd910d5.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="/Alert/alert.css">
<link rel="stylesheet" href="/Components/Util/util.css">
</head>

<body style="display: flex; flex-direction: column; align-items: center;">
<div class="outer-div">
<h1>Alert</h1>
<div>Alerts are used to communicate a state that affects a system, feature or
page.</div>
<hr>
</div>
<h2>Simple Alert</h2>

<div class="outer-div cover">
<div class="alert alert-danger">
<i class="fas fa-exclamation-circle"></i>
<p>There was an error processing your request.</p>
</div>
<div class="alert alert-success">
<i class="fas fa-check-circle"></i>
<p>Data uploaded to the server. Fire on!</p>
</div>
<div class="alert alert-warning">
<i class="fas fa-exclamation-triangle"></i>
<p>Seems your account is about to expire.</p>
</div>
<div class="alert alert-info">
<i class="fas fa-info-circle"></i>
<p>Event is going live on July 30th. Get ready!</p>
</div>
</div>

<div class="outer-div">
<script src="https://gist.github.com/hrshmistry/33ade28c0651aedf63b33c22b85eb333.js"></script>
</div>

<h2>Outline Alert</h2>

<div class="outer-div cover">
<div class="alert outline-alert-danger">
<i class="fas fa-exclamation-circle"></i>
<p>There was an error processing your request.</p>
</div>
<div class="alert outline-alert-success">
<i class="fas fa-check-circle"></i>
<p>Data uploaded to the server. Fire on!</p>
</div>
<div class="alert outline-alert-warning">
<i class="fas fa-exclamation-triangle"></i>
<p>Seems your account is about to expire.</p>
</div>
<div class="alert outline-alert-info">
<i class="fas fa-info-circle"></i>
<p>Event is going live on July 30th. Get ready!</p>
</div>
</div>

<div class="outer-div">
<script src="https://gist.github.com/hrshmistry/6e2db63f5a209be952b51acc1085e0ff.js"></script>
</div>
</body>

</html>
75 changes: 75 additions & 0 deletions Components/Avatar/avatar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
@import url("/Util/util.css");

.avatar {
border-radius: 50%;
width: 50px;
height: 50px;
margin: 0 0.5rem;
Comment on lines +4 to +7

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to follow a particular sizing unit inside a class or inside an attribute. rem makes things more responsive whereas px doesn't.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing it makes sense to use rem most of the time. I will change accordingly.

}

.sm {
width: 30px;
height: 30px;
}

.md {
width: 50px;
height: 50px;
}

.lg {
width: 70px;
height: 70px;
}

.xl {
width: 90px;
height: 90px;
}

.xxl {
width: 110px;
height: 110px;
}

.avatar-badge {
border-radius: 50%;
width: 50px;
height: 50px;
margin: 0 0.5rem;
position: relative;
}

.badge-online {
width: 13px;
height: 13px;
border-radius: 50%;
border: solid 2px var(--badge-border);
background-color: var(--badge-online);
position: absolute;
bottom: 0rem;
left: 2.7rem;
}

.badge-dnd {
width: 13px;
height: 13px;
border-radius: 50%;
border: solid 2px var(--badge-border);
background-color: var(--badge-dnd);
position: absolute;
bottom: 0rem;
left: 2.7rem;
}

.badge-idle {
width: 13px;
height: 13px;
border-radius: 50%;
border: solid 2px var(--badge-border);
background-color: var(--badge-idle);
position: absolute;
bottom: 0rem;
left: 2.7rem;
}

76 changes: 76 additions & 0 deletions Components/Avatar/avatar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
https://bit.ly/2VTubQf<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Avatar</title>
<script src="https://kit.fontawesome.com/4dbfd910d5.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="/Button/button.css">
<link rel="stylesheet" href="/Avatar/avatar.css">
</head>

<body style="display: flex; flex-direction: column;">

<div id="avatar">
<h1>Avatar</h1>
<div class="sub-head">The Avatar component is used to represent a user, and displays the profile picture,
initials or fallback icon.
</div>
<hr>

<div class="pl-4">
<h2 class="mb-2">Usage</h2>

<div class="outer-div">
<img src="https://bit.ly/3yP5V06" alt="Tanay-Pratap" class="avatar">
<img src="https://bit.ly/dan-abramov" alt="dan-abramov" class="avatar">
<img src="https://bit.ly/kent-c-dodds" alt="kent-c-dodds" class="avatar">
<img src="https://bit.ly/code-beast" alt="code-beasto" class="avatar">
</div>

<div class="outer-div">
<script src="https://gist.github.com/hrshmistry/5a781a67ba94f66a03335005edba2906.js"></script>
</div>

<h2 class="mt-3 mb-2">Avatar Sizes</h2>

<div class="outer-div">
<img src="https://bit.ly/3yP5V06" alt="Tanay-Pratap" class="avatar sm">
<img src="https://bit.ly/3yP5V06" alt="Tanay-Pratap" class="avatar md">
<img src="https://bit.ly/3yP5V06" alt="Tanay-Pratap" class="avatar lg">
<img src="https://bit.ly/3yP5V06" alt="Tanay-Pratap" class="avatar xl">
<img src="https://bit.ly/3yP5V06" alt="Tanay-Pratap" class="avatar xxl">
</div>

<div class="outer-div">
<script src="https://gist.github.com/hrshmistry/b39369c63eb242f8e43ebeb17bb61c53.js"></script>
</div>

<h2 class="mt-3 mb-2">Avatar with badge</h2>

<div class="outer-div flex">
<div class="avatar-badge">
<img src="https://bit.ly/3yP5V06" alt="Tanay-Pratap" class="avatar">
<div class="badge-online"></div>
</div>
<div class="avatar-badge">
<img src="https://bit.ly/kent-c-dodds" alt="kent-c-dodds" class="avatar">
<div class="badge-dnd"></div>
</div>
<div class="avatar-badge">
<img src="https://bit.ly/code-beast" alt="code-beasto" class="avatar">
<div class="badge-idle"></div>
</div>
</div>

<div class="outer-div">
<script src="https://gist.github.com/hrshmistry/470a6ef8a26e23ee9b3a03f43360a061.js"></script>
</div>
</div>

</div>
</body>

</html>
51 changes: 51 additions & 0 deletions Components/Badge/badge.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
@import url("/Util/util.css");

.badge {
border-radius: 0.2rem;
background-color: #EDF2F7;
padding: 0.1rem 0.3rem;
font-weight: bold;
}

.badge-success {
background-color: #D1FAE5;
color: #064E3B;
}

.badge-removed {
background-color: #FEE2E2;
color: #7F1D1D;
}

.badge-new {
background-color: #DDD6FE;
color: #6D28D9 ;
}

.outline-badge {
border: solid 1px #A78BFA;
color: #A78BFA;
}

.solid-badge {
background-color: #A78BFA;
border: solid 1px #A78BFA;
color: white;
}

.subtle-badge {
background-color: #DDD6FE;
color: #6D28D9 ;
}

.sm-badge {
font-size: small;
}

.md-badge {
font-size: medium;
}

.lg-badge {
font-size: large;
}
Loading