Search results should indicate what kind of file is being linked to: is it a HTML page, a textfile etc
assigned to @btasker
We actually already almost have this
ico = document.createElement('div'); ico.className = "ico " + res['content-type']; link.appendChild(ico);
The template from my old search portal did this. However, the content-type it returned wasn't a mime type, but values such as page. Should just need to rejig the CSS to work with actual content types.
content-type
page
mentioned in commit 6b193016d39fbc95f0344e1deda44173c0344793
Commit: 6b193016d39fbc95f0344e1deda44173c0344793 Author: B Tasker Date: 2023-12-29T11:28:32.000+00:00
feat: show icon for certain mime-types (utilities/file_location_listing#9)
If there isn't a matching CSS rule the icon block will default to display:none
display:none
This is done:
I moved the icon from the end of the title to the beginning - that way if the title is long enough to get truncated the icon is still visible
Activity
29-Dec-23 11:15
assigned to @btasker
29-Dec-23 11:18
We actually already almost have this
The template from my old search portal did this. However, the
content-type
it returned wasn't a mime type, but values such aspage
. Should just need to rejig the CSS to work with actual content types.29-Dec-23 11:29
mentioned in commit 6b193016d39fbc95f0344e1deda44173c0344793
Message
feat: show icon for certain mime-types (utilities/file_location_listing#9)
If there isn't a matching CSS rule the icon block will default to
display:none
29-Dec-23 11:30
This is done:
I moved the icon from the end of the title to the beginning - that way if the title is long enough to get truncated the icon is still visible