/********************************************************************** * **********************************************************************/ body { padding: 0; margin: 0; } /************************************* layers and hidable elements ***/ .hidden { display: none; } /* keep this empty... */ .shown { } /*********************************************************** pages ***/ .page { /* XXX make this browser-sized... */ position: relative; display: inline-block; vertical-align: middle; text-align: left; overflow: hidden; text-align: center; width: auto; height: auto; /* 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 .bookmark { position: absolute; width: 100px; height: 100px; background: red; right: -60px; top: -60px; cursor: hand; z-index: 8888; opacity: 0,5; -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); -o-transform: rotate(-45deg); -ms-transform: rotate(-45deg); transform: rotate(-45deg); -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 .bookmark-toggler { position: absolute; width: 40px; height: 40px; right: 0px; top: 0px; cursor: hand; z-index: 9999; } .page-view-mode .page { /* XXX change to relative units... */ width: 800px; } .page-view-mode .page .content { } .page-view-mode .page .bookmark { right: -70px; top: -70px; opacity: 0.5; } .page-view-mode .page .bookmark.justcreated { opacity: 1; } /************************************************** 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.6s ease; -moz-transition: all 0.6s ease; -o-transition: all 0.6s ease; -ms-transition: all 0.6s ease; transition: all 0.6s 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.1s ease; -moz-transition: all 0.1s ease; -o-transition: all 0.1s ease; -ms-transition: all 0.1s ease; transition: all 0.1s 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: middle; top: 50%; min-width: 200px; /* XXX has to be the same as default page height */ height: 600px; /* XXX has to pe half of page height */ margin-top: -300px; /* this is minus half the page width */ /* XXX change to relative units... */ margin-left: -400px; -webkit-transition: all 0.1s ease; -moz-transition: all 0.1s ease; -o-transition: all 0.1s ease; -ms-transition: all 0.1s ease; transition: all 0.1s ease; } /* XXX does not appear to work... (likely because :before/:after mess things up) */ .magazine:empty { background: silver; } .dragging .magazine { -webkit-transition: none; -moz-transition: none; -o-transition: none; -ms-transition: none; transition: none; } .dragging * { -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: 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: 25%; 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 */ .group, .article { display: inline-block; width: auto; overflow: visible; white-space: nowrap; font-size: 0px; min-width: 200px; } .article:empty { color: silver; } .article .cover { } /************************************************ utility elements ***/ /* toolbars... */ .top-toolbar, .bottom-toolbar { display: block; position: absolute; text-align: center; overflow: hidden; background: #555; opacity: 0.9; height: 50px; left: 0px; font-size: 14px; color: silver; } .top-toolbar { top: 0px; width: 100%; } .bottom-toolbar { bottom: 0px; width: 100%; } .page-view-mode .top-toolbar, .page-view-mode .bottom-toolbar { display: none; } /* title */ .top-toolbar .title, .bottom-toolbar .title { font-size: 40px; } /* toolbar element sets */ .top-toolbar .left-set, .bottom-toolbar .left-set { float: left; text-align: left; } .top-toolbar .right-set, .bottom-toolbar .right-set { float: right; text-align: right; } /* toolbar links */ .top-toolbar a, .bottom-toolbar a { color: silver; text-decoration: none; } /* toolbar controls */ .top-toolbar .controls, .bottom-toolbar .controls { margin-top: 10px; } /* toolbar buttons */ .button { display: inline-block; font-size: 25px; font-weight: bold; cursor: hand; vertical-align: center; width: auto; margin-left: 20px; margin-right: 20px; } /* page indicator */ .bottom-toolbar .page-number { position: absolute; right: 10px; top: 10px; color: gray; } .inline-editor-mode .left-toolbar, .left-toolbar { display: none; } .settings.page { display: none; } .editor-mode .settings.page { display: inline-block; } .editor-mode .left-toolbar { position: absolute; display: block; top: 30px; left: 30px; width: 40px; height: auto; background: black; color: white; padding: 10px; z-index: 9999; opacity: 0.7; -webkit-transition: all 0.1s ease; -moz-transition: all 0.1s ease; -o-transition: all 0.1s ease; -ms-transition: all 0.1s ease; transition: all 0.1s ease; } .editor-mode .left-toolbar svg { display: block; cursor: hand; } /* navigator... */ .navigator { opacity: 0.6; } .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 */ min-width: 10px; width: 1%; 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.1s ease; -moz-transition: all 0.1s ease; -o-transition: all 0.1s ease; -ms-transition: all 0.1s ease; transition: all 0.1s ease; } .dragging .navigator .bar .indicator { -webkit-transition: none; -moz-transition: none; -o-transition: all 0 ease; -ms-transition: none; transition: none; } .navigator .bar .bookmark { position: absolute; font-size: 0px; width: 5px; height: 5px; top: -250%; background: red; cursor: hand; -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -o-transform: rotate(45deg); -ms-transform: rotate(45deg); transform: rotate(45deg); } /* 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 ***/ .page-number-text { position: absolute; bottom: 10px; right: 10px; text-align: right; color: gray; } /* 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; } /*********************************************************************/ body { font-family: arial; } .page a, .page a:visited, .page a:active { color: blue; } .page a:hover { color: red; } /*********************************************************************/ /* keep this at the end... */ .unanimated { -webkit-transition: none; -moz-transition: none; -o-transition: all 0 ease; -ms-transition: none; transition: none; } /*********************************************************************/