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

index page ui improvementation #121

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
7 changes: 2 additions & 5 deletions src/components/mobile/toolbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@
}

.mobile-toolbar-logo {
margin-top: auto;
margin-bottom: auto;
margin: auto 20px;
min-width: 50px;
}

.mobile-toolbar-sidebar-toggle {
margin-top: auto;
margin-bottom: auto;
margin-left: auto;
margin: auto 20px;
font-size: 35px;
min-width: 50px;
color: #ffa62b;
Expand Down
3 changes: 1 addition & 2 deletions src/components/notification.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { Message } from "semantic-ui-react"

const Notification = () => {
const style = {
width: "100%",
margin: "1rem",
width: "fit-content",
}

return (
Expand Down
76 changes: 48 additions & 28 deletions src/components/org-card.css
Original file line number Diff line number Diff line change
@@ -1,92 +1,112 @@
.org-card-container {
z-index: 100;
width: 100%;
border: 1px solid rgb(230, 236, 241);
padding: 0 1rem;
height: 100%;
cursor: pointer;
border-radius: 10px;
background-color: var(--background);
transition: all 1ms ease-in;
border: 1px solid var(--background);
filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1))
drop-shadow(0 1px 1px rgb(0 0 0 / 0.06));
color: rgba(37, 37, 37, 0.794);
}

.org-card-container:hover {
box-shadow: 0 4.5px 5.5px -2.5px rgba(0, 0, 0, 0.2),
0 9px 14px 1px rgba(0, 0, 0, 0.14), 0 3.5px 17px 3px rgba(0, 0, 0, 0.12);
border: 1px solid var(--secondary-foreground);
}

.org-card-logo-container {
height: 128px;
padding: 5% 10%;
border-radius: 10px;
margin: 20px 0;
}

.org-card-logo {
margin: auto;
background-size: contain;
background-position: center center;
background-repeat: no-repeat;
height: 100%;
width: 100%;
height: 80%;
width: 80%;
}

.org-card-name-container {
justify-content: center;
text-align: center;
padding-top: 2%;
padding-left: 10%;
padding-right: 10%;
font-size: 16px;
padding: 2% 5%;
letter-spacing: 1px;
font-size: 1.2em;
font-family: "Galano Grotesque Alt Medium";
}

.org-card-description-container {
padding: 2% 3%;
padding: 3%;
text-align: center;
font-family: "Galano Grotesque Alt Light";
}

.org-card-category-container {
border-radius: 10px;
text-align: center;
padding: 2% 2%;
background-color: var(--primary);
color: #29531b;
padding: 2%;
margin: 10px 0;

filter: drop-shadow(0 0 1px rgb(0 0 0 / 0.3));
}

.org-card-category-container span {
display: inline-block;
width: inherit;
padding: 3px;
background-color: #db6400;
color: #ffffff;
border-radius: 5px;
font-family: "Galano Grotesque Alt Medium";
}

.org-card-years-container {
padding: 2% 2%;
padding: 5px 2px;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
flex: 0 0 1;
gap: 7px;
}

.org-card-year {
border-radius: 5px;
display: inline-block;
margin: 3px;
padding: 3px;
background-color: #16697a;
color: white;
border-radius: 2px;
padding: 5px 10px;
color: rgba(37, 37, 37, 0.6);
border: 1px solid var(--secondary-foreground);
font-weight: 200;
font-family: "Galano Grotesque Alt Medium";
}

.org-card-technologies-container {
padding: 2% 2%;
padding: 10px 0;
display: flex;
flex-wrap: wrap;
justify-content: center;
font-family: "Galano Grotesque Alt Medium";
color: #29531bda;
align-items: center;
}

.org-card-technology {
display: inline-block;
margin: 3px;
padding: 3px;
border: 1px solid #db6400;
color: #db6400;
text-align: center;
border-radius: 2px;
font-family: "Galano Grotesque Alt Medium";
}

.org-card-technology-extra {
text-decoration: underline;
display: inline-block;
text-decoration: underline;
margin: 3px;
padding: 3px;
color: #db6400;
border-radius: 2px;
font-family: "Galano Grotesque Alt Medium";
}
1 change: 1 addition & 0 deletions src/components/org-card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const OrgCard = ({ data }) => {

const card = (
<div className="org-card-container">
<div className="blur"></div>
<div
className="org-card-logo-container"
style={{
Expand Down
4 changes: 3 additions & 1 deletion src/components/search.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.search-search * {
width: 90%;
width: 70%;
filter: drop-shadow(0 0 0.5px rgb(0 0 0 / 0.04))
drop-shadow(0 0 0.5px rgb(0 0 0 / 0.06));
}
13 changes: 8 additions & 5 deletions src/components/sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@
z-index: 20;
height: 100%;
position: fixed;
transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
transition-property: transform;
overflow: hidden;
background-color: #f5f7f9;
border-right: 1px solid rgb(230, 236, 241);
border-radius: 20px;
padding: 2rem;
}

.sidebar-div {
height: 100%;
width: 100%;
border-radius: inherit;
display: flex;
flex-direction: column;
background-color: white;
filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1))
drop-shadow(0 1px 1px rgb(0 0 0 / 0.06));
}

.sidebar-content {
Expand Down Expand Up @@ -44,7 +46,8 @@
.sidebar-description {
font-family: "Galano Grotesque Alt Medium";
font-size: 18px;
color: #ffa62b;
color: #db6400;
padding: 1rem 0;
}

.sidebar-footer {
Expand Down
15 changes: 11 additions & 4 deletions src/components/sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,26 @@ const getSidebarStyles = config => {

if (config.mode === "mobile") {
const mobileCss = {
width: "400px",
maxWidth: "70%",
position: "absolute",
left: "0",
right: "0",
top: "10px",
margin: "auto",
width: "50%",
minWidth: "270px",
height: "calc(100vh - 20px)",
padding: "0",
}

if (config.visible) {
return {
...mobileCss,
transform: "translateX(0%)",
display: "block",
}
} else {
return {
...mobileCss,
transform: "translateX(-100%)",
display: "none",
}
}
}
Expand Down
6 changes: 1 addition & 5 deletions src/layouts/desktop/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@
.desktop-layout-search {
position: fixed;
z-index: 10;
padding-top: 10px;
padding-bottom: 10px;
padding: 20px 0;
/* 75% because sidebar is 25% of the width. */
width: 75%;
background-color: #ffff;
border-bottom: 1px solid rgb(212, 218, 223);
box-shadow: rgba(116, 129, 141, 0.1) 0px 3px 8px 0px;
}
10 changes: 9 additions & 1 deletion src/layouts/layout.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
:root {
--background: rgba(255, 255, 255, 1);
--card: rgba(237, 237, 237, 1);
--primary: rgba(247, 247, 247, 0.9);
--primary-foreground: rgba(240, 240, 240, 1);
--secondary: rgba(127, 127, 127, 1);
--secondary-foreground: rgba(237, 237, 237, 1);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. Looks neat.

Copy link
Author

@akaashvaa akaashvaa Jul 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screencast.from.07-07-24.07.25.58.PM.IST.webm

Checkpoint

  • moved sidebar to the left of the screen along with animation
  • moved style attribute property to index.css

changes

  • GSOC Organization logo added
  • added a button for scroll to the top ( bottom right corner )
  • total no of result (style changed)
  • card styles chnaged
    • tried to put the technology container at the bottom

let me know if anything else i missed after then i will commit the changes.


i also want to add some feature :

  1. how about adding the style lint to orgainise the css baised on the order of their property or alphabetically
  2. apply lazy loading for performance
    if u agree then i happy to create an issue on this

body {
margin: 0px;
padding: 0px;
min-height: 100vh;
background-color: #fdfdfd;
background-color: var(--primary);
}

a {
Expand Down
14 changes: 13 additions & 1 deletion src/pages/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
.index-org-cards-grid {
margin: 0px !important;
margin: 10px !important;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.results {
background-color: #fcfff5;
border: 1px solid #a3c293;
color: #29531b;
font-weight: 600;
padding: 10px 80px;
border-radius: 5px;
}
11 changes: 7 additions & 4 deletions src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,13 @@ const IndexPage = ({ data }) => {
<Grid className="index-org-cards-grid">
<Notification />
</Grid>
<div style={{ marginTop: "1rem", textAlign: "center" }}>
<a className="ui orange label">
{filteredOrganizations.length} results
</a>
<div
style={{
margin: "2rem 0",
textAlign: "center",
}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be defined in index.css.

>
<a className="results">{filteredOrganizations.length} results</a>
</div>
<Grid className="index-org-cards-grid" stackable columns={cardColumns}>
{filteredOrganizations.map(org => (
Expand Down