File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -566,3 +566,18 @@ table.docutils td {
566566 width : 30em ;
567567}
568568
569+ figure {
570+ margin : 1em ;
571+ display : inline-block;
572+ }
573+
574+ figure img {
575+ margin-left : auto;
576+ margin-right : auto;
577+ }
578+
579+ figcaption {
580+ text-align : center;
581+ }
582+
583+
Original file line number Diff line number Diff line change 4141</h4>"""
4242
4343link_template = """\
44- <a href="{link}"><img src="{thumb}" border="0" alt="{basename}"/></a>
44+ <figure>
45+ <a href="{link}"><img src="{thumb}" border="0" alt="{basename}"/></a><br>
46+ <figcaption><a href="{link}">{title}</a></figcaption>
47+ </figure>
4548"""
4649
4750toc_template = """\
@@ -122,7 +125,8 @@ def gen_gallery(app, doctree):
122125 link = 'examples/%s/%s.html' % (subdir , basename )
123126 rows .append (link_template .format (link = link ,
124127 thumb = thumbfile ,
125- basename = basename ))
128+ basename = basename
129+ title = basename ))
126130
127131 if len (data ) == 0 :
128132 warnings .warn ("No thumbnails were found in %s" % subdir )
Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ def generate_example_rst(app):
121121 rstfile = '%s.rst' % basename
122122 outrstfile = os .path .join (rstdir , rstfile )
123123
124+ # XXX make into title
124125 fhsubdirIndex .write (' %s <%s>\n ' % (os .path .basename (basename ),rstfile ))
125126
126127 do_plot = (subdir in example_subdirs
You can’t perform that action at this time.
0 commit comments