Skip to content

Add RSS Feed buttons to Repo, User and Org pages #19370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ error404 = The page you are trying to reach either <strong>does not exist</stron

never = Never

rss_feed = RSS Feed

[error]
occurred = An error occurred
report_message = If you are sure this is a Gitea bug, please search for issues on <a href="https://github.com/go-gitea/gitea/issues" target="_blank">GitHub</a> or open a new issue if necessary.
Expand Down
1 change: 1 addition & 0 deletions templates/org/home.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<div id="org-info">
<div class="ui header">
{{.Org.DisplayName}}
<a href="{{.Org.HomeLink}}.rss"><i class="ui grey icon tooltip ml-3" data-content="{{.i18n.Tr "rss_feed"}}" data-position="top center">{{svg "octicon-rss" 36}}</i></a>
<span class="org-visibility">
{{if .Org.Visibility.IsLimited}}<div class="ui large basic horizontal label">{{.i18n.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
{{if .Org.Visibility.IsPrivate}}<div class="ui large basic horizontal label">{{.i18n.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
Expand Down
1 change: 1 addition & 0 deletions templates/repo/header.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>
<div class="mx-2">/</div>
<a href="{{$.RepoLink}}">{{.Name}}</a>
<a href="{{$.RepoLink}}.rss"><i class="ui grey icon tooltip ml-3" data-content="{{$.i18n.Tr "rss_feed"}}" data-position="top center">{{svg "octicon-rss" 18}}</i></a>
<div class="labels df ac fw">
{{if .IsTemplate}}
{{if .IsPrivate}}
Expand Down
1 change: 1 addition & 0 deletions templates/user/profile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<div class="content word-break profile-avatar-name">
{{if .Owner.FullName}}<span class="header text center">{{.Owner.FullName}}</span>{{end}}
<span class="username text center">{{.Owner.Name}}</span>
<a href="{{.Owner.HomeLink}}.rss"><i class="ui grey icon tooltip ml-3" data-content="{{.i18n.Tr "rss_feed"}}" data-position="bottom center">{{svg "octicon-rss" 18}}</i></a>
</div>
<div class="extra content word-break">
<ul>
Expand Down
2 changes: 2 additions & 0 deletions web_src/less/_organization.less
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
overflow-wrap: anywhere;

.ui.header {
display: flex;
align-items: center;
font-size: 36px;
margin-bottom: 0;
.org-visibility .label {
Expand Down
7 changes: 2 additions & 5 deletions web_src/less/_user.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
.user {
&.profile {
.ui.card {
.header,
.username {
display: block;
}

.header {
display: block;
font-weight: 600;
font-size: 1.3rem;
margin-top: -.2rem;
Expand All @@ -17,6 +13,7 @@

.profile-avatar-name {
border-top: none;
text-align: center;
}

.extra.content {
Expand Down