-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
88 lines (81 loc) · 5.88 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GitHubTree : View Folder Structures | Repo Directories</title>
<meta name="description" content="Easily visualize, sort and explore folder/directory structure of any public GitHub repository, and generate GitHub tree view. Copy file paths with a single click.">
<meta name="keywords" content="GitHub, repository, folder structure, directory tree, visualize, code, open source, file explorer, tree view, copy path">
<meta name="author" content="mgks.dev">
<link rel="icon" href="https://githubtree.mgks.dev/assets/favicon-192.png" size="192x192" type="image/png">
<link rel="icon" href="https://githubtree.mgks.dev/assets/favicon-32.png" size="32x32" type="image/png">
<link rel="icon" href="https://githubtree.mgks.dev/assets/favicon-16.png" size="16x16" type="image/png">
<link rel="shortcut icon" href="https://githubtree.mgks.dev/favicon.ico">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://githubtree.mgks.dev">
<meta property="og:title" content="GitHubTree : View Folder Structures | Repo Directories">
<meta property="og:description" content="Easily visualize, sort and explore folder/directory structure of any public GitHub repository, and generate GitHub tree view. Copy file paths with a single click.">
<meta property="og:image" content="https://githubtree.mgks.dev/assets/preview.png">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://githubtree.mgks.dev">
<meta property="twitter:title" content="GitHubTree : View Folder Structures | Repo Directories">
<meta property="twitter:description" content="Easily visualize, sort and explore folder/directory structure of any public GitHub repository, and generate GitHub tree view. Copy file paths with a single click.">
<meta property="twitter:image" content="https://githubtree.mgks.dev/assets/preview.png">
<link rel="canonical" href="https://githubtree.mgks.dev" />
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" integrity="sha512-9usAa10IRO0HhonpyAIVpjrylPvoDwiPUiKdWk5t3PyolY1cOd4DSE0Ga+ri4AuTroPR5aQvXU9xC6qOPnzFeg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-FDS1LH69VW"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-FDS1LH69VW');
</script>
</head>
<body>
<div class="container">
<div class="header-area">
<h1 id="main-title">
<span><svg xmlns="http://www.w3.org/2000/svg" height="60px" viewBox="0 -940 950 800" width="60px" fill="#024ea2"><path d="M280-80v-160H0l154-240H80l280-400 120 172 120-172 280 400h-74l154 240H680v160H520v-160h-80v160H280Zm389-240h145L659-560h67L600-740l-71 101 111 159h-74l103 160Zm-523 0h428L419-560h67L360-740 234-560h67L146-320Zm0 0h155-67 252-67 155-428Zm523 0H566h74-111 197-67 155-145Zm-149 80h160-160Zm201 0Z"></path></svg></span>_GitHubTree
</h1>
<div class="support-block">
<a href="https://github.com/sponsors/mgks" class="support-button">
<span class="fas fa-heart"></span> Support the Project
</a>
</div>
<div class="input-area">
<input type="text" id="repoInput" placeholder="username/repo" value="mgks/GitHubTree">
<input type="text" id="branchInput" placeholder="branch" value="main">
<button id="fetchButton">Fetch</button>
</div>
<i>Enter a GitHub repository in the format <b>username/repo</b>.</i>
</div>
<div id="loading" style="display: none;"><i>Fetching...</i></div>
<div id="error" style="display: none;"></div>
<div class="tree-container" id="tree-container" style="display: none;">
<div class="tree-header">
<button id="copyTreeButton">Copy Complete Tree</button>
<div class="sort-dropdown">
<button id="sortButton" class="sort-button">Sort <i class="fas fa-caret-down"></i></button>
<div class="sort-options" id="sortOptions">
<div data-sort="folders-first-az">Folders First (A-Z)</div>
<div data-sort="folders-first-za">Folders First (Z-A)</div>
<div data-sort="az">A-Z</div>
<div data-sort="za">Z-A</div>
</div>
</div>
</div>
<pre id="tree"></pre>
</div>
<textarea id="hiddenTree" style="display: none;"></textarea>
<div class="disc">
<i>This works for public repositories only. For private repositories, you'll need to <a href="https://github.com/mgks/GitHubTree">fork this project</a> and add a <a href="https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens" target="_blank">GitHub Personal Access Token</a>.</i>
</div>
</div>
<div class="footer"><a href="https://github.com/mgks"><svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="1.0166668891906738 2.9749999046325684 21.966665267944336 20.024999618530273"><path d="M7 3c-1.535 0-3.078.5-4.25 1.7-2.343 2.4-2.279 6.1 0 8.5L12 23l9.25-9.8c2.279-2.4 2.343-6.1 0-8.5-2.343-2.3-6.157-2.3-8.5 0l-.75.8-.75-.8C10.078 3.5 8.536 3 7 3" fill="#e74c3c"></path></svg> Developed by @mgks</a> | <a href="https://github.com/mgks/GitHubTree">GitHub Repo</a></div>
<script src="script.js"></script>
</body>
</html>