├── .gitattributes ├── design ├── active-states.jpg ├── mobile-design.jpg └── desktop-design.jpg ├── images ├── favicon-32x32.png ├── pattern-divider-desktop.svg ├── pattern-divider-mobile.svg └── icon-dice.svg ├── script.js ├── LICENSE ├── README.md ├── index.html └── style.css /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /design/active-states.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betoblid/gerador_de_conselhos/HEAD/design/active-states.jpg -------------------------------------------------------------------------------- /design/mobile-design.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betoblid/gerador_de_conselhos/HEAD/design/mobile-design.jpg -------------------------------------------------------------------------------- /images/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betoblid/gerador_de_conselhos/HEAD/images/favicon-32x32.png -------------------------------------------------------------------------------- /design/desktop-design.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betoblid/gerador_de_conselhos/HEAD/design/desktop-design.jpg -------------------------------------------------------------------------------- /images/pattern-divider-desktop.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/pattern-divider-mobile.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/icon-dice.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /script.js: -------------------------------------------------------------------------------- 1 | //pegando componentes do DOM 2 | const conselho_id = document.getElementById("conselho_id") 3 | const conselho_text = document.getElementById("conselho_text") 4 | const btn_gerar = document.getElementById("btn_advance") 5 | 6 | //pegando a API de concelhos 7 | let url = "https://api.adviceslip.com/advice" 8 | //usando uma async para quando for chamada usar o modelo hook conhecido no react e com delay de 2 segundos 9 | async function getconselho (){ 10 | //faturando a url da api 11 | const res = await fetch(url); 12 | //armazenando os resultados do faturamento da api como id e advice depois traduzindo com json para conversão 13 | const {slip: { id, advice } } = await res.json(); 14 | //pegando os elementos id e advice e jogando no DOM 15 | conselho_id.textContent = id; 16 | conselho_text.textContent = advice; 17 | } 18 | 19 | //chamando a function no botão do DOM ao clicar no botão chamará essa fuction 20 | btn_gerar.addEventListener("click", getconselho) -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 dev-herbert 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Gerador de Conselhos 2 | 3 | 4 | 5 |
os conselhos são gerados com base em uma API responsavel por gerar todos os concelhos
8 |
12 | visual de mobile é responsivel para todos os dispositivos da nova gerção e compativel com todas as resoluções
13 |
14 | Visual da aplicação em dispositivos desktops
15 |
16 | essa imagem e basicamente quando passamos o curso em sima do botão é ativado o pseudo elemento onde usado o shadow passando o efeito e tambem ao clicado e ativado uma cor mas clará mas dura pouco é apenas para confirma o click do usuario
17 |Recomendo tentar primeiro antes de copiar só grecemos mentalmente quando tentamos fazer nossos proprios códigos. me segue para ver mais projetos legais
-------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |