mirror of
https://github.com/flynx/PortableMag.git
synced 2025-12-21 19:11:47 +00:00
cleaned up magazine.css...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
76035b5eda
commit
5a1d167ef9
90
magazine.css
90
magazine.css
@ -1,9 +1,12 @@
|
|||||||
|
/*********************************************************************/
|
||||||
|
/*********************************************************************/
|
||||||
|
|
||||||
body {
|
body {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/************************************* layers and hidable elements ***/
|
||||||
.hidden {
|
.hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@ -12,7 +15,8 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* all elements that will behave like a page */
|
|
||||||
|
/*********************************************************** pages ***/
|
||||||
.page {
|
.page {
|
||||||
/* XXX make this browser-sized... */
|
/* XXX make this browser-sized... */
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -20,16 +24,14 @@ body {
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
/* XXX need these to be the same as the magazine, for some reason does not work...
|
|
||||||
* one way to go is to use a fixed page layout and scale things manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
width: auto;
|
width: auto;
|
||||||
height: auto;
|
height: auto;
|
||||||
/* change to relative units... */
|
/* XXX change to relative units... */
|
||||||
margin-top: -300px;
|
margin-top: -300px;
|
||||||
|
|
||||||
|
/* XXX change to relative units... */
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
background: silver;
|
||||||
|
|
||||||
-webkit-transition: all 0.2s ease;
|
-webkit-transition: all 0.2s ease;
|
||||||
-moz-transition: all 0.2s ease;
|
-moz-transition: all 0.2s ease;
|
||||||
@ -46,6 +48,7 @@ body {
|
|||||||
white-space: normal;
|
white-space: normal;
|
||||||
|
|
||||||
/* these set the "safe" marks for page content */
|
/* these set the "safe" marks for page content */
|
||||||
|
/* XXX change to relative units... */
|
||||||
width: 800px;
|
width: 800px;
|
||||||
height: 600px;
|
height: 600px;
|
||||||
|
|
||||||
@ -59,14 +62,18 @@ body {
|
|||||||
.page-view-mode .page {
|
.page-view-mode .page {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
/* XXX change to relative units... */
|
||||||
width: 800px;
|
width: 800px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-view-mode .page .content {
|
.page-view-mode .page .content {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* general layout */
|
|
||||||
|
|
||||||
|
|
||||||
|
/************************************************** general layout ***/
|
||||||
|
|
||||||
|
/* top most element, relative to this everything is sized */
|
||||||
.viewer {
|
.viewer {
|
||||||
position: relative;
|
position: relative;
|
||||||
/* this makes the magazine behave like a ribbon */
|
/* this makes the magazine behave like a ribbon */
|
||||||
@ -85,6 +92,7 @@ body {
|
|||||||
transition: all 0.5s ease;
|
transition: all 0.5s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* element used to scale the magazine... */
|
||||||
.scaler {
|
.scaler {
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
@ -102,20 +110,23 @@ body {
|
|||||||
transition: all 0.2s ease;
|
transition: all 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* element used to center and align the magazine... */
|
||||||
.aligner {
|
.aligner {
|
||||||
position: relative;
|
position: relative;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* magazine container, this contains a cover and a set of articles */
|
||||||
.magazine {
|
.magazine {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
|
|
||||||
/* XXX change to relative units... */
|
|
||||||
/* this is minus half the page width */
|
/* this is minus half the page width */
|
||||||
|
/* XXX change to relative units... */
|
||||||
margin-left: -400px;
|
margin-left: -400px;
|
||||||
|
|
||||||
-webkit-transition: all 0.2s ease;
|
-webkit-transition: all 0.2s ease;
|
||||||
@ -126,21 +137,23 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* magazine cover */
|
||||||
.magazine > .cover {
|
.magazine > .cover {
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.magazine:before {
|
/* user hints, visible when user draggs past the cover or the last page
|
||||||
|
* of the mag... */
|
||||||
|
.magazine:before, .magazine:after {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
height: 300px;
|
|
||||||
width: 600px;
|
|
||||||
left: -300px;
|
|
||||||
top: -50%;
|
top: -50%;
|
||||||
|
|
||||||
content: 'COVER';
|
height: 300px;
|
||||||
|
width: 600px;
|
||||||
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 150px;
|
font-size: 150px;
|
||||||
|
|
||||||
@ -152,46 +165,33 @@ body {
|
|||||||
-ms-transform: rotate(-90deg);
|
-ms-transform: rotate(-90deg);
|
||||||
transform: rotate(-90deg);
|
transform: rotate(-90deg);
|
||||||
}
|
}
|
||||||
|
.magazine:before {
|
||||||
|
content: 'COVER';
|
||||||
|
left: -300px;
|
||||||
|
}
|
||||||
.magazine:after {
|
.magazine:after {
|
||||||
position: absolute;
|
|
||||||
display: inline-block;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
height: 300px;
|
|
||||||
width: 600px;
|
|
||||||
right: -450px;
|
|
||||||
top: -50%;
|
|
||||||
|
|
||||||
content: 'END';
|
content: 'END';
|
||||||
font-weight: bold;
|
right: -450px;
|
||||||
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 article, this can contain a cover and a number of pages */
|
||||||
.article {
|
.article {
|
||||||
|
display: inline-block;
|
||||||
width: auto;
|
width: auto;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
font-size: 0px;
|
font-size: 0px;
|
||||||
|
|
||||||
display: inline-block;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.article > .cover {
|
.article > .cover {
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page {
|
|
||||||
background: silver;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/************************************************ utility elements ***/
|
||||||
|
|
||||||
|
/* toolbars... */
|
||||||
.top-toolbar, .bottom-toolbar {
|
.top-toolbar, .bottom-toolbar {
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -212,17 +212,14 @@ body {
|
|||||||
color: white;
|
color: white;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-toolbar {
|
.top-toolbar {
|
||||||
top: 0px;
|
top: 0px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom-toolbar {
|
.bottom-toolbar {
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
color: white;
|
color: white;
|
||||||
@ -239,6 +236,8 @@ body {
|
|||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* splash screen. used to hide loading and aligning elements */
|
||||||
.splash {
|
.splash {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
@ -249,13 +248,14 @@ body {
|
|||||||
|
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.splash * {
|
.splash * {
|
||||||
color: gray;
|
color: gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* modes */
|
/*********************************************************** modes ***/
|
||||||
|
|
||||||
|
/* page view mode -- fullscreen, single page view */
|
||||||
.page-view-mode.viewer {
|
.page-view-mode.viewer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -276,7 +276,7 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* templates */
|
/******************************************************* templates ***/
|
||||||
.caption {
|
.caption {
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -305,6 +305,7 @@ body {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************************************/
|
||||||
/* keep this at the end... */
|
/* keep this at the end... */
|
||||||
.unanimated {
|
.unanimated {
|
||||||
-webkit-transition: none;
|
-webkit-transition: none;
|
||||||
@ -313,3 +314,6 @@ body {
|
|||||||
-ms-transition: none;
|
-ms-transition: none;
|
||||||
transition: none;
|
transition: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************************************/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user