diff --git a/css/design.css b/css/design.css new file mode 100644 index 0000000..2094f8d --- /dev/null +++ b/css/design.css @@ -0,0 +1,119 @@ +body{ + background-color: #e1f1f6; + font-family: Helvetica, sans-serif; + color: #222; +} + +.page{ + margin: 50px auto; + width: 70%; + background-color: #fff; + border-radius: 5px; + padding: 50px; +} + +.page-header{ + margin-bottom: 20px; +} + .page-header h2{ + float: left; + font-size: 22px; + text-transform: uppercase; + font-weight: bold; + color: #555; + } + + .page-header .student-search{ + float: right; + } + + .page-header .student-search input{ + border-radius: 5px; + border: 1px solid #eaeaea; + padding: 8px 15px; + font-size: 14px; + } + + .page-header .student-search button{ + border-radius: 5px; + border: 1px solid #eaeaea; + padding: 8px 15px; + font-size: 14px; + background-color: #4ba6c3; + color: #fff + } + +.student-list{} + + .student-item{ + margin: 0 0 20px 0; + padding: 0 0 20px 0; + border-bottom: 1px solid #eaeaea; + } + + .student-details{ + width: 50%; + float: left; + } + + .student-details .avatar{ + width: 40px; + height: auto; + border-radius: 20px; + float: left; + margin-right: 14px + } + + .student-details h3{ + margin: 4px 0 2px 0; + font-weight: bold; + color: #4ba6c3; + } + + .student-details .email{ + color: #888; + font-size: 14px; + } + + + .joined-details{ + width: 50%; + float: left; + text-align: right; + } + + .joined-details .date{ + margin-top: 15px; + display: block; + font-size: 14px; + color: #999; + } + + .student-item:last-child{ + margin: 0; + padding: 0; + border-bottom: none; + } + +.pagination{ + margin: 40px 0 0 0; + text-align: center; +} + + .pagination li{ + display: inline; + } + + .pagination li a{ + border: 1px solid #eaeaea; + border-radius: 5px; + padding: 3px 8px; + text-decoration: none; + color: #4ba6c3; + } + + .pagination li a.active, + .pagination li a:hover{ + background-color: #4ba6c3; + color: #fff; + } \ No newline at end of file diff --git a/css/reset.css b/css/reset.css new file mode 100644 index 0000000..b4ba8ca --- /dev/null +++ b/css/reset.css @@ -0,0 +1,56 @@ +/* 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; +} + +.cf:after { + content: "."; + visibility: hidden; + display: block; + height: 0; + clear: both; +} \ No newline at end of file diff --git a/examples/44students.html b/examples/44students.html new file mode 100644 index 0000000..0cc0982 --- /dev/null +++ b/examples/44students.html @@ -0,0 +1,461 @@ + + + + + + Students + + + + +
+ + +
+ + + + diff --git a/examples/64students.html b/examples/64students.html new file mode 100644 index 0000000..201467c --- /dev/null +++ b/examples/64students.html @@ -0,0 +1,661 @@ + + + + + + Students + + + + +
+ + +
+ + + + diff --git a/examples/example-exceeds.html b/examples/example-exceeds.html new file mode 100644 index 0000000..ef66d76 --- /dev/null +++ b/examples/example-exceeds.html @@ -0,0 +1,151 @@ + + + + + + Students + + + + +
+ + + + + + + +
+ + + diff --git a/examples/example-meets.html b/examples/example-meets.html new file mode 100644 index 0000000..4a8dfb8 --- /dev/null +++ b/examples/example-meets.html @@ -0,0 +1,143 @@ + + + + + + Students + + + + +
+ + + + + + + +
+ + + diff --git a/index.html b/index.html new file mode 100644 index 0000000..8e11bd0 --- /dev/null +++ b/index.html @@ -0,0 +1,565 @@ + + + + + + Students + + + + +
+ + + + +
+ + + + diff --git a/js/script.js b/js/script.js new file mode 100644 index 0000000..84358aa --- /dev/null +++ b/js/script.js @@ -0,0 +1,50 @@ +/****************************************** +Treehouse Techdegree: +FSJS project 2 - List Filter and Pagination +******************************************/ + +// Study guide for this project - https://drive.google.com/file/d/1OD1diUsTMdpfMDv677TfL1xO2CEkykSz/view?usp=sharing + + +/*** + Add your global variables that store the DOM elements you will + need to reference and/or manipulate. + + But be mindful of which variables should be global and which + should be locally scoped to one of the two main functions you're + going to create. A good general rule of thumb is if the variable + will only be used inside of a function, then it can be locally + scoped to that function. +***/ + + + + +/*** + Create the `showPage` function to hide all of the items in the + list except for the ten you want to show. + + Pro Tips: + - Keep in mind that with a list of 54 students, the last page + will only display four. + - Remember that the first student has an index of 0. + - Remember that a function `parameter` goes in the parens when + you initially define the function, and it acts as a variable + or a placeholder to represent the actual function `argument` + that will be passed into the parens later when you call or + "invoke" the function +***/ + + + + +/*** + Create the `appendPageLinks function` to generate, append, and add + functionality to the pagination buttons. +***/ + + + + + +// Remember to delete the comments that came with this file, and replace them with your own code comments. \ No newline at end of file