mirror of
https://github.com/flynx/PortableMag.git
synced 2025-11-01 12:30:19 +00:00
more cleanup and refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
40af08494a
commit
f417236a72
31
index.html
31
index.html
@ -94,8 +94,8 @@ function prepareTransitions(elem){
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
// general window behavior...
|
||||||
$(window)
|
$(window)
|
||||||
//.resize(viewResizeHandler)
|
|
||||||
.resize(updateView)
|
.resize(updateView)
|
||||||
.bind('hashchange', hashChangeHandler)
|
.bind('hashchange', hashChangeHandler)
|
||||||
|
|
||||||
@ -129,8 +129,6 @@ $(document).ready(function(){
|
|||||||
},
|
},
|
||||||
function(k){console.log(k)}))
|
function(k){console.log(k)}))
|
||||||
|
|
||||||
//setTransformOrigin($('.magazine'))
|
|
||||||
|
|
||||||
window.MagazineScroller = makeScrollHandler($('.viewer'), {
|
window.MagazineScroller = makeScrollHandler($('.viewer'), {
|
||||||
hScroll: true,
|
hScroll: true,
|
||||||
vScroll: false,
|
vScroll: false,
|
||||||
@ -149,9 +147,6 @@ $(document).ready(function(){
|
|||||||
.on('swipeRight', handleSwipeRight)
|
.on('swipeRight', handleSwipeRight)
|
||||||
.on('swipeUp swipeDown', function(){ togglePageView('off') })
|
.on('swipeUp swipeDown', function(){ togglePageView('off') })
|
||||||
.on('screenReleased', handleScrollRelease)
|
.on('screenReleased', handleScrollRelease)
|
||||||
/*
|
|
||||||
.on('screenReleased swipeRight swipeLeft', handleScrollRelease)
|
|
||||||
*/
|
|
||||||
|
|
||||||
.on('pageChanged', updatePageNumberIndicator)
|
.on('pageChanged', updatePageNumberIndicator)
|
||||||
.on('magazineDataLoaded', loadMagazineChrome)
|
.on('magazineDataLoaded', loadMagazineChrome)
|
||||||
@ -192,6 +187,7 @@ $(document).ready(function(){
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
<!-- Magazine Chrome -->
|
||||||
<div class="chrome">
|
<div class="chrome">
|
||||||
|
|
||||||
|
|
||||||
@ -203,7 +199,7 @@ $(document).ready(function(){
|
|||||||
<div id="spinner" style="position:relative; display:inline-block; width:50px; height:50px; vertical-align:middle;"></div>
|
<div id="spinner" style="position:relative; display:inline-block; width:50px; height:50px; vertical-align:middle;"></div>
|
||||||
<script>
|
<script>
|
||||||
// add a spinner to the splash...
|
// add a spinner to the splash...
|
||||||
var opts = {
|
$('#spinner').spin({
|
||||||
lines: 11, // The number of lines to draw
|
lines: 11, // The number of lines to draw
|
||||||
length: 6, // The length of each line
|
length: 6, // The length of each line
|
||||||
width: 4, // The line thickness
|
width: 4, // The line thickness
|
||||||
@ -219,8 +215,7 @@ $(document).ready(function(){
|
|||||||
zIndex: 2e9, // The z-index (defaults to 2000000000)
|
zIndex: 2e9, // The z-index (defaults to 2000000000)
|
||||||
top: 'auto', // Top position relative to parent in px
|
top: 'auto', // Top position relative to parent in px
|
||||||
left: 'auto' // Left position relative to parent in px
|
left: 'auto' // Left position relative to parent in px
|
||||||
}
|
})
|
||||||
$('#spinner').spin(opts)
|
|
||||||
</script>
|
</script>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
</div>
|
</div>
|
||||||
@ -228,6 +223,8 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
<!-- Toolbars -->
|
<!-- Toolbars -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Editor Toolbar -->
|
||||||
<div class="left-toolbar">
|
<div class="left-toolbar">
|
||||||
|
|
||||||
<svg id="new-magazine" width="40" height="40" xmlns="http://www.w3.org/2000/svg">
|
<svg id="new-magazine" width="40" height="40" xmlns="http://www.w3.org/2000/svg">
|
||||||
@ -349,8 +346,10 @@ $(document).ready(function(){
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Editor Toolbar (end) -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Top Toolbar -->
|
||||||
<div class="top-toolbar">
|
<div class="top-toolbar">
|
||||||
<div class="left-set">
|
<div class="left-set">
|
||||||
<div class="button title"><a href="#home" class="magazine-title-text">Magazine Title</a></div>
|
<div class="button title"><a href="#home" class="magazine-title-text">Magazine Title</a></div>
|
||||||
@ -402,6 +401,10 @@ $(document).ready(function(){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Top Toolbar (end) -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Bottom Toolbar -->
|
||||||
<div class="bottom-toolbar">
|
<div class="bottom-toolbar">
|
||||||
<!-- this is just an example-->
|
<!-- this is just an example-->
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
@ -421,18 +424,18 @@ $(document).ready(function(){
|
|||||||
</div>
|
</div>
|
||||||
<div class="page-number">0/0</div>
|
<div class="page-number">0/0</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Bottom Toolbar (end) -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Toolbars (end) -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Magazine Viewer -------------------------------------------------->
|
||||||
<div id="viewer" class="viewer">
|
<div id="viewer" class="viewer">
|
||||||
|
|
||||||
<div class="magazine" name="PortableMag">
|
<div class="magazine" name="PortableMag">
|
||||||
<div class="cover page">
|
<div class="cover page">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<!--h1 style="color:gray;font-size:125px;margin-bottom:-35px; margin-top: 160px">PortableMag</h1>
|
|
||||||
<h1 style="color:silver; font-size: 20px; margin-left:10px">A suit for publishing portable periodic magazines on mobile platforms.</h1-->
|
|
||||||
|
|
||||||
<svg width="800" height="600" xmlns="http://www.w3.org/2000/svg">
|
<svg width="800" height="600" xmlns="http://www.w3.org/2000/svg">
|
||||||
<!-- Created with SVG-edit - http://svg-edit.googlecode.com/ -->
|
<!-- Created with SVG-edit - http://svg-edit.googlecode.com/ -->
|
||||||
@ -851,7 +854,11 @@ $(document).ready(function(){
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Magazine Viewer (end) ------------------------------------------>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Magazine Chrome (end) -->
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user