mirror of
https://github.com/flynx/PortableMag.git
synced 2025-11-01 04:20:20 +00:00
added cover/end hints before and after the magazine...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
aeb942c2c1
commit
46a86b3526
8
TODO.otl
8
TODO.otl
@ -1,4 +1,4 @@
|
|||||||
[_] 29% Priority work
|
[_] 35% Priority work
|
||||||
[_] 50% general todo
|
[_] 50% general todo
|
||||||
[_] make layer default state configurable...
|
[_] make layer default state configurable...
|
||||||
| e.g. setting "shown"/"hidden" classes in HTML and adding
|
| e.g. setting "shown"/"hidden" classes in HTML and adding
|
||||||
@ -45,7 +45,7 @@
|
|||||||
[_] 0% issue download
|
[_] 0% issue download
|
||||||
[_] whole edition dowload and update (primary mode)
|
[_] whole edition dowload and update (primary mode)
|
||||||
[_] seporate issue download (secondary)
|
[_] seporate issue download (secondary)
|
||||||
[_] 0% stage 2 - templates and examples
|
[_] 25% stage 2 - templates and examples
|
||||||
[_] 0% default cover templates
|
[_] 0% default cover templates
|
||||||
[_] 0% default page templates
|
[_] 0% default page templates
|
||||||
| a template is a class and predefined content...
|
| a template is a class and predefined content...
|
||||||
@ -70,8 +70,8 @@
|
|||||||
[_] text with title
|
[_] text with title
|
||||||
[_] text with image
|
[_] text with image
|
||||||
[_] plain
|
[_] plain
|
||||||
[_] 0% default actions
|
[X] 100% default actions
|
||||||
[_] show in overlay
|
[X] show/hide layer
|
||||||
[_] 0% stage 3 - advanced features
|
[_] 0% stage 3 - advanced features
|
||||||
[_] 0% edition editor / publisher
|
[_] 0% edition editor / publisher
|
||||||
[_] create/delete edition
|
[_] create/delete edition
|
||||||
|
|||||||
@ -30,7 +30,7 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
$('.viewer')
|
$('.viewer')
|
||||||
.swipe({
|
.swipe({
|
||||||
swipeStatus: swipeUpdate,
|
swipeStatus: swipeHandler,
|
||||||
// XXX change this to pinch...
|
// XXX change this to pinch...
|
||||||
swipeUp: function(){
|
swipeUp: function(){
|
||||||
//togglePageView('off')
|
//togglePageView('off')
|
||||||
@ -74,6 +74,8 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
fingers: $.fn.swipe.fingers.ALL
|
fingers: $.fn.swipe.fingers.ALL
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// XXX do we need these here??
|
||||||
$('.button.cover').swipe({click: goToMagazineCover})
|
$('.button.cover').swipe({click: goToMagazineCover})
|
||||||
$('.button.next-article').swipe({click: nextArticle})
|
$('.button.next-article').swipe({click: nextArticle})
|
||||||
$('.button.prev-article').swipe({click: prevArticle})
|
$('.button.prev-article').swipe({click: prevArticle})
|
||||||
@ -141,8 +143,8 @@ $(document).ready(function(){
|
|||||||
<a href="#1">Page #1</a><br>
|
<a href="#1">Page #1</a><br>
|
||||||
<a href="#ArticleAnchorExample">Named page</a><br>
|
<a href="#ArticleAnchorExample">Named page</a><br>
|
||||||
<p>
|
<p>
|
||||||
<a href="#page-3-anchor">Anchor on page #3</a><br>
|
<a href="#page-3-anchor" style="pointer-events:none">Anchor on page #3</a><br>
|
||||||
<i>BUG: currently navigation via existing anchors
|
<i> currently navigation via existing anchors
|
||||||
will break the layout, so use the name attribute
|
will break the layout, so use the name attribute
|
||||||
on any other tags (see example).
|
on any other tags (see example).
|
||||||
</i>
|
</i>
|
||||||
|
|||||||
45
magazine.css
45
magazine.css
@ -125,6 +125,51 @@ body {
|
|||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.magazine:before {
|
||||||
|
position: absolute;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
height: 300px;
|
||||||
|
width: 600px;
|
||||||
|
left: -300px;
|
||||||
|
top: -50%;
|
||||||
|
|
||||||
|
content: 'COVER';
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 150px;
|
||||||
|
|
||||||
|
color: #888;
|
||||||
|
|
||||||
|
-webkit-transform: rotate(-90deg);
|
||||||
|
-moz-transform: rotate(-90deg);
|
||||||
|
-o-transform: rotate(-90deg);
|
||||||
|
-ms-transform: rotate(-90deg);
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
}
|
||||||
|
.magazine:after {
|
||||||
|
position: absolute;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
height: 300px;
|
||||||
|
width: 600px;
|
||||||
|
right: -450px;
|
||||||
|
top: -50%;
|
||||||
|
|
||||||
|
content: 'END';
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 150px;
|
||||||
|
|
||||||
|
color: #888;
|
||||||
|
|
||||||
|
-webkit-transform: rotate(-90deg);
|
||||||
|
-moz-transform: rotate(-90deg);
|
||||||
|
-o-transform: rotate(-90deg);
|
||||||
|
-ms-transform: rotate(-90deg);
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
}
|
||||||
|
|
||||||
.article {
|
.article {
|
||||||
width: auto;
|
width: auto;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
|
|||||||
@ -314,7 +314,7 @@ function fitPagesToContent(n){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function swipeUpdate(evt, phase, direction, distance, duration, fingers){
|
function swipeHandler(evt, phase, direction, distance, duration, fingers){
|
||||||
var pages = $('.page')
|
var pages = $('.page')
|
||||||
var cur = $('.current.page')
|
var cur = $('.current.page')
|
||||||
var n = pages.index(cur)
|
var n = pages.index(cur)
|
||||||
@ -421,7 +421,7 @@ function goToArticleCover(){
|
|||||||
|
|
||||||
function nextArticle(){
|
function nextArticle(){
|
||||||
var cur = $('.current.page').parents('.article')
|
var cur = $('.current.page').parents('.article')
|
||||||
// we are at the magazine cover cover...
|
// we are at the magazine cover...
|
||||||
if(cur.length == 0){
|
if(cur.length == 0){
|
||||||
return setCurrentPage(
|
return setCurrentPage(
|
||||||
$('.article .page:first-child').first())
|
$('.article .page:first-child').first())
|
||||||
@ -437,9 +437,10 @@ function nextArticle(){
|
|||||||
// XXX this is almost exactly the same as nextArticle...
|
// XXX this is almost exactly the same as nextArticle...
|
||||||
function prevArticle(){
|
function prevArticle(){
|
||||||
var cur = $('.current.page').parents('.article')
|
var cur = $('.current.page').parents('.article')
|
||||||
// we are at the magazine cover cover...
|
// we are at the magazine cover...
|
||||||
if(cur.length == 0){
|
if(cur.length == 0){
|
||||||
return $('.current.page')
|
//return $('.current.page')
|
||||||
|
return setCurrentPage()
|
||||||
}
|
}
|
||||||
// just find the prev one...
|
// just find the prev one...
|
||||||
var articles = $('.article')
|
var articles = $('.article')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user