diff --git a/package.json b/package.json index f1f87d7..c9e8a2a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bruno-dulcetti-site", "description": "Bruno Dulcetti - web standards, css, xhtml e tecnologia em geral.", - "version": "1.4.0", + "version": "1.5.0", "author": "Bruno Dulcetti ", "scripts": { "build": "yarn clean && gatsby build", diff --git a/src/components/breadcrumb/index.js b/src/components/breadcrumb/index.js index c021edb..038e47f 100644 --- a/src/components/breadcrumb/index.js +++ b/src/components/breadcrumb/index.js @@ -2,14 +2,15 @@ import React from 'react'; import PropTypes from 'prop-types'; import * as S from './styles'; -import { PropTypes } from 'prop-types'; export default function Breadcrumb({ category, title }) { return ( - Home » - {category} › - {title} + /{' '} + + home + {' '} + / {category} / {title} ); } diff --git a/src/components/breadcrumb/styles.js b/src/components/breadcrumb/styles.js index 873925a..87964a8 100644 --- a/src/components/breadcrumb/styles.js +++ b/src/components/breadcrumb/styles.js @@ -1,10 +1,27 @@ import styled from 'styled-components'; import AniLink from 'gatsby-plugin-transition-link/AniLink'; +import { themes } from '../../styles/themes'; -export const BreadcrumbWrapper = styled.p``; +export const BreadcrumbWrapper = styled.p` + color: ${themes.palette.breadcrumb.color}; + margin-bottom: 10px; +`; -export const HomeLink = styled(AniLink)``; +export const HomeLink = styled(AniLink)` + color: ${themes.palette.breadcrumb.homeColor}; + font-weight: bold; + text-decoration: underline; -export const CategoryLink = styled.span``; + &:hover { + text-decoration: none; + } +`; -export const Title = styled.strong``; +export const CategoryLink = styled.span` + text-transform: lowercase; +`; + +export const Title = styled.strong` + font-family: ${themes.fonts.others}; + font-size: 1.1rem; +`; diff --git a/src/components/index.js b/src/components/index.js index 476f3c1..27da4a6 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -1,3 +1,4 @@ +import Breadcrumb from './breadcrumb/index'; import Comments from './comments'; import CreditsImage from './credits-image'; import Icons from './icons'; @@ -16,6 +17,7 @@ import SocialMedias from './social-medias'; import Svgs from './svgs'; export { + Breadcrumb, Comments, CreditsImage, Icons, diff --git a/src/styles/themes.js b/src/styles/themes.js index 4c834d6..dd8bc0b 100644 --- a/src/styles/themes.js +++ b/src/styles/themes.js @@ -39,6 +39,10 @@ export const themes = { maxWidth: '68em', }, palette: { + breadcrumb: { + color: _colors.gray, + homeColor: _colors.gray, + }, categories: { 'Back-End': _colors.xanadu, 'CSS': _colors.blueLight, diff --git a/src/templates/blog-post/index.js b/src/templates/blog-post/index.js index ac2af7e..fc5e2e9 100644 --- a/src/templates/blog-post/index.js +++ b/src/templates/blog-post/index.js @@ -1,7 +1,15 @@ import React from 'react'; import { graphql } from 'gatsby'; -import { Layout, Comments, SEO, Share, PreviousNext, CreditsImage } from '../../components'; +import { + Breadcrumb, + Comments, + CreditsImage, + Layout, + PreviousNext, + SEO, + Share, +} from '../../components'; import * as S from './styles'; @@ -18,6 +26,7 @@ export default function BlogPost({ data, pageContext }) { image={frontmatter.featuredImage.childImageSharp.fluid.src} /> + {frontmatter.title} {frontmatter.description && ( {frontmatter.description} diff --git a/src/templates/blog-post/styles.js b/src/templates/blog-post/styles.js index 53e96c0..b5c7cb0 100644 --- a/src/templates/blog-post/styles.js +++ b/src/templates/blog-post/styles.js @@ -14,15 +14,8 @@ export const PostWrap = styled.div` export const PostTitle = styled.h1` font-size: min(56px, 10vw); - line-height: min(62px, 11vw); - - ${media.lessThan('large')` - margin-bottom: .5rem; - `} - - ${media.greaterThan('large')` - margin-bottom: 1rem; - `} + line-height: min(60px, 10vw); + margin-bottom: 0.5rem; `; export const PostDescription = styled.h2` @@ -30,7 +23,7 @@ export const PostDescription = styled.h2` font-style: italic; font-weight: normal; line-height: 1.2; - margin-bottom: 10px; + margin-bottom: 1rem; ${media.lessThan('large')` font-size: 1.5rem;