mirror of
https://github.com/flynx/PortableMag.git
synced 2025-10-29 03:00:09 +00:00
added bookmark active zone in upper-right corner of page...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
47373dc251
commit
fc7c48bf2e
3
TODO.otl
3
TODO.otl
@ -5,7 +5,7 @@
|
||||
| touchdown point.
|
||||
[_] BUG: no drag threshold on excludedElements (TouchSwipe)
|
||||
| stalled...
|
||||
[_] 76% general todo
|
||||
[_] 75% general todo
|
||||
[_] add templates...
|
||||
| elements that will get generated content, like page numbers etc.
|
||||
[_] BUG: initial load on android does not center on the correct page...
|
||||
@ -23,6 +23,7 @@
|
||||
| something like a page reset that will restore the default state,
|
||||
| rather than the current "hideLayers"
|
||||
[_] make corners clickable for bookmarking...
|
||||
[X] bookmark active zone in upper-right corner of page...
|
||||
[X] SVG icons and logo...
|
||||
[X] add page numbers...
|
||||
[X] 100% bookmarks
|
||||
|
||||
@ -109,6 +109,7 @@ $(document).ready(function(){
|
||||
// load state and setup everything that depends on it...
|
||||
loadState()
|
||||
setupNavigator()
|
||||
setupBookmarkTouchZones()
|
||||
|
||||
// set default view...
|
||||
togglePageView('on')
|
||||
|
||||
14
magazine.css
14
magazine.css
@ -78,7 +78,7 @@ body {
|
||||
|
||||
cursor: hand;
|
||||
|
||||
z-index: 9999;
|
||||
z-index: 8888;
|
||||
opacity: 0,5;
|
||||
|
||||
-webkit-transform: rotate(-45deg);
|
||||
@ -93,6 +93,18 @@ body {
|
||||
-ms-transition: all 0.2s ease;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.page .bookmark-toggler {
|
||||
position: absolute;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
|
||||
right: 0px;
|
||||
top: 0px;
|
||||
|
||||
cursor: hand;
|
||||
|
||||
z-index: 9999;
|
||||
}
|
||||
.page-view-mode .page {
|
||||
|
||||
/* XXX change to relative units... */
|
||||
|
||||
18
magazine.js
18
magazine.js
@ -411,9 +411,27 @@ function prevArticle(){
|
||||
|
||||
/******************************************************* bookmarks ***/
|
||||
|
||||
// setup bookmarking active zones in page...
|
||||
function setupBookmarkTouchZones(){
|
||||
$('.bookmark-toggler').remove()
|
||||
var page = $('.page')
|
||||
page.each(function(i, e){
|
||||
$('<div/>')
|
||||
.prependTo(e)
|
||||
.addClass('bookmark-toggler')
|
||||
.attr({
|
||||
title: 'Toggle bookmark (B)'
|
||||
})
|
||||
.click(function(){
|
||||
toggleBookmark(i)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// load bookmarks from list...
|
||||
function loadBookmarks(lst){
|
||||
clearBookmarks()
|
||||
// setup set bookmarks...
|
||||
$(lst).each(function(i, e){toggleBookmark(e)})
|
||||
}
|
||||
// build bookmark list...
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user