From 9868ef5cf61820eaa6e305555fe1a7a57a87b0a0 Mon Sep 17 00:00:00 2001 From: Athena Date: Sat, 3 Oct 2020 14:01:59 -0600 Subject: [PATCH] add cards, fix typos --- models/user.js | 2 +- public/js/users/editprofile.js | 2 +- public/stylesheets/style.css | 33 +++++++++++++++++++++++---- routes/users-api-routes.js | 2 +- routes/users-html-routes.js | 10 +++++--- views/blogs/blogs.handlebars | 2 +- views/blogs/postblog.handlebars | 4 ++-- views/login.handlebars | 2 +- views/partials/filterblogs.handlebars | 22 ++++++++++++++++-- views/partials/viewmember.handlebars | 4 ++-- views/users/editprofile.handlebars | 8 +++---- views/users/members.handlebars | 32 ++++++++++++++++++++++++-- 12 files changed, 99 insertions(+), 24 deletions(-) diff --git a/models/user.js b/models/user.js index 0f8fd91..ec2d88a 100644 --- a/models/user.js +++ b/models/user.js @@ -53,7 +53,7 @@ module.exports = function(sequelize, DataTypes) { len: [0, 5000] } }, - intrests: { + interests: { type: DataTypes.TEXT, allowNull: true, validate: { diff --git a/public/js/users/editprofile.js b/public/js/users/editprofile.js index 6db9bf1..f6f2aea 100644 --- a/public/js/users/editprofile.js +++ b/public/js/users/editprofile.js @@ -9,7 +9,7 @@ $(document).ready(function() { formData.append("title", $("#title").val()) formData.append("bio", $("#bio").val()) formData.append("hobbies", $("#hobbies").val()) - formData.append("intrests", $("#intrests").val()) + formData.append("interests", $("#interests").val()) formData.append("website", $("#website").val()) const image = document.getElementById("picture"); diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index 7efb401..14dda0e 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -1,3 +1,7 @@ +/* Todo: Card layout for profiles + align PROFILE to center*/ + + form.signup, form.login { margin-top: 50px; @@ -33,22 +37,34 @@ form.login { color: white; } -.nav-link:hover, #SearchBlogBtn:hover, .btn:hover, button:hover { +.nav-link:hover { color: white; background-color: rgb(21, 28, 48); transition-duration: 1s; } -/* Includes Search bar and buttons */ -button, input, #SearchBlogInput, select, .btn { +button:hover, .btn:hover { + background-color: rgb(43, 80, 87); +} + +#SearchBlogBtn:hover { + background-color: rgb(21, 28, 48); +} + +/* search bar / selection */ +input, #SearchBlogInput, select { border-style: solid; - border-radius: 8px; + border-radius: 3px; border-color: rgb(43, 80, 87); } /* Specifies buttons only */ button, #SearchBlogBtn, .btn { background-color: rgb(74, 158, 151); + border-style: solid; + border-radius: 5px; + border-color: rgb(43, 80, 87); + color: white; } .hidden { @@ -97,6 +113,15 @@ body { text-align: center; } +.form-group { + margin-top: 20px; +} + +/* Aligns sign up / login page to center */ +.row { + justify-content: center; +} + .todo-list { margin: 0 auto; margin-top: 75px; diff --git a/routes/users-api-routes.js b/routes/users-api-routes.js index 20831da..730bdf9 100644 --- a/routes/users-api-routes.js +++ b/routes/users-api-routes.js @@ -27,7 +27,7 @@ module.exports = function(app) { title: req.body.title, bio: req.body.bio, hobbies: req.body.hobbies, - intrests: req.body.intrests + interests: req.body.interests } // Function that DOBLE checks if string is URL so query does not crash diff --git a/routes/users-html-routes.js b/routes/users-html-routes.js index 339ed9f..817fcd9 100644 --- a/routes/users-html-routes.js +++ b/routes/users-html-routes.js @@ -13,7 +13,11 @@ module.exports = function(app) { id: user.id, name: user.name, email: user.email, - picture: user.picture + picture: user.picture, + bio: user.bio, + hobbies: user.hobbies, + interests: user.interests, + title: user.title }) }); res.render("users/members", { @@ -67,7 +71,7 @@ module.exports = function(app) { bio: member.bio, website: member.website, hobbies: member.hobbies, - intrests: member.intrests + interests: member.interests }; let handlebarTemp = "partials/viewmember"; @@ -95,7 +99,7 @@ module.exports = function(app) { title: user.title, bio: user.bio, hobbies: user.hobbies, - intrests: user.intrests, + interests: user.interests, website: user.website } res.render("users/editprofile", { diff --git a/views/blogs/blogs.handlebars b/views/blogs/blogs.handlebars index a07dbdb..76dceb7 100644 --- a/views/blogs/blogs.handlebars +++ b/views/blogs/blogs.handlebars @@ -1,4 +1,4 @@ -

View All Blogs and Filter Here


+

View All Blogs







-
-

+
+




-
+


\ No newline at end of file diff --git a/views/users/members.handlebars b/views/users/members.handlebars index ee50447..dfa2f77 100644 --- a/views/users/members.handlebars +++ b/views/users/members.handlebars @@ -1,5 +1,33 @@ -

See All members here

+

See All Members

-{{#each user }} +{{!-- {{#each user }}
  • Profile Picture{{ name }}, {{ email }}
  • +{{/each}} --}} +{{!-- +{{#each user }} +
    + Card image cap +
    +
    {{ name }}
    +

    {{ bio }}

    +
    +
    +{{/each}} --}} + +{{#each user }} +
    + Card image cap +
    +
    {{name}}
    +

    {{ bio }}

    +
    + + +
    {{/each}} \ No newline at end of file