Changeset 37087


Ignore:
Timestamp:
2023-01-02T10:11:21+13:00 (4 weeks ago)
Author:
davidb
Message:

Another round of tidy up

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes/transform/pages/document-iiif-manifest.xsl

    r37086 r37087  
    5858  </xsl:template>
    5959 
     60
     61  <!-- **** improve name !!!! -->
    6062 
    6163  <xsl:template name="iiif-links">
     
    7072    <!-- page/pageRequest[@fullURL]="//intermuse.sowemustthink.space/greenstone3/library?a=d.... -->
    7173
    72     <!-- ***** need to work out from raw XML message, say processing something from the above -->
     74    <!-- ***** need to work out domain name to use from raw XML message, say processing something from the above -->
    7375   
    7476    <xsl:variable name="document-location-origin">https://intermuse.sowemustthink.space</xsl:variable>
     
    156158  <xsl:template name="wrappedSectionPost">
    157159
    158     <!-- **** improve name !!!! -->
    159160    <!-- add in IIIF Server link for section image -->
    160161    <xsl:variable name="nodeID" select="@nodeID"/>
     
    226227    <xsl:call-template name="documentContentSimpleIIIFImage"/>
    227228    <xsl:call-template name="documentPost"/>
    228     <!--
    229     <xsl:call-template name="documentPostMirador3OLD"/>
    230     -->
    231229  </xsl:template>
    232230
     
    243241 
    244242
    245   <xsl:template name="documentPostMirador3OLD">
    246 
    247     <!-- Container element of Mirador whose id should be passed to the instantiating call as "id" -->   
    248     <div style="position: relative; width: 100%; height: 800px;">
    249       <div id="mirador3-viewer"> <xsl:comment>filler</xsl:comment></div>
    250     </div>
    251    
    252   </xsl:template>
    253 
    254243  <xsl:template name="wrappedDocumentTopLevel">
    255244
     
    262251
    263252  </xsl:template>
    264 
    265 
    266   <!-- **** see about eliminating the following => shouldn't be needed! !!!! -->
    267     <!-- content of a simple document. Will not be used for editing mode -->
    268     <xsl:template name="documentPostInProgressOLD">
    269 
    270 
    271                 <gsf:script src="https://unpkg.com/mirador@latest/dist/mirador.min.js"/>
    272 
    273 
    274                 <!-- By default uses Roboto font. Be sure to load this or change the font -->
    275                 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" />
    276                 <!-- Container element of Mirador whose id should be passed to the instantiating call as "id" -->
    277                
    278                 <div style="position: relative; width: 100%; height: 800px;">
    279                   <div id="my-mirador"> <xsl:comment>filler</xsl:comment></div>
    280                 </div>
    281                
    282                 <gsf:script>
    283                  
    284 var mirador = Mirador.viewer({
    285   "id": "my-mirador",
    286   "manifests": {
    287     "https://intermuse.sowemustthink.space/greenstone3/sample-manifest.json": {
    288       "provider": "IntermusE"
    289     }
    290     },
    291   "window" : { "panels" : { "annotations": true, "attribution": false } },
    292   "annotations": {
    293     "htmlSanitizationRuleSet": 'iiif', // See src/lib/htmlRules.js for acceptable values
    294     "filteredMotivations": ['oa:commenting', 'oa:tagging', 'sc:painting', 'commenting', 'tagging'],
    295   },   
    296   "windows": [
    297     {
    298       "loadedManifest": "https://intermuse.sowemustthink.space/greenstone3/sample-manifest.json",
    299       "canvasIndex": 1,
    300       "thumbnailNavigationPosition": 'far-bottom'
    301     }
    302   ]
    303 });
    304                 </gsf:script>
    305 
    306      
    307     </xsl:template>
    308    
    309253
    310254
     
    331275    <xsl:template name="wrappedSectionImage">
    332276      <!-- don't need this template to generate anything in the IIIF-Manifest JSON case -->
    333     </xsl:template>
    334    
    335     <xsl:template name="wrappedSectionImageOLD">
    336         <xsl:variable name="screenImageWidth"><gsf:metadata name="ScreenWidth"/></xsl:variable>
    337         <xsl:variable name="screenImageHeight"><gsf:metadata name="ScreenHeight"/></xsl:variable>
    338         <xsl:variable name="imageWidth"><gsf:metadata name="ImageWidth"/></xsl:variable>
    339         <xsl:variable name="imageHeight"><gsf:metadata name="ImageHeight"/></xsl:variable>
    340         <xsl:variable name="docNodeID"><xsl:value-of select="@nodeID"/></xsl:variable> <!-- used to make each 'tidyDiv' unique -->
    341 
    342                 <gsf:div id="image{@nodeID}">
    343                     <xsl:attribute name="style">
    344                         <xsl:choose>
    345                             <xsl:when test="/page/pageRequest/paramList/param[@name = 'view']/@value = 'text'">
    346                                 <xsl:text>display:none;</xsl:text>
    347                             </xsl:when>
    348                             <xsl:otherwise>
    349                                 <xsl:text>display:block;</xsl:text>
    350                             </xsl:otherwise>
    351                         </xsl:choose>
    352                     </xsl:attribute>
    353                     <xsl:call-template name="sectionImage"/><xsl:text> </xsl:text>
    354                 </gsf:div>
    355 
    356 
    357277    </xsl:template>
    358278   
Note: See TracChangeset for help on using the changeset viewer.