Skip to content

Commit

Permalink
🎨 Adds option to hide sports thumbnail (Lissy93#654)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lissy93 committed May 16, 2022
1 parent 19b7131 commit 8c43442
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/widgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@ Show recent scores and upcoming matches from your favourite sports team. Data is
**`pastOrFuture`** | `string` | __Optional__ | Set to `past` to show scores for recent games, or `future` to show upcoming games. Defaults to `past`. You can change this within the UI
**`apiKey`** | `string` | __Optional__ | Optionally specify your API key, which you can sign up for at [TheSportsDB.com](https://www.thesportsdb.com/)
**`limit`** | `number` | __Optional__ | To limit output to a certain number of matches, defaults to `15`
**`hideImage`** | `boolean` | __Optional__ | Set to `true` to not render the team / match banner image, defaults to `false`

##### Example

Expand Down
5 changes: 4 additions & 1 deletion src/components/Widgets/SportsScores.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</div>
<div class="match-row" v-for="match in matches" :key="match.id">
<!-- Banner Image -->
<div class="match-thumbnail-wrap">
<div class="match-thumbnail-wrap" v-if="!hideImage">
<img :src="match.thumbnail" :alt="`${match.title} Banner Image`" class="match-thumbnail" />
</div>
<!-- Team Scores -->
Expand Down Expand Up @@ -101,6 +101,9 @@ export default {
pastOrFuture() {
return this.options.pastOrFuture || 'past';
},
hideImage() {
return this.options.hideImage || false;
},
endpoint() {
this.initiate();
const endpoint = widgetApiEndpoints.sportsScores;
Expand Down

0 comments on commit 8c43442

Please sign in to comment.