added some functionality to the archive section
needs a lot more work
@@ -1,3 +0,0 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M24 6L12 24L0 6L6 0H18L24 6ZM16.5 6L12 21.75L7.5 6H16.5Z" fill="#00D4FF"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 227 B |
27
assets/icons/bin.svg
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg fill="#ffffff" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="800px" height="800px" viewBox="0 0 548.291 548.291"
|
||||
xml:space="preserve">
|
||||
<g>
|
||||
<path d="M186.908,266.804c0-11.443-8.735-17.49-24.21-17.49c-7.392,0-11.655,0.452-14.562,0.892v35.195h11.202
|
||||
C177.275,285.401,186.908,278.008,186.908,266.804z"/>
|
||||
<path d="M486.201,196.124h-13.166V132.59c0-0.396-0.062-0.795-0.115-1.196c-0.021-2.523-0.825-5-2.552-6.963L364.651,3.677
|
||||
c-0.032-0.031-0.063-0.042-0.09-0.073c-0.624-0.707-1.364-1.292-2.138-1.795c-0.23-0.157-0.46-0.286-0.701-0.421
|
||||
c-0.673-0.366-1.387-0.671-2.127-0.892c-0.199-0.055-0.373-0.134-0.571-0.188C358.23,0.118,357.39,0,356.556,0H96.757
|
||||
C84.894,0,75.256,9.651,75.256,21.502v174.616H62.09c-16.968,0-30.729,13.756-30.729,30.73v159.812
|
||||
c0,16.968,13.761,30.731,30.729,30.731h13.166V526.79c0,11.854,9.638,21.501,21.501,21.501h354.776
|
||||
c11.853,0,21.501-9.647,21.501-21.501V417.397h13.166c16.966,0,30.729-13.769,30.729-30.736V226.854
|
||||
C516.93,209.874,503.167,196.124,486.201,196.124z M451.534,520.962H96.757V417.397h354.776V520.962z M226.368,332.489
|
||||
c0,13.668-6.284,24.43-15.69,32.052c-10.988,8.735-29.366,13.67-59.403,13.67c-16.813,0-29.365-1.124-36.995-2.247V227.571
|
||||
c8.974-1.796,27.126-3.14,44.166-3.14c20.851,0,33.617,2.016,44.604,8.514c10.536,5.617,18.164,15.917,18.164,29.586
|
||||
c0,13.461-7.848,26.007-24.882,32.297v0.431C213.585,299.983,226.368,312.981,226.368,332.489z M249.699,376.636V225.554h34.295
|
||||
v151.069h-34.295V376.636z M407.291,269.712v-44.158h31.381v151.069h-35.863l-32.272-58.277
|
||||
c-8.967-16.138-18.835-35.646-26.226-53.342l-0.673,0.21c0.893,19.956,1.343,41.258,1.343,65.908v45.501h-31.386V225.554h39.911
|
||||
l31.382,55.362c8.956,15.927,17.921,34.752,24.65,51.791h0.672C407.963,312.75,407.291,292.351,407.291,269.712z M451.534,196.124
|
||||
H96.757V21.502h249.054v110.009c0,5.939,4.817,10.75,10.751,10.75h94.972V196.124z"/>
|
||||
<path d="M159.8,309.841h-11.659v42.584c3.359,0.462,7.391,0.462,13.218,0.462c15.475,0,29.149-5.838,29.149-21.754
|
||||
C190.503,315.889,176.829,309.841,159.8,309.841z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
4
assets/icons/file.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M19 9V17.8C19 18.9201 19 19.4802 18.782 19.908C18.5903 20.2843 18.2843 20.5903 17.908 20.782C17.4802 21 16.9201 21 15.8 21H8.2C7.07989 21 6.51984 21 6.09202 20.782C5.71569 20.5903 5.40973 20.2843 5.21799 19.908C5 19.4802 5 18.9201 5 17.8V6.2C5 5.07989 5 4.51984 5.21799 4.09202C5.40973 3.71569 5.71569 3.40973 6.09202 3.21799C6.51984 3 7.0799 3 8.2 3H13M19 9L13 3M19 9H14C13.4477 9 13 8.55228 13 8V3" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 720 B |
12
assets/icons/folder.svg
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>folder</title>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Shape" fill="#ffffff" transform="translate(42.666667, 85.333333)">
|
||||
<path d="M426.666667,341.333333 L3.55271368e-14,341.333333 L3.55271368e-14,1.42108547e-14 L178.083413,1.42108547e-14 L232.041813,42.6666667 L426.666667,42.6666667 L426.666667,341.333333 Z M42.6666667,298.666667 L384,298.666667 L384,85.3333333 L217.20832,85.3333333 L163.24992,42.6666667 L42.6666667,42.6666667 L42.6666667,298.666667 Z">
|
||||
|
||||
</path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 846 B |
2
assets/icons/json.svg
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg fill="#ffffff" width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.823 15.122c-.517 0-.816.491-.816 1.146 0 .661.311 1.126.82 1.126.517 0 .812-.49.812-1.146 0-.604-.291-1.126-.816-1.126z"/><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zM8.022 16.704c0 .961-.461 1.296-1.2 1.296-.176 0-.406-.029-.557-.08l.086-.615c.104.035.239.06.391.06.319 0 .52-.145.52-.67v-2.122h.761v2.131zm1.459 1.291c-.385 0-.766-.1-.955-.205l.155-.631c.204.105.521.211.846.211.35 0 .534-.146.534-.365 0-.211-.159-.331-.564-.476-.562-.195-.927-.506-.927-.996 0-.576.481-1.017 1.277-1.017.38 0 .659.08.861.171l-.172.615c-.135-.065-.375-.16-.705-.16s-.491.15-.491.325c0 .215.19.311.627.476.596.22.876.53.876 1.006.001.566-.436 1.046-1.362 1.046zm3.306.005c-1.001 0-1.586-.755-1.586-1.716 0-1.012.646-1.768 1.642-1.768 1.035 0 1.601.776 1.601 1.707C14.443 17.33 13.773 18 12.787 18zm4.947-.055h-.802l-.721-1.302a12.64 12.64 0 0 1-.585-1.19l-.016.005c.021.445.031.921.031 1.472v1.016h-.701v-3.373h.891l.701 1.236c.2.354.4.775.552 1.155h.014c-.05-.445-.065-.9-.065-1.406v-.985h.702v3.372zM14 9h-1V4l5 5h-4z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
4
assets/icons/ktx.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="nonzero" clip-rule="nonzero" d="M2.62865 1.58126L4.72709 3.67969H9.79166L7.69322 1.58126H2.62865ZM9.78803 1.58126L14.4187 6.21198V1.82813C14.4187 1.69179 14.3082 1.58126 14.1719 1.58126H9.78803ZM14.112 8.00001L11.5797 5.46772L9.0474 8.00001L11.5797 10.5323L14.112 8.00001ZM12.6271 11.5797L14.4187 13.3714V9.78803L12.6271 11.5797ZM13.3713 14.4188L8 9.04741L2.62865 14.4188H13.3713ZM1.58125 13.3714L6.9526 8.00001L1.58125 2.62866V13.3714ZM8 6.9526L9.79166 5.16094H6.20834L8 6.9526ZM0.0999985 1.82813C0.0999985 0.873713 0.873707 0.100006 1.82812 0.100006H14.1719C15.1263 0.100006 15.9 0.873714 15.9 1.82813V14.1719C15.9 15.1263 15.1263 15.9 14.1719 15.9H1.82812C0.873706 15.9 0.0999985 15.1263 0.0999985 14.1719V1.82813Z" fill="#ffffff"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 980 B |
12
assets/icons/readme.svg
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>audit-report</title>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="icon" fill="#ffffff" transform="translate(42.665250, 42.666667)">
|
||||
<path d="M341.33475,42.6666667 L426.668083,128 L426.668083,384 L0.00141677613,384 L1.36004076e-14,151.329691 C10.0983011,166.682012 24.2153849,184.436546 42.6673443,199.495392 L42.6680834,341.333333 L384.001417,341.333333 L384.001417,138.666667 L330.668083,85.3333333 L290.932237,85.3351205 C285.492739,74.6817682 276.348053,58.8452682 263.198008,42.6667242 L341.33475,42.6666667 Z M341.33475,277.333333 L341.33475,298.666667 L85.3347501,298.666667 L85.3347501,277.333333 L341.33475,277.333333 Z M341.33475,213.333333 L341.33475,234.666667 L213.33475,234.666667 L213.334687,214.29601 C213.875883,213.977904 214.414374,213.65703 214.950164,213.333459 L341.33475,213.333333 Z M138.668083,7.10542736e-15 C235.73475,7.10542736e-15 277.33475,106.666667 277.33475,106.666667 C277.33475,106.666667 235.73475,213.333333 138.668083,213.333333 C41.6014168,213.333333 0.00141677613,106.666667 0.00141677613,106.666667 C0.00141677613,106.666667 41.6014168,7.10542736e-15 138.668083,7.10542736e-15 Z M138.668083,26.6666667 C77.3774168,26.6666667 41.6014168,83.7333333 30.3694168,106.666667 C41.6014168,129.6 77.3774168,186.666667 138.668083,186.666667 C199.95875,186.666667 235.73475,129.6 246.96675,106.666667 C235.73475,83.7333333 199.95875,26.6666667 138.668083,26.6666667 Z M138.668083,60 C165.472303,60 187.201417,80.8933783 187.201417,106.666667 C187.201417,132.439955 165.472303,153.333333 138.668083,153.333333 C111.863864,153.333333 90.1347501,132.439955 90.1347501,106.666667 C90.1347501,80.8933783 111.863864,60 138.668083,60 Z M138.668083,86.6666667 C127.180561,86.6666667 117.868083,95.6209717 117.868083,106.666667 C117.868083,117.712362 127.180561,126.666667 138.668083,126.666667 C150.155606,126.666667 159.468083,117.712362 159.468083,106.666667 C159.468083,95.6209717 150.155606,86.6666667 138.668083,86.6666667 Z" id="Combined-Shape">
|
||||
|
||||
</path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
8
assets/icons/webp.svg
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="Media / Image_02">
|
||||
<path id="Vector" d="M3.00005 18.0001C3 17.9355 3 17.8689 3 17.8002V6.2002C3 5.08009 3 4.51962 3.21799 4.0918C3.40973 3.71547 3.71547 3.40973 4.0918 3.21799C4.51962 3 5.08009 3 6.2002 3H17.8002C18.9203 3 19.4801 3 19.9079 3.21799C20.2842 3.40973 20.5905 3.71547 20.7822 4.0918C21 4.5192 21 5.07899 21 6.19691V17.8031C21 18.2881 21 18.6679 20.9822 18.9774M3.00005 18.0001C3.00082 18.9884 3.01337 19.5058 3.21799 19.9074C3.40973 20.2837 3.71547 20.5905 4.0918 20.7822C4.5192 21 5.07899 21 6.19691 21H17.8036C18.9215 21 19.4805 21 19.9079 20.7822C20.2842 20.5905 20.5905 20.2837 20.7822 19.9074C20.9055 19.6654 20.959 19.3813 20.9822 18.9774M3.00005 18.0001L7.76798 12.4375L7.76939 12.436C8.19227 11.9426 8.40406 11.6955 8.65527 11.6064C8.87594 11.5282 9.11686 11.53 9.33643 11.6113C9.58664 11.704 9.79506 11.9539 10.2119 12.4541L12.8831 15.6595C13.269 16.1226 13.463 16.3554 13.6986 16.4489C13.9065 16.5313 14.1357 16.5406 14.3501 16.4773C14.5942 16.4053 14.8091 16.1904 15.2388 15.7607L15.7358 15.2637C16.1733 14.8262 16.3921 14.6076 16.6397 14.5361C16.8571 14.4734 17.0896 14.4869 17.2988 14.5732C17.537 14.6716 17.7302 14.9124 18.1167 15.3955L20.9822 18.9774M20.9822 18.9774L21 18.9996M15 9C14.4477 9 14 8.55228 14 8C14 7.44772 14.4477 7 15 7C15.5523 7 16 7.44772 16 8C16 8.55228 15.5523 9 15 9Z" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
12
assets/icons/xml.svg
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>xml-document</title>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="icon" fill="#ffffff" transform="translate(62.077867, 42.666667)">
|
||||
<path d="M257.922133,7.10542736e-15 L23.2554667,7.10542736e-15 L23.2554667,234.666667 L65.9221333,234.666667 L65.9221333,192 L65.9221333,169.6 L65.9221333,42.6666667 L240.215467,42.6666667 L321.922133,124.373333 L321.922133,169.6 L321.922133,192 L321.922133,234.666667 L364.5888,234.666667 L364.5888,106.666667 L257.922133,7.10542736e-15 L257.922133,7.10542736e-15 Z M95.936,277.568 L65.728,319.338667 L35.904,277.568 L2.34666667,277.568 L47.3813333,339.946667 L-2.13162821e-14,405.696 L34.0693333,405.696 L64.2986667,362.922667 L94.6773333,405.696 L129.472,405.696 L82.3893333,340.672 L128.938667,277.568 L95.936,277.568 Z M231.0848,346.606933 C228.9088,353.284267 226.4128,361.924267 223.575467,372.462933 C220.759467,361.796267 218.263467,353.1776 216.1728,346.606933 L194.0288,277.3376 L151.255467,277.3376 L151.255467,405.4656 L177.922133,405.4656 L177.922133,301.742933 C180.866133,312.7936 183.447467,321.646933 185.602133,328.3456 L210.562133,405.4656 L235.330133,405.4656 L261.015467,326.1696 C263.6608,318.084267 266.0288,309.956267 268.055467,301.742933 L268.055467,405.4656 L295.831467,405.4656 L295.831467,277.3376 L253.527467,277.3376 L231.0848,346.606933 Z M324.951467,277.568 L324.951467,405.696 L408.855467,405.696 L408.855467,383.082667 L353.815467,383.082667 L353.815467,277.568 L324.951467,277.568 Z" id="XLS">
|
||||
|
||||
</path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -1,3 +0,0 @@
|
||||
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M64 32L32 0L0 32L32 64L64 32ZM58 32L32 32.2871L32 58L58 32Z" fill="#FF6666"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 230 B |
|
Before Width: | Height: | Size: 2.5 KiB |
157
css/explorer.css
Normal file
@@ -0,0 +1,157 @@
|
||||
/* Repository Explorer Specific Styles */
|
||||
.repo-explorer {
|
||||
padding: 50px 5%;
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.file-tree {
|
||||
background-color: rgba(75, 93, 103, 0.2);
|
||||
border: 2px solid var(--accent-color);
|
||||
border-radius: 12px;
|
||||
padding: 20px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.file-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
transition: background-color 0.3s ease;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.file-item:hover {
|
||||
background-color: rgba(75, 93, 103, 0.3);
|
||||
}
|
||||
|
||||
.file-icon {
|
||||
margin-right: 15px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.file-name {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.file-size {
|
||||
color: var(--accent-color);
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.breadcrumb-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.breadcrumb-item:not(:last-child)::after {
|
||||
content: '›';
|
||||
margin-left: 10px;
|
||||
color: var(--accent-color);
|
||||
}
|
||||
|
||||
.breadcrumb-item a {
|
||||
color: var(--primary-color);
|
||||
text-decoration: none;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
.breadcrumb-item a:hover {
|
||||
color: #32ff32;
|
||||
}
|
||||
|
||||
/* Responsive adjustments */
|
||||
@media (max-width: 768px) {
|
||||
.file-item {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.file-size {
|
||||
margin-left: 40px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.readme-section {
|
||||
background-color: rgba(75, 93, 103, 0.2);
|
||||
border: 2px solid var(--accent-color);
|
||||
border-radius: 12px;
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
.readme-content {
|
||||
font-family: 'Inter', sans-serif;
|
||||
line-height: 1.6;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.readme-content h1,
|
||||
.readme-content h2,
|
||||
.readme-content h3 {
|
||||
color: var(--primary-color);
|
||||
margin-bottom: 15px;
|
||||
font-family: 'Space Grotesk', sans-serif;
|
||||
}
|
||||
|
||||
.readme-content h1 { font-size: 2rem; }
|
||||
.readme-content h2 { font-size: 1.5rem; }
|
||||
.readme-content h3 { font-size: 1.25rem; }
|
||||
|
||||
.readme-content p {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.readme-content a {
|
||||
color: var(--primary-color);
|
||||
text-decoration: none;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
.readme-content a:hover {
|
||||
color: #32ff32;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.readme-content code {
|
||||
background-color: rgba(75, 93, 103, 0.3);
|
||||
padding: 2px 5px;
|
||||
border-radius: 4px;
|
||||
font-family: 'Courier New', monospace;
|
||||
}
|
||||
|
||||
.readme-content pre {
|
||||
background-color: rgba(75, 93, 103, 0.3);
|
||||
padding: 15px;
|
||||
border-radius: 8px;
|
||||
overflow-x: auto;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.readme-content ul,
|
||||
.readme-content ol {
|
||||
margin-bottom: 15px;
|
||||
padding-left: 30px;
|
||||
}
|
||||
|
||||
.readme-content img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
border-radius: 8px;
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.readme-content h1 { font-size: 1.5rem; }
|
||||
.readme-content h2 { font-size: 1.25rem; }
|
||||
.readme-content h3 { font-size: 1rem; }
|
||||
}
|
||||
@@ -20,15 +20,15 @@
|
||||
|
||||
<div class="centered-navigation">
|
||||
<nav class="main-navigation">
|
||||
<a href="archives.html" class="nav-button">
|
||||
<a href="subpages/archives.html" class="nav-button">
|
||||
<img src="assets/archives-icon.svg" alt="Archives" class="button-icon">
|
||||
ARCHIVES
|
||||
</a>
|
||||
<a href="tools.html" class="nav-button">
|
||||
<a href="subpages/tools.html" class="nav-button">
|
||||
<img src="assets/tools-icon.svg" alt="Tools" class="button-icon">
|
||||
TOOLS
|
||||
</a>
|
||||
<a href="misc.html" class="nav-button">
|
||||
<a href="subpages/misc.html" class="nav-button">
|
||||
<img src="assets/misc-icon.svg" alt="Misc" class="button-icon">
|
||||
MISC
|
||||
</a>
|
||||
|
||||
46
subpages/archives subpages/BIN/explorer.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Repository Explorer - Map Makers & Programmers</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="../../../css/styles.css">
|
||||
<link rel="stylesheet" href="../../../css/explorer.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="noise-overlay"></div>
|
||||
<div class="overlay">
|
||||
<div class="page-header">
|
||||
<a href="../../archives.html" class="back-button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M15 18l-6-6 6-6" />
|
||||
</svg>
|
||||
Back
|
||||
</a>
|
||||
<h1 class="page-title" id="repo-name">Repository</h1>
|
||||
</div>
|
||||
|
||||
<main class="repo-explorer">
|
||||
<div class="breadcrumb" id="breadcrumb">
|
||||
<!-- loaded with script -->
|
||||
</div>
|
||||
<div class="file-tree" id="file-tree">
|
||||
<!-- loaded with script -->
|
||||
</div>
|
||||
|
||||
<div class="readme-section" id="readme-container">
|
||||
<!-- loaded with script -->
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="site-footer">
|
||||
<div class="footer-content">
|
||||
<p>© 2024 Map Makers & Programmers. A few rights reserved...</p>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script src="explorer.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
212
subpages/archives subpages/BIN/explorer.js
Normal file
@@ -0,0 +1,212 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
// Configuration
|
||||
const GITHUB_API_BASE = 'https://api.github.com/repos';
|
||||
const REPO_OWNER = 'MapMakersAndProgrammers';
|
||||
const REPO_NAME = 'tanki-bin-maps'; // Change this dynamically based on which repo is being viewed
|
||||
|
||||
// DOM Elements
|
||||
const fileTreeEl = document.getElementById('file-tree');
|
||||
const breadcrumbEl = document.getElementById('breadcrumb');
|
||||
const repoNameEl = document.getElementById('repo-name');
|
||||
const readmeContainerEl = document.getElementById('readme-container');
|
||||
|
||||
// Icons for different file types
|
||||
const icons = {
|
||||
folder: '../../../assets/icons/folder.svg',
|
||||
file: '../../../assets/icons/file.svg',
|
||||
'webp': '../../../assets/icons/webp.svg',
|
||||
'ktx': '../../../assets/icons/ktx.svg',
|
||||
'bin': '../../../assets/icons/bin.svg',
|
||||
'json': '../../../assets/icons/json.svg',
|
||||
'xml': '../../../assets/icons/xml.svg',
|
||||
'md': '../../../assets/icons/readme.svg'
|
||||
};
|
||||
|
||||
// Markdown rendering function (using GitHub's API)
|
||||
async function renderMarkdown(markdown) {
|
||||
try {
|
||||
const response = await fetch('https://api.github.com/markdown', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
text: markdown,
|
||||
mode: 'markdown'
|
||||
})
|
||||
});
|
||||
return await response.text();
|
||||
} catch (error) {
|
||||
console.error('Error rendering markdown:', error);
|
||||
return `<p>Error rendering README</p>`;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch and display README
|
||||
*/
|
||||
async function loadReadme() {
|
||||
try {
|
||||
// Fetch README content
|
||||
const readmeResponse = await fetch(`${GITHUB_API_BASE}/${REPO_OWNER}/${REPO_NAME}/readme`);
|
||||
const readmeData = await readmeResponse.json();
|
||||
|
||||
// Decode base64 README content
|
||||
const readmeContent = atob(readmeData.content);
|
||||
|
||||
// Render markdown
|
||||
const renderedReadme = await renderMarkdown(readmeContent);
|
||||
|
||||
// Create README container
|
||||
const readmeWrapper = document.createElement('div');
|
||||
readmeWrapper.classList.add('readme-content');
|
||||
readmeWrapper.innerHTML = renderedReadme;
|
||||
|
||||
// Clear previous content and append new README
|
||||
readmeContainerEl.innerHTML = '';
|
||||
readmeContainerEl.appendChild(readmeWrapper);
|
||||
} catch (error) {
|
||||
console.error('Error loading README:', error);
|
||||
readmeContainerEl.innerHTML = `<p>No README available</p>`;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get appropriate icon for a file type
|
||||
* @param {string} name - Filename
|
||||
* @param {string} type - File type (dir or file)
|
||||
* @returns {string} Path to icon
|
||||
*/
|
||||
function getFileIcon(name, type) {
|
||||
if (type === 'dir') return icons.folder;
|
||||
const ext = name.split('.').pop().toLowerCase();
|
||||
return icons[ext] || icons.file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format bytes to human-readable string
|
||||
* @param {number} bytes - Size in bytes
|
||||
* @returns {string} Formatted file size
|
||||
*/
|
||||
function formatBytes(bytes) {
|
||||
if (bytes === 0) return '0 B';
|
||||
const k = 1024;
|
||||
const sizes = ['B', 'KB', 'MB', 'GB'];
|
||||
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
||||
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
|
||||
}
|
||||
|
||||
/**
|
||||
* Create breadcrumb navigation
|
||||
* @param {string} path - Current path in repository
|
||||
*/
|
||||
function createBreadcrumb(path) {
|
||||
breadcrumbEl.innerHTML = '';
|
||||
const parts = path.split('/').filter(p => p);
|
||||
|
||||
const homeLink = document.createElement('div');
|
||||
homeLink.classList.add('breadcrumb-item');
|
||||
homeLink.innerHTML = `<a href="#" data-path="">Repository Root</a>`;
|
||||
breadcrumbEl.appendChild(homeLink);
|
||||
|
||||
parts.forEach((part, index) => {
|
||||
const crumb = document.createElement('div');
|
||||
crumb.classList.add('breadcrumb-item');
|
||||
const fullPath = parts.slice(0, index + 1).join('/');
|
||||
crumb.innerHTML = `<a href="#" data-path="${fullPath}">${part}</a>`;
|
||||
breadcrumbEl.appendChild(crumb);
|
||||
});
|
||||
|
||||
// Add click listeners to breadcrumb items
|
||||
breadcrumbEl.querySelectorAll('a').forEach(link => {
|
||||
link.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
loadRepoContents(link.dataset.path);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Load and display repository contents
|
||||
* @param {string} [path=''] - Path within the repository
|
||||
*/
|
||||
async function loadRepoContents(path = '') {
|
||||
try {
|
||||
const apiUrl = `${GITHUB_API_BASE}/${REPO_OWNER}/${REPO_NAME}/contents/${path}`;
|
||||
const response = await fetch(apiUrl);
|
||||
const contents = await response.json();
|
||||
|
||||
// Filter out README.md doesnt work :(
|
||||
const filteredContents = contents.filter(item =>
|
||||
item.name.toLowerCase() !== 'readme.md'
|
||||
);
|
||||
|
||||
// Sort contents: folders first, then files
|
||||
contents.sort((a, b) => {
|
||||
if (a.type === 'dir' && b.type !== 'dir') return -1;
|
||||
if (a.type !== 'dir' && b.type === 'dir') return 1;
|
||||
return a.name.localeCompare(b.name);
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Clear previous contents
|
||||
fileTreeEl.innerHTML = '';
|
||||
|
||||
// Update page title
|
||||
repoNameEl.textContent = REPO_NAME;
|
||||
|
||||
// Create breadcrumb
|
||||
createBreadcrumb(path);
|
||||
|
||||
// Render contents
|
||||
contents.forEach(item => {
|
||||
const fileItem = document.createElement('div');
|
||||
fileItem.classList.add('file-item');
|
||||
|
||||
const icon = document.createElement('img');
|
||||
icon.src = getFileIcon(item.name, item.type);
|
||||
icon.alt = item.type;
|
||||
icon.classList.add('file-icon');
|
||||
|
||||
const nameEl = document.createElement('div');
|
||||
nameEl.classList.add('file-name');
|
||||
nameEl.textContent = item.name;
|
||||
|
||||
const sizeEl = document.createElement('div');
|
||||
sizeEl.classList.add('file-size');
|
||||
sizeEl.textContent = item.type === 'file' ? formatBytes(item.size) : '';
|
||||
|
||||
fileItem.appendChild(icon);
|
||||
fileItem.appendChild(nameEl);
|
||||
fileItem.appendChild(sizeEl);
|
||||
|
||||
// Add click handler for folders
|
||||
if (item.type === 'dir') {
|
||||
fileItem.addEventListener('click', () => {
|
||||
loadRepoContents(`${path}/${item.name}`);
|
||||
});
|
||||
} else if (item.type === 'file') {
|
||||
// Optional: Add file preview/download logic
|
||||
fileItem.addEventListener('click', () => {
|
||||
window.open(item.html_url, '_blank');
|
||||
});
|
||||
}
|
||||
|
||||
fileTreeEl.appendChild(fileItem);
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
console.error('Error loading repository contents:', error);
|
||||
fileTreeEl.innerHTML = `<p>Error loading repository contents. Please try again.</p>`;
|
||||
}
|
||||
}
|
||||
|
||||
async function initializeRepository() {
|
||||
await loadRepoContents();
|
||||
await loadReadme();
|
||||
}
|
||||
|
||||
// Initial load
|
||||
initializeRepository();
|
||||
});
|
||||
46
subpages/archives subpages/JSON/explorer.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Repository Explorer - Map Makers & Programmers</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="../../../css/styles.css">
|
||||
<link rel="stylesheet" href="../../../css/explorer.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="noise-overlay"></div>
|
||||
<div class="overlay">
|
||||
<div class="page-header">
|
||||
<a href="../../archives.html" class="back-button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M15 18l-6-6 6-6" />
|
||||
</svg>
|
||||
Back
|
||||
</a>
|
||||
<h1 class="page-title" id="repo-name">Repository</h1>
|
||||
</div>
|
||||
|
||||
<main class="repo-explorer">
|
||||
<div class="breadcrumb" id="breadcrumb">
|
||||
<!-- loaded with script -->
|
||||
</div>
|
||||
<div class="file-tree" id="file-tree">
|
||||
<!-- loaded with script -->
|
||||
</div>
|
||||
|
||||
<div class="readme-section" id="readme-container">
|
||||
<!-- loaded with script -->
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="site-footer">
|
||||
<div class="footer-content">
|
||||
<p>© 2024 Map Makers & Programmers. A few rights reserved...</p>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script src="explorer.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
212
subpages/archives subpages/JSON/explorer.js
Normal file
@@ -0,0 +1,212 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
// Configuration
|
||||
const GITHUB_API_BASE = 'https://api.github.com/repos';
|
||||
const REPO_OWNER = 'MapMakersAndProgrammers';
|
||||
const REPO_NAME = 'tanki-json-maps'; // Change this dynamically based on which repo is being viewed
|
||||
|
||||
// DOM Elements
|
||||
const fileTreeEl = document.getElementById('file-tree');
|
||||
const breadcrumbEl = document.getElementById('breadcrumb');
|
||||
const repoNameEl = document.getElementById('repo-name');
|
||||
const readmeContainerEl = document.getElementById('readme-container');
|
||||
|
||||
// Icons for different file types
|
||||
const icons = {
|
||||
folder: '../../../assets/icons/folder.svg',
|
||||
file: '../../../assets/icons/file.svg',
|
||||
'webp': '../../../assets/icons/webp.svg',
|
||||
'ktx': '../../../assets/icons/ktx.svg',
|
||||
'bin': '../../../assets/icons/bin.svg',
|
||||
'json': '../../../assets/icons/json.svg',
|
||||
'xml': '../../../assets/icons/xml.svg',
|
||||
'md': '../../../assets/icons/readme.svg'
|
||||
};
|
||||
|
||||
// Markdown rendering function (using GitHub's API)
|
||||
async function renderMarkdown(markdown) {
|
||||
try {
|
||||
const response = await fetch('https://api.github.com/markdown', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
text: markdown,
|
||||
mode: 'markdown'
|
||||
})
|
||||
});
|
||||
return await response.text();
|
||||
} catch (error) {
|
||||
console.error('Error rendering markdown:', error);
|
||||
return `<p>Error rendering README</p>`;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch and display README
|
||||
*/
|
||||
async function loadReadme() {
|
||||
try {
|
||||
// Fetch README content
|
||||
const readmeResponse = await fetch(`${GITHUB_API_BASE}/${REPO_OWNER}/${REPO_NAME}/readme`);
|
||||
const readmeData = await readmeResponse.json();
|
||||
|
||||
// Decode base64 README content
|
||||
const readmeContent = atob(readmeData.content);
|
||||
|
||||
// Render markdown
|
||||
const renderedReadme = await renderMarkdown(readmeContent);
|
||||
|
||||
// Create README container
|
||||
const readmeWrapper = document.createElement('div');
|
||||
readmeWrapper.classList.add('readme-content');
|
||||
readmeWrapper.innerHTML = renderedReadme;
|
||||
|
||||
// Clear previous content and append new README
|
||||
readmeContainerEl.innerHTML = '';
|
||||
readmeContainerEl.appendChild(readmeWrapper);
|
||||
} catch (error) {
|
||||
console.error('Error loading README:', error);
|
||||
readmeContainerEl.innerHTML = `<p>No README available</p>`;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get appropriate icon for a file type
|
||||
* @param {string} name - Filename
|
||||
* @param {string} type - File type (dir or file)
|
||||
* @returns {string} Path to icon
|
||||
*/
|
||||
function getFileIcon(name, type) {
|
||||
if (type === 'dir') return icons.folder;
|
||||
const ext = name.split('.').pop().toLowerCase();
|
||||
return icons[ext] || icons.file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format bytes to human-readable string
|
||||
* @param {number} bytes - Size in bytes
|
||||
* @returns {string} Formatted file size
|
||||
*/
|
||||
function formatBytes(bytes) {
|
||||
if (bytes === 0) return '0 B';
|
||||
const k = 1024;
|
||||
const sizes = ['B', 'KB', 'MB', 'GB'];
|
||||
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
||||
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
|
||||
}
|
||||
|
||||
/**
|
||||
* Create breadcrumb navigation
|
||||
* @param {string} path - Current path in repository
|
||||
*/
|
||||
function createBreadcrumb(path) {
|
||||
breadcrumbEl.innerHTML = '';
|
||||
const parts = path.split('/').filter(p => p);
|
||||
|
||||
const homeLink = document.createElement('div');
|
||||
homeLink.classList.add('breadcrumb-item');
|
||||
homeLink.innerHTML = `<a href="#" data-path="">Repository Root</a>`;
|
||||
breadcrumbEl.appendChild(homeLink);
|
||||
|
||||
parts.forEach((part, index) => {
|
||||
const crumb = document.createElement('div');
|
||||
crumb.classList.add('breadcrumb-item');
|
||||
const fullPath = parts.slice(0, index + 1).join('/');
|
||||
crumb.innerHTML = `<a href="#" data-path="${fullPath}">${part}</a>`;
|
||||
breadcrumbEl.appendChild(crumb);
|
||||
});
|
||||
|
||||
// Add click listeners to breadcrumb items
|
||||
breadcrumbEl.querySelectorAll('a').forEach(link => {
|
||||
link.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
loadRepoContents(link.dataset.path);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Load and display repository contents
|
||||
* @param {string} [path=''] - Path within the repository
|
||||
*/
|
||||
async function loadRepoContents(path = '') {
|
||||
try {
|
||||
const apiUrl = `${GITHUB_API_BASE}/${REPO_OWNER}/${REPO_NAME}/contents/${path}`;
|
||||
const response = await fetch(apiUrl);
|
||||
const contents = await response.json();
|
||||
|
||||
// Filter out README.md doesnt work :(
|
||||
const filteredContents = contents.filter(item =>
|
||||
item.name.toLowerCase() !== 'readme.md'
|
||||
);
|
||||
|
||||
// Sort contents: folders first, then files
|
||||
contents.sort((a, b) => {
|
||||
if (a.type === 'dir' && b.type !== 'dir') return -1;
|
||||
if (a.type !== 'dir' && b.type === 'dir') return 1;
|
||||
return a.name.localeCompare(b.name);
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Clear previous contents
|
||||
fileTreeEl.innerHTML = '';
|
||||
|
||||
// Update page title
|
||||
repoNameEl.textContent = REPO_NAME;
|
||||
|
||||
// Create breadcrumb
|
||||
createBreadcrumb(path);
|
||||
|
||||
// Render contents
|
||||
contents.forEach(item => {
|
||||
const fileItem = document.createElement('div');
|
||||
fileItem.classList.add('file-item');
|
||||
|
||||
const icon = document.createElement('img');
|
||||
icon.src = getFileIcon(item.name, item.type);
|
||||
icon.alt = item.type;
|
||||
icon.classList.add('file-icon');
|
||||
|
||||
const nameEl = document.createElement('div');
|
||||
nameEl.classList.add('file-name');
|
||||
nameEl.textContent = item.name;
|
||||
|
||||
const sizeEl = document.createElement('div');
|
||||
sizeEl.classList.add('file-size');
|
||||
sizeEl.textContent = item.type === 'file' ? formatBytes(item.size) : '';
|
||||
|
||||
fileItem.appendChild(icon);
|
||||
fileItem.appendChild(nameEl);
|
||||
fileItem.appendChild(sizeEl);
|
||||
|
||||
// Add click handler for folders
|
||||
if (item.type === 'dir') {
|
||||
fileItem.addEventListener('click', () => {
|
||||
loadRepoContents(`${path}/${item.name}`);
|
||||
});
|
||||
} else if (item.type === 'file') {
|
||||
// Optional: Add file preview/download logic
|
||||
fileItem.addEventListener('click', () => {
|
||||
window.open(item.html_url, '_blank');
|
||||
});
|
||||
}
|
||||
|
||||
fileTreeEl.appendChild(fileItem);
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
console.error('Error loading repository contents:', error);
|
||||
fileTreeEl.innerHTML = `<p>Error loading repository contents. Please try again.</p>`;
|
||||
}
|
||||
}
|
||||
|
||||
async function initializeRepository() {
|
||||
await loadRepoContents();
|
||||
await loadReadme();
|
||||
}
|
||||
|
||||
// Initial load
|
||||
initializeRepository();
|
||||
});
|
||||
46
subpages/archives subpages/XML/explorer.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Repository Explorer - Map Makers & Programmers</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="../../../css/styles.css">
|
||||
<link rel="stylesheet" href="../../../css/explorer.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="noise-overlay"></div>
|
||||
<div class="overlay">
|
||||
<div class="page-header">
|
||||
<a href="../../archives.html" class="back-button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M15 18l-6-6 6-6" />
|
||||
</svg>
|
||||
Back
|
||||
</a>
|
||||
<h1 class="page-title" id="repo-name">Repository</h1>
|
||||
</div>
|
||||
|
||||
<main class="repo-explorer">
|
||||
<div class="breadcrumb" id="breadcrumb">
|
||||
<!-- loaded with script -->
|
||||
</div>
|
||||
<div class="file-tree" id="file-tree">
|
||||
<!-- loaded with script -->
|
||||
</div>
|
||||
|
||||
<div class="readme-section" id="readme-container">
|
||||
<!-- loaded with script -->
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="site-footer">
|
||||
<div class="footer-content">
|
||||
<p>© 2024 Map Makers & Programmers. A few rights reserved...</p>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script src="explorer.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
212
subpages/archives subpages/XML/explorer.js
Normal file
@@ -0,0 +1,212 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
// Configuration
|
||||
const GITHUB_API_BASE = 'https://api.github.com/repos';
|
||||
const REPO_OWNER = 'MapMakersAndProgrammers';
|
||||
const REPO_NAME = 'tanki-xml-maps'; // Change this dynamically based on which repo is being viewed
|
||||
|
||||
// DOM Elements
|
||||
const fileTreeEl = document.getElementById('file-tree');
|
||||
const breadcrumbEl = document.getElementById('breadcrumb');
|
||||
const repoNameEl = document.getElementById('repo-name');
|
||||
const readmeContainerEl = document.getElementById('readme-container');
|
||||
|
||||
// Icons for different file types
|
||||
const icons = {
|
||||
folder: '../../../assets/icons/folder.svg',
|
||||
file: '../../../assets/icons/file.svg',
|
||||
'webp': '../../../assets/icons/webp.svg',
|
||||
'ktx': '../../../assets/icons/ktx.svg',
|
||||
'bin': '../../../assets/icons/bin.svg',
|
||||
'json': '../../../assets/icons/json.svg',
|
||||
'xml': '../../../assets/icons/xml.svg',
|
||||
'md': '../../../assets/icons/readme.svg'
|
||||
};
|
||||
|
||||
// Markdown rendering function (using GitHub's API)
|
||||
async function renderMarkdown(markdown) {
|
||||
try {
|
||||
const response = await fetch('https://api.github.com/markdown', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
text: markdown,
|
||||
mode: 'markdown'
|
||||
})
|
||||
});
|
||||
return await response.text();
|
||||
} catch (error) {
|
||||
console.error('Error rendering markdown:', error);
|
||||
return `<p>Error rendering README</p>`;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch and display README
|
||||
*/
|
||||
async function loadReadme() {
|
||||
try {
|
||||
// Fetch README content
|
||||
const readmeResponse = await fetch(`${GITHUB_API_BASE}/${REPO_OWNER}/${REPO_NAME}/readme`);
|
||||
const readmeData = await readmeResponse.json();
|
||||
|
||||
// Decode base64 README content
|
||||
const readmeContent = atob(readmeData.content);
|
||||
|
||||
// Render markdown
|
||||
const renderedReadme = await renderMarkdown(readmeContent);
|
||||
|
||||
// Create README container
|
||||
const readmeWrapper = document.createElement('div');
|
||||
readmeWrapper.classList.add('readme-content');
|
||||
readmeWrapper.innerHTML = renderedReadme;
|
||||
|
||||
// Clear previous content and append new README
|
||||
readmeContainerEl.innerHTML = '';
|
||||
readmeContainerEl.appendChild(readmeWrapper);
|
||||
} catch (error) {
|
||||
console.error('Error loading README:', error);
|
||||
readmeContainerEl.innerHTML = `<p>No README available</p>`;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get appropriate icon for a file type
|
||||
* @param {string} name - Filename
|
||||
* @param {string} type - File type (dir or file)
|
||||
* @returns {string} Path to icon
|
||||
*/
|
||||
function getFileIcon(name, type) {
|
||||
if (type === 'dir') return icons.folder;
|
||||
const ext = name.split('.').pop().toLowerCase();
|
||||
return icons[ext] || icons.file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format bytes to human-readable string
|
||||
* @param {number} bytes - Size in bytes
|
||||
* @returns {string} Formatted file size
|
||||
*/
|
||||
function formatBytes(bytes) {
|
||||
if (bytes === 0) return '0 B';
|
||||
const k = 1024;
|
||||
const sizes = ['B', 'KB', 'MB', 'GB'];
|
||||
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
||||
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
|
||||
}
|
||||
|
||||
/**
|
||||
* Create breadcrumb navigation
|
||||
* @param {string} path - Current path in repository
|
||||
*/
|
||||
function createBreadcrumb(path) {
|
||||
breadcrumbEl.innerHTML = '';
|
||||
const parts = path.split('/').filter(p => p);
|
||||
|
||||
const homeLink = document.createElement('div');
|
||||
homeLink.classList.add('breadcrumb-item');
|
||||
homeLink.innerHTML = `<a href="#" data-path="">Repository Root</a>`;
|
||||
breadcrumbEl.appendChild(homeLink);
|
||||
|
||||
parts.forEach((part, index) => {
|
||||
const crumb = document.createElement('div');
|
||||
crumb.classList.add('breadcrumb-item');
|
||||
const fullPath = parts.slice(0, index + 1).join('/');
|
||||
crumb.innerHTML = `<a href="#" data-path="${fullPath}">${part}</a>`;
|
||||
breadcrumbEl.appendChild(crumb);
|
||||
});
|
||||
|
||||
// Add click listeners to breadcrumb items
|
||||
breadcrumbEl.querySelectorAll('a').forEach(link => {
|
||||
link.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
loadRepoContents(link.dataset.path);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Load and display repository contents
|
||||
* @param {string} [path=''] - Path within the repository
|
||||
*/
|
||||
async function loadRepoContents(path = '') {
|
||||
try {
|
||||
const apiUrl = `${GITHUB_API_BASE}/${REPO_OWNER}/${REPO_NAME}/contents/${path}`;
|
||||
const response = await fetch(apiUrl);
|
||||
const contents = await response.json();
|
||||
|
||||
// Filter out README.md doesnt work :(
|
||||
const filteredContents = contents.filter(item =>
|
||||
item.name.toLowerCase() !== 'readme.md'
|
||||
);
|
||||
|
||||
// Sort contents: folders first, then files
|
||||
contents.sort((a, b) => {
|
||||
if (a.type === 'dir' && b.type !== 'dir') return -1;
|
||||
if (a.type !== 'dir' && b.type === 'dir') return 1;
|
||||
return a.name.localeCompare(b.name);
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Clear previous contents
|
||||
fileTreeEl.innerHTML = '';
|
||||
|
||||
// Update page title
|
||||
repoNameEl.textContent = REPO_NAME;
|
||||
|
||||
// Create breadcrumb
|
||||
createBreadcrumb(path);
|
||||
|
||||
// Render contents
|
||||
contents.forEach(item => {
|
||||
const fileItem = document.createElement('div');
|
||||
fileItem.classList.add('file-item');
|
||||
|
||||
const icon = document.createElement('img');
|
||||
icon.src = getFileIcon(item.name, item.type);
|
||||
icon.alt = item.type;
|
||||
icon.classList.add('file-icon');
|
||||
|
||||
const nameEl = document.createElement('div');
|
||||
nameEl.classList.add('file-name');
|
||||
nameEl.textContent = item.name;
|
||||
|
||||
const sizeEl = document.createElement('div');
|
||||
sizeEl.classList.add('file-size');
|
||||
sizeEl.textContent = item.type === 'file' ? formatBytes(item.size) : '';
|
||||
|
||||
fileItem.appendChild(icon);
|
||||
fileItem.appendChild(nameEl);
|
||||
fileItem.appendChild(sizeEl);
|
||||
|
||||
// Add click handler for folders
|
||||
if (item.type === 'dir') {
|
||||
fileItem.addEventListener('click', () => {
|
||||
loadRepoContents(`${path}/${item.name}`);
|
||||
});
|
||||
} else if (item.type === 'file') {
|
||||
// Optional: Add file preview/download logic
|
||||
fileItem.addEventListener('click', () => {
|
||||
window.open(item.html_url, '_blank');
|
||||
});
|
||||
}
|
||||
|
||||
fileTreeEl.appendChild(fileItem);
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
console.error('Error loading repository contents:', error);
|
||||
fileTreeEl.innerHTML = `<p>Error loading repository contents. Please try again.</p>`;
|
||||
}
|
||||
}
|
||||
|
||||
async function initializeRepository() {
|
||||
await loadRepoContents();
|
||||
await loadReadme();
|
||||
}
|
||||
|
||||
// Initial load
|
||||
initializeRepository();
|
||||
});
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Archives - Map Makers & Programmers</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="./css/styles.css">
|
||||
<link rel="stylesheet" href="../css/styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="noise-overlay"></div>
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<div class="overlay">
|
||||
<div class="page-header">
|
||||
<a href="index.html" class="back-button">
|
||||
<a href="../index.html" class="back-button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M15 18l-6-6 6-6" />
|
||||
</svg>
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<main class="archives-content">
|
||||
<div class="archives-grid">
|
||||
<a href="https://github.com/MapMakersAndProgrammers/tanki-xml-maps" class="archive-box" target="_blank" style="background-image: url('assets/xml.png');">
|
||||
<a href="archives subpages/XML/explorer.html" class="archive-box" style="background-image: url('../assets/xml.png');">
|
||||
<div class="archive-overlay">
|
||||
<h2>XML Format Maps</h2>
|
||||
<p>Archive of XML format maps</p>
|
||||
@@ -32,7 +32,7 @@
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="https://github.com/MapMakersAndProgrammers/tanki-json-maps" class="archive-box" target="_blank" style="background-image: url('assets/json.png');">
|
||||
<a href="archives subpages/JSON/explorer.html" class="archive-box" style="background-image: url('../assets/json.png');">
|
||||
<div class="archive-overlay">
|
||||
<h2>JSON Format Maps</h2>
|
||||
<p>Archive of JSON format maps</p>
|
||||
@@ -40,7 +40,7 @@
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="https://github.com/MapMakersAndProgrammers/tanki-bin-maps" class="archive-box" target="_blank" style="background-image: url('assets/bin.png');">
|
||||
<a href="archives subpages/BIN/explorer.html" class="archive-box" style="background-image: url('../assets/bin.png');">
|
||||
<div class="archive-overlay">
|
||||
<h2>BIN Format Maps</h2>
|
||||
<p>Archive of BIN format maps</p>
|
||||
@@ -48,7 +48,7 @@
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="https://github.com/MapMakersAndProgrammers/tanki-prop-libraries" class="archive-box" target="_blank" style="background-image: url('assets/proplibrary.png');">
|
||||
<a href="https://github.com/MapMakersAndProgrammers/tanki-prop-libraries" class="archive-box" target="_blank" style="background-image: url('../assets/proplibrary.png');">
|
||||
<div class="archive-overlay">
|
||||
<h2>Prop Libraries</h2>
|
||||
<p>Archive of TO prop libraries</p>
|
||||
@@ -56,7 +56,7 @@
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="https://github.com/MapMakersAndProgrammers/tanki-model-archive" class="archive-box" target="_blank" style="background-image: url('assets/tankimodels.png');">
|
||||
<a href="https://github.com/MapMakersAndProgrammers/tanki-model-archive" class="archive-box" target="_blank" style="background-image: url('../assets/tankimodels.png');">
|
||||
<div class="archive-overlay">
|
||||
<h2>Tanki Models</h2>
|
||||
<p>Archive of TO models</p>
|
||||
@@ -64,7 +64,7 @@
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="https://github.com/MapMakersAndProgrammers/alternativa3d-archive" class="archive-box" target="_blank" style="background-image: url('assets/a3d.png');">
|
||||
<a href="https://github.com/MapMakersAndProgrammers/alternativa3d-archive" class="archive-box" target="_blank" style="background-image: url('../assets/a3d.png');">
|
||||
<div class="archive-overlay">
|
||||
<h2>Alternativa3D Versions</h2>
|
||||
<p>Archive of various version of Alternativa3D</p>
|
||||
@@ -72,7 +72,7 @@
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="https://github.com/MapMakersAndProgrammers/alternativaphysics-archive" class="archive-box" target="_blank" style="background-image: url('assets/ap.png');">
|
||||
<a href="https://github.com/MapMakersAndProgrammers/alternativaphysics-archive" class="archive-box" target="_blank" style="background-image: url('../assets/ap.png');">
|
||||
<div class="archive-overlay">
|
||||
<h2>AlternativaPhysics Versions</h2>
|
||||
<p>Archive of various versions of AlternativaPhysics</p>
|
||||
@@ -5,14 +5,14 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Miscellaneous - Map Makers & Programmers</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="./css/styles.css">
|
||||
<link rel="stylesheet" href="../css/styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="noise-overlay"></div>
|
||||
|
||||
<div class="overlay">
|
||||
<div class="page-header">
|
||||
<a href="index.html" class="back-button">
|
||||
<a href="../index.html" class="back-button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M15 18l-6-6 6-6" />
|
||||
</svg>
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<main class="misc-content">
|
||||
<div class="misc-grid">
|
||||
<a href="https://github.com/MapMakersAndProgrammers/alternativa-demos" class="misc-box" target="_blank" style="background-image: url('assets/demo.png');">
|
||||
<a href="https://github.com/MapMakersAndProgrammers/alternativa-demos" class="misc-box" target="_blank" style="background-image: url('../assets/demo.png');">
|
||||
<div class="misc-overlay">
|
||||
<h2>Alternativa Games' Flash Demos</h2>
|
||||
<p>Demos built using the Alternativa3D engine</p>
|
||||
@@ -31,7 +31,7 @@
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="https://github.com/MapMakersAndProgrammers/alternativa-editor" class="misc-box" target="_blank" style="background-image: url('assets/editor.png');">
|
||||
<a href="https://github.com/MapMakersAndProgrammers/alternativa-editor" class="misc-box" target="_blank" style="background-image: url('../assets/editor.png');">
|
||||
<div class="misc-overlay">
|
||||
<h2>Alternativa Editor Source Code</h2>
|
||||
<p>AlternativaEditor source code</p>
|
||||
@@ -5,14 +5,14 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Tools - Map Makers & Programmers</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="./css/styles.css">
|
||||
<link rel="stylesheet" href="../css/styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="noise-overlay"></div>
|
||||
|
||||
<div class="overlay">
|
||||
<div class="page-header">
|
||||
<a href="index.html" class="back-button">
|
||||
<a href="../index.html" class="back-button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M15 18l-6-6 6-6" />
|
||||
</svg>
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<main class="tools-content">
|
||||
<div class="tools-grid">
|
||||
<a href="https://github.com/MapMakersAndProgrammers/alternativa-tools" class="tool-box" target="_blank" style="background-image: url('assets/tools.png');">
|
||||
<a href="https://github.com/MapMakersAndProgrammers/alternativa-tools" class="tool-box" target="_blank" style="background-image: url('../assets/tools.png');">
|
||||
<div class="tool-overlay">
|
||||
<h2>Alternativa Games' Tools</h2>
|
||||
<p>Various tools made by Alternativa Games</p>
|
||||
@@ -31,7 +31,7 @@
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="https://github.com/davidejones/alternativa3d_tools" class="tool-box" target="_blank" style="background-image: url('assets/a3d1.png');">
|
||||
<a href="https://github.com/davidejones/alternativa3d_tools" class="tool-box" target="_blank" style="background-image: url('../assets/a3d1.png');">
|
||||
<div class="tool-overlay">
|
||||
<h2>Blender A3D 1.x and 2.x Plugin</h2>
|
||||
<p>Blender plugin to import a3d models versions 1.x and 2.x</p>
|
||||
@@ -39,7 +39,7 @@
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="https://github.com/MapMakersAndProgrammers/io_scene_a3d" class="tool-box" target="_blank" style="background-image: url('assets/a3d2.png');">
|
||||
<a href="https://github.com/MapMakersAndProgrammers/io_scene_a3d" class="tool-box" target="_blank" style="background-image: url('../assets/a3d2.png');">
|
||||
<div class="tool-overlay">
|
||||
<h2>Blender A3D 3.x Plugin</h2>
|
||||
<p>Blender plugin to import a3d models versions 3.x</p>
|
||||