Skip to content

Instantly share code, notes, and snippets.

@rudSarkar
Created August 28, 2019 14:22
Show Gist options
  • Save rudSarkar/b1c09c4e06b85cf5050293673740a72e to your computer and use it in GitHub Desktop.
Save rudSarkar/b1c09c4e06b85cf5050293673740a72e to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<title>Blood App</title>
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Jura&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Jura', sans-serif;
color: #343a40;
background-color: #f3f3f3;
}
.bg-red {
background: linear-gradient(#ED1F24, #e01217);
}
.bg-red .navbar-nav .nav-link {
color: #FFF;
text-shadow: 0 -1px rgba(0, 0, 0, 0.71);
}
.bg-red .nav-link:hover, .bg-red .nav-link:focus {
color: rgba(255, 255, 255, 0.85);
}
.border-right {
border-right: 1px solid rgba(0, 0, 0, 0.71);
}
.avatar-lg {
width: 58px;
height: 58px;
font-size: 0.7875rem;
}
.avatar {
color: #fff;
background-color: #707676;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 1rem;
border-radius: 50%;
height: 48px;
width: 48px;
}
.bg-gray {
background-color: #6c757d !important;
}
.avatar + .avatar-content {
display: inline-block;
margin-left: .75rem;
}
.text-primary {
color: #ED1F24 !important;
}
.btn-secondary {
color: #fff;
background: #ED1F24 linear-gradient(180deg, #ee3f43, #ED1F24) repeat-x;
border-color: #ED1F24;
box-shadow: rgba(0, 16, 46, 0.12) 0px 2px 6px, rgba(0, 0, 0, 0.08) 0px 1px 3px;
cursor: pointer;
}
.btn-secondary:hover {
background: #ED040A linear-gradient(180deg, #d72f33, #EC070D) repeat-x;
border: 1px solid #ED1F24;
box-shadow: rgba(0, 16, 46, 0.12) 0px 2px 6px, rgba(0, 0, 0, 0.08) 0px 1px 3px, 0 0 0 0 rgba(237, 31, 36, 0.5);
}
.btn-num {
color: #212529;
background: #ffd600 linear-gradient(180deg, #fdda24, #ffd600) repeat-x;
border-color: #ffd600;
box-shadow: rgba(0, 16, 46, 0.12) 0px 2px 6px, rgba(0, 0, 0, 0.08) 0px 1px 3px;
cursor: pointer;
}
.btn-reg {
color: #212529;
background: #ffd600 linear-gradient(180deg, #fdda24, #ffd600) repeat-x;
border-color: #ffd600;
box-shadow: rgba(0, 16, 46, 0.12) 0px 2px 6px, rgba(0, 0, 0, 0.08) 0px 1px 3px;
cursor: pointer;
}
.btn-reg:hover {
box-shadow: rgba(0, 16, 46, 0.12) 0px 2px 6px, rgba(0, 0, 0, 0.08) 0px 1px 3px;
}
.donor-list {
border-bottom: 1px solid rgba(0,0,0,.1);
}
.rounded{
transition: .5s;
}
.rounded:hover {
background: #e9ecef;
transition: .5s;
}
.mb-1, .my-1 {
margin-bottom: 0.25rem !important;
}
.btn-block {
display: block;
width: 100%;
}
.align-items-lg-center {
align-items: center !important;
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-red">
<div class="container">
<a class="navbar-brand" href="/">BloodApp</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="/login">
<i class="fa fa-user" aria-hidden="true"></i>
Login
</a>
</li>
<li class="nav-item">
<a class="btn btn-reg btn-block" href="/regiser">
Register as Blood Donor
</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- lists and search -->
<div class="container">
<div class="row">
<div class="col-md-3 mt-5 bg-white border-right p-3">
<div class="p-2">
<span class="text-dark font-weight-bold">Search Donor</span>
<hr/>
<div class="py-3">
<select class="form-control input-group-responsive">
<option value="A+">A+ Positive (+)</option>
<option value="A-">A- Negative (-)</option>
<option value="B+">B+ Positive (+)</option>
<option value="B-">B- Negative (-)</option>
<option value="AB+">AB+ Positive (+)</option>
<option value="AB-">AB- Negative (-)</option>
<option value="O+">O+ Positive (+)</option>
<option value="O-">O- Negative (-)</option>
</select>
</div>
<div class="py-1">
<button type="submit" class="btn btn-sm btn-secondary">Search</button>
</div>
</div>
</div>
<div class="col-md-9 mt-5 bg-white p-3">
<div class="p-2">
<span class="text-dark font-weight-bold">Lists Of Donors</span>
<hr/>
</div>
<div class="py-3 px-2 my-1 d-block rounded donor-list">
<div class="row row-align-items-center">
<div class="col-md-9 col-12">
<div class="d-flex align-items-center">
<span class="avatar avatar-lg bg-gray">
<span class="lead">A+</span>
</span>
<div class="avatar-content">
<h5 class="mb-1 text-primary donor-title">
User Name
</h5>
<span class="d-block text-muted">
<i class="fa fa-map-marker" style="color: green;"></i>
<span class="text-dark font-weight-bold">Tejgaon</span> ,
<i class="fa fa-tint" style="color: red;"></i>
<span class="text-dark font-weight-bold">Last Donated: 10-08-2019</span>
</span>
</div>
</div>
</div>
<div class="col-md-3 py-2 text-right d-sm-block">
<span class="btn btn-sm btn-num phonenumber">01710000007</span>
</div>
</div>
</div>
<div class="py-3 px-2 my-1 d-block rounded donor-list">
<div class="row row-align-items-center">
<div class="col-md-9 col-12">
<div class="d-flex align-items-center">
<span class="avatar avatar-lg bg-gray">
<span class="lead">A+</span>
</span>
<div class="avatar-content">
<h5 class="mb-1 text-primary donor-title">
User Name
</h5>
<span class="d-block text-muted">
<i class="fa fa-map-marker" style="color: green;"></i>
<span class="text-dark font-weight-bold">Tejgaon</span> ,
<i class="fa fa-tint" style="color: red;"></i>
<span class="text-dark font-weight-bold">Last Donated: 10-08-2019</span>
</span>
</div>
</div>
</div>
<div class="col-md-3 py-2 text-right d-sm-block">
<span class="btn btn-sm btn-num phonenumber">01780000005</span>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- script -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script>
$(document).ready(function() {
var phonenumbers = [];
$(".phonenumber").each(function(i) {
phonenumbers.push($(this).text());
var newcontent = $(this).text().substr(0, $(this).text().length - 4)
$(this).text(newcontent+"XXXX");
$(this).bind("click", function() {
if ($(this).text() == phonenumbers[i]) {
//alert("Showing button");
$(this).text(phonenumbers[i].substr(0, phonenumbers[i].length - 4)+"XXXX");
} else {
$(".phonenumber").each(function(x) {
if ($(this).text() == phonenumbers[x]) {
$(this).text(phonenumbers[x].substr(0, phonenumbers[x].length - 4));
}
});
//alert("Reverting");
//$(this).text(phonenumbers[i]);
$('.btn-num').before('<a class="btn btn-secondary btn-sm" href="/regiser">Register Require</a>');
$('.btn-num').remove();
}
});
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment