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
/*
* Copyright (c) 2019 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'>%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=tagt&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 *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=logbriefs&headref=%s'>log briefs</a> | " \
"<a href='?path=%s&action=log&headref=%s'>log</a> | " \
"<a href='?path=%s&action=tree&headref=%s'>commit</a>";
/* log.tmpl */
char *logs_wrapper =
"<div id='logs_wrapper'>";
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'>" \
"<div id='logs_commit'>Commit: %s</div>" \
"<div id='logs_author'>From: %s</div>" \
"<div id='logs_age'>Date: %s</div>" \
"</div>" \
"<div id='dotted_line'></div>" \
"<div id='log'>%s</div>" \
"<div id='navs_wrapper'>" \
"<div id='navs'>%s</div>" \
"</div>" \
"</div>" \
"<div id='dotted_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>";
/* 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 */