-
-
Notifications
You must be signed in to change notification settings - Fork 115
/
Copy pathlegalcode.html
135 lines (117 loc) · 4.94 KB
/
legalcode.html
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
{% extends 'base.html' %}
{% load i18n license_tags static %}
{% block title %}
{{ tool.identifier }} {% trans "Legal Code" %} | {{ tool_title }}
{% endblock %}
{% block head_extra %}
<link href="/cc-legal-tools/legalcode.css" rel="stylesheet"/>
{% endblock %}
{% block title_header %}
{% include 'includes/snippet/title_with_icons.html' with document_type="legalcode" %}
{% endblock %}
{% block contextual_menu %}
{% if not legal_code.html %} {# if not raw html #}
{% include 'includes/legalcode_contextual_menu.html' %}
{% endif %}
{% endblock %}
{% block content %}
<div class="tool-meta">
<div class="meta-box">
<article class="canonical-url">
<h2>{% trans "Canonical URL" %}</h2>
<a {% if lang.bidi %}dir="ltr"{% endif %} href="{{ canonical_url_cc}}">{{ canonical_url_cc }}</a>
</article>
<article class="formats">
<h2>{% trans "Other formats" %}</h2>
<ul>
{% if plain_text_url %}
<li><a href="{{ plain_text_url }}">{% trans "Plain Text" %}</a></li>
{% endif %}
<li><a href="rdf">RDF/XML</a></li>
</ul>
</article>
</div>
<div class="alt-view">
<a href="{{ deed_rel_path }}">{% trans "See the deed" %}</a>
</div>
</div>
<p>
{% trans "Version" %} {{ legal_code.tool.version }} •
{% blocktrans trimmed %}
See the <a href="/legal-code-errata/">errata page</a> for any corrections and
the date of change
{% endblocktrans %}
{% if legal_code.translation_last_update %}
• Translation published {{ legal_code.translation_last_update|date:'Y/m/d' }}
{% endif %}
</p>
{% if tool.deprecated_on %}
{# Retired legal tool notice #}
{% include 'includes/notice_deprecated.html' %}
{% endif %}
{% if replaced_path %}
{# Newer license notice #}
{% include 'includes/notice_newer_license.html' %}
{% endif %}
{% if not legal_code.html %}
{% include 'includes/notice_about_licenses_and_cc.html' %} {# CC IS NOT A LAW FIRM #}
{% include 'includes/use_of_licenses.html' %} {# Considerations... #}
{% if tool.category == "publicdomain" and tool.unit == "zero" %}
{% include 'includes/legalcode_zero.html' %} {# <<< THE ACTUAL CC0 LICENSE TEXT #}
{% elif tool.category == "licenses" and tool.version == "4.0" %}
{% include 'includes/legalcode_licenses_4.0.html' %} {# <<< THE ACTUAL 4.0 LICENSE TEXT #}
{% elif tool.category == "licenses" and tool.version == "3.0" and not tool.jurisdiction_code %}
{% include 'includes/legalcode_licenses_3.0_unported.html' %} {# <<< THE ACTUAL 3.0 unported LICENSE TEXT #}
{% else %}
<div id="legal-code-body" class="padding-larger margin-top-bigger has-text-black ">
<p class="has-text-black body-big padding-bottom-normal"><strong>{% trans "Unimplemented" %}</strong> — {% blocktrans %}this legal tool does not have a valid template. Please report this issue:{% endblocktrans %} <a href="https://github.com/creativecommons/cc-legal-tools-app/issues">Issues · creativecommons/cc-legal-tools-app</a>.</p>
</div>
{% endif %}
{# NOTE: plaintext functionality disabled #}
{# {% include 'includes/view_legal_code_link_plain_text.html' %} #}
{% else %}
{% include "includes/legalcode_crude_html.html" %}
{% endif %}
{% include 'includes/notice_about_cc_and_trademark.html' %}
{% include 'includes/related_links.html' %}
{% endblock %}
{% block extra-js%}
<script>
/*
Show/Hide Functionality for expand/collapse sections in use_of_licenses.html
*/
let arrowArray = Array.from(document.getElementsByClassName("angle-down"))
arrowArray.forEach(function(arrow) {
arrow.addEventListener("click", handleArrowClicked);
});
function handleArrowClicked() {
// Toggle consideration section's screen reader announcement text (inside of icon)
if (this.dataset.consideration === "1" && this.dataset.direction === "down") {
this.firstChild.innerHTML = "{% trans "Hide Considerations for Licensors" %}"
} else if (this.dataset.consideration !== "1" && this.dataset.direction === "down") {
this.firstChild.innerHTML = "{% trans "Hide Considerations for the Public" %}"
} else if (this.dataset.consideration === "1" && this.dataset.direction === "up") {
this.firstChild.innerHTML = "{% trans "Show Considerations for Licensors" %}"
} else {
this.firstChild.innerHTML = "{% trans "Show Considerations for the Public" %}"
}
// Toggle icon between up and down
if (this.dataset.direction === "down") {
// toggle icon to up arrow icon
this.classList.remove("angle-down")
this.classList.add("angle-up")
this.dataset.direction = "up"
// show <p> tag
this.parentNode.parentNode.nextSibling.nextSibling.classList.remove("is-hidden");
} else {
// toggle icon to up arrow icon
this.classList.add("angle-down")
this.classList.remove("angle-up")
this.dataset.direction = "down"
// hide <p> tag
this.parentNode.parentNode.nextSibling.nextSibling.classList.add("is-hidden");
}
};
</script>
{% endblock %}
{# vim: ft=jinja.html ts=2 sw=2 sts=2 sr et #}