Skip to content

Commit

Permalink
add: demo
Browse files Browse the repository at this point in the history
  • Loading branch information
uchks committed Oct 6, 2024
1 parent 0d2d94f commit 8cbc551
Show file tree
Hide file tree
Showing 12 changed files with 620 additions and 446 deletions.
2 changes: 2 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
> Already have a repository? Looking to share a repository? <br>
> Check out [**jbredir**](https://jbredir.unethical.team), a website I made.
**[Demo now available.](https://www.air.rip/repo.me)**

## Table of Contents

1. [Background Information](#background-information)
Expand Down
196 changes: 104 additions & 92 deletions depictions/web/changelog.html
Original file line number Diff line number Diff line change
@@ -1,103 +1,115 @@
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Changelog</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.querystring.js"></script>
<script type="text/javascript" src="js/data-loader-engine.js"></script>
<script type="text/javascript" src="js/ios_version_check.js"></script>
<script type="text/javascript" src="js/content-blocks-changelog.js"></script>
<script type="text/javascript">
<head>
<title>Changelog</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css"
integrity="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css"
integrity="sha512-Kc323vGBEqzTmouAECnVceyQqyqdsSiqLQISBL29aUW4U/M7pSPA/gEUZQqv1cwx4OnYxTxve5UMg5GT6L4JJg=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"
integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
<link rel="stylesheet" href="../../style.css" />
<script src="js/jquery.querystring.js"></script>
<script src="js/data-loader-engine.js"></script>
<script src="js/ios_version_check.js"></script>
<script src="js/content-blocks-changelog.js"></script>
<script>
$(() => {
const bundleid = $.QueryString["p"];
const contentBlocks = getContentBlocks();

bundleid = $.QueryString['p'];
populateContentBlocks(
`${bundleid}/changelog.xml`,
contentBlocks,
() => {
$("#packageError").show();
$("#packageInformation").hide();
},
(xml) => {
document.title = $(xml).find("package>name").text();
$("#packageName").text($(xml).find("package>name").text());
}
);

var contentBlocks = getContentBlocks();
// Load repository footer links
$.ajax({
type: "GET",
dataType: "xml",
url: "../../repo.xml",
cache: false,
success: (xml) => {
$(xml)
.find("repo>footerlinks>link")
.each((_, link) => {
const $link = $(link);
const $a = $("<a>")
.addClass("link-item list-group-item")
.attr("href", $link.find("url").text());

$( document ).ready(function() {
populateContentBlocks(
(bundleid+"/changelog.xml"),
contentBlocks,
() => {
$("#packageError").show();
$("#packageInformation").hide();
},
(xml) => {
document.title = $(xml).find("package>name").text();
}
)
if ($link.find("iconclass").length) {
$a.append($("<i>").addClass($link.find("iconclass").text()));
}

}); // ready
</script>
</head>
<body>
<br />
$a.append($link.find("name").text());
$("#repoFooterLinks").append($a);
});

<div id="packageInformation">
<div class="container" id="changeLogList">
</div>
</div>
<div id="packageError" style="display:none">
<div class="container">
<div class="alert alert-danger">
<strong>Oh snap!</strong> The package you are trying to view is not hosted on this repository.
</div>
</div>
</div>
<!-- REPO FOOTER -->
<script type="text/javascript">
var repoContents = {
"#repoFooterLinks" :
{"type":"custom"
,"source":"repo>footerlinks>link"
,"render":function(element,source) {
$.each(source, function(index,data) {
var a = $("<a class='link-item list-group-item'>");
a.attr("href",$(data).find('url').text());
if ($(data).find('iconclass')) {
var i = $("<span>")
i.attr("class",$(data).find('iconclass').text());
console.log(i);
$(a).append(i);
}
$(a).append($(data).find('name').text());
$(element).append(a);
}); //each
} //render
// Set target="_blank" for links if on Cydia
if (navigator.userAgent.includes("Cydia")) {
$("a").attr("target", "_blank");
}
}
$( document ).ready(function() {
$.ajax({type: "GET", dataType: "xml",url : ("../repo.xml"),cache: false,
success : function(xml){
data_loader_engine(repoContents,xml);
if (navigator.userAgent.search(/Cydia/) != -1) {
$("a").each(function() {
console.log($(this).text());
$(this).attr("target","_blank");
});
}
},
},
error: () => $("#contactInfo").hide(),
});
});
</script>
</head>
<body>
<div id="packageInformation">
<div class="changelog-header">
<div class="container">
<h1 id="packageName">Changelog</h1>
</div>
</div>

error: function() {$("#contactInfo").hide()}
}); //ajax


}); // ready
<div class="container">
<div id="changeLogList"></div>
</div>
</div>

</script>
<div id="packageError" style="display: none">
<div class="container">
<div class="alert alert-danger">
<i class="fas fa-exclamation-circle me-2"></i>
<strong>Oh snap!</strong> The package you are trying to view is not
hosted on this repository.
</div>
</div>
</div>

<div id="contactInfo">
<div class="container">
<h5>CONTACT</h5>
<ul class="list-group" id="repoFooterLinks">
</ul>
</div>
</div>
<!-- REPO FOOTER ENDS -->

</body>
<div id="contactInfo">
<div class="container">
<h3 class="section-title">Contact</h3>
<div class="card">
<ul id="repoFooterLinks" class="list-group list-group-flush"></ul>
</div>
</div>
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion depictions/web/com.example.newsample/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<link>
<name>/r/jailbreak</name>
<url>https://www.reddit.com/r/jailbreak</url>
<iconclass>fa fa-reddit</iconclass>
<iconclass>fa-brands fa-reddit</iconclass>
</link>
</links>
</package>
Loading

0 comments on commit 8cbc551

Please sign in to comment.