-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7f5397a
commit e2823ca
Showing
7 changed files
with
377 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
@import url(../style.css); | ||
|
||
.avatar { | ||
height: 32px; | ||
width: 32px; | ||
} | ||
|
||
.avatar-xl { | ||
height: 48px; | ||
width: 48px; | ||
} | ||
|
||
.avatar-xxl { | ||
height: 64px; | ||
width: 64px; | ||
} | ||
|
||
.avatar-round { | ||
border-radius: 50%; | ||
} | ||
|
||
.avatar-square { | ||
border-radius: 10%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!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> | ||
<link rel="stylesheet" href="avatar.css"> | ||
</head> | ||
<body> | ||
|
||
<img class="avatar avatar-round" src="avatar.svg" alt="avatar"> | ||
<img class="avatar-xl avatar-round" src="avatar.svg" alt="avatar"> | ||
<img class="avatar-xxl avatar-round" src="avatar.svg" alt="avatar"> | ||
|
||
<div><br></div> <div><br></div> | ||
|
||
<img class="avatar avatar-square" src="avatar.svg" alt="avatar"> | ||
<img class="avatar-xl avatar-square" src="avatar.svg" alt="avatar"> | ||
<img class="avatar-xxl avatar-square" src="avatar.svg" alt="avatar"> | ||
|
||
|
||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
@import url(../style.css); | ||
@import url(../avatar/avatar.css); | ||
|
||
.icon-with-badge { | ||
position: relative; | ||
width: fit-content; | ||
} | ||
|
||
.badge { | ||
position: absolute; | ||
top: -0.7rem; | ||
right: -0.7rem; | ||
color: white; | ||
height: 1.25rem; | ||
width: 1.5rem; | ||
padding: 0.375rem; | ||
text-align: center; | ||
border-radius: 50%; | ||
} | ||
|
||
.red { | ||
background-color: var(--danger); | ||
} | ||
|
||
.blue { | ||
background-color: var(--secondary); | ||
} | ||
|
||
.dark-blue { | ||
background-color: var(--primary); | ||
} | ||
|
||
.yellow { | ||
background-color: var(--warning); | ||
} | ||
|
||
.green { | ||
background-color: var(--success); | ||
} | ||
|
||
.avatar-with-badge { | ||
position: relative; | ||
width: max-content; | ||
} | ||
|
||
.badge-avatar { | ||
position: absolute; | ||
bottom: 0; | ||
right: 0; | ||
padding: .375rem; | ||
border-radius: 50%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>badge</title> | ||
<link rel="stylesheet" href="badge.css"> | ||
<style> | ||
|
||
/* ONLY FOR DISPLAY PURPOSES. NOT PART OF COMPONENT */ | ||
|
||
.badge-on-icon, .badge-on-avatar { | ||
display: flex; | ||
gap: 2rem; | ||
padding: 2rem; | ||
} | ||
|
||
</style> | ||
</head> | ||
<body> | ||
|
||
<div class="badge-on-icon"> | ||
|
||
<div class="icon-with-badge"> | ||
<img src="chat_black_48dp.svg" alt="chat icon with badge"> | ||
<span class="badge red">5</span> | ||
</div> | ||
|
||
<div class="icon-with-badge"> | ||
<img src="chat_black_48dp.svg" alt="chat icon with badge"> | ||
<div class="badge blue">13</div> | ||
</div> | ||
|
||
<div class="icon-with-badge"> | ||
<img src="chat_black_48dp.svg" alt="chat icon with badge"> | ||
<div class="badge dark-blue">2</div> | ||
</div> | ||
|
||
<div class="icon-with-badge"> | ||
<img src="chat_black_48dp.svg" alt="chat icon with badge"> | ||
<div class="badge yellow">13</div> | ||
</div> | ||
|
||
<div class="icon-with-badge"> | ||
<img src="chat_black_48dp.svg" alt="chat icon with badge"> | ||
<div class="badge green">56</div> | ||
</div> | ||
|
||
</div> | ||
|
||
<div class="badge-on-avatar"> | ||
|
||
<div class="avatar-with-badge"> | ||
<img class="avatar avatar-round" src="avatar.svg" alt="avatar"> | ||
<div class="badge-avatar green"> </div> | ||
</div> | ||
|
||
<div class="avatar-with-badge"> | ||
<img class="avatar avatar-round" src="avatar.svg" alt="avatar"> | ||
<div class="badge-avatar red"> </div> | ||
</div> | ||
|
||
<div class="avatar-with-badge"> | ||
<img class="avatar avatar-round" src="avatar.svg" alt="avatar"> | ||
<div class="badge-avatar yellow"> </div> | ||
</div> | ||
|
||
</div> | ||
|
||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.