Fixed HTML formatting; added description

This commit is contained in:
DarkCat09 2023-08-15 14:57:10 +04:00
parent 17e5773988
commit f688304c07
No known key found for this signature in database
GPG Key ID: 4785B6FB1C50A540
3 changed files with 15 additions and 20 deletions

View File

@ -1,8 +1,13 @@
import { FastifyInstance } from "fastify";
import { engineList } from "../handlers/main";
const desc = (
"txtdot is a HTTP proxy that parses text, links and pictures " +
"from pages reducing internet traffic, removing ads and heavy scripts"
);
export default async function parseRoute(fastify: FastifyInstance) {
fastify.get("/start", async (_, reply) => {
return reply.view("/templates/start.ejs", { engineList });
return reply.view("/templates/start.ejs", { desc, engineList });
});
}

View File

@ -1,21 +1,14 @@
<!DOCTYPE html>
<html lang="<%= parsed.lang %>">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>
<%= parsed.title %>
</title>
<meta name="description" content="<%= parsed.textContent %>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="robots" content="noindex, nofollow">
<title><%= parsed.title %></title>
</head>
<body>
<h1>
<%= parsed.title %>
</h1>
<h1><%= parsed.title %></h1>
<main><%- parsed.content %></main>
</body>
</html>
</html>

View File

@ -1,14 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>TXTDot starting page</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="<%= desc %>">
<title>txt. main page</title>
</head>
<body>
<form action="/">
<label for="url">URL</label>
@ -36,5 +34,4 @@
<input type="submit">
</form>
</body>
</html>
</html>