Add files via upload
This commit is contained in:
commit
7d64c435fb
|
@ -0,0 +1,109 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" class="flex justify-center justify-items-center flex-col h-full">
|
||||
|
||||
<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>Bookmarks Separator</title>
|
||||
|
||||
<link rel="icon" href="data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2016%2016'%3E%3C%2Fsvg%3E" type="image/svg+xml">
|
||||
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
</head>
|
||||
|
||||
<body class="flex justify-center items-center flex-col h-full bg-gray-100 dark:bg-gray-900">
|
||||
<div class="container mx-auto mb-10">
|
||||
<h1 class="text-4xl font-semibold text-center dark:text-white">Bookmarks Separator</h1>
|
||||
<p class="mt-3 text-lg leading-8 text-gray-600 dark:text-gray-500 text-center">Workaround for the missing bookmark separators in Chrome</p>
|
||||
</div>
|
||||
<div class="container mx-auto">
|
||||
<div class="max-w-md mx-auto bg-white dark:bg-slate-800 overflow-hidden rounded-lg shadow">
|
||||
<div id="icon" class="bg-white p-6 pb-5 pt-8">
|
||||
<div class="text-center text-sm">
|
||||
<div>
|
||||
<div class="flex flex-row justify-center items-stretch max-w-max mx-auto cursor-not-allowed">
|
||||
<div class="w-6 grow bg-gray-200 dark:bg-gray-800">
|
||||
<div class="h-full w-full rounded-br-xl bg-white"></div>
|
||||
</div>
|
||||
<div class="flex flex-row justify-center items-center max-w-max mx-auto p-2 rounded-t-xl bg-gray-200 dark:bg-gray-800">
|
||||
<div>
|
||||
<a href="" title="Drag me!" class="block w-9 h-9 cursor-grab p-2 shadow-lg hover:shadow-md rounded-md overflow-hidden transition-all bg-white">
|
||||
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'>
|
||||
<line x1="8" x2="8" y1="0" y2="16" stroke="red" stroke-width="2" />
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-gray-900 dark:text-white text-lg max-h-max leading-none ml-4 grow-0 w-12 overflow-hidden whitespace-nowrap">
|
||||
Bookmarks Separator
|
||||
</div>
|
||||
<div class="pl-4 pr-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" width="12" class="fill-gray-900 dark:fill-white mt-px"><path d="M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z"/></svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-6 grow bg-gray-200 dark:bg-gray-800">
|
||||
<div class="h-full w-full rounded-bl-xl bg-white"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<p class="mt-5 text-xs leading-5 text-gray-500 text-center">
|
||||
<span class="font-semibold text-gray-800">Instructions:</span> Generate your separator and drag the icon to your bookmark. Click <span class="italic">'Reset'</span> for transparent separator.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="form" class="border-t border-gray-200">
|
||||
<form action="" method="GET">
|
||||
<div class="bg-white p-6">
|
||||
<div class="grid grid-cols-6 gap-6">
|
||||
<div class="col-span-6">
|
||||
<label for="orientation" class="block text-sm font-medium text-gray-700">Orientation</label>
|
||||
<select name="orientation" class="mt-1 block w-full rounded-md border border-gray-300 bg-white py-2 px-3 shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 sm:text-sm" required>
|
||||
<option value="vertical">Vertical</option>
|
||||
<option value="horizontal">Horizontal</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-span-6">
|
||||
<label for="width" class="block text-sm font-medium text-gray-700">Bar width</label>
|
||||
<input type="number" name="width" min="0" max="16" placeholder="0-16" class="mt-1 block w-full rounded-md border border-gray-300 bg-white py-2 px-3 shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 sm:text-sm" required>
|
||||
</div>
|
||||
<div class="col-span-6">
|
||||
<label for="color" class="block text-sm font-medium text-gray-700">Bar color</label>
|
||||
<input type="text" name="color" placeholder="css colors: hex, red" class="mt-1 block w-full rounded-md border border-gray-300 bg-white py-2 px-3 shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 sm:text-sm" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-gray-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6">
|
||||
<button type="submit" class="inline-flex w-full justify-center rounded-md border border-transparent bg-blue-600 px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 sm:ml-3 sm:w-auto sm:text-sm">Generate</button>
|
||||
<button onclick="window.location.replace(location.pathname);return false;" class="mt-3 inline-flex w-full justify-center rounded-md border border-gray-300 bg-white px-4 py-2 text-base font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">Reset</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="absolute bottom-0 w-full">
|
||||
<div class="p-6">
|
||||
<p class="text-center text-xs text-gray-500">Version 1.0 made by <a href="https://github.com/AAAC290992" target="_blank" class="font-semibold text-gray-600 hover:underline">@AAAC290992</a> (on <a href="https://github.com/AAAC290992/bookmarks-separator/" target="_blank" class="font-semibold text-gray-600 hover:underline">GitHub</a>)</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script>
|
||||
(() => {
|
||||
const a = document.querySelector('a'),
|
||||
r = document.querySelector('form'),
|
||||
f = document.querySelector('link[rel="icon"]'),
|
||||
p = new URLSearchParams(window.location.search),
|
||||
o = p.get('orientation'),
|
||||
c = p.get('color'),
|
||||
w = p.get('width'),
|
||||
s = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><line ${ o === 'vertical' ? 'x1="8" x2="8" y1="0" y2="16"' : 'x1="0" x2="16" y1="8" y2="8"' } stroke="${c}" stroke-width="${w}"/></svg>`;
|
||||
a.innerHTML = s;
|
||||
f.href = `data:image/svg+xml,${encodeURIComponent(s)}`;
|
||||
r.orientation.value = o || 'vertical';
|
||||
r.width.value = w;
|
||||
r.color.value = c;
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in New Issue