diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-27 01:05:13 -0600 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-27 01:05:13 -0600 |
commit | 62d23e91541550d0478c4884696e918a0e818b4f (patch) | |
tree | 335e18b41b15a419233e5117d1cbc43fa66f2b5c /templates | |
parent | 59d0e73c3507296b31c8e741b44afc7bfe1eb695 (diff) | |
download | gitea-62d23e91541550d0478c4884696e918a0e818b4f.tar.gz gitea-62d23e91541550d0478c4884696e918a0e818b4f.zip |
HTTP no follow and offline mode
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin/config.tmpl | 4 | ||||
-rw-r--r-- | templates/base/head.tmpl | 2 | ||||
-rw-r--r-- | templates/base/navbar.tmpl | 6 | ||||
-rw-r--r-- | templates/release/list.tmpl | 36 | ||||
-rw-r--r-- | templates/repo/commits.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/nav.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/single_file.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/single_list.tmpl | 2 | ||||
-rw-r--r-- | templates/user/profile.tmpl | 6 |
9 files changed, 24 insertions, 44 deletions
diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index d25d40275a..b2b25e90f6 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -18,6 +18,8 @@ <dd>{{.AppUrl}}</dd> <dt>Domain</dt> <dd>{{.Domain}}</dd> + <dt>Offline Mode</dt> + <dd><i class="fa fa{{if .OfflineMode}}-check{{end}}-square-o"></i></dd> <hr/> <dt>Run User</dt> <dd>{{.RunUser}}</dd> @@ -26,6 +28,8 @@ <hr/> <dt>Repository Root Path</dt> <dd>{{.RepoRootPath}}</dd> + <dt>Script Type</dt> + <dd>{{.ScriptType}}</dd> </dl> </div> </div> diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 68231391c0..6794b0171e 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -12,7 +12,7 @@ {{if .Repository.IsGoget}}<meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">{{end}} <!-- Stylesheets --> - {{if IsProdMode}} + {{if CdnMode}} <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> diff --git a/templates/base/navbar.tmpl b/templates/base/navbar.tmpl index 932cae36d4..b8cba5faa6 100644 --- a/templates/base/navbar.tmpl +++ b/templates/base/navbar.tmpl @@ -3,7 +3,7 @@ <nav class="nav"> <a id="nav-logo" class="nav-item pull-left{{if .PageIsHome}} active{{end}}" href="/"><img src="/img/favicon.png" alt="Gogs Logo" id="logo"></a> <a class="nav-item pull-left{{if .PageIsUserDashboard}} active{{end}}" href="/">Dashboard</a> - <a class="nav-item pull-left{{if .PageIsHelp}} active{{end}}" href="https://github.com/gogits/gogs/wiki">Help</a>{{if .IsSigned}} + <a class="nav-item pull-left{{if .PageIsHelp}} active{{end}}" target="_blank" href="https://github.com/gogits/gogs/wiki">Help</a>{{if .IsSigned}} {{if .HasAccess}}<!-- <form class="nav-item pull-left{{if .PageIsNewRepo}} active{{end}}" id="nav-search-form"> <div class="input-group"> <div class="input-group-btn"> @@ -33,8 +33,8 @@ </ul> </div> </div> - {{else}}<a id="nav-signin" class="nav-item navbar-right navbar-btn btn btn-danger" href="/user/login/">Sign In</a> - <a id="nav-signup" class="nav-item navbar-right" href="/user/sign_up/">Sign Up</a>{{end}} + {{else}}<a id="nav-signin" class="nav-item navbar-right navbar-btn btn btn-danger" href="/user/login/" rel="nofollow">Sign In</a> + <a id="nav-signup" class="nav-item navbar-right" href="/user/sign_up/" rel="nofollow">Sign Up</a>{{end}} </nav> </div> </div> diff --git a/templates/release/list.tmpl b/templates/release/list.tmpl index dd37e9c1a2..11f96aa548 100644 --- a/templates/release/list.tmpl +++ b/templates/release/list.tmpl @@ -15,8 +15,8 @@ {{if .PublisherId}} <div class="col-md-2 text-right"> {{if .IsPrerelease}}<span class="btn btn-warning status pre-release">Pre-Release</span>{{else}}<span class="btn btn-success status stable">Stable</span>{{end}} - <a class="tag" href="{{$.RepoLink}}/src/{{.TagName}}"><i class="fa fa-tag"></i>{{.TagName}}</a> - <a class="commit" href="{{$.RepoLink}}/src/{{.SHA1}}"><i class="fa fa-code"></i>{{ShortSha .SHA1}}</a> + <a class="tag" href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="fa fa-tag"></i>{{.TagName}}</a> + <a class="commit" href="{{$.RepoLink}}/src/{{.SHA1}}" rel="nofollow"><i class="fa fa-code"></i>{{ShortSha .SHA1}}</a> </div> <div class="col-md-10"> <h4 class="title"><a href="{{$.RepoLink}}/src/{{.TagName}}">{{.Title}}</a></h4> @@ -30,19 +30,19 @@ {{str2html .Note}} </div> <p class="download"> - <a class="btn btn-default" href="{{$.RepoLink}}/archive/{{.TagName}}/{{$.Repository.Name}}.zip"><i class="fa fa-download"></i>Source Code (ZIP)</a> + <a class="btn btn-default" href="{{$.RepoLink}}/archive/{{.TagName}}/{{$.Repository.Name}}.zip" rel="nofollow"><i class="fa fa-download"></i>Source Code (ZIP)</a> <!-- <a class="btn btn-default" href="{release_download_link}"><i class="fa fa-download"></i>Source Code (TAR.GZ)</a> --> </p> <span class="dot"> </span> </div> {{else}} <div class="col-md-2 text-right"> - <a class="commit" href="{{$.RepoLink}}/src/{{.SHA1}}"><i class="fa fa-code"></i>{{ShortSha .SHA1}}</a> + <a class="commit" href="{{$.RepoLink}}/src/{{.SHA1}}" rel="nofollow"><i class="fa fa-code"></i>{{ShortSha .SHA1}}</a> </div> <div class="col-md-10"> - <h5 class="title"><a href="{{$.RepoLink}}/src/{{.TagName}}">{{.TagName}}</a><i class="fa fa-tag"></i></h5> + <h5 class="title"><a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow">{{.TagName}}</a><i class="fa fa-tag"></i></h5> <p class="download"> - <a class="download-link" href="{{$.RepoLink}}/archive/{{.TagName}}/{{$.Repository.Name}}.zip"><i class="fa fa-download"></i>zip</a> + <a class="download-link" href="{{$.RepoLink}}/archive/{{.TagName}}/{{$.Repository.Name}}.zip" rel="nofollow"><i class="fa fa-download"></i>zip</a> <!-- <a class="download-link" href="{release_download_link}"><i class="fa fa-download"></i>tar.gz</a> --> </p> <span class="dot"> </span> @@ -50,30 +50,6 @@ {{end}} </li> {{end}} - <!-- <li class="release-item clearfix" id="release-{release_id}"> - <div class="col-md-2 text-right"> - <span class="btn btn-warning status pre-release">Pre-Release</span> - <a class="tag" href="{commit_link}"><i class="fa fa-tag"></i>release tag</a> - <a class="commit" href="{commit_link}"><i class="fa fa-code"></i>commit-sha</a> - </div> - <div class="col-md-10"> - <h4 class="title"><a href="{release_single_link}">Release Title</a></h4> - <p class="info"> - <span class="author"><img class="avatar" src="http://1.gravatar.com/avatar/f72f7454ce9d710baa506394f68f4132" alt="" width="20"> - <a href="/user/fuxiaohei">fuxiaohei</a></span> - <span class="time">1 week ago</span> - <span class="ahead"><strong>0</strong> commits since this tag</span> - </p> - <div class="markdown desc"> - release descriptions, support markdown content - </div> - <p class="download"> - <a class="btn btn-default" href="{release_download_link}"><i class="fa fa-download"></i>Source Code (ZIP)</a> - <a class="btn btn-default" href="{release_download_link}"><i class="fa fa-download"></i>Source Code (TAR.GZ)</a> - </p> - <span class="dot"> </span> - </div> - </li> --> </ul> </div> </div> diff --git a/templates/repo/commits.tmpl b/templates/repo/commits.tmpl index b14c6bc8c6..bfc0bf21bf 100644 --- a/templates/repo/commits.tmpl +++ b/templates/repo/commits.tmpl @@ -41,8 +41,8 @@ </table> </div> {{if not .IsSearchPage}}<ul class="pagination" id="commits-pager"> - {{if .LastPageNum}}<li><a href="{{.RepoLink}}/commits/{{.BranchName}}?p={{.LastPageNum}}">« Newer</a></li>{{end}} - {{if .NextPageNum}}<li><a href="{{.RepoLink}}/commits/{{.BranchName}}?p={{.NextPageNum}}">» Older</a></li>{{end}} + {{if .LastPageNum}}<li><a href="{{.RepoLink}}/commits/{{.BranchName}}?p={{.LastPageNum}}" rel="nofollow">« Newer</a></li>{{end}} + {{if .NextPageNum}}<li><a href="{{.RepoLink}}/commits/{{.BranchName}}?p={{.NextPageNum}}" rel="nofollow">» Older</a></li>{{end}} </ul>{{end}} </div> </div> diff --git a/templates/repo/nav.tmpl b/templates/repo/nav.tmpl index ce9c112b8d..48fe31a619 100644 --- a/templates/repo/nav.tmpl +++ b/templates/repo/nav.tmpl @@ -23,10 +23,10 @@ <button class="btn btn-default" type="button" data-toggle="tooltip" title="copy to clipboard" data-placement="top" data-init="copy" data-copy-val="val" data-copy-from="#repo-clone-ipt"><i class="fa fa-copy"></i></button> </span> </div> - <p class="help-block text-center">Need help cloning? Visit <a href="#">Help</a>!</p> + <p class="help-block text-center">Need help cloning? Visit <a target="_blank" href="https://help.github.com/articles/fork-a-repo">Help</a>!</p> <hr/> <div class="clone-zip text-center"> - <a class="btn btn-success btn-lg" href="{{.RepoLink}}/archive/{{.BranchName}}/{{.Repository.Name}}.zip"><i class="fa fa-suitcase"></i>Download ZIP</a> + <a class="btn btn-success btn-lg" href="{{.RepoLink}}/archive/{{.BranchName}}/{{.Repository.Name}}.zip" rel="nofollow"><i class="fa fa-suitcase"></i>Download ZIP</a> </div> </div> </div> diff --git a/templates/repo/single_file.tmpl b/templates/repo/single_file.tmpl index b8205024c5..95c41b7017 100644 --- a/templates/repo/single_file.tmpl +++ b/templates/repo/single_file.tmpl @@ -14,7 +14,7 @@ {{if not .ReadmeInSingle}} <div class="btn-group pull-right"> <a class="btn btn-default hidden" href="#">Edit</a> - <a class="btn btn-default" href="{{.FileLink}}">Raw</a> + <a class="btn btn-default" href="{{.FileLink}}" rel="nofollow">Raw</a> <a class="btn btn-default hidden" href="#">Blame</a> <a class="btn btn-default hidden" href="#">History</a> <a class="btn btn-danger hidden" href="#">Delete</a> @@ -27,7 +27,7 @@ {{if .IsImageFile}} <img src="{{.FileLink}}"> {{else}} - <a href="{{.FileLink}}" class="btn btn-default">View Raw</a> + <a href="{{.FileLink}}" rel="nofollow" class="btn btn-default">View Raw</a> {{end}} </div> {{else}} diff --git a/templates/repo/single_list.tmpl b/templates/repo/single_list.tmpl index 7b6c6e5e9c..49a0ec5af4 100644 --- a/templates/repo/single_list.tmpl +++ b/templates/repo/single_list.tmpl @@ -1,6 +1,6 @@ <div class="panel panel-default info-box"> <div class="panel-heading info-head"> - <a href="/{{.Username}}/{{.Reponame}}/commit/{{.LastCommit.Id}}">{{.LastCommit.Message}}</a> + <a href="/{{.Username}}/{{.Reponame}}/commit/{{.LastCommit.Id}}" rel="nofollow">{{.LastCommit.Message}}</a> </div> <div class="panel-body info-content"> <a href="/user/{{.LastCommit.Author.Name}}">{{.LastCommit.Author.Name}}</a> <span class="text-muted">{{TimeSince .LastCommit.Author.When}}</span> diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index 0319f46c2e..15d2a0bd5a 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -11,13 +11,13 @@ <div class="profile-info"> <ul class="list-group"> {{if .Owner.Location}} - <li class="list-group-item"><i class="fa fa-thumb-tack"></i>{{.Owner.Location}}</li> + <li class="list-group-item"><i class="fa fa-thumb-tack"></i>{{.Owner.Location}}</li> {{end}} {{if .Owner.Email}} - <li class="list-group-item"><i class="fa fa-envelope"></i><a href="mailto:{{.Owner.Email}}">{{.Owner.Email}}</a></li> + <li class="list-group-item"><i class="fa fa-envelope"></i><a href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a></li> {{end}} {{if .Owner.Website}} - <li class="list-group-item"><i class="fa fa-link"></i><a target="_blank" href="{{.Owner.Website}}">{{.Owner.Website}}</a></li> + <li class="list-group-item"><i class="fa fa-link"></i><a target="_blank" href="{{.Owner.Website}}">{{.Owner.Website}}</a></li> {{end}} <li class="list-group-item"><i class="fa fa-clock-o"></i>Joined on {{DateFormat .Owner.Created "M d, Y"}}</li> <!-- <hr> --> |