Skip to content
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

fix: sidebar responsiveness #916

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,9 @@ html {
::-webkit-resizer {
background-color: #666;
}

@media (min-width: 980px) {
#main-searchbar {
display: none;
}
}
11 changes: 11 additions & 0 deletions src/components/Common/SocialSidebar/SidebarElements.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ export const SidebarContainer = styled.div`
color: #fff;
box-shadow: 0 4px 8px rgb(0 0 0 / 10%);
border-radius: 10px;
@media screen and (width <= 1280px) {
min-width: 80%;
}
@media screen and (max-width <= 1080px) {
width: 96%;
}
@media screen and (width <= 980px) {
display: none;
}
`;

export const FilterButton = styled.button`
Expand All @@ -35,3 +44,5 @@ export const FilterButton = styled.button`
border-bottom-right-radius: 7px;
}
`;


16 changes: 15 additions & 1 deletion src/components/Feeds/Feeds.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ import { getAllUserDetails, userDetailReset } from "src/features/userDetail/user
import LoadingSpinner from "src/components/Other/MixComponents/Spinner/LoadingSpinner";
import UnderMaintenance from "src/components/Other/UnderMaintenance/UnderMaintenance";
import apiStatus from "src/features/apiStatus";
import { LeftContainer } from "src/components/Explore/ExploreElements";
import { LeftContainer, SearchContainer } from "src/components/Explore/ExploreElements";
import { getFollowData, reset } from "src/features/userDetail/follow/followSlice";
import Sidebar from "src/components/Common/SocialSidebar/Sidebar";
import SearchInputBox from "src/components/Common/SearchInputBox";


const Feeds = () => {
const dispatch = useDispatch();
Expand Down Expand Up @@ -79,6 +81,18 @@ const Feeds = () => {
token={user?.token}
/>
</ModifyFeedContainer>
<div id="main-searchbar">
<SearchContainer>
{/* <input placeholder="search" /> */}
<SearchInputBox
placeholder="Search by name"
value={searchTerm}
onChange={handleSearchTermChange}
setValue={setSearchTerm}

/>
</SearchContainer>
</div>
<FeedPosts
searchTerm={searchTerm}
feeds={combinedData}
Expand Down
5 changes: 5 additions & 0 deletions src/components/Feeds/FeedsElements.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ export const FeedsContainer = styled.div`
display: flex;
flex-direction: row;
justify-content: space-around;

@media screen and (width <= 1160px) {
gap: 1%;
}

`;

export const MiddleSection = styled.div`
Expand Down
5 changes: 5 additions & 0 deletions src/components/Header/Navbar/NavbarElements.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ export const RouterNavCreateButtonLink = styled(Link)`
font-size: 12px;
}

@media screen and (width <= 1280px) {
min-width: 10px;
font-size: 14px;
}

/* @media screen and (max-width: 1150px) {
display: none;
}
Expand Down