Skip to content

Commit

Permalink
Improved Favourites Content
Browse files Browse the repository at this point in the history
  • Loading branch information
Waldleufer committed Jul 5, 2021
1 parent 0143aff commit ec0e9fd
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 22 deletions.
41 changes: 25 additions & 16 deletions frontend/src/components/mydashboard/MydashboardItemComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,23 @@ function MydashboardItemComponent() {

function renderCards(title, content) {
return (
<Col align='center' justify='start' className='statContainer'>
<div className='star'>
<i className='fa fa-star-o' aria-hidden='true' />
<p>
{title}
{content}
</p>
</div>
</Col>
<Row align='center' justify='start' className='statContainer'>
<Col>
<div className='star'>
<i className='fa fa-star-o' aria-hidden='true' />
</div>
</Col>
<Col>
<div className='favouritesContent'>
<Container fluid>
<Row direction='row'>
<Col>{title}</Col>
<Col>{content}</Col>
</Row>
</Container>
</div>
</Col>
</Row>
);
}

Expand Down Expand Up @@ -106,13 +114,14 @@ function MydashboardItemComponent() {
></i>
<span>Favorites</span>
</div>

{renderCards('Fav Project 1', 'Transmission')}
{renderCards('Fav Project 2', 'Generation')}
{renderCards('Fav Project 3', 'Industrial App')}
{renderCards('Fav Project 1', 'Transmission')}
{renderCards('Fav Project 2', 'Generation')}
{renderCards('Fav Project 3', 'Industrial App')}
<Container fluid>
{renderCards('Fav Project 1', 'Transmission')}
{renderCards('Fav Project 2', 'Generation')}
{renderCards('Fav Project 3', 'Industrial App')}
{renderCards('Fav Project 1', 'Transmission')}
{renderCards('Fav Project 2', 'Generation')}
{renderCards('Fav Project 3', 'Industrial App')}
</Container>
</Col>
<Col xs={2} sm={2} md={2} lg={1} style={{ padding: 0, maxWidth: '1.5%' }} />
<Col xs={8} sm={8} md={8} lg={3.5} className='MyCardsContainer'>
Expand Down
17 changes: 11 additions & 6 deletions frontend/src/components/mydashboard/mydashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,24 @@
font-size: 24px;
border-style: none;
cursor: pointer;
margin-left: 0px;
margin-right: 5px;
}
.star p {
.favouritesContent {
font-family: inherit;
font-style: normal;
font-weight: normal;
font-size: var(--global--text-subtitle--FontSize);
letter-spacing: 0.5px;
color: var(--global--text--color);
white-space: nowrap;
}

.MyCardsContainer .statContainer {
border-bottom: 2px solid #643082;
}

.statContainer {
padding: auto;
}
.dashboardCardSubTitle i {
font-size: 10px;
Expand Down Expand Up @@ -148,10 +157,6 @@
margin-left: 0px;
}

.statContainer {
padding: auto;
}

.dashboardTitle p {
font-family: inherit;
font-style: normal;
Expand Down

0 comments on commit ec0e9fd

Please sign in to comment.