From 67fc16f0c6e27c2e3a5731bf1e14fc4f2b91276d Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Thu, 6 Feb 2020 17:09:21 +0100 Subject: [PATCH] fixed mobile issues --- package.json | 5 ++++- website/main.css | 1 + website/main.ts | 9 ++++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index f1911a2..ac66df1 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "scripts": { "generate": "git -C ./generate/wordlist pull && node ./generate/wordlist.js", "docs": "parcel build --no-source-maps --out-dir ./docs --public-url ./ ./website/index.html", - "build": "tsc", + "docs:dev": "parcel ./website/index.html", "prepublishOnly": "rm -rf ./lib && tsc" }, "repository": { @@ -31,5 +31,8 @@ "tachyons": "^4.11.1", "ts-node-dev": "^1.0.0-pre.44", "typescript": "3.7" + }, + "dependencies": { + "bulma": "^0.8.0" } } diff --git a/website/main.css b/website/main.css index be385f7..f557108 100644 --- a/website/main.css +++ b/website/main.css @@ -19,6 +19,7 @@ body { } #main > div { + width: 100%; max-width: 35em; margin: auto; } diff --git a/website/main.ts b/website/main.ts index ed7be9c..82636b4 100644 --- a/website/main.ts +++ b/website/main.ts @@ -6,12 +6,11 @@ const output = window.document.getElementById('username') as HTMLInputElement const list = window.document.getElementById('lists') const button = window.document.getElementById('button') -const gen = () => { +const calculate = () => { output.value = generate(input.value) } -button.addEventListener('click', gen) -button.addEventListener('touchstart', gen) - -gen() +// Init +button.addEventListener('click', calculate) +calculate() list.innerHTML = showAvailableLists().join(', ')