1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318
/*
* Copyright (c) 2019, 2020 Tracey Emery <tracey@traceyemery.net>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef GOTWEB_UI_H
#define GOTWEB_UI_H
/* general html */
char *head =
"<meta name='viewport' content='initial-scale=1.0," \
" user-scalable=no' />" \
"<meta charset='utf-8' />" \
"<meta name='msapplication-TileColor' content='#da532c' />" \
"<meta name='theme-color' content='#ffffff' />" \
"<link rel='apple-touch-icon' sizes='180x180'" \
" href='/apple-touch-icon.png' />" \
"<link rel='icon' type='image/png' sizes='32x32'" \
" href='/favicon-32x32.png' />" \
"<link rel='icon' type='image/png' sizes='16x16'" \
" href='/favicon-16x16.png' />" \
"<link rel='manifest' href='/site.webmanifest' />" \
"<link rel='mask-icon' href='/safari-pinned-tab.svg'" \
" color='#5bbad5' />" \
"<link rel='stylesheet' type='text/css' href='/gotweb.css' />";
char *got_link =
"<div id='got_link'>" \
"<a href='%s' target='_sotd'><img src='/%s' alt='logo' /></a>" \
"</div>";
char *site_link =
"<div id='site_link'>" \
"<a href='%s'>%s</a> %s %s" \
"</div>";
char *site_owner =
"<div id='site_owner_wrapper'><div id='site_owner'>%s</div></div>";
char *search =
"<!--/* <div id='search'>" \
"<form method='POST'>" \
"<input type='search' id='got-search' name='got-search' size='15'" \
" maxlength='50' />" \
"<button>Search</button>" \
"</form>" \
"</div> */-->";
char *np_wrapper_start =
"<div id='np_wrapper'>" \
"<div id='nav_prev'>";
char *div_end =
"</div>";
char *nav_next =
"<div id='nav_next'>" \
"<a href='?page=%d'>Next<a/>" \
"</div>";
char *nav_prev =
"<a href='?page=%d'>Previous<a/>";
char *description =
"<div id='description_title'>Description: </div>" \
"<div id='description'>%s</div>";
char *repo_owner =
"<div id='repo_owner_title'>Owner: </div>" \
"<div id='repo_owner'>%s</div>";
char *last_change =
"<div id='last_change_title'>Last Change: </div>" \
"<div id='last_change'>%s</div>";
char *cloneurl =
"<div id='cloneurl_title'>Clone URL: </div>" \
"<div id='cloneurl'>%s</div>";
char *logbriefs_row =
"<div id='logbriefs_wrapper'>" \
"<div id='logbriefs_age'>%s</div>" \
"<div id='logbriefs_author'>%s</div>" \
"<div id='logbriefs_log'>%s</div>" \
"</div>" \
"<div id='navs_wrapper'>" \
"<div id='navs'>%s</div>" \
"</div>" \
"</div>" \
"<div id='dotted_line'></div>";
char *logbriefs_navs =
"<a href='?path=%s&action=commit&commit=%s'>commit</a> | " \
"<a href='?path=%s&action=commitdiff&commit=%s'>diff</a> | " \
"<a href='?path=%s&action=tree&commit=%s'>tree</a><!--/* | " \
"<a href='?path=%s&action=snapshot&commit=%s'>snapshot</a> */-->";
char *tags_row =
"<div id='tags_wrapper'>" \
"<div id='tags_age'>%s</div>" \
"<div id='tag'>tag %s</div>" \
"<div id='tag_name'>%s</div>" \
"</div>" \
"<div id='navs_wrapper'>" \
"<div id='navs'>%s</div>" \
"</div>" \
"</div>" \
"<div id='dotted_line'></div>";
char *tags_navs =
"<a href='?path=%s&action=tag&commit=%s'>tag</a> | " \
"<a href='?path=%s&action=commit&commit=%s'>commit</a> | " \
"<a href='?path=%s&action=logbriefs&commit=%s'>log briefs</a> | " \
"<a href='?path=%s&action=log&commit=%s'>log</a>";
char *trees_row =
"<div id='tree_wrapper'>" \
"<div id='tree_id'>%s</div>" \
"<div id='tree'>%s%s</div>" \
"</div>";
char *heads_row =
"<div id='heads_wrapper'>" \
"<div id='heads_age'>%s</div>" \
"<div id='head'>%s</div>" \
"</div>" \
"<div id='navs_wrapper'>" \
"<div id='navs'>%s</div>" \
"</div>" \
"</div>" \
"<div id='dotted_line'></div>";
char *heads_navs =
"<a href='?path=%s&action=summary&headref=%s'>summary</a> | " \
"<a href='?path=%s&action=logbriefs&headref=%s'>log briefs</a> | " \
"<a href='?path=%s&action=log&headref=%s'>log</a> | " \
"<a href='?path=%s&action=commit&headref=%s'>commit</a>";
char *commit_diff_html =
"<div id='commit_diff_title'>Diff:</div>" \
"<div id='commit_diff'>%s %s</div>";
char *commit_commit_html =
"<div id='commit_commit_title'>Commit:</div>" \
"<div id='commit_commit'>%s %s</div>";
char *commit_author_html =
"<div id='commit_author_title'>Author:</div>" \
"<div id='commit_author'>%s</div>";
char *commit_committer_html =
"<div id='commit_committer_title'>Committer:</div>" \
"<div id='commit_committer'>%s</div>";
char *commit_age_html =
"<div id='commit_age_title'>Date:</div>" \
"<div id='commit_age'>%s</div>";
char *commit_log_html =
"<div id='commit_log_title'>Log:</div>" \
"<div id='commit_log'>%s</div>";
char *commit_tree_html =
"<div id='commit_log_title'>Tree:</div>" \
"<div id='commit_log'>%s</div>";
/* log.tmpl */
char *logs =
"<div id='logs_title_wrapper'>" \
"<div id='logs_title'>Commits</div></div>" \
"<div id='logs_content'>%s</div>";
char *logs_row =
"<div id='logs_row_wrapper'>%s%s%s%s</div>" \
"<div id='dotted_line'></div>" \
"<div id='log'>%s</div>" \
"<div id='navs_wrapper'>" \
"<div id='navs'>%s</div>" \
"</div>" \
"</div>" \
"<div id='solid_line'></div>";
char *logs_navs =
"<a href='?path=%s&action=commit&commit=%s'>commit</a> | " \
"<a href='?path=%s&action=commitdiff&commit=%s'>diff</a> | " \
"<a href='?path=%s&action=tree&commit=%s'>tree</a><!--/* | " \
"<a href='?path=%s&action=snapshot&commit=%s'>snapshot</a> */-->";
/* tag.tmpl */
char *log_tag =
"<div id='log_tree_title_wrapper'>" \
"<div id='log_tree_title'>Tag</div></div>" \
"<div id='log_tree_content'>%s</div>";
char *log_tag_row =
"<div id='log_tag_row_wrapper'>" \
"<div id='log_tag_commit'>%s</div>" \
"</div>" \
"<div id='dotted_line'></div>" \
"<div id='log_tag'>%s</div>" \
"</div>";
/* tree.tmpl */
char *log_tree =
"<div id='log_tree_title_wrapper'>" \
"<div id='log_tree_title'>Tree</div></div>" \
"<div id='log_tree_content'>%s</div>";
char *log_tree_row =
"<div id='log_tree_row_wrapper'>" \
"<div id='log_tree_commit'>%s</div>" \
"</div>" \
"<div id='dotted_line'></div>" \
"<div id='log_tree'>%s</div>" \
"</div>";
char *log_tree_navs =
"<a href='?path=%s&action=commit&commit=%s'>commit</a> | " \
"<a href='?path=%s&action=commitdiff&commit=%s'>diff</a> | " \
"<a href='?path=%s&action=tree&commit=%s'>tree</a><!--/* | " \
"<a href='?path=%s&action=snapshot&commit=%s'>snapshot</a> */-->";
/* commit.tmpl */
char *log_commit =
"<div id='log_commit_title_wrapper'>" \
"<div id='log_commit_title'>Commit</div></div>" \
"<div id='log_commit_content'>%s</div>";
char *log_commit_row =
"<div id='log_commit_row_wrapper'>" \
"<div id='log_commit_commit'>%s%s%s%s%s%s%s</div>" \
"</div>" \
"<div id='dotted_line'></div>" \
"<div id='log_commit'>%s</div>" \
"</div>";
/* diff.tmpl */
char *log_diff =
"<div id='log_diff_title_wrapper'>" \
"<div id='log_diff_title'>Commit Diff</div></div>" \
"<div id='log_diff_content'>%s</div>";
char *log_diff_row =
"<div id='log_diff_row_wrapper'>" \
"<div id='log_commit_diff'>%s%s%s%s%s%s%s</div>" \
"</div>" \
"<div id='dotted_line'></div>" \
"<div id='log_diff'>%s</div>" \
"</div>";
/* index.tmpl */
char *index_projects_header =
"<div id='index_header'>" \
"<div id='index_header_project'>Project</div>" \
"<div id='index_header_description'>Description</div>" \
"<div id='index_header_owner'>Owner</div>" \
"<div id='index_header_age'>Last Change</div>" \
"</div>";
char *index_projects =
"<div id='index_wrapper'>" \
"<div id='index_project'>" \
"<a href='?path=%s&action=summary'>%s</a>" \
"</div>" \
"<div id='index_project_description'>%s</div>" \
"<div id='index_project_owner'>%s</div>" \
"<div id='index_project_age'>%s</div>" \
"<div id='navs_wrapper'>" \
"<div id='navs'>%s</div>" \
"</div>" \
"</div>" \
"<div id='dotted_line'></div>";
char *index_navs =
"<a href='?path=%s&action=summary'>summary</a> | " \
"<a href='?path=%s&action=logbriefs'>log briefs</a> | " \
"<a href='?path=%s&action=log'>log</a> | " \
"<a href='?path=%s&action=tree'>tree</a>";
/* summary.tmpl */
char *summary_wrapper =
"<div id='summary_wrapper'>";
char *summary_logbriefs =
"<div id='summary_logbriefs_title_wrapper'>" \
"<div id='summary_logbriefs_title'>Log Briefs</div></div>" \
"<div id='summary_logbriefs_content'>%s</div>";
char *summary_tags =
"<div id='summary_tags_title_wrapper'>" \
"<div id='summary_tags_title'>Tags</div></div>" \
"<div id='summary_tags_content'>%s</div>";
char *summary_heads =
"<div id='summary_heads_title_wrapper'>" \
"<div id='summary_heads_title'>Heads</div></div>" \
"<div id='summary_heads_content'>%s</div>";
#endif /* GOTWEB_UI_H */