feat: serve list.js from local
This commit is contained in:
parent
06e6a396d2
commit
dcd0143b80
File diff suppressed because one or more lines are too long
|
@ -152,6 +152,7 @@ fn assets() -> BoxedFilter<(impl Reply, )> {
|
|||
.or(d3())
|
||||
.or(pico())
|
||||
.or(common_js())
|
||||
.or(list_js())
|
||||
)
|
||||
.boxed()
|
||||
}
|
||||
|
@ -232,6 +233,13 @@ fn index() -> BoxedFilter<(impl Reply, )> {
|
|||
warp::get().and(route).boxed()
|
||||
}
|
||||
|
||||
fn list_js() -> BoxedFilter<(impl Reply, )> {
|
||||
warp::path("list.js")
|
||||
.and(warp::path::end())
|
||||
.and(warp::fs::file("./assets/list.min.js"))
|
||||
.boxed()
|
||||
}
|
||||
|
||||
fn listings(state: Arc<State>) -> BoxedFilter<(impl Reply, )> {
|
||||
async fn logic(state: Arc<State>, codes: Option<String>) -> std::result::Result<impl Reply, Infallible> {
|
||||
let lang = Language::from_codes(codes.as_deref());
|
||||
|
|
|
@ -7,7 +7,7 @@ xivpf - listings
|
|||
{% block head %}
|
||||
<link rel="stylesheet" href="/assets/common.css"/>
|
||||
<link rel="stylesheet" href="/assets/listings.css"/>
|
||||
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/list.js/2.3.1/list.min.js"></script>
|
||||
<script defer src="/assets/list.js"></script>
|
||||
<script defer src="/assets/listings.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
|
|
Loading…
Reference in New Issue