added overlay...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-03-05 15:00:20 +04:00
parent 5d36a08005
commit d641ad08b6
2 changed files with 96 additions and 1 deletions

View File

@ -52,6 +52,46 @@
} }
*/ */
/* overlay... */
.overlay {
display: block;
position: fixed;
z-index: 999999;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
}
.overlay > div:first-child {
position: absolute;
display: block;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
opacity: 0.7;
cursor: hand;
}
.overlay > div:last-child {
position: absolute;
left: 0px;
top: 50%;
width: 100%;
height: 50%;
margin-top: -20%;
text-align: center;
opacity: 0.9;
box-shadow: 5px 5px 200px 30px black;
}
</style> </style>
<script src="ext-lib/jquery.js"></script> <script src="ext-lib/jquery.js"></script>
@ -85,6 +125,30 @@ CKEDITOR.disableAutoInline = true
<script> <script>
function showInOverlay(text){
$('.overlay').remove()
var overlay = $('<div class="overlay"><div/><div/></div>')
.css({display: 'none'})
overlay.children().first().click(function(){
overlay.fadeOut()
})
overlay.children().last().append(text)
// add the overlay...
overlay
.appendTo($('.chrome'))
.fadeIn()
}
function showInfo(){
showInOverlay($(
'<div>'+
'<h1>Portable Mag</h1>'+
'<p>licence and copyright info goes here...</p>'+
'</div>'))
}
$(document).ready(function(){ $(document).ready(function(){
// general window behavior... // general window behavior...
@ -95,6 +159,13 @@ $(document).ready(function(){
// keyboard... // keyboard...
$(document) $(document)
.keydown(makeKeyboardHandler({ .keydown(makeKeyboardHandler({
'.overlay': {
Esc: function(){
$('.overlay').fadeOut()
return false
},
},
// ignore all keys except Esc here... // ignore all keys except Esc here...
'.inline-editor-mode': { '.inline-editor-mode': {
//ignore: '*' //ignore: '*'
@ -281,7 +352,7 @@ $(document).ready(function(){
</a> </a>
</div> </div>
<div class="button info"> <div class="button info">
<a href="javascript:alert('not implemented yet...')"> <a href="javascript:showInfo()">
<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"> <svg width="40" height="40" xmlns="http://www.w3.org/2000/svg">
<g> <g>
<title>Info</title> <title>Info</title>

View File

@ -109,6 +109,14 @@
color: gray; color: gray;
} }
.overlay > div:first-child {
background: #555;
}
.overlay > div:last-child {
color: white;
background: #555;
box-shadow: 5px 5px 200px 30px #555;
}
@ -186,6 +194,14 @@
background: red; background: red;
} }
.light-viewer .overlay > div:first-child {
background: white;
}
.light-viewer .overlay > div:last-child {
color: gray;
background: white;
box-shadow: 5px 5px 200px 30px #eee;
}
/***************************************************** dark viewer ***/ /***************************************************** dark viewer ***/
@ -262,6 +278,14 @@
background: red; background: red;
} }
.dark-viewer .overlay > div:first-child {
background: black;
}
.dark-viewer .overlay > div:last-child {
color: white;
background: black;
box-shadow: 5px 5px 200px 30px black;
}
/******************************************************* Magazine ****/ /******************************************************* Magazine ****/