├── GuessNumber
├── .vscode
│ └── settings.json
├── css
│ └── styles.css
├── index.html
└── js
│ └── index.js
├── Login
├── css
│ └── styles.css
├── index.html
└── js
│ └── index.js
└── StarDevs
├── css
└── styles.css
├── img
├── bg.jpg
├── darth.svg
├── planet.svg
└── starship.svg
├── index.html
└── js
└── index.js
/GuessNumber/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "liveServer.settings.port": 5501
3 | }
--------------------------------------------------------------------------------
/GuessNumber/css/styles.css:
--------------------------------------------------------------------------------
1 | /* Global ================== */
2 | :root {
3 | --white: #fafafa;
4 | --blue: #00348a;
5 | --blue-light: #0bbbd6;
6 | }
7 |
8 | * {
9 | margin: 0;
10 | padding: 0;
11 | box-sizing: border-box;
12 | font-family: 'Ubuntu', sans-serif;
13 | text-decoration: none;
14 | }
15 |
16 | /* Header ============= */
17 | header {
18 | width: 100%;
19 | text-align: center;
20 | padding: 2rem;
21 | box-shadow: 0px 2px 4px 2px rgba(0, 0, 0, 0.5);
22 | background-color: var(--white);
23 | }
24 |
25 | header a h1 {
26 | color: var(--blue);
27 | font-size: 2.8rem;
28 | font-weight: 300;
29 | }
30 |
31 | /* Container =============== */
32 | .container {
33 | width: 100%;
34 | height: 85vh;
35 |
36 | display: flex;
37 | flex-direction: column;
38 | align-items: center;
39 | justify-content: flex-start;
40 |
41 | background: linear-gradient(to right, #ddd, #eee, #ddd);
42 | }
43 |
44 | /* Form =========== */
45 | .container form {
46 | background: var(--blue-light);
47 |
48 | display: flex;
49 | flex-direction: column;
50 | width: 40%;
51 | padding: 2rem;
52 | margin-top: 5%;
53 | border-radius: 0.5rem;
54 | }
55 |
56 | .container form label {
57 | color: var(--white);
58 | font-size: 1.3rem;
59 | font-weight: 600;
60 | }
61 |
62 | .container form input {
63 | border: 0;
64 | outline: 0;
65 | margin: 5% 0px;
66 | padding: 10px;
67 | font-size: 1.2rem;
68 | font-weight: 300;
69 | border-radius: 0.2rem;
70 | box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.1);
71 | }
72 |
73 | .container form input:focus {
74 | box-shadow: inset 1px 2px 4px 2px rgba(0, 0, 0, 0.1);
75 | }
76 |
77 | .container form button {
78 | cursor: pointer;
79 | margin-top: 3%;
80 | border: 0;
81 | outline: 0;
82 | padding: 0.8rem;
83 | border-radius: 0.2rem;
84 | font-size: 1.5rem;
85 | font-weight: 400;
86 | background: var(--blue);
87 | color: var(--white);
88 | transition: 0.3s ease-in-out;
89 | }
90 |
91 | .container form button:hover {
92 | color: var(--blue);
93 | background: var(--white);
94 | }
95 |
96 | /* Section ========== */
97 | .container .result-box {
98 | margin-top: 5%;
99 | background: var(--white);
100 | width: 40%;
101 | padding: 2rem;
102 | border-radius: 0.5rem;
103 | box-shadow: 1px 1px 5px 0px rgba(0, 0, 0, 0.2);
104 | color: #00348a;
105 | }
106 |
107 | .container .result-box h2 {
108 | font-weight: 500;
109 | font-size: 1.5rem;
110 | margin: 5% 0%;
111 | }
112 |
113 | .container .result-box span {
114 | font-size: 1.3rem;
115 | font-weight: 300;
116 | }
117 |
118 | /* Btn jogar de novo =============*/
119 | .container #btnRestart {
120 | cursor: pointer;
121 | border: 0;
122 | outline: 0;
123 | background: var(--white);
124 | color: var(--blue);
125 | padding: 1rem;
126 | margin-top: 3%;
127 | font-size: 1.3rem;
128 | border-radius: 0.3rem;
129 | box-shadow: 1px 1px 5px 0px rgba(0, 0, 0, 0.3);
130 | transition: 0.2s ease-in-out;
131 |
132 | display: none;
133 | }
134 |
135 | .container #btnRestart:hover {
136 | background: var(--blue);
137 | color: var(--white);
138 | }
139 |
140 | footer {
141 | padding: 1.5rem;
142 | text-align: center;
143 | box-shadow: inset 0px 0px 4px 0px rgba(0, 0, 0, 0.5);
144 | }
145 |
146 | footer p {
147 | color: var(--blue);
148 | font-size: 1rem;
149 | font-weight: 300;
150 | }
--------------------------------------------------------------------------------
/GuessNumber/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | GuessNumber
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
19 |
25 |
26 |
27 | Adivinhe o número sorteado!
28 | Tentativas: 0
29 |
30 |
31 |
32 |
33 |
34 |
37 |
38 |
--------------------------------------------------------------------------------
/GuessNumber/js/index.js:
--------------------------------------------------------------------------------
1 | const form = document.getElementById('form');
2 | form.addEventListener('submit', handleSubmit);
3 |
4 | let status = document.getElementById('status');
5 | let attempt = document.getElementById('attempt');
6 | let result = document.getElementById('result');
7 |
8 | const Guess = {
9 | max: 10,
10 | attemptsNumber: 0,
11 | numberDrawn: function randomValue() {
12 | return Math.round(Math.random() * this.max);
13 | }
14 | };
15 |
16 | let numberDrawn = Guess.numberDrawn();
17 |
18 | function updateAttempt(attempt, value) {
19 | attempt.innerHTML = 'Tentativa: ' + value
20 | };
21 |
22 | function handleSubmit(e) {
23 | e.preventDefault();
24 |
25 | let kick = document.getElementById('kick').value;
26 |
27 | if(!kick) {
28 | alert('Digite algum valor!')
29 | return;
30 | };
31 |
32 | updateAttempt(attempt, ++Guess.attemptsNumber);
33 |
34 | if(numberDrawn == kick) {
35 | playAgain();
36 | status.innerHTML = 'Parabéns, você acertou!';
37 | result.style.transition = '0.4s';
38 | result.style.backgroundColor = '#37c978';
39 | result.style.color = '#fff';
40 | status.style.color = '#fff';
41 | clear();
42 | } else if(numberDrawn > kick) {
43 | status.innerHTML = 'O número é maior!';
44 | status.style.color = '#de4251';
45 | clear();
46 | } else if(numberDrawn < kick) {
47 | status.innerHTML = 'O número é menor!';
48 | status.style.color = '#de4251';
49 | clear();
50 | }
51 | };
52 |
53 |
54 | function playAgain() {
55 | document.getElementById('btnRestart').style.display = 'flex';
56 | };
57 |
58 | function restart() {
59 | document.location.reload(true);
60 | };
61 |
62 | function clear() {
63 | document.getElementById('kick').value = '';
64 | };
--------------------------------------------------------------------------------
/Login/css/styles.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | box-sizing: border-box;
5 | font-family: 'Poppins', sans-serif;
6 | text-decoration: none;
7 | color: #fff;
8 | }
9 |
10 | header {
11 | min-height: 9vh;
12 | display: flex;
13 | align-items: center;
14 | justify-content: center;
15 | background-color: #383c42;
16 | }
17 |
18 | header h1 {
19 | font-size: 2.5em;
20 | color: #fff;
21 | }
22 |
23 | main {
24 | width: 100%;
25 | min-height: 100vh;
26 | background: linear-gradient(#18acfe, #0166e1);
27 |
28 | display: flex;
29 | justify-content: center;
30 |
31 | box-shadow: inset 0px 2px 3px rgba(0, 0, 0, 0.25);
32 | }
33 |
34 | main form {
35 | margin-top: 5%;
36 | width: 35%;
37 | height: 75vh;
38 | background-color: #383c42;
39 | box-shadow: 0px 3px 4px rgba(0, 0, 0, 0.4) inset 0px 4px 4px rgba(0, 0, 0, 0.25);
40 | border-radius: 18px;
41 | padding: 2%;
42 |
43 | display: flex;
44 | flex-direction: column;
45 | align-items: center;
46 | }
47 |
48 | main form .inputs-container {
49 | margin-top: 10%;
50 | width: 100%;
51 |
52 | display: flex;
53 | flex-direction: column;
54 | align-items: center;
55 | }
56 |
57 | main form .inputs-container input {
58 | width: 90%;
59 | height: 45px;
60 | padding: 8px 15px;
61 | border: 0;
62 | outline: 0;
63 | border-radius: 12px;
64 |
65 | font-size: 16px;
66 | color: #312e42;
67 |
68 | box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.25);
69 | }
70 |
71 | main form .inputs-container input:focus {
72 | box-shadow: inset 1px 4px 7px rgba(0, 0, 0, 0.5);
73 | }
74 |
75 | main form .password-container {
76 | margin-top: 5%;
77 | width: 100%;
78 | position: relative;
79 |
80 | display: flex;
81 | flex-direction: column;
82 | align-items: center;
83 | }
84 |
85 | main form .password-container i {
86 | position: absolute;
87 | right: 8%;
88 | top: 35%;
89 | color: #777;
90 | cursor: pointer;
91 | }
92 |
93 | main form .password-container #eye {
94 | display: none;
95 | }
96 |
97 | main form .password-infos {
98 | width: 90%;
99 | margin-top: 3%;
100 |
101 | display: flex;
102 | align-items: center;
103 | justify-content: space-between;
104 | }
105 |
106 | main form .password-infos a {
107 | transition: 0.2s ease-in-out;
108 | }
109 |
110 | main form .password-infos a:hover {
111 | color: #18acfe;
112 | }
113 |
114 | main form button {
115 | background-color: #18acfe;
116 | width: 90%;
117 | height: 50px;
118 | border: 0;
119 | outline: 0;
120 | border-radius: 12px;
121 | margin-top: 10%;
122 | font-size: 1.6em;
123 | font-weight: 600;
124 | cursor: pointer;
125 | transition: 0.3s ease-in-out;
126 | }
127 |
128 | main form button:hover {
129 | background: #fff;
130 | color: #18acfe;
131 | }
132 |
133 | main form .links-container {
134 | width: 100%;
135 | display: flex;
136 | flex-direction: column;
137 | align-items: center;
138 | margin-top: 10%;
139 | }
140 |
141 | main form .links-container span {
142 | font-size: 0.8em;
143 | font-weight: 600;
144 | }
145 |
146 | main form .links-container aside {
147 | margin-top: 5%;
148 | width: 50%;
149 |
150 | display: flex;
151 | align-items: center;
152 | justify-content: space-around;
153 | }
154 |
155 | main form .links-container aside i {
156 | font-size: 1.6em;
157 | background-color: #fff;
158 | padding: 8px;
159 | height: 40px;
160 | width: 40px;
161 | border-radius: 20px;
162 | transition: 0.3s ease-in-out;
163 | color: #fff;
164 |
165 | display: flex;
166 | align-items: center;
167 | justify-content: center;
168 | }
169 |
170 | main form .links-container aside .google {
171 | color: #e34133;
172 | }
173 |
174 | main form .links-container aside .google:hover {
175 | background-color: #e34133;
176 | color: #fff;
177 | }
178 |
179 | main form .links-container aside .linkedin {
180 | color: #0a66c2;
181 | }
182 |
183 | main form .links-container aside .linkedin:hover {
184 | background-color: #0a66c2;
185 | color: #fff;
186 | }
187 |
188 | main form .links-container aside .facebook {
189 | color: #14a0f9;
190 | }
191 |
192 | main form .links-container aside .facebook:hover {
193 | background-color: #14a0f9;
194 | color: #fff;
195 | }
196 |
197 | main form footer {
198 | width: 100%;
199 | margin-top: 10%;
200 |
201 | display: flex;
202 | flex-direction: column;
203 | align-items: center;
204 | }
205 |
206 | main form footer hr {
207 | width: 100%;
208 | height: 3px;
209 | background-color: #fff;
210 | }
211 |
212 | main form footer span {
213 | font-weight: 400;
214 | font-size: 0.9em;
215 | margin-top: 5%;
216 | }
217 |
218 | main form footer a {
219 | font-weight: 600;
220 | transition: 0.2s ease-in-out;
221 | }
222 |
223 | main form footer a:hover {
224 | color: #18acfe;
225 | }
--------------------------------------------------------------------------------
/Login/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Login-Helper
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
19 |
20 |
21 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Login/js/index.js:
--------------------------------------------------------------------------------
1 | function showPassword() {
2 | const eye = document.getElementById('eye');
3 | const eyeSlash = document.getElementById('eye-slash');
4 | const fieldPassword = document.getElementById('field-password');
5 |
6 | if(eye.style.display === 'none') {
7 | eye.style.display = 'block';
8 | eyeSlash.style.display = 'none';
9 | fieldPassword.type = 'text';
10 | } else {
11 | eye.style.display = 'none';
12 | eyeSlash.style.display = 'block';
13 | fieldPassword.type = 'password';
14 | }
15 | };
16 |
17 | document.getElementById('btn-login').addEventListener('click', function(e) {
18 | e.preventDefault();
19 | alert('Logado!');
20 | });
--------------------------------------------------------------------------------
/StarDevs/css/styles.css:
--------------------------------------------------------------------------------
1 | /* Global ================ */
2 | :root {
3 | --yellow: #DCA500;
4 | --yellow-light: #FFBF00;
5 | --grey: #333;
6 | --white: #fafafa;
7 | }
8 |
9 | * {
10 | margin: 0;
11 | padding: 0;
12 | box-sizing: border-box;
13 | }
14 |
15 | body {
16 | background: url('../img/bg.jpg');
17 | padding: 2%;
18 | }
19 |
20 | /* Texts ================ */
21 | h1, h2, span, p {
22 | font-family: 'Nunito', sans-serif;
23 | color: var(--white);
24 | }
25 |
26 | /* Header ================ */
27 | header h1 {
28 | color: var(--yellow-light);
29 | font-weight: 200;
30 | font-size: 4em;
31 | }
32 |
33 | /* Cards ================ */
34 | main .cards-main {
35 | display: flex;
36 | align-items: center;
37 | justify-content: space-around;
38 |
39 | margin-top: 5%;
40 | }
41 |
42 | main .cards-main .card-container {
43 | width: 25%;
44 | background-color: var(--white);
45 | padding: 1rem;
46 | border-radius: 0.3rem;
47 | cursor: pointer;
48 |
49 | display: flex;
50 | align-items: center;
51 | justify-content: space-between;
52 |
53 | transition: 0.3s ease-in-out;
54 | }
55 |
56 | main .cards-main .card-container:hover {
57 | margin-top: -3%;
58 | border-radius: 1rem;
59 | box-shadow: 0px 0px 5px 3px #999;
60 | }
61 |
62 | main .cards-main .card-container .card-main {
63 | display: flex;
64 | flex-direction: column;
65 | align-items: center;
66 | justify-content: center;
67 | }
68 |
69 | main .cards-main .card-container .card-main span {
70 | color: var(--grey);
71 | font-size: 1.8em;
72 | font-weight: 600;
73 | }
74 |
75 | main .cards-main .card-container .card-main h2 {
76 | color: var(--yellow-light);
77 | font-size: 2em;
78 | }
79 |
80 |
81 | /* Phrases ================ */
82 | main .phrases-container {
83 | width: 100%;
84 | margin-top: 8%;
85 |
86 | display: flex;
87 | flex-direction: column;
88 | align-items: center;
89 | }
90 |
91 | main .phrases-container button {
92 | width: 25%;
93 | border: none;
94 | outline: none;
95 | padding: 1rem;
96 | border-radius: 0.3rem;
97 | cursor: pointer;
98 |
99 | font-size: 1.7em;
100 | font-weight: 600;
101 |
102 | background-color: var(--yellow);
103 | color: var(--white);
104 |
105 | transition: 0.3s ease-in-out;
106 | }
107 |
108 | main .phrases-container button:hover {
109 | border-radius: 2rem;
110 | color: var(--yellow);
111 | background-color: var(--white);
112 | }
113 |
114 | main .phrases-container p {
115 | text-align: center;
116 | width: 75%;
117 | font-size: 2em;
118 | font-weight: 700;
119 | margin-top: 4%;
120 |
121 | transition: 0.1s ease-in;
122 | }
123 |
124 | main .phrases-container p:hover {
125 | opacity: 0.7;
126 | }
--------------------------------------------------------------------------------
/StarDevs/img/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dev-chico/Curso-HTML-CSS-JS/8d16a97cc2192352de58eec057a3270cce0e5884/StarDevs/img/bg.jpg
--------------------------------------------------------------------------------
/StarDevs/img/darth.svg:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/StarDevs/img/planet.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/StarDevs/img/starship.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/StarDevs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Star-Devs
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
19 |
20 |
21 |
22 |
23 |
24 | Personagens
25 |
Carregando...
26 |
27 |

