🚡🌔 Checkpoint

./public/script.js:1954897/14033
./public/styles.css:1954897/577
./views/index.html:1954897/45
This commit is contained in:
Glitch (tabu)
2019-07-01 13:01:05 +00:00
parent 1cde88a35f
commit 2c33b104ad
3 changed files with 26 additions and 5 deletions
+14 -4
View File
@@ -30,10 +30,20 @@
}
)
document.addEventListener('word', async function () {
let words = (await palabras)
console.log(words)
wordBank.innerHTML = words.words[~~(Math.random() * words.words.length)].p
document.addEventListener('word', function () {
fetch('palabras.json')
.then(x => x.json())
.then(w => w.words)
.then(function (words) {
// console.log(words)
wordBank.innerHTML = ''
for (let word of words) {
let b = document.createElement('button')
b.classList.add('chip')
b.innerText = word.p
wordBank.appendChild(b)
}
})
})
document.addEventListener('fs', (e) => {
+11
View File
@@ -105,6 +105,17 @@ input:focus {
border-bottom-color: var(--accent);
}
.chip {
border: 0;
background: 0;
color: inherit;
background: rgba(255,255,255, .31);
border-radius: 16px;
font-size: 14px;
padding: 6px 12px;
margin: 2px;
}
.graphic {
width: 100%;
max-width: 480px;