Browse Source

first mockup, loads tracemonkey pages OK

Artur Adib 13 years ago
parent
commit
324ea1d743
  1. BIN
      web/images/texture.png
  2. BIN
      web/images/toolbarButton-bookmark.png
  3. BIN
      web/images/toolbarButton-download.png
  4. BIN
      web/images/toolbarButton-menuArrows.png
  5. BIN
      web/images/toolbarButton-pageDown.png
  6. BIN
      web/images/toolbarButton-pageUp.png
  7. BIN
      web/images/toolbarButton-print.png
  8. BIN
      web/images/toolbarButton-sidebarToggle.png
  9. BIN
      web/images/toolbarButton-viewOutline.png
  10. BIN
      web/images/toolbarButton-viewThumbnail.png
  11. BIN
      web/images/toolbarButton-zoomIn.png
  12. BIN
      web/images/toolbarButton-zoomOut.png
  13. 788
      web/viewer.css
  14. 156
      web/viewer.html

BIN
web/images/texture.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
web/images/toolbarButton-bookmark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

BIN
web/images/toolbarButton-download.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

BIN
web/images/toolbarButton-menuArrows.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

BIN
web/images/toolbarButton-pageDown.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

BIN
web/images/toolbarButton-pageUp.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

BIN
web/images/toolbarButton-print.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

BIN
web/images/toolbarButton-sidebarToggle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

BIN
web/images/toolbarButton-viewOutline.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

BIN
web/images/toolbarButton-viewThumbnail.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

BIN
web/images/toolbarButton-zoomIn.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

BIN
web/images/toolbarButton-zoomOut.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

788
web/viewer.css

