summaryrefslogtreecommitdiff
path: root/searx/templates/simple/macros.html
AgeCommit message (Collapse)Author
2024-10-05[mod] favicons: simplify RTL in template & CSSMarkus Heiser
Comes from a sughgestion in: - https://github.com/searxng/searxng/pull/3727#issuecomment-2388998803 Suggested-by: Bnyro <bnyro@tutanota.com> Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-05[mod] Revision of the favicon solutionMarkus Heiser
All favicons implementations have been documented and moved to the Python package: searx.favicons There is a configuration (based on Pydantic) for the favicons and all its components: searx.favicons.config A solution for caching favicons has been implemented: searx.favicon.cache If the favicon is already in the cache, the returned URL is a data URL [1] (something like `data:image/png;base64,...`). By generating a data url from the FaviconCache, additional HTTP roundtripps via the favicon_proxy are saved: favicons.proxy.favicon_url The favicon proxy service now sets a HTTP header "Cache-Control: max-age=...": favicons.proxy.favicon_proxy The resolvers now also provide the mime type (data, mime): searx.favicon.resolvers [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-10-05[feat] add favicons to result urlsBrock Vojkovic
2024-07-27[feat] videos template: support for view countBnyro
2024-05-16[mod] simple theme: drop img_src from default resultsMarkus Heiser
The use of img_src AND thumbnail in the default results makes no sense (only a thumbnail is needed). In the current state this is rather confusing, because img_src is displayed like a thumbnail (small) and thumbnail is displayed like an image (large). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-01[fix] remove missing link icon macroallixx
2024-01-31[fix] justify engines/cached/proxied verticallyallixx
2023-06-02[mod] template preferences: split into elements (no functional change)Markus Heiser
HINT: this patch has no functional change / it is the preparation for following changes and bugfixes Over the years, the preferences template became an unmanageable beast. To make the source code more readable the monolith is splitted into elements. The splitting into elements also has the advantage that a new template can make use of them. The reversed checkbox is a quirk that is only used in the prefereces and must be eliminated in the long term. For this the macro 'checkbox_onoff_reversed' was added to the preferences.html template. The 'checkbox' macro is also a quirk of the preferences.html we don't want to use in other templates (it is an input-checkbox in a HTML form that was misused for status display). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-09-04[mod] option 'ui: cache_url:' to configure internet cache or archiveMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-19[fix] add missing result.length and result.author to simple themeMarkus Heiser
Closes: https://github.com/searxng/searxng/issues/1027 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-19[fix] simple theme: open preferences with general tabMarkus Heiser
BTW: fix also the category tab to open with category 'general' Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-08[enh] simple: basic ARIA fixesAlexandre Flament
2022-03-02[simple] checkboxes can get the focusableAlexandre Flament
Do note that checkboxes in the engine tab are displayed reversed. See: https://github.com/searxng/searxng/blob/3408d061aab9abc6168fec9bbc6deab71b236dac/searx/templates/simple/preferences.html#L313 A checkbox for an engine is checked when the engine is disabled.
2022-01-25[fix] simple theme: don't crash when the checker is enabledAlexandre Flament
The macro "checkbox" in macros.html uses the macro "icon_small" from icons.html The commit imports icon_small in macros.html to fix the issue. It works because the macros in macros.html are imported with the Jinja2 context. See https://jinja.palletsprojects.com/en/3.0.x/templates/#import-visibility close #819
2021-12-15[fix] lazy loading of <img> tagsMarkus Heiser
Images should include dimension attributes. Without `width` and `height` specified, image dimensions are 0×0 pixels at first. ... In this case the browser determines that all of them are visible to the user and decides to load everything [1]. In CSS the `width` is set to a value and the `height` is unsed to scale the image proportional in both dimensions. [1] https://web.dev/browser-level-image-lazy-loading/#images-should-include-dimension-attributes [2] https://caniuse.com/loading-lazy-attr Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-25[fix] simple-theme templates: polish HTML <img> elementsMarkus Heiser
- <img> [1] element does not have an end tag, no need for a leading `/>` - add global attribute title[2] to result_templates/images.html (result-images-source) - in jinja macro 'macro result_header' remove duplicate of class="image" - in jinja macro 'macro result_header' remove alt attribute (fix [3]):: alt="{{ result.title|striptags }}" the result.title is already shown in:: <h3>{{ result_link(result.url, result.title|safe) }}</h3> [1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img [2] https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-title [3] https://github.com/searxng/searxng/issues/523 Closes: https://github.com/searxng/searxng/issues/523 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-21[simple theme] rework select; add safesearch to search and replace / with ↵mrpaulblack
› in article url * rework selection UI in pref (fix based on: https://github.com/twelsby/searx/commit/78643e9f43a103c523f112e9f3ce26a5c7bb3a0f) * moved search filters underneath categories * cut params from url and replace / with › * make h3 and url in article bigger * add safe search select to search filter (this will not override settings and only be valid while on result page in a session) * make search form button not overlap each other when js is disabled * 1rem padding around preview image and thumbnail in default article template
2021-11-13[simple theme] update to ion icons 5 and drop webfontMrPaulBlack
* update from ionicons-npm to ionicons ver.5 * drop the webfont built by grunt for icons * built icons.html template for inlining icons with jinja2 into html * update icon to use mostly the outline version * add icons to categories and do not display them on mobile to save space * remove all legacy ion icon font files from simple theme * icons.html is added in this commit since make statc.build.restore requires git to know the file already * cleanup error-dialog
2021-10-27[simple theme] make url clickable and cleanup result article headerMrPaulBlack
* url in article head is clickable * url is bigger now 0.96em font * url is now left floating on tablet and phone * there is a 8px top and bottom margin on h3 result heading
2021-10-09[template] move result url to top of articleMrPaulBlack
2021-05-04[mod] option to enable or disable "proxy" button next to each result (#54)Markus Heiser
* [mod] option to enable or disable "proxy" button next to each result Closes: https://github.com/searxng/searxng/issues/51 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de> Co-authored-by: Alexandre Flament <alex@al-f.net>
2021-04-22[enh] themes - add result.metadata to result sub headerMarkus Heiser
Signed-off-by: Markus Heiser <markus@darmarit.de>
2021-04-21[mod] oscar: /preferences , engines tab: report engine timesAlexandre Flament
* display the median time instead of the average. * add a "Reliability" column (sum up the metrics and the checker results). * the "selected language", "SafeSearch", "Time range" values are displayed as "broken" when the checker tests fail.
2020-12-09display if an engine does not support httpsNoémi Ványi
Closes #302
2020-06-09[enh] add engine names to results as classes - closes #670Adam Tauber
2017-10-18Remove / in url_for parameter for simple themeHypolite Petovan
Same change as with the oscar theme.
2017-09-08[fix] static path fixed in templates and webapp, line endings fixedmisnyo
2017-08-06[enh] add simple theme (WIP)Alexandre Flament