Blob


1 /*
2 * Copyright (c) 2019 Tracey Emery <tracey@traceyemery.net>
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
17 /*
18 * header nav
19 *
20 * ***index
21 * search
22 * Projects
23 * Project|Description|Owner|Last Commit
24 * DIV (summary|shortlog|log|tree)
25 * ***summary
26 * repo navs | search
27 * repo description
28 * description
29 * owner
30 * last commit
31 * URL
32 * shortlog
33 * Date|committer|commit description (commit|commitdiff|tree|snapshot)
34 * heads
35 * create date | head (shortlog|log|tree)
36 *
37 *
38 *
39 * footer
40 */
42 #ifndef GOTWEB_UI_H
43 #define GOTWEB_UI_H
45 /* general html */
47 char *head =
48 "<meta name='viewport' content='initial-scale=1.0," \
49 " user-scalable=no' />" \
50 "<meta charset='utf-8' />" \
51 "<meta name='msapplication-TileColor' content='#da532c' />" \
52 "<meta name='theme-color' content='#ffffff' />" \
53 "<link rel='apple-touch-icon' sizes='180x180'" \
54 " href='/apple-touch-icon.png' />" \
55 "<link rel='icon' type='image/png' sizes='32x32'" \
56 " href='/favicon-32x32.png' />" \
57 "<link rel='icon' type='image/png' sizes='16x16'" \
58 " href='/favicon-16x16.png' />" \
59 "<link rel='manifest' href='/site.webmanifest' />" \
60 "<link rel='mask-icon' href='/safari-pinned-tab.svg'" \
61 " color='#5bbad5' />" \
62 "<link rel='stylesheet' type='text/css' href='/gotweb.css' />";
64 char *got_link =
65 "<div id='got_link'>" \
66 "<a href='%s' target='_sotd'><img src='/%s' alt='logo' /></a>" \
67 "</div>";
69 char *site_link =
70 "<div id='site_link'>" \
71 "<a href='%s'>%s</a> %s %s" \
72 "</div>";
74 char *site_owner =
75 "<div id='site_owner_wrapper'><div id='site_owner'>%s</div></div>";
77 char *search =
78 "<div id='search'>" \
79 "<form method='POST'>" \
80 "<input type='search' id='got-search' name='got-search' size='15'" \
81 " maxlength='50' />" \
82 "<button>Search</button>" \
83 "</form>" \
84 "</div>";
86 char *np_wrapper_start =
87 "<div id='np_wrapper'>" \
88 "<div id='nav_prev'>";
90 char *div_end =
91 "</div>";
93 char *nav_next =
94 "<div id='nav_next'>" \
95 "<a href='?page=%d'>Next<a/>" \
96 "</div>";
98 char *nav_prev =
99 "<a href='?page=%d'>Previous<a/>";
101 char *description =
102 "<div id='description_title'>Description: </div>" \
103 "<div id='description'>%s</div>";
105 char *repo_owner =
106 "<div id='repo_owner_title'>Owner: </div>" \
107 "<div id='repo_owner'>%s</div>";
109 char *last_change =
110 "<div id='last_change_title'>Last Change: </div>" \
111 "<div id='last_change'>%s</div>";
113 char *cloneurl =
114 "<div id='cloneurl_title'>Clone URL: </div>" \
115 "<div id='cloneurl'>%s</div>";
117 /* index.tmpl */
119 char *index_projects_header =
120 "<div id='index_header'>" \
121 "<div id='index_header_project'>Project</div>" \
122 "<div id='index_header_description'>Description</div>" \
123 "<div id='index_header_owner'>Owner</div>" \
124 "<div id='index_header_age'>Last Change</div>" \
125 "</div>";
127 char *index_projects =
128 "<div id='index_wrapper'>" \
129 "<div id='index_project'>" \
130 "<a href='?path=%s&action=summary'>%s</a>" \
131 "</div>" \
132 "<div id='index_project_description'>%s</div>" \
133 "<div id='index_project_owner'>%s</div>" \
134 "<div id='index_project_age'>%s</div>" \
135 "<div id='navs_wrapper'>" \
136 "<div id='np_navs'>%s</div>" \
137 "</div>" \
138 "</div>" \
139 "<div id='dotted_line'></div>";
141 char *index_navs =
142 "<a href='?path=%s&action=summary'>summary</a> | " \
143 "<a href='?path=%s&action=shortlog'>shortlog</a> | " \
144 "<a href='?path=%s&action=log'>log</a> | " \
145 "<a href='?path=%s&action=tree'>tree</a>";
147 /* summary.tmpl */
149 char *summary_wrapper =
150 "<div id='summary_wrapper'>";
152 char *summary_shortlog =
153 "<div id='summary_shortlog_title_wrapper'>" \
154 "<div id='summary_shortlog_title'>Shortlog</div></div>" \
155 "<div id='summary_shortlog_content_wrapper'>" \
156 "<div id='summary_shortlog_content'>%s</div>" \
157 "</div>";
159 char *summary_tags =
160 "<div id='summary_tags_title_wrapper'>" \
161 "<div id='summary_tags_title'>Tags</div></div>" \
162 "<div id='summary_tags_content_wrapper'>" \
163 "<div id='summary_tags_content'>%s</div>" \
164 "</div>";
166 char *summary_heads =
167 "<div id='summary_heads_title_wrapper'>" \
168 "<div id='summary_heads_title'>Heads</div></div>" \
169 "<div id='summary_heads_content_wrapper'>" \
170 "<div id='summary_heads_content'>%s</div>" \
171 "</div>";
173 #endif /* GOTWEB_UI_H */