@ -1,474 +1,506 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- / * {
/* vim: set shiftwidth=4 tabstop=8 autoindent cindent expandtab: */ padding: 0;
margin: 0;
-moz-user-select:none;
cursor: default;
}
body { html {
background-color: #929292; height: 100%;
font-family: 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;
margin: 0px;
padding: 0px;
} }
[hidden] { body {
display: none !important; height: 100%;
background-color: #404040;
background-image: url(images/texture.png);
font-family: Segoe UI, Verdana, sans-serif;
} }
/* === Toolbar === */ #outerContainer {
#controls { display: -moz-box;
background-color: #eee; -moz-box-orient: horizontal;
background: -o-linear-gradient(bottom,#eee 0%,#fff 100%);
background: -moz-linear-gradient(center bottom, #eee 0%, #fff 100%);
background: -webkit-gradient(linear, left bottom, left top, color-stop(0.0, #ddd), color-stop(1.0, #fff));
border-bottom: 1px solid #666;
padding: 3px;
position: fixed;
left: 0px;
top: 0px;
height: 24px;
width: 100%; width: 100%;
z-index: 1; height: 100%;
white-space:nowrap; -moz-user-select:none;
overflow: hidden; cursor: default;
} }
.separator { #sidebarContainer {
display: inline; width: 200px;
border-left: 1px solid #d3d3d3; height: 100%;
border-right: 1px solid #fff; background-color: hsla(0,0%,0%,.1);
height: 16px; box-shadow: inset -1px 0 0 hsla(0,0%,0%,.25);
width:0px; overflow: auto;
margin: 4px;
} }
#controls > a > img { #viewerContainer {
margin: 4px; -moz-box-flex: 1;
height: 16px; height: 100%;
box-shadow: inset 1px 0 0 hsla(0,0%,100%,.05);
} }
#controls > button { .toolbar {
line-height: 16px; position: fixed;
width: 100%;
height: 32px;
z-index: 9999;
-moz-user-select:none;
cursor: default;
} }
#controls > button > img { #toolbarContainer {
width: 16px; display: -moz-box;
height: 16px; width: 100%;
} }
#controls > button[disabled] > img { #toolbarSidebar {
opacity: 0.5; display: -moz-box;
width: 200px;
height: 32px;
background-image: url(images/texture.png),
-moz-linear-gradient(hsla(0,0%,30%,.99), hsla(0,0%,25%,.95));
box-shadow: inset -2px 0 0 hsla(0,0%,100%,.08),
inset 0 1px 1px hsla(0,0%,0%,.15),
inset 0 -1px 0 hsla(0,0%,100%,.05),
0 1px 0 hsla(0,0%,0%,.15),
0 1px 1px hsla(0,0%,0%,.1);
}
#toolbarViewer {
display: -moz-box;
-moz-box-flex: 1;
margin-left: -1px;
height: 32px;
background-image: url(images/texture.png),
-moz-linear-gradient(hsla(0,0%,32%,.99), hsla(0,0%,27%,.95));
border-left: 1px solid hsla(0,0%,0%,.5);
box-shadow: inset 1px 0 0 hsla(0,0%,100%,.08),
inset 0 1px 1px hsla(0,0%,0%,.15),
inset 0 -1px 0 hsla(0,0%,100%,.05),
0 1px 0 hsla(0,0%,0%,.15),
0 1px 1px hsla(0,0%,0%,.1);
} }
#pageNumber { .splitToolbarButton {
text-align: right; margin: 4px 2px 4px 0;
display: -moz-box;
} }
.splitToolbarButton > .toolbarButton {
#fileInput { position: relative;
line-height: 16px; margin: 0 -1px;
padding: 3px 6px;
border-radius: 0;
}
.splitToolbarButton:hover > .toolbarButton,
.splitToolbarButton.toggled > .toolbarButton {
background-color: hsla(0,0%,0%,.12);
background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
background-clip: padding-box;
border: 1px solid hsla(0,0%,0%,.35);
border-color: hsla(0,0%,0%,.32) hsla(0,0%,0%,.38) hsla(0,0%,0%,.42);
box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset,
0 0 1px hsla(0,0%,100%,.15) inset,
0 1px 0 hsla(0,0%,100%,.05);
-moz-transition-property: background-color, border-color, box-shadow;
-moz-transition-duration: 150ms;
-moz-transition-timing-function: ease;
}
.splitToolbarButton > .toolbarButton:hover,
.dropdownToolbarButton:hover {
background-color: hsla(0,0%,0%,.2);
box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset,
0 0 1px hsla(0,0%,100%,.15) inset,
0 0 1px hsla(0,0%,0%,.05);
z-index: 199;
}
.splitToolbarButton > .toolbarButton:first-child {
position: relative;
margin: 0;
margin-right: -1px;
border-top-left-radius: 2px;
border-bottom-left-radius: 2px;
border-right-color: transparent;
} }
.splitToolbarButton > .toolbarButton:last-child {
/* === Sidebar === */ position: relative;
#sidebar { margin: 0;
position: fixed; margin-left: -1px;
width: 350px; border-top-right-radius: 2px;
top: 62px; border-bottom-right-radius: 2px;
bottom: 18px; border-left-color: transparent;
left: -290px; }
transition: left 0.25s ease-in-out 1s; .splitToolbarButtonSeparator {
-o-transition: left 0.25s ease-in-out 1s; margin: 4px 0;
-moz-transition: left 0.25s ease-in-out 1s; width: 1px;
-webkit-transition: left 0.25s ease-in-out 1s; background-color: hsla(0,0%,00%,.5);
z-index: 1; z-index: 99;
} box-shadow: 0 0 0 1px hsla(0,0%,100%,.08);
}
#sidebar:hover, .splitToolbarButton:hover > .splitToolbarButtonSeparator,
#sidebar.pinned { .splitToolbarButton.toggled > .splitToolbarButtonSeparator {
left: 0px; margin: 1px 0;
transition: left 0.25s ease-in-out 0s; box-shadow: 0 0 0 1px hsla(0,0%,100%,.03);
-o-transition: left 0.25s ease-in-out 0s; -moz-transition-property: margin;
-moz-transition: left 0.25s ease-in-out 0s; -moz-transition-duration: 10ms;
-webkit-transition: left 0.25s ease-in-out 0s; -moz-transition-timing-function: ease;
} }
#pinIcon { .toolbarButton,
position: absolute; .dropdownToolbarButton {
top: 4px; -moz-box-flex: 0;
right: 55px; min-width: 16px;
width: 15px; padding: 3px 7px;
height: 15px; margin: 4px 2px 4px 0;
background: center no-repeat; border: 1px solid transparent;
background-image: url('images/pin-up.svg'); border-radius: 2px;
background-size: 15px 15px; color: hsl(0,0%,95%);
font-size: 12px;
line-height: 14px;
-moz-user-select:none;
cursor: default;
-moz-transition-property: background-color, border-color, box-shadow;
-moz-transition-duration: 150ms;
-moz-transition-timing-function: ease;
}
.toolbarButton:hover,
.dropdownToolbarButton {
background-color: hsla(0,0%,0%,.12);
background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
background-clip: padding-box;
border: 1px solid hsla(0,0%,0%,.35);
border-color: hsla(0,0%,0%,.32) hsla(0,0%,0%,.38) hsla(0,0%,0%,.42);
box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset,
0 0 1px hsla(0,0%,100%,.15) inset,
0 1px 0 hsla(0,0%,100%,.05);
}
.toolbarButton:hover:active,
.dropdownToolbarButton:hover:active {
background-color: hsla(0,0%,0%,.2);
background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
border-color: hsla(0,0%,0%,.35) hsla(0,0%,0%,.4) hsla(0,0%,0%,.45);
box-shadow: 0 1px 1px hsla(0,0%,0%,.1) inset,
0 0 1px hsla(0,0%,0%,.2) inset,
0 1px 0 hsla(0,0%,100%,.05);
-moz-transition-property: background-color, border-color, box-shadow;
-moz-transition-duration: 10ms;
-moz-transition-timing-function: linear;
}
.toolbarButton.toggled,
.splitToolbarButton.toggled > .toolbarButton.toggled {
background-color: hsla(0,0%,0%,.3);
background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
border-color: hsla(0,0%,0%,.4) hsla(0,0%,0%,.45) hsla(0,0%,0%,.5);
box-shadow: 0 1px 1px hsla(0,0%,0%,.1) inset,
0 0 1px hsla(0,0%,0%,.2) inset,
0 1px 0 hsla(0,0%,100%,.05);
-moz-transition-property: background-color, border-color, box-shadow;
-moz-transition-duration: 10ms;
-moz-transition-timing-function: linear;
}
.toolbarButton.toggled:hover:active,
.splitToolbarButton.toggled > .toolbarButton.toggled:hover:active {
background-color: hsla(0,0%,0%,.4);
border-color: hsla(0,0%,0%,.4) hsla(0,0%,0%,.5) hsla(0,0%,0%,.55);
box-shadow: 0 1px 1px hsla(0,0%,0%,.2) inset,
0 0 1px hsla(0,0%,0%,.3) inset,
0 1px 0 hsla(0,0%,100%,.05);
}
.dropdownToolbarButton {
min-width: 124px;
}
.dropdownToolbarButton::after {
display: inline-block;
float: right;
content: url(images/toolbarButton-menuArrows.png);
} }
#pinIcon:hover { .splitToolbarButton:first-child,
background-color: rgba(255,255,255,0.35); .toolbarButton:first-child {
margin-left: 4px;
}
.splitToolbarButton:last-child,
.toolbarButton:last-child {
margin-right: 4px;
} }
#sidebar.pinned #pinIcon { .toolbarButtonSpacer {
background-image: url('images/pin-down.svg'); width: 30px;
background-size: 15px 15px;
} }
#sidebarBox { .toolbarButtonFlexibleSpacer {
background-color: rgba(0, 0, 0, 0.7); -moz-box-flex: 1;
width: 300px; min-width: 30px;
height: 100%;
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
-moz-border-radius-topright: 8px;
-moz-border-radius-bottomright: 8px;
-webkit-border-top-right-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
box-shadow: 0px 2px 8px #000;
-moz-box-shadow: 0px 2px 8px #000;
-webkit-box-shadow: 0px 2px 8px #000;
}
#sidebarScrollView {
position: absolute;
overflow: hidden;
overflow-y: auto;
top: 20px;
bottom: 10px;
left: 10px;
width: 280px;
} }
.thumbnail { .toolbarButton.sidebarToggle::before {
width: 134px; display: inline-block;
height: 134px; content: url(images/toolbarButton-sidebarToggle.png);
margin-top: 5px;
margin-bottom: 5px;
margin-left:auto;
margin-right:auto;
line-height: 134px;
text-align: center;
overflow: hidden;
} }
.thumbnail:not([data-loaded]) { .toolbarButton.pageUp::before {
background-color: gray; display: inline-block;
content: url(images/toolbarButton-pageUp.png);
} }
.thumbnail > canvas { .toolbarButton.pageDown::before {
vertical-align: middle;
display: inline-block; display: inline-block;
content: url(images/toolbarButton-pageDown.png);
} }
#outlineScrollView { .toolbarButton.zoomOut::before {
position: absolute; display: inline-block;
background-color: #fff; content: url(images/toolbarButton-zoomOut.png);
overflow: auto;
top: 20px;
bottom: 10px;
left: 10px;
width: 280px;
} }
#outlineView { .toolbarButton.zoomIn::before {
padding-top: 4px; display: inline-block;
padding-bottom: 100px; content: url(images/toolbarButton-zoomIn.png);
padding-left: 6px;
padding-right: 6px;
font-size: smaller;
} }
.outlineItem > .outlineItems { .toolbarButton.print::before {
margin-left: 20px; display: inline-block;
content: url(images/toolbarButton-print.png);
} }
.outlineItem > a { .toolbarButton.download::before {
text-decoration: none; display: inline-block;
color: black; content: url(images/toolbarButton-download.png);
} }
.outlineItem > a:hover { .toolbarButton.bookmark::before {
background: #ff0; display: inline-block;
box-shadow: 0px 2px 10px #ff0; content: url(images/toolbarButton-bookmark.png);
} }
#sidebarControls { .toolbarButton.viewThumbnail::before {
position:absolute; display: inline-block;
width: 120px; content: url(images/toolbarButton-viewThumbnail.png);
height: 32px;
left: 15px;
bottom: 35px;
} }
#sidebarControls > button { .toolbarButton.viewOutline::before {
box-shadow: 0px 4px 10px #000; display: inline-block;
-moz-box-shadow: 0px 4px 10px #000; content: url(images/toolbarButton-viewOutline.png);
-webkit-box-shadow: 0px 4px 10px #000;
} }
#sidebarControls > button > img { .toolbarField {
min-width: 16px;
width: 32px; width: 32px;
height: 32px; padding: 3px 6px;
margin: 4px 0 4px 0;
border: 1px solid transparent;
border-radius: 2px;
background-color: hsla(0,0%,100%,.09);
background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
background-clip: padding-box;
border: 1px solid hsla(0,0%,0%,.35);
border-color: hsla(0,0%,0%,.32) hsla(0,0%,0%,.38) hsla(0,0%,0%,.42);
box-shadow: 0 1px 0 hsla(0,0%,0%,.05) inset,
0 1px 0 hsla(0,0%,100%,.05);
color: hsl(0,0%,95%);
font-size: 12px;
line-height: 14px;
text-align: right;
outline-style: none;
-moz-user-select:none;
cursor: default;
-moz-transition-property: background-color, border-color, box-shadow;
-moz-transition-duration: 150ms;
-moz-transition-timing-function: ease;
} }
#sidebarControls > button[disabled] > img { .toolbarField:hover {
opacity: 0.5; background-color: hsla(0,0%,100%,.11);
border-color: hsla(0,0%,0%,.4) hsla(0,0%,0%,.43) hsla(0,0%,0%,.45);
} }
#sidebarControls > button[data-selected] { .toolbarField:focus {
box-shadow: 0px 4px 10px #ff0; background-color: hsla(0,0%,100%,.15);
-moz-box-shadow: 0px 4px 10px #ff0; border-color: hsla(204,100%,65%,.8) hsla(204,100%,65%,.85) hsla(204,100%,65%,.9);
-webkit-box-shadow: 0px 4px 10px #ff0;
} }
/* === Content view === */ .toolbarLabel {
canvas { min-width: 16px;
margin: auto; padding: 3px 6px 3px 2px;
display: block; margin: 4px 2px 4px 0;
border: 1px solid transparent;
border-radius: 2px;
color: hsl(0,0%,85%);
font-size: 12px;
line-height: 14px;
text-align: left;
-moz-user-select:none;
cursor: default;
} }
.page { .viewer {
width: 816px; width: 100%;
height: 1056px; height: 100%;
margin: 10px auto; margin-top: -27px;
position: relative; -moz-user-select:none;
overflow: hidden; cursor: default;
box-shadow: 0px 4px 10px #000;
-moz-box-shadow: 0px 4px 10px #000;
-webkit-box-shadow: 0px 4px 10px #000;
background-color: white;
} }
.page > a { .viewerImage {
display: block; /* width: 50%; */
position: absolute; margin: 80px 20px 20px;
} box-shadow: 0 0 0 1px hsla(0,0%,0%,.5),
0 2px 8px hsla(0,0%,0%,.3);
.page > a:hover {
opacity: 0.2;
background: #ff0;
box-shadow: 0px 2px 10px #ff0;
-moz-box-shadow: 0px 2px 10px #ff0;
-webkit-box-shadow: 0px 2px 10px #ff0;
} }
.loadingIcon {
position: absolute;
display: block;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: url('images/loading-icon.gif') center no-repeat;
}
.textLayer { #thumbnailView {
position: absolute; position: fixed;
left: 0; width: 120px;
top: 0; height: 100%;
right: 0; padding: 51px 40px 0;
bottom: 0; overflow: auto;
color: #000;
font-family: sans-serif;
} }
.textLayer > div { .thumbnail {
color: transparent; position: relative;
position: absolute; float: left;
line-height:1.3; width: 120px;
} height: 150px;
.annotComment > div { /*
position: absolute; width: 98px;
height: 128px;
margin: 0 10px 20px;
background-color: white;
background-image: url(images/thumbnail.png);
border: 1px solid transparent;
box-shadow: 0 0 0 1px hsla(0,0%,0%,.5),
0 2px 8px hsla(0,0%,0%,.3);
opacity: .8;
-moz-transition-duration: 150ms;
*/
} }
.annotComment > img { .thumbnailImage {
position: absolute; position: absolute;
top: 10px;
left: 10px;
width: 98px;
height: 128px;
/* background-image: url(images/thumbnail.png);*/
border: 1px solid transparent;
box-shadow: 0 0 0 1px hsla(0,0%,0%,.5),
0 2px 8px hsla(0,0%,0%,.3);
opacity: .8;
z-index: 99;
-moz-transition-duration: 150ms;
}
.thumbnailSelectionRing {
position: absolute;
width: 112px;
height: 142px;
margin: 4px;
border-radius: 2px;
-moz-transition-duration: 150ms;
} }
.annotComment > img:hover { .thumbnail:hover > .thumbnailImage {
cursor: pointer; opacity: .9;
opacity: 0.7;
}
.annotComment > div {
padding: 0.2em;
max-width: 20em;
background-color: #F1E47B;
box-shadow: 0px 2px 10px #333;
-moz-box-shadow: 0px 2px 10px #333;
-webkit-box-shadow: 0px 2px 10px #333;
}
.annotComment > div > h1 {
font-weight: normal;
font-size: 1.2em;
border-bottom: 1px solid #000000;
margin: 0px;
}
/* TODO: file FF bug to support ::-moz-selection:window-inactive
so we can override the opaque grey background when the window is inactive;
see https://bugzilla.mozilla.org/show_bug.cgi?id=706209 */
::selection { background:rgba(0,0,255,0.3); }
::-moz-selection { background:rgba(0,0,255,0.3); }
#viewer {
margin: 44px 0px 0px;
padding: 8px 0px;
} }
#sidebarView canvas:hover { .thumbnail:hover > .thumbnailSelectionRing {
background: #ff0; background-color: hsla(0,0%,100%,.15);
box-shadow: 0px 2px 10px #ff0; background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
-moz-box-shadow: 0px 2px 10px #ff0; background-clip: padding-box;
-webkit-box-shadow: 0px 2px 10px #ff0; box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset,
0 0 1px hsla(0,0%,100%,.2) inset,
0 0 1px hsla(0,0%,0%,.2);
color: hsla(0,0%,100%,.9);
} }
#pageWidthOption { .thumbnail.selected > .thumbnailImage {
border-top: 1px solid black; box-shadow: 0 0 0 1px hsla(0,0%,0%,.5);
opacity: 1;
} }
#customScaleOption { .thumbnail.selected > .thumbnailSelectionRing {
display: none; background-color: hsla(0,0%,100%,.3);
background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
background-clip: padding-box;
box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset,
0 0 1px hsla(0,0%,100%,.1) inset,
0 0 1px hsla(0,0%,0%,.2);
color: hsla(0,0%,100%,1);
} }
#errorWrapper { #outlineView {
background: none repeat scroll 0 0 #FF5555;
color: white;
left: 0;
position: fixed; position: fixed;
right: 0; width: 188px;
top: 30px; height: 100%;
z-index: 1000; padding: 52px 4px 0;
padding: 3px; overflow: auto;
font-size: 0.8em;
}
#errorMessageLeft {
float: left;
} }
#errorMessageRight { .outlineEntry {
float: right; width: -moz-calc(100% - 8px);
height: 20px;
padding: 2px 0 0 10px;
margin-bottom: 1px;
border-radius: 2px;
color: hsla(0,0%,100%,.8);
font-size: 13px;
line-height: 15px;
-moz-user-select:none;
cursor: default;
} }
#errorMoreInfo { .outlineEntry:hover {
background-color: #FFFFFF; background-color: hsla(0,0%,100%,.02);
color: black; background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
padding: 3px; background-clip: padding-box;
margin: 3px; box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset,
width: 98%; 0 0 1px hsla(0,0%,100%,.2) inset,
0 0 1px hsla(0,0%,0%,.2);
color: hsla(0,0%,100%,.9);
} }
.clearBoth { .outlineEntry.selected {
clear: both; background-color: hsla(0,0%,100%,.08);
background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
background-clip: padding-box;
box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset,
0 0 1px hsla(0,0%,100%,.1) inset,
0 0 1px hsla(0,0%,0%,.2);
color: hsla(0,0%,100%,1);
} }
/* === Printed media overrides === */ canvas {
@media print { margin: auto;
#sidebar { display: block;
display: none;
}
#controls {
display: none;
}
#viewer {
margin: 0;
padding: 0;
}
.page {
display: none;
margin: 0;
}
.page canvas {
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
}
.page[data-loaded] {
display: block;
page-break-after: always;
}
}
#loadingBox {
margin: 100px 0;
text-align: center;
} }
#loadingBar { .page {
background-color: #333; width: 816px;
display: inline-block; height: 1056px;
border: 1px solid black; margin: 10px auto;
clear: both; position: relative;
margin:0px; overflow: hidden;
line-height: 0; box-shadow: 0px 4px 10px #000;
border-radius: 4px; -moz-box-shadow: 0px 4px 10px #000;
width: 15em; -webkit-box-shadow: 0px 4px 10px #000;
height: 1.5em; background-color: white;
} }
#loadingBar .progress { .page > a {
background-color: green; display: block;
display: inline-block; position: absolute;
float: left;
background: #b4e391;
background: -moz-linear-gradient(top, #b4e391 0%, #61c419 50%, #b4e391 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b4e391), color-stop(50%,#61c419), color-stop(100%,#b4e391));
background: -webkit-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%);
background: -o-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%);
background: -ms-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%);
background: linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%);
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
width: 0%;
height: 100%;
} }
#PDFBug { .page > a:hover {
font-size: 10px; opacity: 0.2;
position: fixed; background: #ff0;
top: 35px; box-shadow: 0px 2px 10px #ff0;
bottom: 5px; -moz-box-shadow: 0px 2px 10px #ff0;
right: 2px; -webkit-box-shadow: 0px 2px 10px #ff0;
width: 300px;
background: white;
border: 1px solid #666;
padding: 0;
}
#PDFBug .controls {
border-bottom: 1px solid #666;
padding: 3px;
background: -moz-linear-gradient(center bottom, #eee 0%, #fff 100%);
}
#PDFBug .panels {
overflow: auto;
position: absolute;
top: 27px;
left: 0;
right: 0;
bottom: 0;
}
#PDFBug button.active {
font-weight: bold;
}
.debuggerShowText {
background: yellow;
color: blue;
opacity: 0.3;
}
.debuggerHideText:hover {
background: yellow;
opacity: 0.3;
}
#PDFBug .stats {
font-size: 10px;
white-space: pre;
font-family: courier;
}
#PDFBug .stats .title {
font-weight: bold;
} }

