Added oreon lime r1 packages and made the whole thing responsive

This commit is contained in:
Evilcoder 2024-07-18 19:42:44 +02:00
parent 046109b0f2
commit f29f11848d
9 changed files with 297 additions and 3 deletions

View file

@ -13,7 +13,49 @@ h1, h2, a, p {
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
} }
.dropbtn {
background-color: rgb(63, 173, 63);
color: white;
padding: 16px;
font-size: 16px;
border: none;
display: none;
}
.dropbtn i {
color: black;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: black;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
color: white;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown-content a:hover {
background-color: gray;
}
.dropdown:hover .dropdown-content {
display: block;
padding-right: 20px;
}
.dropdown:hover .dropbtn {
background-color: grey;
}
.hdr a { .hdr a {
color: white; color: white;
text-decoration: none; text-decoration: none;
@ -84,4 +126,37 @@ h1, h2, a, p {
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
gap: 10px; gap: 10px;
}
@media screen and (max-width: 850px) {
.packages {
display: flex;
flex-direction: column;
}
.package {
width: 350px;
margin-left: 20px;
}
.dropbtn {
display: block;
}
.edit-cont {
display: flex;
flex-direction: column;
}
.edit-btn {
width: 300px;
}
.hdr {
display: flex;
flex-direction: row;
align-items: center;
height: 90px;
}
.logo {
width: 350px;
}
.hdr nav {
display: none;
}
} }

View file

@ -0,0 +1,48 @@
function doCORSRequest(options, printResult) {
var x = new XMLHttpRequest();
var proxy_url = 'https://api.allorigins.win/get?url=';
var target_url = encodeURIComponent(options.url);
x.open(options.method, proxy_url + target_url);
x.onload = x.onerror = function() {
var response = JSON.parse(x.responseText);
printResult(
options.method + ' ' + options.url + '\n' +
x.status + ' ' + x.statusText + '\n\n' +
(response.contents || '')
);
};
x.send(options.data);
}
doCORSRequest({
method: "GET",
url: "https://packages.boostyconnect.com/oreonproject/oreon-lime/",
}, function printResult(res) {
console.log('Response:', res);
try {
const parser = new DOMParser();
const doc = parser.parseFromString(res, "text/html");
const links = doc.querySelectorAll("a");
links.forEach((link) => {
const forbidden_links = ["Name", "Last modified", "Size", "Description", "Parent Directory"];
if (!forbidden_links.includes(link.innerHTML.trim())) {
const link_e = document.createElement("a");
const new_href = link.href
.replace("http://127.0.0.1:5500/", "https://packages.boostyconnect.com/oreonproject/oreon-lime/")
.replace("/Oreon-lime-(R1)", "");
link_e.href = new_href;
link_e.innerHTML = link.innerHTML;
link_e.className = "package";
link_e.target = "_blank";
document.getElementById("packages").appendChild(link_e);
console.log('Original URL:', link.href);
console.log('Modified URL:', new_href);
}
});
} catch (e) {
console.error('Parsing error:', e);
}
});

45
JS/security-script.js Normal file
View file

@ -0,0 +1,45 @@
function doCORSRequest(options, printResult) {
var x = new XMLHttpRequest();
var proxy_url = 'https://api.allorigins.win/get?url=';
var target_url = encodeURIComponent(options.url);
x.open(options.method, proxy_url + target_url);
x.onload = x.onerror = function() {
var response = JSON.parse(x.responseText);
printResult(
options.method + ' ' + options.url + '\n' +
x.status + ' ' + x.statusText + '\n\n' +
(response.contents || '')
);
};
x.send(options.data);
}
doCORSRequest({
method: "GET",
url: "https://packages.boostyconnect.com/oreonproject/oreon-security/",
}, function printResult(res) {
console.log('Response:', res);
try {
const parser = new DOMParser();
const doc = parser.parseFromString(res, "text/html");
const links = doc.querySelectorAll("a");
links.forEach((link) => {
const forbidden_links = ["Name", "Last modified", "Size", "Destination", "Description", "Parent Directory"];
if (!forbidden_links.includes(link.innerHTML)) {
const link_e = document.createElement("a");
const new_href = link.href.replace("http://127.0.0.1:5500/", "https://packages.boostyconnect.com/oreonproject/oreon-security/").replace("/Oreon-lime-(R1)", "");
link_e.href = new_href;
link_e.innerHTML = link.innerHTML;
link_e.className = "package";
link_e.target = "_blank";
document.getElementById("packages").appendChild(link_e);
console.log(link.href);
}
});
} catch (e) {
console.error('Parsing error:', e);
}
});

View 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>Document</title>
<!-- CSS -->
<link rel="stylesheet" href="../CSS/style.css">
<!-- Google fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
<!-- JS -->
<script src="../JS/mainstream(r1)-script.js"></script>
<!-- font awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body>
<header class="hdr">
<div class="dropdown">
<button class="dropbtn"><i class="fa-solid fa-caret-down"></i></button>
<div class="dropdown-content">
<a href="https://oreonproject.org">Oreon</a>
<a href="https://oreonproject.org/help">Help</a>
<a href="https://forums.oreonproject.org/">Forum</a>
</nav>
</div>
</div>
<h2>BCPackage</h2>
<nav>
<a href="https://oreonproject.org">Oreon</a>
<a href="https://oreonproject.org/help">Help</a>
<a href="https://forums.oreonproject.org/">Forum</a>
</nav>
</header>
<div class="main">
<center>
<h1>Oreon lime (R1)</h1>
<h2>Mainstream packages</h2>
<div id="packages" class="packages"></div>
</center>
</div>
</body>
</html>

View file

@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<!-- CSS -->
<link rel="stylesheet" href="../CSS/style.css">
<!-- Google fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
<!-- JS -->
<script src="../JS/security-script.js"></script>
<!-- font awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body>
<header class="hdr">
<div class="dropdown">
<button class="dropbtn"><i class="fa-solid fa-caret-down"></i></button>
<div class="dropdown-content">
<a href="https://oreonproject.org">Oreon</a>
<a href="https://oreonproject.org/help">Help</a>
<a href="https://forums.oreonproject.org/">Forum</a>
</nav>
</div>
</div>
<h2>BCPackage</h2>
<nav>
<a href="https://oreonproject.org">Oreon</a>
<a href="https://oreonproject.org/help">Help</a>
<a href="https://forums.oreonproject.org/">Forum</a>
</nav>
</header>
<div class="main">
<center>
<h1>Oreon lime (R1)</h1>
<h2>Security packages</h2>
<div id="packages" class="packages"></div>
</center>
</div>
</body>
</html>

View file

@ -12,9 +12,21 @@
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
<!-- JS --> <!-- JS -->
<script src="../JS/mainstream(r2)-script.js"></script> <script src="../JS/mainstream(r2)-script.js"></script>
<!-- font awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head> </head>
<body> <body>
<header class="hdr"> <header class="hdr">
<div class="dropdown">
<button class="dropbtn"><i class="fa-solid fa-caret-down"></i></button>
<div class="dropdown-content">
<a href="https://oreonproject.org">Oreon</a>
<a href="https://oreonproject.org/help">Help</a>
<a href="https://forums.oreonproject.org/">Forum</a>
</nav>
</div>
</div>
<h2>BCPackage</h2> <h2>BCPackage</h2>
<nav> <nav>
<a href="https://oreonproject.org">Oreon</a> <a href="https://oreonproject.org">Oreon</a>

View file

@ -12,9 +12,21 @@
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
<!-- JS --> <!-- JS -->
<script src="../JS/source-script.js"></script> <script src="../JS/source-script.js"></script>
<!-- font awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head> </head>
<body> <body>
<header class="hdr"> <header class="hdr">
<div class="dropdown">
<button class="dropbtn"><i class="fa-solid fa-caret-down"></i></button>
<div class="dropdown-content">
<a href="https://oreonproject.org">Oreon</a>
<a href="https://oreonproject.org/help">Help</a>
<a href="https://forums.oreonproject.org/">Forum</a>
</nav>
</div>
</div>
<h2>BCPackage</h2> <h2>BCPackage</h2>
<nav> <nav>
<a href="https://oreonproject.org">Oreon</a> <a href="https://oreonproject.org">Oreon</a>

View file

@ -10,10 +10,21 @@
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
<!-- font awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head> </head>
<body> <body>
<header class="hdr"> <header class="hdr">
<div class="dropdown">
<button class="dropbtn"><i class="fa-solid fa-caret-down"></i></button>
<div class="dropdown-content">
<a href="https://oreonproject.org">Oreon</a>
<a href="https://oreonproject.org/help">Help</a>
<a href="https://forums.oreonproject.org/">Forum</a>
</nav>
</div>
</div>
<h2>BCPackage</h2> <h2>BCPackage</h2>
<nav> <nav>
<a href="https://oreonproject.org">Oreon</a> <a href="https://oreonproject.org">Oreon</a>
@ -35,8 +46,8 @@
</div> </div>
<div class="edition"> <div class="edition">
<h2>Oreon lime (R1/R1.1)</h2> <h2>Oreon lime (R1/R1.1)</h2>
<a class="edit-btn" >Mainstream packages</a> <a class="edit-btn" target="_blank" href="./Oreon-lime-(R1)/mainstream.html">Mainstream packages</a>
<a class="edit-btn">Security</a> <a class="edit-btn" target="_blank" href="./Oreon-lime-(R1)/security.html">Security</a>
</div> </div>
</div> </div>
</center> </center>

0
src/main.ts Normal file
View file