On Thu, Apr 9, 2009 at 5:32 AM, Pat LeSmithe <qed...@gmail.com> wrote: > > Please see the attached snapshots. The top and bottom bars also have a > search box and source link. > > If there's interest, I can try to get the toggle working in live > documentation. I'd greatly appreciate a critique of the JavaScript code > for the toggle, as I'm not sure it always cooperates with jsMath.
That looks very nice to me! William > > To try this out, backup and replace > > SAGE_ROOT/devel/sage/doc/common/templates/layout.html > > with the attached layout.html. Most of the new version is just Sphinx's > default, which I found in SAGE_ROOT/local/blah/wherever. I couldn't > figure out how to override a macro. Anyway, then do something like > > SAGE_ROOT/sage -docbuild tutorial html --jsmath > > To display the favicon and logo, I downloaded > > http://www.sagemath.org/pix/sageicon.png > > to > > SAGE_ROOT/devel/sage/doc/common/static > > and inside the latter, I did > > ln -s ../../../../../data/extcode/notebook/images/sagelogo.png . > > (The original layout.html looks for sage_logo.png.) Thanks! > > > > > > {%- block doctype -%} {%- endblock %} {%- set reldelim1 = reldelim1 is not > defined and ' »' or reldelim1 %} {%- set reldelim2 = reldelim2 is not defined > and ' |' or reldelim2 %} {%- macro relbar %} > > {{ _('Navigation') }} > > {%- if pagename != "search" %} > {%- endif %} {%- for rellink in rellinks %} > {{ rellink[3] }} {%- if not loop.first %}{{ reldelim2 }}{% endif %} > {%- endfor %} {%- if pagename != "search" %} {%- if builder == 'html' %} > source{{ reldelim2 }} > {%- endif %} {%- endif %} > toggle{{ reldelim2 }} > {%- block rootrellink %} > {{ shorttitle|e }}{{ reldelim1 }} > {%- endblock %} {%- for parent in parents %} > {{ parent.title }}{{ reldelim1 }} > {%- endfor %} {%- block relbaritems %} {% endblock %} > > {%- endmacro %} {%- macro sidebar %} {%- if builder != 'htmlhelp' %} > {%- block sidebarlogo %} {%- if logo %} > > {%- endif %} {%- endblock %} {%- block sidebartoc %} {%- if display_toc %} > > {{ _('Table Of Contents') }} > > {{ toc }} {%- endif %} {%- endblock %} {%- block sidebarrel %} {%- if prev %} > > {{ _('Previous topic') }} > > {{ prev.title }} > > {%- endif %} {%- if next %} > > {{ _('Next topic') }} > > {{ next.title }} > > {%- endif %} {%- endblock %} {%- if sourcename %} > > {{ _('This Page') }} > > {%- if builder == 'web' %} > Comments ({{ comments|length }} so far) > {{ _('Suggest Change') }} > {{ _('Show Source') }} > {%- elif builder == 'html' %} > {{ _('Show Source') }} > {%- endif %} > > {%- endif %} {%- if customsidebar %} {{ rendertemplate(customsidebar) }} {%- > endif %} {%- block sidebarsearch %} {%- if pagename != "search" %} > > {% if builder == 'web' %}{{ _('Keyword search')}}{% else %}{{ _('Quick > search') }}{% endif %} > > {%- if builder == 'web' %} > > {{ _('Enter a module, class or function name.') }} > > {%- endif %} {%- endif %} {%- endblock %} > {%- endif %} {%- endmacro -%} {{ metatags }} {%- if builder != 'htmlhelp' %} > {%- set titlesuffix = " — " + docstitle|e %} {%- endif %} {%- if builder == > 'web' %} {%- for link, type, title in page_links %} {%- endfor %} {%- else %} > {%- endif %} {%- if builder != 'htmlhelp' %} {%- for scriptfile in > script_files %} {%- endfor %} {%- if use_opensearch %} {%- endif %} {%- if > favicon %} {%- endif %} {%- endif %} {%- block linktags %} {%- if > hasdoc('about') %} {%- endif %} {%- if hasdoc('copyright') %} {%- endif %} > {%- if parents %} {%- endif %} {%- if next %} {%- endif %} {%- if prev %} {%- > endif %} {%- endblock %} {% block extrahead %} {% endblock %} > {%- block relbar1 %}{{ relbar() }}{% endblock %} {%- block sidebar1 %} {# > possible location for sidebar #} {% endblock %} {%- block document %} > {%- if builder != 'htmlhelp' %} > {%- endif %} > {% block body %} {% endblock %} > {%- if builder != 'htmlhelp' %} > {%- endif %} > {%- endblock %} {%- block sidebar2 %}{{ sidebar() }}{% endblock %} > {%- block relbar2 %}{{ relbar() }}{% endblock %} {%- block footer %} > {%- if hasdoc('copyright') %} {% trans path=pathto('copyright'), > copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %} {%- else > %} {% trans copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans > %} {%- endif %} {%- if last_updated %} {% trans last_updated=last_updated|e > %}Last updated on {{ last_updated }}.{% endtrans %} {%- endif %} {%- if > show_sphinx %} {% trans sphinx_version=sphinx_version|e %}Created using > Sphinx {{ sphinx_version }}.{% endtrans %} {%- endif %} > {%- endblock %} > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---