Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Favorite icon hover on shot page
Browse files Browse the repository at this point in the history
  • Loading branch information
punamdahiya committed Sep 11, 2018
1 parent 56ee277 commit f0e86f3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
2 changes: 1 addition & 1 deletion locales/en-US/server.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ shotPageDownloadShot =
.title = Download
shotPageEditButton =
.title = Edit this image
shotPagefavoriteButton =
shotPageFavoriteButton =
.title = Favorite this shot
shotPageBackToHomeButton =
.title = Homepage
Expand Down
7 changes: 4 additions & 3 deletions server/src/pages/shot/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,11 @@ class Body extends React.Component {
const activeFavClass = this.props.expireTime ? "" : "is-fav";
const shouldShow = this.props.isFxaAuthenticated ? "" : "hidden";

favoriteShotButton = <Localized id="shotPagefavoriteButton">
<button className={`nav-button favorite icon-favorite ${activeFavClass} ${shouldShow} `} onClick={this.onClickFavorite.bind(this)}>
favoriteShotButton = <Localized id="shotPageFavoriteButton">
<button className={`nav-button ${shouldShow} `} onClick={this.onClickFavorite.bind(this)}>
<div className={`icon-favorite favorite ${activeFavClass}`} ></div>
<Localized id="shotPageFavorite">
<span className={` ${activeFavClass} `}>Favorite</span>
<span className={`favorite ${activeFavClass} `}>Favorite</span>
</Localized>
</button></Localized>;

Expand Down
30 changes: 19 additions & 11 deletions static/css/partials/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
background-image: url("../img/icon-settings.svg");
}

&.icon-favorite {
.icon-favorite {
background-image: url("../img/icon-heart.svg");
}

Expand All @@ -99,26 +99,34 @@
background-image: url("../img/icon-download.svg");
}

&.favorite {
filter: brightness(2.4);
div {
&.favorite {
width: 24px;
height: 24px;
margin: 0 0 8px;
background-size: 24px 24px;
filter: brightness(2.4);

&.is-fav {
filter: brightness(1);
&.is-fav {
filter: brightness(1);
}
}

}

span {
cursor: pointer;
margin-top: 30px;
color: #95929a;
filter: brightness(0.4);
color: #2a2a2e;
overflow: hidden;
text-overflow: ellipsis;
width: 96px;

&.is-fav {
color: #4a4a4a;
&.favorite {
margin-top: 0;
color: #95929a;

&.is-fav {
color: #4a4a4a;
}
}
}
}
Expand Down

0 comments on commit f0e86f3

Please sign in to comment.