Skip to content

Commit

Permalink
docs: add articles to homepage and rss button
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulvdberge committed Aug 16, 2024
1 parent 2a1e1a9 commit d2589dc
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,26 @@ <h2>Refined Storage is a mass storage mod for Minecraft that offers the player a
</a>
</div>

<div class="card-group mt-4">
<div class="card"
th:each="article, articleStat : ${articles}"
th:if="${articleStat.index < 3}">
<div class="card-body">
<h5 class="card-title" th:text="${article.title}"></h5>
<p class="card-text" th:text="${article.description}"></p>
<a class="btn btn-primary"
th:href="@{'./' + ${currentComponent.slug} + '/' + ${currentComponent.latest ? '' : currentComponent.version.friendlyName() + '/'} + ${article.url}}">
Read more <i class="bi bi-chevron-right"></i>
</a>
</div>
<div class="card-footer bg-body-tertiary">
<small class="text-body-secondary">
<i class="bi bi-clock"></i> <span th:text="${#temporals.format(article.date, 'yyyy-MM-dd')}"></span>
</small>
</div>
</div>
</div>

<div class="container bg-body-tertiary rounded-3 my-5 mt-4 pt-4">
<div class="row g-4 p-5 row-cols-1 row-cols-lg-3">
<div class="col">
Expand Down
6 changes: 6 additions & 0 deletions docs/pages/news/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
</head>
<body>
<div layout:fragment="content">
<div class="d-flex justify-content-end mb-3">
<a th:href="@{'./' + ${currentComponent.slug} + '/' + ${currentComponent.latest ? '' : currentComponent.version.friendlyName() + '/'} + 'rss.xml'}"
class="btn btn-primary btn-sm">
<i class="bi bi-rss"></i> RSS
</a>
</div>
<main class="list-group">
<a th:href="@{'./' + ${currentComponent.slug} + '/' + ${currentComponent.latest ? '' : currentComponent.version.friendlyName() + '/'} + ${article.url}}"
class="list-group-item list-group-item-action d-flex gap-3 py-3"
Expand Down

0 comments on commit d2589dc

Please sign in to comment.