SuperScriptMaterializer/SuperScriptViewer/templates/viewer.html

93 lines
5.9 KiB
HTML
Raw Normal View History

2020-04-03 23:57:36 +08:00
<!DOCTYPE html>
<html style="height: 100%; margin: 0; padding: 0;">
<head>
<meta charset="utf-8">
<title>Script Viewer</title>
<link rel="stylesheet" href="{{static_css}}">
2020-04-13 09:46:01 +08:00
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.0/dist/jquery.min.js"></script>
<script src="{{static_js}}"></script>
2020-04-03 23:57:36 +08:00
</head>
<body style="display: flex; flex-flow: column; height: 100%; width: 100%; margin: 0; padding: 0;">
<div style="display: flex; background: #cfcfcf; flex-flow: row; width: 100%; height: 50px;">
<div style="display: flex; flex-flow: row; width: 100%; height: 100%; overflow: scroll;">
<p class="hamburger"><a href="/"><b>Script Hierarchy</b></a></p>
2020-04-03 23:57:36 +08:00
{% for i in hamburgerHistory %}
<p class="hamburger">&gt;&gt;</p>
<p class="hamburger"><a href="{{ i.path }}">{{ i.name|e }}</a></p>
{% endfor %}
2020-04-03 23:57:36 +08:00
<p class="hamburger">&gt;&gt;</p>
<p class="hamburger"><b>{{ hamburgerCurrent|e }}</b></p>
2020-04-05 22:34:11 +08:00
2020-04-03 23:57:36 +08:00
</div>
<div style="width: 100px;">
2020-04-13 15:36:37 +08:00
<button style="width: 100px; height: 50px;">Help</button>
2020-04-03 23:57:36 +08:00
</div>
</div>
2020-04-05 22:34:11 +08:00
<div style="background: #7f7f7f; width: 100%; height: 100%; overflow: scroll; position: relative;">
<div>
2020-04-12 15:19:13 +08:00
{# blocks content #}
{% for i in blocks %}
2020-04-13 09:46:01 +08:00
<div class="block-body" style="height: {{ i[12] }}px; width: {{ i[11] }}px; top: {{ i[10] }}px; left: {{ i[9] }}px;" onclick="highlightLink({{ i[1] }});">
2020-04-12 16:02:20 +08:00
{% if i[4] != '{}' %}
2020-04-13 09:46:01 +08:00
<div class="block-target" title="{{ "Name: %s\nType: %s"|format(*pinDecoder2(i[4])) }}" style="height: 6px; width: 6px; top: 0; left: 0;" onclick="highlightLink({{ pinDecoder(i[4]).id }});"></div>
2020-04-12 16:02:20 +08:00
{% endif %}
{% for pin in pinDecoder(i[5]) %}
2020-04-13 09:46:01 +08:00
<div class="block-p" title="{{ "Name: %s\nType: %s"|format(pin.name, pin.type) }}" style="height: 6px; width: 6px; top: 0; left: {{ 20 + loop.index0 * ( 6 + 20) }}px;" onclick="highlightLink({{ pin.id }});"></div>
{% endfor %}
2020-04-12 16:02:20 +08:00
{% for pout in pinDecoder(i[6]) %}
2020-04-13 09:46:01 +08:00
<div class="block-p" title="{{ "Name: %s\nType: %s"|format(pout.name, pout.type) }}" style="height: 6px; width: 6px; bottom: 0; left: {{ 20 + loop.index0 * ( 6 + 20) }}px;" onclick="highlightLink({{ pout.id }});"></div>
{% endfor %}
2020-04-12 16:02:20 +08:00
{% for bin in pinDecoder(i[7]) %}
2020-04-13 09:46:01 +08:00
<div class="block-b" title="{{ "Name: %s\nType: %s"|format(bin.name, bin.type) }}" style="height: 6px; width: 6px; top: {{ 10 + loop.index0 * ( 6 + 20) }}px; left: 0;" onclick="highlightLink({{ bin.id }});"></div>
{% endfor %}
2020-04-12 16:02:20 +08:00
{% for bout in pinDecoder(i[8]) %}
2020-04-13 09:46:01 +08:00
<div class="block-b" title="{{ "Name: %s\nType: %s"|format(bout.name, bout.type) }}" style="height: 6px; width: 6px; top: {{ 10 + loop.index0 * ( 6 + 20) }}px; right: 0;" onclick="highlightLink({{ bout.id }});"></div>
{% endfor %}
2020-04-12 16:02:20 +08:00
{% if i[13] != -1 %}
<p class="block-expandable-text" style="top: 10px; left: 20px;"><a href="{{ "/%s/%s"|format(currentPath, i[13]) }}">{{ i[2]|e }}</a></p>
{% else %}
<p class="block-text" style="top: 10px; left: 20px;">{{ i[2]|e }}</p>
{% endif %}
<p class="block-asstext" style="top: 24px; left: 20px;">{{ i[3]|e }}</p>
2020-04-05 22:34:11 +08:00
</div>
{% endfor %}
2020-04-12 15:19:13 +08:00
{# cells content #}
{% for i in cells %}
2020-04-12 16:02:20 +08:00
<div class="{% if i[6] == 0 %}cell-plocal{% elif i[6] == 1 %}cell-shortcut{% elif i[6] == 2 %}cell-pio{% elif i[6] == 3 %}cell-bio{% else %}cell-ptarget{% endif %}"
style="height: {% if i[6] == 2 or i[6] == 3 %}6{% else %}5{% endif %}px; width: {% if i[6] == 2 or i[6] == 3 %}6{% else %}15{% endif %}px; top: {{ i[5] }}px; left: {{ i[4] }}px;"
2020-04-13 12:35:41 +08:00
title="{{ "Name: %s\nType: %s"|format(i[2], i[3]) }}" ondblclick="queryInfo({{ i[1] }});"></div>
2020-04-12 15:19:13 +08:00
{% endfor %}
2020-04-12 22:38:10 +08:00
<svg version="1.1" width="{{ gWidth }}px" height="{{ gHeight }}px" style="position: absolute; top: 0; left: 0;pointer-events: none;">
{# links content #}
{% for i in links %}
{% if i[1] == -2 %}
<line class="link-elink target{{ i[2] }} target{{ i[3] }} target{{ i[4] }} target{{ i[5] }}" x1="{{ i[10] }}" y1="{{ i[11] }}" x2="{{ i[12] }}" y2="{{ i[13] }}" stroke="cyan" stroke-width="1px" stroke-dasharray="5, 1"></line>
2020-04-12 22:38:10 +08:00
{% elif i[1] == -1 %}
<line class="link-plink target{{ i[2] }} target{{ i[3] }} target{{ i[4] }} target{{ i[5] }}" x1="{{ i[10] }}" y1="{{ i[11] }}" x2="{{ i[12] }}" y2="{{ i[13] }}" stroke="blue" stroke-width="1px" stroke-dasharray="5, 1"></line>
2020-04-12 22:38:10 +08:00
{% else %}
2020-04-13 09:46:01 +08:00
<line class="link-blink target{{ i[2] }} target{{ i[3] }} target{{ i[4] }} target{{ i[5] }}" x1="{{ i[10] }}" y1="{{ i[11] }}" x2="{{ i[12] }}" y2="{{ i[13] }}" stroke="black" stroke-width="1px"></line>
<text class="link-blinkDelay target{{ i[2] }} target{{ i[3] }} link-delay target{{ i[4] }} target{{ i[5] }}" x="{{ (i[10] + i[12]) / 2 }}" y="{{ (i[11] + i[13]) / 2 }}" fill="black">{{ i[1] }}</text>
2020-04-12 22:38:10 +08:00
{% endif %}
{% endfor %}
2020-04-12 22:38:10 +08:00
</svg>
2020-04-03 23:57:36 +08:00
</div>
2020-04-13 12:35:41 +08:00
</div>
<div id="propertyWindow-main" style="position: absolute; background: #0000007f; width: 100%; height: 100%; top: 0; left: 0; display: none;">
<div style="position: absolute; background: white; width: 50%; height: 50%; top: 25%; left: 25%; display: flex; flex-flow: column;">
<p style="margin: 5px;">Properties of <b id="propertyWindow-id"></b></p>
<div id="propertyWindow-container" style="width: 100%; height: 100%; overflow: scroll;">
</div>
<button style="width: 100px; height: 25px; margin: 5px;" onclick="closePropertyWindow();">Close</button>
</div>
2020-04-03 23:57:36 +08:00
</div>
</body>
</html>