Amber Support + a bit crazy new style
Some checks failed
continuous-integration/drone/pr Build is failing
Some checks failed
continuous-integration/drone/pr Build is failing
I got a bit carried away and mixed the new style together with the Amber Support and it is this big dump.
This commit is contained in:
parent
d41d561fdc
commit
6b1ea7f555
235
ui/app.js
Normal file
235
ui/app.js
Normal file
@ -0,0 +1,235 @@
|
||||
//config
|
||||
const subdomain = ""; //"otherstuff.";
|
||||
|
||||
function isValidJSON(text) {
|
||||
try {
|
||||
JSON.parse(text);
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
async function readClipboard() {
|
||||
try {
|
||||
const text = await navigator.clipboard.readText();
|
||||
return text;
|
||||
} catch (err) {
|
||||
console.error('Failed to read clipboard contents', err);
|
||||
}
|
||||
}
|
||||
|
||||
async function monitorClipboard() {
|
||||
return new Promise((resolve) => {
|
||||
const intervalId = setInterval(async () => {
|
||||
const clipboardContent = await readClipboard();
|
||||
|
||||
if (clipboardContent && isValidJSON(clipboardContent)) {
|
||||
console.log("Valid JSON detected:", clipboardContent);
|
||||
let jsonData = JSON.parse(clipboardContent);
|
||||
clearInterval(intervalId);
|
||||
resolve(jsonData);
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
}
|
||||
|
||||
async function executeRequest(auth_event, path, method, body) {
|
||||
try {
|
||||
let options = {
|
||||
"method": method,
|
||||
"headers": {
|
||||
"accept": "application/json",
|
||||
"authorization": `Nostr ${btoa(JSON.stringify(auth_event))}`,
|
||||
},
|
||||
}
|
||||
if (typeof body !== "undefined") {
|
||||
options.body = body;
|
||||
}
|
||||
const rsp = await fetch(`${window.location.protocol}//${subdomain}${window.location.host}` + path, options);
|
||||
return rsp;
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
|
||||
async function dumpToLog(rsp) {
|
||||
console.debug(rsp);
|
||||
document.querySelector("#log-wrap").classList.remove('hidden');
|
||||
document.querySelector("#log").prepend("\n\n");
|
||||
const text = await rsp.text();
|
||||
if (rsp.ok) {
|
||||
document.querySelector("#log").prepend(JSON.stringify(JSON.parse(text), undefined, 2));
|
||||
} else {
|
||||
document.querySelector("#log").prepend(text);
|
||||
}
|
||||
document.querySelector("#log").prepend("***************\n\n");
|
||||
}
|
||||
|
||||
async function listFiles() {
|
||||
const r_amber = document.querySelector("#sign-amber").checked;
|
||||
const r_nip07 = document.querySelector("#sign-nip07").checked;
|
||||
|
||||
const unsignedEvent = {
|
||||
kind: 27235,
|
||||
created_at: Math.floor(new Date().getTime() / 1000),
|
||||
content: "",
|
||||
tags: [
|
||||
["u", `${window.location.protocol}//${subdomain}${window.location.host}/n96`],
|
||||
["method", "GET"]
|
||||
]
|
||||
};
|
||||
|
||||
if (r_amber) {
|
||||
try {
|
||||
let encodedJson = encodeURIComponent(JSON.stringify(unsignedEvent));
|
||||
let intent = `nostrsigner:${encodedJson}?compressionType=none&returnType=event&type=sign_event`;
|
||||
let childWin = window.open(intent, "intentwindow");
|
||||
|
||||
const auth_event = await monitorClipboard();
|
||||
console.log('Parsed JSON from clipboard:', auth_event);
|
||||
|
||||
const rsp = await executeRequest(auth_event, "/n96?page=0&count=100", "GET");
|
||||
|
||||
await dumpToLog(rsp);
|
||||
} catch (err) {
|
||||
console.error('Failed to list files', err);
|
||||
}
|
||||
|
||||
} else if (r_nip07) {
|
||||
try {
|
||||
const auth_event = await window.nostr.signEvent(unsignedEvent);
|
||||
|
||||
const rsp = await executeRequest(auth_event, "/n96?page=0&count=100", "GET")
|
||||
|
||||
await dumpToLog(rsp);
|
||||
} catch (err) {
|
||||
console.error('Failed to list files', err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async function uploadFiles(e) {
|
||||
try {
|
||||
const input = document.querySelector("#file");
|
||||
const file = input.files[0];
|
||||
console.debug(file);
|
||||
|
||||
const r_nip96 = document.querySelector("#method-nip96").checked;
|
||||
const r_blossom = document.querySelector("#method-blossom").checked;
|
||||
if (r_nip96) {
|
||||
await uploadFilesNip96(file);
|
||||
} else if (r_blossom) {
|
||||
await uploadBlossom(file);
|
||||
}
|
||||
} catch (ex) {
|
||||
if (ex instanceof Error) {
|
||||
alert(ex.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function buf2hex(buffer) { // buffer is an ArrayBuffer
|
||||
return [...new Uint8Array(buffer)]
|
||||
.map(x => x.toString(16).padStart(2, '0'))
|
||||
.join('');
|
||||
}
|
||||
|
||||
async function uploadBlossom(file) {
|
||||
const r_amber = document.querySelector("#sign-amber").checked;
|
||||
const r_nip07 = document.querySelector("#sign-nip07").checked;
|
||||
|
||||
const now = Math.floor(new Date().getTime() / 1000);
|
||||
const hash = await window.crypto.subtle.digest("SHA-256", await file.arrayBuffer());
|
||||
|
||||
const unsignedEvent = {
|
||||
kind: 24242,
|
||||
created_at: now,
|
||||
content: `Upload ${file.name}`,
|
||||
tags: [
|
||||
["t", "upload"],
|
||||
["u", `${window.location.protocol}//${subdomain}${window.location.host}/upload`],
|
||||
["x", buf2hex(hash)],
|
||||
["method", "PUT"],
|
||||
["expiration", (now + 60).toString()]
|
||||
]
|
||||
}
|
||||
|
||||
if (r_amber) {
|
||||
try {
|
||||
let encodedJson = encodeURIComponent(JSON.stringify(unsignedEvent));
|
||||
let intent = `nostrsigner:${encodedJson}?compressionType=none&returnType=event&type=sign_event`;
|
||||
let childWin = window.open(intent, "intentwindow");
|
||||
|
||||
const auth_event = await monitorClipboard();
|
||||
console.log('Parsed JSON from clipboard:', auth_event);
|
||||
|
||||
const rsp = await executeRequest(auth_event, "/upload", "PUT", file);
|
||||
|
||||
await dumpToLog(rsp);
|
||||
} catch (err) {
|
||||
console.error('Failed to upload file', err);
|
||||
}
|
||||
|
||||
} else if (r_nip07) {
|
||||
try {
|
||||
const auth_event = await window.nostr.signEvent(unsignedEvent);
|
||||
|
||||
const rsp = await executeRequest(auth_event, "/upload", "PUT", file)
|
||||
|
||||
await dumpToLog(rsp);
|
||||
} catch (err) {
|
||||
console.error('Failed to upload file', err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function uploadFilesNip96(file) {
|
||||
const r_amber = document.querySelector("#sign-amber").checked;
|
||||
const r_nip07 = document.querySelector("#sign-nip07").checked;
|
||||
|
||||
const fd = new FormData();
|
||||
fd.append("size", file.size.toString());
|
||||
fd.append("caption", file.name);
|
||||
fd.append("media_type", file.type);
|
||||
fd.append("file", file);
|
||||
fd.append("no_transform", document.querySelector("#no_transform").checked.toString())
|
||||
|
||||
const unsignedEvent = {
|
||||
kind: 27235,
|
||||
created_at: Math.floor(new Date().getTime() / 1000),
|
||||
content: "",
|
||||
tags: [
|
||||
["u", `${window.location.protocol}//${subdomain}${window.location.host}/n96`],
|
||||
["method", "POST"]
|
||||
]
|
||||
}
|
||||
|
||||
if (r_amber) {
|
||||
try {
|
||||
let encodedJson = encodeURIComponent(JSON.stringify(unsignedEvent));
|
||||
let intent = `nostrsigner:${encodedJson}?compressionType=none&returnType=event&type=sign_event`;
|
||||
let childWin = window.open(intent, "intentwindow");
|
||||
|
||||
const auth_event = await monitorClipboard();
|
||||
console.log('Parsed JSON from clipboard:', auth_event);
|
||||
|
||||
const rsp = await executeRequest(auth_event, "/n96", "POST", fd);
|
||||
|
||||
await dumpToLog(rsp);
|
||||
} catch (err) {
|
||||
console.error('Failed to upload file', err);
|
||||
}
|
||||
|
||||
} else if (r_nip07) {
|
||||
try {
|
||||
const auth_event = await window.nostr.signEvent(unsignedEvent);
|
||||
|
||||
const rsp = await executeRequest(auth_event, "/n96", "POST", fd)
|
||||
|
||||
await dumpToLog(rsp);
|
||||
} catch (err) {
|
||||
console.error('Failed to upload file', err);
|
||||
}
|
||||
}
|
||||
}
|
202
ui/index.html
202
ui/index.html
@ -3,182 +3,66 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>void_cat_rs</title>
|
||||
<style>
|
||||
html {
|
||||
background-color: black;
|
||||
color: white;
|
||||
font-size: 15px;
|
||||
font-weight: 400;
|
||||
font-family: Arial, serif;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.flex-col {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.gap-2 {
|
||||
gap: 0.5rem;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
async function dumpToLog(rsp) {
|
||||
console.debug(rsp);
|
||||
const text = await rsp.text();
|
||||
if (rsp.ok) {
|
||||
document.querySelector("#log").append(JSON.stringify(JSON.parse(text), undefined, 2));
|
||||
} else {
|
||||
document.querySelector("#log").append(text);
|
||||
}
|
||||
document.querySelector("#log").append("\n");
|
||||
}
|
||||
|
||||
async function listFiles() {
|
||||
try {
|
||||
const auth_event = await window.nostr.signEvent({
|
||||
kind: 27235,
|
||||
created_at: Math.floor(new Date().getTime() / 1000),
|
||||
content: "",
|
||||
tags: [
|
||||
["u", `${window.location.protocol}//${window.location.host}/n96`],
|
||||
["method", "GET"]
|
||||
]
|
||||
});
|
||||
const rsp = await fetch("/n96?page=0&count=100", {
|
||||
method: "GET",
|
||||
headers: {
|
||||
accept: "application/json",
|
||||
authorization: `Nostr ${btoa(JSON.stringify(auth_event))}`,
|
||||
},
|
||||
});
|
||||
await dumpToLog(rsp);
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
async function uploadFiles(e) {
|
||||
try {
|
||||
const input = document.querySelector("#file");
|
||||
const file = input.files[0];
|
||||
console.debug(file);
|
||||
|
||||
const r_nip96 = document.querySelector("#method-nip96").checked;
|
||||
const r_blossom = document.querySelector("#method-blossom").checked;
|
||||
if (r_nip96) {
|
||||
await uploadFilesNip96(file)
|
||||
} else if (r_blossom) {
|
||||
await uploadBlossom(file);
|
||||
}
|
||||
} catch (ex) {
|
||||
if (ex instanceof Error) {
|
||||
alert(ex.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function buf2hex(buffer) { // buffer is an ArrayBuffer
|
||||
return [...new Uint8Array(buffer)]
|
||||
.map(x => x.toString(16).padStart(2, '0'))
|
||||
.join('');
|
||||
}
|
||||
|
||||
async function uploadBlossom(file) {
|
||||
const hash = await window.crypto.subtle.digest("SHA-256", await file.arrayBuffer());
|
||||
|
||||
const now = Math.floor(new Date().getTime() / 1000);
|
||||
const auth_event = await window.nostr.signEvent({
|
||||
kind: 24242,
|
||||
created_at: now,
|
||||
content: `Upload ${file.name}`,
|
||||
tags: [
|
||||
["t", "upload"],
|
||||
["u", `${window.location.protocol}//${window.location.host}/upload`],
|
||||
["x", buf2hex(hash)],
|
||||
["method", "PUT"],
|
||||
["expiration", (now + 10).toString()]
|
||||
]
|
||||
});
|
||||
const rsp = await fetch("/upload", {
|
||||
body: file,
|
||||
method: "PUT",
|
||||
headers: {
|
||||
accept: "application/json",
|
||||
authorization: `Nostr ${btoa(JSON.stringify(auth_event))}`,
|
||||
},
|
||||
});
|
||||
await dumpToLog(rsp);
|
||||
}
|
||||
|
||||
async function uploadFilesNip96(file) {
|
||||
const fd = new FormData();
|
||||
fd.append("size", file.size.toString());
|
||||
fd.append("caption", file.name);
|
||||
fd.append("media_type", file.type);
|
||||
fd.append("file", file);
|
||||
fd.append("no_transform", document.querySelector("#no_transform").checked.toString())
|
||||
|
||||
const auth_event = await window.nostr.signEvent({
|
||||
kind: 27235,
|
||||
created_at: Math.floor(new Date().getTime() / 1000),
|
||||
content: "",
|
||||
tags: [
|
||||
["u", `${window.location.protocol}//${window.location.host}/n96`],
|
||||
["method", "POST"]
|
||||
]
|
||||
});
|
||||
const rsp = await fetch("/n96", {
|
||||
body: fd,
|
||||
method: "POST",
|
||||
headers: {
|
||||
accept: "application/json",
|
||||
authorization: `Nostr ${btoa(JSON.stringify(auth_event))}`,
|
||||
},
|
||||
});
|
||||
await dumpToLog(rsp);
|
||||
}
|
||||
</script>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="./output.css" rel="stylesheet">
|
||||
<link href="styles.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
Welcome to void_cat_rs
|
||||
</h1>
|
||||
<div class="flex flex-col gap-2">
|
||||
<div>
|
||||
<label>
|
||||
NIP-96
|
||||
<input type="radio" name="method" id="method-nip96"/>
|
||||
<body class="relative flex items-center justify-center bg-black">
|
||||
<div class="bgwrap">
|
||||
<div class="circle"></div>
|
||||
<div class="circle"></div>
|
||||
<div class="circle"></div>
|
||||
<div class="circle"></div>
|
||||
<div class="circle"></div>
|
||||
<div class="circle"></div>
|
||||
<div class="circle"></div>
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
<div class="bg-gray-700 bg-opacity-60 p-8 z-10 mt-6 mb-6 rounded-md shadow-lg w-full max-w-3xl">
|
||||
<h1 class="text-2xl font-bold mb-3">Welcome to void_cat_rs</h1>
|
||||
<div class="flex space-x-4 mt-1 mb-3">
|
||||
<label for="sign-amber" class="cursor-pointer">
|
||||
Amber
|
||||
<input type="radio" checked name="sign" id="sign-amber">
|
||||
</label>
|
||||
<label>
|
||||
<label for="sign-nip07" class="cursor-pointer">
|
||||
NIP-07 Browser Extension
|
||||
<input type="radio" name="sign" id="sign-nip07">
|
||||
</label>
|
||||
</div>
|
||||
<div class="flex space-x-4 mt-1 mb-3">
|
||||
<label for="method-blossom" class="cursor-pointer">
|
||||
Blossom
|
||||
<input type="radio" name="method" id="method-blossom"/>
|
||||
<input type="radio" checked name="method" id="method-blossom">
|
||||
</label>
|
||||
<label for="method-nip96" class="cursor-pointer">
|
||||
NIP-96
|
||||
<input type="radio" name="method" id="method-nip96">
|
||||
</label>
|
||||
</div>
|
||||
<div style="color: #ff8383;">
|
||||
You must have a nostr extension for this to work
|
||||
</div>
|
||||
<input type="file" id="file">
|
||||
<div>
|
||||
<input type="checkbox" id="no_transform">
|
||||
|
||||
<input type="file" id="file" class="up-button file:mr-4 file:py-2 file:px-4 file:rounded-md file:border-0 file:text-sm file:font-semibold file:bg-gray-200 hover:file:bg-gray-500 mb-3">
|
||||
<div class="mb-3">
|
||||
<input checked type="checkbox" id="no_transform">
|
||||
<label for="no_transform">
|
||||
Disable compression (images)
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<button type="submit" onclick="uploadFiles(event)">
|
||||
<button class="button mr-4 py-2 px-4 rounded-md border-0 text-sm font-semibold bg-gray-200 hover:bg-gray-500" type="submit" onclick="uploadFiles(event)">
|
||||
Upload
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<span class="block text-sm font-medium text-gray-600 mb-2 mt-2">-- or --</span>
|
||||
<div>
|
||||
<button type="submit" onclick="listFiles()">
|
||||
<button class="button mr-4 py-2 px-4 rounded-md border-0 text-sm font-semibold bg-gray-200 hover:bg-gray-500" type="submit" onclick="listFiles()">
|
||||
List Uploads
|
||||
</button>
|
||||
</div>
|
||||
<div id="log-wrap" class="custom-scrollbar hidden max-h-96 h-96 mt-4 rounded-md overflow-y-scroll bg-black text-lime-500 font-mono text-sm font-medium p-4">
|
||||
<pre id="log"></pre>
|
||||
</div>
|
||||
</div>
|
||||
<pre id="log"></pre>
|
||||
<script src="app.js?ver=0.2"></script>
|
||||
</body>
|
||||
</html>
|
782
ui/output.css
Normal file
782
ui/output.css
Normal file
@ -0,0 +1,782 @@
|
||||
/*
|
||||
! tailwindcss v3.4.3 | MIT License | https://tailwindcss.com
|
||||
*/
|
||||
|
||||
/*
|
||||
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
||||
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
||||
*/
|
||||
|
||||
*,
|
||||
::before,
|
||||
::after {
|
||||
box-sizing: border-box;
|
||||
/* 1 */
|
||||
border-width: 0;
|
||||
/* 2 */
|
||||
border-style: solid;
|
||||
/* 2 */
|
||||
border-color: #e5e7eb;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
::before,
|
||||
::after {
|
||||
--tw-content: '';
|
||||
}
|
||||
|
||||
/*
|
||||
1. Use a consistent sensible line-height in all browsers.
|
||||
2. Prevent adjustments of font size after orientation changes in iOS.
|
||||
3. Use a more readable tab size.
|
||||
4. Use the user's configured `sans` font-family by default.
|
||||
5. Use the user's configured `sans` font-feature-settings by default.
|
||||
6. Use the user's configured `sans` font-variation-settings by default.
|
||||
7. Disable tap highlights on iOS
|
||||
*/
|
||||
|
||||
html,
|
||||
:host {
|
||||
line-height: 1.5;
|
||||
/* 1 */
|
||||
-webkit-text-size-adjust: 100%;
|
||||
/* 2 */
|
||||
-moz-tab-size: 4;
|
||||
/* 3 */
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
/* 3 */
|
||||
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
/* 4 */
|
||||
font-feature-settings: normal;
|
||||
/* 5 */
|
||||
font-variation-settings: normal;
|
||||
/* 6 */
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
/* 7 */
|
||||
}
|
||||
|
||||
/*
|
||||
1. Remove the margin in all browsers.
|
||||
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
/* 1 */
|
||||
line-height: inherit;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/*
|
||||
1. Add the correct height in Firefox.
|
||||
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
|
||||
3. Ensure horizontal rules are visible by default.
|
||||
*/
|
||||
|
||||
hr {
|
||||
height: 0;
|
||||
/* 1 */
|
||||
color: inherit;
|
||||
/* 2 */
|
||||
border-top-width: 1px;
|
||||
/* 3 */
|
||||
}
|
||||
|
||||
/*
|
||||
Add the correct text decoration in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
abbr:where([title]) {
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
}
|
||||
|
||||
/*
|
||||
Remove the default font size and weight for headings.
|
||||
*/
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
/*
|
||||
Reset links to optimize for opt-in styling instead of opt-out.
|
||||
*/
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
|
||||
/*
|
||||
Add the correct font weight in Edge and Safari.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/*
|
||||
1. Use the user's configured `mono` font-family by default.
|
||||
2. Use the user's configured `mono` font-feature-settings by default.
|
||||
3. Use the user's configured `mono` font-variation-settings by default.
|
||||
4. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
samp,
|
||||
pre {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
/* 1 */
|
||||
font-feature-settings: normal;
|
||||
/* 2 */
|
||||
font-variation-settings: normal;
|
||||
/* 3 */
|
||||
font-size: 1em;
|
||||
/* 4 */
|
||||
}
|
||||
|
||||
/*
|
||||
Add the correct font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/*
|
||||
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
/*
|
||||
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
|
||||
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
|
||||
3. Remove gaps between table borders by default.
|
||||
*/
|
||||
|
||||
table {
|
||||
text-indent: 0;
|
||||
/* 1 */
|
||||
border-color: inherit;
|
||||
/* 2 */
|
||||
border-collapse: collapse;
|
||||
/* 3 */
|
||||
}
|
||||
|
||||
/*
|
||||
1. Change the font styles in all browsers.
|
||||
2. Remove the margin in Firefox and Safari.
|
||||
3. Remove default padding in all browsers.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: inherit;
|
||||
/* 1 */
|
||||
font-feature-settings: inherit;
|
||||
/* 1 */
|
||||
font-variation-settings: inherit;
|
||||
/* 1 */
|
||||
font-size: 100%;
|
||||
/* 1 */
|
||||
font-weight: inherit;
|
||||
/* 1 */
|
||||
line-height: inherit;
|
||||
/* 1 */
|
||||
letter-spacing: inherit;
|
||||
/* 1 */
|
||||
color: inherit;
|
||||
/* 1 */
|
||||
margin: 0;
|
||||
/* 2 */
|
||||
padding: 0;
|
||||
/* 3 */
|
||||
}
|
||||
|
||||
/*
|
||||
Remove the inheritance of text transform in Edge and Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/*
|
||||
1. Correct the inability to style clickable types in iOS and Safari.
|
||||
2. Remove default button styles.
|
||||
*/
|
||||
|
||||
button,
|
||||
input:where([type='button']),
|
||||
input:where([type='reset']),
|
||||
input:where([type='submit']) {
|
||||
-webkit-appearance: button;
|
||||
/* 1 */
|
||||
background-color: transparent;
|
||||
/* 2 */
|
||||
background-image: none;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/*
|
||||
Use the modern Firefox focus style for all focusable elements.
|
||||
*/
|
||||
|
||||
:-moz-focusring {
|
||||
outline: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
|
||||
*/
|
||||
|
||||
:-moz-ui-invalid {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/*
|
||||
Add the correct vertical alignment in Chrome and Firefox.
|
||||
*/
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/*
|
||||
Correct the cursor style of increment and decrement buttons in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-inner-spin-button,
|
||||
::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
1. Correct the odd appearance in Chrome and Safari.
|
||||
2. Correct the outline style in Safari.
|
||||
*/
|
||||
|
||||
[type='search'] {
|
||||
-webkit-appearance: textfield;
|
||||
/* 1 */
|
||||
outline-offset: -2px;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/*
|
||||
Remove the inner padding in Chrome and Safari on macOS.
|
||||
*/
|
||||
|
||||
::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/*
|
||||
1. Correct the inability to style clickable types in iOS and Safari.
|
||||
2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button;
|
||||
/* 1 */
|
||||
font: inherit;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/*
|
||||
Add the correct display in Chrome and Safari.
|
||||
*/
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/*
|
||||
Removes the default spacing and border for appropriate elements.
|
||||
*/
|
||||
|
||||
blockquote,
|
||||
dl,
|
||||
dd,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
hr,
|
||||
figure,
|
||||
p,
|
||||
pre {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
menu {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
Reset default styling for dialogs.
|
||||
*/
|
||||
|
||||
dialog {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
Prevent resizing textareas horizontally by default.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
/*
|
||||
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
|
||||
2. Set the default placeholder color to the user's configured gray 400 color.
|
||||
*/
|
||||
|
||||
input::-moz-placeholder, textarea::-moz-placeholder {
|
||||
opacity: 1;
|
||||
/* 1 */
|
||||
color: #9ca3af;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
input::placeholder,
|
||||
textarea::placeholder {
|
||||
opacity: 1;
|
||||
/* 1 */
|
||||
color: #9ca3af;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/*
|
||||
Set the default cursor for buttons.
|
||||
*/
|
||||
|
||||
button,
|
||||
[role="button"] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/*
|
||||
Make sure disabled buttons don't get the pointer cursor.
|
||||
*/
|
||||
|
||||
:disabled {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/*
|
||||
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
|
||||
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
|
||||
This can trigger a poorly considered lint error in some tools but is included by design.
|
||||
*/
|
||||
|
||||
img,
|
||||
svg,
|
||||
video,
|
||||
canvas,
|
||||
audio,
|
||||
iframe,
|
||||
embed,
|
||||
object {
|
||||
display: block;
|
||||
/* 1 */
|
||||
vertical-align: middle;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/*
|
||||
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
|
||||
*/
|
||||
|
||||
img,
|
||||
video {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* Make elements with the HTML hidden attribute stay hidden by default */
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
*, ::before, ::after {
|
||||
--tw-border-spacing-x: 0;
|
||||
--tw-border-spacing-y: 0;
|
||||
--tw-translate-x: 0;
|
||||
--tw-translate-y: 0;
|
||||
--tw-rotate: 0;
|
||||
--tw-skew-x: 0;
|
||||
--tw-skew-y: 0;
|
||||
--tw-scale-x: 1;
|
||||
--tw-scale-y: 1;
|
||||
--tw-pan-x: ;
|
||||
--tw-pan-y: ;
|
||||
--tw-pinch-zoom: ;
|
||||
--tw-scroll-snap-strictness: proximity;
|
||||
--tw-gradient-from-position: ;
|
||||
--tw-gradient-via-position: ;
|
||||
--tw-gradient-to-position: ;
|
||||
--tw-ordinal: ;
|
||||
--tw-slashed-zero: ;
|
||||
--tw-numeric-figure: ;
|
||||
--tw-numeric-spacing: ;
|
||||
--tw-numeric-fraction: ;
|
||||
--tw-ring-inset: ;
|
||||
--tw-ring-offset-width: 0px;
|
||||
--tw-ring-offset-color: #fff;
|
||||
--tw-ring-color: rgb(59 130 246 / 0.5);
|
||||
--tw-ring-offset-shadow: 0 0 #0000;
|
||||
--tw-ring-shadow: 0 0 #0000;
|
||||
--tw-shadow: 0 0 #0000;
|
||||
--tw-shadow-colored: 0 0 #0000;
|
||||
--tw-blur: ;
|
||||
--tw-brightness: ;
|
||||
--tw-contrast: ;
|
||||
--tw-grayscale: ;
|
||||
--tw-hue-rotate: ;
|
||||
--tw-invert: ;
|
||||
--tw-saturate: ;
|
||||
--tw-sepia: ;
|
||||
--tw-drop-shadow: ;
|
||||
--tw-backdrop-blur: ;
|
||||
--tw-backdrop-brightness: ;
|
||||
--tw-backdrop-contrast: ;
|
||||
--tw-backdrop-grayscale: ;
|
||||
--tw-backdrop-hue-rotate: ;
|
||||
--tw-backdrop-invert: ;
|
||||
--tw-backdrop-opacity: ;
|
||||
--tw-backdrop-saturate: ;
|
||||
--tw-backdrop-sepia: ;
|
||||
--tw-contain-size: ;
|
||||
--tw-contain-layout: ;
|
||||
--tw-contain-paint: ;
|
||||
--tw-contain-style: ;
|
||||
}
|
||||
|
||||
::backdrop {
|
||||
--tw-border-spacing-x: 0;
|
||||
--tw-border-spacing-y: 0;
|
||||
--tw-translate-x: 0;
|
||||
--tw-translate-y: 0;
|
||||
--tw-rotate: 0;
|
||||
--tw-skew-x: 0;
|
||||
--tw-skew-y: 0;
|
||||
--tw-scale-x: 1;
|
||||
--tw-scale-y: 1;
|
||||
--tw-pan-x: ;
|
||||
--tw-pan-y: ;
|
||||
--tw-pinch-zoom: ;
|
||||
--tw-scroll-snap-strictness: proximity;
|
||||
--tw-gradient-from-position: ;
|
||||
--tw-gradient-via-position: ;
|
||||
--tw-gradient-to-position: ;
|
||||
--tw-ordinal: ;
|
||||
--tw-slashed-zero: ;
|
||||
--tw-numeric-figure: ;
|
||||
--tw-numeric-spacing: ;
|
||||
--tw-numeric-fraction: ;
|
||||
--tw-ring-inset: ;
|
||||
--tw-ring-offset-width: 0px;
|
||||
--tw-ring-offset-color: #fff;
|
||||
--tw-ring-color: rgb(59 130 246 / 0.5);
|
||||
--tw-ring-offset-shadow: 0 0 #0000;
|
||||
--tw-ring-shadow: 0 0 #0000;
|
||||
--tw-shadow: 0 0 #0000;
|
||||
--tw-shadow-colored: 0 0 #0000;
|
||||
--tw-blur: ;
|
||||
--tw-brightness: ;
|
||||
--tw-contrast: ;
|
||||
--tw-grayscale: ;
|
||||
--tw-hue-rotate: ;
|
||||
--tw-invert: ;
|
||||
--tw-saturate: ;
|
||||
--tw-sepia: ;
|
||||
--tw-drop-shadow: ;
|
||||
--tw-backdrop-blur: ;
|
||||
--tw-backdrop-brightness: ;
|
||||
--tw-backdrop-contrast: ;
|
||||
--tw-backdrop-grayscale: ;
|
||||
--tw-backdrop-hue-rotate: ;
|
||||
--tw-backdrop-invert: ;
|
||||
--tw-backdrop-opacity: ;
|
||||
--tw-backdrop-saturate: ;
|
||||
--tw-backdrop-sepia: ;
|
||||
--tw-contain-size: ;
|
||||
--tw-contain-layout: ;
|
||||
--tw-contain-paint: ;
|
||||
--tw-contain-style: ;
|
||||
}
|
||||
|
||||
.relative {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.z-10 {
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.mb-2 {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.mb-3 {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.mb-6 {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.mr-4 {
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.mt-1 {
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
||||
.mt-2 {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.mt-4 {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.mt-6 {
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.block {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.contents {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.h-96 {
|
||||
height: 24rem;
|
||||
}
|
||||
|
||||
.max-h-96 {
|
||||
max-height: 24rem;
|
||||
}
|
||||
|
||||
.w-full {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.max-w-3xl {
|
||||
max-width: 48rem;
|
||||
}
|
||||
|
||||
.cursor-pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.items-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.justify-center {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.space-x-4 > :not([hidden]) ~ :not([hidden]) {
|
||||
--tw-space-x-reverse: 0;
|
||||
margin-right: calc(1rem * var(--tw-space-x-reverse));
|
||||
margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
|
||||
}
|
||||
|
||||
.overflow-y-scroll {
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.rounded-md {
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
.border-0 {
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.bg-black {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(0 0 0 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-gray-200 {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(229 231 235 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-gray-700 {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(55 65 81 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-opacity-60 {
|
||||
--tw-bg-opacity: 0.6;
|
||||
}
|
||||
|
||||
.p-4 {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.p-8 {
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.px-4 {
|
||||
padding-left: 1rem;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
|
||||
.py-2 {
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.font-mono {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
}
|
||||
|
||||
.text-2xl {
|
||||
font-size: 1.5rem;
|
||||
line-height: 2rem;
|
||||
}
|
||||
|
||||
.text-sm {
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.25rem;
|
||||
}
|
||||
|
||||
.font-bold {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.font-medium {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.font-semibold {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.text-gray-600 {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(75 85 99 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.text-lime-500 {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(132 204 22 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.shadow-lg {
|
||||
--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
||||
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
|
||||
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
||||
}
|
||||
|
||||
.file\:mr-4::file-selector-button {
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.file\:rounded-md::file-selector-button {
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
.file\:border-0::file-selector-button {
|
||||
border-width: 0px;
|
||||
}
|
||||
|
||||
.file\:bg-gray-200::file-selector-button {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(229 231 235 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.file\:px-4::file-selector-button {
|
||||
padding-left: 1rem;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
|
||||
.file\:py-2::file-selector-button {
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.file\:text-sm::file-selector-button {
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.25rem;
|
||||
}
|
||||
|
||||
.file\:font-semibold::file-selector-button {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.hover\:bg-gray-500:hover {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(107 114 128 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.hover\:file\:bg-gray-500::file-selector-button:hover {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(107 114 128 / var(--tw-bg-opacity));
|
||||
}
|
214
ui/styles.css
Normal file
214
ui/styles.css
Normal file
@ -0,0 +1,214 @@
|
||||
body, html {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
min-height: 100vh;
|
||||
color: lime;
|
||||
}
|
||||
|
||||
body:before {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
content: '';
|
||||
height: 14px;
|
||||
background-repeat: repeat-x;
|
||||
background-color: fuchsia;
|
||||
animation: scroll 60s linear infinite;
|
||||
color: #000;
|
||||
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="365" height="12"><text x="0%" y="80%" font-weight="bold" font-size="12" fill="lime" font-family="monospace">YOU MUST HAVE A NOSTR EXTENSION FOR THIS TO WORK.</text></svg>')
|
||||
}
|
||||
|
||||
@keyframes scroll {
|
||||
0% { background-position: 100% 50%; }
|
||||
100% { background-position: 0% 50%; }
|
||||
}
|
||||
|
||||
@keyframes float {
|
||||
0%, 100% {
|
||||
transform: translate(0, 0);
|
||||
opacity: 0.10;
|
||||
}
|
||||
20% {
|
||||
transform: translate(-150px, 50px);
|
||||
opacity: 0.15;
|
||||
}
|
||||
40% {
|
||||
transform: translate(-50px, -90px);
|
||||
opacity: 0.20;
|
||||
}
|
||||
60% {
|
||||
transform: translate(90px, 30px);
|
||||
opacity: 0.15;
|
||||
}
|
||||
80% {
|
||||
transform: translate(-75px, 75px);
|
||||
opacity: 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
.bgwrap {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.circle {
|
||||
position: absolute;
|
||||
border-radius: 50%;
|
||||
filter: blur(20px);
|
||||
animation: float 18s ease-in-out infinite;
|
||||
z-index: 0;
|
||||
mix-blend-mode: hard-light;
|
||||
}
|
||||
|
||||
.circle:nth-child(1) {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
background: fuchsia;
|
||||
top: 10%;
|
||||
left: 10%;
|
||||
animation-duration: 24s;
|
||||
}
|
||||
|
||||
.circle:nth-child(2) {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
background: lime;
|
||||
top: 20%;
|
||||
left: 70%;
|
||||
animation-duration: 30s;
|
||||
}
|
||||
|
||||
.circle:nth-child(3) {
|
||||
width: 250px;
|
||||
height: 250px;
|
||||
background: fuchsia;
|
||||
top: 50%;
|
||||
left: 20%;
|
||||
animation-duration: 23s;
|
||||
}
|
||||
|
||||
.circle:nth-child(4) {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
background: lime;
|
||||
top: 70%;
|
||||
left: 20%;
|
||||
animation-duration: 32s;
|
||||
}
|
||||
|
||||
.circle:nth-child(5) {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: fuchsia;
|
||||
top: 40%;
|
||||
left: 75%;
|
||||
animation-duration: 35s;
|
||||
}
|
||||
|
||||
.circle:nth-child(6) {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background: lime;
|
||||
top: 60%;
|
||||
left: 80%;
|
||||
animation-duration: 12s;
|
||||
}
|
||||
|
||||
.circle:nth-child(7) {
|
||||
width: 75px;
|
||||
height: 75px;
|
||||
background: fuchsia;
|
||||
top: 10%;
|
||||
left: 90%;
|
||||
animation-duration: 16s;
|
||||
}
|
||||
|
||||
.circle:nth-child(8) {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
background: lime;
|
||||
top: 90%;
|
||||
left: 70%;
|
||||
animation-duration: 27s;
|
||||
}
|
||||
|
||||
.custom-scrollbar {
|
||||
scrollbar-color: #4caf50 #1a1a1a;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
.button, .up-button::file-selector-button {
|
||||
color: fuchsia;
|
||||
}
|
||||
|
||||
input[type="radio"] {
|
||||
appearance: none;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
height: .813rem;
|
||||
width: .813rem;
|
||||
border: 2px solid lime;
|
||||
border-radius: 50%;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
input[type="radio"]:checked {
|
||||
background-color: fuchsia;
|
||||
}
|
||||
|
||||
input[type="radio"]:checked::after {
|
||||
content: '';
|
||||
height: 0.35rem;
|
||||
width: 0.35rem;
|
||||
background-color: lime;
|
||||
display: block;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
appearance: none;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
height: .813rem;
|
||||
width: .813rem;
|
||||
border: 2px solid lime;
|
||||
border-radius: 4px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
input[type="checkbox"]:checked::before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: fuchsia;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
input[type="checkbox"]:checked::after {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
left: 55%;
|
||||
width: 45%;
|
||||
height: 65%;
|
||||
border: solid lime;
|
||||
border-width: 0 1.75px 1.75px 0;
|
||||
transform: translate(-50%, -50%) rotate(45deg);
|
||||
}
|
Loading…
Reference in New Issue
Block a user