From 1134ecffad20822e37c5863226052b86151a5ffd Mon Sep 17 00:00:00 2001 From: simonvargas Date: Thu, 1 Jul 2021 22:58:10 -0400 Subject: [PATCH] gotta fix delete --- .../20210628202553-create-trailList.js | 34 +++++++++++++ public/stylesheets/details.css | 34 +++++++++++-- public/stylesheets/login.css | 2 + public/stylesheets/signup.css | 10 ++++ views/login.pug | 48 ++++++++++--------- views/signup.pug | 6 ++- views/trail-detail.pug | 5 +- 7 files changed, 106 insertions(+), 33 deletions(-) create mode 100644 db/migrations/20210628202553-create-trailList.js diff --git a/db/migrations/20210628202553-create-trailList.js b/db/migrations/20210628202553-create-trailList.js new file mode 100644 index 0000000..c80f047 --- /dev/null +++ b/db/migrations/20210628202553-create-trailList.js @@ -0,0 +1,34 @@ +'use strict'; +module.exports = { + up: (queryInterface, Sequelize) => { + return queryInterface.createTable('TrailLists', { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER + }, + name: { + unique: true, + allowNull: false, + type: Sequelize.STRING(255) + }, + userId: { + references: { model: "Users" }, + allowNull: false, + type: Sequelize.INTEGER + }, + createdAt: { + allowNull: false, + type: Sequelize.DATE + }, + updatedAt: { + allowNull: false, + type: Sequelize.DATE + } + }); + }, + down: (queryInterface, Sequelize) => { + return queryInterface.dropTable('TrailLists'); + } +}; \ No newline at end of file diff --git a/public/stylesheets/details.css b/public/stylesheets/details.css index 4f12e0d..6df39b5 100644 --- a/public/stylesheets/details.css +++ b/public/stylesheets/details.css @@ -65,15 +65,17 @@ img { } */ -h1 { + +.h1 { color: #0f211a; text-align: center; padding: 20px; bottom: 5px; font-size: 50px; - font-family: ; + text-decoration: none; + display: flex; + justify-content: center; } - /* .header { position: fixed; width: 100%; @@ -102,8 +104,29 @@ h1 { width: 100px; height: 30px; font-size: 18px; + background-color:blue; +} +.login-btn { + float: right; + margin: 10px; + border-radius: 6px; + color: white; + width: 100px; + height: 30px; + font-size: 18px; + background-color:blue; } +.sign-btn { + float: right; + margin: 10px; + border-radius: 6px; + color: white; + width: 100px; + height: 30px; + font-size: 18px; + background-color:lightsalmon; +} .search-bar { @@ -141,10 +164,11 @@ header > div { img { width: 700px; - height: 600px; + max-height: 600px; display: block; margin: auto; border-radius: 6px; + object-fit: contain; } .name { @@ -158,8 +182,8 @@ img { height: 50px; border-radius: 25px; padding: 10px; + object-fit: cover; } - .name { text-align: center; font-size: 30px; diff --git a/public/stylesheets/login.css b/public/stylesheets/login.css index 65dc2ac..ea90b82 100644 --- a/public/stylesheets/login.css +++ b/public/stylesheets/login.css @@ -135,4 +135,6 @@ img { font-weight:800; font-size: 30px; text-decoration: none; + color: black; } + diff --git a/public/stylesheets/signup.css b/public/stylesheets/signup.css index fa01168..71faf19 100644 --- a/public/stylesheets/signup.css +++ b/public/stylesheets/signup.css @@ -126,4 +126,14 @@ img { font-weight:800; font-size: 30px; text-decoration: none; + color: black; } + +.home { + border-radius: 6px; + color: white; + width: 100px; + height: 30px; + font-size: 18px; + background-color:lightsalmon; +} \ No newline at end of file diff --git a/views/login.pug b/views/login.pug index da5cd1c..849fb91 100644 --- a/views/login.pug +++ b/views/login.pug @@ -4,28 +4,30 @@ include utils.pug append head link(rel="stylesheet" href="/stylesheets/login.css") block content - div(class="container") - aside(class="color-block") - p(class='logo') Mixtrail - p(class='word') Explore the states best hiking trails! - img(src='./globe-1339833_1280.png') - div(class="form-container") - h1 Sign into MixTrail - br - +validationErrorSummary(errors) - form(action="/login" method="post" id="login" class="login-form") - input(type="hidden" name="_csrf" value=csrfToken) - br + div(class="container") - input(type="email" name="email" placeholder="Email" class="email" ) - br - - input(type="password" name="password" placeholder="Password" class="password") + aside(class="color-block") + a(href='/') + p(class='logo') Mixtrail + p(class='word') Explore the states best hiking trails! + img(src='./globe-1339833_1280.png') + div(class="form-container") + h1 Sign into MixTrail br - button(type="submit" class="login-btn") Login - form(action="/login/demo" method="post" id="demo" class="demo-form") - input(type="hidden" name="_csrf" value=csrfToken) - button(type="submit" class="demo-btn") Demo Login - nav - p Not a member? - a(href='/signup' class="sign") Sign Up + +validationErrorSummary(errors) + form(action="/login" method="post" id="login" class="login-form") + input(type="hidden" name="_csrf" value=csrfToken) + br + + input(type="email" name="email" placeholder="Email" class="email" ) + br + + input(type="password" name="password" placeholder="Password" class="password") + br + button(type="submit" class="login-btn") Login + form(action="/login/demo" method="post" id="demo" class="demo-form") + input(type="hidden" name="_csrf" value=csrfToken) + button(type="submit" class="demo-btn") Demo Login + nav + p Not a member? + a(href='/signup' class="sign") Sign Up diff --git a/views/signup.pug b/views/signup.pug index 1eff1a3..d6a6ffb 100644 --- a/views/signup.pug +++ b/views/signup.pug @@ -6,7 +6,8 @@ append head block content div(class="container") aside(class="color-block") - p(class='logo') Mixtrail + a(href='/') + p(class='logo') Mixtrail p(class='word') Explore the states best hiking trails! img(src='./nature-transparent-background-24.png') div(class="form-container") @@ -29,5 +30,6 @@ block content input(type="password" name="confirmPassword" placeholder="Confirm Password" class="password box-input") button(type="submit" class="signup-btn") Create Account nav - p Already a member? + p Already a member? a(href='/login' class="login") Login + diff --git a/views/trail-detail.pug b/views/trail-detail.pug index 963ca16..9ebe966 100644 --- a/views/trail-detail.pug +++ b/views/trail-detail.pug @@ -36,19 +36,18 @@ block content img(src="/1889970.png" class="mixtrail-logo") div(class="nav-div") input(type="text" id="search-bar" class="search-bar" placeholder="Find your next trail!") - if (!user) + if (user) form(action="/" method="get" id="demo" class="demo") button(type="submit" class="logout-btn home") Home form(action="/" method="post" id="demo" class="demo") button(type="submit" class="logout-btn logout") Logout - else form(action="/" method="post" id="demo" class="demo") button(type="submit" class="login-btn") Login form(action="/" method="post" id="demo" class="demo") button(type="submit" class="sign-btn") Sign Up div - h1 MixTrail + a(href='/' class='h1') MixTrail div(class='container') div(class='top-container') p(class=`name`)= trail.name