Skip to content

Commit

Permalink
Making Start typing button work and fix Android automatic text chan…
Browse files Browse the repository at this point in the history
…ge (renatoliveira#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
  • Loading branch information
filipemeneses authored and renatoliveira committed Dec 7, 2017
1 parent 50e8539 commit 7869775
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
20 changes: 16 additions & 4 deletions notto/nottoapp/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -89,11 +95,11 @@ <h2 class="subtitle">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="input-group">
<span class="input-group-addon no-border">notto.io/</span>
<input type="text" class="form-control no-border">
<span class="input-group-addon">notto.io/</span>
<input type="text" class="form-control" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
</div>
<div class="center">
<button type="button" class="button">Start typing</button>
<a type="button" class="button">Start typing</a>
</div>
</div>
</div>
Expand All @@ -115,7 +121,13 @@ <h2 class="subtitle">
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
})
</script>
<script async defer src="https://buttons.github.io/buttons.js"></script>
</body>
Expand Down
4 changes: 3 additions & 1 deletion run.sh
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
python3 ./notto/manage.py runserver
source nottoenv/bin/activate && \
cd ./notto && \
python3 ./manage.py runserver

0 comments on commit 7869775

Please sign in to comment.