From dbb135a12ef05586b9706ece89ff65bfb79a0727 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 21 May 2025 14:11:44 -0500 Subject: [PATCH] better sections --- content/groups/_index.md | 2 +- static/css/main.css | 7 +++++++ templates/section.html | 25 ++++++++++++++++++------- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/content/groups/_index.md b/content/groups/_index.md index d0c8c49..de5c7a5 100644 --- a/content/groups/_index.md +++ b/content/groups/_index.md @@ -1,7 +1,7 @@ +++ title = "Groups" description = "" -template = "other_section.html" +template = "section.html" +++ diff --git a/static/css/main.css b/static/css/main.css index a99151f..e1a3b29 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -594,6 +594,9 @@ .flex-wrap { flex-wrap: wrap; } + .content-center { + align-content: center; + } .items-center { align-items: center; } @@ -991,6 +994,10 @@ --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); } + .shadow-xl { + --tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 8px 10px -6px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } .ring-1 { --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); diff --git a/templates/section.html b/templates/section.html index 0db0639..6d9ca72 100644 --- a/templates/section.html +++ b/templates/section.html @@ -13,34 +13,45 @@ {{ paginator }} {% set pages = paginator.pages %} {% else %} - {% set pages = section.subsections %} + {% if section.subsections %} + {% set pages = section.subsections %} + {% set subs = section.subsections %} + {% else %} + {% set pages = section.pages %} + {% endif %} {% endif %} {% for page in pages %} - {% if page %} + {% if subs %} {% set page = get_section(path=page) %} {% endif %} + + {% if page.extra.image %} {% set image = page.path ~ page.extra.image %} + {% endif %} {% if image %} {% set resized = resize_image(path="/content" ~ image, width=200, height=200, op="fit_height") %} {% else %} {% set resized = "" %} {% endif %} -
+
-
- + {% if resized %} +
+
+ {% else %} + {% endif %}

{{ page.title }}

-

{{ page.description }}

+

{{ page.description }}

-