@frontity/mars-theme
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.3.1](https://github.com/frontity/frontity/compare/@frontity/mars-theme@0.3.0...@frontity/mars-theme@0.3.1) (2019-05-16) | ||
**Note:** Version bump only for package @frontity/mars-theme | ||
# [0.3.0](https://github.com/frontity/frontity/compare/@frontity/mars-theme@0.2.0...@frontity/mars-theme@0.3.0) (2019-05-16) | ||
@@ -8,0 +16,0 @@ |
{ | ||
"name": "@frontity/mars-theme", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "A starter theme for Frontity", | ||
@@ -28,5 +28,5 @@ "keywords": [ | ||
"@frontity/source": "^0.1.2", | ||
"frontity": "^0.2.7" | ||
"frontity": "^0.2.8" | ||
}, | ||
"gitHead": "5cc5c8747a44efbef9b7352a094356e2cdfae8d8" | ||
"gitHead": "876dd901bc566c9ae906b3e704ffeb09bbe3f351" | ||
} |
import React from "react"; | ||
import { connect, styled } from "frontity"; | ||
import Link from "./link"; | ||
import Nav from "./nav"; | ||
const Header = ({ state }) => ( | ||
<Container> | ||
<StyledLink path="/"> | ||
<Title>{state.frontity.title}</Title> | ||
</StyledLink> | ||
<Description>{state.frontity.description}</Description> | ||
</Container> | ||
<> | ||
<Container> | ||
<StyledLink path="/"> | ||
<Title>{state.frontity.title}</Title> | ||
</StyledLink> | ||
<Description>{state.frontity.description}</Description> | ||
</Container> | ||
<Nav /> | ||
</> | ||
); | ||
@@ -17,4 +21,5 @@ | ||
const Container = styled.div` | ||
width: 840px; | ||
height: 80px; | ||
width: 848px; | ||
max-width: 100%; | ||
box-sizing: border-box; | ||
padding: 24px; | ||
@@ -29,2 +34,3 @@ color: #fff; | ||
margin: 0; | ||
margin-bottom: 16px; | ||
`; | ||
@@ -31,0 +37,0 @@ |
import React from "react"; | ||
import { connect, styled } from "frontity"; | ||
import Link from "../link"; | ||
import Item from "./list-item"; | ||
import Pagination from "./pagination"; | ||
@@ -10,6 +10,11 @@ | ||
// Get the items of the current page. | ||
const items = data.pages[state.router.page - 1]; | ||
const items = data.pages[state.router.page]; | ||
return items ? ( | ||
<Container> | ||
{data.isTaxonomy && ( | ||
<Taxonomy> | ||
{data.taxonomy}: {state.source[data.taxonomy][data.id].name} | ||
</Taxonomy> | ||
)} | ||
{items.map(({ type, id }) => { | ||
@@ -25,27 +30,6 @@ const item = state.source[type][id]; | ||
const Item = connect(({ state, item }) => { | ||
const author = state.source.author[item.author]; | ||
const date = new Date(item.date); | ||
return ( | ||
<ItemContainer> | ||
<Link path={item.link}> | ||
<Title dangerouslySetInnerHTML={{ __html: item.title.rendered }} /> | ||
</Link> | ||
<Author> | ||
By <b>{author.name}</b> | ||
</Author> | ||
<Fecha> | ||
{" "} | ||
on <b>{date.toDateString()}</b> | ||
</Fecha> | ||
<Excerpt dangerouslySetInnerHTML={{ __html: item.excerpt.rendered }} /> | ||
</ItemContainer> | ||
); | ||
}); | ||
export default connect(List); | ||
const Container = styled.ul` | ||
width: 840px; | ||
width: 800px; | ||
margin: 0; | ||
@@ -56,28 +40,6 @@ padding: 24px; | ||
const ItemContainer = styled.li` | ||
margin-bottom: 24px; | ||
`; | ||
const Title = styled.h1` | ||
color: rgba(12, 17, 43); | ||
margin: 0; | ||
margin-top: 24px; | ||
margin-bottom: 8px; | ||
`; | ||
const Author = styled.p` | ||
const Taxonomy = styled.h3` | ||
font-weight: 300; | ||
text-transform: capitalize; | ||
color: rgba(12, 17, 43, 0.9); | ||
font-size: 0.9em; | ||
display: inline; | ||
`; | ||
const Fecha = styled.p` | ||
color: rgba(12, 17, 43, 0.9); | ||
font-size: 0.9em; | ||
display: inline; | ||
`; | ||
const Excerpt = styled.div` | ||
line-height: 1.6em; | ||
color: rgba(12, 17, 43, 0.8); | ||
`; |
@@ -19,11 +19,11 @@ import React from "react"; | ||
<div> | ||
{isPreviousPage && ( | ||
<Link path={state.router.path} page={state.router.page - 1}> | ||
Previous | ||
{isNextPage && ( | ||
<Link path={state.router.path} page={state.router.page + 1}> | ||
<em>← Older posts</em> | ||
</Link> | ||
)} | ||
{isPreviousPage && isNextPage && " - "} | ||
{isNextPage && ( | ||
<Link path={state.router.path} page={state.router.page + 1}> | ||
Next | ||
{isPreviousPage && ( | ||
<Link path={state.router.path} page={state.router.page - 1}> | ||
<em>Newer posts →</em> | ||
</Link> | ||
@@ -30,0 +30,0 @@ )} |
@@ -19,3 +19,3 @@ import React from "react"; | ||
const Container = styled.div` | ||
width: 840px; | ||
width: 800px; | ||
margin: 0; | ||
@@ -22,0 +22,0 @@ padding: 24px; |
@@ -46,3 +46,3 @@ import React from "react"; | ||
const Container = styled.div` | ||
width: 840px; | ||
width: 800px; | ||
margin: 0; | ||
@@ -49,0 +49,0 @@ padding: 24px; |
@@ -43,3 +43,4 @@ import React from "react"; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
flex-direction: column; | ||
background-color: #1f38c5; | ||
@@ -46,0 +47,0 @@ `; |
@@ -8,2 +8,7 @@ import Theme from "./components/theme"; | ||
}, | ||
state: { | ||
theme: { | ||
menu: [["Home", "/"]] | ||
} | ||
}, | ||
actions: { | ||
@@ -10,0 +15,0 @@ theme: { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24852
17
444