2023-08-16 11:30:31 -04:00
|
|
|
<!doctype html>
|
2023-04-14 22:42:44 -04:00
|
|
|
<html lang="en" class="h-100">
|
2023-08-12 21:09:22 -04:00
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
<title>YTDL Web</title>
|
|
|
|
<link
|
|
|
|
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css"
|
|
|
|
rel="stylesheet"
|
|
|
|
integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ"
|
|
|
|
crossorigin="anonymous"
|
|
|
|
/>
|
|
|
|
<link
|
|
|
|
rel="stylesheet"
|
|
|
|
href="https://cdn.jsdelivr.net/npm/toastr@2.1.4/build/toastr.min.css"
|
|
|
|
integrity="sha256-R91pD48xW+oHbpJYGn5xR0Q7tMhH4xOrWn1QqMRINtA="
|
|
|
|
crossorigin="anonymous"
|
|
|
|
/>
|
|
|
|
<script
|
|
|
|
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js"
|
|
|
|
integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe"
|
|
|
|
crossorigin="anonymous"
|
|
|
|
defer
|
|
|
|
></script>
|
|
|
|
<script
|
|
|
|
src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"
|
|
|
|
defer
|
|
|
|
></script>
|
|
|
|
<script
|
|
|
|
src="https://cdn.jsdelivr.net/npm/toastr@2.1.4/build/toastr.min.js"
|
|
|
|
integrity="sha256-Hgwq1OBpJ276HUP9H3VJkSv9ZCGRGQN+JldPJ8pNcUM="
|
|
|
|
crossorigin="anonymous"
|
|
|
|
defer
|
|
|
|
></script>
|
|
|
|
<script
|
|
|
|
src="https://cdn.jsdelivr.net/npm/htmx.org@1.9.4/dist/htmx.min.js"
|
|
|
|
integrity="sha256-XIivRAE99i/eil5P31JNihaDSiix0V40rgmUrCfNTH4="
|
|
|
|
crossorigin="anonymous"
|
|
|
|
></script>
|
|
|
|
<style>
|
|
|
|
#toast-container > div {
|
|
|
|
-moz-box-shadow: none !important;
|
|
|
|
-webkit-box-shadow: none !important;
|
|
|
|
box-shadow: none !important;
|
|
|
|
-ms-filter: none;
|
|
|
|
filter: none;
|
|
|
|
opacity: 1;
|
|
|
|
}
|
2023-04-14 22:01:36 -04:00
|
|
|
|
2023-08-12 21:09:22 -04:00
|
|
|
.downloads {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: minmax(auto, max-content) auto;
|
|
|
|
gap: 1.5rem;
|
|
|
|
align-items: center;
|
|
|
|
}
|
2023-04-14 22:01:36 -04:00
|
|
|
|
2023-08-12 21:09:22 -04:00
|
|
|
.see-more-btn,
|
|
|
|
.collapse {
|
|
|
|
grid-column: span 2;
|
2023-04-14 11:58:32 -04:00
|
|
|
}
|
2023-08-12 21:09:22 -04:00
|
|
|
</style>
|
|
|
|
</head>
|
2023-04-14 22:01:36 -04:00
|
|
|
|
2023-08-12 21:09:22 -04:00
|
|
|
<body class="d-flex flex-column h-100" data-bs-theme="dark">
|
|
|
|
<div class="flex-shrink-0">
|
2023-08-12 23:27:11 -04:00
|
|
|
{{template "partials/navbar" .}}
|
|
|
|
<main id="main-content" class="container my-5">{{yield}}</main>
|
2023-08-12 21:09:22 -04:00
|
|
|
</div>
|
2023-08-12 23:27:11 -04:00
|
|
|
{{template "partials/footer" .}}
|
2023-08-12 21:09:22 -04:00
|
|
|
<script>
|
2023-08-16 11:30:31 -04:00
|
|
|
/**
|
|
|
|
* @param content {Element}
|
|
|
|
*/
|
|
|
|
function setupPaste(content) {
|
|
|
|
const pasteButton = content.querySelector("#paste-button");
|
|
|
|
const urlField = content.querySelector("#url");
|
|
|
|
|
|
|
|
if (pasteButton) {
|
|
|
|
pasteButton.addEventListener("click", async () => {
|
|
|
|
try {
|
|
|
|
const text = await navigator.clipboard.readText();
|
|
|
|
urlField.value = text;
|
|
|
|
} catch (error) {
|
|
|
|
toastr.error("Failed to paste url from clipboard.");
|
|
|
|
}
|
|
|
|
});
|
2023-08-12 21:09:22 -04:00
|
|
|
}
|
2023-08-16 11:30:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
htmx.onLoad(setupPaste);
|
2023-08-12 21:09:22 -04:00
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|