diff --git a/README.md b/README.md index 1bf2f4f..8784f53 100644 --- a/README.md +++ b/README.md @@ -182,7 +182,7 @@ We also used anime.js to make the transitions on the page much smoother. On the nav bar; we also have a filter option as a dropdown menu, which will filter out the data based on their category. There is also a pop-up window for new post entries. Here, you can choose a gif from the GIPHY API to go with your post; the user has the ability to change the GIF as well in case they want to change it. -Lastly is the Preventers page, which simply tells you more about the group and the purpose of the website. +Lastly is the Preventers page, which simply tells you more about the group and the purpose of the website. We plan to add more to this page. All pages have a dark mode function, that turns the color scale to grey (this is a simple css filter functionality). diff --git a/client/preventers.html b/client/preventers.html index e1bf4fa..827b6aa 100644 --- a/client/preventers.html +++ b/client/preventers.html @@ -46,186 +46,143 @@

Documentation

-
-

PREVENTERS present preVent

-

The task set out to us was to create a comunity journaling website, that anyone can make a post and be able to comment and react to posts.

-

preVent logo

-

Installation & Usage

-

Installation

- -

Usage

- -

Technologies

- -

Process

-

The idea

-

Intially we wanted a website like twitter where you could just rant and get things off your chest, from this we found a website called muttr which was just for ranting but realised this would create a very negative enviroment. We wanted it to be a constructive enviroment, to achieve this we wanted inspirational quotes to try an inspire our clientel. We have also implemented a rudimental filtering system to disallow certain words to be posted.

-

Psychology behind preVent

-

Why venting is good for you

- -

Functionality

-

For the design of the project we took the user specifications and segmeted them into system requirements. For this we created a google doc for everyone to just write down their ideas and then collate them into a list of steps and tasks to be completed.

-

Requirements

- -

Design

-

To design the page we looked at many different websites that we thought of that have already had success in the community industry. We took inspiration to do this we made a list of likes and dislikes.

-

Muttr

- +
+

PREVENTERS present preVent

+

The task set out to us was to create a comunity journaling website, that anyone can make a post and be able to comment and react to posts.

+

preVent logo

+

Installation & Usage

+

Installation

+

Clone or Download this repo
navigate to this folder
use the commands: npm i

+

Usage

+

Go to : https://dreamy-jalebi-cb99ed.netlify.app/client/index.html

+

Technologies

+

> Express: implement our entries API
+ > Nodemon/Node: running the API
+ > Anime.js: Javascript animation for front-end
+ > TypeIt.js: Typewriter effect used on front-end
+ > Netlify: Deploying preVent website from the repo
+ > Heroku: Used for hosting the API platform
+ > Jest and supertest: testing API routes and models on back-end
+ > Loader.io: testing load on front-end

+

Process

+

The idea

+

Intially we wanted a website like twitter where you could just rant and get things off your chest, from this we found a website called muttr which was just for ranting but realised this would create a very negative enviroment. We wanted it to be a constructive enviroment, to achieve this we wanted inspirational quotes to try an inspire our clientel. We have also implemented a rudimental filtering system to disallow certain words to be posted.

+

Psychology behind preVent

+

Why venting is good for you

+

