parent
086feff1cb
commit
87ff7b5027
1 changed files with 39 additions and 45 deletions
|
@ -64,10 +64,10 @@ pub fn shell(content: PreEscaped<String>, title: &str) -> PreEscaped<String> {
|
|||
|
||||
div class="flex justify-start px-6" {
|
||||
|
||||
(htmx_link("/", "flex items-center space-x-2", "stopAllVideos()", html!(
|
||||
a href="/" class="flex items-center space-x-2" {
|
||||
img src="/favicon" alt="Logo" class="w-10 h-10 rounded-md";
|
||||
span class="font-semibold text-xl" { "WatchDogs" };
|
||||
)))
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
@ -140,11 +140,8 @@ pub fn format_number(num: i32) -> String {
|
|||
}
|
||||
|
||||
pub async fn video_element_wide(video: &mut Video) -> PreEscaped<String> {
|
||||
htmx_link(
|
||||
&format!("/watch?v={}", video.id),
|
||||
"flex items-center w-full p-4 bg-gray-900 shadow-lg rounded-lg overflow-hidden mb-2 mt-2",
|
||||
"stopAllVideos()",
|
||||
html!(
|
||||
a href=(format!("/watch?v={}", video.id)) class="flex items-center w-full p-4 bg-gray-900 shadow-lg rounded-lg overflow-hidden mb-2 mt-2" {
|
||||
div class="flex-shrink-0" {
|
||||
img width="480" src=(format!("/video/thumbnail?v={}", video.id)) alt="Video Thumbnail" class="w-48 h-32 object-cover rounded-md";
|
||||
};
|
||||
|
@ -171,16 +168,13 @@ pub async fn video_element_wide(video: &mut Video) -> PreEscaped<String> {
|
|||
};
|
||||
};
|
||||
};
|
||||
),
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
pub async fn video_element(video: &mut Video) -> PreEscaped<String> {
|
||||
htmx_link(
|
||||
&format!("/watch?v={}", video.id),
|
||||
"max-w-sm mx-auto p-4 max-h-60 aspect-video",
|
||||
"stopAllVideos()",
|
||||
html!(
|
||||
a href=(format!("/watch?v={}", video.id)) class="max-w-sm mx-auto p-4 max-h-60 aspect-video" {
|
||||
div class="bg-gray-900 shadow-lg rounded-lg overflow-hidden" {
|
||||
div class="relative" {
|
||||
img width="480" src=(format!("/video/thumbnail?v={}", video.id)) alt="Video Thumbnail" class="w-full h-auto object-cover aspect-video";
|
||||
|
@ -197,6 +191,6 @@ pub async fn video_element(video: &mut Video) -> PreEscaped<String> {
|
|||
};
|
||||
};
|
||||
};
|
||||
),
|
||||
};
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue