Skip to content

Commit

Permalink
CSS improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Litzenburger committed Jan 21, 2024
1 parent ea0289f commit 3b08d5d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 27 deletions.
8 changes: 6 additions & 2 deletions MMM-Jast.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
@keyframes tickerh {
0% {
transform: translate(0, 0);
-webkit-transform: translateX(0);
transform: translateX(0);
will-change: transform;
}
100% {
transform: translate(-100%, 0);
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
will-change: transform;
}
}
.jast-wrapper {
Expand Down
2 changes: 1 addition & 1 deletion MMM-Jast.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 2 additions & 17 deletions node_helper.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mmm-jast",
"version": "2.9.1",
"version": "2.9.2",
"description": "A minimalistic stock ticker based on Yahoo's finance API for the MagicMirror² platform.",
"main": "MMM-Jast.js",
"repository": {
Expand Down
11 changes: 5 additions & 6 deletions templates/StockList.njk
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
{% for stock in stocks %}
{% if not stock.meta.hidden or config.showHiddenStocks %}
<li class="jast-stock">
<span>{{ utils.getStockName(stock) }}:</span>
<span class="jast-stock-name">{{ utils.getStockName(stock) }}:</span>
{% if utils.getStockChange(stock) > 0 %}
{% set colorClass = "high" %}
{% elif utils.getStockChange(stock) < 0 %}
{% set colorClass = "low" %}
{% else %}
{% set colorClass = "" %}
{% endif %}
<span class="{{ colorClass }}">
<span>{{ utils.getCurrentValueAsString(stock, config) }}</span>
<span class="jast-values-wrapper {{ colorClass }}">
<span class="jast-change-wrapper">{{ utils.getCurrentValueAsString(stock, config) }}</span>
{% if colorClass and (config.showChangeValue or config.showChangePercent) %}
<span class="jast-change">
({% if config.showChangeValue %}<span class="jast-change-value">{% if colorClass == "high" %}+{%endif%}{{ utils.getStockChangeAsString(stock, config) }}</span>{% endif %}
Expand All @@ -27,7 +27,7 @@
{% else %}
{% set colorClassPerformance = "" %}
{% endif %}
<span class="{{ colorClassPerformance }}">
<span class="jast-performance {{ colorClassPerformance }}">
{% if colorClassPerformance and (config.showStockPerformanceValue or config.showStockPerformancePercent) %}
<span class="jast-change">
(
Expand All @@ -37,8 +37,7 @@
)
</span>
{% endif %}
</span>

</span>
</li>
{% endif %}
{% endfor %}
Expand Down

0 comments on commit 3b08d5d

Please sign in to comment.