Skip to content

Commit

Permalink
Add (raw) category template
Browse files Browse the repository at this point in the history
  • Loading branch information
Mischback committed Mar 19, 2024
1 parent 2f0ea40 commit 2759d84
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 6 deletions.
7 changes: 6 additions & 1 deletion content/development/index.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@

:layout: category
:summary: Overview page for the development category.
:spotlight_uri: development/building-mischback-de
:spotlight_img: bar

###########
Development
###########

.. toctree::
:caption: Development
:titlesonly:
:glob:

Expand Down
5 changes: 5 additions & 0 deletions theme/mischback/_src/style/layouts/__layouts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@
* text-based content.
*/
@import "article";

/* Specify styling for category overviews. This corresponds to the template
* ``theme/mischback/category.html``.
*/
@import "category";
31 changes: 31 additions & 0 deletions theme/mischback/_src/style/layouts/category.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* This is the styling of the category overview pages.
*
* The corresponding template is ``theme/mischback/category.html``.
*/

.main-category {
display: grid;
grid-template:
". spotlight ."
". cat_body ."
/ 1fr calc(min($max-article-width, 100%)) 1fr;

@include for-breakpoint(layout-single-column) {
grid-template:
". spotlight spotlight spotlight ."
". cat_body cat_body cat_body ."
/ 1fr $max-article-width 3fr 20rem 1fr;
}

.spotlight {
@include content-box-visual;

grid-area: spotlight;
}

.category-body {
@include content-box-visual;

grid-area: cat_body;
}
}
10 changes: 5 additions & 5 deletions theme/mischback/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
{% endif %}
</div>
{{ body }}
{% if theme_show_breadcrumbs %}
<nav class="breadcrumbs" aria-label="Bottom Breadcrumbs">
{% include "includes/breadcrumbs.html" %}
</nav>
{% endif %}
{% if theme_show_breadcrumbs %}
<nav class="breadcrumbs" aria-label="Bottom Breadcrumbs">
{% include "includes/breadcrumbs.html" %}
</nav>
{% endif %}
</article>

<aside aria-label="Article Meta">
Expand Down
25 changes: 25 additions & 0 deletions theme/mischback/category.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% extends "layout.html" %}

{% block main_container %}
<main class="main-category">
<section class="spotlight">
<header>
{{ title }} Spotlight
</header>
<div>
<a href="{{ pathto(meta.spotlight_uri) }}">spotlight</a>
</div>
</section>

<section class="category-body">
<div>
{% if theme_show_breadcrumbs %}
<nav class="breadcrumbs" aria-label="Top Breadcrumbs">
{% include "includes/breadcrumbs.html" %}
</nav>
{% endif %}
</div>
{{ body }}
</section>
</main>
{% endblock main_container %}

0 comments on commit 2759d84

Please sign in to comment.