mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-11-30 23:37:16 +01:00
Use fullscreen modal on small screen. Issue #23
This commit is contained in:
@@ -148,7 +148,7 @@
|
|||||||
|
|
||||||
.modal-note-background {
|
.modal-note-background {
|
||||||
position: fixed; /* Stay in place */
|
position: fixed; /* Stay in place */
|
||||||
z-index: 200; /* Sit on top */
|
z-index: 1051; /* Sit on top */
|
||||||
padding-top: 100px; /* Location of the box */
|
padding-top: 100px; /* Location of the box */
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|||||||
13
js/script.js
13
js/script.js
@@ -267,11 +267,18 @@ View.prototype = {
|
|||||||
|
|
||||||
note.css({"opacity": "0.1"});
|
note.css({"opacity": "0.1"});
|
||||||
|
|
||||||
|
var windowWidth = $(window).width();
|
||||||
|
var modalWidth = note.width()*2;
|
||||||
|
var modalTop = 150;
|
||||||
|
if (windowWidth < modalWidth) {
|
||||||
|
modalWidth = windowWidth;
|
||||||
|
modalTop = 50;
|
||||||
|
}
|
||||||
$(".modal-content").animate (
|
$(".modal-content").animate (
|
||||||
{
|
{
|
||||||
left: ($(window).width() / 2 - note.width()),
|
left: (windowWidth / 2 - modalWidth / 2),
|
||||||
width: note.width()*2,
|
width: modalWidth,
|
||||||
top: 150,
|
top: modalTop,
|
||||||
},
|
},
|
||||||
250,
|
250,
|
||||||
function () {
|
function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user