28 |
29 |
30 |
31 |
32 | Naves Estelares
33 |
Carregando...
34 |
35 |

36 |
37 |
38 |
39 |
40 | Planetas
41 |
Carregando...
42 |
43 |

44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/StarDevs/js/index.js:
--------------------------------------------------------------------------------
1 | const persons = document.getElementById('persons');
2 | const starships = document.getElementById('starships');
3 | const planets = document.getElementById('planets');
4 |
5 | fillCounters();
6 |
7 | function fillCounters() {
8 | Promise.all([
9 | getData('people/'),
10 | getData('starships/'),
11 | getData('planets')
12 | ])
13 | .then(data => {
14 | persons.style.fontSize = '5em';
15 | starships.style.fontSize = '5em';
16 | planets.style.fontSize = '5em';
17 |
18 | persons.innerHTML = data[0].count;
19 | starships.innerHTML = data[1].count;
20 | planets.innerHTML = data[2].count;
21 | })
22 | .catch(err => console.log('Erro:', err))
23 | };
24 |
25 | function getData(param) {
26 | return fetch(`https://swapi.dev/api/${param}`)
27 | .then(res => res.json())
28 | };
29 |
30 | function loadPhrase() {
31 | const btn = document.getElementById('btn-phrases');
32 | const phrase = document.getElementById('phrase');
33 |
34 | return fetch('http://swquotesapi.digitaljedi.dk/api/SWQuote/RandomStarWarsQuote')
35 | .then(data => data.json())
36 | .then(json => {
37 | btn.innerHTML = 'Ver mais uma frase!';
38 | phrase.innerHTML = `"${json.content}"`;
39 |
40 | phrase.animate([
41 | { transform: 'translateY(-70px)'},
42 | { transform: 'translateY(0px)'}
43 | ], {
44 | duration: 500
45 | })
46 | })
47 | .catch(err => console.log('Erro: ', err))
48 | };
--------------------------------------------------------------------------------