A first working draft generating always the same name

This commit is contained in:
Tissevert 2020-08-13 17:50:13 +02:00
commit d44b8258f5
4 changed files with 33 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
main.js

9
README.md Normal file
View file

@ -0,0 +1,9 @@
# Génévée
A merovingian king/queen name generator.
## Deploy with [SJW](https://git.marvid.fr/Tissevert/SJW)
```
# sjw src -o main.js
```

13
index.html Normal file
View file

@ -0,0 +1,13 @@
<!doctype HTML>
<html>
<head>
<meta charset="utf-8">
<title>Génévée</title>
<script src="main.js"></script>
</head>
<body>
<h1>Générateur de nom de souverain·es mérovingien·nes</h1>
<input id="generate" type="button" value="Générer"/>
<p id="result"></p>
</body>
</html>

10
src/Main.js Normal file
View file

@ -0,0 +1,10 @@
var generate = document.getElementById('generate');
var result = document.getElementById('result');
function name() {
return "machin";
}
generate.addEventListener('click', function() {
result.textContent = "Gloire à " + name() + " !";
});