We vent to reduce our stress levels (disclosing stress is a coping mechanism as established by Rime (2009) - venting is a two way process with the person venting and the person hearing the vent.

Why we need this app

+
+ This application allows you to vent in two ways: users being able to make posts and other users being able to read through these posts and make comments.

+

Functionality

+

For the design of the project we took the user specifications and segmeted them into system requirements. For this we created a google doc for everyone to just write down their ideas and then collate them into a list of steps and tasks to be completed.

+

Requirements

+

User will be able to make an anonymous post

+

Create a post
+ Text box for user to input characters, capped at a maximum number of characters
+ Gif button on the “create post” to access giphy and add a gif into the post
+ Post button for user to create the post and push into the dataset
+ Will include data and time of post
+ Create categories for the user posts
+ Filter certain words; slurs etc - to keep app ethical

+ +

User will be able to use emojis (at least 3) to rate their post

+

Emojis available under every post for users to react to posts by clicking the emoji

+ User should be able to react using all available emojis
+ Each emoji will have a reaction count to see how many other users have reacted
+

The emojis will be a pop up bubble - make it clean looking (like the message reactions)

+ +

User will be able to input 400 characters for each post

+

+ After 400 characters, the user will get an error message
+ Event listener for each key stroke and then get the length of the input string
+ Replacing names on posts with fun aliases
+

+ + <>Users will be able to use giphy to add gifs/images to post +

A search bar within the create post block to allow users to search for specific gifs in the giphy api
+ All gifs will be resized to fit the post block
+

+

Users can view other people’s posts

+

Fetching posts
+ Timeline page so on the main page - you can see all the posts made by other users
+ Create a card that can be reused for every post

+ +

Mindful quote

+ +

After user creates post, the app takes them to a random quote based on the category

+

User must be able to comment on other people’s journal entries

+ +

Replies to posts which will also be capped at a maximum character length

+

Users will be able to rate their mood

+ +

Users will rate their post with an emoji when they post it; this will allow others to see their mood before even reading their post (creating ease of use).

+ +

Two ways to create comments?

+ +

Create comment on the same page where the comment box is unhidden and expanded
+ Click into post (redirect to post only, displayed with comments)

+ + +

Design

+

To design the page we looked at many different websites that we thought of that have already had success in the community industry. We took inspiration to do this we made a list of likes and dislikes.

+

Muttr

+ +

Likes:

+

> Like the way you can make anonymous posts
+ > How the posts are structured on the page: running timeline of posts
+ > Categorisation of the posts
+ > Calming colours used for application

+ +

Dislikes:

+

> Certain categories on this website makes it harder to approach meaning the audience it is targeted at is too varying; swearing etc is allowed on this application - this might put people off from venting as they read through other people’s posts.
+ > Also, the application doesn’t allow users to “journal” anymore - it seems to have become a hub for troll posts - we have to create “prevention” methods.
+ > Venting is a two way process and unfortunately Muttr does not cater to this despite being a place to vent.
+ > What is different: Our application will filter out certain words making it more usable and ethical for all ages.

+ +

Twitter

- +

Likes:

+

> Has a character cap on each tweet to prevent posts from being too long, + clean and intuitive GUI

+

Dislikes:

+

> Very unfiltered, users can post anything.
+ > Does not really have clear-cut categories of users posts

+ +

What is different:

+

> We will filter out certain words to make sure it is more user-friendly for all ages,
+ > Each post will have a category selection so users are able to filter through posts

+

Tumblr

- +

Likes:

+

>Blog style app, that allows different media to be posted
+ > Allows users to “create their own site”
+ > Has a reblogging functionality

+ +

Dislikes:

+

> Not anonymous
+ > long posts

+

Reddit

- + +

Likes:

+

> It has a huge number of threads that can be used for venting
+ > The commenting system
+ > Upvoting and downvoting

+ +

Dislikes:

+

> Doesn’t have emojis
+ > Is not fully anonymous
+ > Lawless, no filter

+

Dalio

- + +

Likes:

+

You can set your mood and people you are with
+ > Monitor daily mood swings

+ +

Dislikes:

+

> Not really a journal, as you can’t write much
+ > Not anonymous

+

Backend

Creating the post API

To create the API we used express, nodemon/ node. We created the data to be able to handle all the data that the post could have:

@@ -258,69 +215,59 @@

Frontend

Lastly is the Preventers page, which simply tells you more about the group and the purpose of the website. All pages have a mark mode function, that turns color scale to grey.

Combine

Combining the frontend and backend was a massive task. Implementing functionality took the whole team a day plus time for sorting out errors.

- +
+

Display

+

To display the cards we had to dynamically create each element and systemeatically append each element to the document making sure each element had the correct class and id.
+ We created a function that would accept any amount of data and automatically display it onto the page.

+ +

Post

+

For posting an entry to the website we had to use the fetch method "POST" with all the information to the API which would then be posted onto the website.

+ +

Commenting

+

For commenting on an entry there had to be a form that would be read and automatically used to update the data that it correlated to.
+ The updating required thr method of "PUT" with all the original data and the updated data.
+ The updated comment would then be automatically posted but the website only shows the top three comments.

+ + +

Emoji

+

For the emoji reactions the buttons needed to be linked to the data that everytime you clicked on the emoji it would increase the count of the corresponding emoji in the data.
+ Like the commenting it used the method "PUT" with teh original data.

+ +

Wins and Challenges

Wins

- +

> We have an interacting website

+

> You can post on the website which automatically shows the most recent posts at the top

+

> You can add a gif and a category to the post

+

> You can filter for certain categories

+

> You can comment on the posts and only the top three show as to not clutter the page

+

> You can react to the posts using emojis which has a count so you can see the support

+

> We have an interactive random quote that can inspire our clientele

+

> We have type.js that makes the homepage and preventers page more appealing and interesting

+

> There is a character limit for the posts that also have a little count to show how many more characters can be posted

+

> There is a filter on both post and comments to try and improve the constructive and supportive enviroment we are going for

+

Challenges

- +

> Thinking of a unique layout (style) for the website that would suit the target audience

+

> Combining the code for the frontend and backend of the website

+

> Too much code written on one JS file

+

> Difficult readability

+

> Causing problems with navigating tags

+

future features

- +

> Adding a user system: allowing users to create accounts to log their own posts

+

> Implementing a delete functionality to allow users to delete their own posts

+

> Most recent post placed at the top of the posts page

+

> More filters for ordering posts i.e: by most liked, alphabetical order, most of a emoji type

+

> Making a page to view a post in its entirety when clicking on the post, to view all comments

+

Licence

MIT licence

+ +

Created by: Josh, Sheena, Adam, Mizna [2022]

@@ -336,11 +283,12 @@

Licence

dots.style.display = "inline"; btnText.innerHTML = "Read more"; moreText.style.display = "none"; + } else { dots.style.display = "none"; btnText.innerHTML = "Read less"; moreText.style.display = "inline"; - moreText.classList.add("addingtextclass"); + } } @@ -350,8 +298,11 @@

Licence

var x = document.getElementById("myDIV"); if (x.style.display === "none") { x.style.display = "block"; + x.classList.add("addingtextclass"); } else { x.style.display = "none"; + x.classList.add("addingtextclass"); + } } diff --git a/client/styles/navbar.css b/client/styles/navbar.css index 18a56b9..812f2da 100644 --- a/client/styles/navbar.css +++ b/client/styles/navbar.css @@ -81,16 +81,20 @@ body{ text-align: center; align-items: center; transition: height 0.35s ease, padding 0.35s ease; - + justify-content: center; } li { align-items: center; - display: inline-block; + display: inline-block; + align-items: center; + justify-content: center; + margin-left: 5%; } + li a, .dropbtn { display: inline-block; color: var(--offBlack); @@ -163,8 +167,12 @@ li a:hover, .dropdown:hover .dropbtn { border: none; } -@media (max-width: 566px) { - li a { - + +@media (min-width: 300px) { + #navbar{ + + } + li { + padding: 0; } } diff --git a/client/styles/preventers.css b/client/styles/preventers.css index 3bae1f5..abc4794 100644 --- a/client/styles/preventers.css +++ b/client/styles/preventers.css @@ -1,4 +1,13 @@ - +:root { + --darkerRed: #C81D25; + --MaxBlueGreen: #26b2bf; + --reactionRed:#ef233c; + --btnColor: #dc8c7d; + --topbarRed: #ce0000; + --offBlack: #212427; + --lightSlateGray:#798f9d; + --weirdyellow: rgb(196, 186, 0); + } body { width: 100%; color: white; @@ -19,11 +28,11 @@ body { width: 100vw; padding: 50px 0; text-align: center; - background-color: white; - margin-top: 20px; + /* background-color: white; */ + /* margin-top: 10px; */ width: 100%; /* aspect-ratio: 100 / 29; */ - color: black; + color: white; } @@ -92,22 +101,46 @@ body { z-index: 1; border-radius: 10px; box-shadow: rgba(0, 0, 0, 0.07) 0px 1px 1px, rgba(0, 0, 0, 0.07) 0px 2px 2px, rgba(0, 0, 0, 0.07) 0px 4px 4px, rgba(0, 0, 0, 0.07) 0px 8px 8px, rgba(0, 0, 0, 0.07) 0px 16px 16px; - margin-bottom: 5%; + margin-bottom: 1%; } h1{ - color: var(--reactionRed); + /* color: var(--reactionRed); + background-color: aliceblue; */ + color: white; + text-shadow: 2px 2px #060606; +} +h2{ + text-shadow: 2px 2px #080808; +} + +h3{ + color: var(--weirdyellow); + text-shadow: 2px 2px #080808; } +h4{ + color: var(--MaxBlueGreen); + text-shadow: 2px 2px #080808; + +} #myDIV { margin: auto; width: 80%; align-items: center; align-content: center; - -} + list-style: georgian inside url('../img/cursor.png'); + list-style: inside;} +#myDiv ul li p{ + padding: 0; + margin-left: 0; + text-align: center; + margin: 0; + list-style: georgian inside url('../img/cursor.png'); + list-style: inside; +} /* .lead { width: 50%; @@ -115,9 +148,8 @@ h1{ } */ .addingtextclass{ - width: 50%; + /* color:mediumorchid; + background-color: black; */ + color: white; } -h1{ - color: white; -} \ No newline at end of file diff --git a/server/data.js b/server/data.js index 8a49982..6c09672 100644 --- a/server/data.js +++ b/server/data.js @@ -48,7 +48,7 @@ userEntries = [ id: 4, gif: "https://media0.giphy.com/media/l4EoLIkCuS3zMjisE/giphy.gif", category: "family", - entry: "my mum keeps singing out loud throughout the day. it sounds like cats are fucking screaming", + entry: "my mum keeps singing out loud throughout the day. it sounds like cats are screaming", emoji: { happy: 0, amused: 0,