summaryrefslogtreecommitdiff
path: root/share/templates/default/view.tmpl
blob: afabe29f25ae330178adcaae56f5dccf99111365 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# A non-empty EXIF summary becomes a title="" attribute so hovering the image
# shows the camera/exposure details, mirroring the details view. This tooltip is
# independent of the Details link below: it stays available even when
# DETAILS_PAGE=no has suppressed the details page itself.
if [ -n "$render_exif_tooltip_html" ]; then
    render_exif_tooltip_attr=" title=\"$render_exif_tooltip_html\""
else
    render_exif_tooltip_attr=''
fi

cat <<END
<div class='view'>
    <a href="${render_page_num_html}-${render_view_next_html}.html">
        <img class='view ${render_animation_class_html}' alt='${render_photo_html}' src='${render_backhref_html}/${render_photos_dir_html}/${render_photo_html}'${render_exif_tooltip_attr}>
    </a>
    <div class="navigator">
        <a href="${render_page_num_html}-${render_view_prev_html}.html" class="arrow">&lArr;</a>
        <a href="page-${render_page_num_html}.html#${render_photo_html}">Thumbnails</a> <span class="nav-sep">|</span>
END

# The Details link is only emitted when DETAILS_PAGE=yes actually rendered the
# *-details.html page it points to; otherwise it would be a dangling link.
# Keeping this as its own conditional cat block (rather than inlining the link
# into a shell variable) keeps the DETAILS_PAGE=yes output byte-for-byte
# identical to before this toggle existed.
if [ "${render_details_page_html}" = 'yes' ]; then
    cat <<END
        <a href="${render_page_num_html}-${render_preview_num_html}-details.html">Details</a> <span class="nav-sep">|</span>
END
fi

cat <<END
        <a href='${render_backhref_html}/${render_photos_dir_html}/${render_photo_html}'>Direct link</a>
        <a href="${render_page_num_html}-${render_view_next_html}.html" class="arrow">&rArr;</a>
    </div>
</div>
END

if [ "${render_original_basepath_is_set}" = 'yes' ]; then
    cat <<END
<p>
    <a href="${render_original_basepath_html}/${render_photo_html}">Original</a>
</p>
END
fi