About
-
-
- - A CARD GAME FOR PEOPLE WHO ARE INTO - -
- - KITTENS AND EXPLOSIONS AND LASER BEAMS - -
- - AND SOMETIMES GOATS -
diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..871e2c0 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,21 @@ +module.exports = { + "extends": [ + 'airbnb' + ], + rules: { + "semi": "off", + "prefer-const": "off", + "no-implicit-globals": "off", + "strict": "off", + "quotes": "off", + "no-unused-vars": "off", + "no-else-return": "off", + "no-multiple-empty-lines": "off", + "no-shadow" : "off", + "comma-dangle" : "off", + "func-names" : "off", + "no-undef" : "off", + "no-restricted-syntax" : "off" + } +}; + diff --git a/css/style.css b/css/style.css index 0de243a..7377970 100644 --- a/css/style.css +++ b/css/style.css @@ -14,20 +14,60 @@ nav ul li { display: inline; } +nav ul li a, nav ul li a:visited, nav ul li a:active { + color: white; +} + +nav ul li a:link { + color: white; + text-decoration: none; +} +nav ul li a:hover { + color: #F15323; + text-decoration: underline; +} + +.cards-container .card:nth-child(even) { + background-color: white; +} + +.cards-container .card:nth-child(odd) { + background-color: #ccc; +} + .card { + float: left; margin: 2em; padding: 2em; border-radius: 5px; } +.card h3 { + position: absolute; + margin: 80px 40px; +} + .card > img { height: 200px; width: 150px; } +.clear { + clear: both; +} + +input[type="text"]{ + background-color: #76B821; + color: black; +} + footer { background-color: #F15323; width: 100%; + /*position: fixed; + left: 0; + bottom: 0; + z-index: -1;*/ } footer p { diff --git a/index.html b/index.html index 81740d2..122bc22 100644 --- a/index.html +++ b/index.html @@ -3,21 +3,14 @@
-
-
- Exploding Kittens is a neat game!
diff --git a/js/dom-solution.js b/js/dom-solution.js new file mode 100644 index 0000000..3d807a2 --- /dev/null +++ b/js/dom-solution.js @@ -0,0 +1,103 @@ +let aboutItems = [ + 'A CARD GAME FOR PEOPLE WHO ARE INTO', + 'KITTENS AND EXPLOSIONS AND LASER BEAMS', + 'AND SOMETIMES GOATS' +] + +function createAboutList(aboutItems) { + let ul = document.querySelector('.about ul') + for (let text of aboutItems) { + console.log("appending ", text, " to ", ul); + let li = document.createElement('li') + li.innerHTML = text + ul.appendChild(li) + } +} + +function removeAboutList() { + let ul = document.querySelector('.about ul') + let children = ul.children + + // remove any items with AND in them + // this does not work because children length is changing while we + // are in this for loop + // for (let i =0; i <= children.length; i++) { + // let node = children[i] + // if (node.innerText.includes("AND")){ + // console.log("removing ", i, node); + // ul.removeChild(node) + // } + // } + + let nodesToDelete = [] + for (let node of children) { + if (node.innerText.includes("AND")) { + nodesToDelete.push(node) + } + } + // this does not work because children length is changing while we + // are in this for loop + for (let node of nodesToDelete) { + console.log('removing', node); + ul.removeChild(node) + } +} + + +// WE DO: +//
+//
+//