-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
64 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,12 @@ import Header from '../components/Header'; | |
import Main from '../components/Main'; | ||
import Footer from '../components/Footer'; | ||
|
||
const Contact = ({title,description,scripts,styles,rel, gaKey}) => { | ||
const Contact = ({title,description,links,scripts,styles,rel,gaKey}) => { | ||
return ( | ||
<html className="no-js" lang="en"> | ||
<Head title={title} description={description} scripts={scripts} styles={styles} rel={rel} /> | ||
<Head title={title} description={description} links={links} scripts={scripts} styles={styles} rel={rel} /> | ||
<body data-track={gaKey} className='container'> | ||
<Header title={title} /> | ||
<Header title={title} rel={rel} /> | ||
<Main> | ||
<h1>Contact Me</h1> | ||
<p>email the author: <a href="mailto:[email protected]?subject=About%20CoeProject%20Article">[email protected]</a></p> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
import path from 'path'; | ||
import glob from 'glob'; | ||
|
||
const pkg = require('../../../package.json'); | ||
import Conf from '../../../tool/base.config'; | ||
import glob from 'glob'; | ||
|
||
export default { | ||
title: `Welcome to ${pkg.name} v${pkg.version}`, | ||
description: pkg.description, | ||
scripts: glob.sync('**/*.js', { cwd: Conf.target.js_path }), | ||
styles: glob.sync('**/*.css', { cwd: Conf.target.css_path }), | ||
rel: './', | ||
links: { | ||
"site.webmanifest": "site.webmanifest", | ||
"apple-touch-icon": "apple-touch-icon.png" | ||
}, | ||
scripts: glob.sync('**/*.js', { cwd: Conf.target.js_path }).map(s => path.join("js", s)), | ||
styles: glob.sync('**/*.css', { cwd: Conf.target.css_path }).map( s => path.join("css", s)), | ||
rel: '', | ||
gaKey: Conf.TRACK_ID | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
import path from 'path'; | ||
import indexProps from '../index'; | ||
|
||
export default { ...indexProps, rel: '../', title: "About", description: "About Modesty Zhang"}; | ||
const baseDir = path.resolve(__dirname, ".."); | ||
const rel = path.relative(__dirname, baseDir); | ||
|
||
const links = Object.keys(indexProps.links).reduce((ret, key) => { | ||
ret[key] = path.join(rel, indexProps.links[key]); | ||
return ret; | ||
}, {}); | ||
|
||
const scripts = indexProps.scripts.map(s => path.join(rel, s)); | ||
const styles = indexProps.styles.map(s => path.join(rel, s)); | ||
|
||
export default { | ||
...indexProps, rel, links, styles, scripts, | ||
title: "About", description: "About Modesty Zhang" | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
import path from 'path'; | ||
import indexProps from '../index'; | ||
|
||
export default { ...indexProps, rel: '../', title: "Contact", description: "Contact Modesty Zhang"}; | ||
const baseDir = path.resolve(__dirname, ".."); | ||
const rel = path.relative(__dirname, baseDir); | ||
|
||
const links = Object.keys(indexProps.links).reduce((ret, key) => { | ||
ret[key] = path.join(rel, indexProps.links[key]); | ||
return ret; | ||
}, {}); | ||
|
||
const scripts = indexProps.scripts.map(s => path.join(rel, s)); | ||
const styles = indexProps.styles.map(s => path.join(rel, s)); | ||
|
||
export default { | ||
...indexProps, rel, links, styles, scripts, | ||
title: "Contact", description: "Contact Modesty Zhang" | ||
}; |