A first working draft generating always the same name
This commit is contained in:
commit
d44b8258f5
4 changed files with 33 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
main.js
|
9
README.md
Normal file
9
README.md
Normal 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
13
index.html
Normal 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
10
src/Main.js
Normal 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() + " !";
|
||||||
|
});
|
Loading…
Reference in a new issue