Skip to content

Commit

Permalink
Merge pull request #20 from snohio/groups-template
Browse files Browse the repository at this point in the history
Groups template
  • Loading branch information
snohio authored Mar 25, 2024
2 parents d3410eb + 1c93140 commit 08177c0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/_data/groups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
group:
- name: Orlando Devs
- name: Orlando DevOps
description: Welcome to Orlando DevOps!
- name: Orlando Innovation League
- name: OrlandoJS
- name: Orlando PHP
Expand Down
2 changes: 1 addition & 1 deletion src/_includes/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="bg-base-300">

<div class="bg-base-100 container border rounded-md shadow-sm my-4 mx-auto px-6">
<h1 class="bg-clip-text text-transparent bg-gradient-to-br from-primary to-secondary mt-6 mb-6">{{title}}</h1>
<h1 class="bg-clip-text text-transparent bg-gradient-to-br from-primary to-secondary mt-6 mb-6">{{eleventyComputed.title or title}}</h1>

{{ content | safe }}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/_includes/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<ul tabindex="0" class="absolute z-[1] menu p-2 shadow bg-base-100 rounded-box w-52">

{% for community in groups.group %}
<li><a href="{{ community.url }}">{{ community.name }}</a></li>
<li><a href="/groups/{{ community.name | slugify }}/">{{ community.name }}</a></li>
{% endfor %}

</ul>
Expand Down
17 changes: 17 additions & 0 deletions src/groups/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
layout: about
pagination:
data: groups.group
size: 1
alias: group
permalink: "groups/{{ group.name | slugify }}/"
eleventyComputed:
# TODO: computed objects referencing paginated
# data is broken for nunjucks templates.
# potential fix in https://github.com/11ty/eleventy/pull/3120
# so this is a placeholder
# title: {{group.name}}
title: ODevs Community
---
<h2>{{group.name}}</h2>
{{group.description or "No description provided"}}

0 comments on commit 08177c0

Please sign in to comment.