[mod] typification of SearXNG: add new result type Paper

This patch adds a new result type: Paper

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

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser
2025-09-10 16:10:42 +02:00
committed by Markus Heiser
parent 57ef342ad1
commit 7eedd44f5f
10 changed files with 318 additions and 46 deletions

View File

@@ -0,0 +1,72 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
/*
Layout of the Paper result class
*/
.result-paper {
.attributes {
display: table;
border-spacing: 0.125rem;
div {
display: table-row;
span {
font-size: 0.9rem;
margin-top: 0.25rem;
display: table-cell;
time {
font-size: 0.9rem;
}
}
span:first-child {
color: var(--color-base-font);
min-width: 10rem;
}
span:nth-child(2) {
color: var(--color-result-publishdate-font);
}
}
}
.content {
margin-top: 0.25rem;
}
.comments {
font-size: 0.9rem;
margin: 0.25rem 0 0 0;
padding: 0;
word-wrap: break-word;
line-height: 1.24;
font-style: italic;
}
}
@media screen and (max-width: @phone) {
.result-paper {
.attributes {
display: block;
div {
display: block;
span {
display: inline;
}
span:first-child {
font-weight: bold;
}
span:nth-child(2) {
.ltr-margin-left(0.5rem);
}
}
}
}
}

View File

@@ -309,11 +309,11 @@ article[data-vim-selected].category-social {
}
}
.result-paper,
.result-packages {
.attributes {
display: table;
border-spacing: 0.125rem;
margin-top: 0.3rem;
div {
display: table-row;
@@ -353,12 +353,6 @@ article[data-vim-selected].category-social {
}
}
.result-packages {
.attributes {
margin-top: 0.3rem;
}
}
.template_group_images {
display: flex;
flex-wrap: wrap;
@@ -1118,7 +1112,6 @@ summary.title {
display: none;
}
.result-paper,
.result-packages {
.attributes {
display: block;
@@ -1164,3 +1157,4 @@ pre code {
// import layouts of the Result types
@import "result_types/keyvalue.less";
@import "result_types/paper.less";