Skip to content

Commit

Permalink
Update new banner
Browse files Browse the repository at this point in the history
  • Loading branch information
sukso96100 authored Mar 1, 2024
1 parent 1f3b8f8 commit dca9551
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/BlogFeed.astro
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ blogItemsXml.forEach((el: Element) => {
<h4>News from our blog</h4>
<Row>
{
blogItems.map((item) => (
blogItems.slice(0, 2).map((item) => (
<Col size={4}>
<a href={item.link}>
<h3>{item.title}</h3>
</a>
<p>{item.date}</p>
<p class="auto-format-datetime">{item.date}</p>
</Col>
))
}
Expand All @@ -42,3 +42,9 @@ blogItemsXml.forEach((el: Element) => {
</Col>
</Row>
</Strip>

<script>
document.querySelectorAll(".auto-format-datetime").forEach((element)=>{
element.innerHTML = new Date(element.innerHTML).toLocaleString();
});
</script>

0 comments on commit dca9551

Please sign in to comment.