diff --git a/index.html b/index.html index fbbfd86..c18a7a9 100755 --- a/index.html +++ b/index.html @@ -25,7 +25,22 @@ $(document).ready(function(){ $(window) .resize(function() { - fitNPages(PAGES_VISIBLE) + // XXX might be good to compensate for document zoom... + if(document.width/$(document).width() != 1){ + // XXX scale the page... + console.log('>>> Page Zoom:', document.width/$(document).width()) + } + //$('.splash').show() + if(ANIMATE_WINDOW_RESIZE){ + togglePageView(togglePageView('?')) + } else { + unanimated( + $('.scaler'), + togglePageView, + 30 + )(togglePageView('?')) + } + //$('.splash').fadeOut() }) .bind('hashchange', function(e){ e.preventDefault() @@ -134,52 +149,12 @@ $(document).ready(function(){
-

Magazine Cover

-
-

Finger controls

-
    -
  • Single finger swipe left/right – prev/next page. -
  • Two finger swipe left/right – prev/next article. -
  • Single finger swipe up/down – toggle thumbnail view. -
  • Pinch in/out – go in/out of thumbnail view. -
-

Navigation via #URLs

-

The basics

- Page #1
- Named page
-

- Anchor on page #3
- currently navigation via existing anchors - will break the layout, so use the name attribute - on any other tags (see example). - -

-
- -
-

Special anchors

-

These show up in the page URL

- Magazine cover
- Last page
- Thumbnail view
- Toggle a hidden layer
- - -

Relative special anchors

-

These will get replaced by corresponding page numbers in the URL

- Next page
- Previous page
- Next article
- Previous article
-
- - - +

PortableMag

+

+ [PROJECT DESCRIPTION] +

+ The navigation...
+ The anatomy...
@@ -188,36 +163,130 @@ $(document).ready(function(){
-

Article Cover

- home
- some more text... +

The Basics...

+
+ get started...
+
+
+
+
+
+

PortableMag Navigation and Linking

+
+

Finger controls

+
    +
  • Single finger swipe left/right – prev/next page. +
  • Two finger swipe left/right – prev/next article. +
  • Single finger swipe up/down – toggle thumbnail view. +
  • Pinch in/out – go in/out of thumbnail view. +
+

Navigation via #URLs

+

The basics

+ Page #1
+ Named page
+

+ Anchor on page #3
+ currently navigation via existing anchors + will break the layout, so use the name attribute + on any other tags (see example). + +

+
+ +
+

Special anchors

+

These show up in the page URL

+ Magazine cover
+ Last page
+ Thumbnail view
+ Toggle a hidden layer
+ + +

Relative special anchors

+

These will get replaced by corresponding page numbers in the URL

+ Next page
+ Previous page
+ Next article
+ Previous article
+
+
+ next page...
+
+ + +
-
- Page +
+

PortableMag Anatomy

+

+ The magazine consists of: +

    +
  • Magazine cover +
  • Articles: +
      +
    • Article cover +
    • Pages +
    +
+ Each of these elements can be styled separately... +

+
+
+
+
+

The Page content has a fixed size...

- + +

Using the content block...

+

+ The content block can contain any HTML. +

+

+ The contents will allways fit the screen, the aspect ratio + of the content block is fixed regardless of the viewer. +

+

+ Contents will not get clipped as long as they are within the block. +

+

+ NOTE: by default the overflow is visible (see next page), so be carefull. +

- + +
+

You can still use the full page area...

+

+ Though anything outside the content block can and will get clipped, + depending on viewer aspect ratio... +

+

+ You can see this by resizing the page in browser or rotating the device. +

+
- -

Article Cover

+

Page Templates

home
diff --git a/magazine-custom.css b/magazine-custom.css index c7714af..368e489 100755 --- a/magazine-custom.css +++ b/magazine-custom.css @@ -18,10 +18,24 @@ .page { background: silver; + + font-family: Arial; } /*********************************************************************/ +body { + font-family: arial; +} + +.page a, +.page a:visited, +.page a:active { + color: blue; +} +.page a:hover { + color: red; +} diff --git a/magazine.js b/magazine.js index abf676b..ab327b3 100755 --- a/magazine.js +++ b/magazine.js @@ -9,6 +9,8 @@ var PAGES_IN_RIBBON = 6 // if true, expand a page to fit the whole view in single page mode... var FIT_PAGE_TO_VIEW = false +// if true will make page resizes after window resize animated... +var ANIMATE_WINDOW_RESIZE = true @@ -29,8 +31,8 @@ togglePageView = createCSSClassToggler( 'page-view-mode', null, // post-change callback... - function(){ - if(togglePageView('?') == 'on'){ + function(action){ + if(action == 'on'){ fitNPages(1) } else { fitNPages(PAGES_IN_RIBBON)