<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-patible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content=".">
        <link rel="icon" href="/frontend/assets/img/robotganteng.png">

        <title>SHORT URL ANTIBOKEH</title>

        <link rel="stylesheet" href="/frontend/dist/styles.css">

                    <style>
                body {
                    background: url(https://c.pxhere.com/photos/ce/4a/girl_light_bokeh_city_night-3417.jpg!d) no-repeat center center fixed !important; 
                    background-size: cover !important;
                }
            </style>
        
        <style>
            .btn-primary {
                background-color: #007bff;
                border-color: #007bff;
            }

            .btn-primary:hover,
            .btn-primary:focus,
            .btn-primary:active {
                background-color: #006cf0;
                border-color: #006cf0;
            }
        </style>
    </head>
<body>

		<style>ul#admin_menu li:not(.frontend_link) {display: none}</style>
	<div class="container-fluid h-100">
		<div class="row justify-content-center align-items-center h-100">
			<div class="col-12 col-lg-10 col-xl-8 col-xxl-5 mt-5">
				<div class="card border-0 mt-5">
											<div class="text-center">
							<img src="https://antibokehsay.com/frontend/assets/img/robotganteng.png" alt="Logo" width="95px" class="mt-n5">
						</div>
						<div class="card-body px-md-5">
							<!-- <p>.</p>-->

							
							<form id="shortenlink" method="post" action="">
								<div class="input-group input-group-block mt-4 mb-3">
									<input type="url" name="url" id="url" class="form-control text-uppercase" placeholder="PASTE URL, SHORTEN &amp; SHARE" aria-label="PASTE URL, SHORTEN &amp; SHARE" aria-describedby="shorten-button" required>
									<input class="btn btn-primary text-uppercase py-2 px-4 mt-2 mt-md-0" type="submit" id="shorten-button" value="Shorten" />
								</div>
																	<a class="btn btn-sm btn-white text-black-50 text-uppercase" data-bs-toggle="collapse" href="#customise-link" role="button" aria-expanded="false" aria-controls="customise-link">
										<img src="https://antibokehsay.com/frontend/assets/svg/custom-url.svg" alt="Options"> Customise Link
									</a>
									<div class="collapse" id="customise-link">
										<div class="mt-2 card card-body">
											<div class="d-flex  align-items-center">
												<span class="me-2">antibokehsay.com/</span>
												<input type="text" name="keyword" class="form-control form-control-sm text-uppercase" placeholder="CUSTOM URL" aria-label="CUSTOM URL">
											</div>
										</div>
									</div>
															</form>
						</div>
									</div>
				<div class="d-flex flex-column flex-md-row align-items-center my-3">
					<span class="text-white fw-light">&copy; 2025 </span>
					<div class="ms-3">
											</div>
				</div>
			</div>
		</div>
	</div>
	<script>
	// From https://stackoverflow.com/a/30810322
	function fallbackCopyTextToClipboard(text) {
		var textArea = document.createElement("textarea");
		textArea.value = text;
		
		// Avoid scrolling to bottom
		textArea.style.top = "0";
		textArea.style.left = "0";
		textArea.style.position = "fixed";

		document.body.appendChild(textArea);
		textArea.focus();
		textArea.select();

		try {
			var successful = document.execCommand('copy');
			var msg = successful ? 'successful' : 'unsuccessful';
			console.log('Fallback: Copying text command was ' + msg);
		} catch (err) {
			console.error('Fallback: Oops, unable to copy', err);
		}

		document.body.removeChild(textArea);
	}

	function copyTextToClipboard(text) {
		if (!navigator.clipboard) {
			fallbackCopyTextToClipboard(text);
			return;
		}
		navigator.clipboard.writeText(text).then(function() {
			console.log('Async: Copying to clipboard was successful!');
		}, function(err) {
			console.error('Async: Could not copy text: ', err);
		});
	}

	const copyBtn = document.querySelector('button#copy-button');

	if (copyBtn) {
		copyBtn.addEventListener('click', function(event) {
			copyTextToClipboard(event.target.dataset.shorturl);
		});
	}

	const closeShortenedLinkScreenButton = document.querySelector('button#close-shortened-screen');

	if (closeShortenedLinkScreenButton) {
		closeShortenedLinkScreenButton.addEventListener('click', function(event) {
			window.location.href=window.location.href;
		});
	}
</script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
</body>
</html>
