diff --git a/backend/models/comment.js b/backend/models/comment.js new file mode 100644 index 0000000000000000000000000000000000000000..58945057b890af6f6e94ff502c0f002f6e9a9060 --- /dev/null +++ b/backend/models/comment.js @@ -0,0 +1,22 @@ +const mongoose = require('mongoose') + + +const commentSchema = new mongoose.Schema({ + profile_name: { + type: String, + required: true + }, + profile_picture: { + type: String, + required: true + }, + comment: { + type: String, + required: true + }, +}) + +const commentModel = mongoose.model("comment", commentSchema) + +module.exports = commentModel + diff --git a/backend/models/post.js b/backend/models/post.js new file mode 100644 index 0000000000000000000000000000000000000000..d397d3e24b8a4d8357b272a5160dbc4f27a35d29 --- /dev/null +++ b/backend/models/post.js @@ -0,0 +1,49 @@ +const mongoose = require('mongoose') +const userModel = require('./user') + +const postSchema = new mongoose.Schema({ + name: { + type: String, + required: true + }, + recipe: { + type: [String], + required: false + }, + description: { + type: String, + required: true + }, + author:{ + type: mongoose.Schema.Types.ObjectId, + ref:"user" + }, + profile_picture: { + type: String, + required: true + }, + profile_name: { + type: String, + required: true + }, + upvotes: { + type: [String], + required: false + }, + comments: { + type: [mongoose.Schema.Types.ObjectId], + ref:"comment", + required: false + }, + photo: { + type: String, + required: true + } + + +}) + +const postModel = mongoose.model("Post", postSchema) + +module.exports = postModel + diff --git a/frontend/public/content/landing1.jpg b/frontend/public/content/landing1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b33eb640a9ee4dafbbfd829bfb2effc7bcd4fae6 Binary files /dev/null and b/frontend/public/content/landing1.jpg differ diff --git a/frontend/src/functions/animations.js b/frontend/src/functions/animations.js new file mode 100644 index 0000000000000000000000000000000000000000..3953ed389bf7d76e5a96875507e7b8381a91bbdb --- /dev/null +++ b/frontend/src/functions/animations.js @@ -0,0 +1,31 @@ +import anime from 'animejs/lib/anime.es.js'; + +export const fadeInVertical = (element) => { + anime({ + targets: element, + opacity: [0, 1], + translateY: ['10px', '0px'], + easing: 'easeInOutQuad', + duration: 250, + }); +}; + +export const fadeInHorizontal = (element) => { + anime({ + targets: element, + opacity: [0, 1], + translateX: ['20px', '0px'], + easing: 'easeInOutQuad', + duration: 500, + }); +}; + +export const fadeInAndScale = (element) => { + anime({ + targets: element, + opacity: [0, 1], + scale: [0.5, 1], + easing: 'easeInOutQuad', + duration: 500, + }); +};