forked from samuel-p/sp-codes.de
major improvements
This commit is contained in:
parent
848289cdc0
commit
8d2492e6c8
13 changed files with 25 additions and 27 deletions
|
@ -1,10 +1,6 @@
|
|||
const eleventyNavigationPlugin = require("@11ty/eleventy-navigation");
|
||||
|
||||
module.exports = function (eleventyConfig) {
|
||||
eleventyConfig.setLiquidOptions({
|
||||
dynamicPartials: true,
|
||||
// strict_filters: true,
|
||||
});
|
||||
eleventyConfig.addWatchTarget("./src/scss/");
|
||||
|
||||
eleventyConfig.addPlugin(eleventyNavigationPlugin);
|
||||
|
@ -27,8 +23,9 @@ module.exports = function (eleventyConfig) {
|
|||
return value.map(d => d.amount).reduce((a, b) => a + b);
|
||||
});
|
||||
|
||||
eleventyConfig.addFilter("amount", function (value, locale) {
|
||||
return value.toLocaleString(locale, {minimumFractionDigits: 2});
|
||||
eleventyConfig.addFilter("amount", function (value) {
|
||||
// TODO update language dynamically
|
||||
return value.toLocaleString('de', {minimumFractionDigits: 2});
|
||||
});
|
||||
|
||||
eleventyConfig.addFilter("banktransfers", function (donations) {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"browser-sync": "^2.26.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@11ty/eleventy": "^0.12.1",
|
||||
"@11ty/eleventy": "^1.0.0-canary.32",
|
||||
"@11ty/eleventy-navigation": "^0.2.0",
|
||||
"cpx": "^1.5.0",
|
||||
"node-sass": "^6.0.0",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{locale}}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -21,14 +22,14 @@
|
|||
{% else %}
|
||||
<td>***</td>
|
||||
{% endif %}
|
||||
<td>{{donation.amount | amount(locale)}} €</td>
|
||||
<td>{{donation.amount | amount}} €</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="3">{{strings.total[locale]}}</th>
|
||||
<th>{{donations[0].donations | sum | amount(locale)}} €</th>
|
||||
<th>{{donations[0].donations | sum | amount}} €</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
|
|
@ -24,14 +24,14 @@
|
|||
{% else %}
|
||||
<td>***</td>
|
||||
{% endif %}
|
||||
<td>{{donation.amount | amount(locale)}} €</td>
|
||||
<td>{{donation.amount | amount}} €</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="3">{{strings.total[locale]}}</th>
|
||||
<th>{{year.donations | sum | amount(locale)}} €</th>
|
||||
<th>{{year.donations | sum | amount}} €</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
|
|
@ -18,16 +18,16 @@
|
|||
{% endif %}
|
||||
<td>{{expense.type}}</td>
|
||||
<td>{{expense.provider}}</td>
|
||||
<td>{{expense.amount | amount(locale)}} €</td>
|
||||
<td>{{expense.amount | year | amount(locale)}} €</td>
|
||||
<td>{{expense.amount | amount}} €</td>
|
||||
<td>{{expense.amount | year | amount}} €</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="3">{{strings.total[locale]}}</th>
|
||||
<th>{{expenses | sum | amount(locale)}} €</th>
|
||||
<th>{{expenses | sum | year | amount(locale)}} €</th>
|
||||
<th>{{expenses | sum | amount}} €</th>
|
||||
<th>{{expenses | sum | year | amount}} €</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
|
|
@ -7,4 +7,4 @@ title: Unterstützen
|
|||
|
||||
<p><a href="/{{locale}}/donate/">➔ Unterstützen</a></p>
|
||||
|
||||
{% include "donations.html" %}
|
||||
{% include donations.html %}
|
||||
|
|
|
@ -73,10 +73,10 @@ eleventyNavigation:
|
|||
</div>
|
||||
|
||||
<h2>Aktuelle Ausgaben</h2>
|
||||
{% include "expenses-current.html" %}
|
||||
{% include expenses-current.html %}
|
||||
|
||||
<h2>Spenden {{donations[0].year}}</h2>
|
||||
{% include "donations-current.html" %}
|
||||
{% include donations-current.html %}
|
||||
|
||||
<p><a href="/{{locale}}/all-donations/">➔ Alle Spenden</a></p>
|
||||
|
||||
|
|
|
@ -28,5 +28,5 @@ title: Impressum
|
|||
<div class="mb-3 pt-4 border-top">
|
||||
<h2>Lizenzen</h2>
|
||||
<p>Diese Webseite nutzt die folgenden Bibliotheken mit ihren entsprechenden Lizenzen:</p>
|
||||
{% include "licenses.html" %}
|
||||
{% include licenses.html %}
|
||||
</div>
|
||||
|
|
|
@ -31,7 +31,7 @@ eleventyNavigation:
|
|||
href="https://social.sp-codes.de/@sp_codes">@sp_codes@social.sp-codes.de</a></strong>
|
||||
</p>
|
||||
<div class="row justify-content-center">
|
||||
{% include "services-simple.html" %}
|
||||
{% include services-simple.html %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -44,4 +44,4 @@ eleventyNavigation:
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% include "profiles.html" %}
|
||||
{% include profiles.html %}
|
||||
|
|
|
@ -7,4 +7,4 @@ title: Unterstützen
|
|||
|
||||
<p><a href="/{{locale}}/donate/">➔ Donate</a></p>
|
||||
|
||||
{% include "donations.html" %}
|
||||
{% include donations.html %}
|
||||
|
|
|
@ -71,10 +71,10 @@ eleventyNavigation:
|
|||
</div>
|
||||
|
||||
<h2>Current Expenses</h2>
|
||||
{% include "expenses-current.html" %}
|
||||
{% include expenses-current.html %}
|
||||
|
||||
<h2>Donations {{donations[0].year}}</h2>
|
||||
{% include "donations-current.html" %}
|
||||
{% include donations-current.html %}
|
||||
|
||||
<p><a href="/{{locale}}/all-donations/">➔ All Donations</a></p>
|
||||
|
||||
|
|
|
@ -28,5 +28,5 @@ title: sp-codes
|
|||
<div class="mb-3 pt-4 border-top">
|
||||
<h2>Licenses</h2>
|
||||
<p>This Website uses the following libraries with their respective licenses:</p>
|
||||
{% include "licenses.html" %}
|
||||
{% include licenses.html %}
|
||||
</div>
|
||||
|
|
|
@ -30,7 +30,7 @@ eleventyNavigation:
|
|||
href="https://social.sp-codes.de/@sp_codes">@sp_codes@social.sp-codes.de</a></strong>
|
||||
</p>
|
||||
<div class="row justify-content-center">
|
||||
{% include "services-simple.html" %}
|
||||
{% include services-simple.html %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -44,4 +44,4 @@ eleventyNavigation:
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{% include "profiles.html" %}
|
||||
{% include profiles.html %}
|
||||
|
|
Loading…
Reference in a new issue