mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-24 18:10:58 +00:00
Settings with Layouts
This commit is contained in:
parent
2b0193f5ea
commit
aa7b4b2af7
16 changed files with 255 additions and 140 deletions
|
@ -1,5 +1,5 @@
|
|||
// CRATES
|
||||
use crate::utils::{error, fetch_posts, param, Post};
|
||||
use crate::utils::{cookie, error, fetch_posts, param, Post};
|
||||
use actix_web::{HttpRequest, HttpResponse};
|
||||
use askama::Template;
|
||||
|
||||
|
@ -19,6 +19,7 @@ struct SearchTemplate {
|
|||
posts: Vec<Post>,
|
||||
sub: String,
|
||||
params: SearchParams,
|
||||
layout: String,
|
||||
}
|
||||
|
||||
// SERVICES
|
||||
|
@ -44,6 +45,7 @@ pub async fn find(req: HttpRequest) -> HttpResponse {
|
|||
after: posts.1,
|
||||
restrict_sr: param(&path, "restrict_sr"),
|
||||
},
|
||||
layout: cookie(req, "layout"),
|
||||
}
|
||||
.render()
|
||||
.unwrap(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue