Inside blade
Popup.css
popup.js
@section('csssec')
<link rel="stylesheet" href="{{ asset('assets/popup.css') }}">
@endsection
@section('jssec')
<script src="{{ asset('assets/popup.js') }}"></script>
@endsection
<div class="load-popup">
<div class="popup-body">
<div class="card-header">
<h4>Title</h4><br>
<p>Description</p>
</div>
<div class="content">
{{-- <img src="{{asset('/banner_upload/'.$banner->image)}}" alt="report"> --}}
<h1>Content will be here</h1>
</div>
<span class="close-icon"><i class="fa fa-close"></i></span>
</div>
</div>
<div class="popup-icon">
<span><i class="fa fa-reply"></i></span>
</div>
Popup.css
.popup-icon {
position: fixed;
top: 50%;
right: 0;
z-index: 10001;
width: 50px;
height: 50px;
text-align: center;
line-height: 50px;
color: #ffffff;
border-radius: 30px 0 0 30px;
background-color: #e10707;
display: none;
cursor: pointer;
-webkit-animation: pulse 1.5s infinite;
-moz-animation: pulse 1.5s infinite;
animation: pulse 1.5s infinite; }
@-webkit-keyframes pulse {
0% {
-webkit-box-shadow: 0 0 0 0 rgba(255, 7, 7, 0.5); }
70% {
-webkit-box-shadow: 0 0 0 0 rgba(255, 7, 7, 0.5); }
100% {
-webkit-box-shadow: 0 0 0 0 rgba(255, 7, 7, 0.5); } }
@keyframes pulse {
0% {
-moz-box-shadow: 0 0 0 0 rgba(255, 7, 7, 0.5);
box-shadow: 0 0 0 0 rgba(255, 7, 7, 0.5); }
70% {
-moz-box-shadow: 0 0 0 10px rgba(255, 7, 7, 0.5);
box-shadow: 0 0 0 10px rgba(255, 7, 7, 0.5); }
100% {
-moz-box-shadow: 0 0 0 0 rgba(255, 7, 7, 0.5);
box-shadow: 0 0 0 0 rgba(255, 7, 7, 0.5); } }
@media screen and (max-width: 480px) {
.popup-icon {
display: none !important; } }
.load-popup {
display: none;
position: fixed;
z-index: 10001;
left: 0;
top: 0;
height: 100%;
width: 100%;
overflow: auto;
background-color: rgba(0, 0, 0, 0.6); }
.load-popup .popup-body {
height: auto;
width: 80%;
max-width: 600px;
margin: 5% auto;
display: block;
border-radius: 8px;
-moz-box-shadow: 0 0 5px #000;
-webkit-box-shadow: 0 0 5px #000;
box-shadow: 0 0 5px #000;
padding: 20px;
background-color: #ffffff;
position: relative; }
.load-popup .popup-body .content {
text-align: center; }
.load-popup .popup-body .close-icon {
position: absolute;
right: -20px;
top: -20px;
width: 40px;
height: 40px;
text-align: center;
line-height: 40px;
color: #ffffff;
background-color: #e10707;
border-radius: 50%;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-ms-border-radius: 50%;
z-index: 10002;
cursor: pointer; }
.load-popup .popup-body .popup-btn {
margin-top: 15px; }
popup.js
(function(jQuery) {
"use strict";
$(window).on('load', function() {
$('.load-popup').fadeIn(5000);
});
$(document).ready(function() {
/*====================================
// close popup
======================================*/
$('.close-icon').on('click', function() {
$('.load-popup').fadeOut(200);
$('.popup-icon').fadeIn();
});
/*====================================
// popup icon
======================================*/
$('.popup-icon').on('click', function() {
$('.load-popup').fadeIn(200);
$('popup-icon').fadeOut();
})
});
})(jQuery);
Comments
Post a Comment