xaizek / rocketgit (License: AGPLv3+) (since 2018-12-09)
Light and fast Git hosting solution suitable to serve both as a hub or as a personal code storage with its tickets, pull requests, API and much more.
Commit f7db12862aa048feba85411fd64a2a97403c2e66

Redo css for clone urls and added http url
Author: Catalin(ux) M. BOIE
Author date (UTC): 2016-09-17 10:14
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2016-09-17 10:19
Parent(s): 551f1cfd002bb44a5b1448f83a9cd8341aded9d6
Signing key:
Tree: bc289249e4478221683214a50fe6ae5641460a0d
File Lines added Lines deleted
inc/user/repo-page.php 12 7
root/themes/default/hints/repo/clone_http.html 6 0
root/themes/default/main.css 10 8
root/themes/default/repo/urls/footer.html 0 1
root/themes/default/repo/urls/header.html 1 1
root/themes/default/repo/urls/line.html 1 1
File inc/user/repo-page.php changed (mode: 100644) (index c640fc7..b6233be)
... ... $can_admin = rg_rights_allow($db, $x) === TRUE ? 1 : 0;
60 60
61 61 $rg['url_user'] = rg_re_userpage($rg['page_ui']); $rg['url_user'] = rg_re_userpage($rg['page_ui']);
62 62 $rg['url_repo'] = rg_re_repopage($rg['page_ui'], $repo); $rg['url_repo'] = rg_re_repopage($rg['page_ui'], $repo);
63 $rg['ssh'] = $rg['ri']['clone_url_ssh'];
64 $rg['git'] = $rg['ri']['clone_url_git'];
65 63 $rg['can_admin'] = $can_admin; $rg['can_admin'] = $can_admin;
66 64 $rg['HTML:hints'] = ''; $rg['HTML:hints'] = '';
67 65 $rg['mr'] = array('id' => ''); $rg['mr'] = array('id' => '');
 
... ... $_repo_body = "";
76 74
77 75 // build urls list // build urls list
78 76 $urls = array(); $urls = array();
77 $urls[]['HTML:clone_url'] = '<a href="' . $rg['ri']['clone_url_http']
78 . '">' . $rg['ri']['clone_url_http'] . '</a>';
79 79 if ($rg_ssh_port != 0) if ($rg_ssh_port != 0)
80 $urls[]['HTML:clone_url'] = '<a href="' . $rg['ssh'] . '">' . $rg['ssh'] . '</a>';
80 $urls[]['HTML:clone_url'] = '<a href="' . $rg['ri']['clone_url_ssh']
81 . '">' . $rg['ri']['clone_url_ssh'] . '</a>';
81 82 if ($rg_git_port != 0) if ($rg_git_port != 0)
82 $urls[]['HTML:clone_url'] = '<a href="' . $rg['git'] . '">' . $rg['git'] . '</a>';
83 $rg['HTML:urls'] = rg_template_table("repo/urls", $urls, $rg);
83 $urls[]['HTML:clone_url'] = '<a href="' . $rg['ri']['clone_url_git']
84 . '">' . $rg['ri']['clone_url_git'] . '</a>';
85 $rg['HTML:urls'] = rg_template_table('repo/urls', $urls, $rg);
84 86
85 87 function rg_add_clone_hints($db, &$rg, $ref) function rg_add_clone_hints($db, &$rg, $ref)
86 88 { {
 
... ... function rg_add_clone_hints($db, &$rg, $ref)
96 98 $hints[]['HTML:hint'] = rg_template("hints/repo/clone_owner.html", $hints[]['HTML:hint'] = rg_template("hints/repo/clone_owner.html",
97 99 $rg, TRUE /* xss */); $rg, TRUE /* xss */);
98 100 } else { } else {
101 $hints[]['HTML:hint'] = rg_template("hints/repo/clone_http.html",
102 $rg, TRUE /*xss*/);
103
99 104 if ($rg_ssh_port != 0) if ($rg_ssh_port != 0)
100 105 $hints[]['HTML:hint'] = rg_template("hints/repo/clone_ssh.html", $hints[]['HTML:hint'] = rg_template("hints/repo/clone_ssh.html",
101 $rg, TRUE /* xss */);
106 $rg, TRUE /*xss*/);
102 107
103 108 if ($rg_git_port != 0) if ($rg_git_port != 0)
104 109 $hints[]['HTML:hint'] = rg_template("hints/repo/clone_git.html", $hints[]['HTML:hint'] = rg_template("hints/repo/clone_git.html",
105 $rg, TRUE /* xss */);
110 $rg, TRUE /*xss*/);
106 111
107 112 $x = array(); $x = array();
108 113 $x['obj_id'] = $rg['ri']['repo_id']; $x['obj_id'] = $rg['ri']['repo_id'];
File root/themes/default/hints/repo/clone_http.html added (mode: 100644) (index 0000000..5876e5d)
1 <br />
2 Clone this repository using http:<br />
3 <div class="xcode">
4 git clone @@ri::clone_url_http@@ local_dir<br />
5 cd local_dir<br />
6 </div>
File root/themes/default/main.css changed (mode: 100644) (index 54ab39c..1143c05)
... ... legend { padding: 0px 2pt; }
356 356 flex-flow: column nowrap; flex-flow: column nowrap;
357 357 } }
358 358
359 .urls { padding: 3px 0px; margin: 5px 0px; }
360 .urls ul { list-style-type: none; }
361 .urls ul li {
362 display: inline;
359 .urls {
360 padding: 3px 0px;
361 margin: 5px 0px;
362 white-space: nowrap;
363 font-size: 9pt;
364 color: #666;
365 }
366 .url {
363 367 border: 1px solid #aaa; border: 1px solid #aaa;
364 368 border-radius: 4px 4px 4px 4px; border-radius: 4px 4px 4px 4px;
365 font-size: 9pt;
366 369 padding: 3px 3px; padding: 3px 3px;
367 370 background-color: #E5E5FF; background-color: #E5E5FF;
368 371 } }
369 .urls ul li a {
370 color: #666666;
371 white-space: nowrap;
372 .url a {
373 color: #666;
372 374 } }
373 375
374 376 .form_error { margin-top: 6pt; color: #F00; } .form_error { margin-top: 6pt; color: #F00; }
File root/themes/default/repo/urls/footer.html changed (mode: 100644) (index a9b0151..04f5b84)
1 </ul>
2 1 </div> </div>
File root/themes/default/repo/urls/header.html changed (mode: 100644) (index 2e2e2cf..90449ac)
1 1 <div class="urls"> <div class="urls">
2 <ul>
2 <span class="url">Clone urls:</span>
File root/themes/default/repo/urls/line.html changed (mode: 100644) (index 5e6becd..473b76b)
1 <li>@@clone_url@@</li>
1 <span class="url">@@clone_url@@</span>
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master