-
Profile Setting
+ <>
+
Profile Setting
+ >
);
}
diff --git a/src/global.d.ts b/src/global.d.ts
index f5126ea..14cd2af 100644
--- a/src/global.d.ts
+++ b/src/global.d.ts
@@ -1,6 +1,7 @@
import { Database as DB } from "./lib/supabase.type";
type Post = DB["public"]["Tables"]["Blogs"]["Row"];
+type MicroBlog = DB["public"]["Tables"]["microblog"]["Row"];
declare global {
type Database = DB;
@@ -12,4 +13,10 @@ declare global {
user_liked_post?: boolean;
likes?: number | null;
};
+
+ type microBlogWithAuthor = MicroBlog & {
+ author: Profile | null;
+ user_liked_micro_blog?: boolean;
+ likes?: number | null;
+ }
}
diff --git a/src/styles/navbar.css b/src/styles/Banner/navbar.css
similarity index 84%
rename from src/styles/navbar.css
rename to src/styles/Banner/navbar.css
index 8d27b22..c8721c3 100644
--- a/src/styles/navbar.css
+++ b/src/styles/Banner/navbar.css
@@ -1,5 +1,5 @@
.navbar {
- background-color: var(--primary-200);
+ background-color: var(--secondary);
padding: 6px 2rem;
display: flex;
justify-content: space-around;
@@ -12,7 +12,7 @@ form.search-bar {
border: var(--gray-500) solid 1px;
border-radius: 2rem;
outline: none;
- box-shadow: 0px 4px 5px var(--black-25);
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.19);
}
.search-field {
@@ -35,16 +35,21 @@ form.search-bar {
}
.dropdown-menu {
+ display: none;
background-color: #fff;
margin: 1rem 0;
padding: 1rem;
position: absolute;
- right: 5rem;
- opacity: 0;
+ right: 1rem;
+ top: 2.5rem;
text-align: center;
width: 15rem;
border-radius: 10px;
- box-shadow: 0px 4px 5px var(--black-25);
+ box-shadow: 0px 4px 5px var(--neutral);
+}
+
+.dropdown:hover .dropdown-menu {
+ display: block;
}
.dropdown-menu > a > li {
@@ -54,10 +59,6 @@ form.search-bar {
transition: all 1s;
}
-.dropdown:hover .dropdown-menu {
- opacity: 1;
-}
-
.dropdown-menu > a > li:hover {
background-color: var(--neural-100);
}
diff --git a/src/styles/Banner/sidebar.css b/src/styles/Banner/sidebar.css
new file mode 100644
index 0000000..16115fc
--- /dev/null
+++ b/src/styles/Banner/sidebar.css
@@ -0,0 +1,26 @@
+.sidebar {
+ display: grid;
+ row-gap: 22px;
+ background-color: var(--secondary);
+ color: var(--neutral);
+ padding: 15px 33px;
+ border-radius: 0px 10px 10px 0px;
+ height: 61vh; /* this just works */
+ width: var(--sidebar-width);
+ position: fixed;
+ z-index: 1;
+}
+
+.nav-options {
+ display: grid;
+ row-gap: 8px;
+}
+
+.option-selected {
+ color: var(--call-to-action);
+ font-weight: var(--lg-bold);
+}
+
+.nav-option:hover {
+ cursor: pointer;
+}
\ No newline at end of file
diff --git a/src/styles/HomePage/homepage.css b/src/styles/HomePage/homepage.css
new file mode 100644
index 0000000..4ee1d76
--- /dev/null
+++ b/src/styles/HomePage/homepage.css
@@ -0,0 +1,8 @@
+.homepage-wrapper {
+ display: flex;
+}
+
+.header {
+ font-weight: var(--lg-bold);
+ font-size: var(--lg-text);
+}
\ No newline at end of file
diff --git a/src/styles/HomePage/postStyle.css b/src/styles/HomePage/postStyle.css
new file mode 100644
index 0000000..cfffef3
--- /dev/null
+++ b/src/styles/HomePage/postStyle.css
@@ -0,0 +1,30 @@
+.posts {
+ width: 50%;
+}
+
+.posts-wrapper {
+ display: flex;
+ width: 100%;
+ justify-content: center;
+}
+
+.post-container {
+ background-color: var(--secondary);
+ border-radius: 20px;
+ margin-bottom: 20px;
+ padding: 10px;
+}
+
+.post-author {
+ display: flex;
+ align-items: center;
+ font-size: var(--sx-text);
+ font-weight: var(--light-bold);
+ margin-bottom: 10px;
+}
+
+.post-title {
+ font-size: var(--md-text);
+ font-weight: var(--lg-bold);
+ margin-bottom: 20px;
+}
\ No newline at end of file
diff --git a/src/styles/newPostPage.css b/src/styles/NewPostPage/newPostPage.css
similarity index 56%
rename from src/styles/newPostPage.css
rename to src/styles/NewPostPage/newPostPage.css
index c8073cf..ca8f402 100644
--- a/src/styles/newPostPage.css
+++ b/src/styles/NewPostPage/newPostPage.css
@@ -1,14 +1,10 @@
.post-form {
- --neural-200-20: rgba(215, 215, 218, 0.2);
-
- background-color: var(--neural-200-20);
- border: var(--neural-200) solid 1px;
- border-radius: var(--radius-md);
+ background-color: var(--secondary);
+ border-radius: 10px;
}
.meta-data {
background: transparent;
- /* border: red solid 1px; */
width: 100%;
outline: none;
}
@@ -31,16 +27,17 @@
}
.post-btn {
- background-color: var(--primary-400);
- color: var(--primary-600);
+ background-color: var(--call-to-action);
+ color: var(--primary);
font-size: 2rem;
padding: 3px 22px;
margin-top: 2rem;
- border-radius: var(--radius-md);
+ border-radius: 10px;
transition: all 0.5s;
}
.post-btn:hover {
- background-color: var(--primary-600);
- color: var(--primary-400);
+ --call-to-action-20: rgba(0, 139, 238, 0.5);
+
+ background-color: var(--call-to-action-20);
}
diff --git a/src/styles/PostPage.css b/src/styles/PostPage/PostPage.css
similarity index 84%
rename from src/styles/PostPage.css
rename to src/styles/PostPage/PostPage.css
index 95557e2..c1f2f4c 100644
--- a/src/styles/PostPage.css
+++ b/src/styles/PostPage/PostPage.css
@@ -1,15 +1,6 @@
.post {
- border: var(--neural-200) solid 1px;
-}
-
-.post-divider {
- border-bottom: 1px solid var(--neural-200);
-}
-
-.author-info {
- border: var(--neural-200) solid 1px;
- height: fit-content;
- padding: 15px 20px;
+ margin-left: var(--sidebar-width);
+ width: 50%; /* this prevents junky bugs with the display */
}
/* Post content markdown styles */
@@ -30,47 +21,47 @@ h4,
h5,
h6,
p {
- margin: 16px;
+ margin: 16px 0 16px 0;
}
.post-content > h1 {
- --font-size: 2.25rem;
+ --font-size: 1.5rem;
font-size: var(--font-size);
line-height: calc(var(--font-size) * 1.5);
}
.post-content > h2 {
- --font-size: 1.875rem;
+ --font-size: 1.25rem;
font-size: var(--font-size);
line-height: calc(var(--font-size) * 1.5);
}
.post-content > h3 {
- --font-size: 1.5rem;
+ --font-size: 1.125rem;
font-size: var(--font-size);
line-height: calc(var(--font-size) * 1.5);
}
.post-content > h4 {
- --font-size: 1.25rem;
+ --font-size: 1rem;
font-size: var(--font-size);
line-height: calc(var(--font-size) * 1.5);
}
.post-content > h5 {
- --font-size: 1rem;
+ --font-size: 0.875rem;
font-size: var(--font-size);
line-height: calc(var(--font-size) * 1.5);
}
.post-content > h6 {
- --font-size: 0.875rem;
+ --font-size: 0.75rem;
font-size: var(--font-size);
line-height: calc(var(--font-size) * 1.5);
diff --git a/src/styles/PostPage/commentSection.css b/src/styles/PostPage/commentSection.css
new file mode 100644
index 0000000..aa8f646
--- /dev/null
+++ b/src/styles/PostPage/commentSection.css
@@ -0,0 +1,6 @@
+.comment-btn {
+ background-color: var(--call-to-action);
+ color: var(--primary);
+ padding: 10px 15px;
+ border-radius: 2rem;
+}
\ No newline at end of file
diff --git a/src/styles/ProfilePage/profilePage.css b/src/styles/ProfilePage/profilePage.css
new file mode 100644
index 0000000..4f87ae0
--- /dev/null
+++ b/src/styles/ProfilePage/profilePage.css
@@ -0,0 +1,52 @@
+.profile-info {
+ display: flex;
+ border-bottom: 1px solid var(--neutral);
+ padding-bottom: 1rem;
+}
+
+.user-post {
+ border: var(--primary-300) solid 2px;
+ padding: 1.25rem 1.2rem;
+ margin-bottom: 1rem;
+ border-radius: 1rem;
+ transition: all 1s;
+}
+
+.user-post:hover {
+ background-color: white;
+}
+
+.avatar-preview {
+ width: 192px;
+ height: 192px;
+ position: relative;
+ border-radius: 100%;
+ border: 1px solid var(--neural);
+ box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
+}
+
+.avatar-wrapper {
+ width: 100%;
+ height: 100%;
+ border-radius: 100%;
+ background-size: cover;
+ background-repeat: no-repeat;
+ background-position: center;
+}
+
+.follow-btn {
+ color: var(--call-to-action);
+}
+
+.follower-count {
+ color: var(--neural);
+ font-size: 0.85rem;
+ font-weight: 700;
+}
+
+.username-details {
+ font-size: 1.5rem;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
\ No newline at end of file
diff --git a/src/styles/auth/auth.css b/src/styles/auth/auth.css
new file mode 100644
index 0000000..9cbdce8
--- /dev/null
+++ b/src/styles/auth/auth.css
@@ -0,0 +1,68 @@
+.main-text {
+ color: var(--header);
+ font-weight: var(--lg-bold);
+}
+
+.default-text {
+ color: var(--neutral);
+ font-size: var(--xl-text);
+ font-weight: var(--md-bold);
+}
+
+.form-holder {
+ color: var(--neutral);
+ background-color: var(--secondary);
+ border-radius: 15px;
+ padding: 32px 34px;
+ width: 100%
+}
+
+.form-inputs {
+ font-size: var(--sx-text);
+ margin-bottom: 21px;
+}
+
+.warning-text {
+ color: var(--warning);
+}
+
+.input {
+ background-color: var(--primary);
+ padding: 5px 10px 5px 10px;
+ margin-top: 6px;
+ outline: none;
+ border: white solid 2px;
+ border-radius: 15px;
+ transition: all 0.5s;
+}
+
+.auth-btn {
+ background: var(--call-to-action);
+ color: var(--secondary);
+ padding: 9px 30px;
+ border-radius: 15px;
+ margin-top: 20px;
+ font-size: 20px;
+ transition: all 0.2s;
+}
+
+.auth-btn:hover {
+ transform: scale(1.2);
+}
+
+.separator {
+ background-image: linear-gradient(
+ to right,
+ var(--call-to-action),
+ var(--header)
+ );
+}
+
+.link-text {
+ color: var(--neutral);
+ transition: all 1s;
+}
+
+.link-text:hover {
+ border-bottom: 1px solid var(--neutral);
+}
\ No newline at end of file
diff --git a/src/styles/commentSection.css b/src/styles/commentSection.css
deleted file mode 100644
index 7a8f72c..0000000
--- a/src/styles/commentSection.css
+++ /dev/null
@@ -1,9 +0,0 @@
-.comment-btn {
- background-color: var(--blue-500);
- color: var(--neural-100);
- padding: 10px 15px;
-}
-
-.comment-btn:hover {
- background-color: var(--blue-700);
-}
diff --git a/src/styles/form.css b/src/styles/form.css
deleted file mode 100644
index f7249ce..0000000
--- a/src/styles/form.css
+++ /dev/null
@@ -1,49 +0,0 @@
-.form-wrapper {
- display: flex;
- flex-direction: column;
- flex-wrap: wrap;
- height: 100vh;
- justify-content: center;
- align-content: center;
-}
-
-.form {
- border: var(--blue-500) solid 2px;
- border-radius: var(--radius-md);
- padding: 20px;
- margin-top: 10px;
-}
-
-.auth-btn {
- border: var(--primary-400) solid 3px;
- color: var(--primary-400);
- padding: 5px 10px 5px 10px;
- border-radius: var(--radius-md);
- margin-top: 20px;
- transition: all 0.5s;
- transform: scale(1.09);
-}
-
-.auth-btn:hover {
- background-color: var(--primary-400);
- color: var(--primary-600);
-}
-
-.separator {
- background-image: linear-gradient(
- to right,
- var(--blue-500),
- var(--green-500)
- );
-}
-
-.link-text {
- color: var(--blue-500);
- border-bottom: 1px solid var(--blue-500);
- transition: all 1s;
-}
-
-.link-text:hover {
- color: var(--neural-400);
- border-color: var(--neural-400);
-}
diff --git a/src/styles/global.css b/src/styles/global.css
index 08761c5..2317b8f 100644
--- a/src/styles/global.css
+++ b/src/styles/global.css
@@ -2,104 +2,27 @@
@tailwind components;
@tailwind utilities;
-/* font from google fonts */
-@import url("https://fonts.googleapis.com/css2?family=Anonymous+Pro&family=Inter:wght@100;400&display=swap");
-
:root {
- /* primary color */
- --primary-100: #E8F6FF;
- --primary-200: #C3E8FF;
- --primary-300: #80CEFF;
- --primary-400: #5e7ef2;
- --primary-500: #365eeb;
- --primary-600: #1f43c4;
-
- /* Neural colors */
- --neural-white: #FFFFFF;
- --neural-100: #EAEAEA;
- --neural-200: #d6d6d9;
- --neural-300: #a8a8ad;
- --neural-400: #868690;
- --neural-500: #585864;
- --neural-600: #575763;
- --neural-700: #454553;
- --neural-800: #414151;
- --neural-900: #2f2f3e;
-
- /* green color */
- --green-300: #9cff94;
- --green-400: #6af25e;
- --green-500: #44eb36;
- --green-700: #19a30d;
- --green-900: #064d00;
-
- /* blue color */
- --blue-500: #37a0eb;
- --blue-700: #0d64a3;
- --blue-800: #064c7f;
- --blue-900: #002c4d;
+ --primary: #FFFFFF;
+ --secondary: #F5F5F5;
+ --neutral: #595959;
+ --call-to-action: #0089EE;
+ --header: #24FF69;
+ --warning: #ff5050;
- /* red color */
- --red-500: #eb3636;
+ --lg-bold: 700;
+ --md-bold: 400;
+ --light-bold: 100;
+ --xl-text: 40px;
+ --lg-text: 35px;
+ --md-text: 20px;
+ --sx-text: 15px;
- /* border radius */
- --radius-sm: 5px;
- --radius-md: 10px;
- --radius-lg: 23px;
- --radius-full: 100%;
-
- /* alpha colors */
- --black-25: rgba(0, 0, 0, 0.25);
+ /* Sidebar Variables */
+ --sidebar-width: 16rem;
}
/* The default background color for the app */
body {
- background-color: var(--primary-100);
-}
-
-/* common styles */
-
-.text-red-color {
- color: var(--red-500);
-}
-
-.text-neural-300 {
- color: var(--neural-300);
-}
-
-.font-anonymous {
- font-family: "Anonymous Pro", monospace;
-}
-
-.font-inter {
- font-family: "Inter", sans-serif;
-}
-
-.input {
- background-color: var(--green-700);
- color: white;
- padding: 5px 10px 5px 10px;
- outline: none;
- border: white solid 2px;
- border-radius: var(--radius-sm);
- transition: all 0.5s;
-}
-
-.input:hover {
- background-color: var(--green-900);
-}
-
-.input:focus {
- background-color: var(--green-900);
-}
-
-.text-gray-dark {
- color: var(--dark-gray-color);
-}
-
-.info-badge {
- border: var(--green-400) solid 3px;
- color: var(--green-400);
- padding: 5px 10px;
- border-radius: 2rem;
-}
+ background-color: var(--primary);
+}
\ No newline at end of file
diff --git a/src/styles/postStyle.css b/src/styles/postStyle.css
deleted file mode 100644
index 8bec247..0000000
--- a/src/styles/postStyle.css
+++ /dev/null
@@ -1,50 +0,0 @@
-.post-wrapper {
- border-radius: 1rem;
- padding: 2rem 1rem;
- margin: 2rem 0;
- transition: all 0.5s;
-}
-
-.post-wrapper:hover {
- background-color: white;
-}
-
-.post-container {
- border-top: 1px solid var(--primary-300);
-}
-
-.post-title {
- font-family: "Anonymous Pro", monospace;
- font-weight: bold;
- font-size: 2rem;
- margin-bottom: 2rem;
-}
-
-.post-author {
- color: var(--primary-300);
- font-family: "Inter", sans-serif;
- font-weight: 100;
- margin-bottom: 2rem;
-}
-
-.post-content {
- color: gray;
-}
-
-.post-type-changer {
- color: var(--neural-300);
- border-radius: 2rem;
- padding: 10px 1rem;
- cursor: pointer;
- margin: 0 0.5rem;
- font-size: medium;
-}
-
-.post-type-changer:hover {
- background-color: white;
-}
-
-.post-type-changer-selected {
- background-color: white;
- font-weight: 700;
-}
diff --git a/src/styles/profilePage.css b/src/styles/profilePage.css
deleted file mode 100644
index 9c9c6b9..0000000
--- a/src/styles/profilePage.css
+++ /dev/null
@@ -1,72 +0,0 @@
-.profile-info {
- display: flex;
-}
-
-@media (min-width: 768px) {
- .profile-info {
- justify-content: center;
- align-items: center;
- border-right: var(--primary-300) solid 3px;
- padding: 0;
- }
-}
-
-@media (max-width: 768px) {
- .profile-info {
- justify-content: space-between;
- align-items: center;
- border-bottom: var(--primary-300) solid 3px;
- padding-top: 1.25rem;
- padding-bottom: 1.25rem;
- padding-right: 10px;
- padding-left: 10px;
- }
-}
-
-.user-post {
- border: var(--primary-300) solid 2px;
- padding: 1.25rem 1.2rem;
- margin-bottom: 1rem;
- border-radius: 1rem;
- transition: all 1s;
-}
-
-.user-post:hover {
- background-color: white;
-}
-
-.avatar-preview {
- width: 192px;
- height: 192px;
- position: relative;
- border-radius: var(--radius-full);
- border: 1px solid var(--neural-400);
- box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
-}
-
-.avatar-wrapper {
- width: 100%;
- height: 100%;
- border-radius: var(--radius-full);
- background-size: cover;
- background-repeat: no-repeat;
- background-position: center;
-}
-
-.follow-btn {
- background-color: var(--primary-300);
- width: 100%;
- padding: 0.5rem 2rem;
- border-radius: 1rem;
-}
-
-.follow-btn:hover {
- background-color: var(--blue-700);
- color: var(--neural-100);
-}
-
-.follower-count {
- color: var(--neural-400);
- font-size: 0.85rem;
- font-weight: 700;
-}
\ No newline at end of file
diff --git a/src/styles/searchResultPage.css b/src/styles/searchResultPage.css
index 2cc80d5..3aa84b6 100644
--- a/src/styles/searchResultPage.css
+++ b/src/styles/searchResultPage.css
@@ -1,4 +1,5 @@
.post-wrapper {
+ background-color: var(--secondary);
border-radius: 1rem;
padding: 2rem 1rem;
margin: 2rem 0;
@@ -6,12 +7,7 @@
}
.post-wrapper:hover {
- background-color: white;
-}
-
-.post-container {
- border-top: 1px solid var(--primary-300);
- width: 50vw;
+ background-color: var(--primary);
}
.post-title {
@@ -22,10 +18,16 @@
}
.post-author {
- color: var(--primary-300);
+ color: var(--call-to-action);
font-family: "Inter", sans-serif;
- font-weight: 100;
+ font-weight: 200;
margin-bottom: 2rem;
+ width: fit-content;
+ transition: all 0.5s;
+}
+
+.post-author:hover {
+ font-weight: 500;
}
.post-content {
diff --git a/src/styles/settings.css b/src/styles/settings.css
index 5a3b702..138dc73 100644
--- a/src/styles/settings.css
+++ b/src/styles/settings.css
@@ -1,20 +1,22 @@
-.profile-setting > h1 {
- border-bottom: var(--light-gray-color) 1px solid;
- padding-bottom: 10px;
+.setting-title {
+ color: var(--header);
+ font-size: 1.8rem;
}
-.update-profile {
- background-color: var(--green-700);
- color: white;
- padding: 5px 10px 5px 10px;
- border: white solid 2px;
- border-radius: var(--radius-sm);
+.input-field {
+ outline: none;
+ border: var(--primary) 3px solid;
+ border-radius: 2rem;
+ padding: 6px 15px;
+ transition: all 100ms;
+ width: 100%;
}
-.input-field {
- background-color: var(--green-700);
- color: white;
- padding: 5px 10px 5px 10px;
- border: white solid 2px;
- border-radius: var(--radius-sm);
+.input-field:focus {
+ border: rgba(89, 89, 89, 0.842) 3px solid;
}
+
+.description-field {
+ outline: none;
+ width: 90%;
+}
\ No newline at end of file