Move branches page to new template

d44a1801f359f7cca444db738d1f15e92d929671

Tucker McKnight <tucker@pangolin.lan> | Fri Jan 02 2026

Move branches page to new template

Change styling so that it uses bezel boxes instead of an
unordered list.

Has a placeholder for now where other info about each branch
should go.
js_templates/branches.ts:0
Before




























⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
⁣
After
-1
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import {NavHelper} from './helpers/nav.ts'

export default async (
  eleventyConfig: any,
  data: any,
  nav: ReturnType<typeof NavHelper>
) => {
  const slugify = eleventyConfig.getFilter("slugify")

  return `
    <div class="d-flex flex-wrap">
      ${data.branches.map((branch) => {
        return `
            ${branch.repoName === data.branchInfo.repoName
              ? `
                <div class="card bezel-gray m-2 flex-grow-1">
                  <div class="card-header">
                    <a class="card-title" href="${data.reposPath}/${slugify(branch.repoName)}/branches/${slugify(branch.branchName)}">${branch.branchName}</a>
                    ${branch.branchName === data.branchInfo.branchName ? '<div class="badge rounded-pill bg-secondary mx-1">current</div>' : ''}
                    ${branch.branchName === data.reposConfig.repos[branch.repoName].defaultBranch ? '<div class="badge rounded-pill bg-info text-dark mx-1">default</div>' : ''}
                  </div>
                  <div class="card-body">Data about branch goes here</div>
                </div>
              `
              : ''
            }
        `
      }).join('')}
    </div>
  `
}
js_templates/common/htmlPage.ts:121
Before
120
121
122
123
124
125
                      <a class="nav-link ${data.navTab === 'commits' ? 'active' : ''}" href="${nav.repoCurrentBranchCommits()}">Commits</a>
                    </li>
                    <li class="nav-item">
                      <a class="nav-link" href="${nav.repoCurrentBranchBranches()}">Branches</a>
                    </li>
                  </ul>
                </nav>
After
120
121
122
123
124
125
                      <a class="nav-link ${data.navTab === 'commits' ? 'active' : ''}" href="${nav.repoCurrentBranchCommits()}">Commits</a>
                    </li>
                    <li class="nav-item">
                      <a class="nav-link ${data.navTab === 'branches' ? 'active' : ''}" href="${nav.repoCurrentBranchBranches()}">Branches</a>
                    </li>
                  </ul>
                </nav>
main.ts:19
Before
18
19
20
21

22
import commitJsTemplate from './js_templates/commit.ts'
import commitsJsTemplate from './js_templates/commits.ts'
import indexJsTemplate from './js_templates/index.ts'

⁣
const ajv = new Ajv()
const exec = util.promisify(childProcess.exec)
After
18
19
20
21
22
23
import commitJsTemplate from './js_templates/commit.ts'
import commitsJsTemplate from './js_templates/commits.ts'
import indexJsTemplate from './js_templates/index.ts'
import branchesJsTemplate from './js_templates/branches.ts'

const ajv = new Ajv()
const exec = util.promisify(childProcess.exec)
main.ts:266
Before
265
266
267
268
269
270
271
272
273
274
    }
  )

  // BRANCHES.NJK
  const branchesTemplate = fsImport.readFileSync(`${import.meta.dirname}/templates/branches.njk`).toString()
  eleventyConfig.addTemplate(
    'repos/branches.njk',
    topLayoutPartial + branchesTemplate + bottomLayoutPartial,
    {
      pagination: {
        data: "branches",
After
265
266
267
268

269
270
271
272
273
    }
  )

  // BRANCHES.TS
⁣
  eleventyConfig.addTemplate(
    'repos/branches.11ty.js',
    htmlPage(reposConfiguration, eleventyConfig, branchesJsTemplate),
    {
      pagination: {
        data: "branches",
main.ts:286
Before
285
286
287
288
289
290
        nav: {
          repoName: (data) => data.branchInfo.repoName,
          branchName: (data) => data.branchInfo.branchName,
          path: "list"
        },
        currentRepo: (data) => reposData.find(repo => {
          return repo.name === data.branchInfo.repoName
After
285
286
287
288
289
290
        nav: {
          repoName: (data) => data.branchInfo.repoName,
          branchName: (data) => data.branchInfo.branchName,
          path: "branches"
        },
        currentRepo: (data) => reposData.find(repo => {
          return repo.name === data.branchInfo.repoName