parent
aa10dce9ee
commit
792be1eb55
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
@use crate::post::Post;
|
@use crate::post::Post;
|
||||||
@use super::{header_html, footer_html};
|
@use super::{header_html, footer_html};
|
||||||
|
@use chrono::prelude::*;
|
||||||
|
|
||||||
@(posts: Vec<Post>)
|
@(posts: Vec<Post>)
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<ul>
|
<ul>
|
||||||
@for post in posts {
|
@for post in posts.iter().filter(|p| Utc::today().num_days_from_ce() >= p.date.num_days_from_ce()) {
|
||||||
<li>@post.date.format("%Y-%m-%d") - <a href="/@post.link">@post.front_matter.title</a></li>
|
<li>@post.date.format("%Y-%m-%d") - <a href="/@post.link">@post.front_matter.title</a></li>
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in New Issue