Skip to content

Commit

Permalink
small layout fix for stats
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernd Ritter committed May 23, 2024
1 parent 4201089 commit 732b434
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 17 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 = "30") final int amount,
@RequestParam(value="amount", defaultValue = "7") final int amount,
final ModelAndView mv) {
mv.setViewName("layouts/bare");
mv.addObject("title", "Die Linuxspiele-Seite für Linuxspieler");
Expand Down
42 changes: 26 additions & 16 deletions src/main/webapp/WEB-INF/templates/sites/wiki/stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,32 @@
<h2 class="u-heading-v2__title g-mb-10" data-th-text="${title1}">Lorem ipsum standard</h2>
</header>
<section>
<div id="article-chart">
<table class="charts-css column show-heading show-labels show-primary-axis data-outside">
<caption>Zugriffe auf den Artikel</caption>
<thead>
<tr>
<th scope="col">Zeit</th>
<th scope="col">Zugriffe</th>
</tr>
</thead>
<tbody>
<tr data-th-each="stat : ${stats}">
<th scope="row" data-th-text="${stat.time}"></th>
<td data-th-style="'--size: calc(' + ${stat.amount} + '/100.0);'"><span class="data outside" data-th-text="${stat.amount}"></span></td>
</tr>
</tbody>
</table>
<div class="row">
<div class="col-sm-4">
<a class="btn btn-xl btn-block u-btn-outline-primary g-font-weight-600 g-letter-spacing-0_5 text-uppercase g-brd-3 rounded-0 g-mr-10 g-mb-15" href="?interval=daily&amount=7">Eine Woche</a>
<a class="btn btn-xl btn-block u-btn-outline-primary g-font-weight-600 g-letter-spacing-0_5 text-uppercase g-brd-3 rounded-0 g-mr-10 g-mb-15" href="?interval=daily&amount=30">Ein Monat</a>
<a class="btn btn-xl btn-block u-btn-outline-primary g-font-weight-600 g-letter-spacing-0_5 text-uppercase g-brd-3 rounded-0 g-mr-10 g-mb-15" href="?interval=monthly&amount=3">3 Monate</a>
<a class="btn btn-xl btn-block u-btn-outline-primary g-font-weight-600 g-letter-spacing-0_5 text-uppercase g-brd-3 rounded-0 g-mr-10 g-mb-15" href="?interval=monthly&amount=12">Ein Jahr</a>
</div>
<div class="col-sm-8">
<div id="article-chart">
<table class="charts-css column show-heading show-labels show-primary-axis data-outside">
<caption>Zugriffe auf den Artikel</caption>
<thead>
<tr>
<th scope="col">Zeit</th>
<th scope="col">Zugriffe</th>
</tr>
</thead>
<tbody>
<tr data-th-each="stat : ${stats}">
<th scope="row" data-th-text="${stat.time}"></th>
<td data-th-style="'--size: calc(' + ${stat.amount} + '/100.0);'"><span class="data outside" data-th-text="${stat.amount}"></span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
</div>
Expand Down

0 comments on commit 732b434

Please sign in to comment.