Skip to content

Commit

Permalink
adjust styles for logo in AppBar / dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
BeritJanssen committed Jun 11, 2024
1 parent 3c22265 commit 30e641e
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 23 deletions.
20 changes: 0 additions & 20 deletions frontend/src/components/AppBar/AppBar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,6 @@ $app-bar-height: 45px;
display: flex;
align-items: center;

$logo-height: $app-bar-height - 15px;
$logo-height-mobile: $app-bar-height - 15px;

.logo {
display: inline-block;
height: $logo-height;
background-position: left center;
background-repeat: no-repeat;
background-size: contain;
margin-left: 15px;
font-size: 0;
color: transparent;
width: 30%;

@media (max-width: 500px) {
margin-left: 10px;
height: $logo-height-mobile;
}
}

.title {
text-transform: uppercase;
font-size: 16px;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.aha__dashboard {

.aha__logo {
margin-left: 35%;
height: 90px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const ExperimentCollectionDashboard: React.FC<ExperimentCollectionDashboa
const getExperimentHref = (slug: string) => `/${slug}${participantIdUrl ? `?participant_id=${participantIdUrl}` : ""}`;

return (
<>
<div className="aha__dashboard">
<Logo logoClickConfirm={null} />
{headerProps && (
<Header { ...headerProps }></Header>
Expand All @@ -49,7 +49,7 @@ export const ExperimentCollectionDashboard: React.FC<ExperimentCollectionDashboa
{dashboard.length === 0 && <p>No experiments found</p>}
</ul>
</div>
</>
</div>
);
}

Expand Down
19 changes: 19 additions & 0 deletions frontend/src/components/Logo/Logo.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
$logo-height: 30px;
$logo-height-mobile: 30px;

.aha__logo {
display: inline-block;
height: $logo-height;
background-position: left center;
background-repeat: no-repeat;
background-size: contain;
margin-left: 15px;
font-size: 0;
color: transparent;
width: 30%;

@media (max-width: 500px) {
margin-left: 10px;
height: $logo-height-mobile;
}
}
2 changes: 1 addition & 1 deletion frontend/src/components/Logo/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Logo: React.FC<{logoClickConfirm: string | null}> = ({logoClickConfirm=nul
// and a-element for absolute urls (https://www.example.com/)
const logoProps = {
onClick: onLogoClick,
className: "logo",
className: "aha__logo",
"aria-label": "Logo",
style: { backgroundImage: `url(${logoUrl})` },
};
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/components/components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
@import "./CountDown/CountDown";
@import "./Histogram/Histogram";
@import "./Rank/Rank";
@import "./Logo/Logo";

// Profile
@import "./Profile/Profile";
Expand All @@ -20,6 +21,7 @@
@import "./Consent/Consent";
@import "./Experiment/Experiment";
@import "./ExperimentCollection/ExperimentCollection";
@import "./ExperimentCollection/ExperimentCollectionDashboard/ExperimentCollectionDashboard";
@import "./Explainer/Explainer";
@import "./Final/Final";
@import "./FloatingActionButton/FloatingActionButton";
Expand Down

0 comments on commit 30e641e

Please sign in to comment.