web: small improvements

This commit is contained in:
Chris Sexton 2019-05-27 22:16:35 -04:00
parent e219b99179
commit 20a56a4fcc
3 changed files with 7 additions and 3 deletions

View File

@ -138,8 +138,8 @@ var rootIndex = `
<html> <html>
<head> <head>
<title>Factoids</title> <title>Factoids</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.1.0/pure-min.css"> <link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/pure-min.css" integrity="sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w" crossorigin="anonymous">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
</head> </head>
{{if .EndPoints}} {{if .EndPoints}}
<div style="padding-top: 1em;"> <div style="padding-top: 1em;">

View File

@ -117,6 +117,8 @@ var indexHTML = `
}, },
send(evt) { send(evt) {
evt.preventDefault(); evt.preventDefault();
evt.stopPropagation()
this.input = "";
if (!this.authenticated) { if (!this.authenticated) {
console.log("User is a bot."); console.log("User is a bot.");
this.err = "User appears to be a bot."; this.err = "User appears to be a bot.";

View File

@ -12,7 +12,7 @@ var factoidIndex = `
<html> <html>
<head> <head>
<title>Factoids</title> <title>Factoids</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pure/0.6.0/base-min.css"> <link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/pure-min.css" integrity="sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w" crossorigin="anonymous">
<!-- DataTables CSS --> <!-- DataTables CSS -->
<link rel="stylesheet" type="text/css" href="https://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/jquery.dataTables.css"> <link rel="stylesheet" type="text/css" href="https://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/jquery.dataTables.css">
@ -24,6 +24,7 @@ var factoidIndex = `
<script type="text/javascript" charset="utf8" src="https://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js"></script> <script type="text/javascript" charset="utf8" src="https://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js"></script>
</head> </head>
<body>
<div> <div>
<form action="/factoid" method="GET" class="pure-form"> <form action="/factoid" method="GET" class="pure-form">
<fieldset> <fieldset>
@ -107,6 +108,7 @@ var factoidIndex = `
}); });
}); });
</script> </script>
</body>
</html> </html>
` `