Skip to content

Commit cc87c28

Browse files
committed
add vendor/font
1 parent 74fe387 commit cc87c28

File tree

15 files changed

+65
-84
lines changed

15 files changed

+65
-84
lines changed

src/images/logo_wide.jpg

109 KB
Loading

src/scripts/components/Header.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,24 @@ import Menu from './Menu';
44

55
import processRelPath from '../model/header';
66

7-
const Header = ({ title, rel = "" }) => {
7+
const Header = ({ title, page, rel = "" }) => {
88
const { homeLink, bannerLink, socials } = processRelPath(rel);
9-
9+
const { author, date } = page;
1010
return (
1111
<header className='header'>
12+
{/* <hgroup>
13+
<h1>{title}</h1>
14+
<h2>{author} <span>{date.toLocaleDateString()}</span></h2>
15+
<div className="logo">
16+
<a href={homeLink.href} title={homeLink.name}>
17+
<img src={homeLink.img} alt={title} />
18+
</a>
19+
</div>
20+
</hgroup> */}
21+
1222
<div className="row">
1323
<div className="col-md-3 col-xs-12 hidden-xs">
14-
<div className="logo">
15-
<a href={homeLink.href} title={homeLink.name}>
16-
<img src={homeLink.img} alt={title} />
17-
</a>
18-
</div>
24+
1925
</div>
2026
<div className="col-md-6 col-xs-12">
2127
<div className="banner-area">

src/scripts/components/Main.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ const Main = props => {
88
const { chrome, page, children } = props;
99
const { rel, gaKey, title } = chrome;
1010
return (
11-
<html className="no-js" lang="en">
11+
<html>
1212
<Head {...chrome} />
13-
<body data-track={gaKey} className='container'>
14-
<Header title={title} rel={rel}/>
15-
<main className='container'>
16-
{React.cloneElement(children, page)}
17-
</main>
13+
<body data-track={gaKey}>
14+
<article className='container'>
15+
<Header title={title} page={page} rel={rel}/>
16+
<main className='container'>
17+
{React.cloneElement(children, page)}
18+
</main>
19+
</article>
1820
<Footer rel={rel}/>
1921
</body>
2022
</html>

src/scripts/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Main from './components/Main';
55
const Root = ({chrome, page}) => {
66
return (
77
<Main chrome={chrome} page={page} >
8-
<div className="row">
8+
<div>
99
<aside>
1010
<p>Left Side</p>
1111
</aside>

src/scripts/model/header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import path from 'path';
22

33
const HeaderModel = {
4-
homeLink: {name: "Home", href: "./", img: "img/logo.png"},
4+
homeLink: {name: "Home", href: "./", img: "img/logo_wide.jpg"},
55
bannerLink: {name: "Banner Ad", href: "", img: "http://placehold.it/420x60"},
66
socials:[
77
{id: "icon-facebook", href: "http://facebook.com"},

src/scripts/model/menu.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"use strict";
1+
import path from 'path';
22

33
const MenuModel = [
44
{name: 'Home', href: "."},
@@ -32,11 +32,11 @@ export default function processRelPath(rel) {
3232
}
3333

3434
return children.map( m => {
35-
return {...m, href: relPath + m.href, children: transformChildren(m.children)};
35+
return {...m, href: path.join(relPath, m.href), children: transformChildren(m.children)};
3636
});
3737
}
3838

3939
return MenuModel.map( m => {
40-
return {...m, href: relPath + m.href, children: transformChildren(m.children)};
40+
return {...m, href: path.join(relPath, m.href), children: transformChildren(m.children)};
4141
});
4242
}

src/scripts/props/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ const chrome = {
1818
}
1919

2020
const page = {
21-
21+
author: "Modesty",
22+
date: new Date(2019, 8, 1, 0, 0, 0)
2223
};
2324

2425
export default { chrome, page };

src/scripts/props/pages/about.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@ export default {
1919
scripts: scripts.map(s => path.join(rel, s)),
2020
title: "About", description: "About Modesty Zhang"
2121
},
22-
page
22+
page: {
23+
...page,
24+
date: new Date(2019, 8, 2, 0, 0, 0)
25+
}
2326
}

src/scripts/props/pages/contact.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@ export default {
1919
scripts: scripts.map(s => path.join(rel, s)),
2020
title: "Contact", description: "Contact Modesty Zhang"
2121
},
22-
page
22+
page: {
23+
...page,
24+
date: new Date(2019, 8, 3, 0, 0, 0)
25+
}
2326
}

src/styles/_header.scss

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
@import "_vars";
22
@import "_mixins";
33

4-
$top-bar-margin: 10px;
4+
$top-bar-margin: 15px;
55

66
header {
77
background-color: transparent;
88

99
.logo {
1010
margin: $top-bar-margin 0;
11-
12-
a {
13-
font-size: 36px;
14-
}
15-
16-
img {
17-
width: 40px;
18-
}
1911
}
2012

2113
.banner-area {

0 commit comments

Comments
 (0)