From d090f61543fd915132260cffdd0ba442eb3464fd Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Sat, 4 Dec 2021 22:05:33 +0100 Subject: [PATCH] Add search for js-enabled browsers --- sass/style.scss | 11 ++++++++++- templates/index.html | 1 + templates/macros.html | 2 +- templates/posts.html | 27 +++++++++++++++++++++++++++ 4 files changed, 39 insertions(+), 2 deletions(-) diff --git a/sass/style.scss b/sass/style.scss index 578b1d7..327e93e 100644 --- a/sass/style.scss +++ b/sass/style.scss @@ -75,7 +75,7 @@ aside { main { margin-bottom: 5rem; - article h1 a { color: inherit } + article h2 a { color: inherit } .info { border-top: 1px solid #eee; margin: 2em 0; @@ -131,6 +131,15 @@ main { overflow: auto; border-radius: .3em; } + input.search { + display: none; // Hide for non-js browsers + box-sizing: border-box; + width: 100%; + border: 1px solid #bbb; + padding: .5em 1em; + margin: 1em 0; + outline: none; + } } a { diff --git a/templates/index.html b/templates/index.html index 333aa65..fdb4859 100644 --- a/templates/index.html +++ b/templates/index.html @@ -24,5 +24,6 @@ {{ macros::list_posts(section="posts", count=config.extra.latest_posts_count) }} {% endblock %} + {% block script %}{% endblock %} diff --git a/templates/macros.html b/templates/macros.html index 98a524a..f10d52e 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -12,7 +12,7 @@ {% macro print_article(page) %}
-

{{ page.title }}

+

{{ page.title }}

{{ page.summary | safe }}

{{ self::page_info(page=page) }}
diff --git a/templates/posts.html b/templates/posts.html index 3db7726..d8360b5 100644 --- a/templates/posts.html +++ b/templates/posts.html @@ -6,5 +6,32 @@ {% block content %}

{{ section.title }}

+ {{ macros::list_posts() }} {% endblock content %} + +{% block script %} + +{% endblock %}