PortableMag/magazine.css

316 lines
5.2 KiB
CSS
Raw Normal View History

body {
padding: 0;
margin: 0;
}
.hidden {
display: none;
}
/* keep this empty... */
.shown {
}
/* all elements that will behave like a page */
.page {
/* XXX make this browser-sized... */
display: inline-block;
vertical-align: bottom;
text-align: left;
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;
height: auto;
/* change to relative units... */
margin-top: -300px;
font-size: 12px;
-webkit-transition: all 0.2s ease;
-moz-transition: all 0.2s ease;
-o-transition: all 0.2s ease;
-ms-transition: all 0.2s ease;
transition: all 0.2s ease;
}
.page .content {
display: inline-block;
text-align: left;
position: relative;
overflow: visible;
white-space: normal;
/* these set the "safe" marks for page content */
width: 800px;
height: 600px;
-webkit-transition: all 0.2s ease;
-moz-transition: all 0.2s ease;
-o-transition: all 0.2s ease;
-ms-transition: all 0.2s ease;
transition: all 0.2s ease;
}
.page-view-mode .page {
text-align: center;
width: 800px;
}
.page-view-mode .page .content {
}
/* general layout */
.viewer {
position: relative;
/* this makes the magazine behave like a ribbon */
width: 100%;
height: 100%;
overflow: hidden;
white-space: nowrap;
font-size: 0px;
background: gray;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
transition: all 0.5s ease;
}
.scaler {
position: relative;
overflow: visible;
-webkit-transform: scale(1);
-moz-transform: scale(1);
-o-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
-webkit-transition: all 0.2s ease;
-moz-transition: all 0.2s ease;
-o-transition: all 0.2s ease;
-ms-transition: all 0.2s ease;
transition: all 0.2s ease;
}
.aligner {
position: relative;
left: 50%;
height: 100%;
}
.magazine {
position: relative;
display: inline-block;
vertical-align: bottom;
top: 50%;
/* XXX change to relative units... */
/* this is minus half the page width */
margin-left: -400px;
-webkit-transition: all 0.2s ease;
-moz-transition: all 0.2s ease;
-o-transition: all 0.2s ease;
-ms-transition: all 0.2s ease;
transition: all 0.2s ease;
}
.magazine > .cover {
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 {
width: auto;
overflow: visible;
white-space: nowrap;
font-size: 0px;
display: inline-block;
}
.article > .cover {
background: white;
}
.page {
background: silver;
}
.top-toolbar, .bottom-toolbar {
display: block;
position: absolute;
z-index: 1000;
text-align: center;
overflow: hidden;
background: black;
opacity: 0.4;
height: 50px;
left: 0px;
font-size: 14px;
color: white;
}
.top-toolbar a, .bottom-toolbar a {
color: white;
text-decoration: none;
}
.top-toolbar {
top: 0px;
width: 100%;
}
.bottom-toolbar {
bottom: 0px;
width: 100%;
}
.button {
display: inline-block;
color: white;
font-size: 25px;
font-weight: bold;
cursor: hand;
vertical-align: center;
width: auto;
margin-left: 20px;
margin-right: 20px;
}
.splash {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
z-index: 9000;
background-color: white;
}
.splash * {
color: gray;
}
/* modes */
.page-view-mode.viewer {
}
.page-view-mode .top-toolbar,
.page-view-mode .bottom-toolbar {
height: 0px;
}
.page-view-mode .page .content {
}
.page-view-mode .current.page .content {
}
.page-view-mode.viewer.dragging {
}
.page-view-mode.dragging .page .content {
}
/* templates */
.caption {
display: block;
position: absolute;
height: 100px;
width: 100%;
bottom: 0px;
left: 0px;
padding: 15px;
color: white;
background: black;
opacity: 0.5;
-webkit-transition: all 0.2s ease;
-moz-transition: all 0.2s ease;
-o-transition: all 0.2s ease;
-ms-transition: all 0.2s ease;
transition: all 0.2s ease;
}
.caption.hidden {
opacity: 0;
height: 0px;
}
.caption.shown {
opacity: 0.8;
}
/* keep this at the end... */
.unanimated {
-webkit-transition: none;
-moz-transition: none;
-o-transition: all 0 ease;
-ms-transition: none;
transition: none;
}