# HG changeset patch # User casties # Date 1343244511 -7200 # Node ID 0b8bed1223adcb391388d05f0d50375ad1474167 # Parent ac232c293ad9a7cfc4974ba99b39fa09837826ef new layout and styles. diff -r ac232c293ad9 -r 0b8bed1223ad css/docuviewer.css --- a/css/docuviewer.css Thu Jul 05 12:08:58 2012 +0200 +++ b/css/docuviewer.css Wed Jul 25 21:28:31 2012 +0200 @@ -1,3 +1,57 @@ + +body { + background-color: #ebebeb; + margin: 5px; + font-size: 12px; +} + +a:link, +a:visited { + color: black; + font-weight: bold; + text-decoration: none; +} +a:hover { + text-decoration: underline; +} + +/* + * head + */ +div.page-head div.logo { + display: table-cell; + vertical-align: top; + padding: 5px; +} +div.page-head div.title-block { + display: table-cell; + vertical-align: top; +} +div.page-head div.title { + max-width: 50em; + border: 1px solid silver; + padding: 0.5em; + background-color: white; +} + +ul.view-switcher { + padding-left: 0; + margin-top: 4px; +} +ul.view-switcher li { + list-style-type: none; + display: inline; + background-color: #d0d0d0; + margin-right: 0; + border-bottom: 1px solid silver; + border-left: 1px solid silver; + border-right: 1px solid silver; + border-radius: 0 0 5px 5px; + padding: 5px; +} +ul.view-switcher li.sel { + background-color: white; +} div.page-body { display: table-row; @@ -7,38 +61,146 @@ vertical-align: top; } -div.toc-text, -div.toc-figures { - max-width: 20em; +/* + * TOC + */ +div.toc-container { + display:table-row; } -div.col.results { - max-width: 20em; +div.toc-switcher { + /* position: relative; */ + display: table-cell; + width: 28px; +} +div.toc-switcher ul { + position: absolute; + z-index: 20; + transform: rotate(270deg); + transform-origin: top left; + -moz-transform: rotate(270deg); + -moz-transform-origin: top left; + -webkit-transform: rotate(270deg); + -webkit-transform-origin: top left; + -o-transform: rotate(270deg); + -o-transform-origin: top left; + left: 12px; + top: 486px; + padding: 0px; +} +div.toc-switcher li { + list-style-type: none; + display: inline; + background-color: #d0d0d0; + margin-bottom: 5px; + border-top: 1px solid silver; + border-left: 1px solid silver; + border-right: 1px solid silver; + border-radius: 5px 5px 0 0; + padding: 5px; +} +div.toc-switcher li.sel { + background-color: white; } -div.toc-text .toc, -div.toc-figures .toc, -div.toc-concordance .toc { +div.tocbody { + z-index: 10; + display: table-cell; + border: 1px solid silver; + padding: 0.5em; + background-color: white; +} + +div.tocbody.text, +div.tocbody.figures { + max-width: 20em; + background-color: white; +} + +div.tocbody.text .toc, +div.tocbody.figures .toc, +div.tocbody.concordance .toc { float:left; clear:right; } -div.toc-text .toc.float.right, -div.toc-figures .toc.float.right, -div.toc-concordance .toc.float.right { +div.tocbody.text .toc.float.right, +div.tocbody.figures .toc.float.right, +div.tocbody.concordance .toc.float.right { float:right; } -table.thumbs .thumb { +div.tocbody table.thumbs td { + text-align: center; +} +div.tocbody table.thumbs .thumb { padding: 3px; } -table.thumbs .thumbsel { +div.tocbody table.thumbs .thumbsel { padding: 2px; border: 1px solid blue; } -table.thumbs .thumbcap { +div.tocbody table.thumbs .thumbcap { color: black; } +/* + * content + */ +div.col.main { + padding-left: 5px; + padding-right: 5px; +} +div.col.main div.ruler { + margin-top: 4px; +} +div.col.main span.ruler-main { + background-color: #d0d0d0; + border-left: 1px solid silver; + border-top: 1px solid silver; + border-right: 1px solid silver; + border-radius: 5px 5px 0 0; + padding: 4px; +} + +div.col.main div.content { + border: 1px solid silver; + padding: 1em; + background-color: white; + font-size: 14px; + font-family: Junicode,Gentium,Georgia,serif; +} +div.col.main div.content a:link, +div.col.main div.content a:visited { + font-weight: inherit; + color: #892B06; +} span.hit.highlight { - background-color: lightgreen; -} \ No newline at end of file + background-color: lime; +} + +/* + * buttons + */ +div.col.buttons div.options { + border: 1px solid silver; + padding: 0.5em; + background-color: white; +} +div.col.buttons h4 { + margin-top: 0; + margin-bottom: 0; +} +div.col.buttons ul { + list-style-type: none; + padding-left: 0; + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +/* + * search results + */ +div.col.results { + max-width: 20em; +} + diff -r ac232c293ad9 -r 0b8bed1223ad documentViewer.py --- a/documentViewer.py Thu Jul 05 12:08:58 2012 +0200 +++ b/documentViewer.py Wed Jul 25 21:28:31 2012 +0200 @@ -143,7 +143,7 @@ common_template = PageTemplateFile('zpt/common_template', globals()) info_xml = PageTemplateFile('zpt/info_xml', globals()) docuviewer_css = ImageFile('css/docuviewer.css',globals()) - # make ImageFile better for development + # make docuviewer_css refreshable for development docuviewer_css.index_html = refreshingImageFileIndexHtml jquery_js = ImageFile('js/jquery.js',globals()) @@ -576,13 +576,21 @@ # image path if mode != 'texttool': - # override image path from texttool with url TODO: how about mode=auto? + # override image path from texttool with url parameter TODO: how about mode=auto? docinfo['imagePath'] = url.replace('/mpiwg/online/', '', 1) # number of images from digilib if docinfo.get('imagePath', None): docinfo['imageURL'] = self.digilibBaseUrl + "/servlet/Scaler?fn=" + docinfo['imagePath'] docinfo = self.getDocinfoFromDigilib(docinfo, docinfo['imagePath']) + else: + # imagePath still missing? try "./pageimg" + imgPath = os.path.join(docUrl, 'pageimg') + docinfo = self.getDocinfoFromDigilib(docinfo, imgPath) + if docinfo.get('numPages', 0) > 0: + # there are pages + docinfo['imagePath'] = imgPath + docinfo['imageURL'] = self.digilibBaseUrl + "/servlet/Scaler?fn=" + docinfo['imagePath'] # check numPages if docinfo.get('numPages', 0) == 0: @@ -662,7 +670,6 @@ docinfo['presentationUrl'] = presentation else: docinfo['presentationUrl'] = os.path.join(docPath, presentation) - return docinfo diff -r ac232c293ad9 -r 0b8bed1223ad zpt/common_template.zpt --- a/zpt/common_template.zpt Thu Jul 05 12:08:58 2012 +0200 +++ b/zpt/common_template.zpt Wed Jul 25 21:28:31 2012 +0200 @@ -11,7 +11,11 @@ docpath docinfo/textURLPath | nothing; bib docinfo/bib | nothing; bibType docinfo/bibType | nothing; formattedLabel python:here.metadataService.getBibFormattedLabel(bibdata=bib);"> -
+ +
+
, , @@ -19,16 +23,24 @@
-
- @@ -47,38 +45,25 @@

