From 02a94df1180e7c77ef3b4df9e68c77f692341022 Mon Sep 17 00:00:00 2001 From: Greg Jordan Date: Fri, 29 Mar 2019 11:25:11 -0400 Subject: [PATCH 01/10] Answered the questionsin the README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 8ad61eb4ad..e776885250 100644 --- a/README.md +++ b/README.md @@ -34,14 +34,24 @@ Edit this document to include your answers after each question. Make sure to lea 1. What is the difference between an adaptive website and a fully responsive website? +Responsive websites respond to the size of the browser at any given size/point. Whereas, adaptive websites adapt to the size of the browser at specific breakpoints. + 2. Describe what it means to be mobile first vs desktop first. +This means that the website is design with the intentions of the user viewing it on a mobile device first as opposed to it being viewed on a desktop browser first. + 3. What does `font-size: 62.5%` in the `html` tag do for us when using `rem` units? +It gives the user accessibility options for viewing websites, like zooming in and out of the webpage. This allows the site to react to those options. + 4. How would you describe preprocessing to someone new to CSS? +Preprocessing is when CSS can be written with a special syntax that makes it easier to reuse, read and maintain. Then that syntax is translated through a translator (compiler) into regular CSS + 5. What is your favorite concept in preprocessing? What is the concept that gives you the most trouble? +My favorite concept is the ease of it's readability and reusability. The concept that has been giving me the most trouble is creating mixins and parametric mixins and using them correctly. + You are expected to be able to answer all these questions. Your responses contribute to your Sprint Challenge grade. Skipping this section *will* prevent you from passing this challenge. ## Project Set Up From f5aa4e4d76128bb47c1d150d5b1d75376aa1c6ae Mon Sep 17 00:00:00 2001 From: Greg Jordan Date: Fri, 29 Mar 2019 11:29:04 -0400 Subject: [PATCH 02/10] Answered the questions in the README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e776885250..3148f3bc7b 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Preprocessing is when CSS can be written with a special syntax that makes it eas 5. What is your favorite concept in preprocessing? What is the concept that gives you the most trouble? -My favorite concept is the ease of it's readability and reusability. The concept that has been giving me the most trouble is creating mixins and parametric mixins and using them correctly. +My favorite concept is the ease of it's readability and reusability. The concept that has been giving me the most trouble is creating mixins and parametric mixins and using them correctly. Correct You are expected to be able to answer all these questions. Your responses contribute to your Sprint Challenge grade. Skipping this section *will* prevent you from passing this challenge. From 80c6a46b403c376cdb195b1f4b7a8fbe2efa4201 Mon Sep 17 00:00:00 2001 From: Greg Jordan Date: Fri, 29 Mar 2019 12:22:19 -0400 Subject: [PATCH 03/10] Added Nav bar --- css/index.css | 262 +++++++++++++++++++++++++++++++++++++++++++ index.html | 20 +++- less/home-page.less | 5 +- less/index.css | 223 ++++++++++++++++++++++++++++++++++++ less/index.less | 8 +- less/navigation.css | 0 less/navigation.less | 39 ++++++- less/variables.css | 0 less/variables.less | 2 + 9 files changed, 555 insertions(+), 4 deletions(-) create mode 100644 less/index.css create mode 100644 less/navigation.css create mode 100644 less/variables.css diff --git a/css/index.css b/css/index.css index e69de29bb2..1c707e5eaa 100644 --- a/css/index.css +++ b/css/index.css @@ -0,0 +1,262 @@ +/* http://meyerweb.com/eric/tools/css/reset/ + v2.0 | 20110126 + License: none (public domain) +*/ +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + display: block; +} +body { + line-height: 1; +} +ol, +ul { + list-style: none; +} +blockquote, +q { + quotes: none; +} +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +* { + box-sizing: border-box; +} +html { + font-size: 62.5%; +} +html, +body { + font-family: 'Ubuntu', sans-serif; + color: #5E6164; +} +h1, +h2, +h3, +h4, +h5 { + font-family: 'Russo One', sans-serif; + color: #23293B; +} +h2 { + font-size: 3.2rem; +} +h3 { + font-size: 2.8rem; +} +p { + font-size: 1.6rem; + line-height: 1.4; +} +.container { + max-width: 800px; + width: 100%; + margin: 0 auto; +} +.nav-header { + display: flex; + justify-content: space-between; + align-items: center; + flex-direction: column; +} +@media (max-width: 500px) { + .nav-header h1 { + margin-bottom: 2%; + } +} +.nav-header nav { + display: flex; + justify-content: space-around; + width: 45%; +} +@media (max-width: 500px) { + .nav-header nav { + width: 90%; + } +} +.nav-header nav a { + font-size: 1.5rem; + text-decoration: none; +} +.nav-header nav a:hover { + text-decoration: underline; + text-decoration-color: black; +} +@media (max-width: 500px) { + .nav-header { + display: flex; + width: 90%; + } +} +footer { + color: #22283B; + background: #f4f4f4; + padding: 20px 0; + border: 1px double #e0e0e0; + border-radius: 10px; + display: flex; + justify-content: center; + align-items: center; +} +.container .home { + max-width: 80%; + margin: auto; +} +.container .home .intro h2 { + padding: 15px; +} +.container .home .intro p { + padding: 0 15px; +} +.container .home .space-images { + display: flex; + flex-wrap: wrap; + width: 100%; +} +.container .home .space-images img { + width: 28%; + margin: 20px 2.5%; + border-radius: 20px; + height: 100%; +} +.container .home .visit-planets { + padding: 15px; +} +.container .home .visit-planets h3 { + margin-top: 11px; +} +.container .home .visit-planets p { + margin-top: 13px; +} +.container .home .walk { + margin-top: 60px; + border-top: 1px solid #dee2e6; + padding: 50px 60px; + display: flex; + justify-content: center; +} +.container .home .walk .walk-text { + width: 50%; +} +.container .home .walk .walk-text h3 { + margin-bottom: 10px; +} +.container .home .walk .walk-text p { + margin-bottom: 26px; +} +.container .home .walk .walk-img { + width: 46%; + margin-left: 4%; +} +.container .home .walk .walk-img img { + width: 100%; + height: auto; + border-radius: 10px; +} diff --git a/index.html b/index.html index 6ba6990f3a..a1b6340f77 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,7 @@ + -
+
+

