the repository which powers this website
Diffstat (limited to 'themed/index.html')
-rw-r--r--themed/index.html31
1 files changed, 6 insertions, 25 deletions
diff --git a/themed/index.html b/themed/index.html
index 6933898c..6e88d435 100644
--- a/themed/index.html
+++ b/themed/index.html
@@ -4,24 +4,16 @@
{% page cgit_print_repolist %}
{! ctx.page.title = ctx.cfg.root_title; !}
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
- <title>{{ ctx.cfg.root_title }}</title>
- <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap">
- <link rel="stylesheet" href="/style.css">
- </head>
- <body class="text-gray-900">
+{! page_start(); !}
<header class="bg-gray-50 border-b border-gray-300">
{# Repo header #}
<div class="max-w-[1280px] mx-auto py-4 flex gap-x-1">
- <a href="{! cgit_shared_site_url(NULL, NULL, NULL, 0, 1); !}" class="text-lg hover:underline">{{ ctx.cfg.root_title }}</a>
+ <a href="{{ cgit_rooturl()|attr }}" class="text-lg hover:underline">{{ ctx.cfg.root_title }}</a>
</div>
</header>
<main class="max-w-[1280px] mx-auto py-4">
{# Main content #}
- <form method="GET" action="{! cgit_shared_site_url(NULL, NULL, NULL, 0, 1); !}" class="flex text-sm mb-4 outline-1 outline-gray-300 rounded-lg has-[input:focus-within]:outline-2 has-[input:focus-within]:outline-blue-600">
+ <form method="GET" action="{{ cgit_rooturl()|attr }}" class="flex text-sm mb-4 outline-1 outline-gray-300 rounded-lg has-[input:focus-within]:outline-2 has-[input:focus-within]:outline-blue-600">
{# Search box #}
<input name="q" value="{{ ctx.qry.search|attr }}" type="text" placeholder="Search repos&hellip;" class="flex-1 py-1.5 pl-2 text-sm focus:outline-none">
<button class="py-1.5 px-2 cursor-pointer" action="submit" value="search">
@@ -31,7 +23,7 @@
</form>
<div class="grid grid-cols-[auto_1fr]">
{# Repo list #}
- {! for (int i = 0; i < cgit_repolist.count; i++) { !}
+ {% for int i = 0; i < cgit_repolist.count; i++ %}
{! ctx.repo = &cgit_repolist.repos[i]; !}
{! if (!cgit_repolist_is_visible(ctx.repo)) { continue; } !}
<div{% if i > 0 %} class="border-t border-gray-300 pt-4 mt-4"{% endif %}>
@@ -45,19 +37,8 @@
<div class="text-gray-500">{{ ctx.repo->desc }}</div>
<div class="text-gray-500">Updated {! cgit_repolist_print_modtime(ctx.repo); !} ago</div>
</div>
- {! } !}
+ {% endfor %}
</div>
</main>
- <footer class="border-t border-gray-300">
- {# Footer panel #}
- <div class="max-w-[1280px] mx-auto py-4">
- <div class="text-sm text-gray-500">
- {# cgit footer #}
- generated by <a href="https://git.zx2c4.com/cgit/about/" class="hover:text-blue-600 hover:underline">cgit {{ cgit_version }}</a> (<a href="https://git-scm.com/" class="hover:text-blue-600 hover:underline">git {{ git_version_string }}</a>) at
- {{ show_date(time(NULL), 0, cgit_date_mode(DATE_ISO8601)) }}
- </div>
- </div>
- </footer>
- </body>
-</html>
+{! page_end(); !}
{% endpage %}