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 /* index.tmpl */
103 char *index_projects_header =
104 "<div id='index_header'>" \
105 "<div id='index_header_project'>Project</div>" \
106 "<div id='index_header_description'>Description</div>" \
107 "<div id='index_header_owner'>Owner</div>" \
108 "<div id='index_header_age'>Last Change</div>" \
109 "</div>";
111 char *index_projects =
112 "<div id='index_wrapper'>" \
113 "<div id='index_project'>" \
114 "<a href='?path=%s&action=summary'>%s</a>" \
115 "</div>" \
116 "<div id='index_project_description'>%s</div>" \
117 "<div id='index_project_owner'>%s</div>" \
118 "<div id='index_project_age'>%s</div>" \
119 "<div id='navs_wrapper'>" \
120 "<div id='np_navs'>%s</div>" \
121 "</div>" \
122 "</div>" \
123 "<div id='dotted_line'></div>";
125 char *index_navs =
126 "<a href='?path=%s&action=summary'>summary</a> | " \
127 "<a href='?path=%s&action=shortlog'>shortlog</a> | " \
128 "<a href='?path=%s&action=log'>log</a> | " \
129 "<a href='?path=%s&action=tree'>tree</a>";
131 /* summary.tmpl */
133 char *summary_description =
134 "<div id='summary_description_title'>Description: </div>" \
135 "<div id='summary_description'>%s</div>";
137 char *summary_repo_owner =
138 "<div id='summary_repo_owner_title'>Owner: </div>" \
139 "<div id='summary_repo_owner'>%s</div>";
141 char *summary_last_change =
142 "<div id='summary_last_change_title'>Last Change: </div>" \
143 "<div id='summary_last_change'>%s</div>";
145 char *summary_cloneurl =
146 "<div id='summary_cloneurl_title'>Clone URL: </div>" \
147 "<div id='summary_cloneurl'>%s</div>";
149 char *summary_shortlog =
150 "<div id='summary_shortlog_title_wrapper'>" \
151 "<div id='summary_shortlog_title'>Shortlog</div></div>" \
152 "<div id='summary_shortlog_content_wrapper'>" \
153 "<div id='summary_shortlog_content'>%s</div>" \
154 "</div>";
156 char *summary_tags =
157 "<div id='summary_tags_title_wrapper'>" \
158 "<div id='summary_tags_title'>Tags</div></div>" \
159 "<div id='summary_tags_content_wrapper'>" \
160 "<div id='summary_tags_content'>%s</div>" \
161 "</div>";
163 char *summary_heads =
164 "<div id='summary_heads_title_wrapper'>" \
165 "<div id='summary_heads_title'>Heads</div></div>" \
166 "<div id='summary_heads_content_wrapper'>" \
167 "<div id='summary_heads_content'>%s</div>" \
168 "</div>";
170 #endif /* GOTWEB_UI_H */