forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocument_html.html
More file actions
87 lines (87 loc) · 4.09 KB
/
Copy pathdocument_html.html
File metadata and controls
87 lines (87 loc) · 4.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
{% extends "doc/htmlized_base.html" %}
{# Copyright The IETF Trust 2016, All Rights Reserved #}
{% load origin %}
{% load static %}
{% load ietf_filters %}
{% block pagehead %}
<link rel="alternate"
type="application/atom+xml"
title="Document changes"
href="/feed/document-changes/{{ doc.name }}/">
<meta name="description"
content="{{ doc.title }} {% if doc.get_state_slug == "rfc" %}(RFC {{ rfc_number }}{% if published %}, {{ published.time|date:"F Y" }}{% endif %}{% if obsoleted_by %}; obsoleted by {{ obsoleted_by|join:", " }}{% endif %}){% else %}(Internet-Draft, {{ doc.time|date:"Y" }}){% endif %}">
{% endblock %}
{% block morecss %}
.bgwhite { background-color: white; }
.bgred { background-color: #F44; }
.bggrey { background-color: #666; }
.bgbrown { background-color: #840; }
.bgorange { background-color: #FA0; }
.bgyellow { background-color: #EE0; }
.bgmagenta{ background-color: #F4F; }
.bgblue { background-color: #66F; }
.bgcyan { background-color: #4DD; }
.bggreen { background-color: #4F4; }
.draftcontent { margin-top:1em;}
{% endblock %}
{% block title %}
{% if doc.get_state_slug == "rfc" %}
RFC {{ doc.rfc_number }} - {{ doc.title }}
{% else %}
{{ doc.name }}-{{ doc.rev }}
{% endif %}
{% endblock %}
{% block content %}
{% origin %}
<div class="rfcmarkup">
<div class="noprint" style="height: .5em;">
<div onmouseover="this.style.cursor='pointer';"
onclick="showLegend();"
onmouseout="hideLegend()"
style="height: .5em; min-height: .5em; width: 96ex; "
class="meta-info {{ doccolor }}"
title="Click for color legend.">
</div>
<div id="legend"
class="meta-info noprint pre legend"
style="position:absolute; top: 4px; left: 4ex; visibility:hidden; background-color: white; padding: 4px 9px 5px 7px; border: solid #345 1px; "
onmouseover="showLegend();"
onmouseout="hideLegend();">
</div>
</div>
{% if doc.meta %}
<div class="noprint">
<pre class="pre meta-info">{{ doc.supermeta|safe }}
{{ doc.meta|safe }}</pre>
</div>
{% endif %}
<div class="draftcontent">{{ doc.htmlized|default:"Generation of htmlized text failed"|safe }}</div>
</div>
{% endblock %}
{% block js %}
<script>
var legend_html = "Color legend:<br> \
<table> \
<tr><td>Unknown:</td> <td><span class='bgwhite'> </span></td></tr> \
<tr><td>Draft:</td> <td><span class='bgred'> </span></td></tr> \
<tr><td>Informational:</td> <td><span class='bgorange'> </span></td></tr> \
<tr><td>Experimental:</td> <td><span class='bgyellow'> </span></td></tr> \
<tr><td>Best Common Practice:</td> <td><span class='bgmagenta'> </span></td></tr> \
<tr><td>Proposed Standard:</td> <td><span class='bgblue'> </span></td></tr> \
<tr><td>Draft Standard (old designation):</td> <td><span class='bgcyan'> </span></td></tr> \
<tr><td>Internet Standard:</td> <td><span class='bggreen'> </span></td></tr> \
<tr><td>Historic:</td> <td><span class='bggrey'> </span></td></tr> \
<tr><td>Obsolete:</td> <td><span class='bgbrown'> </span></td></tr> \
</table>";
function showLegend() {
var elem = document.getElementById('legend');
elem.innerHTML = legend_html
elem.style.visibility='visible';
}
function hideLegend() {
var elem = document.getElementById('legend');
elem.style.visibility='hidden';
elem.innerHTML = "";
}
</script>
{% endblock %}