Skip to content

Commit 71a809b

Browse files
committed
adds rss page
1 parent fcce921 commit 71a809b

3 files changed

Lines changed: 46 additions & 1 deletion

File tree

client/components/Navigation.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { ListUl } from '@styled-icons/boxicons-regular/ListUl'
1111
import { Search } from '@styled-icons/boxicons-regular/Search'
1212
import { Upload } from '@styled-icons/boxicons-regular/Upload'
1313
import { News } from '@styled-icons/boxicons-regular/News'
14+
import { Rss } from '@styled-icons/boxicons-regular/Rss'
1415
import { User } from '@styled-icons/boxicons-regular/User'
1516
import { Error } from '@styled-icons/boxicons-regular/Error'
1617
import { TrendingUp } from '@styled-icons/boxicons-regular/TrendingUp'
@@ -161,6 +162,12 @@ const Navigation = ({ isMobile, menuIsOpen, setMenuIsOpen }) => {
161162
<News size={24} />
162163
</NavLink>
163164
</Link>
165+
<Link href="/rss" passHref>
166+
<NavLink>
167+
<Text>RSS</Text>
168+
<Rss size={24} />
169+
</NavLink>
170+
</Link>
164171
<Link href={`/user/${username}`} passHref>
165172
<NavLink highlights={['/account']}>
166173
<Text>{username}</Text>

client/pages/_app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ const SqTracker = ({ Component, pageProps, initialTheme }) => {
177177
<title>sqtracker</title>
178178
<link
179179
rel="shortcut icon"
180-
href={`data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' rx='6' fill='${appTheme.colors.primary.replace(
180+
href={`data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='28' height='28' x='2' y='2' rx='4' fill='${appTheme.colors.primary.replace(
181181
'#',
182182
'%23'
183183
)}' /></svg>`}

client/pages/rss.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import React from 'react'
2+
import getConfig from 'next/config'
3+
import SEO from '../components/SEO'
4+
import Text from '../components/Text'
5+
6+
const Rss = () => {
7+
const {
8+
publicRuntimeConfig: { SQ_BASE_URL },
9+
} = getConfig()
10+
11+
return (
12+
<>
13+
<SEO title="RSS" />
14+
<Text as="h1" mb={4}>
15+
RSS
16+
</Text>
17+
<Text mb={4}>
18+
There is an RSS feed at <strong>{SQ_BASE_URL}/api/rss</strong>.
19+
</Text>
20+
<Text mb={4}>
21+
To authenticate yourself, you must provide the cookies{' '}
22+
<strong>username</strong> and <strong>password</strong> to the RSS
23+
endpoint, containing your username and your password respectively.
24+
</Text>
25+
<Text mb={4}>
26+
If no query parameters are provided, the RSS feed will contain the 100
27+
latest torrents.
28+
</Text>
29+
<Text>
30+
To only include matching results in the feed, you can add the{' '}
31+
<strong>query</strong> query parameter, e.g.{' '}
32+
<strong>/api/rss?query=loremipsum</strong>.
33+
</Text>
34+
</>
35+
)
36+
}
37+
38+
export default Rss

0 commit comments

Comments
 (0)