Skip to content

Commit

Permalink
Fix news author with no avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
siunus committed Jul 26, 2023
1 parent 3b2d5bf commit 128b9a5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
5 changes: 4 additions & 1 deletion v2023/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -946,14 +946,17 @@ parseNews = function (html) {
news.title != ""
? `<h5 class="card-title text-primary mb-4">${news.title}</h5>`
: "";
const avatar = news.avatar != ""
? `<img src="https://server.duinocoin.com/${news.avatar}" alt="" height="24" class="me-2 rounded-circle">`
: `<img src="https://duinocoin.com/assets/icons/duino.png" alt="" height="24" class="me-2 rounded-circle">`;

newsHtml += `<div class="card mb-4">
<div class="card-body">
${title}
<div class="card-subtitle text-muted mb-4">
<span class="d-flex">
<div class="d-flex align-items-center me-3">
<img src="https://server.duinocoin.com/${news.avatar}" alt="" height="24" class="me-2 rounded-circle">
${avatar}
<span>${news.author}</span>
</div>
<span class="me-3">
Expand Down
21 changes: 16 additions & 5 deletions v2023/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ <h5 id="offcanvasNewsLabel" class="offcanvas-title">News</h5>
<div
class="offcanvas-body mx-0 flex-grow-0"
>
<div id="list-news"></div>
<div id="list-news"></div>
<!-- <iframe
src="https://server.duinocoin.com/news.html"
frameborder="0"
Expand All @@ -914,7 +914,7 @@ <h5 id="offcanvasNewsLabel" class="offcanvas-title">News</h5>
<!-- / Content -->

<!-- Footer -->
<footer class="content-footer footer bg-footer-theme">
<footer class="content-footer footer bg-footer-theme p-3">
<div
class="container-xxl d-flex flex-wrap justify-content-between py-2 flex-md-row flex-column"
>
Expand All @@ -939,18 +939,29 @@ <h5 id="offcanvasNewsLabel" class="offcanvas-title">News</h5>
>Duinocoin.com</a
>

<a
href="https://discord.gg/kvBkccy"
target="_blank"
class="footer-link me-4 text-primary"
>
Join Discord
</a
>

<a
href="https://themeselection.com/"
target="_blank"
class="footer-link me-4 text-primary"
>Sneat Themes</a
>Theme Selection</a
>

<a
href="https://github.com/siunus/duco-monitor"
target="_blank"
class="footer-link me-4 text-primary"
>GitHub</a
>
Github
</a
>
</div>
</div>
Expand Down Expand Up @@ -983,7 +994,7 @@ <h5 id="offcanvasNewsLabel" class="offcanvas-title">News</h5>
<script src="assets/js/main.js"></script>

<!-- Page JS -->
<script defer src="app.js?v=6"></script>
<script defer src="app.js?v=8"></script>

<script src="https://www.gstatic.com/firebasejs/8.10.1/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.10.1/firebase-analytics.js"></script>
Expand Down

0 comments on commit 128b9a5

Please sign in to comment.