Search

- + - + -
Clear
    -
  • - Exact -
  • -
  • - All forms -
  • -
  • - Fulltext index -
  • -
  • - Morphological - index -
  • +
  • + Exact
  • +
  • All forms
  • +
  • + Fulltext index
  • +
  • Morphological index
diff -r ac232c293ad9 -r 0b8bed1223ad zpt/toc_concordance.zpt --- a/zpt/toc_concordance.zpt Thu Jul 05 12:08:58 2012 +0200 +++ b/zpt/toc_concordance.zpt Wed Jul 25 21:28:31 2012 +0200 @@ -5,41 +5,36 @@ - -
+
+ +
-
-
- -
-
- - - - - - - - - - - -
ScanOriginal
- ScanNo - - [] - -
+
+
+ +
+
+ + + + + + + + + + + +
ScanOriginal
ScanNo [] +
+
diff -r ac232c293ad9 -r 0b8bed1223ad zpt/toc_figures.zpt --- a/zpt/toc_figures.zpt Thu Jul 05 12:08:58 2012 +0200 +++ b/zpt/toc_figures.zpt Wed Jul 25 21:28:31 2012 +0200 @@ -5,16 +5,19 @@ - -
+
+ +
-
-
- +
+
+ +
+
-
diff -r ac232c293ad9 -r 0b8bed1223ad zpt/toc_text.zpt --- a/zpt/toc_text.zpt Thu Jul 05 12:08:58 2012 +0200 +++ b/zpt/toc_text.zpt Wed Jul 25 21:28:31 2012 +0200 @@ -5,17 +5,18 @@ - -
+
+ +
-
-
- +
+ +
+
-
- + diff -r ac232c293ad9 -r 0b8bed1223ad zpt/toc_thumbs.zpt --- a/zpt/toc_thumbs.zpt Thu Jul 05 12:08:58 2012 +0200 +++ b/zpt/toc_thumbs.zpt Wed Jul 25 21:28:31 2012 +0200 @@ -5,38 +5,39 @@ - -
+
+ +
-
-
-
- -
+
+
+ +
- - - + - -
- - +

- - -
-
-
-
+ alt idx" />
+ + + + +
+ +
+ +
diff -r ac232c293ad9 -r 0b8bed1223ad zpt/viewer_images.zpt --- a/zpt/viewer_images.zpt Thu Jul 05 12:08:58 2012 +0200 +++ b/zpt/viewer_images.zpt Wed Jul 25 21:28:31 2012 +0200 @@ -24,15 +24,15 @@ tal:attributes="href string:$dlBaseUrl/jquery/jquery.digilib.css" /> + };'''%(dlBaseUrl,docinfo.get('imagePath',''),pageinfo.get('pn','1'))"> - + -
+
- +
@@ -54,12 +52,6 @@
-
@@ -80,52 +72,32 @@
-

Text display

+

Text layer

- +
    -
  • - Text -
      - - - -
    • - - -
    -
  • -
  • - XML
    -
  • + + + +
  • + +
-
+ @@ -135,22 +107,14 @@ tal:define="norm python:pageinfo.get('characterNormalization','regPlusNorm');"> + tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
    -
  • - Original -
  • -
  • - Regularized -
  • -
  • - - Normalized -
  • +
  • Original
  • +
  • Regularized
  • +
  • Normalized
@@ -159,8 +123,7 @@ - diff -r ac232c293ad9 -r 0b8bed1223ad zpt/viewer_xml.zpt --- a/zpt/viewer_xml.zpt Thu Jul 05 12:08:58 2012 +0200 +++ b/zpt/viewer_xml.zpt Wed Jul 25 21:28:31 2012 +0200 @@ -45,12 +45,6 @@
-
@@ -61,31 +55,8 @@
- -
-

Text display

-
- -
    -
  • - Text -
  • -
  • - XML -
  • -
- -
-
- - -
+