diff options
author | Panagiotis "Ivory" Vasilopoulos <git@n0toose.net> | 2023-12-06 20:29:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-06 20:29:26 +0000 |
commit | 22cb5b0c17d578bc995a7c99ca96711886a1fd5d (patch) | |
tree | c7938033af528caa7a9e89722846c62d97ed7e5f /templates/repo/header.tmpl | |
parent | 1e512b800c0d6ed3fb4ae7ecc8f5ef45d11d7aad (diff) | |
download | gitea-22cb5b0c17d578bc995a7c99ca96711886a1fd5d.tar.gz gitea-22cb5b0c17d578bc995a7c99ca96711886a1fd5d.zip |
Improve RSS feed icons (#28368)
- The RSS Feed icons were placed in a proper button, so that it does
not look "inconsistent". This also makes the problem of the button
being improperly aligned go away.
- The icon that shows on user profiles has not been modified because
of a lack of better implementation ideas.
- Where applicable, the RSS Feed icon was put directly next to the
Follow button (right menu), as both functionalities effectively
share the same purpose.
- Despite the attempt at achieving less inconsistency, a conscious
decision to not add any text to those buttons was made, opting for
tooltips instead. "Make it present, but not too annoying."
- A special exception was made for the Releases pages (which contains
text, not a tooltip), where an RSS feed would be particularly
beneficial to users.
The fact that the RSS functionality is explicitly optional was taken
into account, and these improvements were made with public-facing
instances (where the feature works best) in mind.
Diffstat (limited to 'templates/repo/header.tmpl')
-rw-r--r-- | templates/repo/header.tmpl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index 2a3ebc4e77..e4aadf37e3 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -25,9 +25,6 @@ <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.template"}}</span> {{end}} </div> - {{if $.EnableFeed}} - <a class="rss-icon gt-ml-3" href="{{$.RepoLink}}.rss" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">{{svg "octicon-rss" 18}}</a> - {{end}} </div> {{if $.PullMirror}} <div class="fork-flag">{{ctx.Locale.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{$.PullMirror.RemoteAddress}}">{{$.PullMirror.RemoteAddress}}</a></div> @@ -55,6 +52,12 @@ </div> </form> {{end}} + {{if $.EnableFeed}} + {{/* An extra div-element is not necessary here, as this button does not secretly contain two buttons. */}} + <button class="ui compact small basic button" data-url="{{$.RepoLink}}.rss" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}"> + {{svg "octicon-rss" 16}} + </button> + {{end}} <form method="post" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}"> {{$.CsrfTokenHtml}} <div class="ui labeled button" {{if not $.IsSigned}}data-tooltip-content="{{ctx.Locale.Tr "repo.watch_guest_user"}}"{{end}}> |