JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.jquery.com/ui/1.11.3/jquery-ui.min.js"></script>
<div id = "window" data-ismaximized = "false">
<div id = "header">
<div id = "left">
<table id = "title">
<tr>
<td>
<img src = "https://openmerchantaccount.com/img/chromeico.png" alt = "()" id = "chromeico" />
</td>
<td id = "windowtitle"><span>Untitled - Google Chrome</span></td>
</tr>
</table>
</div>
<div id = "right">
<table id = "buttons">
<tr>
<td>
<div id = "underscore"></div>
</td>
<td>
<div id = "max">
<div id = "max_inner">
</div>
</div>
</td>
<td>
<span>X</span>
</td>
</tr>
</table>
</div>
</div>
<div id = "content">
<div id = "address">
<table id = "address_table">
<tr>
<td>
<div id = "paper">
<div id = "paper_corner">
</div>
</div>
</td>
<td>
<span id = "about">about:</span><span id = "blank">blank</span>
</td>
</tr>
</table>
</div>
<div id = "inner_content">
<p>This is a very legit Windows 7 Google Chrome popup!</p>
<img src = "https://openmerchantaccount.com/img/clippy.jpg" alt = "<< There should be image of a clippy here >>" />
</div>
</div>
</div>
CSS
*
{
margin: 0;
padding: 0;
}
html, body
{
width: 100%;
height: 100%;
}
body
{
font-family: "Segoe UI";
overflow: hidden;
background-image: url('https://openmerchantaccount.com/img/winppr.jpg');
background-size: cover;
background-repeat: no-repeat;
}
#chromeico
{
width: 15px;
height: 15px;
vertical-align: middle;
padding-bottom: 1px;
}
#window
{
position: absolute;
width: 235px;
height: 180px;
border: 1px solid black;
left: 50px;
top: 50px;
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border-radius: 7px;
-webkit-box-shadow: 2px 2px 20px 1px rgba(0,0,0,0.95);
-moz-box-shadow: 2px 2px 20px 1px rgba(0,0,0,0.95);
box-shadow: 2px 2px 20px 1px rgba(0,0,0,0.95);
background-color: rgba(249, 249, 249, 0.5);
}
.window_closing
{
-ms-transform-origin: 50% 50%;
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-ms-transform: scale(0.95, 0.95);
-webkit-transform: scale(0.95, 0.95);
transform: scale(0.95, 0.95);
opacity: 0;
-webkit-transition: all 0.2s;
transition: all 0.2s;
}
/*#window::before
{
content:"";
position:absolute;
height:100%;
width:100%;
z-index:-1;
top:0;
left:0;
background: white;
background-color: rgba(249, 249, 249, 0.7);
filter:blur(14px);
-o-filter:blur(14px);
-ms-filter:blur(14px);
-moz-filter:blur(14px);
-webkit-filter:blur(14px);
}*/
#window > *
{
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
#header
{
width: calc(100% - 16px);
height: 30px;
margin-left: auto;
margin-right: auto;
}
#header > #left
{
float: left;
width: calc(100% - 8px - 115px);
}
#title
{
width: 100%;
}
#title tr td:first-child
{
width: 15px;
max-width: 0;
}
#title tr...
JavaScript
//window.open("", "", "width=235, height=180");
$(document).ready(function()
{
var $window = $('#window');
$window.draggable(
{
addClasses: false,
handle: '#header',
cancel: '#buttons'
});
$(document).on('click', '#buttons td:first-child', function()
{
$window.animate(
{
left: '0px',
top: '1000px',
width: '0px',
height: '0px',
opacity: 0
}, 350);
});
var lastx = 50;
var lasty = 50;
$(document).on('click', '#buttons td:nth-child(2)', function()
{
if($window.data('ismaximized') == true)
{
$window.data('ismaximized', false);
$window.animate(
{
left: lastx + 'px',
top: lasty + 'px',
width: '235px',
height: '180px',
}, 25);
}
else
{
var fullw = $(window).width();
var fullh = $(window).height();
lastx = $window.offset().left;
lasty = $window.offset().top;
$window.data('ismaximized', true);
$window.animate(
{
left: '0px',
top: '0px',
width: fullw + 'px',
height: fullh + 'px',
}, 25);
}
});
$(document).on('click', '#buttons td:last-child', function()
{
$window.addClass('window_closing');
});
});