make bookmarks visible in full screen + some restyling...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-01-29 03:05:42 +04:00
parent aeb5a85cfd
commit 95cd7aaab8
3 changed files with 35 additions and 14 deletions

View File

@ -40,14 +40,20 @@ $(document).ready(function(){
.swipe({ .swipe({
swipeStatus: swipeHandler, swipeStatus: swipeHandler,
// XXX change this to pinch... // XXX change this to pinch...
swipeUp: function(){ swipeUp: function(event, direction, distance, duration, fingerCount){
//togglePageView('off') if(fingerCount == 2){
togglePageView() toggleBookmark()
} else {
togglePageView()
}
}, },
// XXX change this to pinch... // XXX change this to pinch...
swipeDown: function(){ swipeDown: function(event, direction, distance, duration, fingerCount){
//togglePageView('on') if(fingerCount == 2){
togglePageView() toggleBookmark()
} else {
togglePageView()
}
}, },
pinchIn: function(event, direction, distance, duration, fingerCount, pinchZoom) { pinchIn: function(event, direction, distance, duration, fingerCount, pinchZoom) {

View File

@ -22,6 +22,7 @@ body {
/*********************************************************** pages ***/ /*********************************************************** pages ***/
.page { .page {
/* XXX make this browser-sized... */ /* XXX make this browser-sized... */
position: relative;
display: inline-block; display: inline-block;
vertical-align: bottom; vertical-align: bottom;
text-align: left; text-align: left;
@ -68,14 +69,13 @@ body {
.page .bookmark { .page .bookmark {
position: absolute; position: absolute;
font-size: 0px; font-size: 0px;
width: 50px; width: 100px;
height: 50px; height: 100px;
background: red; background: red;
/* XXX make this relative... */ right: -60px;
margin-top: -50px; top: -60px;
margin-left: 750px;
cursor: hand; cursor: hand;
@ -87,8 +87,13 @@ body {
-o-transform: rotate(45deg); -o-transform: rotate(45deg);
-ms-transform: rotate(45deg); -ms-transform: rotate(45deg);
transform: rotate(45deg); transform: rotate(45deg);
}
-webkit-transition: all 0.2s ease;
-moz-transition: all 0.2s ease;
-o-transition: all 0.2s ease;
-ms-transition: all 0.2s ease;
transition: all 0.2s ease;
}
.page-view-mode .page { .page-view-mode .page {
/* XXX change to relative units... */ /* XXX change to relative units... */
@ -99,8 +104,14 @@ body {
} }
.page-view-mode .page .bookmark { .page-view-mode .page .bookmark {
display: none; right: -70px;
top: -70px;
opacity: 0.5;
} }
.page-view-mode .page .bookmark.justcreated {
opacity: 1;
}
/************************************************** general layout ***/ /************************************************** general layout ***/

View File

@ -720,11 +720,15 @@ function toggleBookmark(n){
if(cur.children('.bookmark').length == 0){ if(cur.children('.bookmark').length == 0){
var res = $('<div/>') var res = $('<div/>')
.prependTo(cur) .prependTo(cur)
.addClass('bookmark') .addClass('bookmark justcreated')
.click(function(){ .click(function(){
toggleBookmark(n) toggleBookmark(n)
}) })
setTimeout(function(){
res.removeClass('justcreated')
}, 1000)
makeBookmarkIndicator(n) makeBookmarkIndicator(n)
} else { } else {
cur.children('.bookmark').remove() cur.children('.bookmark').remove()