Commit b1653f05 by Frances Botsford

layout cleanup on LMS PDF Textbook viewer

parent cb627973
...@@ -100,7 +100,7 @@ select { ...@@ -100,7 +100,7 @@ select {
.toolbar { .toolbar {
/* position: absolute; */ /* position: absolute; */
left: 0; left: 0;
right: 0; right: 0;
height: 32px; height: 32px;
z-index: 9999; z-index: 9999;
cursor: default; cursor: default;
...@@ -185,6 +185,7 @@ select { ...@@ -185,6 +185,7 @@ select {
margin: 0; margin: 0;
} }
.splitToolbarButton > .toolbarButton, /*added */
.splitToolbarButton:hover > .toolbarButton, .splitToolbarButton:hover > .toolbarButton,
.splitToolbarButton:focus > .toolbarButton, .splitToolbarButton:focus > .toolbarButton,
.splitToolbarButton.toggled > .toolbarButton, .splitToolbarButton.toggled > .toolbarButton,
......
div.book-wrapper { div.book-wrapper {
display: table; max-width: 1150px;
table-layout: fixed; margin: 0 auto;
padding: 1em 8em; width: 100%;
background-color: $white;
#toolbarViewer {
padding: 0 ($baseline/2);
#toolbarViewerLeft {
display: inline-block;
}
.outerCenter {
display: inline-block;
float: right !important;
right: auto;
.innerCenter {
right: auto;
}
.dropdownToolbarButton {
margin: 3px 2px 4px 0;
}
}
}
#open_close_accordion { #open_close_accordion {
display: none; display: none;
} }
.pdfbook-wrap {
display: table;
width: 100%;
}
.pdfbook-wrap-inner {
display: table-row;
}
section.book-sidebar { section.book-sidebar {
@extend .sidebar; @extend .sidebar;
@extend .tran; @extend .tran;
...@@ -44,14 +77,17 @@ div.book-wrapper { ...@@ -44,14 +77,17 @@ div.book-wrapper {
li { li {
background: none; background: none;
border-bottom: 0; border-bottom: 0;
padding-left: lh(); padding-left: ($baseline/2);
a { a {
padding: 0;
@include clearfix; @include clearfix;
padding: 0;
color: $link-color;
cursor: pointer;
&:hover { &:hover {
background-color: transparent; background-color: transparent;
color: $link-hover;
.page-number { .page-number {
opacity: 1.0; opacity: 1.0;
...@@ -84,7 +120,7 @@ div.book-wrapper { ...@@ -84,7 +120,7 @@ div.book-wrapper {
> li { > li {
padding: 5px 6px; padding: 5px 6px;
margin: 0 16px 5px 25px; margin: ($baseline/4) ($baseline/2);
} }
} }
} }
...@@ -158,18 +194,20 @@ div.book-wrapper { ...@@ -158,18 +194,20 @@ div.book-wrapper {
} }
section.page { section.page {
border: 1px solid $border-color; border-left: 1px solid $border-color;
background-color: #fff; background-color: #fff;
position: relative; position: relative;
text-align: center; text-align: center;
padding: lh();
margin-right:10%;
border-radius: 0 3px 3px 0; border-radius: 0 3px 3px 0;
img { img {
max-width: 100%; max-width: 100%;
} }
#viewer {
padding: $baseline;
}
div { div {
text-align: left; text-align: left;
line-height: 1.6em; line-height: 1.6em;
...@@ -214,3 +252,6 @@ div.book-wrapper { ...@@ -214,3 +252,6 @@ div.book-wrapper {
} }
} }
} }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<%static:js group='courseware'/> <%static:js group='courseware'/>
<link rel="stylesheet" href="/static/css/pdfviewer.css"/> <link rel="stylesheet" href="/static/css/pdfviewer.css"/>
<script type="text/javascript" src="/static/js/vendor/pdfjs/pdf.js"></script> <script type="text/javascript" src="/static/js/vendor/pdfjs/pdf.js"></script>
<script type="text/javascript" src="/static/js/pdfviewer.js"></script> <script type="text/javascript" src="/static/js/pdfviewer.js"></script>
</%block> </%block>
<%block name="js_extra"> <%block name="js_extra">
...@@ -35,10 +35,10 @@ ...@@ -35,10 +35,10 @@
%if page is not None: %if page is not None:
options.pageNum = ${page}; options.pageNum = ${page};
%endif %endif
$('#outerContainer').PDFViewer(options); $('#outerContainer').PDFViewer(options);
}); });
</script> </script>
</%block> </%block>
<%include file="/courseware/course_navigation.html" args="active_page='pdftextbook/{0}'.format(book_index)" /> <%include file="/courseware/course_navigation.html" args="active_page='pdftextbook/{0}'.format(book_index)" />
...@@ -91,40 +91,43 @@ ...@@ -91,40 +91,43 @@
</div> </div>
%if 'chapters' in textbook: %if 'chapters' in textbook:
<section aria-label="Textbook Navigation" class="book-sidebar"> <div class="pdfbook-wrap">
<ul id="booknav" class="treeview-booknav"> <div class="pdfbook-wrap-inner">
<%def name="print_entry(entry, index_value)"> <section aria-label="Textbook Navigation" class="book-sidebar">
<li id="pdfchapter-${index_value}"> <ul id="booknav" class="treeview-booknav">
<a class="chapter"> <%def name="print_entry(entry, index_value)">
${entry.get('title')} <li id="pdfchapter-${index_value}">
</a> <a class="chapter">
</li> ${entry.get('title')}
</%def> </a>
</li>
</%def>
% for (index, entry) in enumerate(textbook['chapters']): % for (index, entry) in enumerate(textbook['chapters']):
${print_entry(entry, index+1)} ${print_entry(entry, index+1)}
% endfor % endfor
</ul> </ul>
</section> </section>
%endif %endif
<section id="viewerContainer" class="book"> <section id="viewerContainer" class="book">
<section class="page"> <section class="page">
<!-- use same page-turning as used in image-based textbooks --> <!-- use same page-turning as used in image-based textbooks -->
<nav> <nav>
<ul> <ul>
<li class="last"> <li class="last">
<a id="previous">Previous page</a> <a id="previous">Previous page</a>
</li> </li>
<li class="next"> <li class="next">
<a id="next">Next page</a> <a id="next">Next page</a>
</li> </li>
</ul> </ul>
</nav> </nav>
<div id="viewer" contextmenu="viewerContextMenu"></div> <div id="viewer" contextmenu="viewerContextMenu"></div>
</section> </section>
</section> </section>
</div> <!-- pdfbook-wrap-inner -->
</div> <!-- pdfbook-wrap -->
</div> <!-- mainContainer --> </div> <!-- mainContainer -->
</div> <!-- outerContainer --> </div> <!-- outerContainer -->
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment