Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
feat(Blog): Add Blog Page
Browse files Browse the repository at this point in the history
Blog page has been added, a bit of code clean up to App.react.js was done at the same time.

fix #72
  • Loading branch information
Greg-Hamel committed Jul 15, 2018
1 parent a55e384 commit 133f904
Show file tree
Hide file tree
Showing 2 changed files with 203 additions and 19 deletions.
40 changes: 21 additions & 19 deletions example/src/App.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import IconPage from "./components/IconPage.react.js";
import ChartsPage from "./interface/ChartsPage.react";
import GalleryPage from "./GalleryPage.react";
import MapCardsPage from "./components/MapCardsPage.react";
import BlogPage from "./components/BlogPage.react";

import {
DocsIntroPage,
Expand Down Expand Up @@ -56,47 +57,48 @@ function App(props: Props): React.Node {
<Router basename={process.env.PUBLIC_URL}>
<Switch>
<Route exact path="/" component={HomePage} />
<Route exact path="/cards" component={CardsDesignPage} />
<Route exact path="/charts" component={ChartsPage} />
<Route exact path="/pricing-cards" component={PricingCardsPage} />
<Route exact path="/form-elements" component={FormElementsPage} />
<Route exact path="/forgot-password" component={ForgotPasswordPage} />
<Route exact path="/login" component={LoginPage} />
<Route exact path="/register" component={RegisterPage} />
<Route exact path="/400" component={Error400} />
<Route exact path="/401" component={Error401} />
<Route exact path="/403" component={Error403} />
<Route exact path="/404" component={Error404} />
<Route exact path="/500" component={Error500} />
<Route exact path="/503" component={Error503} />
<Route exact path="/empty-page" component={Empty} />
<Route exact path="/email" component={Email} />
<Route exact path="/profile" component={ProfilePage} />
<Route exact path="/blog" component={BlogPage} />
<Route exact path="/cards" component={CardsDesignPage} />
<Route exact path="/charts" component={ChartsPage} />
<Route exact path="/docs" component={DocsIntroPage} />
<Route exact path="/docs/alerts" component={DocsAlertsPage} />
<Route exact path="/docs/buttons" component={DocsButtonsPage} />
<Route exact path="/docs/avatars" component={DocsAvatarsPage} />
<Route exact path="/docs/badges" component={DocsBadgePage} />
<Route exact path="/docs/cards" component={DocsCardsPage} />
<Route exact path="/docs/dropdowns" component={DocsDropdownPage} />
<Route exact path="/docs/grids" component={DocsGridPage} />
<Route exact path="/docs/lists" component={DocsListPage} />
<Route exact path="/docs/navs" component={DocsNavPage} />
<Route exact path="/store" component={StoreCardsPage} />
<Route exact path="/icons" component={IconPage} />
<Route exact path="/docs/charts" component={DocsChartsPage} />
<Route exact path="/docs/colors" component={DocsColorsPage} />
<Route exact path="/maps" component={MapCardsPage} />
<Route exact path="/docs/dropdowns" component={DocsDropdownPage} />
<Route
exact
path="/docs/form-components"
component={DocsFormComponentsPage}
/>
<Route exact path="/gallery" component={GalleryPage} />
<Route exact path="/docs/charts" component={DocsChartsPage} />
<Route exact path="/docs/grids" component={DocsGridPage} />
<Route exact path="/docs/lists" component={DocsListPage} />
<Route exact path="/docs/navs" component={DocsNavPage} />
<Route exact path="/docs/stamps" component={DocsStampPage} />
<Route exact path="/docs/tags" component={DocsTagsPage} />
<Route exact path="/docs/tables" component={DocsTablePage} />
<Route exact path="/docs/typography" component={DocsTypographyPage} />
<Route exact path="/email" component={Email} />
<Route exact path="/empty-page" component={Empty} />
<Route exact path="/form-elements" component={FormElementsPage} />
<Route exact path="/forgot-password" component={ForgotPasswordPage} />
<Route exact path="/gallery" component={GalleryPage} />
<Route exact path="/icons" component={IconPage} />
<Route exact path="/login" component={LoginPage} />
<Route exact path="/maps" component={MapCardsPage} />
<Route exact path="/pricing-cards" component={PricingCardsPage} />
<Route exact path="/profile" component={ProfilePage} />
<Route exact path="/register" component={RegisterPage} />
<Route exact path="/store" component={StoreCardsPage} />
<Route component={Error404} />
</Switch>
</Router>
Expand Down
182 changes: 182 additions & 0 deletions example/src/components/BlogPage.react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
// @flow

import * as React from "react";

import { Page, Grid, Card, Icon, BlogCard } from "tabler-react";
import SiteWrapper from "../SiteWrapper.react";

function BlogPage(): React.Node {
return (
<SiteWrapper>
<Page.Content title="Blog Component">
<Grid.Row cards deck>
<Grid.Col sm={6} xl={3}>
<BlogCard
imgSrc={"./demo/photos/david-klaasen-54203-500.jpg"}
imgAlt={"And this isn&#39;t my nose. This is a false one."}
postHref={"#"}
title={"And this isn't my nose. This is a false one."}
description={
"Look, my liege! The Knights Who Say Ni demand a sacrifice! …Are you suggesting that coconuts migr..."
}
profileHref={"./profile.html"}
authorName={"Rose Bradley"}
avatarImgSrc={"./demo/faces/female/18.jpg"}
date={"3 days ago"}
/>
</Grid.Col>
<Grid.Col sm={6} xl={3}>
<BlogCard
imgSrc={"./demo/photos/david-marcu-114194-500.jpg"}
imgAlt={"Well, I didn&#39;t vote for you."}
postHref={"#"}
title={"Well, I didn't vote for you."}
description={
"Well, we did do the nose. Why? Shut up! Will you shut up?! You don't frighten us, English pig-dog..."
}
profileHref={"./profile.html"}
authorName={"Peter Richards"}
avatarImgSrc={"./demo/faces/male/16.jpg"}
date={"3 days ago"}
/>
</Grid.Col>
<Grid.Col sm={6} xl={3}>
<BlogCard
imgSrc={"./demo/photos/davide-cantelli-139887-500.jpg"}
imgAlt={"How do you know she is a witch?"}
postHref={"#"}
title={"How do you know she is a witch?"}
description={
"Are you suggesting that coconuts migrate? No, no, no! Yes, yes. A bit. But she's got a wart. You ..."
}
profileHref={"./profile.html"}
authorName={"Wayne Holland"}
avatarImgSrc={"./demo/faces/male/26.jpg"}
date={"3 days ago"}
/>
</Grid.Col>
<Grid.Col sm={6} xl={3}>
<BlogCard
imgSrc={"./demo/photos/dino-reichmuth-84359-500.jpg"}
imgAlt={"Shut up!"}
postHref={"#"}
title={"Shut up!"}
description={
"Burn her! How do you know she is a witch? You don't frighten us, English pig-dogs! Go and boil yo..."
}
profileHref={"./profile.html"}
authorName={"Michelle Ross"}
avatarImgSrc={"./demo/faces/female/7.jpg"}
date={"3 days ago"}
/>
</Grid.Col>
<Grid.Col lg={4}>
<BlogCard
postHref={"#"}
title={"Weaseling out of things is important to learn."}
description={
"Please do not offer my god a peanut. That's why I love elementary school, Edna. The children beli..."
}
profileHref={"./profile.html"}
authorName={"Bobby Knight"}
avatarImgSrc={"./demo/faces/male/4.jpg"}
date={"3 days ago"}
/>
</Grid.Col>
<Grid.Col lg={4}>
<BlogCard
postHref={"#"}
title={"You don't like your job, you don't strike."}
description={
"But, Aquaman, you cannot marry a woman without gills. You're from two different worlds… Oh, I've ..."
}
profileHref={"./profile.html"}
authorName={"Craig Anderson"}
avatarImgSrc={"./demo/faces/male/35.jpg"}
date={"3 days ago"}
/>
</Grid.Col>
<Grid.Col lg={4}>
<BlogCard
postHref={"#"}
title={"I hope I didn't brain my damage."}
description={
"I don't like being outdoors, Smithers. For one thing, there's too many fat children. Oh, loneline..."
}
profileHref={"./profile.html"}
authorName={"Crystal Wallace"}
avatarImgSrc={"./demo/faces/female/29.jpg"}
date={"3 days ago"}
/>
</Grid.Col>
<Grid.Col lg={6}>
<BlogCard
aside
imgSrc={"./demo/photos/david-klaasen-54203-500.jpg"}
imgAlt={"And this isn&#39;t my nose. This is a false one."}
postHref={"#"}
title={"And this isn't my nose. This is a false one."}
description={
"Look, my liege! The Knights Who Say Ni demand a sacrifice! …Are you suggesting that coconuts migr..."
}
profileHref={"./profile.html"}
authorName={"Rose Bradley"}
avatarImgSrc={"./demo/faces/female/18.jpg"}
date={"3 days ago"}
/>
</Grid.Col>
<Grid.Col lg={6}>
<BlogCard
aside
imgSrc={"./demo/photos/david-marcu-114194-500.jpg"}
imgAlt={"Well, I didn't vote for you."}
postHref={"#"}
title={"And this isn't my nose. This is a false one."}
description={
"Well, we did do the nose. Why? Shut up! Will you shut up?! You don't frighten us, English pig-dog..."
}
profileHref={"./profile.html"}
authorName={"Peter Richards"}
avatarImgSrc={"./demo/faces/male/16.jpg"}
date={"3 days ago"}
/>
</Grid.Col>
<Grid.Col lg={6}>
<BlogCard
aside
imgSrc={"./demo/photos/grant-ritchie-338179-500.jpg"}
imgAlt={"Weaseling out of things is important to learn."}
postHref={"#"}
title={"Weaseling out of things is important to learn."}
description={
"Please do not offer my god a peanut. That's why I love elementary school, Edna. The children believe anything you tell them. Brace yourselves gentlemen. According to the gas chromatograph, the secr..."
}
profileHref={"./profile.html"}
authorName={"Bobby Knight"}
avatarImgSrc={"./demo/faces/male/4.jpg"}
date={"3 days ago"}
/>
</Grid.Col>
<Grid.Col lg={6}>
<BlogCard
aside
imgSrc={"./demo/photos/ilnur-kalimullin-218996-500.jpg"}
imgAlt={"You don't like your job, you don't strike."}
postHref={"#"}
title={"You don't like your job, you don't strike."}
description={
"But, Aquaman, you cannot marry a woman without gills. You're from two different worlds… Oh, I've wasted my life. Son, when you participate in sporting events, it's not whether you win or lose: it's..."
}
profileHref={"./profile.html"}
authorName={"Craig Anderson"}
avatarImgSrc={"./demo/faces/male/35.jpg"}
date={"3 days ago"}
/>
</Grid.Col>
</Grid.Row>
</Page.Content>
</SiteWrapper>
);
}

export default BlogPage;

0 comments on commit 133f904

Please sign in to comment.