add: czech language support
This commit is contained in:
+5
-1
@@ -8,7 +8,11 @@ const app = express();
|
|||||||
app.use(express.static(__dirname + '/static'));
|
app.use(express.static(__dirname + '/static'));
|
||||||
|
|
||||||
app.get('/', (req, res) => {
|
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);
|
app.get('/search', handleSearch);
|
||||||
|
|||||||
@@ -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 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>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<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>
|
<title>Searchthing</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="centerdiv">
|
<div id="centerdiv">
|
||||||
<h1 id="title">Search the web!</h1>
|
<table id="titletable">
|
||||||
<h3 id="subtitle">Get the search results and save them in a JSON file.</h3>
|
<tr>
|
||||||
|
<td class="left">
|
||||||
|
<h1 id="title">Search the web!</h1>
|
||||||
|
</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 JSON file.</h3>
|
||||||
<form action="/search" name="searchbox" method="GET">
|
<form action="/search" name="searchbox" method="GET">
|
||||||
<input id="searchform" placeholder="Type your query here..." type="text" name="query"/>
|
<input id="searchform" placeholder="Type your query here..." type="text" name="query"/>
|
||||||
<br>
|
<br>
|
||||||
@@ -20,9 +20,15 @@ html {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#title {
|
#title {
|
||||||
|
margin-bottom: 1rem;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#subtitle {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 4rem;
|
||||||
|
}
|
||||||
|
|
||||||
#searchform,
|
#searchform,
|
||||||
#searchbutton {
|
#searchbutton {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -48,4 +54,27 @@ html {
|
|||||||
#searchform:focus {
|
#searchform:focus {
|
||||||
border-color: #FFDFBF;
|
border-color: #FFDFBF;
|
||||||
outline-style: none;
|
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;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user