This repository has been archived on 2020-02-20. You can view files and clone it, but cannot push or open issues or pull requests.
polytranslatia/views/index.mustache
2020-02-20 13:08:13 +01:00

41 lines
1.2 KiB
Plaintext

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Poliatranslatia</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<link rel="stylesheet" href="/css/styles.css">
</head>
<body>
{{> partials/header}}
<form action="/" method="POST">
<label for="sourceUrl">Source JSON:</label><br>
<input name="sourceUrl" id="sourceUrl" type="text" placeholder="URL to source JSON" required="true"><br>
<button id="useDefault">Use default en_US</button><br><br>
<label for="target">Translation direction</label><br>
<p>For example:<br>From en_US default to dutch, use en_nl.</p>
<select name="target" id="targetLanguage">
{{#dirs}}
<option value={{.}}>{{.}}</option>
{{/dirs}}
</select>
<br><br>
<button type="submit">Submit</button>
</form>
<script>
$('#useDefault').on('click', function(e) {
e.preventDefault();
$('#sourceUrl').val("http://midjiwan.com/lang/en_US.json");
});
</script>
{{> partials/footer}}
</body>
</html>