author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2010-12-23 11:47:54 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2011-02-19 13:41:39 (UTC) |
commit | 808c685ebb7cd2d24d3881b74e3be2439bd1393b (patch) (unidiff) | |
tree | 5bb224b73bbbc7d57864c587cc022fcc9826f4b3 /cgit.h | |
parent | 17596459fe9a43428a261e66f65b227d15bf7ee5 (diff) | |
download | cgit-808c685ebb7cd2d24d3881b74e3be2439bd1393b.zip cgit-808c685ebb7cd2d24d3881b74e3be2439bd1393b.tar.gz cgit-808c685ebb7cd2d24d3881b74e3be2439bd1393b.tar.bz2 |
implement repo.logo and repo.logo-link
Allow for per repo logo and logo-link; Use global logo and logo-link per
default.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgit.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -25,96 +25,98 @@ | |||
25 | /* | 25 | /* |
26 | * Dateformats used on misc. pages | 26 | * Dateformats used on misc. pages |
27 | */ | 27 | */ |
28 | #define FMT_LONGDATE "%Y-%m-%d %H:%M:%S (%Z)" | 28 | #define FMT_LONGDATE "%Y-%m-%d %H:%M:%S (%Z)" |
29 | #define FMT_SHORTDATE "%Y-%m-%d" | 29 | #define FMT_SHORTDATE "%Y-%m-%d" |
30 | #define FMT_ATOMDATE "%Y-%m-%dT%H:%M:%SZ" | 30 | #define FMT_ATOMDATE "%Y-%m-%dT%H:%M:%SZ" |
31 | 31 | ||
32 | 32 | ||
33 | /* | 33 | /* |
34 | * Limits used for relative dates | 34 | * Limits used for relative dates |
35 | */ | 35 | */ |
36 | #define TM_MIN 60 | 36 | #define TM_MIN 60 |
37 | #define TM_HOUR (TM_MIN * 60) | 37 | #define TM_HOUR (TM_MIN * 60) |
38 | #define TM_DAY (TM_HOUR * 24) | 38 | #define TM_DAY (TM_HOUR * 24) |
39 | #define TM_WEEK (TM_DAY * 7) | 39 | #define TM_WEEK (TM_DAY * 7) |
40 | #define TM_YEAR (TM_DAY * 365) | 40 | #define TM_YEAR (TM_DAY * 365) |
41 | #define TM_MONTH (TM_YEAR / 12.0) | 41 | #define TM_MONTH (TM_YEAR / 12.0) |
42 | 42 | ||
43 | 43 | ||
44 | /* | 44 | /* |
45 | * Default encoding | 45 | * Default encoding |
46 | */ | 46 | */ |
47 | #define PAGE_ENCODING "UTF-8" | 47 | #define PAGE_ENCODING "UTF-8" |
48 | 48 | ||
49 | typedef void (*configfn)(const char *name, const char *value); | 49 | typedef void (*configfn)(const char *name, const char *value); |
50 | typedef void (*filepair_fn)(struct diff_filepair *pair); | 50 | typedef void (*filepair_fn)(struct diff_filepair *pair); |
51 | typedef void (*linediff_fn)(char *line, int len); | 51 | typedef void (*linediff_fn)(char *line, int len); |
52 | 52 | ||
53 | struct cgit_filter { | 53 | struct cgit_filter { |
54 | char *cmd; | 54 | char *cmd; |
55 | char **argv; | 55 | char **argv; |
56 | int old_stdout; | 56 | int old_stdout; |
57 | int pipe_fh[2]; | 57 | int pipe_fh[2]; |
58 | int pid; | 58 | int pid; |
59 | int exitstatus; | 59 | int exitstatus; |
60 | }; | 60 | }; |
61 | 61 | ||
62 | struct cgit_repo { | 62 | struct cgit_repo { |
63 | char *url; | 63 | char *url; |
64 | char *name; | 64 | char *name; |
65 | char *path; | 65 | char *path; |
66 | char *desc; | 66 | char *desc; |
67 | char *owner; | 67 | char *owner; |
68 | char *defbranch; | 68 | char *defbranch; |
69 | char *module_link; | 69 | char *module_link; |
70 | char *readme; | 70 | char *readme; |
71 | char *section; | 71 | char *section; |
72 | char *clone_url; | 72 | char *clone_url; |
73 | char *logo; | ||
74 | char *logo_link; | ||
73 | int snapshots; | 75 | int snapshots; |
74 | int enable_log_filecount; | 76 | int enable_log_filecount; |
75 | int enable_log_linecount; | 77 | int enable_log_linecount; |
76 | int enable_remote_branches; | 78 | int enable_remote_branches; |
77 | int enable_subject_links; | 79 | int enable_subject_links; |
78 | int max_stats; | 80 | int max_stats; |
79 | time_t mtime; | 81 | time_t mtime; |
80 | struct cgit_filter *about_filter; | 82 | struct cgit_filter *about_filter; |
81 | struct cgit_filter *commit_filter; | 83 | struct cgit_filter *commit_filter; |
82 | struct cgit_filter *source_filter; | 84 | struct cgit_filter *source_filter; |
83 | }; | 85 | }; |
84 | 86 | ||
85 | typedef void (*repo_config_fn)(struct cgit_repo *repo, const char *name, | 87 | typedef void (*repo_config_fn)(struct cgit_repo *repo, const char *name, |
86 | const char *value); | 88 | const char *value); |
87 | 89 | ||
88 | struct cgit_repolist { | 90 | struct cgit_repolist { |
89 | int length; | 91 | int length; |
90 | int count; | 92 | int count; |
91 | struct cgit_repo *repos; | 93 | struct cgit_repo *repos; |
92 | }; | 94 | }; |
93 | 95 | ||
94 | struct commitinfo { | 96 | struct commitinfo { |
95 | struct commit *commit; | 97 | struct commit *commit; |
96 | char *author; | 98 | char *author; |
97 | char *author_email; | 99 | char *author_email; |
98 | unsigned long author_date; | 100 | unsigned long author_date; |
99 | char *committer; | 101 | char *committer; |
100 | char *committer_email; | 102 | char *committer_email; |
101 | unsigned long committer_date; | 103 | unsigned long committer_date; |
102 | char *subject; | 104 | char *subject; |
103 | char *msg; | 105 | char *msg; |
104 | char *msg_encoding; | 106 | char *msg_encoding; |
105 | }; | 107 | }; |
106 | 108 | ||
107 | struct taginfo { | 109 | struct taginfo { |
108 | char *tagger; | 110 | char *tagger; |
109 | char *tagger_email; | 111 | char *tagger_email; |
110 | unsigned long tagger_date; | 112 | unsigned long tagger_date; |
111 | char *msg; | 113 | char *msg; |
112 | }; | 114 | }; |
113 | 115 | ||
114 | struct refinfo { | 116 | struct refinfo { |
115 | const char *refname; | 117 | const char *refname; |
116 | struct object *object; | 118 | struct object *object; |
117 | union { | 119 | union { |
118 | struct taginfo *tag; | 120 | struct taginfo *tag; |
119 | struct commitinfo *commit; | 121 | struct commitinfo *commit; |
120 | }; | 122 | }; |