Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ellipsis rendering in nunjuck template #37

Merged
merged 3 commits into from
Oct 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# MMM-Fuel Changelog

## [2.0.1]

### Fixed

* Rendering of ellipsis with config `shortenText` active https://github.com/fewieden/MMM-Fuel/issues/36

## [2.0.0]

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mmm-fuel",
"version": "2.0.0",
"version": "2.0.1",
"description": "Gas Station price Module for MagicMirror2",
"scripts": {
"lint": "./node_modules/.bin/eslint . && ./node_modules/.bin/stylelint .",
Expand Down
12 changes: 6 additions & 6 deletions templates/MMM-Fuel.njk
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
{% if config.iconHeader %}
<i class="fa fa-car logo"></i>
{% endif %}
<span>{{'FUEL_PRICES' | translate}}</span>
<span>{{ "FUEL_PRICES" | translate }}</span>
</header>
{% if not priceList %}
<div class="dimmed light">{{'LOADING' | translate}}</div>
<div class="dimmed light">{{ "LOADING" | translate | safe }}</div>
{% else %}
<table class="small table align-left">
<tr>
<th>
{% if sortByPrice %}
{{'CHEAPEST_STATIONS' | translate}}
{{ "CHEAPEST_STATIONS" | translate }}
{% else %}
{{'CLOSEST_STATIONS' | translate}}
{{ "CLOSEST_STATIONS" | translate }}
{% endif %}
</th>
{% for type in config.types %}
Expand All @@ -38,7 +38,7 @@
</tr>
{% for gasStation in gasStations %}
<tr>
<td>{{ gasStation.name | shortenText }}</td>
<td>{{ gasStation.name | shortenText | safe }}</td>
{% for type in config.types %}
{% if includes(priceList.types, type) %}
<td class="centered">{{ gasStation.prices[type] | formatPrice }}</td>
Expand All @@ -54,7 +54,7 @@
{% if config.showAddress %}
<tr>
<td colspan="{{ 2 + config.types.length + (1 if config.open else 0) }}" class="xsmall">
{{ gasStation.address | shortenText }}
{{ gasStation.address | shortenText | safe }}
</td>
</tr>
{% endif %}
Expand Down