Skip to content

Commit

Permalink
Comply with Strava branding guidelines
Browse files Browse the repository at this point in the history
Using their login button and adding a "Powered by Strava" image at the
bottom of the menu. Some text adjustments in links to Strava.
  • Loading branch information
veloek committed Jan 28, 2024
1 parent 4423fc5 commit 859c5a0
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 15 deletions.
4 changes: 3 additions & 1 deletion Tevling/Components/ActivityCard.razor
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
<p class="activity-time">@ActivityTime</p>
</div>
<div class="activity-card-body">
<h4 class="activity-title"><a title="Open in Strava" target="_blank" href="https://www.strava.com/activities/@Activity.StravaId">@Activity.Details.Name</a> - @Stats</h4>
<h4 class="activity-title">
@Activity.Details.Name - @Stats - <a target="_blank" href="https://www.strava.com/activities/@Activity.StravaId">View on Strava</a> <span class="oi oi-external-link" style="font-size: 0.6rem;" />
</h4>
<p class="activity-description">@Activity.Details.Description</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion Tevling/Pages/Athletes.razor
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
aria-hidden="true"></span>
</td>
<td>@athlete.Name</td>
<td><a title="Open in Strava" target="_blank" href="https://strava.com/athletes/@athlete.StravaId">Profile</a> <span class="oi oi-external-link" style="font-size: 0.7rem;" /></td>
<td><a target="_blank" href="https://strava.com/athletes/@athlete.StravaId">View on Strava</a> <span class="oi oi-external-link" style="font-size: 0.7rem;" /></td>
</tr>
}
</tbody>
Expand Down
3 changes: 1 addition & 2 deletions Tevling/Pages/Login.razor
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
<p class="login-subtitle">«Bring it on»</p>
<div class="tevling-logo"><img src="arm-wrestling.png" width="256" /></div>
<form action="@StravaConfig.AuthorizeUri" method="get">
<div class="login-button-container">Login with <button class="btn strava-login" type="submit">Strava</button>
</div>
<button class="strava-login" type="submit">Connect with Strava</button>
<input type="hidden" name="client_id" value="@StravaConfig.ClientId" />
<input type="hidden" name="redirect_uri" value="@RedirectUri" />
<input type="hidden" name="response_type" value="@StravaConfig.ResponseType" />
Expand Down
25 changes: 14 additions & 11 deletions Tevling/Pages/Login.razor.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,24 @@
margin: 2rem 0;
}

.login-button-container {
display: flex;
justify-content: center;
align-items: end;
column-gap: 1rem;
}

button.strava-login {
background-image: url('../strava.png');
border: none;
background-color: inherit;
background-image: url('../[email protected]');
background-position: center;
background-size: 90%;
background-size: 100%;
background-repeat: no-repeat;
border: solid black 1px;
text-indent: -9999px;
width: 100px;
width: 193px;
height: 48px;
}

button.strava-login:hover {
filter: drop-shadow(0px 0px 5px #c1c1c1);
}

button.strava-login:active {
filter: none !important;
}

::deep .copyright {
Expand Down
1 change: 1 addition & 0 deletions Tevling/Shared/NavMenu.razor
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
<span class="oi oi-info" aria-hidden="true"></span> About
</NavLink>
</div>
<div class="strava-icon"></div>
</nav>
</div>
10 changes: 10 additions & 0 deletions Tevling/Shared/NavMenu.razor.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,13 @@
display: block;
}
}

.strava-icon {
background-image: url('../api_logo_pwrdBy_strava_horiz_gray.png');
background-position: center;
background-size: 100%;
background-repeat: no-repeat;
width: 169px;
height: 32px;
align-self: center;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Tevling/wwwroot/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Tevling/wwwroot/strava.png
Binary file not shown.

0 comments on commit 859c5a0

Please sign in to comment.