From c7a0af6e5045775d46f5016bf21f5b96ec19b05f Mon Sep 17 00:00:00 2001 From: Sagyo Date: Sun, 23 Jan 2022 18:29:12 -0300 Subject: [PATCH] Create desafio02 branch --- .stylelintrc.json | 6 +- dist/css/main.css | 117 +++++++++++--- dist/desafios/desafio01/css/main.css | 24 --- dist/desafios/desafio01/index.html | 15 -- dist/desafios/desafio01/js/main.js | 162 -------------------- dist/index.html | 7 +- dist/pages/{page => about.html} | 0 dist/pages/cart.html | 0 dist/pages/checkout.html | 0 dist/pages/contact.html | 0 dist/pages/products.html | 0 dist/pages/user.html | 0 gulpfile.js | 6 +- src/sass/base/_base.scss | 34 ++++ src/sass/base/_fonts.scss | 2 + src/sass/base/_init.scss | 1 - src/sass/layout/{_index.scss => _home.scss} | 3 + src/sass/main.scss | 2 +- 18 files changed, 144 insertions(+), 235 deletions(-) delete mode 100644 dist/desafios/desafio01/css/main.css delete mode 100644 dist/desafios/desafio01/index.html delete mode 100644 dist/desafios/desafio01/js/main.js rename dist/pages/{page => about.html} (100%) create mode 100644 dist/pages/cart.html create mode 100644 dist/pages/checkout.html create mode 100644 dist/pages/contact.html create mode 100644 dist/pages/products.html create mode 100644 dist/pages/user.html rename src/sass/layout/{_index.scss => _home.scss} (94%) diff --git a/.stylelintrc.json b/.stylelintrc.json index bdc8fd6..9104bf1 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -2,11 +2,13 @@ "extends": ["stylelint-config-standard-scss", "stylelint-config-lost"], "rules": { - "custom-property-no-missing-var-function": null, - "no-invalid-position-at-import-rule": null, "at-rule-no-unknown": null, + "custom-property-no-missing-var-function": null, + "declaration-empty-line-before": null, "indentation": "tab", "max-empty-lines": null, + "no-invalid-position-at-import-rule": null, + "selector-class-pattern": null, "selector-list-comma-newline-after": null, "string-quotes": "single", "scss/at-rule-no-unknown": true, diff --git a/dist/css/main.css b/dist/css/main.css index 99ec973..4afa51b 100644 --- a/dist/css/main.css +++ b/dist/css/main.css @@ -1,42 +1,109 @@ +@import url("https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap"); +/* STYLE RESET -------------------------------------------------------------- */ +*, *::before, *::after { + box-sizing: border-box; +} + +html, body, div, span, object, iframe, figure, h1, h2, h3, h4, h5, h6, p, +blockquote, pre, a, code, em, img, small, strike, strong, sub, sup, tt, b, +u, i, ol, ul, li, fieldset, form, label, table, caption, tbody, tfoot, thead, +tr, th, td, main, canvas, embed, footer, header, nav, section, video { + margin: 0; + padding: 0; + border: 0; + font: inherit; + font-size: 100%; + vertical-align: baseline; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -webkit-text-size-adjust: none; + -moz-text-size-adjust: none; + text-size-adjust: none; +} + +footer, header, nav, section, main { + display: block; +} + +blockquote, q { + quotes: none; +} + +blockquote::before, blockquote::after, q::before, q::after { + content: ""; + content: none; +} + +ol, ul { + list-style: none; +} + +table { + border-collapse: collapse; + border-spacing: 0; +} + +a { + text-decoration: none; + color: inherit; +} + +input, select, button { + padding: 0; + margin: 0; + font: inherit; + font-size: 100%; +} + +/* END STYLE RESET ---------------------------------------------------------- */ body { - padding: 0; - margin: 0; + background-color: black; + color: white; +} + +button { + padding: 2px; +} - /* Fondo oscuro para cuidar la vista :) */ - color: #f8f9fa; - background-color: #212529; - font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; +a { + color: blue; +} + +body { + padding: 0; + margin: 0; + color: #f8f9fa; + background-color: #212529; + font-family: "Josefin Sans", sans-serif; + font-weight: 300; + line-height: 1.25; } a, a:visited { - color: coral; - text-decoration: none; + color: coral; + text-decoration: none; } .title { - margin: 1rem; - - font-size: 5rem; - font-weight: lighter; - line-height: .75; + margin: 1rem; + font-size: 5rem; + line-height: 0.75; } .subtitle { - margin: 2rem 1rem; - - font-size: 2rem; - font-weight: lighter; + margin: 2rem 1rem; + font-size: 2rem; } -.desafios { - margin: 2rem 0; +.desafios__title { + margin: 1rem 0; + font-size: 1.5rem; } -.desafios-title { - margin: 1rem 0; - - font-size: 1.5rem; - font-weight: lighter; +.desafio { + font-size: 1.25rem; } -.desafio { font-size: 1.25rem; } \ No newline at end of file +ul.desafios { + margin: 2rem; +} \ No newline at end of file diff --git a/dist/desafios/desafio01/css/main.css b/dist/desafios/desafio01/css/main.css deleted file mode 100644 index d147cf6..0000000 --- a/dist/desafios/desafio01/css/main.css +++ /dev/null @@ -1,24 +0,0 @@ -body { - padding: 0; - margin: 0; - - /* Fondo oscuro para cuidar la vista :) */ - color: #f8f9fa; - background-color: #212529; - font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; -} - -.title { - margin: 1rem; - - font-size: 5rem; - font-weight: lighter; - line-height: .75; -} - -.subtitle { - margin: 2rem 1rem; - - font-size: 2rem; - font-weight: lighter; -} \ No newline at end of file diff --git a/dist/desafios/desafio01/index.html b/dist/desafios/desafio01/index.html deleted file mode 100644 index 9fb2b8a..0000000 --- a/dist/desafios/desafio01/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - Desafío #01 - - - -

CoderHouse JS

-

Desafío 01 - Crear un algoritmo utilizando un ciclo

- - - \ No newline at end of file diff --git a/dist/desafios/desafio01/js/main.js b/dist/desafios/desafio01/js/main.js deleted file mode 100644 index f721153..0000000 --- a/dist/desafios/desafio01/js/main.js +++ /dev/null @@ -1,162 +0,0 @@ -// Fibonacci (for) -let input = prompt('Iterations of Fibonacci:'); - -if (!isNaN(input) && input != null && input != '') { - let currentN = 1; - let previousN = 0; - let result = 1; - let message = ''; - - for (let i = 0; i < input; i++) { - message += result + ' '; - result = currentN + previousN; - previousN = currentN; - currentN = result; - } - - alert(message); - console.log(message); -} else { - alert('Invalid input!'); - console.log('Invalid input!'); -} - -// Find in Fibonacci (while) -input = prompt('Enter a number to find if it\'s a Fibonacci number'); - -if (!isNaN(input) && input != null && input != '') { - let found = false; - let currentN = 1; - let previousN = 0; - let result = 1; - - while(result < input) { - result = previousN + currentN; - previousN = currentN; - currentN = result; - - if (result == input) { - alert(input + ' is a Fibonacci number'); - console.log(input + ' is a Fibonacci number'); - found = true; - } - } - - if (!found) { - alert(input + ' is not a Fibonacci number'); - console.log(input + ' is not a Fibonacci number'); - } -} else { - alert('Invalid input!'); - console.log('Invalid input!'); -} - -// Count digits (do-while) -// Es el primer caso que se me ocurrió donde QUIZÁS se podrían ahorrar un par de -// lineas, ya que con un while "0" no entraría al loop -input = prompt('Enter a positive number to count its digits'); - -if (input > Number.MAX_SAFE_INTEGER) { - alert('The input exceeds 2^53-1 please try a smaller number'); - console.log('The input exceeds 2^53-1 please try a smaller number'); -} else if (!isNaN(input) && input != null && input != '') { - let digits = 0; - let currentN = input; - - do { - currentN /= 10; - currentN = Math.trunc(currentN); - digits++; - } while(currentN > 0); - - alert(input + ' digits: ' + digits); - console.log(input + ' digits: ' + digits); -} else { - alert('Invalid input!'); - console.log('Invalid input!'); -} - -// Days in a month (switch) -input = prompt('Enter a month to know how many days it has (inglés o español)'); - -if (input != null) { - input = input.toLowerCase(); - switch (input) { - case 'january': - case 'enero': - alert('January has 31 days.'); - console.log('January has 31 days'); - break; - - case 'february': - case 'febrero': - alert('February has 28 days (29 in leap years).'); - console.log('February has 28 days (29 in leap years).'); - break; - - case 'march': - case 'marzo': - alert('March has 31 days'); - console.log('March has 31 days'); - break; - - case 'april': - case 'abril': - alert('April has 30 days'); - console.log('April has 30 days'); - break; - - case 'may': - case 'mayo': - alert('May has 31 days'); - console.log('May has 31 days'); - break; - - case 'june': - case 'junio': - alert('June has 30 days'); - console.log('June has 30 days'); - break; - - case 'july': - case 'julio': - alert('July has 31 days'); - console.log('July has 31 days'); - break; - - case 'august': - case 'agosto': - alert('August has 31 days'); - console.log('August has 31 days'); - break; - - case 'september': - case 'septiembre': - alert('September has 30 days'); - console.log('September has 30 days'); - break; - - case 'october': - case 'octubre': - alert('October has 31 days'); - console.log('October has 31 days'); - break; - - case 'november': - case 'noviembre': - alert('November has 30 days'); - console.log('November has 30 days'); - break; - - case 'december': - case 'diciembre': - alert('December has 31 days'); - console.log('December has 31 days'); - break; - - default: - alert('Invalid input!'); - console.log('Invalid input!'); - break; - } -} diff --git a/dist/index.html b/dist/index.html index 9e12dc4..3ff3d10 100644 --- a/dist/index.html +++ b/dist/index.html @@ -11,11 +11,14 @@

CoderHouse JS

(Los archivos para los desafíos están en su respectiva carpeta)


-