code.gitea.io/gitea@v1.22.3/templates/repo/empty.tmpl (about)

     1  {{template "base/head" .}}
     2  <div role="main" aria-label="{{.Title}}" class="page-content repository quickstart">
     3  	{{template "repo/header" .}}
     4  	<div class="ui container">
     5  		<div class="ui grid">
     6  			<div class="sixteen wide column content">
     7  				{{template "base/alert" .}}
     8  				{{if .Repository.IsArchived}}
     9  					<div class="ui warning message tw-text-center">
    10  						{{if .Repository.ArchivedUnix.IsZero}}
    11  							{{ctx.Locale.Tr "repo.archive.title"}}
    12  						{{else}}
    13  							{{ctx.Locale.Tr "repo.archive.title_date" (DateTime "long" .Repository.ArchivedUnix)}}
    14  						{{end}}
    15  					</div>
    16  				{{end}}
    17  				{{if .Repository.IsBroken}}
    18  						<div class="ui segment center">
    19  							{{ctx.Locale.Tr "repo.broken_message"}}
    20  						</div>
    21  				{{else if .CanWriteCode}}
    22  					<h4 class="ui top attached header">
    23  						{{ctx.Locale.Tr "repo.quick_guide"}}
    24  					</h4>
    25  					<div class="ui attached guide table segment empty-repo-guide">
    26  						<div class="item">
    27  							<h3>{{ctx.Locale.Tr "repo.clone_this_repo"}} <small>{{ctx.Locale.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository"}}</small></h3>
    28  
    29  							<div class="repo-button-row">
    30  								{{if and .CanWriteCode (not .Repository.IsArchived)}}
    31  									<a class="ui small button" href="{{.RepoLink}}/_new/{{.BranchName | PathEscapeSegments}}/">
    32  										{{ctx.Locale.Tr "repo.editor.new_file"}}
    33  									</a>
    34  									{{if .RepositoryUploadEnabled}}
    35  									<a class="ui small button" href="{{.RepoLink}}/_upload/{{.BranchName | PathEscapeSegments}}/">
    36  										{{ctx.Locale.Tr "repo.editor.upload_file"}}
    37  									</a>
    38  									{{end}}
    39  								{{end}}
    40  								<div class="clone-panel ui action small input tw-flex-1">
    41  									{{template "repo/clone_buttons" .}}
    42  								</div>
    43  							</div>
    44  						</div>
    45  
    46  						{{if not .Repository.IsArchived}}
    47  							<div class="divider tw-my-0"></div>
    48  
    49  							<div class="item">
    50  								<h3>{{ctx.Locale.Tr "repo.create_new_repo_command"}}</h3>
    51  								<div class="markup">
    52  									<pre><code>touch README.md
    53  git init
    54  {{if ne .Repository.DefaultBranch "master"}}git checkout -b {{.Repository.DefaultBranch}}{{end}}
    55  git add README.md
    56  git commit -m "first commit"
    57  git remote add origin <span class="js-clone-url">{{$.CloneButtonOriginLink.HTTPS}}</span>
    58  git push -u origin {{.Repository.DefaultBranch}}</code></pre>
    59  								</div>
    60  							</div>
    61  							<div class="divider"></div>
    62  
    63  							<div class="item">
    64  								<h3>{{ctx.Locale.Tr "repo.push_exist_repo"}}</h3>
    65  								<div class="markup">
    66  									<pre><code>git remote add origin <span class="js-clone-url">{{$.CloneButtonOriginLink.HTTPS}}</span>
    67  git push -u origin {{.Repository.DefaultBranch}}</code></pre>
    68  								</div>
    69  							</div>
    70  						{{end}}
    71  					{{else}}
    72  						<div class="ui segment center">
    73  							{{ctx.Locale.Tr "repo.empty_message"}}
    74  						</div>
    75  					{{end}}
    76  					{{template "repo/clone_script" .}}
    77  				</div>
    78  			</div>
    79  		</div>
    80  	</div>
    81  </div>
    82  {{template "base/footer" .}}