-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
89 lines (78 loc) · 3.53 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
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Podfile.lock Dependency Tree</title>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="src/css/main.css">
</head>
<body>
<div class="container mt-5">
<div class="d-flex justify-content-between">
<h1 class="text-center">Podfile.lock Dependency Tree</h1>
<label>
<input class='toggle-checkbox' type='checkbox' id="toggleDarkMode"></input>
<div class='toggle-slot'>
<div class='sun-icon-wrapper'>
<div class="iconify sun-icon" data-icon="feather-sun" data-inline="false"></div>
</div>
<div class='toggle-button'></div>
<div class='moon-icon-wrapper'>
<div class="iconify moon-icon" data-icon="feather-moon" data-inline="false"></div>
</div>
</div>
</label>
</div>
<form id="podfileForm">
<div class="form-group">
<label for="podfileInput">Enter Podfile.lock Content:</label>
<textarea class="form-control" id="podfileInput" rows="5"
placeholder="Paste your Podfile.lock content here"></textarea>
</div>
<button type="button" class="btn btn-primary" id="submitBtn">Submit</button>
</form>
<div class="mt-5" id="graphContainer" style="display: none;">
<div class="d-flex justify-content-between">
<h2>Dependency Tree</h2>
<button class="btn btn-secondary" onclick="exportJson()">Export JSON</button>
</div>
<div class="row mt-2 m-2">
<div class="d-flex mr-2">
<label for="import" class="mr-2">Import</label>
<div id="import" style="background-color: #e9c837; width:20px; height:20px; border-radius:4px"></div>
</div>
<div class="d-flex">
<label for="imported" class="mr-2">Imported by</label>
<div id="imported" style="background-color: #7e26d0; width:20px; height:20px; border-radius:4px"></div>
</div>
<div class="text-center" style="width: -webkit-fill-available;">
<div id="graph"></div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/pdfkit@0.10.0/js/pdfkit.standalone.js"></script>
<script src="https://bundle.run/blob-stream@0.1.3"></script>
<script src="https://cdn.jsdelivr.net/npm/svg-to-pdfkit@0.1.8/source.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://code.iconify.design/1/1.0.4/iconify.min.js"></script>
<script src="src/js/parsePodfile.js"></script>
<script src="src/js/generateGraph.js"></script>
<script src="src/js/darkmode.js"></script>
<script src="src/js/exportJson.js"></script>
<script>
document.getElementById('submitBtn').addEventListener('click', function () {
var podfileContent = document.getElementById('podfileInput').value;
var jsons = parsePodfile(podfileContent);
var containerWidth = document.getElementById('podfileForm').offsetWidth * 0.8;
generateGraph(jsons, containerWidth);
graphContainer = document.getElementById('graphContainer');
graphContainer.style.display = 'block';
});
</script>
</body>
</html>