mirror of
https://github.com/sergeyyarkov/devthread.ru.git
synced 2026-10-11 18:29:10 +03:00
fixed header
This commit is contained in:
parent
3b9aeeb5b6
commit
68eb44879b
@ -10,6 +10,7 @@ module.exports = {
|
|||||||
titleTemplate: '%s · статьи и руководства по веб-разработке',
|
titleTemplate: '%s · статьи и руководства по веб-разработке',
|
||||||
description: 'сборник статей и руководств по тематике веб-разработки и IT для того чтобы помочь вам',
|
description: 'сборник статей и руководств по тематике веб-разработки и IT для того чтобы помочь вам',
|
||||||
url: 'https://devthread.ru',
|
url: 'https://devthread.ru',
|
||||||
|
email: 'support@devthread.ru',
|
||||||
menuLinks: [
|
menuLinks: [
|
||||||
{
|
{
|
||||||
name: 'Статьи',
|
name: 'Статьи',
|
||||||
@ -30,6 +31,7 @@ module.exports = {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
'gatsby-plugin-react-helmet',
|
||||||
'gatsby-plugin-sass',
|
'gatsby-plugin-sass',
|
||||||
{
|
{
|
||||||
resolve: "gatsby-plugin-react-svg",
|
resolve: "gatsby-plugin-react-svg",
|
||||||
|
|||||||
8
package-lock.json
generated
8
package-lock.json
generated
@ -6661,6 +6661,14 @@
|
|||||||
"micromatch": "^3.1.10"
|
"micromatch": "^3.1.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"gatsby-plugin-react-helmet": {
|
||||||
|
"version": "3.3.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/gatsby-plugin-react-helmet/-/gatsby-plugin-react-helmet-3.3.8.tgz",
|
||||||
|
"integrity": "sha512-K9X/LPUOw1f36jjMdNeIPPXTCTZGvF8Qfq9FIe0PuzHFfnESjxkchw6Rd9gB0/wQxSlvunIuEz0z13Vki2aRKw==",
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime": "^7.10.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"gatsby-plugin-react-svg": {
|
"gatsby-plugin-react-svg": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/gatsby-plugin-react-svg/-/gatsby-plugin-react-svg-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/gatsby-plugin-react-svg/-/gatsby-plugin-react-svg-3.0.0.tgz",
|
||||||
|
|||||||
@ -17,6 +17,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@reach/router": "^1.3.4",
|
"@reach/router": "^1.3.4",
|
||||||
"gatsby": "^2.23.12",
|
"gatsby": "^2.23.12",
|
||||||
|
"gatsby-plugin-react-helmet": "^3.3.8",
|
||||||
"gatsby-plugin-react-svg": "^3.0.0",
|
"gatsby-plugin-react-svg": "^3.0.0",
|
||||||
"gatsby-plugin-sass": "^2.3.7",
|
"gatsby-plugin-sass": "^2.3.7",
|
||||||
"gatsby-source-filesystem": "^2.3.14",
|
"gatsby-source-filesystem": "^2.3.14",
|
||||||
@ -31,9 +32,9 @@
|
|||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/gatsbyjs/gatsby-starter-hello-world"
|
"url": "https://github.com/sergeyyarkov/devthread.ru"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/gatsbyjs/gatsby/issues"
|
"url": "https://github.com/sergeyyarkov/devthread.ru/issues"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import './About.scss'
|
|||||||
|
|
||||||
import ContactsIcon from '../../images/contacts-icon.svg'
|
import ContactsIcon from '../../images/contacts-icon.svg'
|
||||||
|
|
||||||
const About = ({ title, pageTitle }) => {
|
const About = ({ title, pageTitle, email }) => {
|
||||||
return (
|
return (
|
||||||
<div className="about">
|
<div className="about">
|
||||||
<div className="about-heading">
|
<div className="about-heading">
|
||||||
@ -28,7 +28,7 @@ const About = ({ title, pageTitle }) => {
|
|||||||
<span>контакты</span>
|
<span>контакты</span>
|
||||||
</div>
|
</div>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="mailto:support@devthread.ru">support@devthread.ru</a></li>
|
<li><a href={`mailto:${email}`}>{email}</a></li>
|
||||||
<li><a href="/">telegram</a></li>
|
<li><a href="/">telegram</a></li>
|
||||||
<Link to='/contacts'>форма обратной связи</Link>
|
<Link to='/contacts'>форма обратной связи</Link>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@ -14,7 +14,7 @@ export default () => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="description-content__info">
|
<div className="description-content__info">
|
||||||
<p>
|
<p>
|
||||||
здесь публикуются самые различные статьи и руководства на тему веб-разработки для того чтобы помочь вам
|
сборник статей и руководств по тематике веб-разработки и IT для того чтобы помочь вам
|
||||||
</p>
|
</p>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" width="21px" height="21px" style={{msTransform: 'rotate(360deg)', WebkitTransform: 'rotate(360deg)', transform: 'rotate(360deg)'}} preserveAspectRatio="xMidYMid meet" viewBox="0 0 36 36">
|
<svg xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" width="21px" height="21px" style={{msTransform: 'rotate(360deg)', WebkitTransform: 'rotate(360deg)', transform: 'rotate(360deg)'}} preserveAspectRatio="xMidYMid meet" viewBox="0 0 36 36">
|
||||||
<path fill="#EF9645" d="M4.861 9.147c.94-.657 2.357-.531 3.201.166l-.968-1.407c-.779-1.111-.5-2.313.612-3.093c1.112-.777 4.263 1.312 4.263 1.312c-.786-1.122-.639-2.544.483-3.331a2.483 2.483 0 0 1 3.456.611l10.42 14.72L25 31l-11.083-4.042L4.25 12.625a2.495 2.495 0 0 1 .611-3.478z" />
|
<path fill="#EF9645" d="M4.861 9.147c.94-.657 2.357-.531 3.201.166l-.968-1.407c-.779-1.111-.5-2.313.612-3.093c1.112-.777 4.263 1.312 4.263 1.312c-.786-1.122-.639-2.544.483-3.331a2.483 2.483 0 0 1 3.456.611l10.42 14.72L25 31l-11.083-4.042L4.25 12.625a2.495 2.495 0 0 1 .611-3.478z" />
|
||||||
|
|||||||
@ -12,10 +12,12 @@ const Header = ({ title, menuLinks }) => {
|
|||||||
const [isScrolled, setIsScrolled] = React.useState(false)
|
const [isScrolled, setIsScrolled] = React.useState(false)
|
||||||
const [isMobileOpen, setIsMobileOpen] = React.useState(false)
|
const [isMobileOpen, setIsMobileOpen] = React.useState(false)
|
||||||
|
|
||||||
React.useEffect(() => document.body.onscroll = () => window.pageYOffset >= 200 ? setIsScrolled(true) : setIsScrolled(false))
|
React.useEffect(() => {
|
||||||
|
isMobileOpen ? document.body.style.overflowY = 'hidden' : document.body.style.overflowY = ''
|
||||||
|
document.body.onscroll = () => window.pageYOffset >= 200 ? setIsScrolled(true) : setIsScrolled(false)
|
||||||
|
})
|
||||||
|
|
||||||
const mobileHandler = () => {
|
const mobileHandler = () => {
|
||||||
!isMobileOpen ? document.body.style.overflowY = 'hidden' : document.body.style.overflowY = ''
|
|
||||||
setIsMobileOpen(!isMobileOpen)
|
setIsMobileOpen(!isMobileOpen)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@ const useSiteMetadata = () => {
|
|||||||
title
|
title
|
||||||
titleTemplate
|
titleTemplate
|
||||||
description
|
description
|
||||||
|
email
|
||||||
siteUrl: url
|
siteUrl: url
|
||||||
menuLinks {
|
menuLinks {
|
||||||
name
|
name
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import Offers from '../components/Offers/Offers'
|
|||||||
import About from '../components/About/About'
|
import About from '../components/About/About'
|
||||||
|
|
||||||
const AboutPage = () => {
|
const AboutPage = () => {
|
||||||
const { siteMetadata: { title, menuLinks } } = useSiteMetadata()
|
const { siteMetadata: { title, menuLinks, email } } = useSiteMetadata()
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
<SEO title='О сайте' description='Этот сайт придуман для того, чтобы помочь вам разобраться с вашей проблемой и решить её. Сайт содержит в себе статьи и руководства.' />
|
<SEO title='О сайте' description='Этот сайт придуман для того, чтобы помочь вам разобраться с вашей проблемой и решить её. Сайт содержит в себе статьи и руководства.' />
|
||||||
@ -14,7 +14,7 @@ const AboutPage = () => {
|
|||||||
<div className="container-fluid">
|
<div className="container-fluid">
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-md-9 col-xs-12">
|
<div className="col-md-9 col-xs-12">
|
||||||
<About title={title} pageTitle={menuLinks.filter(page => page.link === '/about')[0].name} />
|
<About title={title} pageTitle={menuLinks.filter(page => page.link === '/about')[0].name} email={email} />
|
||||||
</div>
|
</div>
|
||||||
<div className="col-md-3 col-xs-12">
|
<div className="col-md-3 col-xs-12">
|
||||||
<Offers />
|
<Offers />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user