Skip to content

Commit

Permalink
gotta fix delete
Browse files Browse the repository at this point in the history
  • Loading branch information
Simonvargas committed Jul 2, 2021
1 parent 00822ad commit 1134ecf
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 33 deletions.
34 changes: 34 additions & 0 deletions db/migrations/20210628202553-create-trailList.js
Original file line number Diff line number Diff line change
@@ -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');
}
};
34 changes: 29 additions & 5 deletions public/stylesheets/details.css
Original file line number Diff line number Diff line change
Expand Up @@ -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%;
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -158,8 +182,8 @@ img {
height: 50px;
border-radius: 25px;
padding: 10px;
object-fit: cover;
}

.name {
text-align: center;
font-size: 30px;
Expand Down
2 changes: 2 additions & 0 deletions public/stylesheets/login.css
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,6 @@ img {
font-weight:800;
font-size: 30px;
text-decoration: none;
color: black;
}

10 changes: 10 additions & 0 deletions public/stylesheets/signup.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
48 changes: 25 additions & 23 deletions views/login.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 4 additions & 2 deletions views/signup.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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

5 changes: 2 additions & 3 deletions views/trail-detail.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1134ecf

Please sign in to comment.