Skip to content

Commit

Permalink
Chartcss hinzugefügt und auf der Statistikseite eingebunden
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernd Ritter committed May 22, 2024
1 parent 09f129c commit f0ce719
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public RedirectView stats(@PathVariable final String slug, final ModelAndView mv
@GetMapping(value = "{nodeId}/stats")
public ModelAndView stats(@PathVariable final Integer nodeId,
@RequestParam(value="interval", defaultValue = "daily") final StatIntervalType statIntervalType,
@RequestParam(value="amount", defaultValue = "3") final int amount,
@RequestParam(value="amount", defaultValue = "30") final int amount,
final ModelAndView mv) {
mv.setViewName("layouts/bare");
mv.addObject("title", "Die Linuxspiele-Seite für Linuxspieler");
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/vendor/chartcss/charts.min.css

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion src/main/webapp/WEB-INF/templates/fragments/head_top.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@
<link rel="stylesheet" data-th-href="@{/assets/css/custom.css}" href="">

<!-- Filepond -->
<link rel="stylesheet" data-th-href="@{/assets/vendor/filepond/filepond.min.css}" href="">
<link rel="stylesheet" data-th-href="@{/assets/vendor/filepond/filepond.min.css}" href="">

<!-- ChartsCSS -->
<link rel="stylesheet" data-th-href="@{/assets/vendor/chartcss/charts.min.css}" href="">
3 changes: 1 addition & 2 deletions src/main/webapp/WEB-INF/templates/layouts/bare.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@

<div data-th-replace="~{fragments/goto}"></div>

<div data-th-replace="~{fragments/head_bottom}"></div>
<div data-th-replace="~{fragments/head_bottom}"></div>


<!-- JS Plugins Init. -->
<script>
$(document).on('ready', function () {
Expand Down
17 changes: 9 additions & 8 deletions src/main/webapp/WEB-INF/templates/sites/wiki/stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@
<h2 class="u-heading-v2__title g-mb-10" data-th-text="${title1}">Lorem ipsum standard</h2>
</header>
<section>
<div class="table-responsive">
<table class="table table-hover">
<div id="article-chart">
<table class="charts-css column show-labels show-primary-axis">
<caption>Zugriffe auf den Artikel</caption>
<thead>
<tr>
<th>Zeit</th>
<th>Zugriffe</th>
</tr>
<tr>
<th scope="col">Zeit</th>
<th scope="col">Zugriffe</th>
</tr>
</thead>
<tbody>
<tr data-th-each="stat : ${stats}">
<td data-th-text="${stat.time}"></td>
<td data-th-text="${stat.amount}"></td>
<th scope="row" data-th-text="${stat.time}"></th>
<td data-th-style="'--size: calc(' + ${stat.amount} + '/100.0);'"><span class="data" data-th-text="${stat.amount}"></span></td>
</tr>
</tbody>
</table>
Expand Down

0 comments on commit f0ce719

Please sign in to comment.