Skip to content
Snippets Groups Projects
Commit f03759fe authored by Ludvig Damberg's avatar Ludvig Damberg
Browse files

session

worken on comment functionality and some updated interface and design
parent d2543b98
No related branches found
No related tags found
No related merge requests found
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
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
frontend/public/content/landing1.jpg

4.3 MiB

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,
});
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment