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
101 lines (86 loc) · 4.05 KB
/
document_html.html
File metadata and controls
101 lines (86 loc) · 4.05 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{% 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:0px !important;}
{% endblock %}
{% block title %}
{% if doc.get_state_slug == "rfc" %}
RFC {{ doc.rfc_number }} - {{ doc.title }}
{% else %}
{{ doc.name }}-{{ doc.rev }}
{% endif %}
{% endblock %}
{% block bodyAttrs %}style="padding-top: 0;"{% endblock %}
{% block content %}
{% origin %}
<div class="rfcmarkup">
<div class="noprint" style="height: 6px;">
<div onmouseover="this.style.cursor='pointer';"
onclick="showLegend();"
onmouseout="hideLegend()"
style="height: 6px; min-height: 6px; width: 96ex; position: absolute; margin-top:0; "
class="meta-info {{doccolor}}"
title="Click for colour 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 type="text/javascript"><!--
var legend_html = "Colour legend:<br /> \
<table> \
<tr><td>Unknown:</td> <td><span class='cplate bgwhite'> </span></td></tr> \
<tr><td>Draft:</td> <td><span class='cplate bgred'> </span></td></tr> \
<tr><td>Informational:</td> <td><span class='cplate bgorange'> </span></td></tr> \
<tr><td>Experimental:</td> <td><span class='cplate bgyellow'> </span></td></tr> \
<tr><td>Best Common Practice:</td> <td><span class='cplate bgmagenta'> </span></td></tr> \
<tr><td>Proposed Standard:</td> <td><span class='cplate bgblue'> </span></td></tr> \
<tr><td>Draft Standard (old designation):</td> <td><span class='cplate bgcyan'> </span></td></tr> \
<tr><td>Internet Standard:</td> <td><span class='cplate bggreen'> </span></td></tr> \
<tr><td>Historic:</td> <td><span class='cplate bggrey'> </span></td></tr> \
<tr><td>Obsolete:</td> <td><span class='cplate 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 %}