-
- % if not len(_args):
- <em>mdx_thumbnail missing arguments!</em>
- <% return STOP_RENDERING %>
- % endif
- <%
- import os
-
- #
- # arguments: full-size image, opt. title, opt. alt-text
- #
- fig_reference = _args[0]
- fig_image = '.thumbnail'.join(os.path.splitext(fig_reference))
-
- if len(_args) > 1:
- fig_title = _args[1]
- else:
- fig_title= ''
-
- fig_caption = fig_title
-
- if len(_args) > 2:
- fig_alt = _args[2]
- else:
- fig_alt= fig_title
- %>
-
- % if fig_caption != '':
- <div class="figure">
- %endif
- <a class="reference external image-reference" href="${fig_reference}" title="${fig_title}"><img alt="${fig_alt}" src="${fig_image}"></a>
- %if fig_caption != '':
- <p class="caption">${fig_caption}</p>
- </div>
- %endif
-