From 1762568c85d8a10e87913dea622405ea66e393fd Mon Sep 17 00:00:00 2001 From: Franciszek Stachura Date: Thu, 22 Aug 2024 13:03:42 +0200 Subject: [PATCH] web: Meta descriptions improvements * Make source tree descriptions shorter * Make default title more descriptive * Add a short summary of results to ident search description --- templates/ident.html | 17 ++++++++++++++--- templates/layout.html | 2 +- templates/source.html | 4 ++-- templates/tree.html | 4 ++-- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/templates/ident.html b/templates/ident.html index e96875f..7781494 100644 --- a/templates/ident.html +++ b/templates/ident.html @@ -1,12 +1,23 @@ {% extends "layout.html" %} {% block title %} - {{ searched_ident|e }} identifier - {{ current_project|capitalize }} source code {{ current_tag }} - Bootlin + {{ searched_ident|e }} identifier - {{ current_project|capitalize }} source code {{ current_tag }} - Bootlin Elixir Cross Referencer {% endblock %} {% block description -%} - Elixir Cross Referencer - identifier references search for {{ current_project|capitalize }} (version {{ current_tag }}). Searched identifier: {{ searched_ident|e }} -{%- endblock %} + Elixir Cross Referencer - {{ searched_ident|e }} identifier references search for {{ current_project|capitalize }} {{ current_tag }}. + {%- for section in symbol_sections -%} + {%- if 'symbols' in section -%} + {%- for type, symbols in (section['symbols'].items()) -%} + {%- if (symbols|length) == 1 %} + {{ section['title'] }} {{- ' as a '+type if type != '_unknown' else '' }} in {{ symbols[0].path }}. + {%- else %} + {{ section['title'] }} in {{ symbols|length }} files {{- ' as a '+type if type != '_unknown' else '' -}}: {{ symbols[0].path }}... + {%- endif %} + {%- endfor -%} + {%- endif -%} + {%- endfor -%} +{%- endblock -%} {% block main %} diff --git a/templates/layout.html b/templates/layout.html index d977f56..29a7fd7 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -6,7 +6,7 @@ {% block title %} - Elixir - Bootlin + Bootlin - Elixir Cross Referencer {% endblock %}