diff --git a/gatsby-config.js b/gatsby-config.js index 3a560b4..e937bf1 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -145,7 +145,7 @@ module.exports = { resolve: `gatsby-plugin-amp`, options: { canonicalBaseUrl: 'https://devthread.ru/', - components: ['amp-form', 'amp-sidebar'], + components: ['amp-sidebar', 'amp-accordion'], excludedPaths: ['/404*', '/'], pathIdentifier: '/amp/', relAmpHtmlPattern: '{{canonicalBaseUrl}}{{pathname}}{{pathIdentifier}}', diff --git a/src/lib/amp.js b/src/lib/amp.js index 4bafa92..1b30b92 100644 --- a/src/lib/amp.js +++ b/src/lib/amp.js @@ -1,13 +1,78 @@ import React from 'react'; import { Helmet } from 'react-helmet' +import useSiteMetadataQuery from '../hooks/useSiteMetadataQuery' import LogoIcon from '../images/logo-icon.svg' +import TelegramIcon from "../images/telegram-icon.svg" +import TwitterIcon from "../images/twitter-icon.svg" +import YadzenIcon from "../images/yadzen-icon.svg" const HeaderAMP = () => { + const { + siteMetadata: { + title, + menuLinks, + social: { twitter, telegram, yadzen }, + }, + } = useSiteMetadataQuery() + return ( <> - + @@ -15,21 +80,43 @@ const HeaderAMP = () => { devthread.ru - ☰ - {/* + - */} + - - ✕ - - Example 1 - Example 2 - Example 3 - + + + + ✕ + + {title} + + {menuLinks.map((page, i) => { + return ( + + {page.name} + + ) + })} + + + + + Ян.Дзен + + + + Телеграмм + + + + Твиттер + + + > )