~funderscore blog cgit wiki get in touch
aboutsummaryrefslogtreecommitdiff
blob: 85b3276b3c9ab3215aaf47e9d18fcd3ef02310e1 (plain)
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
<!DOCTYPE html>
<html>
	<head>
		<title>
		{{ instance }} -- Laboratory GitLab frontend.
		</title>
		<meta name="viewport" content="width=device-width">
	</head>
	<body>
		<nav>
{% if repository %}
			<h1>
{% if repo_avatar %}
				<img src="{{ repo_avatar }}" />
{% endif %}
				<div>
					{{ title }}
					<div class="laboratory_desc">{{ repo_description }}</div>
				</div>
			</h1>
			<ul>
				<li><a class="{{ about }}" href="{{ repo_url }}/-/about">about</a></li>
				<li><a class="{{ summary }}" href="{{ repo_url }}/">summary</a></li>
				<li><a class="{{ tree }}" href="{{ repo_url }}/-/tree/">tree</a></li>
				<li><a class="{{ log }}" href="{{ repo_url }}/-/commits/">log</a></li>
				<li><a class="{{ refs }}" href="{{ repo_url }}/-/branches">refs</a></li>
				<li><a class="{{ issues }}" href="{{ repo_url }}/-/issues">issues</a></li>
				<li><a class="{{ wikis }}" href="{{ repo_url }}/-/wikis/home">wiki</a></li>
			</ul>
{% elif user %}
			<h1>
{% if user_avatar %}
				<img src="{{ user_avatar }}" />
{% endif %}
				<div>
					{{ title }}
					<div class="laboratory_desc">{{ user_name }}</div>
				</div>
			</h1>
			<ul>
				<li><a class="{{ about }}" href="{{ user_url }}/-/about">about</a></li>
			</ul>
{% elif group %}
			<h1>
{% if group_avatar %}
				<img src="{{ group_avatar }}" />
{% endif %}
				<div>
					{{ title }}
					<div class="laboratory_desc">{{ group_desc }}</div>
				</div>
			</h1>
			<ul>
				<li><a class="{{ projects }}" href="{{ group_url }}">projects</a></li>
				<li><a class="{{ subgroups }}" href="{{ group_url }}/-/subgroups">subgroups</a></li>
				<form method="post">
					<input name="laboratory_searchquery">
					<input type="submit" value="search">
				</form>
			</ul>
{% else %}
			<h1>
				<div>
					<img src="{{ url_for('static', filename='logo.png') }}" />
					<div class="laboratory_desc">{{ repo_description }}</div>
				</div>
			</h1>
			<ul>
				<li><a href="/" class="{{ about }}">about</a></li>
				<li><a href="/projects" class="{{ projects }}">projects</a></li>
{% if projects %}
				<form method="post">
					<input name="laboratory_searchquery">
					<input type="submit" value="search">
				</form>
{% endif %}
			</ul>
{% endif %}
		</nav>
		<main>
{% if repository %}
			{% include 'repo.html' %}
{% elif user %}
			{% include 'users_groups.html' %}
{% elif group %}
			{% include 'users_groups.html' %}
{% elif err %}
			<p style="background-color: orangered; padding: 10px">an error occured: {{ err }}</p>
{% elif about %}
			<p>
				Welcome to Laboratory, a frontend for GitLab!<br />
				Checkout some GitLab instances with Laboratory!<br />
				
				<li><strong>Enterprise Edition instances</strong>:</li>
				<li><a href="/gitlab.com">GitLab.com</a></li>
				<li><strong>Community Edition instances</strong>:</li>
				<li><a href="/gitlab.freedesktop.org">Freedesktop GitLab</a></li>
				<li><a href="/gitlab.archlinux.org">Arch Linux GitLab</a></li>
				<h2>Features</h2>
				<li>No proprietary JavaScript - Only CSS and HTML are used</li>
				<li>Usable in a text-only browser</li>
				<li>Free Software - You can modify it, redistribute it and use it for whatever purpose</li>
				<li>Works on both GitLab Enterprise Edition and Community Edition</li>
				<li>Interface inspired by Cgit and SourceHut - A minimal interface that Just Works</li>
				<li>AGPLv3-licensed</li>
				<i>
					Laboratory doesn't let you clone repositories from GitLab instances. 
					It's just a GitLab frontend for those that want a minimal interface when 
					browsing repos. If you want to stay private it's recommended to use 
					<a href="http://torproject.org">Tor</a>.
				</i>
				<h2>Usage</h2>
				Prefix your instance domain (e.g <code>gitlab.alpinelinux.org</code>) with 
				<code>https://[Domain where Laboratory is served]/</code> 
				(e.g. <code>https://[Domain where Laboratory is served]/gitlab.freedesktop.org/</code>).
			</p>
{% elif projects %}
			{{ projects_list }}
{% endif %}
		</main>
		<hr />
		<footer>
			Generated by the 
			<a href="https://git.vitali64.duckdns.org/utils/laboratory.git">Laboratory GitLab frontend</a>, 
			a minimal frontend for GitLab instances.
{% if instance %}
			<small>Instance name: {{ instance }}</small>
{% endif %}
		</footer>
		<style>
body {
	font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
	max-width: 1150px;
	margin: 0 auto;
}
* { line-height: 1.5; }
.laboratory_bloblines pre {
	background-color: #f5f5f5;
	text-align: right;
	padding-left: 10px;
	padding-right: 5px;
}
.laboratory_blob { font-size: 12pt; }
nav { margin-bottom: 1em; }
nav h1 {
	/*font-family: 'Courier New', Courier, monospace;
	margin-left: 1ch;*/
	margin-bottom: 0;
	font-size: 22pt;
}
nav h1 div {
	flex-direction: column;
}
nav h1, nav ul, nav {
	display: flex;
	align-self: flex-end;
}
.laboratory_issues {
	background-color: #eee;
}
.laboratory_issuestabs {
	display: flex;
	align-self: flex-end;
	margin: 3px;
}
.laboratory_issuestabs li {
	list-style: none;
	margin: 0 2px;
}
.laboratory_issuestabs li a {
	padding: 5px 16px 5px 16px;
	text-decoration: none;
	color: grey;
	background-color: #eee;
	color: black;
}
nav small {
	font-family: 'Courier New', Courier, monospace;
	position: absolute;
	right: 1.0em;
}
.laboratory_desc {
	margin: 0 40px;
	font-size: 11pt;
	font-weight: normal;
}
nav ul { margin-bottom: 0; }
nav ul li {
	list-style: none;
	margin: 0;
}
nav ul li a {
	padding: 5px 16px 5px 16px;
	text-decoration: none;
	color: grey;
}
nav ul li a:hover, nav ul li a.active {
	background-color: #ccc;
	color: black;
}
table.laboratory_list {
	width: 100%;
	border-spacing: 0;
}
table.laboratory_list tr:nth-child(even) { background-color: #f7f7f7; }
table.laboratory_list tr:hover { background-color: #eee; }
table.laboratory_list tr td a {
	color: black;
	text-decoration: none;
}
table.laboratory_list tr td a:hover {
	color: blue;
	text-decoration: underline;
}
nav h1 img {
	margin-right: 1ch;
	height: 66.656px;
}
nav ul form {
	font-family: 'Courier New', Courier, monospace;
	margin-left: 1em;
}
.project_readme pre {
	white-space: pre-wrap;
	border-radius: 8px;
	padding: 10px;
	background: #efefef;
}
		</style>
	</body>
</html>