-
Notifications
You must be signed in to change notification settings - Fork 4
profile page #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
profile page #178
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2e532f5
basic layout for profile page
ananyayaya129 6b6498a
profile component
ananyayaya129 c5d5710
fixed alt text
ananyayaya129 2ad5d23
merge conflict
ananyayaya129 21cb76a
merge conflict
ananyayaya129 fcaf75a
profile page for other users implemented
ananyayaya129 56425f5
fix: profile pages and logics
grv-saini-20 e3d92f6
fixed all the pages of profile
grv-saini-20 c8d7abf
fixed all the pages of profile
grv-saini-20 bf7e8c5
fix: format
grv-saini-20 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
platforms/metagram/src/routes/(protected)/profile/+page.svelte
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,53 @@ | ||
<script lang="ts"> | ||
import { goto } from '$app/navigation'; | ||
import { Button } from '$lib/ui'; | ||
let userImage: string = $state('https://picsum.photos/200/300'); | ||
let username: string = $state('_.ananyayaya_.'); | ||
let user: string = $state('Ananya Rana'); | ||
let followers: number = $state(24); | ||
let following: number = $state(56); | ||
let totalPosts: number = $state(10); | ||
let userBio: string = $state( | ||
'Friendly nerd who likes to not meet people as much as possible. Leave the earth for me yall.' | ||
); | ||
let posts: string[] = $state([ | ||
'https://picsum.photos/id/1011/200/200', | ||
'https://picsum.photos/id/1012/200/200', | ||
'https://picsum.photos/id/1013/200/200', | ||
'https://picsum.photos/id/1014/200/200', | ||
'https://picsum.photos/id/1015/200/200', | ||
'https://picsum.photos/id/1016/200/200' | ||
]); | ||
</script> | ||
|
||
<div class="bg-grey flex h-full w-full flex-col items-center gap-4 pt-[10%]"> | ||
<div class="flex flex-col items-center gap-4 p-4"> | ||
<img class="size-28 rounded-full" src={userImage} alt="" /> | ||
ananyayaya129 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
<div class="flex flex-col items-center gap-2"> | ||
<p class="font-semibold">{username}</p> | ||
<p class="text-black-600">{user}</p> | ||
</div> | ||
<div class="text-black-600 flex gap-4"> | ||
<p><span class="font-semibold text-black">{followers}</span> followers</p> | ||
<p><span class="font-semibold text-black">{following}</span> following</p> | ||
<p><span class="font-semibold text-black">{totalPosts}</span> posts</p> | ||
</div> | ||
<div class="text-black-600 px-12 text-center text-sm"> | ||
{userBio} | ||
</div> | ||
<div class="flex w-full gap-3"> | ||
<div class="w-full"> | ||
<Button size="sm" class="w-full">Edit Profile</Button> | ||
</div> | ||
<div class="w-full"> | ||
<Button size="sm" callback={() => goto(`/settings`)}>Settings</Button> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="grid grid-cols-3 gap-[2px]"> | ||
{#each posts as post} | ||
<img class="aspect-square rounded-md object-cover" src={post} alt="user post" /> | ||
{/each} | ||
</div> | ||
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.