156
web/viewer.html

@ -1,44 +1,120 @@
<!DOCTYPE html>
<html> <html>
<head> <head>
<title>Simple pdf.js page viewer</title> <title>PDF viewer</title>
<!-- PDFJSSCRIPT_INCLUDE_FIREFOX_EXTENSION --> <!-- PDFJSSCRIPT_INCLUDE_FIREFOX_EXTENSION -->
<link rel="stylesheet" href="viewer.css"/> <link rel="stylesheet" href="viewer.css"/>
<script type="text/javascript" src="compatibility.js"></script> <!-- PDFJSSCRIPT_REMOVE_FIREFOX_EXTENSION --> <script type="text/javascript" src="compatibility.js"></script> <!-- PDFJSSCRIPT_REMOVE_FIREFOX_EXTENSION -->
<!-- PDFJSSCRIPT_INCLUDE_BUILD --> <!-- PDFJSSCRIPT_INCLUDE_BUILD -->
<script type="text/javascript" src="../src/core.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/core.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../src/util.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/util.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../src/metadata.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/metadata.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../src/canvas.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/canvas.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../src/obj.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/obj.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../src/function.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/function.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../src/charsets.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/charsets.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../src/cidmaps.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/cidmaps.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../src/colorspace.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/colorspace.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../src/crypto.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/crypto.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../src/evaluator.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/evaluator.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../src/fonts.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/fonts.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../src/glyphlist.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/glyphlist.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../src/image.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/image.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../src/metrics.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/metrics.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../src/parser.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/parser.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../src/pattern.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/pattern.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../src/stream.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/stream.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../src/worker.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/worker.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../external/jpgjs/jpg.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../external/jpgjs/jpg.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../src/jpx.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/jpx.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="../src/bidi.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript" src="../src/bidi.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript">PDFJS.workerSrc = '../src/worker_loader.js';</script> <!-- PDFJSSCRIPT_REMOVE_CORE --> <script type="text/javascript">PDFJS.workerSrc = '../src/worker_loader.js';</script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
<script type="text/javascript" src="debugger.js"></script> <script type="text/javascript" src="debugger.js"></script>
<script type="text/javascript" src="viewer.js"></script> <script type="text/javascript" src="viewer.js"></script>
</head>
</head>
<body> <body>
<div id="outerContainer">
<div class="toolbar">
<div id="toolbarContainer">
<div id="toolbarSidebar">
<div class="splitToolbarButton toggled">
<div class="toolbarButton viewThumbnail toggled" title="Show Thumbnails"></div>
<div class="splitToolbarButtonSeparator"></div>
<div class="toolbarButton viewOutline" title="Show Document Outline"></div>
</div>
</div>
<div id="toolbarViewer">
<div class="toolbarButton sidebarToggle toggled" title="Toggle Sidebar"></div>
<div class="toolbarButtonSpacer"></div>
<div class="splitToolbarButton">
<div class="toolbarButton pageUp" title="Previous Page"></div>
<div class="splitToolbarButtonSeparator"></div>
<div class="toolbarButton pageDown" title="Next Page"></div>
</div>
<div id="pageNumber" class="toolbarField" contentEditable="true">1</div>
<div id="numPages" class="toolbarLabel"></div>
<div class="toolbarButtonFlexibleSpacer"></div>
<div class="splitToolbarButton">
<div class="toolbarButton zoomOut" title="Zoom Out"></div>
<div class="splitToolbarButtonSeparator"></div>
<div class="toolbarButton zoomIn" title="Zoom In"></div>
</div>
<div class="dropdownToolbarButton">Auto</div>
<div class="toolbarButtonFlexibleSpacer"></div>
<div class="toolbarButton print" title="Print"></div>
<div class="toolbarButton download" title="Download"></div>
<div class="toolbarButtonSpacer"></div>
<div class="toolbarButton bookmark" title="Bookmark (or copy) current location"></div>
</div>
</div>
</div>
<div id="sidebarContainer">
<div id="thumbnailView">
<div class="thumbnail selected">
<div class="thumbnailImage"></div>
<div class="thumbnailSelectionRing"></div>
</div>
<div class="thumbnail">
<div class="thumbnailImage"></div>
<div class="thumbnailSelectionRing"></div>
</div>
<div class="thumbnail">
<div class="thumbnailImage"></div>
<div class="thumbnailSelectionRing"></div>
</div>
<div class="thumbnail">
<div class="thumbnailImage"></div>
<div class="thumbnailSelectionRing"></div>
</div>
<div class="thumbnail">
<div class="thumbnailImage"></div>
<div class="thumbnailSelectionRing"></div>
</div>
</div>
<div id="outlineView">
<div class="outlineEntry selected">Page 1</div>
<div class="outlineEntry">Page 2</div>
<div class="outlineEntry">Page 3</div>
<div class="outlineEntry">Page 4</div>
<div class="outlineEntry">Page 5</div>
</div>
</div>
<div id="viewerContainer">
<div id="viewer" />
</div>
</div> <!-- outerContainer -->
<div style="display:none;">
<div id="controls"> <div id="controls">
<button id="previous" onclick="PDFView.page--;" oncontextmenu="return false;"> <button id="previous" onclick="PDFView.page--;" oncontextmenu="return false;">
<img src="images/go-up.svg" align="top" height="16"/> <img src="images/go-up.svg" align="top" height="16"/>
@ -147,6 +223,8 @@
<div id="loading">Loading... 0%</div> <div id="loading">Loading... 0%</div>
<div id="loadingBar"><div class="progress"></div></div> <div id="loadingBar"><div class="progress"></div></div>
</div> </div>
<div id="viewer"></div>
</div> <!-- display none -->
</body> </body>
</html> </html>

Loading…
Cancel
Save