95 lines
2.5 KiB
HTML
95 lines
2.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Linker - Create Markdown Links</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<script src="https://unpkg.com/htmx.org@1.9.5"></script>
|
|
<script>
|
|
function goToLink(event) {
|
|
event.preventDefault();
|
|
const url = document.getElementById('url').value;
|
|
if (!url) return;
|
|
window.location.href = `/link?url=${encodeURIComponent(url)}`;
|
|
}
|
|
</script>
|
|
<style>
|
|
body {
|
|
font-family: sans-serif;
|
|
background: #1e1e2f;
|
|
color: #ddd;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
height: 100vh;
|
|
}
|
|
|
|
body p {
|
|
max-width: 450px;
|
|
color: #aaa;
|
|
}
|
|
|
|
form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
width: 100%;
|
|
max-width: 500px;
|
|
margin-top: 4rem;
|
|
margin-bottom: 16rem;
|
|
}
|
|
|
|
input[type="url"] {
|
|
padding: 1rem;
|
|
font-size: 1rem;
|
|
border-radius: 0.5rem;
|
|
border: none;
|
|
}
|
|
|
|
button {
|
|
padding: 1rem;
|
|
font-size: 1rem;
|
|
background-color: #4f46e5;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 0.5rem;
|
|
cursor: pointer;
|
|
}
|
|
|
|
button:hover {
|
|
background-color: #4338ca;
|
|
}
|
|
|
|
footer {
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
background-color: #1e1e2f;
|
|
padding: 1rem;
|
|
text-align: center;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>Linker - Create Markdown Links</h1>
|
|
<p>
|
|
This is vibe coded AI slop, you probably don't want to to use it. I told
|
|
gpt-4o what I wanted and what came out was good enough for me.
|
|
</p>
|
|
<p>
|
|
It generates markdown links that you can copy and paste into your markdown
|
|
files. It attempts to include the title and author of the page, and wraps
|
|
it with their og image and falls back to a screenshot of the page.
|
|
</p>
|
|
|
|
<form onsubmit="goToLink(event)">
|
|
<input type="url" id="url" placeholder="Enter a URL to link" required autofocus/>
|
|
<button type="submit">Generate Markdown Link</button>
|
|
</form>
|
|
<footer>
|
|
<p>version: {{ version }}</p>
|
|
</footer>
|
|
</body>
|
|
</html>
|