├── .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 |
6 |

Aplicação web geradora de conselhos

7 |

os conselhos são gerados com base em uma API responsavel por gerar todos os concelhos

8 |

Visual da Apicação

9 |
10 |
11 | visual da aplicação mobile 12 |

visual de mobile é responsivel para todos os dispositivos da nova gerção e compativel com todas as resoluções

13 | visual da aplicação em desktop 14 |

Visual da aplicação em dispositivos desktops

15 | botao cendo clicado 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 |
18 | 19 | # posso copyar o codigo 20 | 21 |

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 | Gerador de Conselhos app 12 | 13 | 14 | 15 |
16 |
17 |
18 | 19 |

advice #117

20 |
21 | 22 |

"Aperte o Botão para gerar um conselho. se tiver em inglês por favor traduza pelo navegador"

23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 |

© - Desenvolvido por Herbert Souza

34 |
35 |
36 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Manrope:wght@800&display=swap'); 2 | :root{ 3 | /*cor do background*/ 4 | --Grayish-Blue: hsl(217, 19%, 38%); 5 | --Dark-Grayish-Blue: hsl(217, 19%, 24%); 6 | --Dark-Blue: hsl(218, 23%, 16%); 7 | /*cor da color*/ 8 | --Light-Cyan: hsl(193, 38%, 86%); 9 | --Neon-Green: hsl(150, 100%, 66%); 10 | } 11 | *{ 12 | padding: 0; 13 | margin: 0; 14 | box-sizing: border-box; 15 | font-family: 'Manrope', sans-serif; 16 | } 17 | .card_advice, .container_advice{ 18 | display: flex; 19 | align-items: center; 20 | justify-content: center; 21 | flex-direction: column; 22 | } 23 | .container_advice{ 24 | min-height: 100vh; 25 | background: var(--Dark-Blue); 26 | width: 100%; 27 | } 28 | .card_advice{ 29 | background: var(--Dark-Grayish-Blue); 30 | color: var(--Light-Cyan); 31 | padding: 0px 0 60px 0; 32 | position: relative; 33 | border-radius: 10px; 34 | width: 500px; 35 | } 36 | #btn_advance{ 37 | position: absolute; 38 | bottom: -39px; 39 | padding: 20px; 40 | background: var(--Neon-Green); 41 | border-radius: 50%; 42 | border: none; 43 | } 44 | #btn_advance:active{ 45 | background: hsl(180, 100%, 86%); 46 | } 47 | /*colocando efeitos em toda parte escrita*/ 48 | #btn_advance:hover{ 49 | filter: drop-shadow(0 0 0.75rem hsl(150, 100%, 66%)); 50 | transition: all 0.2s ease-out; 51 | } 52 | .box_conselho{ 53 | padding: 20px 40px; 54 | text-align: center; 55 | } 56 | .card_advice h1{ 57 | font-size: 14px; 58 | color: var(--Neon-Green); 59 | text-transform: uppercase; 60 | letter-spacing: 5px; 61 | padding-top: 30px; 62 | } 63 | 64 | /*essa class é utilizada para jogar a div bottom a 10px do final*/ 65 | .author{ 66 | position: absolute; 67 | bottom: 10px; 68 | font: 900 12px Arial; 69 | } 70 | .author a{ 71 | text-decoration: none; 72 | color: black; 73 | } 74 | .author a:hover{ 75 | color: rebeccapurple; 76 | } 77 | @media(max-width: 500px){ 78 | .card_advice{ 79 | width: 90%; 80 | } 81 | /*usando o margin auto para centralizar a imagem do srcer no centro*/ 82 | .card_advice img{ 83 | width: 80%; 84 | display: flex; 85 | margin: auto; 86 | } 87 | } --------------------------------------------------------------------------------