🚡🌔 Checkpoint
./public/script.js:1954897/14033 ./public/styles.css:1954897/577 ./views/index.html:1954897/45
This commit is contained in:
+14
-4
@@ -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) => {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user