mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-01-24 20:42:23 +01:00
refactor: using react hooks
This commit is contained in:
parent
cb4d08f434
commit
4ada925e0f
@ -22,35 +22,35 @@ exports[`Feed renders correctly 1`] = `
|
||||
<span
|
||||
className="feed__item-meta-category"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-meta-category-link"
|
||||
to="/test_0"
|
||||
href="/test_0"
|
||||
>
|
||||
test_0
|
||||
</Link>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<h2
|
||||
className="feed__item-title"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-title-link"
|
||||
to="/test_0"
|
||||
href="/test_0"
|
||||
>
|
||||
test_0
|
||||
</Link>
|
||||
</a>
|
||||
</h2>
|
||||
<p
|
||||
className="feed__item-description"
|
||||
>
|
||||
test_0
|
||||
</p>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-readmore"
|
||||
to="/test_0"
|
||||
href="/test_0"
|
||||
>
|
||||
Read
|
||||
</Link>
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
className="feed__item"
|
||||
@ -70,35 +70,35 @@ exports[`Feed renders correctly 1`] = `
|
||||
<span
|
||||
className="feed__item-meta-category"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-meta-category-link"
|
||||
to="/test_1"
|
||||
href="/test_1"
|
||||
>
|
||||
test_1
|
||||
</Link>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<h2
|
||||
className="feed__item-title"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-title-link"
|
||||
to="/test_1"
|
||||
href="/test_1"
|
||||
>
|
||||
test_1
|
||||
</Link>
|
||||
</a>
|
||||
</h2>
|
||||
<p
|
||||
className="feed__item-description"
|
||||
>
|
||||
test_1
|
||||
</p>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-readmore"
|
||||
to="/test_1"
|
||||
href="/test_1"
|
||||
>
|
||||
Read
|
||||
</Link>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
@ -7,24 +7,24 @@ exports[`Pagination renders correctly 1`] = `
|
||||
<div
|
||||
className="pagination__prev"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="pagination__prev-link"
|
||||
href="/page/1"
|
||||
rel="prev"
|
||||
to="/page/1"
|
||||
>
|
||||
← PREV
|
||||
</Link>
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
className="pagination__next"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="pagination__next-link"
|
||||
href="/page/3"
|
||||
rel="next"
|
||||
to="/page/3"
|
||||
>
|
||||
→ NEXT
|
||||
</Link>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
@ -1,11 +1,11 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import { graphql, StaticQuery } from 'gatsby';
|
||||
import { getContactHref } from '../../../utils';
|
||||
import styles from './Author.module.scss';
|
||||
import { useSiteMetadata } from '../../../hooks';
|
||||
|
||||
export const PureAuthor = ({ data }: Object) => {
|
||||
const { author } = data.site.siteMetadata;
|
||||
const Author = () => {
|
||||
const { author } = useSiteMetadata();
|
||||
|
||||
return (
|
||||
<div className={styles['author']}>
|
||||
@ -24,25 +24,4 @@ export const PureAuthor = ({ data }: Object) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const Author = () => (
|
||||
<StaticQuery
|
||||
query={graphql`
|
||||
query AuthorQuery {
|
||||
site {
|
||||
siteMetadata {
|
||||
author {
|
||||
name
|
||||
bio
|
||||
contacts {
|
||||
twitter
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`}
|
||||
render={(data) => <PureAuthor data={data} />}
|
||||
/>
|
||||
);
|
||||
|
||||
export default Author;
|
||||
|
@ -1,26 +1,21 @@
|
||||
import React from 'react';
|
||||
import renderer from 'react-test-renderer';
|
||||
import { PureAuthor as Author } from './Author';
|
||||
import { useStaticQuery, StaticQuery } from 'gatsby';
|
||||
import Author from './Author';
|
||||
import siteMetadata from '../../../../jest/__fixtures__/site-metadata';
|
||||
|
||||
describe('Author', () => {
|
||||
it('renders correctly', () => {
|
||||
const props = {
|
||||
data: {
|
||||
site: {
|
||||
siteMetadata: {
|
||||
author: {
|
||||
name: 'test',
|
||||
bio: 'test',
|
||||
contacts: {
|
||||
twitter: 'test'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
beforeEach(() => {
|
||||
StaticQuery.mockImplementationOnce(
|
||||
({ render }) => (
|
||||
render(siteMetadata)
|
||||
),
|
||||
useStaticQuery.mockReturnValue(siteMetadata)
|
||||
);
|
||||
});
|
||||
|
||||
const tree = renderer.create(<Author {...props} />).toJSON();
|
||||
it('renders correctly', () => {
|
||||
const tree = renderer.create(<Author />).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
@ -7,15 +7,15 @@ exports[`Author renders correctly 1`] = `
|
||||
<p
|
||||
className="author__bio"
|
||||
>
|
||||
test
|
||||
Test bio
|
||||
<a
|
||||
className="author__bio-twitter"
|
||||
href="https://www.twitter.com/test"
|
||||
href="https://www.twitter.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<strong>
|
||||
test
|
||||
Test name
|
||||
</strong>
|
||||
on Twitter
|
||||
</a>
|
||||
|
@ -1,12 +1,9 @@
|
||||
import React from 'react';
|
||||
import { graphql, StaticQuery } from 'gatsby';
|
||||
import ReactDisqusComments from 'react-disqus-comments';
|
||||
import { useSiteMetadata } from '../../../hooks';
|
||||
|
||||
export const PureComments = ({ data, postTitle, postSlug }) => {
|
||||
const {
|
||||
url,
|
||||
disqusShortname
|
||||
} = data.site.siteMetadata;
|
||||
const Comments = ({ postTitle, postSlug }) => {
|
||||
const { url, disqusShortname } = useSiteMetadata();
|
||||
|
||||
if (!disqusShortname) {
|
||||
return null;
|
||||
@ -22,20 +19,4 @@ export const PureComments = ({ data, postTitle, postSlug }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const Comments = (props) => (
|
||||
<StaticQuery
|
||||
query={graphql`
|
||||
query CommentsQuery {
|
||||
site {
|
||||
siteMetadata {
|
||||
disqusShortname
|
||||
url
|
||||
}
|
||||
}
|
||||
}
|
||||
`}
|
||||
render={(data) => <PureComments {...props} data={data}/>}
|
||||
/>
|
||||
);
|
||||
|
||||
export default Comments;
|
||||
|
@ -1,22 +1,25 @@
|
||||
import React from 'react';
|
||||
import renderer from 'react-test-renderer';
|
||||
import { PureComments as Comments } from './Comments';
|
||||
import { useStaticQuery, StaticQuery } from 'gatsby';
|
||||
import Comments from './Comments';
|
||||
import siteMetadata from '../../../../jest/__fixtures__/site-metadata';
|
||||
|
||||
describe('Comments', () => {
|
||||
it('renders correctly', () => {
|
||||
const props = {
|
||||
data: {
|
||||
site: {
|
||||
siteMetadata: {
|
||||
url: 'http://localhost',
|
||||
disqusShortname: 'test'
|
||||
}
|
||||
}
|
||||
},
|
||||
postTitle: 'test',
|
||||
postSlug: '/test'
|
||||
};
|
||||
beforeEach(() => {
|
||||
StaticQuery.mockImplementationOnce(
|
||||
({ render }) => (
|
||||
render(siteMetadata)
|
||||
),
|
||||
useStaticQuery.mockReturnValue(siteMetadata)
|
||||
);
|
||||
});
|
||||
|
||||
const props = {
|
||||
postTitle: 'test',
|
||||
postSlug: '/test'
|
||||
};
|
||||
|
||||
it('renders correctly', () => {
|
||||
const tree = renderer.create(<Comments {...props} />).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
|
@ -1,9 +1,3 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Comments renders correctly 1`] = `
|
||||
<div>
|
||||
<div
|
||||
id="disqus_thread"
|
||||
/>
|
||||
</div>
|
||||
`;
|
||||
exports[`Comments renders correctly 1`] = `null`;
|
||||
|
@ -8,14 +8,9 @@ import Tags from './Tags';
|
||||
import styles from './Post.module.scss';
|
||||
|
||||
const Post = ({ post }) => {
|
||||
const {
|
||||
tags,
|
||||
title,
|
||||
date
|
||||
} = post.frontmatter;
|
||||
|
||||
const { html } = post;
|
||||
const { tagSlugs } = post.fields;
|
||||
const { tagSlugs, slug } = post.fields;
|
||||
const { tags, title, date } = post.frontmatter;
|
||||
|
||||
return (
|
||||
<div className={styles['post']}>
|
||||
@ -32,7 +27,7 @@ const Post = ({ post }) => {
|
||||
</div>
|
||||
|
||||
<div className={styles['post__comments']}>
|
||||
<Comments postSlug={post.fields.slug} postTitle={post.frontmatter.title} />
|
||||
<Comments postSlug={slug} postTitle={post.frontmatter.title} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
@ -1,8 +1,19 @@
|
||||
import React from 'react';
|
||||
import renderer from 'react-test-renderer';
|
||||
import { useStaticQuery, StaticQuery } from 'gatsby';
|
||||
import Post from './Post';
|
||||
import siteMetadata from '../../../jest/__fixtures__/site-metadata';
|
||||
|
||||
describe('Post', () => {
|
||||
beforeEach(() => {
|
||||
StaticQuery.mockImplementationOnce(
|
||||
({ render }) => (
|
||||
render(siteMetadata)
|
||||
),
|
||||
useStaticQuery.mockReturnValue(siteMetadata)
|
||||
);
|
||||
});
|
||||
|
||||
const props = {
|
||||
post: {
|
||||
html: '<p>test</p>',
|
||||
|
@ -10,22 +10,22 @@ exports[`Tags renders correctly 1`] = `
|
||||
<li
|
||||
className="tags__list-item"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="tags__list-item-link"
|
||||
to="/test_0"
|
||||
href="/test_0"
|
||||
>
|
||||
test_0
|
||||
</Link>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="tags__list-item"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="tags__list-item-link"
|
||||
to="/test_1"
|
||||
href="/test_1"
|
||||
>
|
||||
test_1
|
||||
</Link>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -4,12 +4,12 @@ exports[`Post renders correctly 1`] = `
|
||||
<div
|
||||
className="post"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="post__home-button"
|
||||
to="/"
|
||||
href="/"
|
||||
>
|
||||
All Articles
|
||||
</Link>
|
||||
</a>
|
||||
<div
|
||||
className="post__content"
|
||||
>
|
||||
@ -53,35 +53,48 @@ exports[`Post renders correctly 1`] = `
|
||||
<li
|
||||
className="tags__list-item"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="tags__list-item-link"
|
||||
to="/test_0"
|
||||
href="/test_0"
|
||||
>
|
||||
test_0
|
||||
</Link>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="tags__list-item"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="tags__list-item-link"
|
||||
to="/test_1"
|
||||
href="/test_1"
|
||||
>
|
||||
test_1
|
||||
</Link>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<StaticQuery
|
||||
render={[Function]}
|
||||
/>
|
||||
<div
|
||||
className="author"
|
||||
>
|
||||
<p
|
||||
className="author__bio"
|
||||
>
|
||||
Test bio
|
||||
<a
|
||||
className="author__bio-twitter"
|
||||
href="https://www.twitter.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<strong>
|
||||
Test name
|
||||
</strong>
|
||||
on Twitter
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="post__comments"
|
||||
>
|
||||
<StaticQuery
|
||||
render={[Function]}
|
||||
/>
|
||||
</div>
|
||||
/>
|
||||
</div>
|
||||
`;
|
||||
|
@ -4,8 +4,8 @@ exports[`Author renders correctly 1`] = `
|
||||
<div
|
||||
className="author"
|
||||
>
|
||||
<Link
|
||||
to="/"
|
||||
<a
|
||||
href="/"
|
||||
>
|
||||
<img
|
||||
alt="test"
|
||||
@ -14,16 +14,16 @@ exports[`Author renders correctly 1`] = `
|
||||
src="/photo.jpg"
|
||||
width="75"
|
||||
/>
|
||||
</Link>
|
||||
</a>
|
||||
<h2
|
||||
className="author__title"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="author__title-link"
|
||||
to="/"
|
||||
href="/"
|
||||
>
|
||||
test
|
||||
</Link>
|
||||
</a>
|
||||
</h2>
|
||||
<p
|
||||
className="author__subtitle"
|
||||
|
@ -10,24 +10,22 @@ exports[`Menu renders correctly 1`] = `
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<Link
|
||||
activeClassName="menu__list-item-link--active"
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
to="/#0/"
|
||||
href="/#0/"
|
||||
>
|
||||
Item 0
|
||||
</Link>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<Link
|
||||
activeClassName="menu__list-item-link--active"
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
to="/#1/"
|
||||
href="/#1/"
|
||||
>
|
||||
Item 1
|
||||
</Link>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
@ -1,26 +1,18 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import { graphql, StaticQuery } from 'gatsby';
|
||||
import Author from './Author';
|
||||
import Contacts from './Contacts';
|
||||
import Copyright from './Copyright';
|
||||
import Menu from './Menu';
|
||||
import styles from './Sidebar.module.scss';
|
||||
import { useSiteMetadata } from '../../hooks';
|
||||
|
||||
type Props = {
|
||||
+isIndex: ?boolean,
|
||||
};
|
||||
|
||||
type PureProps = Props & {
|
||||
+data: Object,
|
||||
};
|
||||
|
||||
export const PureSidebar = ({ data, isIndex }: PureProps) => {
|
||||
const {
|
||||
author,
|
||||
copyright,
|
||||
menu
|
||||
} = data.site.siteMetadata;
|
||||
const Sidebar = ({ isIndex }: Props) => {
|
||||
const { author, copyright, menu } = useSiteMetadata();
|
||||
|
||||
return (
|
||||
<div className={styles['sidebar']}>
|
||||
@ -34,38 +26,4 @@ export const PureSidebar = ({ data, isIndex }: PureProps) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const Sidebar = (props: Props) => (
|
||||
<StaticQuery
|
||||
query={graphql`
|
||||
query SidebarQuery {
|
||||
site {
|
||||
siteMetadata {
|
||||
title
|
||||
subtitle
|
||||
copyright
|
||||
menu {
|
||||
label
|
||||
path
|
||||
}
|
||||
author {
|
||||
name
|
||||
photo
|
||||
bio
|
||||
contacts {
|
||||
twitter
|
||||
telegram
|
||||
github
|
||||
email
|
||||
rss
|
||||
vkontakte
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`}
|
||||
render={(data) => <PureSidebar {...props} data={data}/>}
|
||||
/>
|
||||
);
|
||||
|
||||
export default Sidebar;
|
||||
|
@ -1,42 +1,24 @@
|
||||
import React from 'react';
|
||||
import renderer from 'react-test-renderer';
|
||||
import { PureSidebar as Sidebar } from './Sidebar';
|
||||
import { useStaticQuery, StaticQuery } from 'gatsby';
|
||||
import Sidebar from './Sidebar';
|
||||
import siteMetadata from '../../../jest/__fixtures__/site-metadata';
|
||||
|
||||
describe('Sidebar', () => {
|
||||
it('renders correctly', () => {
|
||||
const props = {
|
||||
data: {
|
||||
site: {
|
||||
siteMetadata: {
|
||||
author: {
|
||||
name: 'name',
|
||||
photo: '/photo.jpg',
|
||||
bio: 'bio',
|
||||
contacts: {
|
||||
email: '#',
|
||||
twitter: '#',
|
||||
vkontakte: '#',
|
||||
github: '#',
|
||||
rss: '#',
|
||||
telegram: '#'
|
||||
}
|
||||
},
|
||||
copyright: 'copyright',
|
||||
menu: [
|
||||
{
|
||||
label: 'Item 0',
|
||||
path: '/#0/'
|
||||
},
|
||||
{
|
||||
label: 'Item 1',
|
||||
path: '/#1/'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
beforeEach(() => {
|
||||
StaticQuery.mockImplementationOnce(
|
||||
({ render }) => (
|
||||
render(siteMetadata)
|
||||
),
|
||||
useStaticQuery.mockReturnValue(siteMetadata)
|
||||
);
|
||||
});
|
||||
|
||||
const props = {
|
||||
isIndex: true
|
||||
};
|
||||
|
||||
it('renders correctly', () => {
|
||||
const tree = renderer.create(<Sidebar {...props} />).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
|
@ -10,31 +10,31 @@ exports[`Sidebar renders correctly 1`] = `
|
||||
<div
|
||||
className="author"
|
||||
>
|
||||
<Link
|
||||
to="/"
|
||||
<a
|
||||
href="/"
|
||||
>
|
||||
<img
|
||||
alt="name"
|
||||
alt="Test name"
|
||||
className="author__photo"
|
||||
height="75"
|
||||
src="/photo.jpg"
|
||||
src="/test.jpg"
|
||||
width="75"
|
||||
/>
|
||||
</Link>
|
||||
<h2
|
||||
</a>
|
||||
<h1
|
||||
className="author__title"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="author__title-link"
|
||||
to="/"
|
||||
href="/"
|
||||
>
|
||||
name
|
||||
</Link>
|
||||
</h2>
|
||||
Test name
|
||||
</a>
|
||||
</h1>
|
||||
<p
|
||||
className="author__subtitle"
|
||||
>
|
||||
bio
|
||||
Test bio
|
||||
</p>
|
||||
</div>
|
||||
<nav
|
||||
@ -46,24 +46,32 @@ exports[`Sidebar renders correctly 1`] = `
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<Link
|
||||
activeClassName="menu__list-item-link--active"
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
to="/#0/"
|
||||
href="/test/1/"
|
||||
>
|
||||
Item 0
|
||||
</Link>
|
||||
Test label 1
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<Link
|
||||
activeClassName="menu__list-item-link--active"
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
to="/#1/"
|
||||
href="/test/2/"
|
||||
>
|
||||
Item 1
|
||||
</Link>
|
||||
Test label 2
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/3/"
|
||||
>
|
||||
Test label 3
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
@ -92,6 +100,25 @@ exports[`Sidebar renders correctly 1`] = `
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="telegram:#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 28 28"
|
||||
>
|
||||
<path
|
||||
d="M27.563 0.172c0.328 0.234 0.484 0.609 0.422 1l-4 24c-0.047 0.297-0.234 0.547-0.5 0.703-0.141 0.078-0.313 0.125-0.484 0.125-0.125 0-0.25-0.031-0.375-0.078l-7.078-2.891-3.781 4.609c-0.187 0.234-0.469 0.359-0.766 0.359-0.109 0-0.234-0.016-0.344-0.063-0.391-0.141-0.656-0.516-0.656-0.938v-5.453l13.5-16.547-16.703 14.453-6.172-2.531c-0.359-0.141-0.594-0.469-0.625-0.859-0.016-0.375 0.172-0.734 0.5-0.922l26-15c0.156-0.094 0.328-0.141 0.5-0.141 0.203 0 0.406 0.063 0.562 0.172z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
@ -111,25 +138,6 @@ exports[`Sidebar renders correctly 1`] = `
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://vk.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 31 28"
|
||||
>
|
||||
<path
|
||||
d="M29.953 8.125c0.234 0.641-0.5 2.141-2.344 4.594-3.031 4.031-3.359 3.656-0.859 5.984 2.406 2.234 2.906 3.313 2.984 3.453 0 0 1 1.75-1.109 1.766l-4 0.063c-0.859 0.172-2-0.609-2-0.609-1.5-1.031-2.906-3.703-4-3.359 0 0-1.125 0.359-1.094 2.766 0.016 0.516-0.234 0.797-0.234 0.797s-0.281 0.297-0.828 0.344h-1.797c-3.953 0.25-7.438-3.391-7.438-3.391s-3.813-3.938-7.156-11.797c-0.219-0.516 0.016-0.766 0.016-0.766s0.234-0.297 0.891-0.297l4.281-0.031c0.406 0.063 0.688 0.281 0.688 0.281s0.25 0.172 0.375 0.5c0.703 1.75 1.609 3.344 1.609 3.344 1.563 3.219 2.625 3.766 3.234 3.437 0 0 0.797-0.484 0.625-4.375-0.063-1.406-0.453-2.047-0.453-2.047-0.359-0.484-1.031-0.625-1.328-0.672-0.234-0.031 0.156-0.594 0.672-0.844 0.766-0.375 2.125-0.391 3.734-0.375 1.266 0.016 1.625 0.094 2.109 0.203 1.484 0.359 0.984 1.734 0.984 5.047 0 1.062-0.203 2.547 0.562 3.031 0.328 0.219 1.141 0.031 3.141-3.375 0 0 0.938-1.625 1.672-3.516 0.125-0.344 0.391-0.484 0.391-0.484s0.25-0.141 0.594-0.094l4.5-0.031c1.359-0.172 1.578 0.453 1.578 0.453z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
@ -173,16 +181,16 @@ exports[`Sidebar renders correctly 1`] = `
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="telegram:#"
|
||||
href="https://vk.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 28 28"
|
||||
viewBox="0 0 31 28"
|
||||
>
|
||||
<path
|
||||
d="M27.563 0.172c0.328 0.234 0.484 0.609 0.422 1l-4 24c-0.047 0.297-0.234 0.547-0.5 0.703-0.141 0.078-0.313 0.125-0.484 0.125-0.125 0-0.25-0.031-0.375-0.078l-7.078-2.891-3.781 4.609c-0.187 0.234-0.469 0.359-0.766 0.359-0.109 0-0.234-0.016-0.344-0.063-0.391-0.141-0.656-0.516-0.656-0.938v-5.453l13.5-16.547-16.703 14.453-6.172-2.531c-0.359-0.141-0.594-0.469-0.625-0.859-0.016-0.375 0.172-0.734 0.5-0.922l26-15c0.156-0.094 0.328-0.141 0.5-0.141 0.203 0 0.406 0.063 0.562 0.172z"
|
||||
d="M29.953 8.125c0.234 0.641-0.5 2.141-2.344 4.594-3.031 4.031-3.359 3.656-0.859 5.984 2.406 2.234 2.906 3.313 2.984 3.453 0 0 1 1.75-1.109 1.766l-4 0.063c-0.859 0.172-2-0.609-2-0.609-1.5-1.031-2.906-3.703-4-3.359 0 0-1.125 0.359-1.094 2.766 0.016 0.516-0.234 0.797-0.234 0.797s-0.281 0.297-0.828 0.344h-1.797c-3.953 0.25-7.438-3.391-7.438-3.391s-3.813-3.938-7.156-11.797c-0.219-0.516 0.016-0.766 0.016-0.766s0.234-0.297 0.891-0.297l4.281-0.031c0.406 0.063 0.688 0.281 0.688 0.281s0.25 0.172 0.375 0.5c0.703 1.75 1.609 3.344 1.609 3.344 1.563 3.219 2.625 3.766 3.234 3.437 0 0 0.797-0.484 0.625-4.375-0.063-1.406-0.453-2.047-0.453-2.047-0.359-0.484-1.031-0.625-1.328-0.672-0.234-0.031 0.156-0.594 0.672-0.844 0.766-0.375 2.125-0.391 3.734-0.375 1.266 0.016 1.625 0.094 2.109 0.203 1.484 0.359 0.984 1.734 0.984 5.047 0 1.062-0.203 2.547 0.562 3.031 0.328 0.219 1.141 0.031 3.141-3.375 0 0 0.938-1.625 1.672-3.516 0.125-0.344 0.391-0.484 0.391-0.484s0.25-0.141 0.594-0.094l4.5-0.031c1.359-0.172 1.578 0.453 1.578 0.453z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
@ -192,7 +200,7 @@ exports[`Sidebar renders correctly 1`] = `
|
||||
<div
|
||||
className="copyright"
|
||||
>
|
||||
copyright
|
||||
Test copyright
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
4
src/hooks/index.js
Normal file
4
src/hooks/index.js
Normal file
@ -0,0 +1,4 @@
|
||||
// @flow
|
||||
export { default as useSiteMetadata } from './use-site-metadata';
|
||||
export { default as useCategoriesList } from './use-categories-list';
|
||||
export { default as useTagsList } from './use-tags-list';
|
23
src/hooks/use-categories-list.js
Normal file
23
src/hooks/use-categories-list.js
Normal file
@ -0,0 +1,23 @@
|
||||
// @flow
|
||||
import { useStaticQuery, graphql } from 'gatsby';
|
||||
|
||||
const useCategoriesList = () => {
|
||||
const { allMarkdownRemark } = useStaticQuery(
|
||||
graphql`
|
||||
query CategoriesListQuery {
|
||||
allMarkdownRemark(
|
||||
filter: { frontmatter: { template: { eq: "post" }, draft: { ne: true } } }
|
||||
) {
|
||||
group(field: frontmatter___category) {
|
||||
fieldValue
|
||||
totalCount
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
);
|
||||
|
||||
return allMarkdownRemark.group;
|
||||
};
|
||||
|
||||
export default useCategoriesList;
|
41
src/hooks/use-site-metadata.js
Normal file
41
src/hooks/use-site-metadata.js
Normal file
@ -0,0 +1,41 @@
|
||||
// @flow
|
||||
import { useStaticQuery, graphql } from 'gatsby';
|
||||
|
||||
const useSiteMetadata = () => {
|
||||
const { site } = useStaticQuery(
|
||||
graphql`
|
||||
query SiteMetaData {
|
||||
site {
|
||||
siteMetadata {
|
||||
author {
|
||||
name
|
||||
bio
|
||||
photo
|
||||
contacts {
|
||||
email
|
||||
telegram
|
||||
twitter
|
||||
github
|
||||
rss
|
||||
vkontakte
|
||||
}
|
||||
}
|
||||
menu {
|
||||
label
|
||||
path
|
||||
}
|
||||
url
|
||||
title
|
||||
subtitle
|
||||
copyright
|
||||
disqusShortname
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
);
|
||||
|
||||
return site.siteMetadata;
|
||||
};
|
||||
|
||||
export default useSiteMetadata;
|
23
src/hooks/use-tags-list.js
Normal file
23
src/hooks/use-tags-list.js
Normal file
@ -0,0 +1,23 @@
|
||||
// @flow
|
||||
import { useStaticQuery, graphql } from 'gatsby';
|
||||
|
||||
const useTagsList = () => {
|
||||
const { allMarkdownRemark } = useStaticQuery(
|
||||
graphql`
|
||||
query TagsListQuery {
|
||||
allMarkdownRemark(
|
||||
filter: { frontmatter: { template: { eq: "post" }, draft: { ne: true } } }
|
||||
) {
|
||||
group(field: frontmatter___tags) {
|
||||
fieldValue
|
||||
totalCount
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
);
|
||||
|
||||
return allMarkdownRemark.group;
|
||||
};
|
||||
|
||||
export default useTagsList;
|
@ -4,9 +4,209 @@ exports[`CategoriesListTemplate renders correctly 1`] = `
|
||||
<div
|
||||
className="layout"
|
||||
>
|
||||
<StaticQuery
|
||||
render={[Function]}
|
||||
/>
|
||||
<div
|
||||
className="sidebar"
|
||||
>
|
||||
<div
|
||||
className="sidebar__inner"
|
||||
>
|
||||
<div
|
||||
className="author"
|
||||
>
|
||||
<a
|
||||
href="/"
|
||||
>
|
||||
<img
|
||||
alt="Test name"
|
||||
className="author__photo"
|
||||
height="75"
|
||||
src="/test.jpg"
|
||||
width="75"
|
||||
/>
|
||||
</a>
|
||||
<h2
|
||||
className="author__title"
|
||||
>
|
||||
<a
|
||||
className="author__title-link"
|
||||
href="/"
|
||||
>
|
||||
Test name
|
||||
</a>
|
||||
</h2>
|
||||
<p
|
||||
className="author__subtitle"
|
||||
>
|
||||
Test bio
|
||||
</p>
|
||||
</div>
|
||||
<nav
|
||||
className="menu"
|
||||
>
|
||||
<ul
|
||||
className="menu__list"
|
||||
>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/1/"
|
||||
>
|
||||
Test label 1
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/2/"
|
||||
>
|
||||
Test label 2
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/3/"
|
||||
>
|
||||
Test label 3
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div
|
||||
className="contacts"
|
||||
>
|
||||
<ul
|
||||
className="contacts__list"
|
||||
>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="mailto:#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 28 28"
|
||||
>
|
||||
<path
|
||||
d="M26 23.5v-12c-0.328 0.375-0.688 0.719-1.078 1.031-2.234 1.719-4.484 3.469-6.656 5.281-1.172 0.984-2.625 2.188-4.25 2.188h-0.031c-1.625 0-3.078-1.203-4.25-2.188-2.172-1.813-4.422-3.563-6.656-5.281-0.391-0.313-0.75-0.656-1.078-1.031v12c0 0.266 0.234 0.5 0.5 0.5h23c0.266 0 0.5-0.234 0.5-0.5zM26 7.078c0-0.391 0.094-1.078-0.5-1.078h-23c-0.266 0-0.5 0.234-0.5 0.5 0 1.781 0.891 3.328 2.297 4.438 2.094 1.641 4.188 3.297 6.266 4.953 0.828 0.672 2.328 2.109 3.422 2.109h0.031c1.094 0 2.594-1.437 3.422-2.109 2.078-1.656 4.172-3.313 6.266-4.953 1.016-0.797 2.297-2.531 2.297-3.859zM28 6.5v17c0 1.375-1.125 2.5-2.5 2.5h-23c-1.375 0-2.5-1.125-2.5-2.5v-17c0-1.375 1.125-2.5 2.5-2.5h23c1.375 0 2.5 1.125 2.5 2.5z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="telegram:#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 28 28"
|
||||
>
|
||||
<path
|
||||
d="M27.563 0.172c0.328 0.234 0.484 0.609 0.422 1l-4 24c-0.047 0.297-0.234 0.547-0.5 0.703-0.141 0.078-0.313 0.125-0.484 0.125-0.125 0-0.25-0.031-0.375-0.078l-7.078-2.891-3.781 4.609c-0.187 0.234-0.469 0.359-0.766 0.359-0.109 0-0.234-0.016-0.344-0.063-0.391-0.141-0.656-0.516-0.656-0.938v-5.453l13.5-16.547-16.703 14.453-6.172-2.531c-0.359-0.141-0.594-0.469-0.625-0.859-0.016-0.375 0.172-0.734 0.5-0.922l26-15c0.156-0.094 0.328-0.141 0.5-0.141 0.203 0 0.406 0.063 0.562 0.172z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://www.twitter.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 26 28"
|
||||
>
|
||||
<path
|
||||
d="M25.312 6.375c-0.688 1-1.547 1.891-2.531 2.609 0.016 0.219 0.016 0.438 0.016 0.656 0 6.672-5.078 14.359-14.359 14.359-2.859 0-5.516-0.828-7.75-2.266 0.406 0.047 0.797 0.063 1.219 0.063 2.359 0 4.531-0.797 6.266-2.156-2.219-0.047-4.078-1.5-4.719-3.5 0.313 0.047 0.625 0.078 0.953 0.078 0.453 0 0.906-0.063 1.328-0.172-2.312-0.469-4.047-2.5-4.047-4.953v-0.063c0.672 0.375 1.453 0.609 2.281 0.641-1.359-0.906-2.25-2.453-2.25-4.203 0-0.938 0.25-1.797 0.688-2.547 2.484 3.062 6.219 5.063 10.406 5.281-0.078-0.375-0.125-0.766-0.125-1.156 0-2.781 2.25-5.047 5.047-5.047 1.453 0 2.766 0.609 3.687 1.594 1.141-0.219 2.234-0.641 3.203-1.219-0.375 1.172-1.172 2.156-2.219 2.781 1.016-0.109 2-0.391 2.906-0.781z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://github.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 26 28"
|
||||
>
|
||||
<path
|
||||
d="M10 19c0 1.141-0.594 3-2 3s-2-1.859-2-3 0.594-3 2-3 2 1.859 2 3zM20 19c0 1.141-0.594 3-2 3s-2-1.859-2-3 0.594-3 2-3 2 1.859 2 3zM22.5 19c0-2.391-1.453-4.5-4-4.5-1.031 0-2.016 0.187-3.047 0.328-0.812 0.125-1.625 0.172-2.453 0.172s-1.641-0.047-2.453-0.172c-1.016-0.141-2.016-0.328-3.047-0.328-2.547 0-4 2.109-4 4.5 0 4.781 4.375 5.516 8.188 5.516h2.625c3.813 0 8.188-0.734 8.188-5.516zM26 16.25c0 1.734-0.172 3.578-0.953 5.172-2.063 4.172-7.734 4.578-11.797 4.578-4.125 0-10.141-0.359-12.281-4.578-0.797-1.578-0.969-3.437-0.969-5.172 0-2.281 0.625-4.438 2.125-6.188-0.281-0.859-0.422-1.766-0.422-2.656 0-1.172 0.266-2.344 0.797-3.406 2.469 0 4.047 1.078 5.922 2.547 1.578-0.375 3.203-0.547 4.828-0.547 1.469 0 2.953 0.156 4.375 0.5 1.859-1.453 3.437-2.5 5.875-2.5 0.531 1.062 0.797 2.234 0.797 3.406 0 0.891-0.141 1.781-0.422 2.625 1.5 1.766 2.125 3.938 2.125 6.219z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 22 28"
|
||||
>
|
||||
<path
|
||||
d="M6 21c0 1.656-1.344 3-3 3s-3-1.344-3-3 1.344-3 3-3 3 1.344 3 3zM14 22.922c0.016 0.281-0.078 0.547-0.266 0.75-0.187 0.219-0.453 0.328-0.734 0.328h-2.109c-0.516 0-0.938-0.391-0.984-0.906-0.453-4.766-4.234-8.547-9-9-0.516-0.047-0.906-0.469-0.906-0.984v-2.109c0-0.281 0.109-0.547 0.328-0.734 0.172-0.172 0.422-0.266 0.672-0.266h0.078c3.328 0.266 6.469 1.719 8.828 4.094 2.375 2.359 3.828 5.5 4.094 8.828zM22 22.953c0.016 0.266-0.078 0.531-0.281 0.734-0.187 0.203-0.438 0.313-0.719 0.313h-2.234c-0.531 0-0.969-0.406-1-0.938-0.516-9.078-7.75-16.312-16.828-16.844-0.531-0.031-0.938-0.469-0.938-0.984v-2.234c0-0.281 0.109-0.531 0.313-0.719 0.187-0.187 0.438-0.281 0.688-0.281h0.047c5.469 0.281 10.609 2.578 14.484 6.469 3.891 3.875 6.188 9.016 6.469 14.484z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://vk.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 31 28"
|
||||
>
|
||||
<path
|
||||
d="M29.953 8.125c0.234 0.641-0.5 2.141-2.344 4.594-3.031 4.031-3.359 3.656-0.859 5.984 2.406 2.234 2.906 3.313 2.984 3.453 0 0 1 1.75-1.109 1.766l-4 0.063c-0.859 0.172-2-0.609-2-0.609-1.5-1.031-2.906-3.703-4-3.359 0 0-1.125 0.359-1.094 2.766 0.016 0.516-0.234 0.797-0.234 0.797s-0.281 0.297-0.828 0.344h-1.797c-3.953 0.25-7.438-3.391-7.438-3.391s-3.813-3.938-7.156-11.797c-0.219-0.516 0.016-0.766 0.016-0.766s0.234-0.297 0.891-0.297l4.281-0.031c0.406 0.063 0.688 0.281 0.688 0.281s0.25 0.172 0.375 0.5c0.703 1.75 1.609 3.344 1.609 3.344 1.563 3.219 2.625 3.766 3.234 3.437 0 0 0.797-0.484 0.625-4.375-0.063-1.406-0.453-2.047-0.453-2.047-0.359-0.484-1.031-0.625-1.328-0.672-0.234-0.031 0.156-0.594 0.672-0.844 0.766-0.375 2.125-0.391 3.734-0.375 1.266 0.016 1.625 0.094 2.109 0.203 1.484 0.359 0.984 1.734 0.984 5.047 0 1.062-0.203 2.547 0.562 3.031 0.328 0.219 1.141 0.031 3.141-3.375 0 0 0.938-1.625 1.672-3.516 0.125-0.344 0.391-0.484 0.391-0.484s0.25-0.141 0.594-0.094l4.5-0.031c1.359-0.172 1.578 0.453 1.578 0.453z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
className="copyright"
|
||||
>
|
||||
Test copyright
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="page"
|
||||
>
|
||||
@ -23,24 +223,24 @@ exports[`CategoriesListTemplate renders correctly 1`] = `
|
||||
>
|
||||
<ul>
|
||||
<li>
|
||||
<Link
|
||||
to="/category/test-0/"
|
||||
<a
|
||||
href="/category/test-0/"
|
||||
>
|
||||
test_0
|
||||
(
|
||||
1
|
||||
)
|
||||
</Link>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<Link
|
||||
to="/category/test-1/"
|
||||
<a
|
||||
href="/category/test-1/"
|
||||
>
|
||||
test_1
|
||||
(
|
||||
2
|
||||
)
|
||||
</Link>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -4,9 +4,209 @@ exports[`CategoryTemplate renders correctly 1`] = `
|
||||
<div
|
||||
className="layout"
|
||||
>
|
||||
<StaticQuery
|
||||
render={[Function]}
|
||||
/>
|
||||
<div
|
||||
className="sidebar"
|
||||
>
|
||||
<div
|
||||
className="sidebar__inner"
|
||||
>
|
||||
<div
|
||||
className="author"
|
||||
>
|
||||
<a
|
||||
href="/"
|
||||
>
|
||||
<img
|
||||
alt="Test name"
|
||||
className="author__photo"
|
||||
height="75"
|
||||
src="/test.jpg"
|
||||
width="75"
|
||||
/>
|
||||
</a>
|
||||
<h2
|
||||
className="author__title"
|
||||
>
|
||||
<a
|
||||
className="author__title-link"
|
||||
href="/"
|
||||
>
|
||||
Test name
|
||||
</a>
|
||||
</h2>
|
||||
<p
|
||||
className="author__subtitle"
|
||||
>
|
||||
Test bio
|
||||
</p>
|
||||
</div>
|
||||
<nav
|
||||
className="menu"
|
||||
>
|
||||
<ul
|
||||
className="menu__list"
|
||||
>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/1/"
|
||||
>
|
||||
Test label 1
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/2/"
|
||||
>
|
||||
Test label 2
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/3/"
|
||||
>
|
||||
Test label 3
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div
|
||||
className="contacts"
|
||||
>
|
||||
<ul
|
||||
className="contacts__list"
|
||||
>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="mailto:#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 28 28"
|
||||
>
|
||||
<path
|
||||
d="M26 23.5v-12c-0.328 0.375-0.688 0.719-1.078 1.031-2.234 1.719-4.484 3.469-6.656 5.281-1.172 0.984-2.625 2.188-4.25 2.188h-0.031c-1.625 0-3.078-1.203-4.25-2.188-2.172-1.813-4.422-3.563-6.656-5.281-0.391-0.313-0.75-0.656-1.078-1.031v12c0 0.266 0.234 0.5 0.5 0.5h23c0.266 0 0.5-0.234 0.5-0.5zM26 7.078c0-0.391 0.094-1.078-0.5-1.078h-23c-0.266 0-0.5 0.234-0.5 0.5 0 1.781 0.891 3.328 2.297 4.438 2.094 1.641 4.188 3.297 6.266 4.953 0.828 0.672 2.328 2.109 3.422 2.109h0.031c1.094 0 2.594-1.437 3.422-2.109 2.078-1.656 4.172-3.313 6.266-4.953 1.016-0.797 2.297-2.531 2.297-3.859zM28 6.5v17c0 1.375-1.125 2.5-2.5 2.5h-23c-1.375 0-2.5-1.125-2.5-2.5v-17c0-1.375 1.125-2.5 2.5-2.5h23c1.375 0 2.5 1.125 2.5 2.5z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="telegram:#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 28 28"
|
||||
>
|
||||
<path
|
||||
d="M27.563 0.172c0.328 0.234 0.484 0.609 0.422 1l-4 24c-0.047 0.297-0.234 0.547-0.5 0.703-0.141 0.078-0.313 0.125-0.484 0.125-0.125 0-0.25-0.031-0.375-0.078l-7.078-2.891-3.781 4.609c-0.187 0.234-0.469 0.359-0.766 0.359-0.109 0-0.234-0.016-0.344-0.063-0.391-0.141-0.656-0.516-0.656-0.938v-5.453l13.5-16.547-16.703 14.453-6.172-2.531c-0.359-0.141-0.594-0.469-0.625-0.859-0.016-0.375 0.172-0.734 0.5-0.922l26-15c0.156-0.094 0.328-0.141 0.5-0.141 0.203 0 0.406 0.063 0.562 0.172z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://www.twitter.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 26 28"
|
||||
>
|
||||
<path
|
||||
d="M25.312 6.375c-0.688 1-1.547 1.891-2.531 2.609 0.016 0.219 0.016 0.438 0.016 0.656 0 6.672-5.078 14.359-14.359 14.359-2.859 0-5.516-0.828-7.75-2.266 0.406 0.047 0.797 0.063 1.219 0.063 2.359 0 4.531-0.797 6.266-2.156-2.219-0.047-4.078-1.5-4.719-3.5 0.313 0.047 0.625 0.078 0.953 0.078 0.453 0 0.906-0.063 1.328-0.172-2.312-0.469-4.047-2.5-4.047-4.953v-0.063c0.672 0.375 1.453 0.609 2.281 0.641-1.359-0.906-2.25-2.453-2.25-4.203 0-0.938 0.25-1.797 0.688-2.547 2.484 3.062 6.219 5.063 10.406 5.281-0.078-0.375-0.125-0.766-0.125-1.156 0-2.781 2.25-5.047 5.047-5.047 1.453 0 2.766 0.609 3.687 1.594 1.141-0.219 2.234-0.641 3.203-1.219-0.375 1.172-1.172 2.156-2.219 2.781 1.016-0.109 2-0.391 2.906-0.781z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://github.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 26 28"
|
||||
>
|
||||
<path
|
||||
d="M10 19c0 1.141-0.594 3-2 3s-2-1.859-2-3 0.594-3 2-3 2 1.859 2 3zM20 19c0 1.141-0.594 3-2 3s-2-1.859-2-3 0.594-3 2-3 2 1.859 2 3zM22.5 19c0-2.391-1.453-4.5-4-4.5-1.031 0-2.016 0.187-3.047 0.328-0.812 0.125-1.625 0.172-2.453 0.172s-1.641-0.047-2.453-0.172c-1.016-0.141-2.016-0.328-3.047-0.328-2.547 0-4 2.109-4 4.5 0 4.781 4.375 5.516 8.188 5.516h2.625c3.813 0 8.188-0.734 8.188-5.516zM26 16.25c0 1.734-0.172 3.578-0.953 5.172-2.063 4.172-7.734 4.578-11.797 4.578-4.125 0-10.141-0.359-12.281-4.578-0.797-1.578-0.969-3.437-0.969-5.172 0-2.281 0.625-4.438 2.125-6.188-0.281-0.859-0.422-1.766-0.422-2.656 0-1.172 0.266-2.344 0.797-3.406 2.469 0 4.047 1.078 5.922 2.547 1.578-0.375 3.203-0.547 4.828-0.547 1.469 0 2.953 0.156 4.375 0.5 1.859-1.453 3.437-2.5 5.875-2.5 0.531 1.062 0.797 2.234 0.797 3.406 0 0.891-0.141 1.781-0.422 2.625 1.5 1.766 2.125 3.938 2.125 6.219z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 22 28"
|
||||
>
|
||||
<path
|
||||
d="M6 21c0 1.656-1.344 3-3 3s-3-1.344-3-3 1.344-3 3-3 3 1.344 3 3zM14 22.922c0.016 0.281-0.078 0.547-0.266 0.75-0.187 0.219-0.453 0.328-0.734 0.328h-2.109c-0.516 0-0.938-0.391-0.984-0.906-0.453-4.766-4.234-8.547-9-9-0.516-0.047-0.906-0.469-0.906-0.984v-2.109c0-0.281 0.109-0.547 0.328-0.734 0.172-0.172 0.422-0.266 0.672-0.266h0.078c3.328 0.266 6.469 1.719 8.828 4.094 2.375 2.359 3.828 5.5 4.094 8.828zM22 22.953c0.016 0.266-0.078 0.531-0.281 0.734-0.187 0.203-0.438 0.313-0.719 0.313h-2.234c-0.531 0-0.969-0.406-1-0.938-0.516-9.078-7.75-16.312-16.828-16.844-0.531-0.031-0.938-0.469-0.938-0.984v-2.234c0-0.281 0.109-0.531 0.313-0.719 0.187-0.187 0.438-0.281 0.688-0.281h0.047c5.469 0.281 10.609 2.578 14.484 6.469 3.891 3.875 6.188 9.016 6.469 14.484z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://vk.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 31 28"
|
||||
>
|
||||
<path
|
||||
d="M29.953 8.125c0.234 0.641-0.5 2.141-2.344 4.594-3.031 4.031-3.359 3.656-0.859 5.984 2.406 2.234 2.906 3.313 2.984 3.453 0 0 1 1.75-1.109 1.766l-4 0.063c-0.859 0.172-2-0.609-2-0.609-1.5-1.031-2.906-3.703-4-3.359 0 0-1.125 0.359-1.094 2.766 0.016 0.516-0.234 0.797-0.234 0.797s-0.281 0.297-0.828 0.344h-1.797c-3.953 0.25-7.438-3.391-7.438-3.391s-3.813-3.938-7.156-11.797c-0.219-0.516 0.016-0.766 0.016-0.766s0.234-0.297 0.891-0.297l4.281-0.031c0.406 0.063 0.688 0.281 0.688 0.281s0.25 0.172 0.375 0.5c0.703 1.75 1.609 3.344 1.609 3.344 1.563 3.219 2.625 3.766 3.234 3.437 0 0 0.797-0.484 0.625-4.375-0.063-1.406-0.453-2.047-0.453-2.047-0.359-0.484-1.031-0.625-1.328-0.672-0.234-0.031 0.156-0.594 0.672-0.844 0.766-0.375 2.125-0.391 3.734-0.375 1.266 0.016 1.625 0.094 2.109 0.203 1.484 0.359 0.984 1.734 0.984 5.047 0 1.062-0.203 2.547 0.562 3.031 0.328 0.219 1.141 0.031 3.141-3.375 0 0 0.938-1.625 1.672-3.516 0.125-0.344 0.391-0.484 0.391-0.484s0.25-0.141 0.594-0.094l4.5-0.031c1.359-0.172 1.578 0.453 1.578 0.453z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
className="copyright"
|
||||
>
|
||||
Test copyright
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="page"
|
||||
>
|
||||
@ -42,35 +242,35 @@ exports[`CategoryTemplate renders correctly 1`] = `
|
||||
<span
|
||||
className="feed__item-meta-category"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-meta-category-link"
|
||||
to="/test"
|
||||
href="/test"
|
||||
>
|
||||
test
|
||||
</Link>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<h2
|
||||
className="feed__item-title"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-title-link"
|
||||
to="/test_0"
|
||||
href="/test_0"
|
||||
>
|
||||
test_0
|
||||
</Link>
|
||||
</a>
|
||||
</h2>
|
||||
<p
|
||||
className="feed__item-description"
|
||||
>
|
||||
test_0
|
||||
</p>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-readmore"
|
||||
to="/test_0"
|
||||
href="/test_0"
|
||||
>
|
||||
Read
|
||||
</Link>
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
className="feed__item"
|
||||
@ -90,35 +290,35 @@ exports[`CategoryTemplate renders correctly 1`] = `
|
||||
<span
|
||||
className="feed__item-meta-category"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-meta-category-link"
|
||||
to="/test"
|
||||
href="/test"
|
||||
>
|
||||
test
|
||||
</Link>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<h2
|
||||
className="feed__item-title"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-title-link"
|
||||
to="/test_1"
|
||||
href="/test_1"
|
||||
>
|
||||
test_1
|
||||
</Link>
|
||||
</a>
|
||||
</h2>
|
||||
<p
|
||||
className="feed__item-description"
|
||||
>
|
||||
test_1
|
||||
</p>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-readmore"
|
||||
to="/test_1"
|
||||
href="/test_1"
|
||||
>
|
||||
Read
|
||||
</Link>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@ -127,24 +327,24 @@ exports[`CategoryTemplate renders correctly 1`] = `
|
||||
<div
|
||||
className="pagination__prev"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="pagination__prev-link"
|
||||
href="/page/1"
|
||||
rel="prev"
|
||||
to="/page/1"
|
||||
>
|
||||
← PREV
|
||||
</Link>
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
className="pagination__next"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="pagination__next-link"
|
||||
href="/page/3"
|
||||
rel="next"
|
||||
to="/page/3"
|
||||
>
|
||||
→ NEXT
|
||||
</Link>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -4,9 +4,209 @@ exports[`IndexTemplate renders correctly 1`] = `
|
||||
<div
|
||||
className="layout"
|
||||
>
|
||||
<StaticQuery
|
||||
render={[Function]}
|
||||
/>
|
||||
<div
|
||||
className="sidebar"
|
||||
>
|
||||
<div
|
||||
className="sidebar__inner"
|
||||
>
|
||||
<div
|
||||
className="author"
|
||||
>
|
||||
<a
|
||||
href="/"
|
||||
>
|
||||
<img
|
||||
alt="Test name"
|
||||
className="author__photo"
|
||||
height="75"
|
||||
src="/test.jpg"
|
||||
width="75"
|
||||
/>
|
||||
</a>
|
||||
<h1
|
||||
className="author__title"
|
||||
>
|
||||
<a
|
||||
className="author__title-link"
|
||||
href="/"
|
||||
>
|
||||
Test name
|
||||
</a>
|
||||
</h1>
|
||||
<p
|
||||
className="author__subtitle"
|
||||
>
|
||||
Test bio
|
||||
</p>
|
||||
</div>
|
||||
<nav
|
||||
className="menu"
|
||||
>
|
||||
<ul
|
||||
className="menu__list"
|
||||
>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/1/"
|
||||
>
|
||||
Test label 1
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/2/"
|
||||
>
|
||||
Test label 2
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/3/"
|
||||
>
|
||||
Test label 3
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div
|
||||
className="contacts"
|
||||
>
|
||||
<ul
|
||||
className="contacts__list"
|
||||
>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="mailto:#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 28 28"
|
||||
>
|
||||
<path
|
||||
d="M26 23.5v-12c-0.328 0.375-0.688 0.719-1.078 1.031-2.234 1.719-4.484 3.469-6.656 5.281-1.172 0.984-2.625 2.188-4.25 2.188h-0.031c-1.625 0-3.078-1.203-4.25-2.188-2.172-1.813-4.422-3.563-6.656-5.281-0.391-0.313-0.75-0.656-1.078-1.031v12c0 0.266 0.234 0.5 0.5 0.5h23c0.266 0 0.5-0.234 0.5-0.5zM26 7.078c0-0.391 0.094-1.078-0.5-1.078h-23c-0.266 0-0.5 0.234-0.5 0.5 0 1.781 0.891 3.328 2.297 4.438 2.094 1.641 4.188 3.297 6.266 4.953 0.828 0.672 2.328 2.109 3.422 2.109h0.031c1.094 0 2.594-1.437 3.422-2.109 2.078-1.656 4.172-3.313 6.266-4.953 1.016-0.797 2.297-2.531 2.297-3.859zM28 6.5v17c0 1.375-1.125 2.5-2.5 2.5h-23c-1.375 0-2.5-1.125-2.5-2.5v-17c0-1.375 1.125-2.5 2.5-2.5h23c1.375 0 2.5 1.125 2.5 2.5z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="telegram:#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 28 28"
|
||||
>
|
||||
<path
|
||||
d="M27.563 0.172c0.328 0.234 0.484 0.609 0.422 1l-4 24c-0.047 0.297-0.234 0.547-0.5 0.703-0.141 0.078-0.313 0.125-0.484 0.125-0.125 0-0.25-0.031-0.375-0.078l-7.078-2.891-3.781 4.609c-0.187 0.234-0.469 0.359-0.766 0.359-0.109 0-0.234-0.016-0.344-0.063-0.391-0.141-0.656-0.516-0.656-0.938v-5.453l13.5-16.547-16.703 14.453-6.172-2.531c-0.359-0.141-0.594-0.469-0.625-0.859-0.016-0.375 0.172-0.734 0.5-0.922l26-15c0.156-0.094 0.328-0.141 0.5-0.141 0.203 0 0.406 0.063 0.562 0.172z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://www.twitter.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 26 28"
|
||||
>
|
||||
<path
|
||||
d="M25.312 6.375c-0.688 1-1.547 1.891-2.531 2.609 0.016 0.219 0.016 0.438 0.016 0.656 0 6.672-5.078 14.359-14.359 14.359-2.859 0-5.516-0.828-7.75-2.266 0.406 0.047 0.797 0.063 1.219 0.063 2.359 0 4.531-0.797 6.266-2.156-2.219-0.047-4.078-1.5-4.719-3.5 0.313 0.047 0.625 0.078 0.953 0.078 0.453 0 0.906-0.063 1.328-0.172-2.312-0.469-4.047-2.5-4.047-4.953v-0.063c0.672 0.375 1.453 0.609 2.281 0.641-1.359-0.906-2.25-2.453-2.25-4.203 0-0.938 0.25-1.797 0.688-2.547 2.484 3.062 6.219 5.063 10.406 5.281-0.078-0.375-0.125-0.766-0.125-1.156 0-2.781 2.25-5.047 5.047-5.047 1.453 0 2.766 0.609 3.687 1.594 1.141-0.219 2.234-0.641 3.203-1.219-0.375 1.172-1.172 2.156-2.219 2.781 1.016-0.109 2-0.391 2.906-0.781z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://github.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 26 28"
|
||||
>
|
||||
<path
|
||||
d="M10 19c0 1.141-0.594 3-2 3s-2-1.859-2-3 0.594-3 2-3 2 1.859 2 3zM20 19c0 1.141-0.594 3-2 3s-2-1.859-2-3 0.594-3 2-3 2 1.859 2 3zM22.5 19c0-2.391-1.453-4.5-4-4.5-1.031 0-2.016 0.187-3.047 0.328-0.812 0.125-1.625 0.172-2.453 0.172s-1.641-0.047-2.453-0.172c-1.016-0.141-2.016-0.328-3.047-0.328-2.547 0-4 2.109-4 4.5 0 4.781 4.375 5.516 8.188 5.516h2.625c3.813 0 8.188-0.734 8.188-5.516zM26 16.25c0 1.734-0.172 3.578-0.953 5.172-2.063 4.172-7.734 4.578-11.797 4.578-4.125 0-10.141-0.359-12.281-4.578-0.797-1.578-0.969-3.437-0.969-5.172 0-2.281 0.625-4.438 2.125-6.188-0.281-0.859-0.422-1.766-0.422-2.656 0-1.172 0.266-2.344 0.797-3.406 2.469 0 4.047 1.078 5.922 2.547 1.578-0.375 3.203-0.547 4.828-0.547 1.469 0 2.953 0.156 4.375 0.5 1.859-1.453 3.437-2.5 5.875-2.5 0.531 1.062 0.797 2.234 0.797 3.406 0 0.891-0.141 1.781-0.422 2.625 1.5 1.766 2.125 3.938 2.125 6.219z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 22 28"
|
||||
>
|
||||
<path
|
||||
d="M6 21c0 1.656-1.344 3-3 3s-3-1.344-3-3 1.344-3 3-3 3 1.344 3 3zM14 22.922c0.016 0.281-0.078 0.547-0.266 0.75-0.187 0.219-0.453 0.328-0.734 0.328h-2.109c-0.516 0-0.938-0.391-0.984-0.906-0.453-4.766-4.234-8.547-9-9-0.516-0.047-0.906-0.469-0.906-0.984v-2.109c0-0.281 0.109-0.547 0.328-0.734 0.172-0.172 0.422-0.266 0.672-0.266h0.078c3.328 0.266 6.469 1.719 8.828 4.094 2.375 2.359 3.828 5.5 4.094 8.828zM22 22.953c0.016 0.266-0.078 0.531-0.281 0.734-0.187 0.203-0.438 0.313-0.719 0.313h-2.234c-0.531 0-0.969-0.406-1-0.938-0.516-9.078-7.75-16.312-16.828-16.844-0.531-0.031-0.938-0.469-0.938-0.984v-2.234c0-0.281 0.109-0.531 0.313-0.719 0.187-0.187 0.438-0.281 0.688-0.281h0.047c5.469 0.281 10.609 2.578 14.484 6.469 3.891 3.875 6.188 9.016 6.469 14.484z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://vk.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 31 28"
|
||||
>
|
||||
<path
|
||||
d="M29.953 8.125c0.234 0.641-0.5 2.141-2.344 4.594-3.031 4.031-3.359 3.656-0.859 5.984 2.406 2.234 2.906 3.313 2.984 3.453 0 0 1 1.75-1.109 1.766l-4 0.063c-0.859 0.172-2-0.609-2-0.609-1.5-1.031-2.906-3.703-4-3.359 0 0-1.125 0.359-1.094 2.766 0.016 0.516-0.234 0.797-0.234 0.797s-0.281 0.297-0.828 0.344h-1.797c-3.953 0.25-7.438-3.391-7.438-3.391s-3.813-3.938-7.156-11.797c-0.219-0.516 0.016-0.766 0.016-0.766s0.234-0.297 0.891-0.297l4.281-0.031c0.406 0.063 0.688 0.281 0.688 0.281s0.25 0.172 0.375 0.5c0.703 1.75 1.609 3.344 1.609 3.344 1.563 3.219 2.625 3.766 3.234 3.437 0 0 0.797-0.484 0.625-4.375-0.063-1.406-0.453-2.047-0.453-2.047-0.359-0.484-1.031-0.625-1.328-0.672-0.234-0.031 0.156-0.594 0.672-0.844 0.766-0.375 2.125-0.391 3.734-0.375 1.266 0.016 1.625 0.094 2.109 0.203 1.484 0.359 0.984 1.734 0.984 5.047 0 1.062-0.203 2.547 0.562 3.031 0.328 0.219 1.141 0.031 3.141-3.375 0 0 0.938-1.625 1.672-3.516 0.125-0.344 0.391-0.484 0.391-0.484s0.25-0.141 0.594-0.094l4.5-0.031c1.359-0.172 1.578 0.453 1.578 0.453z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
className="copyright"
|
||||
>
|
||||
Test copyright
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="page"
|
||||
>
|
||||
@ -37,35 +237,35 @@ exports[`IndexTemplate renders correctly 1`] = `
|
||||
<span
|
||||
className="feed__item-meta-category"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-meta-category-link"
|
||||
to="/test_0"
|
||||
href="/test"
|
||||
>
|
||||
test_0
|
||||
</Link>
|
||||
test
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<h2
|
||||
className="feed__item-title"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-title-link"
|
||||
to="/test_0"
|
||||
href="/test_0"
|
||||
>
|
||||
test_0
|
||||
</Link>
|
||||
</a>
|
||||
</h2>
|
||||
<p
|
||||
className="feed__item-description"
|
||||
>
|
||||
test_0
|
||||
</p>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-readmore"
|
||||
to="/test_0"
|
||||
href="/test_0"
|
||||
>
|
||||
Read
|
||||
</Link>
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
className="feed__item"
|
||||
@ -85,35 +285,35 @@ exports[`IndexTemplate renders correctly 1`] = `
|
||||
<span
|
||||
className="feed__item-meta-category"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-meta-category-link"
|
||||
to="/test_1"
|
||||
href="/test"
|
||||
>
|
||||
test_1
|
||||
</Link>
|
||||
test
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<h2
|
||||
className="feed__item-title"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-title-link"
|
||||
to="/test_1"
|
||||
href="/test_1"
|
||||
>
|
||||
test_1
|
||||
</Link>
|
||||
</a>
|
||||
</h2>
|
||||
<p
|
||||
className="feed__item-description"
|
||||
>
|
||||
test_1
|
||||
</p>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-readmore"
|
||||
to="/test_1"
|
||||
href="/test_1"
|
||||
>
|
||||
Read
|
||||
</Link>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@ -122,24 +322,24 @@ exports[`IndexTemplate renders correctly 1`] = `
|
||||
<div
|
||||
className="pagination__prev"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="pagination__prev-link"
|
||||
href="/page/1"
|
||||
rel="prev"
|
||||
to="/page/1"
|
||||
>
|
||||
← PREV
|
||||
</Link>
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
className="pagination__next"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="pagination__next-link"
|
||||
href="/page/3"
|
||||
rel="next"
|
||||
to="/page/3"
|
||||
>
|
||||
→ NEXT
|
||||
</Link>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -4,9 +4,209 @@ exports[`NotFoundTemplate renders correctly 1`] = `
|
||||
<div
|
||||
className="layout"
|
||||
>
|
||||
<StaticQuery
|
||||
render={[Function]}
|
||||
/>
|
||||
<div
|
||||
className="sidebar"
|
||||
>
|
||||
<div
|
||||
className="sidebar__inner"
|
||||
>
|
||||
<div
|
||||
className="author"
|
||||
>
|
||||
<a
|
||||
href="/"
|
||||
>
|
||||
<img
|
||||
alt="Test name"
|
||||
className="author__photo"
|
||||
height="75"
|
||||
src="/test.jpg"
|
||||
width="75"
|
||||
/>
|
||||
</a>
|
||||
<h2
|
||||
className="author__title"
|
||||
>
|
||||
<a
|
||||
className="author__title-link"
|
||||
href="/"
|
||||
>
|
||||
Test name
|
||||
</a>
|
||||
</h2>
|
||||
<p
|
||||
className="author__subtitle"
|
||||
>
|
||||
Test bio
|
||||
</p>
|
||||
</div>
|
||||
<nav
|
||||
className="menu"
|
||||
>
|
||||
<ul
|
||||
className="menu__list"
|
||||
>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/1/"
|
||||
>
|
||||
Test label 1
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/2/"
|
||||
>
|
||||
Test label 2
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/3/"
|
||||
>
|
||||
Test label 3
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div
|
||||
className="contacts"
|
||||
>
|
||||
<ul
|
||||
className="contacts__list"
|
||||
>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="mailto:#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 28 28"
|
||||
>
|
||||
<path
|
||||
d="M26 23.5v-12c-0.328 0.375-0.688 0.719-1.078 1.031-2.234 1.719-4.484 3.469-6.656 5.281-1.172 0.984-2.625 2.188-4.25 2.188h-0.031c-1.625 0-3.078-1.203-4.25-2.188-2.172-1.813-4.422-3.563-6.656-5.281-0.391-0.313-0.75-0.656-1.078-1.031v12c0 0.266 0.234 0.5 0.5 0.5h23c0.266 0 0.5-0.234 0.5-0.5zM26 7.078c0-0.391 0.094-1.078-0.5-1.078h-23c-0.266 0-0.5 0.234-0.5 0.5 0 1.781 0.891 3.328 2.297 4.438 2.094 1.641 4.188 3.297 6.266 4.953 0.828 0.672 2.328 2.109 3.422 2.109h0.031c1.094 0 2.594-1.437 3.422-2.109 2.078-1.656 4.172-3.313 6.266-4.953 1.016-0.797 2.297-2.531 2.297-3.859zM28 6.5v17c0 1.375-1.125 2.5-2.5 2.5h-23c-1.375 0-2.5-1.125-2.5-2.5v-17c0-1.375 1.125-2.5 2.5-2.5h23c1.375 0 2.5 1.125 2.5 2.5z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="telegram:#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 28 28"
|
||||
>
|
||||
<path
|
||||
d="M27.563 0.172c0.328 0.234 0.484 0.609 0.422 1l-4 24c-0.047 0.297-0.234 0.547-0.5 0.703-0.141 0.078-0.313 0.125-0.484 0.125-0.125 0-0.25-0.031-0.375-0.078l-7.078-2.891-3.781 4.609c-0.187 0.234-0.469 0.359-0.766 0.359-0.109 0-0.234-0.016-0.344-0.063-0.391-0.141-0.656-0.516-0.656-0.938v-5.453l13.5-16.547-16.703 14.453-6.172-2.531c-0.359-0.141-0.594-0.469-0.625-0.859-0.016-0.375 0.172-0.734 0.5-0.922l26-15c0.156-0.094 0.328-0.141 0.5-0.141 0.203 0 0.406 0.063 0.562 0.172z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://www.twitter.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 26 28"
|
||||
>
|
||||
<path
|
||||
d="M25.312 6.375c-0.688 1-1.547 1.891-2.531 2.609 0.016 0.219 0.016 0.438 0.016 0.656 0 6.672-5.078 14.359-14.359 14.359-2.859 0-5.516-0.828-7.75-2.266 0.406 0.047 0.797 0.063 1.219 0.063 2.359 0 4.531-0.797 6.266-2.156-2.219-0.047-4.078-1.5-4.719-3.5 0.313 0.047 0.625 0.078 0.953 0.078 0.453 0 0.906-0.063 1.328-0.172-2.312-0.469-4.047-2.5-4.047-4.953v-0.063c0.672 0.375 1.453 0.609 2.281 0.641-1.359-0.906-2.25-2.453-2.25-4.203 0-0.938 0.25-1.797 0.688-2.547 2.484 3.062 6.219 5.063 10.406 5.281-0.078-0.375-0.125-0.766-0.125-1.156 0-2.781 2.25-5.047 5.047-5.047 1.453 0 2.766 0.609 3.687 1.594 1.141-0.219 2.234-0.641 3.203-1.219-0.375 1.172-1.172 2.156-2.219 2.781 1.016-0.109 2-0.391 2.906-0.781z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://github.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 26 28"
|
||||
>
|
||||
<path
|
||||
d="M10 19c0 1.141-0.594 3-2 3s-2-1.859-2-3 0.594-3 2-3 2 1.859 2 3zM20 19c0 1.141-0.594 3-2 3s-2-1.859-2-3 0.594-3 2-3 2 1.859 2 3zM22.5 19c0-2.391-1.453-4.5-4-4.5-1.031 0-2.016 0.187-3.047 0.328-0.812 0.125-1.625 0.172-2.453 0.172s-1.641-0.047-2.453-0.172c-1.016-0.141-2.016-0.328-3.047-0.328-2.547 0-4 2.109-4 4.5 0 4.781 4.375 5.516 8.188 5.516h2.625c3.813 0 8.188-0.734 8.188-5.516zM26 16.25c0 1.734-0.172 3.578-0.953 5.172-2.063 4.172-7.734 4.578-11.797 4.578-4.125 0-10.141-0.359-12.281-4.578-0.797-1.578-0.969-3.437-0.969-5.172 0-2.281 0.625-4.438 2.125-6.188-0.281-0.859-0.422-1.766-0.422-2.656 0-1.172 0.266-2.344 0.797-3.406 2.469 0 4.047 1.078 5.922 2.547 1.578-0.375 3.203-0.547 4.828-0.547 1.469 0 2.953 0.156 4.375 0.5 1.859-1.453 3.437-2.5 5.875-2.5 0.531 1.062 0.797 2.234 0.797 3.406 0 0.891-0.141 1.781-0.422 2.625 1.5 1.766 2.125 3.938 2.125 6.219z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 22 28"
|
||||
>
|
||||
<path
|
||||
d="M6 21c0 1.656-1.344 3-3 3s-3-1.344-3-3 1.344-3 3-3 3 1.344 3 3zM14 22.922c0.016 0.281-0.078 0.547-0.266 0.75-0.187 0.219-0.453 0.328-0.734 0.328h-2.109c-0.516 0-0.938-0.391-0.984-0.906-0.453-4.766-4.234-8.547-9-9-0.516-0.047-0.906-0.469-0.906-0.984v-2.109c0-0.281 0.109-0.547 0.328-0.734 0.172-0.172 0.422-0.266 0.672-0.266h0.078c3.328 0.266 6.469 1.719 8.828 4.094 2.375 2.359 3.828 5.5 4.094 8.828zM22 22.953c0.016 0.266-0.078 0.531-0.281 0.734-0.187 0.203-0.438 0.313-0.719 0.313h-2.234c-0.531 0-0.969-0.406-1-0.938-0.516-9.078-7.75-16.312-16.828-16.844-0.531-0.031-0.938-0.469-0.938-0.984v-2.234c0-0.281 0.109-0.531 0.313-0.719 0.187-0.187 0.438-0.281 0.688-0.281h0.047c5.469 0.281 10.609 2.578 14.484 6.469 3.891 3.875 6.188 9.016 6.469 14.484z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://vk.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 31 28"
|
||||
>
|
||||
<path
|
||||
d="M29.953 8.125c0.234 0.641-0.5 2.141-2.344 4.594-3.031 4.031-3.359 3.656-0.859 5.984 2.406 2.234 2.906 3.313 2.984 3.453 0 0 1 1.75-1.109 1.766l-4 0.063c-0.859 0.172-2-0.609-2-0.609-1.5-1.031-2.906-3.703-4-3.359 0 0-1.125 0.359-1.094 2.766 0.016 0.516-0.234 0.797-0.234 0.797s-0.281 0.297-0.828 0.344h-1.797c-3.953 0.25-7.438-3.391-7.438-3.391s-3.813-3.938-7.156-11.797c-0.219-0.516 0.016-0.766 0.016-0.766s0.234-0.297 0.891-0.297l4.281-0.031c0.406 0.063 0.688 0.281 0.688 0.281s0.25 0.172 0.375 0.5c0.703 1.75 1.609 3.344 1.609 3.344 1.563 3.219 2.625 3.766 3.234 3.437 0 0 0.797-0.484 0.625-4.375-0.063-1.406-0.453-2.047-0.453-2.047-0.359-0.484-1.031-0.625-1.328-0.672-0.234-0.031 0.156-0.594 0.672-0.844 0.766-0.375 2.125-0.391 3.734-0.375 1.266 0.016 1.625 0.094 2.109 0.203 1.484 0.359 0.984 1.734 0.984 5.047 0 1.062-0.203 2.547 0.562 3.031 0.328 0.219 1.141 0.031 3.141-3.375 0 0 0.938-1.625 1.672-3.516 0.125-0.344 0.391-0.484 0.391-0.484s0.25-0.141 0.594-0.094l4.5-0.031c1.359-0.172 1.578 0.453 1.578 0.453z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
className="copyright"
|
||||
>
|
||||
Test copyright
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="page"
|
||||
>
|
||||
|
@ -4,9 +4,209 @@ exports[`PageTemplate renders correctly 1`] = `
|
||||
<div
|
||||
className="layout"
|
||||
>
|
||||
<StaticQuery
|
||||
render={[Function]}
|
||||
/>
|
||||
<div
|
||||
className="sidebar"
|
||||
>
|
||||
<div
|
||||
className="sidebar__inner"
|
||||
>
|
||||
<div
|
||||
className="author"
|
||||
>
|
||||
<a
|
||||
href="/"
|
||||
>
|
||||
<img
|
||||
alt="Test name"
|
||||
className="author__photo"
|
||||
height="75"
|
||||
src="/test.jpg"
|
||||
width="75"
|
||||
/>
|
||||
</a>
|
||||
<h2
|
||||
className="author__title"
|
||||
>
|
||||
<a
|
||||
className="author__title-link"
|
||||
href="/"
|
||||
>
|
||||
Test name
|
||||
</a>
|
||||
</h2>
|
||||
<p
|
||||
className="author__subtitle"
|
||||
>
|
||||
Test bio
|
||||
</p>
|
||||
</div>
|
||||
<nav
|
||||
className="menu"
|
||||
>
|
||||
<ul
|
||||
className="menu__list"
|
||||
>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/1/"
|
||||
>
|
||||
Test label 1
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/2/"
|
||||
>
|
||||
Test label 2
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/3/"
|
||||
>
|
||||
Test label 3
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div
|
||||
className="contacts"
|
||||
>
|
||||
<ul
|
||||
className="contacts__list"
|
||||
>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="mailto:#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 28 28"
|
||||
>
|
||||
<path
|
||||
d="M26 23.5v-12c-0.328 0.375-0.688 0.719-1.078 1.031-2.234 1.719-4.484 3.469-6.656 5.281-1.172 0.984-2.625 2.188-4.25 2.188h-0.031c-1.625 0-3.078-1.203-4.25-2.188-2.172-1.813-4.422-3.563-6.656-5.281-0.391-0.313-0.75-0.656-1.078-1.031v12c0 0.266 0.234 0.5 0.5 0.5h23c0.266 0 0.5-0.234 0.5-0.5zM26 7.078c0-0.391 0.094-1.078-0.5-1.078h-23c-0.266 0-0.5 0.234-0.5 0.5 0 1.781 0.891 3.328 2.297 4.438 2.094 1.641 4.188 3.297 6.266 4.953 0.828 0.672 2.328 2.109 3.422 2.109h0.031c1.094 0 2.594-1.437 3.422-2.109 2.078-1.656 4.172-3.313 6.266-4.953 1.016-0.797 2.297-2.531 2.297-3.859zM28 6.5v17c0 1.375-1.125 2.5-2.5 2.5h-23c-1.375 0-2.5-1.125-2.5-2.5v-17c0-1.375 1.125-2.5 2.5-2.5h23c1.375 0 2.5 1.125 2.5 2.5z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="telegram:#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 28 28"
|
||||
>
|
||||
<path
|
||||
d="M27.563 0.172c0.328 0.234 0.484 0.609 0.422 1l-4 24c-0.047 0.297-0.234 0.547-0.5 0.703-0.141 0.078-0.313 0.125-0.484 0.125-0.125 0-0.25-0.031-0.375-0.078l-7.078-2.891-3.781 4.609c-0.187 0.234-0.469 0.359-0.766 0.359-0.109 0-0.234-0.016-0.344-0.063-0.391-0.141-0.656-0.516-0.656-0.938v-5.453l13.5-16.547-16.703 14.453-6.172-2.531c-0.359-0.141-0.594-0.469-0.625-0.859-0.016-0.375 0.172-0.734 0.5-0.922l26-15c0.156-0.094 0.328-0.141 0.5-0.141 0.203 0 0.406 0.063 0.562 0.172z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://www.twitter.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 26 28"
|
||||
>
|
||||
<path
|
||||
d="M25.312 6.375c-0.688 1-1.547 1.891-2.531 2.609 0.016 0.219 0.016 0.438 0.016 0.656 0 6.672-5.078 14.359-14.359 14.359-2.859 0-5.516-0.828-7.75-2.266 0.406 0.047 0.797 0.063 1.219 0.063 2.359 0 4.531-0.797 6.266-2.156-2.219-0.047-4.078-1.5-4.719-3.5 0.313 0.047 0.625 0.078 0.953 0.078 0.453 0 0.906-0.063 1.328-0.172-2.312-0.469-4.047-2.5-4.047-4.953v-0.063c0.672 0.375 1.453 0.609 2.281 0.641-1.359-0.906-2.25-2.453-2.25-4.203 0-0.938 0.25-1.797 0.688-2.547 2.484 3.062 6.219 5.063 10.406 5.281-0.078-0.375-0.125-0.766-0.125-1.156 0-2.781 2.25-5.047 5.047-5.047 1.453 0 2.766 0.609 3.687 1.594 1.141-0.219 2.234-0.641 3.203-1.219-0.375 1.172-1.172 2.156-2.219 2.781 1.016-0.109 2-0.391 2.906-0.781z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://github.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 26 28"
|
||||
>
|
||||
<path
|
||||
d="M10 19c0 1.141-0.594 3-2 3s-2-1.859-2-3 0.594-3 2-3 2 1.859 2 3zM20 19c0 1.141-0.594 3-2 3s-2-1.859-2-3 0.594-3 2-3 2 1.859 2 3zM22.5 19c0-2.391-1.453-4.5-4-4.5-1.031 0-2.016 0.187-3.047 0.328-0.812 0.125-1.625 0.172-2.453 0.172s-1.641-0.047-2.453-0.172c-1.016-0.141-2.016-0.328-3.047-0.328-2.547 0-4 2.109-4 4.5 0 4.781 4.375 5.516 8.188 5.516h2.625c3.813 0 8.188-0.734 8.188-5.516zM26 16.25c0 1.734-0.172 3.578-0.953 5.172-2.063 4.172-7.734 4.578-11.797 4.578-4.125 0-10.141-0.359-12.281-4.578-0.797-1.578-0.969-3.437-0.969-5.172 0-2.281 0.625-4.438 2.125-6.188-0.281-0.859-0.422-1.766-0.422-2.656 0-1.172 0.266-2.344 0.797-3.406 2.469 0 4.047 1.078 5.922 2.547 1.578-0.375 3.203-0.547 4.828-0.547 1.469 0 2.953 0.156 4.375 0.5 1.859-1.453 3.437-2.5 5.875-2.5 0.531 1.062 0.797 2.234 0.797 3.406 0 0.891-0.141 1.781-0.422 2.625 1.5 1.766 2.125 3.938 2.125 6.219z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 22 28"
|
||||
>
|
||||
<path
|
||||
d="M6 21c0 1.656-1.344 3-3 3s-3-1.344-3-3 1.344-3 3-3 3 1.344 3 3zM14 22.922c0.016 0.281-0.078 0.547-0.266 0.75-0.187 0.219-0.453 0.328-0.734 0.328h-2.109c-0.516 0-0.938-0.391-0.984-0.906-0.453-4.766-4.234-8.547-9-9-0.516-0.047-0.906-0.469-0.906-0.984v-2.109c0-0.281 0.109-0.547 0.328-0.734 0.172-0.172 0.422-0.266 0.672-0.266h0.078c3.328 0.266 6.469 1.719 8.828 4.094 2.375 2.359 3.828 5.5 4.094 8.828zM22 22.953c0.016 0.266-0.078 0.531-0.281 0.734-0.187 0.203-0.438 0.313-0.719 0.313h-2.234c-0.531 0-0.969-0.406-1-0.938-0.516-9.078-7.75-16.312-16.828-16.844-0.531-0.031-0.938-0.469-0.938-0.984v-2.234c0-0.281 0.109-0.531 0.313-0.719 0.187-0.187 0.438-0.281 0.688-0.281h0.047c5.469 0.281 10.609 2.578 14.484 6.469 3.891 3.875 6.188 9.016 6.469 14.484z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://vk.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 31 28"
|
||||
>
|
||||
<path
|
||||
d="M29.953 8.125c0.234 0.641-0.5 2.141-2.344 4.594-3.031 4.031-3.359 3.656-0.859 5.984 2.406 2.234 2.906 3.313 2.984 3.453 0 0 1 1.75-1.109 1.766l-4 0.063c-0.859 0.172-2-0.609-2-0.609-1.5-1.031-2.906-3.703-4-3.359 0 0-1.125 0.359-1.094 2.766 0.016 0.516-0.234 0.797-0.234 0.797s-0.281 0.297-0.828 0.344h-1.797c-3.953 0.25-7.438-3.391-7.438-3.391s-3.813-3.938-7.156-11.797c-0.219-0.516 0.016-0.766 0.016-0.766s0.234-0.297 0.891-0.297l4.281-0.031c0.406 0.063 0.688 0.281 0.688 0.281s0.25 0.172 0.375 0.5c0.703 1.75 1.609 3.344 1.609 3.344 1.563 3.219 2.625 3.766 3.234 3.437 0 0 0.797-0.484 0.625-4.375-0.063-1.406-0.453-2.047-0.453-2.047-0.359-0.484-1.031-0.625-1.328-0.672-0.234-0.031 0.156-0.594 0.672-0.844 0.766-0.375 2.125-0.391 3.734-0.375 1.266 0.016 1.625 0.094 2.109 0.203 1.484 0.359 0.984 1.734 0.984 5.047 0 1.062-0.203 2.547 0.562 3.031 0.328 0.219 1.141 0.031 3.141-3.375 0 0 0.938-1.625 1.672-3.516 0.125-0.344 0.391-0.484 0.391-0.484s0.25-0.141 0.594-0.094l4.5-0.031c1.359-0.172 1.578 0.453 1.578 0.453z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
className="copyright"
|
||||
>
|
||||
Test copyright
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="page"
|
||||
>
|
||||
|
@ -7,12 +7,12 @@ exports[`PostTemplate renders correctly 1`] = `
|
||||
<div
|
||||
className="post"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="post__home-button"
|
||||
to="/"
|
||||
href="/"
|
||||
>
|
||||
All Articles
|
||||
</Link>
|
||||
</a>
|
||||
<div
|
||||
className="post__content"
|
||||
>
|
||||
@ -56,36 +56,49 @@ exports[`PostTemplate renders correctly 1`] = `
|
||||
<li
|
||||
className="tags__list-item"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="tags__list-item-link"
|
||||
to="/test_0"
|
||||
href="/test_0"
|
||||
>
|
||||
test_0
|
||||
</Link>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="tags__list-item"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="tags__list-item-link"
|
||||
to="/test_1"
|
||||
href="/test_1"
|
||||
>
|
||||
test_1
|
||||
</Link>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<StaticQuery
|
||||
render={[Function]}
|
||||
/>
|
||||
<div
|
||||
className="author"
|
||||
>
|
||||
<p
|
||||
className="author__bio"
|
||||
>
|
||||
Test bio
|
||||
<a
|
||||
className="author__bio-twitter"
|
||||
href="https://www.twitter.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<strong>
|
||||
Test name
|
||||
</strong>
|
||||
on Twitter
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="post__comments"
|
||||
>
|
||||
<StaticQuery
|
||||
render={[Function]}
|
||||
/>
|
||||
</div>
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
@ -4,9 +4,209 @@ exports[`TagTemplate renders correctly 1`] = `
|
||||
<div
|
||||
className="layout"
|
||||
>
|
||||
<StaticQuery
|
||||
render={[Function]}
|
||||
/>
|
||||
<div
|
||||
className="sidebar"
|
||||
>
|
||||
<div
|
||||
className="sidebar__inner"
|
||||
>
|
||||
<div
|
||||
className="author"
|
||||
>
|
||||
<a
|
||||
href="/"
|
||||
>
|
||||
<img
|
||||
alt="Test name"
|
||||
className="author__photo"
|
||||
height="75"
|
||||
src="/test.jpg"
|
||||
width="75"
|
||||
/>
|
||||
</a>
|
||||
<h2
|
||||
className="author__title"
|
||||
>
|
||||
<a
|
||||
className="author__title-link"
|
||||
href="/"
|
||||
>
|
||||
Test name
|
||||
</a>
|
||||
</h2>
|
||||
<p
|
||||
className="author__subtitle"
|
||||
>
|
||||
Test bio
|
||||
</p>
|
||||
</div>
|
||||
<nav
|
||||
className="menu"
|
||||
>
|
||||
<ul
|
||||
className="menu__list"
|
||||
>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/1/"
|
||||
>
|
||||
Test label 1
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/2/"
|
||||
>
|
||||
Test label 2
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/3/"
|
||||
>
|
||||
Test label 3
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div
|
||||
className="contacts"
|
||||
>
|
||||
<ul
|
||||
className="contacts__list"
|
||||
>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="mailto:#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 28 28"
|
||||
>
|
||||
<path
|
||||
d="M26 23.5v-12c-0.328 0.375-0.688 0.719-1.078 1.031-2.234 1.719-4.484 3.469-6.656 5.281-1.172 0.984-2.625 2.188-4.25 2.188h-0.031c-1.625 0-3.078-1.203-4.25-2.188-2.172-1.813-4.422-3.563-6.656-5.281-0.391-0.313-0.75-0.656-1.078-1.031v12c0 0.266 0.234 0.5 0.5 0.5h23c0.266 0 0.5-0.234 0.5-0.5zM26 7.078c0-0.391 0.094-1.078-0.5-1.078h-23c-0.266 0-0.5 0.234-0.5 0.5 0 1.781 0.891 3.328 2.297 4.438 2.094 1.641 4.188 3.297 6.266 4.953 0.828 0.672 2.328 2.109 3.422 2.109h0.031c1.094 0 2.594-1.437 3.422-2.109 2.078-1.656 4.172-3.313 6.266-4.953 1.016-0.797 2.297-2.531 2.297-3.859zM28 6.5v17c0 1.375-1.125 2.5-2.5 2.5h-23c-1.375 0-2.5-1.125-2.5-2.5v-17c0-1.375 1.125-2.5 2.5-2.5h23c1.375 0 2.5 1.125 2.5 2.5z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="telegram:#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 28 28"
|
||||
>
|
||||
<path
|
||||
d="M27.563 0.172c0.328 0.234 0.484 0.609 0.422 1l-4 24c-0.047 0.297-0.234 0.547-0.5 0.703-0.141 0.078-0.313 0.125-0.484 0.125-0.125 0-0.25-0.031-0.375-0.078l-7.078-2.891-3.781 4.609c-0.187 0.234-0.469 0.359-0.766 0.359-0.109 0-0.234-0.016-0.344-0.063-0.391-0.141-0.656-0.516-0.656-0.938v-5.453l13.5-16.547-16.703 14.453-6.172-2.531c-0.359-0.141-0.594-0.469-0.625-0.859-0.016-0.375 0.172-0.734 0.5-0.922l26-15c0.156-0.094 0.328-0.141 0.5-0.141 0.203 0 0.406 0.063 0.562 0.172z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://www.twitter.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 26 28"
|
||||
>
|
||||
<path
|
||||
d="M25.312 6.375c-0.688 1-1.547 1.891-2.531 2.609 0.016 0.219 0.016 0.438 0.016 0.656 0 6.672-5.078 14.359-14.359 14.359-2.859 0-5.516-0.828-7.75-2.266 0.406 0.047 0.797 0.063 1.219 0.063 2.359 0 4.531-0.797 6.266-2.156-2.219-0.047-4.078-1.5-4.719-3.5 0.313 0.047 0.625 0.078 0.953 0.078 0.453 0 0.906-0.063 1.328-0.172-2.312-0.469-4.047-2.5-4.047-4.953v-0.063c0.672 0.375 1.453 0.609 2.281 0.641-1.359-0.906-2.25-2.453-2.25-4.203 0-0.938 0.25-1.797 0.688-2.547 2.484 3.062 6.219 5.063 10.406 5.281-0.078-0.375-0.125-0.766-0.125-1.156 0-2.781 2.25-5.047 5.047-5.047 1.453 0 2.766 0.609 3.687 1.594 1.141-0.219 2.234-0.641 3.203-1.219-0.375 1.172-1.172 2.156-2.219 2.781 1.016-0.109 2-0.391 2.906-0.781z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://github.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 26 28"
|
||||
>
|
||||
<path
|
||||
d="M10 19c0 1.141-0.594 3-2 3s-2-1.859-2-3 0.594-3 2-3 2 1.859 2 3zM20 19c0 1.141-0.594 3-2 3s-2-1.859-2-3 0.594-3 2-3 2 1.859 2 3zM22.5 19c0-2.391-1.453-4.5-4-4.5-1.031 0-2.016 0.187-3.047 0.328-0.812 0.125-1.625 0.172-2.453 0.172s-1.641-0.047-2.453-0.172c-1.016-0.141-2.016-0.328-3.047-0.328-2.547 0-4 2.109-4 4.5 0 4.781 4.375 5.516 8.188 5.516h2.625c3.813 0 8.188-0.734 8.188-5.516zM26 16.25c0 1.734-0.172 3.578-0.953 5.172-2.063 4.172-7.734 4.578-11.797 4.578-4.125 0-10.141-0.359-12.281-4.578-0.797-1.578-0.969-3.437-0.969-5.172 0-2.281 0.625-4.438 2.125-6.188-0.281-0.859-0.422-1.766-0.422-2.656 0-1.172 0.266-2.344 0.797-3.406 2.469 0 4.047 1.078 5.922 2.547 1.578-0.375 3.203-0.547 4.828-0.547 1.469 0 2.953 0.156 4.375 0.5 1.859-1.453 3.437-2.5 5.875-2.5 0.531 1.062 0.797 2.234 0.797 3.406 0 0.891-0.141 1.781-0.422 2.625 1.5 1.766 2.125 3.938 2.125 6.219z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 22 28"
|
||||
>
|
||||
<path
|
||||
d="M6 21c0 1.656-1.344 3-3 3s-3-1.344-3-3 1.344-3 3-3 3 1.344 3 3zM14 22.922c0.016 0.281-0.078 0.547-0.266 0.75-0.187 0.219-0.453 0.328-0.734 0.328h-2.109c-0.516 0-0.938-0.391-0.984-0.906-0.453-4.766-4.234-8.547-9-9-0.516-0.047-0.906-0.469-0.906-0.984v-2.109c0-0.281 0.109-0.547 0.328-0.734 0.172-0.172 0.422-0.266 0.672-0.266h0.078c3.328 0.266 6.469 1.719 8.828 4.094 2.375 2.359 3.828 5.5 4.094 8.828zM22 22.953c0.016 0.266-0.078 0.531-0.281 0.734-0.187 0.203-0.438 0.313-0.719 0.313h-2.234c-0.531 0-0.969-0.406-1-0.938-0.516-9.078-7.75-16.312-16.828-16.844-0.531-0.031-0.938-0.469-0.938-0.984v-2.234c0-0.281 0.109-0.531 0.313-0.719 0.187-0.187 0.438-0.281 0.688-0.281h0.047c5.469 0.281 10.609 2.578 14.484 6.469 3.891 3.875 6.188 9.016 6.469 14.484z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://vk.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 31 28"
|
||||
>
|
||||
<path
|
||||
d="M29.953 8.125c0.234 0.641-0.5 2.141-2.344 4.594-3.031 4.031-3.359 3.656-0.859 5.984 2.406 2.234 2.906 3.313 2.984 3.453 0 0 1 1.75-1.109 1.766l-4 0.063c-0.859 0.172-2-0.609-2-0.609-1.5-1.031-2.906-3.703-4-3.359 0 0-1.125 0.359-1.094 2.766 0.016 0.516-0.234 0.797-0.234 0.797s-0.281 0.297-0.828 0.344h-1.797c-3.953 0.25-7.438-3.391-7.438-3.391s-3.813-3.938-7.156-11.797c-0.219-0.516 0.016-0.766 0.016-0.766s0.234-0.297 0.891-0.297l4.281-0.031c0.406 0.063 0.688 0.281 0.688 0.281s0.25 0.172 0.375 0.5c0.703 1.75 1.609 3.344 1.609 3.344 1.563 3.219 2.625 3.766 3.234 3.437 0 0 0.797-0.484 0.625-4.375-0.063-1.406-0.453-2.047-0.453-2.047-0.359-0.484-1.031-0.625-1.328-0.672-0.234-0.031 0.156-0.594 0.672-0.844 0.766-0.375 2.125-0.391 3.734-0.375 1.266 0.016 1.625 0.094 2.109 0.203 1.484 0.359 0.984 1.734 0.984 5.047 0 1.062-0.203 2.547 0.562 3.031 0.328 0.219 1.141 0.031 3.141-3.375 0 0 0.938-1.625 1.672-3.516 0.125-0.344 0.391-0.484 0.391-0.484s0.25-0.141 0.594-0.094l4.5-0.031c1.359-0.172 1.578 0.453 1.578 0.453z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
className="copyright"
|
||||
>
|
||||
Test copyright
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="page"
|
||||
>
|
||||
@ -42,35 +242,35 @@ exports[`TagTemplate renders correctly 1`] = `
|
||||
<span
|
||||
className="feed__item-meta-category"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-meta-category-link"
|
||||
to="/test"
|
||||
href="/test"
|
||||
>
|
||||
test
|
||||
</Link>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<h2
|
||||
className="feed__item-title"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-title-link"
|
||||
to="/test_0"
|
||||
href="/test_0"
|
||||
>
|
||||
test_0
|
||||
</Link>
|
||||
</a>
|
||||
</h2>
|
||||
<p
|
||||
className="feed__item-description"
|
||||
>
|
||||
test_0
|
||||
</p>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-readmore"
|
||||
to="/test_0"
|
||||
href="/test_0"
|
||||
>
|
||||
Read
|
||||
</Link>
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
className="feed__item"
|
||||
@ -90,35 +290,35 @@ exports[`TagTemplate renders correctly 1`] = `
|
||||
<span
|
||||
className="feed__item-meta-category"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-meta-category-link"
|
||||
to="/test"
|
||||
href="/test"
|
||||
>
|
||||
test
|
||||
</Link>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<h2
|
||||
className="feed__item-title"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-title-link"
|
||||
to="/test_1"
|
||||
href="/test_1"
|
||||
>
|
||||
test_1
|
||||
</Link>
|
||||
</a>
|
||||
</h2>
|
||||
<p
|
||||
className="feed__item-description"
|
||||
>
|
||||
test_1
|
||||
</p>
|
||||
<Link
|
||||
<a
|
||||
className="feed__item-readmore"
|
||||
to="/test_1"
|
||||
href="/test_1"
|
||||
>
|
||||
Read
|
||||
</Link>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@ -127,24 +327,24 @@ exports[`TagTemplate renders correctly 1`] = `
|
||||
<div
|
||||
className="pagination__prev"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="pagination__prev-link"
|
||||
href="/page/1"
|
||||
rel="prev"
|
||||
to="/page/1"
|
||||
>
|
||||
← PREV
|
||||
</Link>
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
className="pagination__next"
|
||||
>
|
||||
<Link
|
||||
<a
|
||||
className="pagination__next-link"
|
||||
href="/page/3"
|
||||
rel="next"
|
||||
to="/page/3"
|
||||
>
|
||||
→ NEXT
|
||||
</Link>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -4,9 +4,209 @@ exports[`TagsListTemplate renders correctly 1`] = `
|
||||
<div
|
||||
className="layout"
|
||||
>
|
||||
<StaticQuery
|
||||
render={[Function]}
|
||||
/>
|
||||
<div
|
||||
className="sidebar"
|
||||
>
|
||||
<div
|
||||
className="sidebar__inner"
|
||||
>
|
||||
<div
|
||||
className="author"
|
||||
>
|
||||
<a
|
||||
href="/"
|
||||
>
|
||||
<img
|
||||
alt="Test name"
|
||||
className="author__photo"
|
||||
height="75"
|
||||
src="/test.jpg"
|
||||
width="75"
|
||||
/>
|
||||
</a>
|
||||
<h2
|
||||
className="author__title"
|
||||
>
|
||||
<a
|
||||
className="author__title-link"
|
||||
href="/"
|
||||
>
|
||||
Test name
|
||||
</a>
|
||||
</h2>
|
||||
<p
|
||||
className="author__subtitle"
|
||||
>
|
||||
Test bio
|
||||
</p>
|
||||
</div>
|
||||
<nav
|
||||
className="menu"
|
||||
>
|
||||
<ul
|
||||
className="menu__list"
|
||||
>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/1/"
|
||||
>
|
||||
Test label 1
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/2/"
|
||||
>
|
||||
Test label 2
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="menu__list-item"
|
||||
>
|
||||
<a
|
||||
className="menu__list-item-link"
|
||||
href="/test/3/"
|
||||
>
|
||||
Test label 3
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div
|
||||
className="contacts"
|
||||
>
|
||||
<ul
|
||||
className="contacts__list"
|
||||
>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="mailto:#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 28 28"
|
||||
>
|
||||
<path
|
||||
d="M26 23.5v-12c-0.328 0.375-0.688 0.719-1.078 1.031-2.234 1.719-4.484 3.469-6.656 5.281-1.172 0.984-2.625 2.188-4.25 2.188h-0.031c-1.625 0-3.078-1.203-4.25-2.188-2.172-1.813-4.422-3.563-6.656-5.281-0.391-0.313-0.75-0.656-1.078-1.031v12c0 0.266 0.234 0.5 0.5 0.5h23c0.266 0 0.5-0.234 0.5-0.5zM26 7.078c0-0.391 0.094-1.078-0.5-1.078h-23c-0.266 0-0.5 0.234-0.5 0.5 0 1.781 0.891 3.328 2.297 4.438 2.094 1.641 4.188 3.297 6.266 4.953 0.828 0.672 2.328 2.109 3.422 2.109h0.031c1.094 0 2.594-1.437 3.422-2.109 2.078-1.656 4.172-3.313 6.266-4.953 1.016-0.797 2.297-2.531 2.297-3.859zM28 6.5v17c0 1.375-1.125 2.5-2.5 2.5h-23c-1.375 0-2.5-1.125-2.5-2.5v-17c0-1.375 1.125-2.5 2.5-2.5h23c1.375 0 2.5 1.125 2.5 2.5z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="telegram:#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 28 28"
|
||||
>
|
||||
<path
|
||||
d="M27.563 0.172c0.328 0.234 0.484 0.609 0.422 1l-4 24c-0.047 0.297-0.234 0.547-0.5 0.703-0.141 0.078-0.313 0.125-0.484 0.125-0.125 0-0.25-0.031-0.375-0.078l-7.078-2.891-3.781 4.609c-0.187 0.234-0.469 0.359-0.766 0.359-0.109 0-0.234-0.016-0.344-0.063-0.391-0.141-0.656-0.516-0.656-0.938v-5.453l13.5-16.547-16.703 14.453-6.172-2.531c-0.359-0.141-0.594-0.469-0.625-0.859-0.016-0.375 0.172-0.734 0.5-0.922l26-15c0.156-0.094 0.328-0.141 0.5-0.141 0.203 0 0.406 0.063 0.562 0.172z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://www.twitter.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 26 28"
|
||||
>
|
||||
<path
|
||||
d="M25.312 6.375c-0.688 1-1.547 1.891-2.531 2.609 0.016 0.219 0.016 0.438 0.016 0.656 0 6.672-5.078 14.359-14.359 14.359-2.859 0-5.516-0.828-7.75-2.266 0.406 0.047 0.797 0.063 1.219 0.063 2.359 0 4.531-0.797 6.266-2.156-2.219-0.047-4.078-1.5-4.719-3.5 0.313 0.047 0.625 0.078 0.953 0.078 0.453 0 0.906-0.063 1.328-0.172-2.312-0.469-4.047-2.5-4.047-4.953v-0.063c0.672 0.375 1.453 0.609 2.281 0.641-1.359-0.906-2.25-2.453-2.25-4.203 0-0.938 0.25-1.797 0.688-2.547 2.484 3.062 6.219 5.063 10.406 5.281-0.078-0.375-0.125-0.766-0.125-1.156 0-2.781 2.25-5.047 5.047-5.047 1.453 0 2.766 0.609 3.687 1.594 1.141-0.219 2.234-0.641 3.203-1.219-0.375 1.172-1.172 2.156-2.219 2.781 1.016-0.109 2-0.391 2.906-0.781z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://github.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 26 28"
|
||||
>
|
||||
<path
|
||||
d="M10 19c0 1.141-0.594 3-2 3s-2-1.859-2-3 0.594-3 2-3 2 1.859 2 3zM20 19c0 1.141-0.594 3-2 3s-2-1.859-2-3 0.594-3 2-3 2 1.859 2 3zM22.5 19c0-2.391-1.453-4.5-4-4.5-1.031 0-2.016 0.187-3.047 0.328-0.812 0.125-1.625 0.172-2.453 0.172s-1.641-0.047-2.453-0.172c-1.016-0.141-2.016-0.328-3.047-0.328-2.547 0-4 2.109-4 4.5 0 4.781 4.375 5.516 8.188 5.516h2.625c3.813 0 8.188-0.734 8.188-5.516zM26 16.25c0 1.734-0.172 3.578-0.953 5.172-2.063 4.172-7.734 4.578-11.797 4.578-4.125 0-10.141-0.359-12.281-4.578-0.797-1.578-0.969-3.437-0.969-5.172 0-2.281 0.625-4.438 2.125-6.188-0.281-0.859-0.422-1.766-0.422-2.656 0-1.172 0.266-2.344 0.797-3.406 2.469 0 4.047 1.078 5.922 2.547 1.578-0.375 3.203-0.547 4.828-0.547 1.469 0 2.953 0.156 4.375 0.5 1.859-1.453 3.437-2.5 5.875-2.5 0.531 1.062 0.797 2.234 0.797 3.406 0 0.891-0.141 1.781-0.422 2.625 1.5 1.766 2.125 3.938 2.125 6.219z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 22 28"
|
||||
>
|
||||
<path
|
||||
d="M6 21c0 1.656-1.344 3-3 3s-3-1.344-3-3 1.344-3 3-3 3 1.344 3 3zM14 22.922c0.016 0.281-0.078 0.547-0.266 0.75-0.187 0.219-0.453 0.328-0.734 0.328h-2.109c-0.516 0-0.938-0.391-0.984-0.906-0.453-4.766-4.234-8.547-9-9-0.516-0.047-0.906-0.469-0.906-0.984v-2.109c0-0.281 0.109-0.547 0.328-0.734 0.172-0.172 0.422-0.266 0.672-0.266h0.078c3.328 0.266 6.469 1.719 8.828 4.094 2.375 2.359 3.828 5.5 4.094 8.828zM22 22.953c0.016 0.266-0.078 0.531-0.281 0.734-0.187 0.203-0.438 0.313-0.719 0.313h-2.234c-0.531 0-0.969-0.406-1-0.938-0.516-9.078-7.75-16.312-16.828-16.844-0.531-0.031-0.938-0.469-0.938-0.984v-2.234c0-0.281 0.109-0.531 0.313-0.719 0.187-0.187 0.438-0.281 0.688-0.281h0.047c5.469 0.281 10.609 2.578 14.484 6.469 3.891 3.875 6.188 9.016 6.469 14.484z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="contacts__list-item"
|
||||
>
|
||||
<a
|
||||
className="contacts__list-item-link"
|
||||
href="https://vk.com/#"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 31 28"
|
||||
>
|
||||
<path
|
||||
d="M29.953 8.125c0.234 0.641-0.5 2.141-2.344 4.594-3.031 4.031-3.359 3.656-0.859 5.984 2.406 2.234 2.906 3.313 2.984 3.453 0 0 1 1.75-1.109 1.766l-4 0.063c-0.859 0.172-2-0.609-2-0.609-1.5-1.031-2.906-3.703-4-3.359 0 0-1.125 0.359-1.094 2.766 0.016 0.516-0.234 0.797-0.234 0.797s-0.281 0.297-0.828 0.344h-1.797c-3.953 0.25-7.438-3.391-7.438-3.391s-3.813-3.938-7.156-11.797c-0.219-0.516 0.016-0.766 0.016-0.766s0.234-0.297 0.891-0.297l4.281-0.031c0.406 0.063 0.688 0.281 0.688 0.281s0.25 0.172 0.375 0.5c0.703 1.75 1.609 3.344 1.609 3.344 1.563 3.219 2.625 3.766 3.234 3.437 0 0 0.797-0.484 0.625-4.375-0.063-1.406-0.453-2.047-0.453-2.047-0.359-0.484-1.031-0.625-1.328-0.672-0.234-0.031 0.156-0.594 0.672-0.844 0.766-0.375 2.125-0.391 3.734-0.375 1.266 0.016 1.625 0.094 2.109 0.203 1.484 0.359 0.984 1.734 0.984 5.047 0 1.062-0.203 2.547 0.562 3.031 0.328 0.219 1.141 0.031 3.141-3.375 0 0 0.938-1.625 1.672-3.516 0.125-0.344 0.391-0.484 0.391-0.484s0.25-0.141 0.594-0.094l4.5-0.031c1.359-0.172 1.578 0.453 1.578 0.453z"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
className="copyright"
|
||||
>
|
||||
Test copyright
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="page"
|
||||
>
|
||||
@ -23,24 +223,24 @@ exports[`TagsListTemplate renders correctly 1`] = `
|
||||
>
|
||||
<ul>
|
||||
<li>
|
||||
<Link
|
||||
to="/tag/test-0/"
|
||||
<a
|
||||
href="/tag/test-0/"
|
||||
>
|
||||
test_0
|
||||
(
|
||||
1
|
||||
)
|
||||
</Link>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<Link
|
||||
to="/tag/test-1/"
|
||||
<a
|
||||
href="/tag/test-1/"
|
||||
>
|
||||
test_1
|
||||
(
|
||||
2
|
||||
)
|
||||
</Link>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -1,24 +1,21 @@
|
||||
import React from 'react';
|
||||
import { Link, graphql } from 'gatsby';
|
||||
import { Link } from 'gatsby';
|
||||
import kebabCase from 'lodash/kebabCase';
|
||||
import Sidebar from '../components/Sidebar';
|
||||
import Layout from '../components/Layout';
|
||||
import Page from '../components/Page';
|
||||
import { useSiteMetadata, useCategoriesList } from '../hooks';
|
||||
|
||||
const CategoriesListTemplate = ({ data }) => {
|
||||
const {
|
||||
title,
|
||||
subtitle
|
||||
} = data.site.siteMetadata;
|
||||
|
||||
const { group } = data.allMarkdownRemark;
|
||||
const CategoriesListTemplate = () => {
|
||||
const { title, subtitle } = useSiteMetadata();
|
||||
const categories = useCategoriesList();
|
||||
|
||||
return (
|
||||
<Layout title={`Categories - ${title}`} description={subtitle}>
|
||||
<Sidebar />
|
||||
<Page title="Categories">
|
||||
<ul>
|
||||
{group.map((category) => (
|
||||
{categories.map((category) => (
|
||||
<li key={category.fieldValue}>
|
||||
<Link to={`/category/${kebabCase(category.fieldValue)}/`}>
|
||||
{category.fieldValue} ({category.totalCount})
|
||||
@ -31,23 +28,4 @@ const CategoriesListTemplate = ({ data }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const query = graphql`
|
||||
query CategoriesListQuery {
|
||||
site {
|
||||
siteMetadata {
|
||||
title
|
||||
subtitle
|
||||
}
|
||||
}
|
||||
allMarkdownRemark(
|
||||
filter: { frontmatter: { template: { eq: "post" }, draft: { ne: true } } }
|
||||
) {
|
||||
group(field: frontmatter___category) {
|
||||
fieldValue
|
||||
totalCount
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export default CategoriesListTemplate;
|
||||
export default CategoriesListTemplate;
|
@ -1,33 +1,27 @@
|
||||
import React from 'react';
|
||||
import renderer from 'react-test-renderer';
|
||||
import { useStaticQuery, StaticQuery } from 'gatsby';
|
||||
import CategoriesListTemplate from './categories-list-template';
|
||||
import siteMetadata from '../../jest/__fixtures__/site-metadata';
|
||||
import allMarkdownRemark from '../../jest/__fixtures__/all-markdown-remark';
|
||||
|
||||
describe('CategoriesListTemplate', () => {
|
||||
const props = {
|
||||
data: {
|
||||
allMarkdownRemark: {
|
||||
group: [
|
||||
{
|
||||
fieldValue: 'test_0',
|
||||
totalCount: 1
|
||||
},
|
||||
{
|
||||
fieldValue: 'test_1',
|
||||
totalCount: 2
|
||||
}
|
||||
]
|
||||
},
|
||||
site: {
|
||||
siteMetadata: {
|
||||
title: 'test',
|
||||
subtitle: 'test'
|
||||
}
|
||||
}
|
||||
}
|
||||
...siteMetadata,
|
||||
...allMarkdownRemark
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
StaticQuery.mockImplementationOnce(
|
||||
({ render }) => (
|
||||
render(props)
|
||||
),
|
||||
useStaticQuery.mockReturnValue(props)
|
||||
);
|
||||
});
|
||||
|
||||
it('renders correctly', () => {
|
||||
const tree = renderer.create(<CategoriesListTemplate {...props} />).toJSON();
|
||||
const tree = renderer.create(<CategoriesListTemplate />).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
@ -5,12 +5,10 @@ import Sidebar from '../components/Sidebar';
|
||||
import Feed from '../components/Feed';
|
||||
import Page from '../components/Page';
|
||||
import Pagination from '../components/Pagination';
|
||||
import { useSiteMetadata } from '../hooks';
|
||||
|
||||
const CategoryTemplate = ({ data, pageContext }) => {
|
||||
const {
|
||||
title: siteTitle,
|
||||
subtitle: siteSubtitle
|
||||
} = data.site.siteMetadata;
|
||||
const { title: siteTitle, subtitle: siteSubtitle } = useSiteMetadata();
|
||||
|
||||
const {
|
||||
category,
|
||||
@ -42,12 +40,6 @@ const CategoryTemplate = ({ data, pageContext }) => {
|
||||
|
||||
export const query = graphql`
|
||||
query CategoryPage($category: String, $postsLimit: Int!, $postsOffset: Int!) {
|
||||
site {
|
||||
siteMetadata {
|
||||
title
|
||||
subtitle
|
||||
}
|
||||
}
|
||||
allMarkdownRemark(
|
||||
limit: $postsLimit,
|
||||
skip: $postsOffset,
|
||||
|
@ -1,69 +1,28 @@
|
||||
import React from 'react';
|
||||
import renderer from 'react-test-renderer';
|
||||
import { useStaticQuery, StaticQuery } from 'gatsby';
|
||||
import CategoryTemplate from './category-template';
|
||||
import siteMetadata from '../../jest/__fixtures__/site-metadata';
|
||||
import allMarkdownRemark from '../../jest/__fixtures__/all-markdown-remark';
|
||||
import pageContext from '../../jest/__fixtures__/page-context';
|
||||
|
||||
describe('CategoryTemplate', () => {
|
||||
const props = {
|
||||
data: {
|
||||
allMarkdownRemark: {
|
||||
group: [
|
||||
{
|
||||
fieldValue: 'test_0',
|
||||
totalCount: 1
|
||||
},
|
||||
{
|
||||
fieldValue: 'test_1',
|
||||
totalCount: 2
|
||||
}
|
||||
],
|
||||
edges: [
|
||||
{
|
||||
node: {
|
||||
fields: {
|
||||
slug: '/test_0',
|
||||
categorySlug: '/test'
|
||||
},
|
||||
frontmatter: {
|
||||
date: '2016-09-01',
|
||||
description: 'test_0',
|
||||
category: 'test',
|
||||
title: 'test_0'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
node: {
|
||||
fields: {
|
||||
slug: '/test_1',
|
||||
categorySlug: '/test'
|
||||
},
|
||||
frontmatter: {
|
||||
date: '2016-09-01',
|
||||
description: 'test_1',
|
||||
category: 'test',
|
||||
title: 'test_1'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
site: {
|
||||
siteMetadata: {
|
||||
title: 'test',
|
||||
subtitle: 'test'
|
||||
}
|
||||
}
|
||||
...allMarkdownRemark
|
||||
},
|
||||
pageContext: {
|
||||
category: 'test',
|
||||
currentPage: 1,
|
||||
prevPagePath: '/page/1',
|
||||
nextPagePath: '/page/3',
|
||||
hasNextPage: true,
|
||||
hasPrevPage: true
|
||||
}
|
||||
...pageContext
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
StaticQuery.mockImplementationOnce(
|
||||
({ render }) => (
|
||||
render(siteMetadata)
|
||||
),
|
||||
useStaticQuery.mockReturnValue(siteMetadata)
|
||||
);
|
||||
});
|
||||
|
||||
it('renders correctly', () => {
|
||||
const tree = renderer.create(<CategoryTemplate {...props} />).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
|
@ -6,6 +6,7 @@ import Sidebar from '../components/Sidebar';
|
||||
import Feed from '../components/Feed';
|
||||
import Page from '../components/Page';
|
||||
import Pagination from '../components/Pagination';
|
||||
import { useSiteMetadata } from '../hooks';
|
||||
|
||||
type Props = {
|
||||
+data: Object,
|
||||
@ -13,10 +14,7 @@ type Props = {
|
||||
};
|
||||
|
||||
const IndexTemplate = ({ data, pageContext }: Props) => {
|
||||
const {
|
||||
title: siteTitle,
|
||||
subtitle: siteSubtitle
|
||||
} = data.site.siteMetadata;
|
||||
const { title: siteTitle, subtitle: siteSubtitle } = useSiteMetadata();
|
||||
|
||||
const {
|
||||
currentPage,
|
||||
@ -26,6 +24,7 @@ const IndexTemplate = ({ data, pageContext }: Props) => {
|
||||
nextPagePath
|
||||
} = pageContext;
|
||||
|
||||
|
||||
const { edges } = data.allMarkdownRemark;
|
||||
const pageTitle = currentPage > 0 ? `Posts - Page ${currentPage} - ${siteTitle}` : siteTitle;
|
||||
|
||||
|
@ -1,58 +1,28 @@
|
||||
import React from 'react';
|
||||
import renderer from 'react-test-renderer';
|
||||
import { StaticQuery, useStaticQuery } from 'gatsby';
|
||||
import IndexTemplate from './index-template';
|
||||
import siteMetadata from '../../jest/__fixtures__/site-metadata';
|
||||
import allMarkdownRemark from '../../jest/__fixtures__/all-markdown-remark';
|
||||
import pageContext from '../../jest/__fixtures__/page-context';
|
||||
|
||||
describe('IndexTemplate', () => {
|
||||
const props = {
|
||||
data: {
|
||||
allMarkdownRemark: {
|
||||
edges: [
|
||||
{
|
||||
node: {
|
||||
fields: {
|
||||
slug: '/test_0',
|
||||
categorySlug: '/test_0'
|
||||
},
|
||||
frontmatter: {
|
||||
date: '2016-09-01',
|
||||
description: 'test_0',
|
||||
category: 'test_0',
|
||||
title: 'test_0'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
node: {
|
||||
fields: {
|
||||
slug: '/test_1',
|
||||
categorySlug: '/test_1'
|
||||
},
|
||||
frontmatter: {
|
||||
date: '2016-09-01',
|
||||
description: 'test_1',
|
||||
category: 'test_1',
|
||||
title: 'test_1'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
site: {
|
||||
siteMetadata: {
|
||||
title: 'test',
|
||||
subtitle: 'test'
|
||||
}
|
||||
}
|
||||
...allMarkdownRemark
|
||||
},
|
||||
pageContext: {
|
||||
currentPage: 1,
|
||||
prevPagePath: '/page/1',
|
||||
nextPagePath: '/page/3',
|
||||
hasNextPage: true,
|
||||
hasPrevPage: true
|
||||
}
|
||||
...pageContext
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
StaticQuery.mockImplementationOnce(
|
||||
({ render }) => (
|
||||
render(siteMetadata)
|
||||
),
|
||||
useStaticQuery.mockReturnValue(siteMetadata)
|
||||
);
|
||||
});
|
||||
|
||||
it('renders correctly', () => {
|
||||
const tree = renderer.create(<IndexTemplate {...props} />).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
|
@ -1,14 +1,11 @@
|
||||
import React from 'react';
|
||||
import { graphql } from 'gatsby';
|
||||
import Sidebar from '../components/Sidebar';
|
||||
import Layout from '../components/Layout';
|
||||
import Page from '../components/Page';
|
||||
import { useSiteMetadata } from '../hooks';
|
||||
|
||||
const NotFoundTemplate = ({ data }) => {
|
||||
const {
|
||||
title,
|
||||
subtitle
|
||||
} = data.site.siteMetadata;
|
||||
const NotFoundTemplate = () => {
|
||||
const { title, subtitle } = useSiteMetadata();
|
||||
|
||||
return (
|
||||
<Layout title={`Not Found - ${title}`} description={subtitle}>
|
||||
@ -20,15 +17,4 @@ const NotFoundTemplate = ({ data }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const query = graphql`
|
||||
query NotFoundQuery {
|
||||
site {
|
||||
siteMetadata {
|
||||
title
|
||||
subtitle
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export default NotFoundTemplate;
|
||||
|
@ -1,21 +1,21 @@
|
||||
import React from 'react';
|
||||
import renderer from 'react-test-renderer';
|
||||
import { useStaticQuery, StaticQuery } from 'gatsby';
|
||||
import NotFoundTemplate from './not-found-template';
|
||||
import siteMetadata from '../../jest/__fixtures__/site-metadata';
|
||||
|
||||
describe('NotFoundTemplate', () => {
|
||||
const props = {
|
||||
data: {
|
||||
site: {
|
||||
siteMetadata: {
|
||||
title: 'test',
|
||||
subtitle: 'test'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
beforeEach(() => {
|
||||
StaticQuery.mockImplementationOnce(
|
||||
({ render }) => (
|
||||
render(siteMetadata)
|
||||
),
|
||||
useStaticQuery.mockReturnValue(siteMetadata)
|
||||
);
|
||||
});
|
||||
|
||||
it('renders correctly', () => {
|
||||
const tree = renderer.create(<NotFoundTemplate {...props} />).toJSON();
|
||||
const tree = renderer.create(<NotFoundTemplate />).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
@ -3,20 +3,12 @@ import { graphql } from 'gatsby';
|
||||
import Layout from '../components/Layout';
|
||||
import Sidebar from '../components/Sidebar';
|
||||
import Page from '../components/Page';
|
||||
import { useSiteMetadata } from '../hooks';
|
||||
|
||||
const PageTemplate = ({ data }) => {
|
||||
const {
|
||||
title: siteTitle,
|
||||
subtitle: siteSubtitle
|
||||
} = data.site.siteMetadata;
|
||||
|
||||
const {
|
||||
title: pageTitle,
|
||||
description: pageDescription
|
||||
} = data.markdownRemark.frontmatter;
|
||||
|
||||
const { title: siteTitle, subtitle: siteSubtitle } = useSiteMetadata();
|
||||
const { html: pageBody } = data.markdownRemark;
|
||||
|
||||
const { title: pageTitle, description: pageDescription } = data.markdownRemark.frontmatter;
|
||||
const metaDescription = pageDescription !== null ? pageDescription : siteSubtitle;
|
||||
|
||||
return (
|
||||
|
@ -1,28 +1,28 @@
|
||||
import React from 'react';
|
||||
import renderer from 'react-test-renderer';
|
||||
import { useStaticQuery, StaticQuery } from 'gatsby';
|
||||
import PageTemplate from './page-template';
|
||||
import siteMetadata from '../../jest/__fixtures__/site-metadata';
|
||||
import markdownRemark from '../../jest/__fixtures__/markdown-remark';
|
||||
|
||||
describe('PageTemplate', () => {
|
||||
const props = {
|
||||
data: {
|
||||
markdownRemark: {
|
||||
html: '<p>test</p>',
|
||||
frontmatter: {
|
||||
title: 'test',
|
||||
description: 'test'
|
||||
}
|
||||
},
|
||||
site: {
|
||||
siteMetadata: {
|
||||
title: 'test',
|
||||
subtitle: 'test'
|
||||
}
|
||||
}
|
||||
...markdownRemark
|
||||
}
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
StaticQuery.mockImplementationOnce(
|
||||
({ render }) => (
|
||||
render(siteMetadata)
|
||||
),
|
||||
useStaticQuery.mockReturnValue(siteMetadata)
|
||||
);
|
||||
});
|
||||
|
||||
it('renders correctly', () => {
|
||||
const tree = renderer.create(<PageTemplate {...props} />).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
});
|
@ -2,18 +2,11 @@ import React from 'react';
|
||||
import { graphql } from 'gatsby';
|
||||
import Layout from '../components/Layout';
|
||||
import Post from '../components/Post';
|
||||
import { useSiteMetadata } from '../hooks';
|
||||
|
||||
const PostTemplate = ({ data }) => {
|
||||
const {
|
||||
title: siteTitle,
|
||||
subtitle: siteSubtitle
|
||||
} = data.site.siteMetadata;
|
||||
|
||||
const {
|
||||
title: postTitle,
|
||||
description: postDescription
|
||||
} = data.markdownRemark.frontmatter;
|
||||
|
||||
const { title: siteTitle, subtitle: siteSubtitle } = useSiteMetadata();
|
||||
const { title: postTitle, description: postDescription } = data.markdownRemark.frontmatter;
|
||||
const metaDescription = postDescription !== null ? postDescription : siteSubtitle;
|
||||
|
||||
return (
|
||||
@ -23,22 +16,9 @@ const PostTemplate = ({ data }) => {
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
export const query = graphql`
|
||||
query PostBySlug($slug: String!) {
|
||||
site {
|
||||
siteMetadata {
|
||||
author {
|
||||
name
|
||||
contacts {
|
||||
twitter
|
||||
}
|
||||
}
|
||||
disqusShortname
|
||||
subtitle
|
||||
title
|
||||
url
|
||||
}
|
||||
}
|
||||
markdownRemark(fields: { slug: { eq: $slug } }) {
|
||||
id
|
||||
html
|
||||
@ -56,4 +36,5 @@ export const query = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
|
||||
export default PostTemplate;
|
||||
|
@ -1,39 +1,28 @@
|
||||
import React from 'react';
|
||||
import renderer from 'react-test-renderer';
|
||||
import { useStaticQuery, StaticQuery } from 'gatsby';
|
||||
import PostTemplate from './post-template';
|
||||
import siteMetadata from '../../jest/__fixtures__/site-metadata';
|
||||
import markdownRemark from '../../jest/__fixtures__/markdown-remark';
|
||||
|
||||
describe('PostTemplate', () => {
|
||||
const props = {
|
||||
data: {
|
||||
site: {
|
||||
siteMetadata: {
|
||||
title: 'test',
|
||||
subtitle: 'test'
|
||||
}
|
||||
},
|
||||
markdownRemark: {
|
||||
html: '<p>test</p>',
|
||||
fields: {
|
||||
tagSlugs: [
|
||||
'/test_0',
|
||||
'/test_1'
|
||||
]
|
||||
},
|
||||
frontmatter: {
|
||||
date: '2016-09-01',
|
||||
description: 'test',
|
||||
title: 'test',
|
||||
tags: [
|
||||
'test_0',
|
||||
'test_1'
|
||||
]
|
||||
}
|
||||
}
|
||||
...markdownRemark
|
||||
}
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
StaticQuery.mockImplementationOnce(
|
||||
({ render }) => (
|
||||
render(siteMetadata)
|
||||
),
|
||||
useStaticQuery.mockReturnValue(siteMetadata)
|
||||
);
|
||||
});
|
||||
|
||||
it('renders correctly', () => {
|
||||
const tree = renderer.create(<PostTemplate {...props} />).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
});
|
@ -5,12 +5,10 @@ import Sidebar from '../components/Sidebar';
|
||||
import Feed from '../components/Feed';
|
||||
import Page from '../components/Page';
|
||||
import Pagination from '../components/Pagination';
|
||||
import { useSiteMetadata } from '../hooks';
|
||||
|
||||
const TagTemplate = ({ data, pageContext }) => {
|
||||
const {
|
||||
title: siteTitle,
|
||||
subtitle: siteSubtitle
|
||||
} = data.site.siteMetadata;
|
||||
const { title: siteTitle, subtitle: siteSubtitle } = useSiteMetadata();
|
||||
|
||||
const {
|
||||
tag,
|
||||
|
@ -1,71 +1,30 @@
|
||||
import React from 'react';
|
||||
import renderer from 'react-test-renderer';
|
||||
import { useStaticQuery, StaticQuery } from 'gatsby';
|
||||
import TagTemplate from './tag-template';
|
||||
import siteMetadata from '../../jest/__fixtures__/site-metadata';
|
||||
import allMarkdownRemark from '../../jest/__fixtures__/all-markdown-remark';
|
||||
import pageContext from '../../jest/__fixtures__/page-context';
|
||||
|
||||
describe('TagTemplate', () => {
|
||||
beforeEach(() => {
|
||||
StaticQuery.mockImplementationOnce(
|
||||
({ render }) => (
|
||||
render(siteMetadata)
|
||||
),
|
||||
useStaticQuery.mockReturnValue(siteMetadata)
|
||||
);
|
||||
});
|
||||
|
||||
const props = {
|
||||
data: {
|
||||
allMarkdownRemark: {
|
||||
group: [
|
||||
{
|
||||
fieldValue: 'test_0',
|
||||
totalCount: 1
|
||||
},
|
||||
{
|
||||
fieldValue: 'test_1',
|
||||
totalCount: 2
|
||||
}
|
||||
],
|
||||
edges: [
|
||||
{
|
||||
node: {
|
||||
fields: {
|
||||
slug: '/test_0',
|
||||
categorySlug: '/test'
|
||||
},
|
||||
frontmatter: {
|
||||
date: '2016-09-01',
|
||||
description: 'test_0',
|
||||
category: 'test',
|
||||
title: 'test_0'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
node: {
|
||||
fields: {
|
||||
slug: '/test_1',
|
||||
categorySlug: '/test'
|
||||
},
|
||||
frontmatter: {
|
||||
date: '2016-09-01',
|
||||
description: 'test_1',
|
||||
category: 'test',
|
||||
title: 'test_1'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
site: {
|
||||
siteMetadata: {
|
||||
title: 'test',
|
||||
subtitle: 'test'
|
||||
}
|
||||
}
|
||||
...allMarkdownRemark
|
||||
},
|
||||
pageContext: {
|
||||
tag: 'test',
|
||||
currentPage: 1,
|
||||
prevPagePath: '/page/1',
|
||||
nextPagePath: '/page/3',
|
||||
hasNextPage: true,
|
||||
hasPrevPage: true
|
||||
}
|
||||
...pageContext
|
||||
};
|
||||
|
||||
it('renders correctly', () => {
|
||||
const tree = renderer.create(<TagTemplate {...props} />).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
});
|
@ -1,23 +1,21 @@
|
||||
import React from 'react';
|
||||
import { Link, graphql } from 'gatsby';
|
||||
import { Link } from 'gatsby';
|
||||
import kebabCase from 'lodash/kebabCase';
|
||||
import Layout from '../components/Layout';
|
||||
import Sidebar from '../components/Sidebar';
|
||||
import Page from '../components/Page';
|
||||
import { useSiteMetadata, useTagsList } from '../hooks';
|
||||
|
||||
const TagsListTemplate = ({ data }) => {
|
||||
const {
|
||||
title,
|
||||
subtitle
|
||||
} = data.site.siteMetadata;
|
||||
const { group } = data.allMarkdownRemark;
|
||||
const TagsListTemplate = () => {
|
||||
const { title, subtitle } = useSiteMetadata();
|
||||
const tags = useTagsList();
|
||||
|
||||
return (
|
||||
<Layout title={`Tags - ${title}`} description={subtitle}>
|
||||
<Sidebar />
|
||||
<Page title="Tags">
|
||||
<ul>
|
||||
{group.map((tag) => (
|
||||
{tags.map((tag) => (
|
||||
<li key={tag.fieldValue}>
|
||||
<Link to={`/tag/${kebabCase(tag.fieldValue)}/`}>
|
||||
{tag.fieldValue} ({tag.totalCount})
|
||||
@ -30,23 +28,4 @@ const TagsListTemplate = ({ data }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const query = graphql`
|
||||
query TagsListQuery {
|
||||
site {
|
||||
siteMetadata {
|
||||
title,
|
||||
subtitle
|
||||
}
|
||||
}
|
||||
allMarkdownRemark(
|
||||
filter: { frontmatter: { template: { eq: "post" }, draft: { ne: true } } }
|
||||
) {
|
||||
group(field: frontmatter___tags) {
|
||||
fieldValue
|
||||
totalCount
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export default TagsListTemplate;
|
@ -1,33 +1,27 @@
|
||||
import React from 'react';
|
||||
import renderer from 'react-test-renderer';
|
||||
import { useStaticQuery, StaticQuery } from 'gatsby';
|
||||
import TagsListTemplate from './tags-list-template';
|
||||
import siteMetadata from '../../jest/__fixtures__/site-metadata';
|
||||
import allMarkdownRemark from '../../jest/__fixtures__/all-markdown-remark';
|
||||
|
||||
describe('TagsListTemplate', () => {
|
||||
const props = {
|
||||
data: {
|
||||
allMarkdownRemark: {
|
||||
group: [
|
||||
{
|
||||
fieldValue: 'test_0',
|
||||
totalCount: 1
|
||||
},
|
||||
{
|
||||
fieldValue: 'test_1',
|
||||
totalCount: 2
|
||||
}
|
||||
]
|
||||
},
|
||||
site: {
|
||||
siteMetadata: {
|
||||
title: 'test',
|
||||
subtitle: 'test'
|
||||
}
|
||||
}
|
||||
}
|
||||
...siteMetadata,
|
||||
...allMarkdownRemark
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
StaticQuery.mockImplementationOnce(
|
||||
({ render }) => (
|
||||
render(props)
|
||||
),
|
||||
useStaticQuery.mockReturnValue(props)
|
||||
);
|
||||
});
|
||||
|
||||
it('renders correctly', () => {
|
||||
const tree = renderer.create(<TagsListTemplate {...props} />).toJSON();
|
||||
const tree = renderer.create(<TagsListTemplate />).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user