Lift Off

diff --git a/less/home-page.less b/less/home-page.less index 4eea66100a..f072e06f06 100644 --- a/less/home-page.less +++ b/less/home-page.less @@ -1,6 +1,9 @@ // Home Content -.home { +.container .home { + + max-width: 80%; + margin: auto; .intro { diff --git a/less/index.css b/less/index.css new file mode 100644 index 0000000000..285f39a467 --- /dev/null +++ b/less/index.css @@ -0,0 +1,223 @@ +/* http://meyerweb.com/eric/tools/css/reset/ + v2.0 | 20110126 + License: none (public domain) +*/ +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + display: block; +} +body { + line-height: 1; +} +ol, +ul { + list-style: none; +} +blockquote, +q { + quotes: none; +} +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +* { + box-sizing: border-box; +} +html { + font-size: 62.5%; +} +html, +body { + font-family: 'Ubuntu', sans-serif; + color: #5E6164; +} +h1, +h2, +h3, +h4, +h5 { + font-family: 'Russo One', sans-serif; + color: #23293B; +} +h2 { + font-size: 3.2rem; +} +h3 { + font-size: 2.8rem; +} +p { + font-size: 1.6rem; + line-height: 1.4; +} +.container { + max-width: 800px; + width: 100%; + margin: 0 auto; +} +footer { + color: #22283B; + background: #f4f4f4; + padding: 20px 0; + border: 1px double #e0e0e0; + border-radius: 10px; + display: flex; + justify-content: center; + align-items: center; +} +.home .intro h2 { + padding: 15px; +} +.home .intro p { + padding: 0 15px; +} +.home .space-images { + display: flex; + flex-wrap: wrap; + width: 100%; +} +.home .space-images img { + width: 28%; + margin: 20px 2.5%; + border-radius: 20px; + height: 100%; +} +.home .visit-planets { + padding: 15px; +} +.home .visit-planets h3 { + margin-top: 11px; +} +.home .visit-planets p { + margin-top: 13px; +} +.home .walk { + margin-top: 60px; + border-top: 1px solid #dee2e6; + padding: 50px 60px; + display: flex; + justify-content: center; +} +.home .walk .walk-text { + width: 50%; +} +.home .walk .walk-text h3 { + margin-bottom: 10px; +} +.home .walk .walk-text p { + margin-bottom: 26px; +} +.home .walk .walk-img { + width: 46%; + margin-left: 4%; +} +.home .walk .walk-img img { + width: 100%; + height: auto; + border-radius: 10px; +} diff --git a/less/index.less b/less/index.less index 798843e162..481939b47b 100644 --- a/less/index.less +++ b/less/index.less @@ -1,5 +1,11 @@ // Import your less files here: - +@import "variables"; +@import "mixins"; +@import "reset"; +@import "global"; +@import "navigation"; +@import "footer"; +@import "home-page"; diff --git a/less/navigation.css b/less/navigation.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/less/navigation.less b/less/navigation.less index 17779ae17a..934662efe6 100644 --- a/less/navigation.less +++ b/less/navigation.less @@ -1 +1,38 @@ -// Navigation code here \ No newline at end of file +// Navigation code here +.nav-header { + display: flex; + justify-content: space-between; + align-items: center; + flex-direction: column; + + h1 { + @media @phone { + margin-bottom: 2%; + } + } + + nav { + display: flex; + justify-content: space-around; + width: 45%; + + @media @phone { + width: 90%; + } + + a { + font-size: 1.5rem; + text-decoration: none; + &:hover { + text-decoration: underline; + text-decoration-color: black; + } + } + } + @media @phone { + display: flex; + + width: 90%; + + } + } \ No newline at end of file diff --git a/less/variables.css b/less/variables.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/less/variables.less b/less/variables.less index b5b3d46021..4b7fdabb49 100644 --- a/less/variables.less +++ b/less/variables.less @@ -24,3 +24,5 @@ @border-real: #dee2e6; // Mobile var +@phone: ~"(max-width: 500px)"; +@tablet: ~"( max-width: 700px)"; From 723c2d24d06f381a2576189ba181fd538c941771 Mon Sep 17 00:00:00 2001 From: Greg Jordan Date: Fri, 29 Mar 2019 12:44:18 -0400 Subject: [PATCH 04/10] Nav component completed --- css/index.css | 18 ++++++++++-------- index.html | 2 +- less/home-page.less | 27 +++++++++++++++------------ less/navigation.less | 15 ++++++++++++--- 4 files changed, 38 insertions(+), 24 deletions(-) diff --git a/css/index.css b/css/index.css index 1c707e5eaa..1c6d7b45e9 100644 --- a/css/index.css +++ b/css/index.css @@ -162,14 +162,14 @@ p { } .nav-header { display: flex; - justify-content: space-between; + justify-content: stretch; align-items: center; flex-direction: column; + margin-bottom: 1rem; } -@media (max-width: 500px) { - .nav-header h1 { - margin-bottom: 2%; - } +.nav-header h1 { + font-size: 4rem; + margin-bottom: 3rem; } .nav-header nav { display: flex; @@ -205,9 +205,11 @@ footer { justify-content: center; align-items: center; } -.container .home { - max-width: 80%; - margin: auto; +@media (max-width: 500px) { + .container .home { + max-width: 80%; + margin: auto; + } } .container .home .intro h2 { padding: 15px; diff --git a/index.html b/index.html index a1b6340f77..38f414b45c 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,7 @@ -
+