Skip to content

Commit

Permalink
Fixed styling issues on Craft 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
bymayo committed Jun 12, 2020
1 parent 428a7ae commit fc43054
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Strava Sync Changelog

## 1.0.13 - 2020-06-12
### Fixed
- Styling issues on Craft 3.4

## 1.0.12 - 2020-01-14
### Fixed
- Error where authorization_code was expiring instantly. Strava must have changed some security settings with authorization_code and tokens.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "bymayo/strava-sync",
"description": "Connect to Strava with oAuth and sync activities etc to Craft CMS ",
"type": "craft-plugin",
"version": "1.0.12",
"version": "1.0.13",
"keywords": [
"craft",
"cms",
Expand Down
7 changes: 6 additions & 1 deletion src/assetbundles/stravasync/dist/css/StravaSync.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.rounded {
border-radius: .25rem;
border-radius: .25rem;
}

.font-medium {
Expand All @@ -25,3 +25,8 @@
.bg-gray-300 {
background-color: #e2e8f0;
}

#details .meta.follow-user-pane {
padding-top: 14px;
padding-bottom: 14px;
}
16 changes: 8 additions & 8 deletions src/templates/user-pane.twig
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{% if user.id == currentUser.id or currentUser.admin %}

<div class="meta">
<div class="meta follow-user-pane">
<h2>Strava</h2>
{% set stravaSyncUser = craft.stravaSync.connected(user.id) %}
{% if stravaSyncUser %}
<div class="data first">
<span class="heading">ID</span>
<span class="value">
<div class="heading">ID</div>
<div class="value">
<a href="https://strava.com/athletes/{{ stravaSyncUser.athleteId }}" target="_blank">#{{ stravaSyncUser.athleteId }}</a>
</span>
</div>
</div>
<div class="data">
<span class="heading">Token Expiry</span>
<span class="value">{{ stravaSyncUser.expires|datetime('short') }}</span>
<div class="heading">Token Expiry</div>
<div class="value">{{ stravaSyncUser.expires|datetime('short') }}</div>
</div>
<div class="data">
<span class="heading">
<div class="heading">
{% if user.id == currentUser.id %}
<a href="{{ craft.stravaSync.disconnectUrl() }}" class="btn small delete" title="Disconnect from Strava">Disconnect from Strava</a>
{% elseif currentUser.admin %}
<a href="{{ craft.stravaSync.disconnectUrl() }}" class="btn small delete" title="Disconnect from Strava">Disconnect from Strava</a>
{% else %}
<div class="btn small disabled">Disconnect from Strava</div>
{% endif %}
</span>
</div>
</div>
{% else %}
<div class="data">
Expand Down

0 comments on commit fc43054

Please sign in to comment.