online-judge/templates/home.html
Quantum eda67c54e2 Rework misc config to run exactly one query
There should never be that much stuff in MiscConfig, so let's just read
it all and deal with it in python instead of trying to run one query
for each item of interest and poorly cache it.

This PR also moved MiscConfigDict into a middleware so it can be used
outside of templates.
2023-02-23 04:10:57 +00:00

24 lines
973 B
HTML

{% extends "blog/list.html" %}
{% block before_posts %}
{% if misc_config.home_page_top %}
{{ render_django(misc_config.home_page_top, request=request, user_count=user_count, problem_count=problem_count, submission_count=submission_count, language_count=language_count, perms=perms) }}
{% endif %}
{% endblock %}
{% block meta %}
{% if misc_config.meta_description %}
<meta name="description" content="{{ misc_config['meta_description'] }}">
{% endif %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"url": "{{ DMOJ_SCHEME }}://{{ site.domain }}/",
"potentialAction": {
"@type": "SearchAction",
"target": "{{ DMOJ_SCHEME }}://{{ site.domain }}/problems/?search={search_term_string}",
"query-input": "required name=search_term_string"
}
}
</script>
{% endblock %}