From 7869775ae8447708281523bfc0e349e3ea7e0635 Mon Sep 17 00:00:00 2001 From: Filipe Date: Thu, 7 Dec 2017 11:04:10 -0200 Subject: [PATCH] Making `Start typing` button work and fix Android automatic text change (#13) * Fix install order, adding start script * Adding home page * Adding logo and Github star link * Fix typo * Improving run script and making start typing button work * Removing Android automatic changes in the home input --- notto/nottoapp/templates/index.html | 20 ++++++++++++++++---- run.sh | 4 +++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/notto/nottoapp/templates/index.html b/notto/nottoapp/templates/index.html index 1f5a332..079269e 100644 --- a/notto/nottoapp/templates/index.html +++ b/notto/nottoapp/templates/index.html @@ -39,12 +39,18 @@ } .button { height: 44px; + line-height: 35px; vertical-align: middle; background-color: #111; color: #fafafa; border: 0; border-radius: 2px; padding: 4px 16px; + cursor: pointer; + } + .button:hover { + text-decoration: none; + color: #fafafa; } .input-group .input-group-addon, .input-group input { border: 0; @@ -89,11 +95,11 @@

- notto.io/ - + notto.io/ +
- + Start typing
@@ -115,7 +121,13 @@

var getAWord = function () { return wordList[Math.floor(Math.random() * wordList.length)] } - document.querySelector('.form-control').placeholder = getAWord() + '/' + getAWord() + var input = document.querySelector('.form-control') + var button = document.querySelector('.button') + + input.placeholder = getAWord() + '/' + getAWord() + input.addEventListener('keyup', function () { + button.href = input.value + }) diff --git a/run.sh b/run.sh index 8e33254..885397c 100755 --- a/run.sh +++ b/run.sh @@ -1 +1,3 @@ -python3 ./notto/manage.py runserver +source nottoenv/bin/activate && \ +cd ./notto && \ +python3 ./manage.py runserver