render: remove dummy argument in handlebars helper
turns out they just can't handle `||` -- adding a space in between fixes the problem.master
parent
e8fdba132b
commit
d8f05bad95
|
@ -82,9 +82,8 @@ lazy_static! {
|
|||
};
|
||||
}
|
||||
|
||||
handlebars_helper!(cur_year: |dummy: u64| Date::new_0().get_full_year());
|
||||
handlebars_helper!(build_num: |dummy: u64| BuildTag{}.get_build_timestamp());
|
||||
// TODO: actually implement this helper
|
||||
handlebars_helper!(cur_year: | | Date::new_0().get_full_year());
|
||||
handlebars_helper!(build_num: | | BuildTag{}.get_build_timestamp());
|
||||
handlebars_helper!(format_date: |date: u64, format: str| {
|
||||
NaiveDateTime::from_timestamp(date as i64, 0).format(format).to_string()
|
||||
});
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{{ blog.title }}</title>
|
||||
<link rel="stylesheet" href="/static/style.css?ver={{ build_num 0 }}"/>
|
||||
<link rel="stylesheet" href="/static/style.css?ver={{ build_num }}"/>
|
||||
</head>
|
||||
<body>
|
||||
{{> loading.hbs }}
|
||||
|
@ -29,6 +29,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/static/script.js?ver={{ build_num 0 }}"></script>
|
||||
<script src="/static/script.js?ver={{ build_num }}"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -2,7 +2,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{{ title }} - {{ blog.title }}</title>
|
||||
<link rel="stylesheet" href="/static/style.css?ver={{ build_num 0 }}"/>
|
||||
<link rel="stylesheet" href="/static/style.css?ver={{ build_num }}"/>
|
||||
</head>
|
||||
<body>
|
||||
{{> loading.hbs }}
|
||||
|
@ -20,6 +20,6 @@
|
|||
<!-- We don't handle this in backend -->
|
||||
</div>
|
||||
</div>
|
||||
<script src="/static/script.js?ver={{ build_num 0 }}"></script>
|
||||
<script src="/static/script.js?ver={{ build_num }}"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -13,7 +13,7 @@
|
|||
</ul>
|
||||
</section>
|
||||
<section class="copyright">
|
||||
Copyright © {{ cur_year 0 }} {{ blog.title }}<br />
|
||||
Copyright © {{ cur_year }} {{ blog.title }}<br />
|
||||
Powered by <a href="https://github.com/PeterCxy/paprika" target="_blank">paprika</a><br />
|
||||
Hosted on <a href="https://workers.cloudflare.com/" target="_blank">Cloudflare Workers</a>
|
||||
</section>
|
||||
|
|
Loading…
Reference in New Issue