diff options
| author | Jieiku | 2022-05-30 22:38:50 -0700 |
|---|---|---|
| committer | Jieiku | 2022-05-30 22:38:50 -0700 |
| commit | 03f402c3e4fe8865571cf462e60dec5e0c9b713a (patch) | |
| tree | 7beb2a634bc4a3ebfdfa20bacdba8fa663b591cb /templates/base.html | |
| parent | 9c1f02f9099b0da48c0bec7f23fa8c0566a331f3 (diff) | |
| download | abridge-03f402c3e4fe8865571cf462e60dec5e0c9b713a.tar.gz abridge-03f402c3e4fe8865571cf462e60dec5e0c9b713a.tar.bz2 abridge-03f402c3e4fe8865571cf462e60dec5e0c9b713a.zip | |
Add Search and Improve Contrast
Diffstat (limited to 'templates/base.html')
| -rw-r--r-- | templates/base.html | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/templates/base.html b/templates/base.html index f43dcba..18e1fb4 100644 --- a/templates/base.html +++ b/templates/base.html @@ -8,6 +8,24 @@ {% block title %}<title>{% if page.title %}{{ page.title }} | {% endif %}{{ config.title }}</title>{% endblock title %} + {% if is_404 %} + <meta name="robots" content="noindex, follow"> + {% else %} + <meta name="robots" content="index, follow"> + <meta name="googlebot" content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1"> + <meta name="bingbot" content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1"> + {% endif %} + {% if current_url %} + {% set page_url = current_url %} + {% else %} + {% set page_url = get_url(path="404.html") %} + {% endif %} + {% if current_path %} + {% set page_path = current_path %} + {% else %} + {% set page_path = "/404.html" %} + {% endif %} + {% block description %} {% if page.description %} <meta name="description" content="{{ page.description }}" /> @@ -40,8 +58,7 @@ {% if config.extra.google %}<meta name="google-site-verification" content="{{ config.extra.google | safe }}">{% endif %} {% if config.extra.bing %}<meta name="msvalidate.01" content="{{ config.extra.bing | safe}}">{% endif %} <meta name="referrer" content="no-referrer-when-downgrade"> - <meta name="robots" content="index, follow"> - <meta name="googlebot" content="index,follow"> + <meta name="HandheldFriendly" content="True"> <meta name="mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes"> @@ -109,6 +126,11 @@ {% endif %} {% endif %} + {% if config.build_search_index %} + <script type="text/javascript" src="{{ get_url(path="search_index.en.js", trailing_slash=false, cachebust=true) | safe }}" defer></script> + <script type="text/javascript" src="{{ get_url(path="search.min.js", trailing_slash=false, cachebust=true) | safe }}" defer></script> + {% endif %} + {% block extra_head %}{% endblock extra_head %} </head> <body> @@ -118,11 +140,19 @@ <header> <h1><a href="{{ get_url(path="/", trailing_slash=true) }}">{{ config.extra.textlogo | safe }}</a></h1> </header> - <div overflow> + <div> <ul> {% for i in config.extra.menu %}<li><h2><a href="{{ get_url(path=i.url, trailing_slash=i.slash) }}">{{ i.name }}</a></h2></li>{% endfor %} </ul> </div> + {% if config.build_search_index %} + <div> + <form> + <input id="userinput" type="search" placeholder="Search" autocomplete="off"> + <div><div id="suggestions"></div></div> + </form> + </div> + {% endif %} </nav> {% if config.extra.sitedesc %} {% if config.description %} |
