diff options
author | silverwind <me@silverwind.io> | 2020-11-01 21:04:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-01 15:04:26 -0500 |
commit | 4617bb689b217ae039297ec16124e73b81487b15 (patch) | |
tree | 0320ce0f74a2e70da28b9d95d1e92a9602b8210b /templates/repo/view_file.tmpl | |
parent | 543697e61e4881256ab56a0fd26eed9765eac1de (diff) | |
download | gitea-4617bb689b217ae039297ec16124e73b81487b15.tar.gz gitea-4617bb689b217ae039297ec16124e73b81487b15.zip |
Misc UI fixes, add secondary color (#13378)
* Misc UI fixes, add secondary color
- Add secondary color, primarily used in arc-green currently
- Convert icons on release page to SVG
- Improve resolved conversation placeholder
- Diff fixes on arc-green
- Misc color tweaks
* fix comment header, adjust arc-green dropzone
* label margin, sidebar margin
* flexbox commits table and add primary button styles
* tooltip styles
* file header fixes
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'templates/repo/view_file.tmpl')
-rw-r--r-- | templates/repo/view_file.tmpl | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index 2f4fc12e62..a8d60bd96e 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -1,5 +1,5 @@ <div class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content"> - <h4 class="file-header ui top attached header"> + <h4 class="file-header ui top attached header df ac sb"> <div class="file-header-left df ac"> {{if .ReadmeInList}} {{svg "octicon-book" 16 "mr-3"}} @@ -31,31 +31,29 @@ {{end}} </div> {{if not .ReadmeInList}} - <div class="file-header-right df ac"> - <div class="ui right file-actions"> - <div class="ui buttons"> - <a class="ui button" href="{{EscapePound $.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a> - {{if not .IsViewCommit}} - <a class="ui button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a> - {{end}} - {{if .IsTextFile}} - <a class="ui button" href="{{.RepoLink}}/blame/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.blame"}}</a> - {{end}} - <a class="ui button" href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a> - </div> - {{if .Repository.CanEnableEditor}} - {{if .CanEditFile}} - <a href="{{.RepoLink}}/_edit/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><span class="btn-octicon poping up" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil"}}</span></a> - {{else}} - <span class="btn-octicon poping up disabled" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil"}}</span> - {{end}} - {{if .CanDeleteFile}} - <a href="{{.RepoLink}}/_delete/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><span class="btn-octicon btn-octicon-danger poping up" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-trashcan"}}</span></a> - {{else}} - <span class="btn-octicon poping up disabled" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-trashcan"}}</span> - {{end}} + <div class="file-header-right file-actions df ac"> + <div class="ui buttons"> + <a class="ui tiny button" href="{{EscapePound $.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a> + {{if not .IsViewCommit}} + <a class="ui tiny button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a> {{end}} + {{if .IsTextFile}} + <a class="ui tiny button" href="{{.RepoLink}}/blame/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.blame"}}</a> + {{end}} + <a class="ui tiny button" href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a> </div> + {{if .Repository.CanEnableEditor}} + {{if .CanEditFile}} + <a href="{{.RepoLink}}/_edit/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><span class="btn-octicon poping up" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil"}}</span></a> + {{else}} + <span class="btn-octicon poping up disabled" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil"}}</span> + {{end}} + {{if .CanDeleteFile}} + <a href="{{.RepoLink}}/_delete/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><span class="btn-octicon btn-octicon-danger poping up" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-trashcan"}}</span></a> + {{else}} + <span class="btn-octicon poping up disabled" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-trashcan"}}</span> + {{end}} + {{end}} </div> {{end}} </h4> |