From cf4d8245342fce8ad2a11eb96bc39e44b998c41e Mon Sep 17 00:00:00 2001 From: Sergey Yarkov Date: Sun, 26 Jul 2020 18:25:43 +0300 Subject: [PATCH] rss feed icon --- content/articles/2020-07-21_test-article.md | 13 +++++----- gatsby-config.js | 28 ++++++++++----------- src/components/Footer/Footer.js | 7 ++++++ src/components/Footer/Footer.scss | 27 ++++++++++++++++++++ src/components/Header/Header.js | 3 +++ src/components/Header/Header.scss | 2 ++ src/images/rss-icon.svg | 12 +++++++++ 7 files changed, 72 insertions(+), 20 deletions(-) create mode 100644 src/images/rss-icon.svg diff --git a/content/articles/2020-07-21_test-article.md b/content/articles/2020-07-21_test-article.md index 852eb78..cb3535d 100644 --- a/content/articles/2020-07-21_test-article.md +++ b/content/articles/2020-07-21_test-article.md @@ -19,17 +19,18 @@ tags: - graphql - reactjs --- + ## this is second article Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc non fermentum ligula. Aenean et ex nec magna faucibus congue eu ac justo. Cras malesuada diam lectus, vitae feugiat nulla condimentum id. Duis interdum sodales eros ornare mattis. Nunc id viverra ante. Maecenas suscipit est sed rhoncus condimentum. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur vehicula risus nisi, quis hendrerit magna tincidunt eu. Phasellus fringilla accumsan viverra. Mauris a cursus orci. Lorem ipsum dolor sit amet, consectetur adipiscing elit. -* Nunc non fermentum ligula? -* Nunc non fermentum ligula? -* Nunc non fermentum ligula? -* Nunc non fermentum ligula? -* Nunc non fermentum ligula? +- Nunc non fermentum ligula? +- Nunc non fermentum ligula? +- Nunc non fermentum ligula? +- Nunc non fermentum ligula? +- Nunc non fermentum ligula? Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc non fermentum ligula. Aenean et ex nec magna faucibus congue eu ac justo. Cras malesuada diam lectus, vitae feugiat nulla condimentum id. Duis interdum sodales eros ornare mattis. Nunc id viverra ante. Maecenas suscipit est sed rhoncus condimentum. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur vehicula risus nisi, quis hendrerit magna tincidunt eu. Phasellus fringilla accumsan viverra. Mauris a cursus orci. @@ -64,4 +65,4 @@ React.useEffect(() => { 1. First 2. Second -3. Third \ No newline at end of file +3. Third diff --git a/gatsby-config.js b/gatsby-config.js index f2f4f3d..8f5a889 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -4,7 +4,7 @@ const siteConfig = require("./config") const { NODE_ENV, - URL: NETLIFY_SITE_URL = 'https://devthread.ru/', + URL: NETLIFY_SITE_URL = "https://devthread.ru/", DEPLOY_PRIME_URL: NETLIFY_DEPLOY_URL = NETLIFY_SITE_URL, CONTEXT: NETLIFY_ENV = NODE_ENV, } = process.env @@ -41,20 +41,20 @@ module.exports = { }, "gatsby-plugin-sitemap", { - resolve: 'gatsby-plugin-robots-txt', + resolve: "gatsby-plugin-robots-txt", options: { resolveEnv: () => NETLIFY_ENV, env: { production: { - policy: [{ userAgent: '*' }], + policy: [{ userAgent: "*" }], }, - 'branch-deploy': { - policy: [{ userAgent: '*', disallow: ['/'] }], + "branch-deploy": { + policy: [{ userAgent: "*", disallow: ["/"] }], sitemap: null, host: null, }, - 'deploy-preview': { - policy: [{ userAgent: '*', disallow: ['/'] }], + "deploy-preview": { + policy: [{ userAgent: "*", disallow: ["/"] }], sitemap: null, host: null, }, @@ -109,7 +109,7 @@ module.exports = { date: edge.node.frontmatter.date, url: `${site.siteMetadata.siteUrl}/article/${edge.node.frontmatter.slug}`, guid: `${site.siteMetadata.siteUrl}/article/${edge.node.frontmatter.slug}`, - custom_elements: [{ 'content:encoded': edge.node.html }], + custom_elements: [{ "content:encoded": edge.node.html }], }) }) }, @@ -135,8 +135,8 @@ module.exports = { } } `, - output: '/rss.xml', - title: 'devthread.ru | RSS Лента', + output: "/rss.xml", + title: "devthread.ru | RSS Лента", }, ], }, @@ -180,15 +180,15 @@ module.exports = { maxWidth: 2400, quality: 100, withWebp: true, - loading: 'lazy', + loading: "lazy", linkImagesToOriginal: false, - } + }, }, `gatsby-remark-responsive-iframe`, { - resolve: 'gatsby-remark-copy-linked-files', + resolve: "gatsby-remark-copy-linked-files", options: { - destinationDir: 'static', + destinationDir: "static", }, }, { diff --git a/src/components/Footer/Footer.js b/src/components/Footer/Footer.js index b5ecce8..507f2fa 100644 --- a/src/components/Footer/Footer.js +++ b/src/components/Footer/Footer.js @@ -6,6 +6,7 @@ import useSiteMetadataQuery from "../../hooks/useSiteMetadataQuery" import LogoIcon from "../../images/logo-icon.svg" import GatsbyIcon from "../../images/gatsby-icon.svg" import NetlifyIcon from "../../images/netlify-icon.svg" +import RssIcon from "../../images/rss-icon.svg" const Footer = () => { const { @@ -94,6 +95,12 @@ const Footer = () => {
+
+ + + RSS Канал + +
© 2020 {title}
diff --git a/src/components/Footer/Footer.scss b/src/components/Footer/Footer.scss index e1b4004..7f2c547 100644 --- a/src/components/Footer/Footer.scss +++ b/src/components/Footer/Footer.scss @@ -78,6 +78,19 @@ footer { color: $black-clr; font-weight: 700; font-size: 13px; + display: flex; + align-items: center; + & span { + width: 100%; + } + & .rss-feed { + font-size: 0; + & svg:hover { + & .rss-feed-icon { + fill: #ee802f; + } + } + } } } } @@ -106,6 +119,20 @@ footer { &__copy { color: $white-clr; font-weight: 600; + & .rss-feed { + & a { + & svg { + & .rss-feed-icon { + fill: $white-clr; + } + } + & svg:hover { + & .rss-feed-icon { + fill: #ee802f; + } + } + } + } } } } diff --git a/src/components/Header/Header.js b/src/components/Header/Header.js index 90ff3e4..b4c0ccf 100644 --- a/src/components/Header/Header.js +++ b/src/components/Header/Header.js @@ -65,12 +65,15 @@ const Header = () => { <> + Ян.Дзен + Телеграмм + Твиттер ) diff --git a/src/components/Header/Header.scss b/src/components/Header/Header.scss index cc0cb18..39bd64a 100644 --- a/src/components/Header/Header.scss +++ b/src/components/Header/Header.scss @@ -44,6 +44,7 @@ header { align-items: center; & .header-nav__social { margin-right: 35px; + font-size: 0; & svg:hover { & .twitter-svg-social { fill: #00acee; @@ -128,6 +129,7 @@ header { } & .mobile-social { margin-top: 30px; + font-size: 0; & svg:hover { & .twitter-svg-social { fill: #00acee; diff --git a/src/images/rss-icon.svg b/src/images/rss-icon.svg new file mode 100644 index 0000000..0f50f7d --- /dev/null +++ b/src/images/rss-icon.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + +