/
index.html
78 lines (78 loc) · 4.18 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>JSON from figma</title>
<link rel="stylesheet" href="css/styles.css">
<link rel="icon" type="image/png" href="img/favico/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="img/favico/favicon-16x16.png" sizes="16x16">
<script src="js/jquery-3.3.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery.scrollto@2.1.2/jquery.scrollTo.min.js"></script>
<script src="js/renderjson.js"></script>
</head>
<body>
<div class="info-screen">
<div class="info-wrap">
<div class="info">
<div class="info__logo-block">
<div class="project-logo-m"></div>
<div class="info__title">JSON from figma file</div>
</div>
<div class="info__text-block">
<p>Parse and download a JSON from your figma file.</p>
<p>This page doesn’t store or collect your personal tokens 😊</p>
</div>
<div class="info__links"><a href="https://github.com/PavelLaptev/JSON-from-Figma" target="_blank">Project on GitHub</a><a href="https://medium.com/@PavelLaptev/figma-web-api-c581ba769e04" target="_blank">Medium note</a><br>
<div class="icon-link">
<svg class="figma-logo-s"></svg><a href="https://www.figma.com/developers" target="_blank">Figma API</a>
</div>
</div>
</div>
<div class="form">
<div class="input-wrap">
<div class="input-wrap__icon-label">
<label for="token">Personal access token</label><a class="input-wrap__icon-label_help" href="https://www.figma.com/developers/docs#auth-dev-token" target="_blank">?</a>
</div>
<input type="text" id="token" value="373-9c6055ac-53a2-483b-a088-7c5a1e88860f" x-webkit-speech>
</div>
<div class="input-wrap">
<label for="file-id">File ID</label>
<input type="text" id="file-id" value="N48UVj8HUdQOTxn2hfqGHgld" x-webkit-speech>
</div>
<div class="dropdown-wrap">
<label for="dropdown-selector">Filter only</label>
<div id="dropdown-selector">
<div class="dropdown-item"><i class="icon-m_JSON" id="selected-icon"></i><span class="dropdown-item__text">Full JSON structure</span>
<div class="dropdown-item__arrow-down"></div>
</div>
</div>
<div class="dropdown-list">
<div class="dropdown-item select-JSON" style="display:none"><i class="icon-m_JSON"></i><span class="dropdown-item__text">Full JSON structure</span></div>
<div class="dropdown-item select-pages-and-artboards"><i class="icon-m_pages-and-artboards"></i><span class="dropdown-item__text">Pages and artboards</span></div>
<div class="dropdown-item select-pages"><i class="icon-m_pages"></i><span class="dropdown-item__text">Pages</span></div>
<div class="dropdown-item select-artboards"><i class="icon-m_artboards"></i><span class="dropdown-item__text">Artboards</span></div>
<div class="dropdown-item select-by-flag"><i class="icon-m_by-flag"></i><span class="dropdown-item__text">Select artboards by name</span></div>
</div>
</div>
<div class="input-wrap" id="by-flag-wrap" style="display:none;">
<label for="by-flag">Name</label>
<input type="text" id="by-flag" x-webkit-speech>
</div>
<button class="btn__accent">Parse my file</button>
</div>
</div>
<div class="file-result" id="file-result">
<div class="file-result__loader"></div>
<div class="btn-group" style="display:none;">
<button class="btn__primary" id="save-as-json">Save as JSON</button>
<button class="btn__secondary" id="copy-to-clipboard">Copy to clipboard</button>
</div>
<div class="file-result__image"></div>
<h1 class="file-result__name">Figma file name</h1>
<div class="file-result__json"></div>
</div>
</div>
</body>
<script async="" src="js/general-dist.js"></script>
</html>