From 8ed12bf7bc2051d3cb6ca97188a5e25d692dc707 Mon Sep 17 00:00:00 2001 From: ktyl Date: Sat, 13 Jul 2024 01:52:23 +0100 Subject: [PATCH] chore: remove user profile --- index.html | 5 ----- main.js | 39 --------------------------------------- styles.css | 21 --------------------- 3 files changed, 65 deletions(-) diff --git a/index.html b/index.html index 766c627..7bf17cd 100644 --- a/index.html +++ b/index.html @@ -4,11 +4,6 @@ -
-

-

-
-
diff --git a/main.js b/main.js index d6e81b8..9450a11 100644 --- a/main.js +++ b/main.js @@ -95,45 +95,6 @@ class Post { } -var userProfile = null; -class UserProfile { - constructor(username) { - this.username = username; - this.bio = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."; - - this.elem = document.getElementById("profile"); - this.nameElem = document.getElementById("profile-name"); - this.descElem = document.getElementById("profile-description"); - } - - show() { - this.nameElem.innerHTML = this.username; - this.descElem.innerHTML = this.bio; - this.elem.style.visibility = "visible"; - } - - hide() { - this.descElem.innerHTML = ""; - this.nameElem.innerHTML = ""; - this.elem.style.visibility = "hidden"; - } -} - - -function updateUserProfile(username) { - if (userProfile != null) { - userProfile.hide(); - userProfile = null; - } - - if (!username) - return; - - userProfile = new UserProfile(username); - userProfile.show(); -} - - function createPost() { const post = new Post(); postContainer.appendChild(post.getElement()); diff --git a/styles.css b/styles.css index 73fff75..354f076 100644 --- a/styles.css +++ b/styles.css @@ -1,26 +1,5 @@ - -/* TODO: deal with visibility when screen cuts off left side */ -/* TODO: how do we show the profile on mobile */ -#profile { - /* profile starts hidden */ - visibility: hidden; - position: fixed; - right: calc(50% + 300px + 8px); - left: auto; - top: 16px; - height: 600px; - width: 100%; - max-width: 300px; - - background-color: red; -} - @media only screen and (min-width: 800px) { /* For bigger than phones */ - #profile { - visibility: visible; - } - #post-container { max-width: 800px; }