This commit is contained in:
lda committed 2024-10-20 01:59:59 +07:00
1 parent a8e5c26d55
commit dbebf03250
7 files changed
+260 -82

No files matched your search

+47
View File
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>lđa testing</title>
<link type="text/css" rel="stylesheet" href="./index/style.css" />
<!-- huh? what? -->
<script type="module" src="./index/script.js" defer></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" />
<!-- real -->
</head>
<body>
<header>
<h1>front end design:</h1>
</header>
<nav>
<ul>
<li>
<a href="/about.html">about</a>
</li>
<li>
<a href="/browse.html">view</a>
</li>
<li>
<a href="/view.html">read</a>
</li>
<li>
<a href = "/">write</a>
</li>
</ul>
</nav>
<main>
<h1>real!</h1>
<section>
<p>bad made by lda</p>
</section>
</main>
<footer>
<h1>by <a href="//ldlda.com">lđa</a></h1>
<p>very fragile</p>
</footer>
</body>
</html>
+45 -36
View File
@@ -80,11 +80,11 @@ const typingHandler = (f) => (e) => {
// updateTimeout = undefined;
// }
if (
// !justUpdated &&
!updateTimeout) {
// !justUpdated &&
!updateTimeout
) {
// justUpdated = true;
updateTimeout = setTimeout(() => {
try {
f();
document.getElementById("errorfrommd").textContent = null;
@@ -93,11 +93,10 @@ const typingHandler = (f) => (e) => {
}
// justUpdated = false;
clearTimeout(updateTimeout)
clearTimeout(updateTimeout);
updateTimeout = undefined;
}, updatingInterval);
}
};
const mdUpdatingHandler = typingHandler(updateMD); //why
document.getElementById("auto_translate").addEventListener("change", (e) => {
@@ -221,43 +220,53 @@ form.addEventListener("submit", (e) => {
let htmlContent = "";
const tableContent = document.getElementById("tbale");
const actualTableContent = document.getElementById("updatedget");
const cdc = document.createElement("div");
cdc.textContent = "sdfasdfasdfsdfaasdfasdfasdfasdfasdfasfdasdfasdf";
document.getElementsByTagName("main")[0].appendChild(cdc);
const GETendp = (_) =>
fetch(address + "endp")
.then((response) => response.json())
.then((json) => {
console.log(json);
// htmlContent = "<tbody>";
for (let key in json) {
const url = json[key]["one"];
const responsecode = json[key]["three"];
let responsecontent = "something else";
switch (responsecode) {
case 200:
responsecontent = "text";
break;
// damn
case 301:
case 302:
case 307:
case 308: // DONT EVER stick with 302
responsecontent = "redirect";
break;
}
htmlContent += `<tr>
const GETendp = (_) => {
const response = fetch(address + "endp") // hmm ahsdflakhwfuisdgaf
.then(
(response) => response.json(), e => console.log(e)
)
.then(
(json) => {
console.log(json);
// htmlContent = "<tbody>";
for (let key in json) {
const url = json[key]["one"];
const responsecode = json[key]["three"];
let responsecontent = "something else";
switch (responsecode) {
case 200:
responsecontent = "text";
break;
// damn
case 301:
case 302:
case 307:
case 308: // DONT EVER stick with 302
responsecontent = "redirect";
break;
}
htmlContent += `<tr>
<th>${key}</th>
<td><a href="${"./" + url}">${url}</a></td>
<td>${responsecontent}</td>
<td>${json[key]["four"] || "Never"}</td>
</tr>`;
}
}
// htmlContent += "</tbody>";
actualTableContent.innerHTML = htmlContent;
htmlContent = ''
})
.catch((e) => console.error(e));
// htmlContent += "</tbody>";
actualTableContent.innerHTML = htmlContent;
htmlContent = "";
tableContent.parentElement.hidden = false; // lmaop
},
(what) => console.log(what)
)
}
await GETendp();
GETendp();
tableContent.parentElement.hidden = false;
+14 -12
View File
@@ -1,8 +1,3 @@
* {
box-sizing: border-box;
overflow-wrap: break-word;
}
:root {
--dark-enough: #303030;
--color-1: #8bafed;
@@ -11,7 +6,10 @@
--color-4: #ff7100;
--challenge: "use dem colors";
}
*, *::before, *::after {
box-sizing: border-box;
overflow-wrap: break-word ;
}
body {
background-color: white;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='215' height='215' viewBox='0 0 200 200'%3E%3Cpolygon fill='%23FAF7F5' fill-opacity='0.58' points='100 0 0 100 100 100 100 200 200 100 200 0'/%3E%3C/svg%3E");
@@ -24,12 +22,15 @@ body {
grid-template-rows: 100px 1fr 300px;
grid-template-areas: "head head" "nav main" "nav foot";
max-width: 100%;
}
body,
html {
width: 100%;
/* width: 100%; */
}
/* do i know what im doing */
html {
max-width: 100vw;
max-height: 100vh;
}
body > * {
margin-inline: auto;
border-radius: 15px;
@@ -112,7 +113,8 @@ footer {
background-color: mistyrose;
padding: 0.5em;
border-radius: 6px;
max-width: calc(100% - 1em);
/* max-width: calc(100% - 1em); */
/* why */
margin-inline: auto;
display: flex;
@@ -171,7 +173,7 @@ textarea::placeholder {
overflow-wrap: break-word;
resize: none;
min-height: 16rem;
height:max-content;
height: max-content;
}
/* ????? */
+47
View File
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>lđa testing</title>
<link type="text/css" rel="stylesheet" href="./index/style.css" />
<!-- huh? what? -->
<script type="module" src="./index/script.js" defer></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" />
<!-- real -->
</head>
<body>
<header>
<h1>front end design:</h1>
</header>
<nav>
<ul>
<li>
<a href="/about.html">about</a>
</li>
<li>
<a href="/browse.html">view</a>
</li>
<li>
<a href="/view.html">read</a>
</li>
<li>
<a href = "/">write</a>
</li>
</ul>
</nav>
<main>
<h1>real!</h1>
<section>
<p>bad made by lda</p>
</section>
</main>
<footer>
<h1>by <a href="//ldlda.com">lđa</a></h1>
<p>very fragile</p>
</footer>
</body>
</html>