{"id":1350,"date":"2024-09-08T20:46:36","date_gmt":"2024-09-08T23:46:36","guid":{"rendered":"https:\/\/desvendandoocodigo.com.br\/?p=1350"},"modified":"2024-09-08T20:50:55","modified_gmt":"2024-09-08T23:50:55","slug":"resumo-das-lives-tiktok-07-e-08-09-2024","status":"publish","type":"post","link":"https:\/\/desvendandoocodigo.com.br\/?p=1350","title":{"rendered":"Resumo das Lives TikTok 07 e 08\/09\/2024"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Ol\u00e1 Pessoal! <\/h2>\n\n\n\n<h2 class=\"wp-block-heading\">Na Lives dos dias 07 e 08\/09\/2024 abordamos os seguintes temas:<\/h2>\n\n\n\n<h2 class=\"wp-block-heading\">MINI PROJETO COM EVENTOS 07\/09\/204<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"857\" height=\"600\" src=\"https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/09\/image.png\" alt=\"\" class=\"wp-image-1352\" srcset=\"https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/09\/image.png 857w, https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/09\/image-300x210.png 300w, https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/09\/image-768x538.png 768w\" sizes=\"(max-width: 857px) 100vw, 857px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>HTML\n&lt;!DOCTYPE html&gt;\n&lt;html lang=\"pt-br\"&gt;\n&lt;head&gt;\n    &lt;meta charset=\"UTF-8\"&gt;\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\n    &lt;title&gt;Mini Projeto&lt;\/title&gt;\n    &lt;link rel=\"stylesheet\" href=\"style.css\"&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n    &lt;div class=\"container\"&gt;\n\n        &lt;h1&gt;Playlist * de Rock and Roll&lt;\/h1&gt;\n\n        &lt;input type=\"text\" id=\"inputMusica\" \n        placeholder=\"Digite o nome da m\u00fasica\"&gt;\n\n        &lt;button id=\"botaoAdicionar\"&gt;\n            Adicionar M\u00fasica&lt;\/button&gt;\n        \n            &lt;ul id=\"playlist\"&gt;      &lt;\/ul&gt;\n    &lt;\/div&gt;\n\n    &lt;script src=\"script.js\"&gt;&lt;\/script&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n\nCSS\n*{\n    margin: 0;\n    padding: 0;\n    box-sizing: border-box;\n}\n\nbody{\n    background:  linear-gradient(to bottom,\n     #000000, #555555);\n\n      color: #fff;\n      font-family: 'Rock Salt', cursive;\n      min-height: 100vh;\n\n}\n\n.container{\n    text-align: center;\n    margin-top: 50px;\n}\n\nh1{\n    font-size: 2.5rem;\n    color: #f4d03f;\n    text-shadow: 2px 2px #e74c3c;\n}\n\ninput{\n\n    margin-top: 50px;\n    padding: 10px;\n    width: 300px;\n    border: none;\n    border-radius: 5px;\n    margin-bottom: 20px;\n    font-size: 1rem;\n\n}\nbutton{\n    background-color: #e74c3c;\n    color: white;\n    padding: 10px 20px;\n    border: none;\n    border-radius: 5px;\n    font-size: 1rem;\n    cursor: pointer;\n    transition: background-color 0.3s ease;\n}\nbutton:hover{\n    background-color: #c3092b;\n}\n\nul{\n    list-style-type: none;\n    margin-top: 20px;\n    padding: 0;\n}\nli{\n    background-color: #34495e;\n    padding: 10px;\n    margin: 10px auto;\n    border-radius: 5px;\n    display: flex;\n    justify-content: space-between;\n    align-content: center;\n    width: 70%;\n    max-width: 400px;\n\n}\nli button{\n    background-color:#e74c3c ;\n    color: white;\n    border: none;\n    padding: 5px 10px;\n    cursor: pointer;\n    transition: background-color 0.3s ease;\n\n}\nli button:hover{\n    background-color:#c0392b ;\n}\n\nJAVASCRIPT\nconst botaoAdicionar = \ndocument.getElementById('botaoAdicionar');\n\nconst playlist = \ndocument.getElementById('playlist');\n\nconst inputMusica =\ndocument.getElementById('inputMusica');\n\nfunction adicionarMusica(){\n    const nomeMusica = inputMusica.value;\n\n    \/\/ virificar se o campo esta vazio\n\n    if(nomeMusica === \"\"){\n        alert(\"Por favor,\" +\n             \" digite o nome da m\u00fasica\");\n        return;\n    }\n\n    \/\/criar um novo li\n    const li = document.createElement('li');\n    li.innerHTML = ` ${nomeMusica} &lt;button \n    class=\"botaoRemover\"&gt; Remover &lt;\/button&gt;`;\n    \n    \/\/adicionar o novo elmento a lista\n    playlist.appendChild(li);\n\n    inputMusica.value = \"\";\n\n    \/\/ adiciona o evento de remocao\n    const botaoRemover =\n     li.querySelector('.botaoRemover');\n\n     botaoRemover.addEventListener\n     ('click', removerMusica);   \n}\n\n\/\/remover musica\nfunction removerMusica(event){\n    const li = event.target.parentElement;\n    playlist.removeChild(li);\n\n}\n\n\n\n\/\/adicionar o vento no botao adicionar\nbotaoAdicionar.addEventListener\n('click', adicionarMusica);\n\n\/\/ permite pressionar o ENTER\n\ninputMusica.addEventListener\n('keypress',function(event){\n\n    if(event.key === 'Enter'){\n        adicionarMusica();\n    }\n\n});\n\n\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">LIVE DO DIA 08\/09\/2024<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>HTML<\/strong>\n\n&lt;!DOCTYPE html&gt;\n&lt;html lang=\"pt-br\"&gt;\n&lt;head&gt;\n    &lt;meta charset=\"UTF-8\"&gt;\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\n    &lt;title&gt;Adicionar e Remover Item&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n    \n    &lt;ul id=\"minhaLista\"&gt;\n        &lt;li&gt;Item 1&lt;\/li&gt;\n        &lt;li&gt;Item 2&lt;\/li&gt;\n        &lt;li&gt;Item 3&lt;\/li&gt;\n    &lt;\/ul&gt;\n\n    &lt;button id=\"botaoAdicionar\"&gt;Adicionar Item&lt;\/button&gt;\n    &lt;button id=\"botaoRemover\"&gt;Remover Item&lt;\/button&gt;\n\n    &lt;script&gt;\n        const add = document.getElementById('botaoAdicionar');\n        const del = document.getElementById('botaoRemover');\n\n        add.addEventListener('click', function(){\n            const novoItem = document.createElement('li');\n            novoItem.textContent = \"Item Novo\";\n\n            document.getElementById('minhaLista').appendChild(novoItem);\n\n        });\n\n        del.addEventListener('click', function(){\n            const lista = document.getElementById('minhaLista');\n\n            lista.removeChild(lista.lastElementChild);\n        })\n\n    &lt;\/script&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n\n\n<strong>FOR OF e FOR IN\n<\/strong>\nconst numeros = &#91; 10, 20, 30, 40, 50];\n\nlet resultado = ' ';\nfor(var i = 0; i &lt; numeros.length; i++){\nresultado += numeros&#91;i] + ' ';\n}\nconsole.log('Resultado do FOR: ' + resultado.trim());\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\nlet resultado2 = ' ';\nfor( var num of numeros ){\nresultado2 += num + ' ';\n}\nconsole.log('Resultado do FOR OF: ' + resultado2.trim());\n\nlet resultado3 = ' ';\n\n\/\/ percorre os indices\n\nfor ( let numero in numeros ){\n\nresultado3 += numero + ' '; \n\n}\nconsole.log('Resultado do FOR IF: ' + resultado3.trim());\n\nconst pessoa = { nome: 'Jo\u00e3o', idade: 30, cidade: 'S\u00e3o Paulo'};\n\nfor( let chave in pessoa){\nconsole.log( chave + ': ' + pessoa&#91;chave]);\n}\n\n<strong>FOREACH<\/strong>\n\nconst nomes = &#91;'Marcos', 'Jo\u00e3o', 'Carla', 'Maria'];\n\nfor(var item = 0; item &lt; nomes.length; item ++){\nconsole.log( item + 1 + \" - \" + nomes&#91;item]);\n}\n\nconsole.log('***');\n\nnomes.forEach( function ( item, index ){\n\nreturn console.log( (index + 1) + \" - \" + item);\n\n});\n\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"321\" src=\"https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/01\/hotmart.png\" alt=\"\" class=\"wp-image-162\" style=\"width:134px;height:auto\" srcset=\"https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/01\/hotmart.png 1000w, https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/01\/hotmart-300x96.png 300w, https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/01\/hotmart-768x247.png 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><a href=\"https:\/\/go.hotmart.com\/V89811082M?dp=1\">https:\/\/go.hotmart.com\/V89811082M?dp=1<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/go.hotmart.com\/X90111663X?dp=1\">https:\/\/go.hotmart.com\/X90111663X?dp=1<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>HOR\u00c1RIO DAS LIVES<\/strong><\/p>\n\n\n\n<p>Domingo &#8211; Segunda e Quarta \u00e0s 19:00hs<\/p>\n\n\n\n<p>Quinta &#8211; Sexta e S\u00e1bado \u00e0s 10:00hs<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"558\" height=\"1024\" src=\"https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/07\/image-4.png\" alt=\"\" class=\"wp-image-1144\" style=\"width:242px;height:auto\" srcset=\"https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/07\/image-4.png 558w, https:\/\/desvendandoocodigo.com.br\/wp-content\/uploads\/2024\/07\/image-4-163x300.png 163w\" sizes=\"(max-width: 558px) 100vw, 558px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Ol\u00e1 Pessoal! Na Lives dos dias 07 e 08\/09\/2024 abordamos os seguintes temas: MINI PROJETO COM EVENTOS 07\/09\/204 LIVE DO DIA 08\/09\/2024 https:\/\/go.hotmart.com\/V89811082M?dp=1 https:\/\/go.hotmart.com\/X90111663X?dp=1 HOR\u00c1RIO DAS LIVES Domingo &#8211; Segunda e Quarta \u00e0s 19:00hs Quinta &#8211; Sexta e S\u00e1bado \u00e0s 10:00hs<\/p>\n","protected":false},"author":1,"featured_media":1097,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[18],"tags":[],"_links":{"self":[{"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1350"}],"collection":[{"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1350"}],"version-history":[{"count":3,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1350\/revisions"}],"predecessor-version":[{"id":1356,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1350\/revisions\/1356"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=\/wp\/v2\/media\/1097"}],"wp:attachment":[{"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/desvendandoocodigo.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}