datatracker/ietf/templates/doc/document_format_buttons.html
Robert Sparks 9457e2b1e1
feat: better htmlization views (#4825)
* feat: Use bs5 for htmlized doc (#4082)

Co-authored-by: Martin Thomson <mt@lowentropy.net>

* fix: Various fixes to HTMLized document view (#4501)

* fix: Pref labels were switched

* fix: Fix ToC for htmlized docs

* Replace datatracker button with document name link to datatracker

* ui: Make fonts even larger on larger window widths

* fix: Document format buttons open new tabs

* fix: Various suggestions from Jay

* fix: Don't show "htmlized" self-link under formats

* ui: Font size fix for iOS

* ui: More little tweaks

* feat/htmlize fixes and improvements (#4506)

* fix: Don't open htmlized view in new tab

* fix: Tests were failing

* feat: Add pref settings to cap max font size

* feat: Add ability to hide side panel

* fix: And more `feat/htmlize` fixes (#4511)

* fix: Remove superfluous scrollbars

* fix: Show email links for authors

* fix: Only show "email authors" button for latest reversion

* fix: Remove duplicate code, fix nav scrolling

* feat: Add RFCs to revision lists

* feat: Add pref option to control dependency inlining

* fix: Add analytical tags

* feat: Notify user of rendering inconsistencies

* feat: Split out bootstrap-icons when not inlining dependencies

* fix: Revision list and minor other fixes

* feat: Show stream logo when possible (#4516)

* fix: Remove superfluous scrollbars

* fix: Show email links for authors

* fix: Only show "email authors" button for latest reversion

* fix: Remove duplicate code, fix nav scrolling

* feat: Add RFCs to revision lists

* feat: Add pref option to control dependency inlining

* fix: Add analytical tags

* feat: Notify user of rendering inconsistencies

* feat: Split out bootstrap-icons when not inlining dependencies

* fix: Revision list and minor other fixes

* feat: Show stream logos when possible

* fix: Pick up CSS changes from https://github.com/martinthomson/rfc-txt-html (#4520)

* fix: Remove superfluous scrollbars

* fix: Show email links for authors

* fix: Only show "email authors" button for latest reversion

* fix: Remove duplicate code, fix nav scrolling

* feat: Add RFCs to revision lists

* feat: Add pref option to control dependency inlining

* fix: Add analytical tags

* feat: Notify user of rendering inconsistencies

* feat: Split out bootstrap-icons when not inlining dependencies

* fix: Revision list and minor other fixes

* feat: Show stream logos when possible

* fix: Pick up CSS changes from https://github.com/martinthomson/rfc-txt-html

* chore: add debug script to replicate GitHub Actions test environment

* chore: cleanup from merge of main

* fix: Fix PDFixation crash due to referencing renamed CSS asset (#4665)

* fix: Rename some CSS classes to handle recent xml2rfc changes (#4791)

* Merge main

* fix: Rename some CSS classes to handle recent xml2rfc changes

Fixes #4784.

* chore: repair merge damage

* chore: more merge corrections

* chore: one more merge correction

* fix: npm dependencies

* fix: Change default font size (#4817)

* Fix dependency issues

* Cap fontsize at 12pt by default

Co-authored-by: Nicolas Giard <github@ngpixel.com>

Co-authored-by: Lars Eggert <lars@eggert.org>
Co-authored-by: Martin Thomson <mt@lowentropy.net>
Co-authored-by: Nicolas Giard <github@ngpixel.com>
2022-12-02 15:17:14 -06:00

35 lines
1.5 KiB
HTML

{% if file_urls %}
<div class="buttonlist">
{% for label, url in file_urls %}
{% if label != skip_format %}
<a class="btn btn-primary btn-sm"
{% if label == 'pdf' or label == 'pdfized' %}
download="{% if not snapshot and doc.get_state_slug == 'rfc' %}rfc{{ doc.rfc_number }}{% else %}{{ doc.name }}-{{ doc.rev }}{% endif %}.pdf"
{% comment %}
TODO: determine if we want bibtex to jiust download
{% elif label == 'bibtex' %}
download="{% if not snapshot and doc.get_state_slug == 'rfc' %}rfc{{ doc.rfc_number }}{% else %}{{ doc.name }}-{{ doc.rev }}{% endif %}.bib"
{% endcomment %}
{% endif %}
{% if label != 'htmlized' %}target="_blank"{% endif %}
href="{{ url }}">
{% if label == 'pdf' or label == 'pdfized' %}
<i class="bi bi-file-pdf"></i> pdf
{% elif label == 'xml' or label == 'html' %}
<i class="bi bi-file-code"></i> {{ label}}
{% elif label == 'htmlized' %}
<i class="bi bi-file-code"></i> htmlized
{% elif label == 'bibtex' %}
<i class="bi bi-file-ruled"></i> bibtex
{% elif label == 'plain text' %}
<i class="bi bi-file-text"></i> txt
{% elif label == 'with errata' %}
<i class="bi bi-file-diff"></i> w/errata
{% endif %}
</a>
{% endif %}
{% endfor %}
</div>
{% else %}
<span class="text-muted">(not online)</span>
{% endif %}