datatracker/ietf/templates/doc/document_html.html
Lars Eggert 9d5d9d5172
fix: replace deprecated bootstrap things (#5858)
* text-muted -> text-body-secondary

* navbar-dark is deprecated

* Remove FIXME block, not an issue anymore

* Remove `navbar-light`
2023-07-18 12:22:28 -05:00

312 lines
19 KiB
HTML

{# Copyright The IETF Trust 2016, All Rights Reserved #}
<!DOCTYPE html>
{% load analytical %}
{% load origin %}
{% load static %}
{% load ietf_filters textfilters %}
{% origin %}
<html lang="en">
<head>
{% analytical_head_top %}
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>
{% if not snapshot and doc.get_state_slug == "rfc" %}
RFC {{ doc.rfc_number }} - {{ doc.title }}
{% else %}
{{ doc.name }}-{{ doc.rev }}
{% endif %}
</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="{{ settings.STATIC_IETF_ORG }}/fonts/inter/import.css" rel="stylesheet">
<link href="{{ settings.STATIC_IETF_ORG }}/fonts/noto-sans-mono/import.css" rel="stylesheet">
{% if request.COOKIES.pagedeps == 'inline' %}
<script>{{ js|safe }}</script>
<style>{{ css|safe }}</style>
{% else %}
<link rel="stylesheet" href="{% static 'ietf/css/document_html_referenced.css' %}">
{% if html %}
<link rel="stylesheet" href="{% static 'ietf/css/document_html_txt.css' %}">
{% endif %}
<script src="{% static 'ietf/js/document_html.js' %}"></script>
{% endif %}
<link rel="alternate" type="application/atom+xml" title="Document changes" href="/feed/document-changes/{{ doc.name }}/">
<meta name="description"
{% if not snapshot and doc.get_state_slug == 'rfc' %}
content="{{ doc.title }} (RFC {{ doc.rfc_number }}{% if published %}, {{ published.time|date:'F Y' }}{% endif %}{% if obsoleted_by %}; obsoleted by {% for rel in obsoleted_by %}{{ rel.source.canonical_name|prettystdname}}{% if not forloop.last%}, {% endif %}{% endfor %}{% endif %})"
{% else %}
content="{{ doc.title }} (Internet-Draft, {{ doc.time|date:'Y' }})"
{% endif %}>
{% include "base/icons.html" %}
{% include "doc/opengraph.html" %}
{% analytical_head_bottom %}
<style>
{# Force "text-overflow: ellipsis" to hide the beginning of a doc name #}
.diff-form .select2-selection__rendered {
direction: rtl;
text-align: left;
}
</style>
</head>
<body>
{% analytical_body_top %}
<button class="btn btn-outline-secondary position-fixed top-0 end-0 m-2 sidebar-toggle"
type="button"
id="sidebar-on"
data-bs-toggle="collapse"
data-bs-target="#sidebar"
aria-expanded="{% if request.COOKIES.sidebar != 'off'%}true{% else %}false{% endif %}"
aria-controls="sidebar"
aria-label="Show metadata sidebar"
title="Show metadata sidebar">
<i class="bi bi-layout-sidebar-reverse"></i>
</button>
<nav class="navbar bg-light px-1 fixed-top d-print-none d-md-none">
<a class="nav-link ps-1"
href="{% url 'ietf.doc.views_doc.document_main' name=doc.canonical_name %}">
{% if not snapshot and doc.get_state_slug == "rfc" %}
RFC {{ doc.rfc_number }}
{% else %}
{{ doc.name }}-{{ doc.rev }}
{% endif %}
<br class="d-sm-none">
<span class="ms-sm-3 badge rounded-pill badge-{% if not snapshot %}{{ doc|std_level_to_label_format }}{% else %}draft{% endif %}">
{% if not snapshot %}
{{ doc.std_level }}
{% else %}
Internet-Draft
{% endif %}
</span>
</a>
<button class="navbar-toggler p-1"
type="button"
data-bs-toggle="collapse"
data-bs-target="#docinfo-collapse"
aria-controls="docinfo-collapse"
aria-expanded="false"
aria-label="Show document information">
<span class="navbar-toggler-icon small"></span>
</button>
<div class="navbar-nav navbar-nav-scroll overscroll-none collapse pt-1" id="docinfo-collapse">
<div class="bg-light p-0">
<table class="table table-sm table-borderless small">
<tbody class="meta align-top">
<tr>
<th scope="row"></th>
<th scope="row">Title</th>
<td class="edit"></td>
<td>{{ doc.title }}</td>
</tr>
</tbody>
{% include "doc/document_info.html" with sidebar=False %}
<tr>
<th scope="row"></th>
<th scope="row"></th>
<td class="edit"></td>
<td>
<a class="btn btn-sm btn-warning mb-3"
target="_blank"
href="https://github.com/ietf-tools/datatracker/issues/new/choose">
Report a bug
<i class="bi bi-bug"></i>
</a>
</td>
</tr>
</table>
</div>
</div>
</nav>
<div class="row g-0">
<div class="col-md-9 d-flex justify-content-center lh-sm"
data-bs-spy="scroll"
data-bs-target="#toc-nav"
data-bs-smooth-scroll="true"
tabindex="0"
id="content">
{% if html and request.COOKIES.htmlconf != 'txt' %}
<div class="rfchtml">
<br class="noprint">
{{ html|safe }}
</div>
{% else %}
<div class="rfcmarkup">
<br class="noprint">
<!-- [html-validate-disable-block attr-quotes, void-style, element-permitted-content, heading-level -- FIXME: rfcmarkup/rfc2html generates HTML with issues] -->
{{ doc.htmlized|default:"Generation of htmlized text failed"|safe }}
</div>
{% endif %}
</div>
<div class="d-print-none col-md-3 bg-light collapse{% if request.COOKIES.sidebar != 'off'%} show{% endif %}" id="sidebar">
<div class="position-fixed border-start sidebar overflow-scroll overscroll-none no-scrollbar">
<button class="btn btn-outline-secondary float-end m-2"
type="button"
id="sidebar-off"
data-bs-toggle="collapse"
data-bs-target="#sidebar"
aria-expanded="{% if request.COOKIES.sidebar != 'off'%}true{% else %}false{% endif %}"
aria-controls="sidebar"
aria-label="Hide metadata sidebar"
title="Hide metadata sidebar">
<i class="bi bi-arrow-bar-up"></i>
</button>
<div class="pt-2 pt-lg-3 px-md-2 px-lg-3">
<a class="btn btn-primary btn-sm" href="{% url 'ietf.doc.views_doc.document_main' name=doc.canonical_name %}">Datatracker</a>
<p class="fw-bold pt-2">
{% if not snapshot and doc.get_state_slug == "rfc" %}
RFC {{ doc.rfc_number }}
{% else %}
{{ doc.name }}-{{ doc.rev }}
{% endif %}
<br>
<span class="badge rounded-pill badge-{% if not snapshot %}{{ doc|std_level_to_label_format }}{% else %}draft{% endif %}">
{% if not snapshot %}
{{ doc.std_level }}
{% else %}
Internet-Draft
{% endif %}
</span>
</p>
{% if request.COOKIES.htmlconf and request.COOKIES.htmlconf != 'html' and html %}
<div class="alert alert-info small">
You are viewing the legacy <code><a class="text-decoration-none text-reset" href="https://github.com/ietf-tools/rfc2html">rfc2html</a></code>
rendering of this document. Change the
preferences for a modern <code><a class="text-decoration-none text-reset" href="https://github.com/ietf-tools/xml2rfc">xml2rfc</a></code>-based
HTMLization.
</div>
{% elif request.COOKIES.htmlconf == 'html' and not html %}
<div class="alert alert-info small">
You are viewing the legacy <code><a class="text-decoration-none text-reset" href="https://github.com/ietf-tools/rfc2html">rfc2html</a></code>
rendering, because no <code><a class="text-decoration-none text-reset" href="https://github.com/ietf-tools/xml2rfc">xml2rfc</a></code>-generated
HTML is available for this document.
</div>
{% endif %}
<ul class="nav nav-tabs nav-fill small" role="tablist">
<li class="nav-item" role="presentation" title="Document information">
<button class="nav-link px-2"
id="docinfo-tab"
data-bs-toggle="tab"
data-bs-target="#docinfo-tab-pane"
type="button"
role="tab"
aria-controls="docinfo-tab-pane"
aria-selected="true">
<i class="bi bi-info-circle"></i><span class="d-none d-md-block d-xl-inline ms-xl-1">Info</span>
</button>
</li>
<li class="nav-item" role="presentation" title="Table of contents">
<button class="nav-link px-2"
id="toc-tab"
data-bs-toggle="tab"
data-bs-target="#toc-tab-pane"
type="button"
role="tab"
aria-controls="toc-tab-pane"
aria-selected="false">
<i class="bi bi-list-ol"></i><span class="d-none d-md-block d-xl-inline ms-xl-1">Contents</span>
</button>
</li>
<li class="nav-item" role="presentation" title="Preferences">
<button class="nav-link px-2"
id="pref-tab"
data-bs-toggle="tab"
data-bs-target="#pref-tab-pane"
type="button"
role="tab"
aria-controls="pref-tab-pane"
aria-selected="false">
<i class="bi bi-gear"></i><span class="d-none d-md-block d-xl-inline ms-xl-1">Prefs</span>
</button>
</li>
</ul>
<div class="tab-content pt-2">
<div class="tab-pane"
id="docinfo-tab-pane"
role="tabpanel"
aria-labelledby="docinfo-tab"
tabindex="0">
<table class="table table-sm table-borderless">
{% include "doc/document_info.html" with sidebar=True %}
</table>
<a class="btn btn-sm btn-warning mb-3"
target="_blank"
href="https://github.com/ietf-tools/datatracker/issues/new/choose">
Report a datatracker bug
<i class="bi bi-bug"></i>
</a>
</div>
<div class="tab-pane mb-5"
id="toc-tab-pane"
role="tabpanel"
aria-labelledby="toc-tab"
tabindex="0">
<nav class="nav nav-pills flex-column small" id="toc-nav">
</nav>
</div>
<div class="tab-pane mb-5 small"
id="pref-tab-pane"
role="tabpanel"
aria-labelledby="pref-tab"
tabindex="0">
<label class="form-label fw-bold mb-2">Show sidebar by default</label>
<div class="btn-group-vertical btn-group-sm d-flex" role="group">
<input type="radio" class="btn-check" name="sidebar" id="on-radio">
<label class="btn btn-outline-primary" for="on-radio">Yes</label>
<input type="radio" class="btn-check" name="sidebar" id="off-radio">
<label class="btn btn-outline-primary" for="off-radio">No</label>
</div>
<label class="form-label fw-bold mt-4 mb-2">Tab to show by default</label>
<div class="btn-group-vertical btn-group-sm d-flex" role="group">
<input type="radio" class="btn-check" name="deftab" id="docinfo-radio">
<label class="btn btn-outline-primary" for="docinfo-radio">
<i class="bi bi-info-circle me-1"></i>Info
</label>
<input type="radio" class="btn-check" name="deftab" id="toc-radio">
<label class="btn btn-outline-primary" for="toc-radio">
<i class="bi bi-list-ol me-1"></i>Contents
</label>
</div>
<label class="form-label fw-bold mt-4 mb-2">HTMLization configuration</label>
<div class="btn-group-vertical btn-group-sm d-flex" role="group">
<input type="radio" class="btn-check" name="htmlconf" id="txt-radio">
<label class="btn btn-outline-primary" for="txt-radio" title="This is the traditional HTMLization method.">
<i class="bi bi-badge-sd me-1"></i>HTMLize the plaintext
</label>
<input type="radio" class="btn-check" name="htmlconf" id="html-radio">
<label class="btn btn-outline-primary" for="html-radio" title="This is the modern HTMLization method.">
<i class="bi bi-badge-hd me-1"></i>Plaintextify the HTML
</label>
</div>
<label class="form-label fw-bold mt-4 mb-2" for="ptsize">Maximum font size</label>
<input type="range" class="form-range" min="7" max="16" id="ptsize" oninput="ptdemo.value = ptsize.value">
<label class="form-label fw-bold mt-4 mb-2">Page dependencies</label>
<div class="btn-group-vertical btn-group-sm d-flex" role="group">
<input type="radio" class="btn-check" name="pagedeps" id="inline-radio">
<label class="btn btn-outline-primary" for="inline-radio" title="Generate larger, standalone web pages that do not require network access to render.">
<i class="bi bi-box me-1"></i>Inline
</label>
<input type="radio" class="btn-check" name="pagedeps" id="reference-radio">
<label class="btn btn-outline-primary" for="reference-radio" title="Generate regular web pages that require network access to render.">
<i class="bi bi-link-45deg me-1"></i>Reference
</label>
</div>
<label class="form-label fw-bold mt-4 mb-2">Citation links</label>
<div class="btn-group-vertical btn-group-sm d-flex" role="group">
<input type="radio" class="btn-check" name="reflinks" id="refsection-radio">
<label class="btn btn-outline-primary" for="refsection-radio" title="Citation links go to the reference section.">
<i class="bi bi-arrow-clockwise"></i> Go to reference section
</label>
<input type="radio" class="btn-check" name="reflinks" id="citation-radio">
<label class="btn btn-outline-primary" for="citation-radio" title="Citation links go directly to the cited document.">
<i class="bi bi-link-45deg me-1"></i>Go to linked document
</label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% analytical_body_bottom %}
</body>
</html>