common.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>
  5. {{ instance }} -- Laboratory GitLab frontend.
  6. </title>
  7. <meta name="viewport" content="width=device-width">
  8. </head>
  9. <body>
  10. <nav>
  11. {% if repository %}
  12. <h1>
  13. {% if repo_avatar %}
  14. <img src="{{ repo_avatar }}" />
  15. {% endif %}
  16. <div>
  17. {{ title }}
  18. <div class="laboratory_desc">{{ repo_description }}</div>
  19. </div>
  20. </h1>
  21. <ul>
  22. <li><a class="{{ about }}" href="{{ repo_url }}/-/about">about</a></li>
  23. <li><a class="{{ summary }}" href="{{ repo_url }}/">summary</a></li>
  24. <li><a class="{{ tree }}" href="{{ repo_url }}/-/tree/">tree</a></li>
  25. <li><a class="{{ log }}" href="{{ repo_url }}/-/commits/">log</a></li>
  26. <li><a class="{{ refs }}" href="{{ repo_url }}/-/branches">refs</a></li>
  27. <li><a class="{{ issues }}" href="{{ repo_url }}/-/issues">issues</a></li>
  28. <li><a class="{{ wikis }}" href="{{ repo_url }}/-/wikis/home">wiki</a></li>
  29. </ul>
  30. {% elif user %}
  31. <h1>
  32. {% if user_avatar %}
  33. <img src="{{ user_avatar }}" />
  34. {% endif %}
  35. <div>
  36. {{ title }}
  37. <div class="laboratory_desc">{{ user_name }}</div>
  38. </div>
  39. </h1>
  40. <ul>
  41. <li><a class="{{ about }}" href="{{ user_url }}/-/about">about</a></li>
  42. </ul>
  43. {% elif group %}
  44. <h1>
  45. {% if group_avatar %}
  46. <img src="{{ group_avatar }}" />
  47. {% endif %}
  48. <div>
  49. {{ title }}
  50. <div class="laboratory_desc">{{ group_desc }}</div>
  51. </div>
  52. </h1>
  53. <ul>
  54. <li><a class="{{ projects }}" href="{{ group_url }}">projects</a></li>
  55. <li><a class="{{ subgroups }}" href="{{ group_url }}/-/subgroups">subgroups</a></li>
  56. <form method="post">
  57. <input name="laboratory_searchquery">
  58. <input type="submit" value="search">
  59. </form>
  60. </ul>
  61. {% else %}
  62. <h1>
  63. <div>
  64. <img src="{{ url_for('static', filename='logo.png') }}" />
  65. <div class="laboratory_desc">{{ repo_description }}</div>
  66. </div>
  67. </h1>
  68. <ul>
  69. <li><a href="/" class="{{ about }}">about</a></li>
  70. <li><a href="/projects" class="{{ projects }}">projects</a></li>
  71. {% if projects %}
  72. <form method="post">
  73. <input name="laboratory_searchquery">
  74. <input type="submit" value="search">
  75. </form>
  76. {% endif %}
  77. </ul>
  78. {% endif %}
  79. </nav>
  80. <main>
  81. {% if repository %}
  82. {% include 'repo.html' %}
  83. {% elif user %}
  84. {% include 'users_groups.html' %}
  85. {% elif group %}
  86. {% include 'users_groups.html' %}
  87. {% elif err %}
  88. <p style="background-color: orangered; padding: 10px">an error occured: {{ err }}</p>
  89. {% elif about %}
  90. <p>
  91. Welcome to Laboratory, a frontend for GitLab!<br />
  92. Checkout some GitLab instances with Laboratory!<br />
  93. <li><strong>Enterprise Edition instances</strong>:</li>
  94. <li><a href="/gitlab.com">GitLab.com</a></li>
  95. <li><strong>Community Edition instances</strong>:</li>
  96. <li><a href="/gitlab.freedesktop.org">Freedesktop GitLab</a></li>
  97. <li><a href="/gitlab.archlinux.org">Arch Linux GitLab</a></li>
  98. <h2>Features</h2>
  99. <li>No proprietary JavaScript - Only CSS and HTML are used</li>
  100. <li>Usable in a text-only browser</li>
  101. <li>Free Software - You can modify it, redistribute it and use it for whatever purpose</li>
  102. <li>Works on both GitLab Enterprise Edition and Community Edition</li>
  103. <li>Interface inspired by Cgit and SourceHut - A minimal interface that Just Works</li>
  104. <li>AGPLv3-licensed</li>
  105. <i>
  106. Laboratory doesn't let you clone repositories from GitLab instances.
  107. It's just a GitLab frontend for those that want a minimal interface when
  108. browsing repos. If you want to stay private it's recommended to use
  109. <a href="http://torproject.org">Tor</a>.
  110. </i>
  111. <h2>Usage</h2>
  112. Prefix your instance domain (e.g <code>gitlab.alpinelinux.org</code>) with
  113. <code>https://[Domain where Laboratory is served]/</code>
  114. (e.g. <code>https://[Domain where Laboratory is served]/gitlab.freedesktop.org/</code>).
  115. </p>
  116. {% elif projects %}
  117. {{ projects_list }}
  118. {% endif %}
  119. </main>
  120. <hr />
  121. <footer>
  122. Generated by the
  123. <a href="https://git.vitali64.duckdns.org/utils/laboratory.git">Laboratory GitLab frontend</a>,
  124. a minimal frontend for GitLab instances.
  125. {% if instance %}
  126. <small>Instance name: {{ instance }}</small>
  127. {% endif %}
  128. </footer>
  129. <style>
  130. body {
  131. font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
  132. max-width: 1150px;
  133. margin: 0 auto;
  134. }
  135. * { line-height: 1.5; }
  136. .laboratory_bloblines pre {
  137. background-color: #f5f5f5;
  138. text-align: right;
  139. padding-left: 10px;
  140. padding-right: 5px;
  141. }
  142. .laboratory_blob { font-size: 12pt; }
  143. nav { margin-bottom: 1em; }
  144. nav h1 {
  145. /*font-family: 'Courier New', Courier, monospace;
  146. margin-left: 1ch;*/
  147. margin-bottom: 0;
  148. font-size: 22pt;
  149. }
  150. nav h1 div {
  151. flex-direction: column;
  152. }
  153. nav h1, nav ul, nav {
  154. display: flex;
  155. align-self: flex-end;
  156. }
  157. .laboratory_issues {
  158. background-color: #eee;
  159. }
  160. .laboratory_issuestabs {
  161. display: flex;
  162. align-self: flex-end;
  163. margin: 3px;
  164. }
  165. .laboratory_issuestabs li {
  166. list-style: none;
  167. margin: 0 2px;
  168. }
  169. .laboratory_issuestabs li a {
  170. padding: 5px 16px 5px 16px;
  171. text-decoration: none;
  172. color: grey;
  173. background-color: #eee;
  174. color: black;
  175. }
  176. nav small {
  177. font-family: 'Courier New', Courier, monospace;
  178. position: absolute;
  179. right: 1.0em;
  180. }
  181. .laboratory_desc {
  182. margin: 0 40px;
  183. font-size: 11pt;
  184. font-weight: normal;
  185. }
  186. nav ul { margin-bottom: 0; }
  187. nav ul li {
  188. list-style: none;
  189. margin: 0;
  190. }
  191. nav ul li a {
  192. padding: 5px 16px 5px 16px;
  193. text-decoration: none;
  194. color: grey;
  195. }
  196. nav ul li a:hover, nav ul li a.active {
  197. background-color: #ccc;
  198. color: black;
  199. }
  200. table.laboratory_list {
  201. width: 100%;
  202. border-spacing: 0;
  203. }
  204. table.laboratory_list tr:nth-child(even) { background-color: #f7f7f7; }
  205. table.laboratory_list tr:hover { background-color: #eee; }
  206. table.laboratory_list tr td a {
  207. color: black;
  208. text-decoration: none;
  209. }
  210. table.laboratory_list tr td a:hover {
  211. color: blue;
  212. text-decoration: underline;
  213. }
  214. nav h1 img {
  215. margin-right: 1ch;
  216. height: 66.656px;
  217. }
  218. nav ul form {
  219. font-family: 'Courier New', Courier, monospace;
  220. margin-left: 1em;
  221. }
  222. .project_readme pre {
  223. white-space: pre-wrap;
  224. border-radius: 8px;
  225. padding: 10px;
  226. background: #efefef;
  227. }
  228. </style>
  229. </body>
  230. </html>