[mod] typification of SearXNG: add new result type Video (#6743)

- Python class:   searx/result_types/video.py
- Jinja template: searx/templates/simple/result_templates/videos.html
- CSS (less)      client/simple/src/less/result_types/video.less

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser
2026-09-20 16:12:32 +02:00
committed by Markus Heiser
parent fdd8525b1a
commit e40de2d992
9 changed files with 87 additions and 63 deletions

View File

@@ -0,0 +1,25 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
/*
Layout of the Video result class
*/
.result-videos {
a.thumbnail_link {
.ltr-float-left();
.ltr-margin-right(1rem);
.ltr-margin-left(0);
width: 10rem !important;
aspect-ratio: 16 / 9 !important;
}
.content {
overflow: hidden;
}
.embedded-video iframe {
width: 100%;
aspect-ratio: 16 / 9;
padding: 10px 0 0 0;
}
}

View File

@@ -431,34 +431,6 @@ article[data-vim-selected].category-social {
padding: 10px 0 0 0;
}
.result-videos {
a.thumbnail_link {
.ltr-float-left();
.ltr-margin-right(1rem);
.ltr-margin-left(0);
width: 10rem !important;
aspect-ratio: 16 / 9 !important;
}
.content {
overflow: hidden;
}
.embedded-video iframe {
width: 100%;
aspect-ratio: 16 / 9;
padding: 10px 0 0 0;
}
}
@supports not (aspect-ratio: 1 / 1) {
// support older browsers which do not have aspect-ratio
// https://caniuse.com/?search=aspect-ratio
.result-videos .embedded-video iframe {
height: calc(@results-width * 9 / 16);
}
}
.engines {
.ltr-float-right();
clear: both;