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><%= gettext("Security") %></h3>
          <p>
            <ul class="list-group inline">
              <li class="list-group-item bg-h">
                <h5><%= link gettext("SSH keys fingerprint"), to: "#ssh-keys", id: "ssh-keys" %></h5>
              </li>
              <li class="list-group-item bg-dark">
                <pre class="wrap"><%= render("ssh_keys_fingerprint.txt") %></pre>
              </li>
            </ul>
          </p>
    
          <h3><%= link gettext("Help"), to: "#help", id: "help" %></h3>
          <p>
            <%= link gettext("Install git"), to: Routes.page_path(@conn, :doc_git_install) %>
          </p>
    
          <p>
            <ul class="list-group inline">
              <li class="list-group-item bg-h">
                <%= gettext "Clone repository user/path/to/repo if repo does not exist" %> :
              </li>
              <li class="list-group-item bg-dark">
                <pre><code class="language-sh">git clone <b><%= @git_ssh_url %>:user/path/to/repo.git</b>
    cd <b>repo</b></code></pre>
              </li>
            </ul>
          </p>
    
          <p>
            <ul class="list-group inline">
              <li class="list-group-item bg-h">
                <%= gettext "Change branch" %> :
              </li>
              <li class="list-group-item bg-dark">
                <pre><code class="language-sh">git branch <b>master</b></code></pre>
              </li>
            </ul>
          </p>
    
          <p>
            <ul class="list-group inline">
              <li class="list-group-item bg-h">
                <%= gettext "Pull changes from remote" %> :
              </li>
              <li class="list-group-item bg-dark">
                <pre><code class="language-sh">git pull</code></pre>
              </li>
            </ul>
          </p>
    
          <p>
            <ul class="list-group inline">
              <li class="list-group-item bg-h">
                <%= gettext "Add local changes to next commit" %> :
              </li>
              <li class="list-group-item bg-dark">
                <pre><code class="language-sh">git add <b>README.md static/index.html</b></code></pre>
              </li>
            </ul>
          </p>
    
          <p>
            <ul class="list-group inline">
              <li class="list-group-item bg-h">
                <%= gettext "Commit" %> :
              </li>
              <li class="list-group-item bg-dark">
                <pre><code class="language-sh">git commit -m "<b>a short and descriptive message</b>"</code></pre>
              </li>
            </ul>
          </p>
    
          <p>
            <ul class="list-group inline">
              <li class="list-group-item bg-h">
                <%= gettext "Push changes to remote" %> :
              </li>
              <li class="list-group-item bg-dark">
                <pre><code class="language-sh">git push</code></pre>
              </li>
            </ul>
          </p>
    
          <p>
            <ul class="list-group inline">
              <li class="list-group-item bg-h">
                <%= gettext "Or if your local repo already exists, add remote to existing repo" %> :
              </li>
              <li class="list-group-item bg-dark">
                <pre><code class="language-sh">git remote add kmx <b><%= @git_ssh_url %>:user/path/to/repo.git</b></code></pre>
              </li>
            </ul>
          </p>
    
          <p>
            <ul class="list-group inline">
              <li class="list-group-item bg-h">
                <%= gettext "Push to new remote" %> :
              </li>
              <li class="list-group-item bg-dark">
                <pre><code class="language-sh">git push -u kmx master</code></pre>
              </li>
            </ul>
          </p>
    
          <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>
    
          <div class="row">
            <div class="col col-12">
              <p>
                <ul class="list-group inline">
                  <li class="list-group-item bg-h">
                    <h3><%= link gettext("Stats"), to: "#stats", id: "stats" %></h3>
                  </li>
                  <li class="list-group-item">
                    <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>
                  </li>
                </ul>
              </p>
            </div>
          </div>
        </div>
      </div>
    </div>