new input area, no empty spans
This commit is contained in:
parent
7545e83cfb
commit
5709e182c6
24
index.php
24
index.php
@ -33,7 +33,9 @@ if (array_key_exists("submitted", $_REQUEST)) {
|
||||
$content .= "<br>\n";
|
||||
}
|
||||
|
||||
fwrite($sentences, $content);
|
||||
if (!empty($word)) {
|
||||
fwrite($sentences, $content);
|
||||
}
|
||||
fclose($sentences);
|
||||
header("location: ".htmlentities($_SERVER['PHP_SELF']));
|
||||
}
|
||||
@ -46,7 +48,8 @@ $config_data = json_decode($raw_json_config, false);
|
||||
<html>
|
||||
<head>
|
||||
<title><?php print($config_data->title ?? "One Word Each"); ?></title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="style.css?newinputarea">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css" integrity="sha512-+4zCK9k+qNFUR5X+cKL9EIR+ZOhtIloNl9GIKS57V1MyNsYpYcUrUeQc9vNfzsWfV28IaLL3i96P9sdNyeRssA==" crossorigin="anonymous" />
|
||||
<link rel="icon" href="<?php print($config_data->logo->icon_path ?? "favicon.ico"); ?>" type="image/x-icon">
|
||||
</head>
|
||||
<body>
|
||||
@ -55,7 +58,7 @@ $config_data = json_decode($raw_json_config, false);
|
||||
<td width="50%"><img src="<?php print($config_data->logo->image_path ?? "OWE_Logo.png"); ?>" width="90%"></td>
|
||||
<td><h1><?php print($config_data->headline ?? "One Word Each Seite"); ?></h1></td>
|
||||
</tr>
|
||||
<table>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
@ -70,17 +73,18 @@ $config_data = json_decode($raw_json_config, false);
|
||||
?>
|
||||
</p>
|
||||
<button onclick="onReloadClicked()" id="but-reload">aktualisieren</button>
|
||||
<br><br>
|
||||
<form action="./#wordform" method="post" autocomplete="off" id="wordform">
|
||||
<table>
|
||||
<tr> <td>Nächstes Wort:</td> <td><input type="text" name="submitted" id="wordinput"></td> </tr>
|
||||
<tr> <td></td> <td><input type="submit" value="senden"></td> </tr>
|
||||
</table>
|
||||
</form>
|
||||
<br>
|
||||
<form action="./#wordform" method="post" autocomplete="off" id="wordform"></form>
|
||||
<div class="word_input_area">
|
||||
<input type="text" name="submitted" id="wordinput" form="wordform" placeholder="Nächstes Wort"> <button type="submit" form="wordform" class="send_button"><i class="far fa-paper-plane"></i></button>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var previousTextLength;
|
||||
|
||||
document.getElementById("wordinput").focus();
|
||||
|
||||
function loadSentences(alertIfNew = false) {
|
||||
fetch("./data/sentences.txt", {headers: {"Cache-Control": "no-cache, no-store"}})
|
||||
.then((response) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user