Sort repos by age on index page
This commit is contained in:
parent
2460441ce7
commit
cca01672a2
@ -1,6 +1,4 @@
|
||||
{! int cgit_repolist_is_visible(struct cgit_repo *repo); !}
|
||||
{! void cgit_repolist_print_modtime(struct cgit_repo *repo); !}
|
||||
{! void cgit_shared_site_url(const char *page, const char *search, const char *sort, int ofs, int always_root); !}
|
||||
{! #include "../ui-repolist.h" !}
|
||||
|
||||
{% page cgit_print_repolist %}
|
||||
{! ctx.page.title = ctx.cfg.root_title; !}
|
||||
@ -23,6 +21,7 @@
|
||||
</form>
|
||||
<div class="grid grid-cols-[auto_1fr]">
|
||||
{# Repo list #}
|
||||
{! cgit_repolist_sort_repolist("idle"); !}
|
||||
{% for int i = 0; i < cgit_repolist.count; i++ %}
|
||||
{! ctx.repo = &cgit_repolist.repos[i]; !}
|
||||
{! if (!cgit_repolist_is_visible(ctx.repo)) { continue; } !}
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
extern int cgit_repolist_is_visible(struct cgit_repo *repo);
|
||||
extern void cgit_repolist_print_modtime(struct cgit_repo *repo);
|
||||
extern int cgit_repolist_sort_repolist(char *field);
|
||||
|
||||
extern void cgit_print_repolist(void);
|
||||
extern void cgit_print_site_readme(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user