add: czech language support

This commit is contained in:
odweta
2026-09-07 18:40:35 +02:00
parent 7219f298ae
commit 2f157f1db2
4 changed files with 79 additions and 4 deletions
+5 -1
View File
@@ -8,7 +8,11 @@ const app = express();
app.use(express.static(__dirname + '/static'));
app.get('/', (req, res) => {
res.sendFile(path.join(__dirname, '/static/index.html'));
res.sendFile(path.join(__dirname, '/static/cs/index.html'));
});
app.get('/en', (req, res) => {
res.sendFile(path.join(__dirname, '/static/en/index.html'));
});
app.get('/search', handleSearch);
+31
View File
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="cs">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../style.css"/>
<title>Hledáček</title>
</head>
<body>
<div id="centerdiv">
<table id="titletable">
<tr>
<td class="left">
<h1 id="title">Prohledávejte web!</h1>
</td>
<td class="right">
<form action="/en">
<input id="languagebutton" type="submit" value="angličtina" />
</form>
</td>
</tr>
</table>
<h3 id="subtitle">Vyhledá výsledky a&nbsp;umožní je uložit ve formátu JSON.</h3>
<form action="/search" name="searchbox" method="GET">
<input id="searchform" placeholder="Zadejte požadavek..." type="text" name="query"/>
<br>
<input id="searchbutton" type="submit" value="Hledat"/>
</form>
</div>
</body>
</html>
@@ -3,13 +3,24 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css"/>
<link rel="stylesheet" href="../style.css"/>
<title>Searchthing</title>
</head>
<body>
<div id="centerdiv">
<table id="titletable">
<tr>
<td class="left">
<h1 id="title">Search the web!</h1>
<h3 id="subtitle">Get the search results and save them in a JSON file.</h3>
</td>
<td class="right">
<form action="/">
<input id="languagebutton" type="submit" value="czech" />
</form>
</td>
</tr>
</table>
<h3 id="subtitle">Get the search results and save them in a&nbsp;JSON file.</h3>
<form action="/search" name="searchbox" method="GET">
<input id="searchform" placeholder="Type your query here..." type="text" name="query"/>
<br>
+29
View File
@@ -20,9 +20,15 @@ html {
}
#title {
margin-bottom: 1rem;
font-style: italic;
}
#subtitle {
margin-top: 0;
margin-bottom: 4rem;
}
#searchform,
#searchbutton {
width: 100%;
@@ -49,3 +55,26 @@ html {
border-color: #FFDFBF;
outline-style: none;
}
#languagebutton:hover {
color: #FFDFBF;
}
#languagebutton {
background: none;
border: none;
color: rgb(218, 204, 85);
text-decoration: underline;
}
#titletable {
width: 100%;
}
.left {
text-align: left;
}
.right {
text-align: right;
}