-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtoc.html
More file actions
161 lines (143 loc) · 5.14 KB
/
toc.html
File metadata and controls
161 lines (143 loc) · 5.14 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
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
{% from 'nav.html' import nav %}
<!DOCTYPE html>
{% set metamanagers = ['export()', 'bezier()', 'plotstyle()', 'transform()', 'layer()', 'font()', 'layout()', 'color()', ]%}
{% set managers = ['stroke()', 'fill()', 'pen()', 'translate()', 'rotate()', 'scale()', 'skew()', 'reset()', 'alpha()', 'blend()', 'shadow()', 'plot()', ('plot()', 'clear()'), ('clip()', 'mask()'), ]%}
{%- macro sectionpage(src) -%}
{%- set dst = 'Misc' if src in ('Entropy', 'Utility') else src -%}
ref/{{dst}}.html
{%- endmacro %}
{%- macro reference(sect, link, group) -%}
{% set ctxclass='%s cm' % group if link in managers+metamanagers else group %}
{% set typeclass=' collection' if (group=='types' and link[0]==link[0].lower()) else '' %}
{% if isinstance(link, tuple) %}
<li class="{{ctxclass}}">{% for lnk in link %} <a href="ref/{{sect}}.html#{{lnk}}">{{lnk}}</a> {% endfor%} </li>
{% elif not link %}
<li><hr></li>
{% else %}
<li class="{{ctxclass}}{{typeclass}}"><a href="{{sectionpage(sect)}}#{{link}}">{{link}}</a></li>
{% endif %}
{%- endmacro %}
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1.0">
<script type="text/javascript" src="//use.typekit.net/rlk5mlb.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<link rel="stylesheet" href="etc/toc.css" type="text/css" charset="utf-8">
<title>PlotDevice Manual</title>
</head>
<body class="commands">
<main>
<header>
<h1><a href="http://plotdevice.io">PlotDevice <span>Manual</span></a></h1>
</header>
<a name="tut"></a>
<div id="tutorials" class="toc">
<h1>Tutorials</h1>
<div class="sections">
{% for sect, links in tut.items() %}
<div class="section">
<h2>{{sect}}</h2>
<ul>
{% for link in links %}
<li><a href="tut/{{link}}.html">{{link.replace('_',' ').replace('Bezier','Bézier')}}</a></li>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
</div>
<a name="ref"></a>
<div id="commands" class="toc">
<h1>Commands</h1>
<nav>
<ul class="filter">
<li class="commands active">Modern</li>
<li class='compat'>Legacy</li>
</ul>
<aside class="commands">
<p>Commands marked with a dot support the python <a title="a.k.a. ‘context managers’" href="https://docs.python.org/3/reference/compound_stmts.html#with"><code>with</code></a>
statement to <a href="tut/Graphics_State.html#with">limit their scope</a>.</p>
</aside>
<aside class="compat">
<p>NodeBox commands drawn in cyan are supported but most have been obviated by an alternate syntax.</p>
<p>Consult their reference entries for details.</p>
</aside>
</nav>
<div class="sections">
{% for sect, groups in ref.items() %}
<div class="section {{sect.lower()}}">
<h2><a href="{{sectionpage(sect)}}">{{sect.replace('+',' & ')}}</a></h2>
<ul class="commands">
{% for group in ['commands', 'compat'] %}
{% for link in groups[group] %}
{{ reference(sect, link, group) }}
{% endfor %}
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
</div>
<a name="types"></a>
<div id="types" class="toc">
<h1>Objects</h1>
<nav>
<aside class="types">
<p>To create graphics objects without adding them to the canvas, instantiate them from their respective classes.</p>
</aside>
</nav>
<div class="sections">
{% for sect in sorted(ref) %}
{% if 'types' in ref[sect] %}
<div class="section">
<h2><a href="{{sectionpage(sect)}}">{{sect.replace('+',' & ')}}</a></h2>
<ul>
{% for link in ref[sect]['types'] %}
{{ reference(sect, link, 'types') }}
{% endfor %}
</ul>
</div>
{% endif %}
{% endfor %}
</div>
</div>
{#
<div id="lib" class="toc">
<h1>Libraries</h1>
<div class="sections">
{% for sect, links in lib.items() %}
<div class="section">
<h2>{{sect}}</h2>
<ul>
{% for link in links %}
<li><a href="lib/{{link.replace(' ','_')}}.html">{{link}}</a></li>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
</div>
#}
<footer class="toc">
Adapted from <a href="http://organisms.be">Tom De Smedt</a>’s manual for <a href="https://www.nodebox.net/code/index.php/Home">NodeBox</a>
<a href="http://www.emrg.be/" title="Experimental Media Research Group">© 2004-2012</a>.
<br>
Rewritten for <a href="http://plotdevice.io">PlotDevice</a> by <a href="http://samizdat.co">Christian Swinehart</a> © 2015–<span class="now">2022</span>
</footer>
<script src="etc/cash.min.js"></script>
<script>
$(function(){
$("footer.toc .now").text(new Date().getFullYear())
// handle Commands/Types clicks for the refs
$('.filter').on('click', 'li', function(e){
var elt = $(e.target).closest('li')
$('.filter li.active').removeClass('active')
$('body').attr('class',elt.attr('class'))
elt.addClass('active')
})
})
</script>
</main>
</body>
</html>