Edit

kmx.io/kmxgit/lib/kmxgit_web/templates/page/index.html.heex

Branch :

  • lib/kmxgit_web/templates/page/index.html.heex
  • <div class="container-fluid">
      <div class="row">
        <div class="col">
          <p>
            <code>
              "<%= gettext "Hello, world !" %>"
            </code>
          </p>
          <p>
            <%= gettext "Welcome to this instance of" %>
            <%= link "kmxgit", to: "https://git.kmx.io/kmx.io/kmxgit" %>
            .
          </p>
          <p>
            <%= gettext "Anyone can register and create public and private Git repositories." %>
          </p>
          <%= if @discord do %>
            <p>
              <%= link to: @discord, class: "btn btn-primary" do %>
                <i class="fab fa-discord"></i>&nbsp;&nbsp;<%= gettext "Join us on Discord !" %>
              <% end %>
            </p>
          <% end %>
    
          <h3><%= link gettext("SSH keys fingerprint"), to: "#ssh-keys", id: "ssh-keys" %></h3>
          <pre class="wrap"><%= render("ssh_keys_fingerprint.txt") %></pre>
    
          <h3><%= link gettext("Help"), to: "#help", id: "help" %></h3>
          <p>
            <%= link gettext("Install git"), to: Routes.page_path(@conn, :doc_git_install) %>
          </p>
          <div class="highlight">
            <pre class="wrap"><code><span class="c1"># <%= gettext "Clone repository user/path/to/repo if repo does not exist" %> :</span>
    git clone <b><%= @git_ssh_url %>:user/path/to/repo.git</b>
    cd <b>repo</b>
    
    <span class="c1"># <%= gettext "Change branch" %> :</span>
    git branch <b>master</b>
    
    <span class="c1"># <%= gettext "Pull changes from remote" %> :</span>
    git pull
    
    <span class="c1"># <%= gettext "Add local changes to next commit" %> :</span>
    git add <b>README.md static/index.html</b>
    
    <span class="c1"># <%= gettext "Commit" %> :</span>
    git commit -m "<b>a short and descriptive message</b>"
    
    <span class="c1"># <%= gettext "Push changes to remote" %> :</span>
    git push
    
    <span class="c1"># <%= gettext "Or if your local repo already exists," %></span>
    <span class="c1"># <%= gettext "Add remote to existing repo" %> :</span>
    git remote add kmx <b><%= @git_ssh_url %>:user/path/to/repo.git</b>
    
    <span class="c1"># <%= gettext "Push to new remote" %> :</span>
    git push -u kmx master</code></pre>
          </div>
          <p>
            <%= gettext("Get the git url at") %> <b><%= Routes.page_url(@conn, :index) %>user/path/to/repo</b>
          </p>
    
          <h4><%= link gettext("Links"), to: "#links", id: "links" %></h4>
          <p>
            <%= gettext("If you need more help with git, please see :") %>
            <ul>
              <li><a href="https://git-scm.com/doc"><%= gettext("the official git documentation") %></a></li>
              <li><a href="https://stackoverflow.com/questions/tagged/git"><%= gettext("StackOverflow about git") %></a></li>
            </ul>
          </p>
    
          <hr/>
    
          <h3><%= link gettext("Stats"), to: "#stats", id: "stats" %></h3>
    
          <div class="row">
            <div class="col col-12 col-md-5">
              <table class="table">
                <tr>
                  <th><%= gettext "Users" %></th>
                  <td><%= @user_count %></td>
                </tr>
                <tr>
                  <th><%= gettext "Organisations" %></th>
                  <td><%= @org_count %></td>
                </tr>
                <tr>
                  <th><%= gettext "Repositories" %></th>
                  <td><%= @repo_count %></td>
                </tr>
              </table>
            </div>
          </div>
    
          <hr/>
    
          <h3><%= link gettext("kmxgit authors"), to: "#authors", id: "authors" %></h3>
          <ul>
            <li>Thomas de Grivel &lt;thoxdg@gmail.com&gt;</li>
          </ul>
        </div>
      </div>
    </div>