diff --git a/client/simple/src/less/result_types/video.less b/client/simple/src/less/result_types/video.less new file mode 100644 index 000000000..a9e01a6fb --- /dev/null +++ b/client/simple/src/less/result_types/video.less @@ -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; + } +} diff --git a/client/simple/src/less/style.less b/client/simple/src/less/style.less index 3bb13e80f..b7c1e4c48 100644 --- a/client/simple/src/less/style.less +++ b/client/simple/src/less/style.less @@ -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; diff --git a/docs/dev/result_types/main/video.rst b/docs/dev/result_types/main/video.rst new file mode 100644 index 000000000..5e13f928f --- /dev/null +++ b/docs/dev/result_types/main/video.rst @@ -0,0 +1,7 @@ +.. _result_types.video: + +============= +Video Results +============= + +.. automodule:: searx.result_types.video diff --git a/docs/dev/result_types/main_result.rst b/docs/dev/result_types/main_result.rst index acf539a8a..9379eeff0 100644 --- a/docs/dev/result_types/main_result.rst +++ b/docs/dev/result_types/main_result.rst @@ -19,13 +19,13 @@ following types have been implemented so far .. main/paper main/file main/image + main/video The :ref:`LegacyResult ` is used internally for the results that have not yet been typed. The templates can be used as orientation until the final typing is complete. - :ref:`template default` / :py:obj:`Result` -- :ref:`template videos` - :ref:`template torrent` - :ref:`template map` - :ref:`template packages` diff --git a/docs/dev/templates.rst b/docs/dev/templates.rst index 2b04e02de..e7d0ff49b 100644 --- a/docs/dev/templates.rst +++ b/docs/dev/templates.rst @@ -129,29 +129,6 @@ audio_src : uri, URL of an embedded ``