{# MaatLog archive page — implements Theme API 1.0 blocks and semantic classes. #} {%- extends "layout.html" -%} {%- block extrahead -%} {{ super() }} {%- block maatlog_head -%} {%- for feed in maatlog.feeds -%} {%- endfor -%} {%- endblock maatlog_head -%} {%- endblock extrahead -%} {%- block body -%} {%- block maatlog_archive_header -%} {%- set is_home = maatlog.archive and maatlog.archive.is_home -%} {%- if is_home -%} {{ maatlog.site.title|e }} {%- if maatlog.site.tagline -%} {{ maatlog.site.tagline|e }} {%- endif -%} {{ maatlog.archive.total_posts }} posts {%- if maatlog.posts and maatlog.posts[0].published_at -%} {{ maatlog.posts[0].published_at.strftime('%Y-%m-%d') }} {%- endif -%} {%- include "maatlog/components/feed-links.html" -%} {%- else -%} {%- if maatlog.archive -%} {{ maatlog.archive.label|e }} {{ maatlog.archive.kind|e }} {{ maatlog.archive.total_posts }} posts {%- else -%} {{ title|e }} {%- endif -%} {%- endif -%} {%- endblock maatlog_archive_header -%} {%- block maatlog_archive_filter -%} {#- チップはこのページのカードにある分類だけを出す。サイト全体の分類を出すと、 ページ送りの 2 ページ目以降で「実在するのに該当なし」と誤って表示される。 表示順とラベルの源は maatlog.taxonomies のまま、ID で交差させる。 -#} {%- set page_tag_ids = maatlog.posts | map(attribute="tags") | sum(start=()) -%} {%- set page_category_ids = maatlog.posts | map(attribute="categories") | sum(start=()) -%} {%- set page_author_ids = maatlog.posts | map(attribute="authors") | sum(start=()) -%} {%- set filter_tags = maatlog.taxonomies.tags | selectattr("id", "in", page_tag_ids) | list -%} {%- set filter_categories = maatlog.taxonomies.categories | selectattr("id", "in", page_category_ids) | list -%} {%- set filter_authors = maatlog.taxonomies.authors | selectattr("id", "in", page_author_ids) | list -%} {%- if filter_tags or filter_categories or filter_authors -%} {%- set filter_axes = [ ("Tag", filter_tags, "tag"), ("Category", filter_categories, "category"), ("Author", filter_authors, "author"), ] -%} {%- for label, items, axis in filter_axes -%} {%- if items -%} {{ label }} {%- for item in items -%} {{ item.label|e }} {%- endfor -%} {%- endif -%} {%- endfor -%} Clear all {#- チップ操作は URL 遷移もフォーカス移動も伴わないので、0 件になったことは ライブリージョンでしか伝わらない。 -#} No matching posts. {%- endif -%} {%- endblock maatlog_archive_filter -%} {%- block maatlog_archive_items -%} {%- if maatlog.archive and maatlog.archive.is_home -%} {%- with featured_cards=maatlog.featured, latest_cards=maatlog.latest, latest_heading="Latest articles" -%} {%- include "maatlog/components/post-grid.html" -%} {%- endwith -%} {%- else -%} {%- with cards=maatlog.posts -%} {%- include "maatlog/components/post-grid.html" -%} {%- endwith -%} {%- endif -%} {%- endblock maatlog_archive_items -%} {%- block maatlog_post_header -%}{%- endblock maatlog_post_header -%} {%- block maatlog_post_meta -%}{%- endblock maatlog_post_meta -%} {%- block maatlog_post_body -%}{%- endblock maatlog_post_body -%} {%- block maatlog_post_navigation -%}{%- endblock maatlog_post_navigation -%} {%- block maatlog_profile_header -%}{%- endblock maatlog_profile_header -%} {%- block maatlog_profile_body -%}{%- endblock maatlog_profile_body -%} {%- block maatlog_pagination -%} {%- include "maatlog/components/pagination.html" -%} {%- endblock maatlog_pagination -%} {#- The sidebar now lives in the layout's left column (Theme API 1.2). The block stays because it is a required block of the contract. -#} {%- block maatlog_sidebar -%}{%- endblock maatlog_sidebar -%} {%- endblock body -%}
{{ maatlog.site.tagline|e }}
{{ maatlog.archive.total_posts }} posts {%- if maatlog.posts and maatlog.posts[0].published_at -%} {{ maatlog.posts[0].published_at.strftime('%Y-%m-%d') }} {%- endif -%}
{{ maatlog.archive.kind|e }} {{ maatlog.archive.total_posts }} posts
No matching posts.