add scripts & css as raw

This commit is contained in:
Manuel Gugger 2023-01-09 22:50:22 +01:00
parent 911268ad3d
commit 4123b831b6
4 changed files with 8 additions and 5 deletions

View File

@ -9,7 +9,9 @@ exclude = [
"examples/*",
"actix_admin_macros/*",
"tests/*",
"README.md"
"docs/*",
"README.md",
".gitignore"
]
[lib]

View File

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View File

@ -2,7 +2,6 @@ use crate::{prelude::*, ActixAdminMenuElement, routes::delete_static_content};
use actix_web::{web, Route};
use std::collections::HashMap;
use std::fs;
use crate::routes::{
create_get, create_post, delete, delete_many, edit_get, edit_post, index, list, not_found, show, download
};
@ -105,8 +104,8 @@ impl ActixAdminBuilderTrait for ActixAdminBuilder {
.route("/show/{id}", web::get().to(show::<T, E>))
.route("/static_content/{id}/{column_name}", web::get().to(download::<T, E>))
.route("/static_content/{id}/{column_name}", web::delete().to(delete_static_content::<T, E>))
.default_service(web::to(not_found)),
);
.default_service(web::to(not_found))
);
fs::create_dir_all(format!("{}/{}", &self.actix_admin.configuration.file_upload_directory, E::get_entity_name())).unwrap();

View File

@ -6,6 +6,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css">
<script src="https://unpkg.com/htmx.org@1.8.4"></script>
{% raw %}
<script>
document.onkeydown = function (e) {
switch (e.which) {
@ -90,4 +91,5 @@
z-index: 6;
pointer-events: none
}
</style>
</style>
{% endraw %}