diff --git a/src/components/Offers/Offers.scss b/src/components/Offers/Offers.scss
index 340cd69..1d03a9b 100644
--- a/src/components/Offers/Offers.scss
+++ b/src/components/Offers/Offers.scss
@@ -44,7 +44,6 @@
}
}
& .offers-tags {
- min-height: 200px;
&__content {
display: flex;
flex-wrap: wrap;
diff --git a/src/components/Offers/Tags/Tags.js b/src/components/Offers/Tags/Tags.js
new file mode 100644
index 0000000..7d34e60
--- /dev/null
+++ b/src/components/Offers/Tags/Tags.js
@@ -0,0 +1,32 @@
+import React from 'react'
+import { Link } from 'gatsby'
+import sligify from '../../../helpers/slugify'
+import useTagsQuery from '../../../hooks/useTagsQuery'
+
+import TagIcon from '../../../images/tag-icon.svg'
+
+const TagItem = ({ title }) => {
+ return (
+
+ {title}
+
+ )
+}
+
+const Tags = () => {
+ const { edges } = useTagsQuery()
+
+ return (
+
+
+
+ Тэги
+
+
+ {edges.map(({ node }, i) => )}
+
+
+ )
+}
+
+export default Tags
\ No newline at end of file
diff --git a/src/hooks/useTagsQuery.js b/src/hooks/useTagsQuery.js
new file mode 100644
index 0000000..d3049e4
--- /dev/null
+++ b/src/hooks/useTagsQuery.js
@@ -0,0 +1,20 @@
+import { useStaticQuery, graphql } from 'gatsby'
+
+const useTagsQuery = () => {
+ const { allMarkdownRemark: { edges } } = useStaticQuery(graphql`
+ {
+ allMarkdownRemark(filter: {frontmatter: {templateKey: {eq: "tag"}}}) {
+ edges {
+ node {
+ frontmatter {
+ title
+ }
+ }
+ }
+ }
+ }
+ `)
+ return { edges }
+}
+
+export default useTagsQuery
\ No newline at end of file
diff --git a/static/admin/config.yml b/static/admin/config.yml
index 892963c..1a8c562 100644
--- a/static/admin/config.yml
+++ b/static/admin/config.yml
@@ -8,7 +8,7 @@ collections:
label: "Article"
folder: "content/articles"
create: true
- slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
+ slug: "{{slug}}"
fields:
- {label: "Template Key", name: "templateKey", wisdget: "hidden", default: "article"}
- {label: "Slug", name: "slug", widget: "string"}
@@ -24,7 +24,7 @@ collections:
label: "Category"
folder: 'content/categories'
create: true
- slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
+ slug: "{{year}}-{{month}}-{{day}}"
fields:
- {label: "Template key", name: "templateKey", widget: "hidden", default: "category"}
- {label: "Название категории", name: "title", widget: "string"}
@@ -32,7 +32,7 @@ collections:
label: "Tag"
folder: 'content/tags'
create: true
- slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
+ slug: "{{year}}-{{month}}-{{day}}"
fields:
- {label: "Template key", name: "templateKey", widget: "hidden", default: "tag"}
- {label: "Название тэга", name: "title", widget: "string"}
\ No newline at end of file