diff --git a/config/default.js b/config/default.js index eb4db43b..6c4362b5 100644 --- a/config/default.js +++ b/config/default.js @@ -113,6 +113,7 @@ module.exports = { }, rss: { enabled: true, + showIcon: true, copyright: '2020, Mateusz Filipowicz', webMaster: 'Mateusz Filipowicz (matfilipowicz@gmail.com)', managingEditor: 'Mateusz Filipowicz (matfilipowicz@gmail.com)', diff --git a/src/components/Header/Header.js b/src/components/Header/Header.js index 26d34892..7582522d 100644 --- a/src/components/Header/Header.js +++ b/src/components/Header/Header.js @@ -9,6 +9,7 @@ import { ButtonIcon, DarkModeSwitch, SearchInput, Sidebar } from '../'; import { HelpCircle, Search } from 'react-feather'; import { useTheme } from 'emotion-theming'; import SocialButtons from './social'; +import { Rss } from '../Buttons' const SearchIcon = styled(Search)` width: 1.2em; @@ -142,6 +143,13 @@ const HelpButton = ({ helpUrl, ...props }) => { ); }; +const RssIcon = (iconBaseProps) => { + if (config.features.rss && config.features.rss.enabled && config.features.rss.showIcon) { + return + } + return null; +} + const Header = ({ setShowSearch, location, themeProvider }) => ( ( {isSearchEnabled ? : null} {helpUrl && helpUrl.length > 0 ? : ''} { SocialButtons(iconBaseProps, config.social) } + {config.features.darkMode.enabled ? (