Indent all templates with tabs
This commit improves templates readability, since all of them use consistent indent with all template command blocks indented too. 1. Indents both HTML containers such as <div>, <p> and Go HTML template blocks such as {{if}} {{with}} 2. Cleans all trailing white-space 3. Adds trailing last line-break to each file
This commit is contained in:
parent
dd8a06a397
commit
da2585c11e
|
@ -1,15 +1,15 @@
|
|||
{{if .Flash.ErrorMsg}}
|
||||
<div class="ui negative message">
|
||||
<div class="ui negative message">
|
||||
<p>{{.Flash.ErrorMsg}}</p>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .Flash.SuccessMsg}}
|
||||
<div class="ui positive message">
|
||||
<div class="ui positive message">
|
||||
<p>{{.Flash.SuccessMsg}}</p>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .Flash.InfoMsg}}
|
||||
<div class="ui info message">
|
||||
<div class="ui info message">
|
||||
<p>{{.Flash.InfoMsg}}</p>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
|
@ -1,3 +1,8 @@
|
|||
{{/*
|
||||
<html>
|
||||
<body>
|
||||
<div>
|
||||
*/}}
|
||||
</div>
|
||||
<footer>
|
||||
<div class="ui container">
|
||||
|
@ -26,24 +31,24 @@
|
|||
</footer>
|
||||
</body>
|
||||
|
||||
<!-- Third-party libraries -->
|
||||
{{if .RequireHighlightJS}}
|
||||
<!-- Third-party libraries -->
|
||||
{{if .RequireHighlightJS}}
|
||||
<link rel="stylesheet" href="{{AppSubUrl}}/css/highlight-8.9.1/github.css">
|
||||
<script src="{{AppSubUrl}}/js/libs/highlight-8.9.1.pack.js"></script>
|
||||
{{end}}
|
||||
{{if .RequireMinicolors}}
|
||||
{{end}}
|
||||
{{if .RequireMinicolors}}
|
||||
<link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.minicolors-2.1.12.css">
|
||||
<script src="{{AppSubUrl}}/js/libs/jquery.minicolors-2.1.12.min.js"></script>
|
||||
{{end}}
|
||||
{{if .RequireDatetimepicker}}
|
||||
{{end}}
|
||||
{{if .RequireDatetimepicker}}
|
||||
<link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.datetimepicker-2.4.5.css">
|
||||
<script src="{{AppSubUrl}}/js/libs/jquery.datetimepicker-2.4.5.js"></script>
|
||||
{{end}}
|
||||
{{if .RequireDropzone}}
|
||||
{{end}}
|
||||
{{if .RequireDropzone}}
|
||||
<link rel="stylesheet" href="{{AppSubUrl}}/css/dropzone-4.2.0.css">
|
||||
<script src="{{AppSubUrl}}/js/libs/dropzone-4.2.0.js"></script>
|
||||
{{end}}
|
||||
<script src="{{AppSubUrl}}/js/libs/emojify-1.1.0.min.js"></script>
|
||||
<script src="{{AppSubUrl}}/js/libs/clipboard-1.5.5.min.js"></script>
|
||||
{{end}}
|
||||
<script src="{{AppSubUrl}}/js/libs/emojify-1.1.0.min.js"></script>
|
||||
<script src="{{AppSubUrl}}/js/libs/clipboard-1.5.5.min.js"></script>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -57,12 +57,12 @@
|
|||
{{end}}
|
||||
|
||||
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore">{{.i18n.Tr "explore"}}</a>
|
||||
<!-- <div class="item">
|
||||
{{/*<div class="item">
|
||||
<div class="ui icon input">
|
||||
<input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
|
||||
<i class="search icon"></i>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>*/}}
|
||||
|
||||
{{if .IsSigned}}
|
||||
<div class="right menu">
|
||||
|
@ -146,3 +146,8 @@
|
|||
</div><!-- end container -->
|
||||
</div><!-- end bar -->
|
||||
{{end}}
|
||||
{{/*
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
*/}}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{with .Org}}
|
||||
<div class="ui container">
|
||||
<div class="ui container">
|
||||
<div class="ui vertically grid head">
|
||||
<div class="column">
|
||||
<div class="ui header">
|
||||
|
@ -21,6 +21,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
{{end}}
|
|
@ -15,7 +15,7 @@
|
|||
</h4>
|
||||
|
||||
{{if .Commits}}
|
||||
<div class="ui attached table segment">
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped fixed table single line" id="commits-table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -44,12 +44,12 @@
|
|||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{with .Page}}
|
||||
{{if gt .TotalPages 1}}
|
||||
<div class="center page buttons">
|
||||
{{if gt .TotalPages 1}}
|
||||
<div class="center page buttons">
|
||||
<div class="ui borderless pagination menu">
|
||||
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Previous}}"{{end}}>
|
||||
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
|
||||
|
@ -65,6 +65,6 @@
|
|||
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
|
@ -1,7 +1,7 @@
|
|||
{{if .DiffNotAvailable}}
|
||||
<h4>{{.i18n.Tr "repo.diff.data_not_available"}}</h4>
|
||||
<h4>{{.i18n.Tr "repo.diff.data_not_available"}}</h4>
|
||||
{{else}}
|
||||
<div class="diff-detail-box diff-box">
|
||||
<div class="diff-detail-box diff-box">
|
||||
<div>
|
||||
<i class="fa fa-retweet"></i>
|
||||
{{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}
|
||||
|
@ -30,10 +30,10 @@
|
|||
</li>
|
||||
{{end}}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{range $i, $file := .Diff.Files}}
|
||||
<div class="diff-file-box diff-box file-content" id="diff-{{.Index}}">
|
||||
{{range $i, $file := .Diff.Files}}
|
||||
<div class="diff-file-box diff-box file-content" id="diff-{{.Index}}">
|
||||
<h4 class="ui top attached normal header">
|
||||
<div class="diff-counter count ui left">
|
||||
{{if $file.IsBin}}
|
||||
|
@ -88,7 +88,7 @@
|
|||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
{{end}}
|
||||
</div>
|
||||
<br>
|
||||
{{end}}
|
||||
{{end}}
|
|
@ -1,5 +1,5 @@
|
|||
{{with .Repository}}
|
||||
<div class="ui container"><!-- start container -->
|
||||
<div class="ui container"><!-- start container -->
|
||||
<div class="ui vertically padded grid head"><!-- start grid -->
|
||||
<div class="column"><!-- start column -->
|
||||
<div class="ui header">
|
||||
|
@ -43,10 +43,10 @@
|
|||
</div>
|
||||
</div><!-- end column -->
|
||||
</div><!-- end grid -->
|
||||
</div><!-- end container -->
|
||||
</div><!-- end container -->
|
||||
{{end}}
|
||||
{{if not (or .IsBareRepo .IsDiffCompare)}}
|
||||
<div class="ui tabs container">
|
||||
<div class="ui tabs container">
|
||||
<div class="ui tabular menu navbar">
|
||||
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}">
|
||||
<i class="icon octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
|
||||
|
@ -80,8 +80,8 @@
|
|||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui tabs divider"></div>
|
||||
</div>
|
||||
<div class="ui tabs divider"></div>
|
||||
{{else}}
|
||||
<div class="ui divider"></div>
|
||||
<div class="ui divider"></div>
|
||||
{{end}}
|
||||
|
|
|
@ -11,6 +11,6 @@
|
|||
</div>
|
||||
</div>
|
||||
{{if .IsAttachmentEnabled}}
|
||||
<div class="attachments"></div>
|
||||
<div class="ui basic button dropzone" id="dropzone" data-upload-url="{{AppSubUrl}}/issues/attachments" data-accepts="{{.AttachmentAllowedTypes}}" data-max-file="{{.AttachmentMaxFiles}}" data-max-size="{{.AttachmentMaxSize}}" data-default-message="{{.i18n.Tr "dropzone.default_message"}}" data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}" data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}" data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}"></div>
|
||||
<div class="attachments"></div>
|
||||
<div class="ui basic button dropzone" id="dropzone" data-upload-url="{{AppSubUrl}}/issues/attachments" data-accepts="{{.AttachmentAllowedTypes}}" data-max-file="{{.AttachmentMaxFiles}}" data-max-size="{{.AttachmentMaxSize}}" data-default-message="{{.i18n.Tr "dropzone.default_message"}}" data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}" data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}" data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}"></div>
|
||||
{{end}}
|
|
@ -52,7 +52,7 @@
|
|||
</div>
|
||||
|
||||
{{if .IsRepositoryAdmin}}
|
||||
<div class="ui small basic delete modal">
|
||||
<div class="ui small basic delete modal">
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "repo.issues.label_deletion"}}
|
||||
|
@ -70,9 +70,9 @@
|
|||
{{.i18n.Tr "modal.yes"}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui small edit-label modal">
|
||||
<div class="ui small edit-label modal">
|
||||
<div class="header">
|
||||
{{.i18n.Tr "repo.issues.label_modify"}}
|
||||
</div>
|
||||
|
@ -104,6 +104,6 @@
|
|||
<i class="checkmark icon"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{template "base/footer" .}}
|
|
@ -94,7 +94,7 @@
|
|||
</div>
|
||||
|
||||
{{if .IsRepositoryAdmin}}
|
||||
<div class="ui small basic delete modal">
|
||||
<div class="ui small basic delete modal">
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "repo.milestones.deletion"}}
|
||||
|
@ -112,6 +112,6 @@
|
|||
{{.i18n.Tr "modal.yes"}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{template "base/footer" .}}
|
|
@ -139,9 +139,7 @@
|
|||
{{else if .IsPullReuqestBroken}}red
|
||||
{{else if .Issue.IsChecking}}yellow
|
||||
{{else if .Issue.CanAutoMerge}}green
|
||||
{{else}}red{{end}}">
|
||||
<span class="mega-octicon octicon-git-merge"></span>
|
||||
</a>
|
||||
{{else}}red{{end}}"><span class="mega-octicon octicon-git-merge"></span></a>
|
||||
<div class="content">
|
||||
<div class="ui merge segment">
|
||||
{{if .Issue.HasMerged}}
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
</div>
|
||||
|
||||
{{if .PageIsEditRelease}}
|
||||
<div class="ui small basic delete modal">
|
||||
<div class="ui small basic delete modal">
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "repo.release.deletion"}}
|
||||
|
@ -93,6 +93,6 @@
|
|||
<p>{{.i18n.Tr "repo.release.deletion_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{template "base/footer" .}}
|
|
@ -1,6 +1,6 @@
|
|||
{{if eq .HookType "gogs"}}
|
||||
<p>{{.i18n.Tr "repo.settings.add_webhook_desc" "http://gogs.io/docs/features/webhook.html" | Str2html}}</p>
|
||||
<form class="ui form" action="{{.BaseLink}}/settings/hooks/gogs/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
|
||||
<p>{{.i18n.Tr "repo.settings.add_webhook_desc" "http://gogs.io/docs/features/webhook.html" | Str2html}}</p>
|
||||
<form class="ui form" action="{{.BaseLink}}/settings/hooks/gogs/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required field {{if .Err_PayloadURL}}error{{end}}">
|
||||
<label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label>
|
||||
|
@ -24,5 +24,5 @@
|
|||
<input id="secret" name="secret" type="password" value="{{.Webhook.Secret}}" autocomplete="off">
|
||||
</div>
|
||||
{{template "repo/settings/hook_settings" .}}
|
||||
</form>
|
||||
</form>
|
||||
{{end}}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{if .PageIsSettingsHooksEdit}}
|
||||
<h4 class="ui top attached header">
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.recent_deliveries"}}
|
||||
{{if .IsRepositoryAdmin}}
|
||||
<div class="ui right">
|
||||
|
@ -7,8 +7,8 @@
|
|||
"{{.i18n.Tr "repo.settings.webhook.test_delivery_desc"}}" data-variation="inverted tiny" data-link="{{.Link}}/test" data-redirect="{{.Link}}">{{.i18n.Tr "repo.settings.webhook.test_delivery"}}</button>
|
||||
</div>
|
||||
{{end}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<div class="ui hook history list">
|
||||
{{range .History}}
|
||||
<div class="item">
|
||||
|
@ -69,5 +69,5 @@
|
|||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
|
@ -1,6 +1,6 @@
|
|||
{{if eq .HookType "slack"}}
|
||||
<p>{{.i18n.Tr "repo.settings.add_slack_hook_desc" "http://slack.com" | Str2html}}</p>
|
||||
<form class="ui form" action="{{.BaseLink}}/settings/hooks/slack/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
|
||||
<p>{{.i18n.Tr "repo.settings.add_slack_hook_desc" "http://slack.com" | Str2html}}</p>
|
||||
<form class="ui form" action="{{.BaseLink}}/settings/hooks/slack/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required field {{if .Err_PayloadURL}}error{{end}}">
|
||||
<label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label>
|
||||
|
@ -24,5 +24,5 @@
|
|||
<input id="color" name="color" value="{{.SlackHook.Color}}" placeholder="e.g. #dd4b39, good, warning, danger">
|
||||
</div>
|
||||
{{template "repo/settings/hook_settings" .}}
|
||||
</form>
|
||||
</form>
|
||||
{{end}}
|
||||
|
|
|
@ -217,6 +217,6 @@
|
|||
<button class="ui red button">{{.i18n.Tr "repo.settings.confirm_delete"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
|
@ -1,5 +1,5 @@
|
|||
{{range .Feeds}}
|
||||
<div class="news">
|
||||
<div class="news">
|
||||
<div class="ui left">
|
||||
<img class="ui avatar image" src="{{.ActAvatar}}" alt="">
|
||||
</div>
|
||||
|
@ -65,5 +65,5 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
Loading…
Reference in a new issue