mirror of
				https://github.com/flynx/PortableMag.git
				synced 2025-11-03 21:40:17 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			385 lines
		
	
	
		
			7.2 KiB
		
	
	
	
		
			CSS
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			385 lines
		
	
	
		
			7.2 KiB
		
	
	
	
		
			CSS
		
	
	
		
			Executable File
		
	
	
	
	
/**********************************************************************
 | 
						|
* 
 | 
						|
**********************************************************************/
 | 
						|
 | 
						|
body {
 | 
						|
	padding: 0;
 | 
						|
	margin: 0;
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
 | 
						|
/************************************* layers and hidable elements ***/
 | 
						|
.hidden {
 | 
						|
	display: none;
 | 
						|
}
 | 
						|
/* keep this empty... */
 | 
						|
.shown {
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
 | 
						|
/*********************************************************** pages ***/
 | 
						|
.page {
 | 
						|
	/* XXX make this browser-sized... */
 | 
						|
	display: inline-block;
 | 
						|
	vertical-align: bottom;
 | 
						|
	text-align: left;
 | 
						|
	overflow: hidden;
 | 
						|
 | 
						|
	text-align: center;
 | 
						|
 | 
						|
	width: auto;
 | 
						|
	height: auto;
 | 
						|
	/* XXX change to relative units... */
 | 
						|
	margin-top: -300px;
 | 
						|
 | 
						|
	/* XXX change to relative units... */
 | 
						|
	font-size: 12px;
 | 
						|
 | 
						|
	background: white;
 | 
						|
 | 
						|
	-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 */
 | 
						|
	/* XXX change to relative units... */
 | 
						|
	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 {
 | 
						|
 | 
						|
	/* XXX change to relative units... */
 | 
						|
	width: 800px;
 | 
						|
}
 | 
						|
 | 
						|
.page-view-mode .page .content {
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
 | 
						|
/************************************************** general layout ***/
 | 
						|
 | 
						|
/* top most element, relative to this everything is sized */
 | 
						|
.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.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;
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
/* element used to scale the magazine... */
 | 
						|
.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;
 | 
						|
}
 | 
						|
/* element used to center and align the magazine... */
 | 
						|
.aligner {
 | 
						|
	position: relative;
 | 
						|
	left: 50%;
 | 
						|
	height: 100%;
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
/* magazine container, this contains a cover and a set of articles */
 | 
						|
.magazine {
 | 
						|
	position: relative;
 | 
						|
	display: inline-block;
 | 
						|
	vertical-align: bottom;
 | 
						|
	top: 50%;
 | 
						|
 | 
						|
	/* this is minus half the page width */
 | 
						|
	/* XXX change to relative units... */
 | 
						|
	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;
 | 
						|
}
 | 
						|
.dragging .magazine {
 | 
						|
	-webkit-transition: none;
 | 
						|
	-moz-transition: none;
 | 
						|
	-o-transition: none;
 | 
						|
	-ms-transition: none;	
 | 
						|
	transition: none;
 | 
						|
}
 | 
						|
/* user hints, visible when user draggs past the cover or the last page
 | 
						|
 * of the mag... */
 | 
						|
.magazine:before, .magazine:after {
 | 
						|
	position: absolute;
 | 
						|
	display: inline-block;
 | 
						|
	text-align: center;
 | 
						|
 | 
						|
	top: -50%;
 | 
						|
 | 
						|
	height: 300px;
 | 
						|
	width: 600px;
 | 
						|
 | 
						|
	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:before {
 | 
						|
	content: 'COVER';
 | 
						|
	left: -300px;
 | 
						|
}
 | 
						|
.magazine:after {
 | 
						|
	content: 'END';
 | 
						|
	right: -450px;
 | 
						|
}
 | 
						|
 | 
						|
/* magazine cover */
 | 
						|
.magazine > .cover {
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
/* magazine article, this can contain a cover and a number of pages */
 | 
						|
.article {
 | 
						|
	display: inline-block;
 | 
						|
	width: auto;
 | 
						|
	overflow: visible;
 | 
						|
	white-space: nowrap;
 | 
						|
	font-size: 0px;
 | 
						|
}
 | 
						|
 | 
						|
.article > .cover {
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
 | 
						|
/************************************************ utility elements ***/
 | 
						|
 | 
						|
/* toolbars... */
 | 
						|
.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 .controls, .bottom-toolbar .controls {
 | 
						|
	margin-top: 10px;
 | 
						|
	font-size: small;
 | 
						|
}
 | 
						|
.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;
 | 
						|
}
 | 
						|
.page-view-mode .top-toolbar,
 | 
						|
.page-view-mode .bottom-toolbar {
 | 
						|
	height: 0px;
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
 | 
						|
/* navigator... */
 | 
						|
.navigator {
 | 
						|
}
 | 
						|
.navigator .bar {
 | 
						|
	position: relative;
 | 
						|
	display: inline-block;
 | 
						|
	margin: 10px;
 | 
						|
	width: 400px;
 | 
						|
	height: 2px;
 | 
						|
	background: silver;
 | 
						|
	overflow: visible;
 | 
						|
}
 | 
						|
.navigator .bar .article,
 | 
						|
.navigator .bar .indicator {
 | 
						|
	position: absolute;
 | 
						|
	/* set this to the percentage of a page from magazine length */
 | 
						|
	width: 1%;
 | 
						|
	min-width: 10px;
 | 
						|
	height: 100%;
 | 
						|
}
 | 
						|
.navigator .bar .article {
 | 
						|
	background: white;
 | 
						|
	height: 300%;
 | 
						|
	cursor: hand;
 | 
						|
}
 | 
						|
.navigator .bar .indicator {
 | 
						|
	background: yellow;
 | 
						|
	height: 500%;
 | 
						|
	top:-50%;
 | 
						|
 | 
						|
	opacity: 0.7;
 | 
						|
 | 
						|
	-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;
 | 
						|
}
 | 
						|
 | 
						|
.dragging .navigator .bar .indicator {
 | 
						|
	-webkit-transition: none;
 | 
						|
	-moz-transition: none;
 | 
						|
	-o-transition: all 0 ease;
 | 
						|
	-ms-transition: none;	
 | 
						|
	transition: none;
 | 
						|
}
 | 
						|
 | 
						|
/* splash screen. used to hide loading and aligning elements */
 | 
						|
.splash {
 | 
						|
	position: absolute;
 | 
						|
	top: 0px;
 | 
						|
	left: 0px;
 | 
						|
	width: 100%;
 | 
						|
	height: 100%;
 | 
						|
	z-index: 9000;
 | 
						|
 | 
						|
	background: white;
 | 
						|
}
 | 
						|
.splash * {
 | 
						|
	color: gray;
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
/*********************************************************** modes ***/
 | 
						|
 | 
						|
/* page view mode -- fullscreen, single page view */
 | 
						|
.page-view-mode.viewer {
 | 
						|
}
 | 
						|
 | 
						|
.page-view-mode .top-toolbar,
 | 
						|
.page-view-mode .bottom-toolbar {
 | 
						|
}
 | 
						|
 | 
						|
.page-view-mode .page .content {
 | 
						|
}
 | 
						|
.page-view-mode .current.page .content {
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
.page-view-mode.viewer.dragging {
 | 
						|
}
 | 
						|
.page-view-mode.dragging .page .content {
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
/******************************************************* templates ***/
 | 
						|
/* XXX split these into seporate files... */
 | 
						|
.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;
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
/*********************************************************************/
 |