Blob


1 /*
2 * Copyright (c) 2019, 2020 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 #ifndef GOTWEB_UI_H
18 #define GOTWEB_UI_H
20 /* general html */
22 char *head =
23 "<meta name='viewport' content='initial-scale=1.0," \
24 " user-scalable=no' />" \
25 "<meta charset='utf-8' />" \
26 "<meta name='msapplication-TileColor' content='#da532c' />" \
27 "<meta name='theme-color' content='#ffffff' />" \
28 "<link rel='apple-touch-icon' sizes='180x180'" \
29 " href='/apple-touch-icon.png' />" \
30 "<link rel='icon' type='image/png' sizes='32x32'" \
31 " href='/favicon-32x32.png' />" \
32 "<link rel='icon' type='image/png' sizes='16x16'" \
33 " href='/favicon-16x16.png' />" \
34 "<link rel='manifest' href='/site.webmanifest' />" \
35 "<link rel='mask-icon' href='/safari-pinned-tab.svg'" \
36 " color='#5bbad5' />" \
37 "<link rel='stylesheet' type='text/css' href='/gotweb.css' />";
39 char *got_link =
40 "<div id='got_link'>" \
41 "<a href='%s' target='_sotd'><img src='/%s' alt='logo' /></a>" \
42 "</div>";
44 char *site_link =
45 "<div id='site_link'>" \
46 "<a href='%s'>%s</a> %s %s" \
47 "</div>";
49 char *search =
50 "<!--/* <div id='search'>" \
51 "<form method='POST'>" \
52 "<input type='search' id='got-search' name='got-search' size='15'" \
53 " maxlength='50' />" \
54 "<button>Search</button>" \
55 "</form>" \
56 "</div> */-->";
58 char *np_wrapper_start =
59 "<div id='np_wrapper'>" \
60 "<div id='nav_prev'>";
62 char *div_end =
63 "</div>";
65 char *nav_next =
66 "<div id='nav_next'>" \
67 "<a href='?page=%d'>Next<a/>" \
68 "</div>";
70 char *nav_prev =
71 "<a href='?page=%d'>Previous<a/>";
73 char *repo_owner =
74 "<div id='repo_owner_title'>Owner: </div>" \
75 "<div id='repo_owner'>%s</div>";
77 char *heads_row =
78 "<div id='heads_wrapper'>" \
79 "<div id='heads_age'>%s</div>" \
80 "<div id='head'>%s</div>" \
81 "</div>" \
82 "<div id='navs_wrapper'>" \
83 "<div id='navs'>%s</div>" \
84 "</div>" \
85 "</div>" \
86 "<div id='dotted_line'></div>";
88 char *heads_navs =
89 "<a href='?path=%s&action=summary&headref=%s'>summary</a> | " \
90 "<a href='?path=%s&action=briefs&headref=%s'>commit briefs</a> | " \
91 "<a href='?path=%s&action=commits&headref=%s'>commits</a>";
93 /* headers */
95 char *header_commit_html =
96 "<div id='header_commit_title'>Commit:</div>" \
97 "<div id='header_commit'>%s %s</div>";
99 char *header_age_html =
100 "<div id='header_age_title'>Date:</div>" \
101 "<div id='header_age'>%s</div>";
103 char *header_commit_msg_html =
104 "<div id='header_commit_msg_title'>Message:</div>" \
105 "<div id='header_commit_msg'>%s</div>";
107 /* index.tmpl */
109 char *index_projects_header =
110 "<div id='index_header'>" \
111 "<div id='index_header_project'>Project</div>" \
112 "<div id='index_header_description'>Description</div>" \
113 "<div id='index_header_owner'>Owner</div>" \
114 "<div id='index_header_age'>Last Change</div>" \
115 "</div>";
117 char *index_projects =
118 "<div id='index_wrapper'>" \
119 "<div id='index_project'>" \
120 "<a href='?path=%s&action=summary'>%s</a>" \
121 "</div>" \
122 "<div id='index_project_description'>%s</div>" \
123 "<div id='index_project_owner'>%s</div>" \
124 "<div id='index_project_age'>%s</div>" \
125 "<div id='navs_wrapper'>" \
126 "<div id='navs'>%s</div>" \
127 "</div>" \
128 "</div>" \
129 "<div id='dotted_line'></div>";
131 char *index_projects_empty =
132 "<div id='index_wrapper'>" \
133 "No repositories found in %s" \
134 "</div>" \
135 "<div id='dotted_line'></div>";
137 char *index_navs =
138 "<a href='?path=%s&action=summary'>summary</a> | " \
139 "<a href='?path=%s&action=briefs'>commit briefs</a> | " \
140 "<a href='?path=%s&action=commits'>commits</a> | " \
141 "<a href='?path=%s&action=tree'>tree</a>";
143 #endif /* GOTWEB_UI_H */