components#TagsBlock JavaScript Examples
The following examples show how to use
components#TagsBlock.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BlogList.jsx From emprezzo with MIT License | 6 votes |
BlogList = ({ path, cover, title, date, excerpt, tags }) => (
<Container>
<Wrapper>
<Image>
<Link to={path} title={title}>
{typeof cover === 'object' &&
<Img fluid={cover || {} || [] || ''} />
}
{typeof cover === 'string' &&
<img src={cover || {} || [] || ''} style={{height: '100%', objectFit: 'fill'}} />
}
</Link>
</Image>
<Information>
<Date>{date}</Date>
<Link to={path}>
<Title>{title}</Title>
</Link>
<TagsBlock list={tags} />
{excerpt}
</Information>
</Wrapper>
</Container>
)
Example #2
Source File: ShopList.jsx From emprezzo with MIT License | 6 votes |
ShopList = ({ path, cover, title, date, excerpt, tags }) => (
<Wrapper>
<Image>
<Link to={path} title={title}>
{cover && typeof cover === 'object' &&
<Img fluid={cover || {} || [] || ''} />
}
{cover && typeof cover === 'string' &&
<img src={cover || {} || [] || ''} style={{height: '100%', objectFit: 'fill'}} />
}
</Link>
</Image>
<Information>
<Date>{date}</Date>
<Link to={path}>
<Title>{title}</Title>
</Link>
<TagsBlock list={tags} />
{excerpt}
</Information>
</Wrapper>
)
Example #3
Source File: tags.jsx From emprezzo with MIT License | 6 votes |
Tags = ({ pageContext }) => {
const { tags } = pageContext;
return (
<Layout>
<Header title="all tags">all tags</Header>
<Container>
<TagsBlock list={tags} />
</Container>
</Layout>
);
}
Example #4
Source File: post.jsx From emprezzo with MIT License | 5 votes |
Post = ({ data, pageContext }) => {
const { next, prev } = pageContext;
const {html, frontmatter, excerpt } = data.markdownRemark
const {date, title, tags, path, description} = frontmatter
const image = frontmatter.cover.childImageSharp.fluid;
return (
<Layout>
<SEO
title={title}
description={description || excerpt || ' '}
banner={image}
pathname={path}
article
/>
<Header title={title} date={date} cover={image} />
<Container>
<Content input={html} />
<TagsBlock list={tags || []} />
</Container>
<SuggestionBar>
<PostSuggestion>
{prev && (
<Link to={prev.frontmatter.path}>
Previous
<h3>{prev.frontmatter.title}</h3>
</Link>
)}
</PostSuggestion>
<PostSuggestion>
{next && (
<Link to={next.frontmatter.path}>
Next
<h3>{next.frontmatter.title}</h3>
</Link>
)}
</PostSuggestion>
</SuggestionBar>
</Layout>
);
}