Ignore:
Timestamp:
2023-08-14T18:07:57+12:00 (10 months ago)
Author:
davidb
Message:

A series of changes that deliver on getting the thumbnail/JSON up and running in the document view

Location:
gs3-installations/thewillow/trunk/sites/thewillow/collect/community-contributions
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • gs3-installations/thewillow/trunk/sites/thewillow/collect/community-contributions/etc/collectionConfig.xml

    r37928 r37944  
    8989            </xsl:template>
    9090           
    91             <xsl:template name="coll-descriptionBeforeThomFong">
     91            <xsl:template name="coll-descriptionBeforeThomFongXXXX">
    9292                <p>
    9393                    <gslib:collectionDescriptionTextAndServicesLinks/>
     
    142142                    <div style="margin: 0 auto 20px auto; width: 800px;">
    143143
    144     <gsf:script>
    145 
    146       function seekThenPlayVideo(secs) {
    147         var video = document.getElementById('feature-video');
    148     video.currentTime = secs; // seconds
    149         video.play();
    150     }
    151    
    152     </gsf:script>
    153144    <div style="width: 800px; margin-left: auto; margin-right: auto;">
    154145      <div style="position: relative;">
     
    328319              <option name="-process_exp" value="videos/.*\.html$"/>
    329320              <option name="-description_tags"/>
     321              <!--
     322              <option name="-block_exp" value=".*\.png"/>
     323              <option name="-assoc_files" value="\.png"/>
    330324              <option name="-associate_ext" value="mp4"/>
     325              -->
     326              <!--
     327              <option name="-associate_tail_re" value="(\.png)|(\.mp4)"/>
     328              -->
     329              <option name="-associate_tail_re" value="((?:-thumbnail-\d+)\.png)|(\.json)|(\.mp4)$"/>
    331330            </plugin>           
    332331            <plugin name="HTMLPlugin">
    333                 <option name="-associate_tail_re" value="(?:-assocwith)\.pdf$"/>
     332              <option name="-associate_tail_re" value="(?:-assocwith)\.pdf$"/>
    334333            </plugin>
    335334            <plugin name="PDFv2Plugin"/>
     
    710709
    711710                <xsl:variable name="videolinkfile">
    712                   <gsf:metadata name="videolinkFile"/>
    713                 </xsl:variable>
    714 
    715                 <video controls="controls" style="width: 100%;">
     711                  <gsf:metadata name="assocrootFile"/>.mp4
     712                </xsl:variable>
     713               
     714                <div style="padding-top: 0.8rem; font-style:italic;">
     715                  <gsf:metadata name="InfoBlock"/>
     716                                </div>
     717
     718                <div id="about-this-video" style="padding-top: 0.8rem; visibility: hidden;">
     719                  <gsf:metadata name="AboutThisVideo"/>
     720                                </div>
     721
     722                <gsf:script>
     723                  $(document).ready(function() {
     724                    var escaped_html = $('#about-this-video').html();
     725                    var unescaped_html = escaped_html.replaceAll("&amp;lt;","&lt;").replaceAll("&amp;gt;","&gt;");
     726                    $('#about-this-video').html(unescaped_html).css('visibility','visible');
     727
     728                  });
     729                                </gsf:script>
     730
     731                <video id="video-feature" controls="controls" style="width: 100%; padding-top: 0.8rem;">
    716732                  <source type="video/mp4">
    717733                    <xsl:attribute name='src'>
     
    724740                  <!-- think about adding in an alt text tag -->
    725741                  Your browser does not support the video tag.
    726                 </video>             
     742                </video>       
     743
     744
     745                <div style="width: 800px; margin-left: auto; margin-right: auto;">
     746                  <div style="position: relative;">
     747                    <div class="timeline">
     748                      <gsf:div class="timeline-nav"/>
     749                      <gsf:div class="timeline-container"/>
     750                                    </div>
     751                                  </div>
     752                                </div>
     753
     754                <gsf:style  src="interfaces/{$interface_name}/style/thumbnail-timeline.css"/>
     755                <gsf:script src="interfaces/{$interface_name}/js/anime-2.2.0.min.js"/>
     756                <gsf:script src="interfaces/{$interface_name}/js/thumbnail-timeline.js"/>
     757
     758                <gsf:script>
     759                  getThumbnailsJSON(gs.cgiParams.d, thenInitTimeline);
     760                                </gsf:script>
     761     
    727762            </gsf:template>
    728763           
  • gs3-installations/thewillow/trunk/sites/thewillow/collect/community-contributions/import/the-willow-videos/2 Willow Girl/Willow Girl.html

    r37931 r37944  
    2121
    2222    <Metadata name="AboutThisVideo">
    23       <p>
     23      &lt;p&gt;
    2424        Vicki Fong, daughter of the owners of the Willow, designed the
    2525        iconic graphic identity, which includes the Willow girl and
     
    2828        graphic identity, which includes the ‘Everybody’s Kung Fu
    2929        Fighting’ and ‘King Fong’ t-shirt graphics.   
    30       </p>
     30      &lt;/p&gt;
    3131    </Metadata>
    3232
  • gs3-installations/thewillow/trunk/sites/thewillow/collect/community-contributions/import/the-willow-videos/3 Love it/Love it.html

    r37931 r37944  
    2020
    2121    <Metadata name="AboutThisVideo">
    22       <p>
    23         In the <i>Love It</i> archive film, Willow punters share their
     22      &lt;p&gt;
     23        In the &lt;i&gt;Love It&lt;/i&gt; archive film, Willow punters share their
    2424        experiences of the late night disco; from their very first
    2525        time as a student fresher, to the Willow being a welcoming
     
    2727        interviews and visual contributions from the Willow community,
    2828        which includes wonderful Willow Disco photographs by
    29         <a target="_blank" href="https://www.instagram.com/ceri_oakes">Ceri Oakes</a>
     29        &lt;a target="_blank" href="https://www.instagram.com/ceri_oakes"&gt;Ceri Oakes&lt;/a&gt;
    3030        and a few words from Willow co-owner Tommy Fong.   
    31       </p>
     31      &lt;/p&gt;
    3232    </Metadata>
    3333
  • gs3-installations/thewillow/trunk/sites/thewillow/collect/community-contributions/import/the-willow-videos/4 Cheap Drinks/Cheap Drinks.html

    r37931 r37944  
    2020
    2121    <Metadata name="AboutThisVideo">
    22       <p>
     22      &lt;p&gt;
    2323        The Willow community share their fond memories of cheap drinks
    2424        and the late night venue as a safe space. The ‘Cheap Drinks’
     
    2828        prices and renowned door policy. The ‘Cheap Drinks’ archive
    2929        film contains a rich collection of Willow Disco photographs by
    30         <a target="_blank" href="https://www.instagram.com/ceri_oakes">Ceri Oakes</a>.
    31       </p>
     30        &lt;a target="_blank" href="https://www.instagram.com/ceri_oakes"&gt;Ceri Oakes&lt;/a&gt;.
     31      &lt;/p&gt;
    3232    </Metadata>
    3333
  • gs3-installations/thewillow/trunk/sites/thewillow/collect/community-contributions/import/the-willow-videos/5 Cheesy Music/Cheesy Music.html

    r37931 r37944  
    2121
    2222    <Metadata name="AboutThisVideo">
    23       <p>
    24         In the <i>Cheesy Music</i> archive film, DJ Max, Willow co-owner Soo
     23      &lt;p&gt;
     24        In the &lt;i&gt;Cheesy Music&lt;/i&gt; archive film, DJ Max, Willow co-owner Soo
    2525        Mei Fong and the Willow punters share their stories of the
    2626        music that made the Willow. An inclusive place where you could
     
    2929        make any song request with the DJ just as long as it wasn’t
    3030        The Prodigy!   
    31       </p>
     31      &lt;/p&gt;
    3232    </Metadata>
    3333
  • gs3-installations/thewillow/trunk/sites/thewillow/collect/community-contributions/import/the-willow-videos/6 Last Night/The Last Night.html

    r37931 r37944  
    2121
    2222    <Metadata name="AboutThisVideo">
    23       <p>
     23      &lt;p&gt;
    2424        Experience the last night through the memories of those that
    2525        were there; from humorous live Tweets from a York Vision
    2626        journalist to the passionate final speech from Willow co-owner
    2727        Tommy Fong.
    28       </p>
     28      &lt;/p&gt;
    2929    </Metadata>
    3030
  • gs3-installations/thewillow/trunk/sites/thewillow/collect/community-contributions/prepare/04-PREP-VIDEOS.sh

    r37933 r37944  
    7272    for full_f in "$thumbnail_dir/"*".png" ; do
    7373        echo "  [$i]: $full_f"
     74
     75        # Generate a sequetially numbered thumbnail PNGS
     76        # => resize to be 150 pixels wide (as images are landscape)
     77        # \> means only resize to make smaller, never larger
     78        echo "  Generating smaller thumbnail (120x120): $thumbfile"
     79        thumbfile="$assocfile_root-thumbnail-$i.png"
     80        convert "$full_f" -resize 120\> "$video_dir/$thumbfile"
    7481       
    7582        f=${full_f##*/}
     
    8188        label_md=`echo $label_md  | sed "s/we_re/we're/"`
    8289       
    83         echo "  {"                                >> "$json_file"
    84         echo "    'timestamp': '$timestamp_md',"  >> "$json_file"
    85         echo "    'label'    : '$label_md'"       >> "$json_file"
    86         echo "  }"                                >> "$json_file"
     90        echo "  {"                                    >> "$json_file"
     91        echo "    \"timestamp\" : \"$timestamp_md\"," >> "$json_file"
     92        echo "    \"label\"     : \"$label_md\","     >> "$json_file"
     93        echo "    \"thumbfile\" : \"$thumbfile\""     >> "$json_file"       
     94        echo "  }"                                    >> "$json_file"
    8795
    8896        i=$((i+1))
    8997
    9098        if [ $i -lt $num_thumbnails ] ; then
    91         echo "  ,"                            >> "$json_file"
     99        echo "  ,"                                >> "$json_file"
    92100        fi
    93101    done
    94     echo "]"                                      >> "$json_file"
     102    echo "]"                                          >> "$json_file"
    95103    else
    96104    echo "JSON file already exits => Skipping Thumbnail directory: $thumbnail_dir"
  • gs3-installations/thewillow/trunk/sites/thewillow/collect/community-contributions/prepare/05-RSYNC-TO-IMPORT.sh

    r37867 r37944  
    99rsync -pavH \
    1010      --exclude="*.zip" \
    11       --exclude="*.png" \
     11      --exclude="*Thumbnails - *" \
    1212      --include="*.mp4" \
    1313      the-willow-videos/. ../import/the-willow-videos/.
Note: See TracChangeset for help on using the changeset viewer.